From ed8752d2034b4a1422deee7ef92814e4ca1ec246 Mon Sep 17 00:00:00 2001 From: Thuan Vo Date: Tue, 27 Jan 2026 13:51:13 -0800 Subject: [PATCH 1/3] deps: bump CCO to version with AWS SDK v2 go get github.com/openshift/cloud-credential-operator@a3e50aeacc55 --- go.mod | 43 +++++++++++------------ go.sum | 109 ++++++++++++++++++++++++++++++--------------------------- 2 files changed, 78 insertions(+), 74 deletions(-) diff --git a/go.mod b/go.mod index 3a221331fe..a0b6172aa1 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( cloud.google.com/go/kms v1.22.0 cloud.google.com/go/monitoring v1.24.2 cloud.google.com/go/storage v1.57.0 - github.com/AlecAivazis/survey/v2 v2.3.5 + github.com/AlecAivazis/survey/v2 v2.3.7 github.com/Azure/azure-sdk-for-go v68.0.0+incompatible github.com/Azure/azure-sdk-for-go/sdk/azcore v1.19.1 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.0 @@ -43,7 +43,7 @@ require ( github.com/aws/aws-sdk-go-v2/credentials v1.18.16 github.com/aws/aws-sdk-go-v2/service/ec2 v1.233.0 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.49.0 - github.com/aws/aws-sdk-go-v2/service/iam v1.32.0 + github.com/aws/aws-sdk-go-v2/service/iam v1.35.3 github.com/aws/aws-sdk-go-v2/service/route53 v1.48.6 github.com/aws/aws-sdk-go-v2/service/s3 v1.88.4 github.com/aws/aws-sdk-go-v2/service/sts v1.38.6 @@ -63,7 +63,7 @@ require ( github.com/go-openapi/strfmt v0.23.0 github.com/go-openapi/swag v0.23.1 github.com/go-openapi/validate v0.24.0 - github.com/go-playground/validator/v10 v10.26.0 + github.com/go-playground/validator/v10 v10.27.0 github.com/golang-jwt/jwt/v4 v4.5.2 github.com/golang/protobuf v1.5.4 github.com/google/go-cmp v0.7.0 @@ -79,7 +79,7 @@ require ( github.com/kdomanski/iso9660 v0.2.1 github.com/metal3-io/baremetal-operator/apis v0.4.0 github.com/metal3-io/baremetal-operator/pkg/hardwareutils v0.4.0 - github.com/microsoft/kiota-authentication-azure-go v0.6.0 + github.com/microsoft/kiota-authentication-azure-go v1.3.0 github.com/microsoftgraph/msgraph-sdk-go v0.59.0 github.com/nutanix-cloud-native/cluster-api-provider-nutanix v1.7.0 github.com/nutanix-cloud-native/prism-go-client v0.5.0 @@ -90,7 +90,7 @@ require ( github.com/openshift/assisted-service/client v0.0.0 github.com/openshift/assisted-service/models v0.0.0 github.com/openshift/client-go v0.0.0-20251015124057-db0dee36e235 - github.com/openshift/cloud-credential-operator v0.0.0-20240404165937-5e8812d64187 + github.com/openshift/cloud-credential-operator v0.0.0-20250925191450-a3e50aeacc55 github.com/openshift/cluster-api-provider-baremetal v0.0.0-20220408122422-7a548effc26e github.com/openshift/cluster-api-provider-libvirt v0.2.1-0.20230308152226-83c0473d4429 github.com/openshift/cluster-api-provider-ovirt v0.1.1-0.20220323121149-e3f2850dd519 @@ -167,15 +167,16 @@ require ( github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.29.0 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.53.0 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.53.0 // indirect + github.com/aws/aws-sdk-go-v2/service/cloudfront v1.40.4 // indirect github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 // indirect github.com/envoyproxy/go-control-plane/envoy v1.32.4 // indirect github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect - github.com/evanphx/json-patch v5.9.11+incompatible // indirect github.com/go-jose/go-jose/v4 v4.1.2 // indirect github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect github.com/spiffe/go-spiffe/v2 v2.5.0 // indirect + github.com/std-uritemplate/std-uritemplate/go/v2 v2.0.5 // indirect github.com/zeebo/errs v1.4.0 // indirect - go.opentelemetry.io/contrib/detectors/gcp v1.36.0 // indirect + go.opentelemetry.io/contrib/detectors/gcp v1.37.0 // indirect go.opentelemetry.io/otel/sdk v1.38.0 // indirect go.opentelemetry.io/otel/sdk/metric v1.38.0 // indirect go.yaml.in/yaml/v2 v2.4.2 // indirect @@ -195,10 +196,10 @@ require ( github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest/adal v0.9.24 // indirect - github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect + github.com/Azure/go-autorest/autorest/date v0.3.1 // indirect github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect - github.com/Azure/go-autorest/logger v0.2.1 // indirect - github.com/Azure/go-autorest/tracing v0.6.0 // indirect + github.com/Azure/go-autorest/logger v0.2.2 // indirect + github.com/Azure/go-autorest/tracing v0.6.1 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.5.0 // indirect github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c // indirect github.com/MakeNowJust/heredoc v1.0.0 // indirect @@ -224,7 +225,6 @@ require ( github.com/blang/semver/v4 v4.0.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chai2010/gettext-go v1.0.2 // indirect - github.com/cjlapao/common-go v0.0.39 // indirect github.com/containers/storage v1.54.0 // indirect github.com/coreos/go-json v0.0.0-20230131223807-18775e0fb4fb // indirect github.com/coreos/go-semver v0.3.1 // indirect @@ -284,12 +284,12 @@ require ( github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect - github.com/microsoft/kiota-abstractions-go v0.18.0 // indirect - github.com/microsoft/kiota-http-go v0.16.0 // indirect - github.com/microsoft/kiota-serialization-form-go v0.9.0 // indirect - github.com/microsoft/kiota-serialization-json-go v0.9.0 // indirect - github.com/microsoft/kiota-serialization-text-go v0.7.0 // indirect - github.com/microsoftgraph/msgraph-sdk-go-core v0.34.1 // indirect + github.com/microsoft/kiota-abstractions-go v1.9.2 // indirect + github.com/microsoft/kiota-http-go v1.5.4 // indirect + github.com/microsoft/kiota-serialization-form-go v1.1.2 // indirect + github.com/microsoft/kiota-serialization-json-go v1.1.2 // indirect + github.com/microsoft/kiota-serialization-text-go v1.1.2 // indirect + github.com/microsoftgraph/msgraph-sdk-go-core v1.2.1 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/moby/spdystream v0.5.0 // indirect @@ -321,11 +321,10 @@ require ( github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/xlab/treeprint v1.2.0 // indirect - github.com/yosida95/uritemplate/v3 v3.0.2 // indirect - go.mongodb.org/mongo-driver v1.17.3 // indirect + go.mongodb.org/mongo-driver v1.17.4 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.62.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0 // indirect go.opentelemetry.io/otel v1.38.0 // indirect go.opentelemetry.io/otel/metric v1.38.0 // indirect go.opentelemetry.io/otel/trace v1.38.0 // indirect @@ -337,7 +336,7 @@ require ( golang.org/x/time v0.14.0 // indirect golang.org/x/tools v0.37.0 // indirect gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect - google.golang.org/genproto v0.0.0-20250603155806-513f23925822 // indirect + google.golang.org/genproto v0.0.0-20250707201910-8d1bb00bc6a7 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20251029180050-ab9386a59fda // indirect google.golang.org/protobuf v1.36.10 // indirect gopkg.in/djherbis/times.v1 v1.3.0 // indirect diff --git a/go.sum b/go.sum index 3442137576..e0b9f65b48 100644 --- a/go.sum +++ b/go.sum @@ -33,8 +33,8 @@ github.com/4meepo/tagalign v1.4.2 h1:0hcLHPGMjDyM1gHG58cS73aQF8J4TdVR96TZViorO9E github.com/4meepo/tagalign v1.4.2/go.mod h1:+p4aMyFM+ra7nb41CnFG6aSDXqRxU/w1VQqScKqDARI= github.com/Abirdcfly/dupword v0.1.3 h1:9Pa1NuAsZvpFPi9Pqkd93I7LIYRURj+A//dFd5tgBeE= github.com/Abirdcfly/dupword v0.1.3/go.mod h1:8VbB2t7e10KRNdwTVoxdBaxla6avbhGzb8sCTygUMhw= -github.com/AlecAivazis/survey/v2 v2.3.5 h1:A8cYupsAZkjaUmhtTYv3sSqc7LO5mp1XDfqe5E/9wRQ= -github.com/AlecAivazis/survey/v2 v2.3.5/go.mod h1:4AuI9b7RjAR+G7v9+C4YSlX/YL3K3cWNXgWXOhllqvI= +github.com/AlecAivazis/survey/v2 v2.3.7 h1:6I/u8FvytdGsgonrYsVn2t8t4QiRnh6QSTqkkhIiSjQ= +github.com/AlecAivazis/survey/v2 v2.3.7/go.mod h1:xUTIdE4KCOIjsBAE1JYsUPoCqYdZ1reCfTwbto0Fduo= github.com/Antonboom/errname v1.0.0 h1:oJOOWR07vS1kRusl6YRSlat7HFnb3mSfMl6sDMRoTBA= github.com/Antonboom/errname v1.0.0/go.mod h1:gMOBFzK/vrTiXN9Oh+HFs+e6Ndl0eTFbtsRTSRdXyGI= github.com/Antonboom/nilnil v1.0.1 h1:C3Tkm0KUxgfO4Duk3PM+ztPncTFlOf0b2qadmS0s4xs= @@ -69,8 +69,8 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v3 v3.1.0 h1:2qsI github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal/v3 v3.1.0/go.mod h1:AW8VEadnhw9xox+VaVd9sP7NjzOAnaZBLRH6Tq3cJ38= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.5.0 h1:nnQ9vXH039UrEFxi08pPuZBE7VfqSJt343uJLw0rhWI= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/keyvault/armkeyvault v1.5.0/go.mod h1:4YIVtzMFVsPwBvitCDX7J9sqthSj43QD1sP6fYc1egc= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups v1.0.0 h1:pPvTJ1dY0sA35JOeFq6TsY2xj6Z85Yo23Pj4wCCvu4o= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups v1.0.0/go.mod h1:mLfWfj8v3jfWKsL9G4eoBoXVcsqcIUTapmdKy7uGOp0= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups v1.2.0 h1:akP6VpxJGgQRpDR1P462piz/8OhYLRCreDj48AyNabc= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups v1.2.0/go.mod h1:8wzvopPfyZYPaQUoKW87Zfdul7jmJMDfp/k7YY3oJyA= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/msi/armmsi v1.3.0 h1:L7G3dExHBgUxsO3qpTGhk/P2dgnYyW48yn7AO33Tbek= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/msi/armmsi v1.3.0/go.mod h1:Ms6gYEy0+A2knfKrwdatsggTXYA2+ICKug8w7STorFw= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0 h1:QM6sE5k2ZT/vI5BEe0r7mqjsUSnhVBFbOsVkEuaEfiA= @@ -98,19 +98,23 @@ github.com/Azure/go-autorest/autorest v0.11.30/go.mod h1:t1kpPIOpIVX7annvothKvb0 github.com/Azure/go-autorest/autorest/adal v0.9.22/go.mod h1:XuAbAEUv2Tta//+voMI038TrJBqjKam0me7qR+L8Cmk= github.com/Azure/go-autorest/autorest/adal v0.9.24 h1:BHZfgGsGwdkHDyZdtQRQk1WeUdW0m2WPAwuHZwUi5i4= github.com/Azure/go-autorest/autorest/adal v0.9.24/go.mod h1:7T1+g0PYFmACYW5LlG2fcoPiPlFHjClyRGL7dRlP5c8= -github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= +github.com/Azure/go-autorest/autorest/date v0.3.1 h1:o9Z8Jyt+VJJTCZ/UORishuHOusBwolhjokt9s5k8I4w= +github.com/Azure/go-autorest/autorest/date v0.3.1/go.mod h1:Dz/RDmXlfiFFS/eW+b/xMUSFs1tboPVy6UjgADToWDM= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/autorest/mocks v0.4.2 h1:PGN4EDXnuQbojHbU0UWoNvmu9AGVwYHG9/fkDYhtAfw= github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= +github.com/Azure/go-autorest/autorest/mocks v0.4.3 h1:GXOGHjM7L2PF7tOuB0BawXMK5govrcUt3mF0qD0Qh30= +github.com/Azure/go-autorest/autorest/mocks v0.4.3/go.mod h1:Z5HZUetq7pVWST7gWM79R9uGOyxEqyw76Oua5q9PhfQ= github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= github.com/Azure/go-autorest/autorest/validation v0.3.1 h1:AgyqjAd94fwNAoTjl/WQXg4VvFeRFpO+UhNyRXqF1ac= github.com/Azure/go-autorest/autorest/validation v0.3.1/go.mod h1:yhLgjC0Wda5DYXl6JAsWyUe4KVNffhoDhG0zVzUMo3E= -github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= +github.com/Azure/go-autorest/logger v0.2.2 h1:hYqBsEBywrrOSW24kkOCXRcKfKhK76OzLTfF+MYDE2o= +github.com/Azure/go-autorest/logger v0.2.2/go.mod h1:I5fg9K52o+iuydlWfa9T5K6WFos9XYr9dYTFzpqgibw= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= +github.com/Azure/go-autorest/tracing v0.6.1 h1:YUMSrC/CeD1ZnnXcNYU4a/fzsO35u2Fsful9L/2nyR0= +github.com/Azure/go-autorest/tracing v0.6.1/go.mod h1:/3EgjbsjraOqiicERAeu3m7/z0x1TzjQGAwDrJrXGkc= github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1 h1:WJTmL004Abzc5wDB5VtZG2PJk5ndYDgVacGqfirKxjM= github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1/go.mod h1:tCcJZ0uHAmvjsVYzEFivsRTN00oz5BEsRgQHu5JZ9WE= github.com/AzureAD/microsoft-authentication-library-for-go v1.5.0 h1:XkkQbfMyuH2jTSjQjSoihryI8GINRcs4xp8lNawg0FI= @@ -219,6 +223,8 @@ github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d 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.4.9 h1:w9LnHqTq8MEdlnyhV4Bwfizd65lfNCNgdlNC6mM5paE= github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.9/go.mod h1:LGEP6EK4nj+bwWNdrvX/FnDTFowdBNwcSPuZu/ouFys= +github.com/aws/aws-sdk-go-v2/service/cloudfront v1.40.4 h1:nM1+AHCnpGbYzOCcWi4Q7IDCH/Hh3LJ+146rcI184nU= +github.com/aws/aws-sdk-go-v2/service/cloudfront v1.40.4/go.mod h1:GM6Olux4KAMUmRw0XgadfpN1cOpm5eWYZ31PAj59JSk= github.com/aws/aws-sdk-go-v2/service/ec2 v1.233.0 h1:VxmOsv7MswuKQcSEIurxe4RK9tC6zYnosw9vBvv74lA= github.com/aws/aws-sdk-go-v2/service/ec2 v1.233.0/go.mod h1:35jGWx7ECvCwTsApqicFYzZ7JFEnBc6oHUuOQ3xIS54= github.com/aws/aws-sdk-go-v2/service/efs v1.40.5 h1:iOfTDjU/S2b0BSWCqv7fDbT4uKo0e3jdtnRHVwXXggI= @@ -227,8 +233,8 @@ github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.32.0 h1:FO6LzHczDXB 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= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.49.0/go.mod h1:vJgvNz01VmSuXKzoUwQxQCzYklI/f09wXCWoj6TBGJE= -github.com/aws/aws-sdk-go-v2/service/iam v1.32.0 h1:ZNlfPdw849gBo/lvLFbEEvpTJMij0LXqiNWZ+lIamlU= -github.com/aws/aws-sdk-go-v2/service/iam v1.32.0/go.mod h1:aXWImQV0uTW35LM0A/T4wEg6R1/ReXUu4SM6/lUHYK0= +github.com/aws/aws-sdk-go-v2/service/iam v1.35.3 h1:bWFkGGea2UoD/m229uuRfT0mu+6pKNB0Kq4U6j/Qz3U= +github.com/aws/aws-sdk-go-v2/service/iam v1.35.3/go.mod h1:PpmEOH3ZTQlDAezieBVdFMjPO1jovUMNPA4OpCtnwbY= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 h1:oegbebPEMA/1Jny7kvwejowCaHz1FWZAQ94WXFNCyTM= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1/go.mod h1:kemo5Myr9ac0U9JfSjMo9yHLtw+pECEHsFtJ9tqCEI8= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.0 h1:X0FveUndcZ3lKbSpIC6rMYGRiQTcUVRNH6X4yYtIrlU= @@ -295,8 +301,6 @@ github.com/chavacava/garif v0.1.0/go.mod h1:XMyYCkEL58DF0oyW4qDjjnPWONs2HBqYKI+U github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/cjlapao/common-go v0.0.39 h1:bAAUrj2B9v0kMzbAOhzjSmiyDy+rd56r2sy7oEiQLlA= -github.com/cjlapao/common-go v0.0.39/go.mod h1:M3dzazLjTjEtZJbbxoA5ZDiGCiHmpwqW9l4UWaddwOA= github.com/ckaznocha/intrange v0.3.0 h1:VqnxtK32pxgkhJgYQEeOArVidIPg+ahLP7WBOXZd5ZY= github.com/ckaznocha/intrange v0.3.0/go.mod h1:+I/o2d2A1FBHgGELbGxzIcyd3/9l9DuwjM8FsbSS3Lo= github.com/clarketm/json v1.14.1 h1:43bkbTTKKdDx7crs3WHzkrnH6S1EvAF1VZrdFGMmmz4= @@ -327,8 +331,8 @@ github.com/coreos/vcontext v0.0.0-20230201181013-d72178a18687/go.mod h1:Salmysdw github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.17/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= -github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= -github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= +github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s= +github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= github.com/creasty/defaults v1.6.0 h1:ltuE9cfphUtlrBeomuu8PEyISTXnxqkBIoQfXgv7BSc= github.com/creasty/defaults v1.6.0/go.mod h1:iGzKe6pbEHnpMPtfDXZEr0NVxWnPTjb1bbDy08fPzYM= github.com/curioswitch/go-reassign v0.3.0 h1:dh3kpQHuADL3cobV/sSGETA8DOv457dwl+fbBAhrQPs= @@ -459,8 +463,8 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.26.0 h1:SP05Nqhjcvz81uJaRfEV0YBSSSGMc/iMaVtFbr3Sw2k= -github.com/go-playground/validator/v10 v10.26.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= +github.com/go-playground/validator/v10 v10.27.0 h1:w8+XrWVMhGkxOaaowyKH35gFydVHOvC0/uWoy2Fzwn4= +github.com/go-playground/validator/v10 v10.27.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= @@ -584,8 +588,8 @@ github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/martian/v3 v3.3.3 h1:DIhPTQrbPkgs2yJYdXU/eNACCG5DVQjySNRNlflZ9Fc= github.com/google/martian/v3 v3.3.3/go.mod h1:iEPrYcgCF7jA9OtScMFQyAlZZ4YXTKEtJ1E6RWzmBA0= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8= -github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA= +github.com/google/pprof v0.0.0-20250630185457-6e76a2b096b5 h1:xhMrHhTJ6zxu3gA4enFM9MLn9AY7613teCdFnlUVbSQ= +github.com/google/pprof v0.0.0-20250630185457-6e76a2b096b5/go.mod h1:5hDyRhoBCxViHszMt12TnOpEI4VVi+U8Gm9iphldiMA= github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0= github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -648,8 +652,9 @@ github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= -github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec h1:qv2VnGeEQHchGaZ/u7lxST/RaJw+cv273q79D81Xbog= github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68= +github.com/hinshun/vt10x v0.0.0-20220301184237-5011da428d02 h1:AgcIVYPa6XJnU3phs104wLj8l5GEththEw6+F79YsIY= +github.com/hinshun/vt10x v0.0.0-20220301184237-5011da428d02/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI= github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= @@ -789,22 +794,22 @@ github.com/mgechev/revive v1.7.0/go.mod h1:qZnwcNhoguE58dfi96IJeSTPeZQejNeoMQLUZ github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI= github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= -github.com/microsoft/kiota-abstractions-go v0.18.0 h1:H1kQE5hAq/7Q8gENPJ1Y7DuvG9QqKCpglN8D7TJi9qY= -github.com/microsoft/kiota-abstractions-go v0.18.0/go.mod h1:0lbPErVO6Rj3HHpntNYW/OFmHhJJ1ewPdsi1xPxYIMc= -github.com/microsoft/kiota-authentication-azure-go v0.6.0 h1:Il9bLO34J6D8DY89xYAXoGh9muvlphayqG4eihyT6B8= -github.com/microsoft/kiota-authentication-azure-go v0.6.0/go.mod h1:EJCHiLWLXW1/mSgX7lYReAhVO37MzRT5Xi2mcPTwCRQ= -github.com/microsoft/kiota-http-go v0.16.0 h1:eRRKAUwZfVTPNrHJ/DBYUT3BkjZJ5wyl2mhNqG91eu8= -github.com/microsoft/kiota-http-go v0.16.0/go.mod h1:4B/FetdJ1/XAIV7Qe84LgF0HV64NRPWzLruLFcdVqmc= -github.com/microsoft/kiota-serialization-form-go v0.9.0 h1:ZMyvuxg7z1LmRWJOXr5QuJlwnD/tuNatb+k1KPURBFQ= -github.com/microsoft/kiota-serialization-form-go v0.9.0/go.mod h1:FQqYzIrGX6KUoDOlg+DhDWoGaZoB8AicBYGOsBq0Dw4= -github.com/microsoft/kiota-serialization-json-go v0.9.0 h1:Em/YJb3eQGxcjNIPqKuaKrcuD0ib7tWXfaWccJrtIcc= -github.com/microsoft/kiota-serialization-json-go v0.9.0/go.mod h1:S7Ltu0/5hQjfeWmV9vQT5KYdFOsqHGdfMoP4Zo9Ctlw= -github.com/microsoft/kiota-serialization-text-go v0.7.0 h1:uayeq8fpDcZgL0zDyLkYZsH6zNnEXKgp+bRWfR5LcxA= -github.com/microsoft/kiota-serialization-text-go v0.7.0/go.mod h1:2su1PTllHCMNkHugmvpYad+AKBXUUGoiNP3xOAJUL7w= +github.com/microsoft/kiota-abstractions-go v1.9.2 h1:3U5VgN2YGe3lsu1pyuS0t5jxv1llxX2ophwX8ewE6wQ= +github.com/microsoft/kiota-abstractions-go v1.9.2/go.mod h1:f06pl3qSyvUHEfVNkiRpXPkafx7khZqQEb71hN/pmuU= +github.com/microsoft/kiota-authentication-azure-go v1.3.0 h1:PWH6PgtzhJjnmvR6N1CFjriwX09Kv7S5K3vL6VbPVrg= +github.com/microsoft/kiota-authentication-azure-go v1.3.0/go.mod h1:l/MPGUVvD7xfQ+MYSdZaFPv0CsLDqgSOp8mXwVgArIs= +github.com/microsoft/kiota-http-go v1.5.4 h1:wSUmL1J+bTQlAWHjbRkSwr+SPAkMVYeYxxB85Zw0KFs= +github.com/microsoft/kiota-http-go v1.5.4/go.mod h1:L+5Ri+SzwELnUcNA0cpbFKp/pBbvypLh3Cd1PR6sjx0= +github.com/microsoft/kiota-serialization-form-go v1.1.2 h1:SD6MATqNw+Dc5beILlsb/D87C36HKC/Zw7l+N9+HY2A= +github.com/microsoft/kiota-serialization-form-go v1.1.2/go.mod h1:m4tY2JT42jAZmgbqFwPy3zGDF+NPJACuyzmjNXeuHio= +github.com/microsoft/kiota-serialization-json-go v1.1.2 h1:eJrPWeQ665nbjO0gsHWJ0Bw6V/ZHHU1OfFPaYfRG39k= +github.com/microsoft/kiota-serialization-json-go v1.1.2/go.mod h1:deaGt7fjZarywyp7TOTiRsjfYiyWxwJJPQZytXwYQn8= +github.com/microsoft/kiota-serialization-text-go v1.1.2 h1:7OfKFlzdjpPygca/+OtqafkEqCWR7+94efUFGC28cLw= +github.com/microsoft/kiota-serialization-text-go v1.1.2/go.mod h1:QNTcswkBPFY3QVBFmzfk00UMNViKQtV0AQKCrRw5ibM= github.com/microsoftgraph/msgraph-sdk-go v0.59.0 h1:gS/rWZVpQGT3gaR01MWTaH85cISjnSZSXA5s3Ynoe9E= github.com/microsoftgraph/msgraph-sdk-go v0.59.0/go.mod h1:RBrQLknmiglNeL5QarizkazPxs10ONHY/CUtNK9bzkI= -github.com/microsoftgraph/msgraph-sdk-go-core v0.34.1 h1:tGDR/Je5mnf4Kn01w8/5HyywPL07JonFfe6Ip0w7a08= -github.com/microsoftgraph/msgraph-sdk-go-core v0.34.1/go.mod h1:28uAIh5Oa9x4yfiKCrjTbG+1hikkf82jEzSKb7gC+Dg= +github.com/microsoftgraph/msgraph-sdk-go-core v1.2.1 h1:P1wpmn3xxfPMFJHg+PJPcusErfRkl63h6OdAnpDbkS8= +github.com/microsoftgraph/msgraph-sdk-go-core v1.2.1/go.mod h1:vFmWQGWyLlhxCESNLv61vlE4qesBU+eWmEVH7DJSESA= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= @@ -858,8 +863,9 @@ github.com/nutanix-cloud-native/cluster-api-provider-nutanix v1.7.2-0.2025100702 github.com/nutanix-cloud-native/prism-go-client v0.5.0 h1:aSNuKDOK7+q676MQyetYXcySY41IjSvN2UmrDIU3+6s= github.com/nutanix-cloud-native/prism-go-client v0.5.0/go.mod h1:QhLX+sEep0cStzHVYU6mPgIlnA8U3DySskagrbDprRk= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY= +github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= @@ -904,8 +910,8 @@ github.com/openshift/baremetal-operator/pkg/hardwareutils v0.0.0-20231128154154- github.com/openshift/baremetal-operator/pkg/hardwareutils v0.0.0-20231128154154-6736c9b9c6c8/go.mod h1:399nvdaqoU9rTI25UdFw2EWcVjmJPpeZPIhfDAIx/XU= github.com/openshift/client-go v0.0.0-20251015124057-db0dee36e235 h1:9JBeIXmnHlpXTQPi7LPmu1jdxznBhAE7bb1K+3D8gxY= github.com/openshift/client-go v0.0.0-20251015124057-db0dee36e235/go.mod h1:L49W6pfrZkfOE5iC1PqEkuLkXG4W0BX4w8b+L2Bv7fM= -github.com/openshift/cloud-credential-operator v0.0.0-20240404165937-5e8812d64187 h1:v2D/+SWsOPsl4Syz1SVjo7m3L0ethuRGR++ubsb89oA= -github.com/openshift/cloud-credential-operator v0.0.0-20240404165937-5e8812d64187/go.mod h1:eyA6FG71366St6Q1TW+jXdQbald0rUwtEPhAREMlyhA= +github.com/openshift/cloud-credential-operator v0.0.0-20250925191450-a3e50aeacc55 h1:l4vr7i3v6Z+Ho2X6Msr7dUK1HqyGjwqNvsZ8qITyzxc= +github.com/openshift/cloud-credential-operator v0.0.0-20250925191450-a3e50aeacc55/go.mod h1:vRzx2kLy4/GPEwJb/PDUyS3C1/eLkhQD5Hezp+wQQCw= github.com/openshift/cloud-provider-vsphere v1.19.1-0.20240626105621-6464d0bb4928 h1:gX0HAKR0f40xmMWlUSn8DBMCjip8Iuzg5XToWAv6Uzw= github.com/openshift/cloud-provider-vsphere v1.19.1-0.20240626105621-6464d0bb4928/go.mod h1:eVEtCena8tmeeYDKwZlA2w+xBKzBHbQZ4CNHV8KL4ho= github.com/openshift/cluster-api-actuator-pkg/testutils v0.0.0-20250910145856-21d03d30056d h1:+sqUThLi/lmgT5/scmmjnS6+RZFtbdxRAscNfCPyLPI= @@ -1056,6 +1062,8 @@ github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YE github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= github.com/stbenjam/no-sprintf-host-port v0.2.0 h1:i8pxvGrt1+4G0czLr/WnmyH7zbZ8Bg8etvARQ1rpyl4= github.com/stbenjam/no-sprintf-host-port v0.2.0/go.mod h1:eL0bQ9PasS0hsyTyfTjjG+E80QIyPnBVQbYZyv20Jfk= +github.com/std-uritemplate/std-uritemplate/go/v2 v2.0.5 h1:d3ht4RA1cu00hB+olyK+ppvOEhphHY3oGfSo/BMPlqo= +github.com/std-uritemplate/std-uritemplate/go/v2 v2.0.5/go.mod h1:Z5KcoM0YLC7INlNhEezeIZ0TZNYf7WSNO0Lvah4DSeQ= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs= github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= @@ -1126,8 +1134,6 @@ github.com/yeya24/promlinter v0.3.0 h1:JVDbMp08lVCP7Y6NP3qHroGAO6z2yGKQtS5Jsjqto github.com/yeya24/promlinter v0.3.0/go.mod h1:cDfJQQYv9uYciW60QT0eeHlFodotkYZlL+YcPQN+mW4= github.com/ykadowak/zerologlint v0.1.5 h1:Gy/fMz1dFQN9JZTPjv1hxEk+sRWm05row04Yoolgdiw= github.com/ykadowak/zerologlint v0.1.5/go.mod h1:KaUskqF3e/v59oPmdq1U1DnKcuHokl2/K1U4pmIELKg= -github.com/yosida95/uritemplate/v3 v3.0.2 h1:Ed3Oyj9yrmi9087+NczuL5BwkIc4wvTb5zIM+UJPGz4= -github.com/yosida95/uritemplate/v3 v3.0.2/go.mod h1:ILOh0sOhIJR3+L/8afwt/kE++YT040gmv5BQTMR2HP4= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= @@ -1145,24 +1151,24 @@ go-simpler.org/sloglint v0.9.0/go.mod h1:G/OrAF6uxj48sHahCzrbarVMptL2kjWTaUeC8+f go.keploy.io/server v0.8.6 h1:czE9jaliyAkMMJcYnMPNuu6tun7UgwFbokxEG95vLN4= go.keploy.io/server v0.8.6/go.mod h1:t7BPuZQSiC3PNHZ9dbn3e3VB61HNWwiqVmaRujfDFUg= go.mongodb.org/mongo-driver v1.4.3/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= -go.mongodb.org/mongo-driver v1.17.3 h1:TQyXhnsWfWtgAhMtOgtYHMTkZIfBTpMTsMnd9ZBeHxQ= -go.mongodb.org/mongo-driver v1.17.3/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= +go.mongodb.org/mongo-driver v1.17.4 h1:jUorfmVzljjr0FLzYQsGP8cgN/qzzxlY9Vh0C9KFXVw= +go.mongodb.org/mongo-driver v1.17.4/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/contrib/detectors/gcp v1.36.0 h1:F7q2tNlCaHY9nMKHR6XH9/qkp8FktLnIcy6jJNyOCQw= -go.opentelemetry.io/contrib/detectors/gcp v1.36.0/go.mod h1:IbBN8uAIIx734PTonTPxAxnjc2pQTxWNkwfstZ+6H2k= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 h1:q4XOmH/0opmeuJtPsbFNivyl7bCt7yRBbeEm2sC/XtQ= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0/go.mod h1:snMWehoOh2wsEwnvvwtDyFCxVeDAODenXHtn5vzrKjo= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 h1:F7Jx+6hwnZ41NSFTO5q4LYDtJRXBf2PD0rNBkeB/lus= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q= +go.opentelemetry.io/contrib/detectors/gcp v1.37.0 h1:B+WbN9RPsvobe6q4vP6KgM8/9plR/HNjgGBrfcOlweA= +go.opentelemetry.io/contrib/detectors/gcp v1.37.0/go.mod h1:K5zQ3TT7p2ru9Qkzk0bKtCql0RGkPj9pRjpXgZJZ+rU= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.62.0 h1:rbRJ8BBoVMsQShESYZ0FkvcITu8X8QNwJogcLUmDNNw= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.62.0/go.mod h1:ru6KHrNtNHxM4nD/vd6QrLVWgKhxPYgblq4VAtNawTQ= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0 h1:Hf9xI/XLML9ElpiHVDNwvqI0hIFlzV8dgIr35kV1kRU= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0/go.mod h1:NfchwuyNoMcZ5MLHwPrODwUF1HWCXWrL31s8gSAdIKY= go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 h1:GqRJVj7UmLjCVyVJ3ZFLdPRmhDUp2zFmQe3RHIOsw24= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0/go.mod h1:ri3aaHSmCTVYu2AWv44YMauwAQc0aqI9gHKIcSbI1pU= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0 h1:lwI4Dc5leUqENgGuQImwLo4WnuXFPetmPpkLi2IrX54= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0/go.mod h1:Kz/oCE7z5wuyhPxsXDuaPteSWqjSBD5YaSdbxZYGbGk= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.36.0 h1:rixTyDGXFxRy1xzhKrotaHy3/KXdPhlWARrCgK+eqUY= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.36.0/go.mod h1:dowW6UsM9MKbJq5JTz2AMVp3/5iW5I/TStsk8S+CfHw= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.37.0 h1:6VjV6Et+1Hd2iLZEPtdV7vie80Yyqf7oikJLjQ/myi0= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.37.0/go.mod h1:u8hcp8ji5gaM/RfcOo8z9NMnf1pVLfVY7lBY2VOGuUU= go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= @@ -1288,7 +1294,6 @@ golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220408201424-a24fb2fb8a0f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1301,7 +1306,6 @@ golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ= golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= @@ -1315,6 +1319,7 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= @@ -1366,8 +1371,8 @@ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoA google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20250603155806-513f23925822 h1:rHWScKit0gvAPuOnu87KpaYtjK5zBMLcULh7gxkCXu4= -google.golang.org/genproto v0.0.0-20250603155806-513f23925822/go.mod h1:HubltRL7rMh0LfnQPkMH4NPDFEWp0jw3vixw7jEM53s= +google.golang.org/genproto v0.0.0-20250707201910-8d1bb00bc6a7 h1:FGOcxvKlJgRBVbXeugjljCfCgfKWhC42FBoYmTCWVBs= +google.golang.org/genproto v0.0.0-20250707201910-8d1bb00bc6a7/go.mod h1:249YoW4b1INqFTEop2T4aJgiO7UBYJrpejsaLvjWfI8= google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5 h1:BIRfGDEjiHRrk0QKZe3Xv2ieMhtgRGeLcZQ0mIVn4EY= google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5/go.mod h1:j3QtIyytwqGr1JUDtYXwtMXWPKsEa5LtzIFN1Wn5WvE= google.golang.org/genproto/googleapis/rpc v0.0.0-20251029180050-ab9386a59fda h1:i/Q+bfisr7gq6feoJnS/DlpdwEL4ihp41fvRiM3Ork0= From 4be868ee3b5bc1d61efb2af7df260f5e56da8000 Mon Sep 17 00:00:00 2001 From: Thuan Vo Date: Tue, 27 Jan 2026 13:52:37 -0800 Subject: [PATCH 2/3] go mod vendor --- .../AlecAivazis/survey/v2/README.md | 33 + .../AlecAivazis/survey/v2/confirm.go | 1 + .../AlecAivazis/survey/v2/core/template.go | 35 +- .../AlecAivazis/survey/v2/core/write.go | 14 +- .../github.com/AlecAivazis/survey/v2/input.go | 15 +- .../AlecAivazis/survey/v2/multiselect.go | 20 +- .../AlecAivazis/survey/v2/password.go | 6 +- .../AlecAivazis/survey/v2/renderer.go | 5 +- .../AlecAivazis/survey/v2/select.go | 84 +- .../AlecAivazis/survey/v2/survey.go | 52 +- .../survey/v2/terminal/display_posix.go | 1 + .../AlecAivazis/survey/v2/terminal/error.go | 1 + .../AlecAivazis/survey/v2/terminal/output.go | 1 + .../survey/v2/terminal/runereader.go | 31 + .../survey/v2/terminal/runereader_bsd.go | 1 + .../survey/v2/terminal/runereader_linux.go | 1 + .../survey/v2/terminal/runereader_posix.go | 1 + .../survey/v2/terminal/runereader_ppc64le.go | 1 + .../AlecAivazis/survey/v2/transform.go | 5 +- .../AlecAivazis/survey/v2/validate.go | 1 + .../autorest/date/go_mod_tidy_hack.go | 1 + .../go-autorest/logger/go_mod_tidy_hack.go | 1 + .../Azure/go-autorest/logger/logger.go | 11 +- .../go-autorest/tracing/go_mod_tidy_hack.go | 1 + .../service/cloudfront/CHANGELOG.md | 542 + .../service/cloudfront/LICENSE.txt | 202 + .../service/cloudfront/api_client.go | 912 + .../cloudfront/api_op_AssociateAlias.go | 171 + .../cloudfront/api_op_CopyDistribution.go | 209 + .../cloudfront/api_op_CreateCachePolicy.go | 185 + ...op_CreateCloudFrontOriginAccessIdentity.go | 176 + ...api_op_CreateContinuousDeploymentPolicy.go | 174 + .../cloudfront/api_op_CreateDistribution.go | 165 + .../api_op_CreateDistributionWithTags.go | 173 + ...api_op_CreateFieldLevelEncryptionConfig.go | 164 + ...pi_op_CreateFieldLevelEncryptionProfile.go | 164 + .../cloudfront/api_op_CreateFunction.go | 190 + .../cloudfront/api_op_CreateInvalidation.go | 171 + .../cloudfront/api_op_CreateKeyGroup.go | 175 + .../cloudfront/api_op_CreateKeyValueStore.go | 174 + .../api_op_CreateMonitoringSubscription.go | 169 + .../api_op_CreateOriginAccessControl.go | 173 + .../api_op_CreateOriginRequestPolicy.go | 189 + .../cloudfront/api_op_CreatePublicKey.go | 166 + .../api_op_CreateRealtimeLogConfig.go | 189 + .../api_op_CreateResponseHeadersPolicy.go | 179 + .../api_op_CreateStreamingDistribution.go | 169 + ..._op_CreateStreamingDistributionWithTags.go | 169 + .../cloudfront/api_op_DeleteCachePolicy.go | 165 + ...op_DeleteCloudFrontOriginAccessIdentity.go | 157 + ...api_op_DeleteContinuousDeploymentPolicy.go | 160 + .../cloudfront/api_op_DeleteDistribution.go | 192 + ...api_op_DeleteFieldLevelEncryptionConfig.go | 156 + ...pi_op_DeleteFieldLevelEncryptionProfile.go | 156 + .../cloudfront/api_op_DeleteFunction.go | 165 + .../cloudfront/api_op_DeleteKeyGroup.go | 165 + .../cloudfront/api_op_DeleteKeyValueStore.go | 157 + .../api_op_DeleteMonitoringSubscription.go | 153 + .../api_op_DeleteOriginAccessControl.go | 160 + .../api_op_DeleteOriginRequestPolicy.go | 167 + .../cloudfront/api_op_DeletePublicKey.go | 156 + .../api_op_DeleteRealtimeLogConfig.go | 160 + .../api_op_DeleteResponseHeadersPolicy.go | 169 + .../api_op_DeleteStreamingDistribution.go | 193 + .../cloudfront/api_op_DescribeFunction.go | 168 + .../api_op_DescribeKeyValueStore.go | 160 + .../cloudfront/api_op_GetCachePolicy.go | 173 + .../cloudfront/api_op_GetCachePolicyConfig.go | 169 + ...pi_op_GetCloudFrontOriginAccessIdentity.go | 163 + ...GetCloudFrontOriginAccessIdentityConfig.go | 165 + .../api_op_GetContinuousDeploymentPolicy.go | 162 + ..._op_GetContinuousDeploymentPolicyConfig.go | 162 + .../cloudfront/api_op_GetDistribution.go | 357 + .../api_op_GetDistributionConfig.go | 163 + .../api_op_GetFieldLevelEncryption.go | 161 + .../api_op_GetFieldLevelEncryptionConfig.go | 161 + .../api_op_GetFieldLevelEncryptionProfile.go | 161 + ...op_GetFieldLevelEncryptionProfileConfig.go | 161 + .../service/cloudfront/api_op_GetFunction.go | 170 + .../cloudfront/api_op_GetInvalidation.go | 359 + .../service/cloudfront/api_op_GetKeyGroup.go | 168 + .../cloudfront/api_op_GetKeyGroupConfig.go | 167 + .../api_op_GetMonitoringSubscription.go | 159 + .../api_op_GetOriginAccessControl.go | 160 + .../api_op_GetOriginAccessControlConfig.go | 160 + .../api_op_GetOriginRequestPolicy.go | 174 + .../api_op_GetOriginRequestPolicyConfig.go | 170 + .../service/cloudfront/api_op_GetPublicKey.go | 160 + .../cloudfront/api_op_GetPublicKeyConfig.go | 160 + .../cloudfront/api_op_GetRealtimeLogConfig.go | 160 + .../api_op_GetResponseHeadersPolicy.go | 172 + .../api_op_GetResponseHeadersPolicyConfig.go | 171 + .../api_op_GetStreamingDistribution.go | 360 + .../api_op_GetStreamingDistributionConfig.go | 162 + .../cloudfront/api_op_ListCachePolicies.go | 176 + ...op_ListCloudFrontOriginAccessIdentities.go | 260 + .../api_op_ListConflictingAliases.go | 198 + ...api_op_ListContinuousDeploymentPolicies.go | 166 + .../cloudfront/api_op_ListDistributions.go | 257 + ...api_op_ListDistributionsByCachePolicyId.go | 173 + .../api_op_ListDistributionsByKeyGroup.go | 173 + ...istDistributionsByOriginRequestPolicyId.go | 174 + ...op_ListDistributionsByRealtimeLogConfig.go | 178 + ...tDistributionsByResponseHeadersPolicyId.go | 174 + .../api_op_ListDistributionsByWebACLId.go | 181 + .../api_op_ListFieldLevelEncryptionConfigs.go | 162 + ...api_op_ListFieldLevelEncryptionProfiles.go | 162 + .../cloudfront/api_op_ListFunctions.go | 171 + .../cloudfront/api_op_ListInvalidations.go | 267 + .../cloudfront/api_op_ListKeyGroups.go | 164 + .../cloudfront/api_op_ListKeyValueStores.go | 255 + .../api_op_ListOriginAccessControls.go | 165 + .../api_op_ListOriginRequestPolicies.go | 177 + .../cloudfront/api_op_ListPublicKeys.go | 160 + .../api_op_ListRealtimeLogConfigs.go | 166 + .../api_op_ListResponseHeadersPolicies.go | 178 + .../api_op_ListStreamingDistributions.go | 256 + .../cloudfront/api_op_ListTagsForResource.go | 164 + .../cloudfront/api_op_PublishFunction.go | 172 + .../service/cloudfront/api_op_TagResource.go | 162 + .../service/cloudfront/api_op_TestFunction.go | 189 + .../cloudfront/api_op_UntagResource.go | 162 + .../cloudfront/api_op_UpdateCachePolicy.go | 183 + ...op_UpdateCloudFrontOriginAccessIdentity.go | 171 + ...api_op_UpdateContinuousDeploymentPolicy.go | 187 + .../cloudfront/api_op_UpdateDistribution.go | 194 + ..._op_UpdateDistributionWithStagingConfig.go | 192 + ...api_op_UpdateFieldLevelEncryptionConfig.go | 170 + ...pi_op_UpdateFieldLevelEncryptionProfile.go | 169 + .../cloudfront/api_op_UpdateFunction.go | 186 + .../cloudfront/api_op_UpdateKeyGroup.go | 181 + .../cloudfront/api_op_UpdateKeyValueStore.go | 170 + .../api_op_UpdateOriginAccessControl.go | 169 + .../api_op_UpdateOriginRequestPolicy.go | 184 + .../cloudfront/api_op_UpdatePublicKey.go | 170 + .../api_op_UpdateRealtimeLogConfig.go | 190 + .../api_op_UpdateResponseHeadersPolicy.go | 184 + .../api_op_UpdateStreamingDistribution.go | 171 + .../aws-sdk-go-v2/service/cloudfront/auth.go | 313 + .../service/cloudfront/deserializers.go | 48115 ++++++++++++++++ .../aws-sdk-go-v2/service/cloudfront/doc.go | 13 + .../service/cloudfront/endpoints.go | 640 + .../service/cloudfront/generated.json | 144 + .../service/cloudfront/go_module_metadata.go | 6 + .../internal/endpoints/endpoints.go | 320 + .../service/cloudfront/options.go | 232 + .../service/cloudfront/serializers.go | 14356 +++++ .../service/cloudfront/types/enums.go | 753 + .../service/cloudfront/types/errors.go | 4132 ++ .../service/cloudfront/types/types.go | 5600 ++ .../service/cloudfront/validators.go | 6392 ++ .../aws-sdk-go-v2/service/iam/CHANGELOG.md | 72 + .../aws-sdk-go-v2/service/iam/api_client.go | 70 + ...i_op_AddClientIDToOpenIDConnectProvider.go | 13 +- .../iam/api_op_AddRoleToInstanceProfile.go | 51 +- .../service/iam/api_op_AddUserToGroup.go | 28 +- .../service/iam/api_op_AttachGroupPolicy.go | 47 +- .../service/iam/api_op_AttachRolePolicy.go | 52 +- .../service/iam/api_op_AttachUserPolicy.go | 47 +- .../service/iam/api_op_ChangePassword.go | 28 +- .../service/iam/api_op_CreateAccessKey.go | 47 +- .../service/iam/api_op_CreateAccountAlias.go | 23 +- .../service/iam/api_op_CreateGroup.go | 44 +- .../iam/api_op_CreateInstanceProfile.go | 65 +- .../service/iam/api_op_CreateLoginProfile.go | 43 +- .../iam/api_op_CreateOpenIDConnectProvider.go | 130 +- .../service/iam/api_op_CreatePolicy.go | 116 +- .../service/iam/api_op_CreatePolicyVersion.go | 72 +- .../service/iam/api_op_CreateRole.go | 128 +- .../service/iam/api_op_CreateSAMLProvider.go | 79 +- .../iam/api_op_CreateServiceLinkedRole.go | 38 +- .../api_op_CreateServiceSpecificCredential.go | 46 +- .../service/iam/api_op_CreateUser.go | 70 +- .../iam/api_op_CreateVirtualMFADevice.go | 73 +- .../service/iam/api_op_DeactivateMFADevice.go | 36 +- .../service/iam/api_op_DeleteAccessKey.go | 40 +- .../service/iam/api_op_DeleteAccountAlias.go | 27 +- .../iam/api_op_DeleteAccountPasswordPolicy.go | 6 + .../service/iam/api_op_DeleteGroup.go | 17 +- .../service/iam/api_op_DeleteGroupPolicy.go | 40 +- .../iam/api_op_DeleteInstanceProfile.go | 33 +- .../service/iam/api_op_DeleteLoginProfile.go | 40 +- .../iam/api_op_DeleteOpenIDConnectProvider.go | 16 +- .../service/iam/api_op_DeletePolicy.go | 46 +- .../service/iam/api_op_DeletePolicyVersion.go | 46 +- .../service/iam/api_op_DeleteRole.go | 36 +- .../api_op_DeleteRolePermissionsBoundary.go | 17 +- .../service/iam/api_op_DeleteRolePolicy.go | 38 +- .../service/iam/api_op_DeleteSAMLProvider.go | 22 +- .../service/iam/api_op_DeleteSSHPublicKey.go | 39 +- .../iam/api_op_DeleteServerCertificate.go | 35 +- .../iam/api_op_DeleteServiceLinkedRole.go | 33 +- .../api_op_DeleteServiceSpecificCredential.go | 26 +- .../iam/api_op_DeleteSigningCertificate.go | 40 +- .../service/iam/api_op_DeleteUser.go | 50 +- .../api_op_DeleteUserPermissionsBoundary.go | 14 +- .../service/iam/api_op_DeleteUserPolicy.go | 38 +- .../iam/api_op_DeleteVirtualMFADevice.go | 24 +- .../service/iam/api_op_DetachGroupPolicy.go | 36 +- .../service/iam/api_op_DetachRolePolicy.go | 36 +- .../service/iam/api_op_DetachUserPolicy.go | 36 +- .../service/iam/api_op_EnableMFADevice.go | 66 +- .../iam/api_op_GenerateCredentialReport.go | 14 +- ...pi_op_GenerateOrganizationsAccessReport.go | 111 +- ...i_op_GenerateServiceLastAccessedDetails.go | 87 +- .../iam/api_op_GetAccessKeyLastUsed.go | 20 +- .../api_op_GetAccountAuthorizationDetails.go | 75 +- .../iam/api_op_GetAccountPasswordPolicy.go | 11 +- .../service/iam/api_op_GetAccountSummary.go | 13 +- .../api_op_GetContextKeysForCustomPolicy.go | 38 +- ...api_op_GetContextKeysForPrincipalPolicy.go | 55 +- .../service/iam/api_op_GetCredentialReport.go | 19 +- .../service/iam/api_op_GetGroup.go | 61 +- .../service/iam/api_op_GetGroupPolicy.go | 64 +- .../service/iam/api_op_GetInstanceProfile.go | 60 +- .../service/iam/api_op_GetLoginProfile.go | 34 +- .../service/iam/api_op_GetMFADevice.go | 21 +- .../iam/api_op_GetOpenIDConnectProvider.go | 28 +- .../api_op_GetOrganizationsAccessReport.go | 74 +- .../service/iam/api_op_GetPolicy.go | 66 +- .../service/iam/api_op_GetPolicyVersion.go | 56 +- .../service/iam/api_op_GetRole.go | 67 +- .../service/iam/api_op_GetRolePolicy.go | 68 +- .../service/iam/api_op_GetSAMLProvider.go | 28 +- .../service/iam/api_op_GetSSHPublicKey.go | 40 +- .../iam/api_op_GetServerCertificate.go | 29 +- .../api_op_GetServiceLastAccessedDetails.go | 99 +- ...tServiceLastAccessedDetailsWithEntities.go | 62 +- ...i_op_GetServiceLinkedRoleDeletionStatus.go | 20 +- .../service/iam/api_op_GetUser.go | 95 +- .../service/iam/api_op_GetUserPolicy.go | 64 +- .../service/iam/api_op_ListAccessKeys.go | 87 +- .../service/iam/api_op_ListAccountAliases.go | 55 +- .../iam/api_op_ListAttachedGroupPolicies.go | 96 +- .../iam/api_op_ListAttachedRolePolicies.go | 96 +- .../iam/api_op_ListAttachedUserPolicies.go | 96 +- .../iam/api_op_ListEntitiesForPolicy.go | 107 +- .../service/iam/api_op_ListGroupPolicies.go | 88 +- .../service/iam/api_op_ListGroups.go | 71 +- .../service/iam/api_op_ListGroupsForUser.go | 65 +- .../iam/api_op_ListInstanceProfileTags.go | 65 +- .../iam/api_op_ListInstanceProfiles.go | 84 +- .../iam/api_op_ListInstanceProfilesForRole.go | 68 +- .../service/iam/api_op_ListMFADeviceTags.go | 65 +- .../service/iam/api_op_ListMFADevices.go | 65 +- .../api_op_ListOpenIDConnectProviderTags.go | 69 +- .../iam/api_op_ListOpenIDConnectProviders.go | 17 +- .../service/iam/api_op_ListPolicies.go | 121 +- ...pi_op_ListPoliciesGrantingServiceAccess.go | 57 +- .../service/iam/api_op_ListPolicyTags.go | 65 +- .../service/iam/api_op_ListPolicyVersions.go | 73 +- .../service/iam/api_op_ListRolePolicies.go | 77 +- .../service/iam/api_op_ListRoleTags.go | 66 +- .../service/iam/api_op_ListRoles.go | 86 +- .../iam/api_op_ListSAMLProviderTags.go | 69 +- .../service/iam/api_op_ListSAMLProviders.go | 13 +- .../service/iam/api_op_ListSSHPublicKeys.go | 78 +- .../iam/api_op_ListServerCertificateTags.go | 75 +- .../iam/api_op_ListServerCertificates.go | 91 +- .../api_op_ListServiceSpecificCredentials.go | 22 +- .../iam/api_op_ListSigningCertificates.go | 70 +- .../service/iam/api_op_ListUserPolicies.go | 78 +- .../service/iam/api_op_ListUserTags.go | 65 +- .../service/iam/api_op_ListUsers.go | 82 +- .../iam/api_op_ListVirtualMFADevices.go | 66 +- .../service/iam/api_op_PutGroupPolicy.go | 76 +- .../iam/api_op_PutRolePermissionsBoundary.go | 37 +- .../service/iam/api_op_PutRolePolicy.go | 90 +- .../iam/api_op_PutUserPermissionsBoundary.go | 34 +- .../service/iam/api_op_PutUserPolicy.go | 76 +- ...RemoveClientIDFromOpenIDConnectProvider.go | 25 +- .../api_op_RemoveRoleFromInstanceProfile.go | 41 +- .../service/iam/api_op_RemoveUserFromGroup.go | 28 +- .../api_op_ResetServiceSpecificCredential.go | 32 +- .../service/iam/api_op_ResyncMFADevice.go | 45 +- .../iam/api_op_SetDefaultPolicyVersion.go | 35 +- ...i_op_SetSecurityTokenServicePreferences.go | 53 +- .../iam/api_op_SimulateCustomPolicy.go | 239 +- .../iam/api_op_SimulatePrincipalPolicy.go | 244 +- .../service/iam/api_op_TagInstanceProfile.go | 33 +- .../service/iam/api_op_TagMFADevice.go | 32 +- .../iam/api_op_TagOpenIDConnectProvider.go | 35 +- .../service/iam/api_op_TagPolicy.go | 31 +- .../service/iam/api_op_TagRole.go | 36 +- .../service/iam/api_op_TagSAMLProvider.go | 36 +- .../iam/api_op_TagServerCertificate.go | 43 +- .../service/iam/api_op_TagUser.go | 37 +- .../iam/api_op_UntagInstanceProfile.go | 22 +- .../service/iam/api_op_UntagMFADevice.go | 21 +- .../iam/api_op_UntagOpenIDConnectProvider.go | 26 +- .../service/iam/api_op_UntagPolicy.go | 21 +- .../service/iam/api_op_UntagRole.go | 22 +- .../service/iam/api_op_UntagSAMLProvider.go | 25 +- .../iam/api_op_UntagServerCertificate.go | 32 +- .../service/iam/api_op_UntagUser.go | 22 +- .../service/iam/api_op_UpdateAccessKey.go | 50 +- .../iam/api_op_UpdateAccountPasswordPolicy.go | 112 +- .../iam/api_op_UpdateAssumeRolePolicy.go | 40 +- .../service/iam/api_op_UpdateGroup.go | 63 +- .../service/iam/api_op_UpdateLoginProfile.go | 42 +- ...p_UpdateOpenIDConnectProviderThumbprint.go | 48 +- .../service/iam/api_op_UpdateRole.go | 33 +- .../iam/api_op_UpdateRoleDescription.go | 13 +- .../service/iam/api_op_UpdateSAMLProvider.go | 21 +- .../service/iam/api_op_UpdateSSHPublicKey.go | 39 +- .../iam/api_op_UpdateServerCertificate.go | 74 +- .../api_op_UpdateServiceSpecificCredential.go | 26 +- .../iam/api_op_UpdateSigningCertificate.go | 42 +- .../service/iam/api_op_UpdateUser.go | 62 +- .../service/iam/api_op_UploadSSHPublicKey.go | 43 +- .../iam/api_op_UploadServerCertificate.go | 137 +- .../iam/api_op_UploadSigningCertificate.go | 65 +- .../aws/aws-sdk-go-v2/service/iam/auth.go | 8 +- .../service/iam/deserializers.go | 9 + .../aws/aws-sdk-go-v2/service/iam/doc.go | 18 +- .../aws-sdk-go-v2/service/iam/endpoints.go | 15 +- .../service/iam/go_module_metadata.go | 2 +- .../iam/internal/endpoints/endpoints.go | 2 +- .../aws/aws-sdk-go-v2/service/iam/options.go | 31 +- .../aws-sdk-go-v2/service/iam/types/enums.go | 96 +- .../aws-sdk-go-v2/service/iam/types/errors.go | 9 +- .../aws-sdk-go-v2/service/iam/types/types.go | 1168 +- .../github.com/aws/aws-sdk-go/aws/arn/arn.go | 93 - .../internal/s3shared/arn/accesspoint_arn.go | 50 - .../aws-sdk-go/internal/s3shared/arn/arn.go | 94 - .../internal/s3shared/arn/outpost_arn.go | 126 - .../s3shared/arn/s3_object_lambda_arn.go | 15 - .../internal/s3shared/endpoint_errors.go | 202 - .../internal/s3shared/resource_request.go | 45 - .../internal/s3shared/s3err/error.go | 57 - .../private/checksum/content_md5.go | 53 - .../private/protocol/eventstream/debug.go | 144 - .../private/protocol/eventstream/decode.go | 216 - .../private/protocol/eventstream/encode.go | 162 - .../private/protocol/eventstream/error.go | 23 - .../eventstream/eventstreamapi/error.go | 81 - .../eventstream/eventstreamapi/reader.go | 173 - .../eventstream/eventstreamapi/shared.go | 23 - .../eventstream/eventstreamapi/signer.go | 123 - .../eventstreamapi/stream_writer.go | 129 - .../eventstream/eventstreamapi/transport.go | 10 - .../eventstreamapi/transport_go1.17.go | 19 - .../eventstream/eventstreamapi/writer.go | 63 - .../private/protocol/eventstream/header.go | 175 - .../protocol/eventstream/header_value.go | 506 - .../private/protocol/eventstream/message.go | 117 - .../aws/aws-sdk-go/service/cloudfront/api.go | 37310 ------------ .../cloudfront/cloudfrontiface/interface.go | 532 - .../aws/aws-sdk-go/service/cloudfront/doc.go | 31 - .../aws-sdk-go/service/cloudfront/errors.go | 1018 - .../aws-sdk-go/service/cloudfront/service.go | 104 - .../aws-sdk-go/service/cloudfront/waiters.go | 148 - .../aws/aws-sdk-go/service/iam/api.go | 41679 ------------- .../aws/aws-sdk-go/service/iam/doc.go | 33 - .../aws/aws-sdk-go/service/iam/errors.go | 209 - .../service/iam/iamiface/interface.go | 814 - .../aws/aws-sdk-go/service/iam/service.go | 104 - .../aws/aws-sdk-go/service/iam/waiters.go | 214 - .../aws/aws-sdk-go/service/s3/api.go | 45973 --------------- .../aws/aws-sdk-go/service/s3/body_hash.go | 202 - .../aws-sdk-go/service/s3/bucket_location.go | 107 - .../aws-sdk-go/service/s3/customizations.go | 89 - .../aws/aws-sdk-go/service/s3/doc.go | 26 - .../aws/aws-sdk-go/service/s3/doc_custom.go | 109 - .../aws/aws-sdk-go/service/s3/endpoint.go | 298 - .../aws-sdk-go/service/s3/endpoint_builder.go | 239 - .../aws/aws-sdk-go/service/s3/errors.go | 69 - .../service/s3/host_style_bucket.go | 136 - .../service/s3/platform_handlers.go | 9 - .../service/s3/platform_handlers_go1.6.go | 29 - .../service/s3/s3iface/interface.go | 490 - .../aws/aws-sdk-go/service/s3/service.go | 108 - .../aws/aws-sdk-go/service/s3/sse.go | 84 - .../aws-sdk-go/service/s3/statusok_error.go | 47 - .../aws-sdk-go/service/s3/unmarshal_error.go | 114 - .../aws/aws-sdk-go/service/s3/waiters.go | 214 - vendor/github.com/cjlapao/common-go/LICENSE | 21 - .../validator/v10/.golangci.yaml | 52 +- .../go-playground/validator/v10/README.md | 4 +- .../go-playground/validator/v10/baked_in.go | 262 +- .../go-playground/validator/v10/cache.go | 11 - .../go-playground/validator/v10/doc.go | 16 +- .../go-playground/validator/v10/errors.go | 15 +- .../validator/v10/struct_level.go | 6 +- .../go-playground/validator/v10/util.go | 11 +- .../go-playground/validator/v10/validator.go | 32 +- .../validator/v10/validator_instance.go | 46 +- .../.release-please-manifest.json | 3 + .../kiota-abstractions-go/CHANGELOG.md | 167 +- .../kiota-abstractions-go/CODE_OF_CONDUCT.md | 19 +- .../kiota-abstractions-go/CONTRIBUTING.md | 52 + .../api_client_builder.go | 29 +- .../kiota-abstractions-go/api_error.go | 26 +- .../authentication/allowed_hosts_validator.go | 34 +- .../api_key_authentication_provider.go | 8 +- .../base_request_builder.go | 29 + .../kiota-abstractions-go/headers.go | 111 + .../kiota-abstractions-go/multipart_body.go | 191 + .../release-please-config.json | 14 + .../request_configuration.go | 15 + .../kiota-abstractions-go/request_headers.go | 108 +- .../request_information.go | 1118 +- .../kiota-abstractions-go/response_headers.go | 25 + .../serialization/composed_type_wrapper.go | 7 + .../serialization/duration.go} | 71 +- .../serialization/iso_duration.go | 12 +- .../serialization/kiota_json_serializer.go | 23 + .../serialization/kiota_serializer.go | 88 + .../serialization/parse_node.go | 2 +- .../parse_node_factory_registry.go | 109 +- .../serialization_writer_factory_registry.go | 98 +- .../serialization/untyped_array.go | 18 + .../serialization/untyped_boolean.go | 22 + .../serialization/untyped_double.go | 22 + .../serialization/untyped_float.go | 22 + .../serialization/untyped_integer.go | 22 + .../serialization/untyped_long.go | 22 + .../serialization/untyped_node.go | 44 + .../serialization/untyped_null.go | 17 + .../serialization/untyped_object.go | 22 + .../serialization/untyped_string.go | 22 + .../store/inmemory_backing_store.go | 6 +- .../microsoft/kiota-abstractions-go/utils.go | 7 +- .../.release-please-manifest.json | 3 + .../CHANGELOG.md | 56 +- .../CODE_OF_CONDUCT.md | 19 +- .../CONTRIBUTING.md | 52 + .../azure_identity_access_token_provider.go | 278 +- .../azure_identity_authentication_provider.go | 7 +- .../release-please-config.json | 14 + .../.release-please-manifest.json | 3 + .../microsoft/kiota-http-go/CHANGELOG.md | 171 +- .../kiota-http-go/CODE_OF_CONDUCT.md | 19 +- .../microsoft/kiota-http-go/CONTRIBUTING.md | 52 + .../kiota-http-go/compression_handler.go | 318 +- .../headers_inspection_handler.go | 120 + .../kiota-http-go/kiota_client_factory.go | 84 +- .../kiota-http-go/nethttp_request_adapter.go | 87 +- .../parameters_name_decoding_handler.go | 1 - .../microsoft/kiota-http-go/pipeline.go | 6 +- .../kiota-http-go/redirect_handler.go | 355 +- .../kiota-http-go/release-please-config.json | 17 + .../microsoft/kiota-http-go/retry_handler.go | 385 +- .../kiota-http-go/span_attributes.go | 35 + .../kiota-http-go/url_replace_handler.go | 42 +- .../kiota-http-go/user_agent_handler.go | 9 +- .../.release-please-manifest.json | 3 + .../kiota-serialization-form-go/CHANGELOG.md | 28 +- .../CODE_OF_CONDUCT.md | 1 + .../CONTRIBUTING.md | 52 + .../release-please-config.json | 14 + .../.release-please-manifest.json | 3 + .../kiota-serialization-json-go/CHANGELOG.md | 111 +- .../CODE_OF_CONDUCT.md | 1 + .../CONTRIBUTING.md | 52 + .../json_parse_node.go | 267 +- .../json_parse_node_factory.go | 2 +- .../json_serialization_writer.go | 209 +- .../release-please-config.json | 14 + .../kiota-serialization-json-go/util.go | 147 + .../.release-please-manifest.json | 3 + .../kiota-serialization-text-go/CHANGELOG.md | 34 +- .../CODE_OF_CONDUCT.md | 1 + .../CONTRIBUTING.md | 52 + .../release-please-config.json | 14 + .../text_parse_node.go | 14 +- .../text_serialization_writer.go | 21 +- .../.release-please-manifest.json | 3 + .../msgraph-sdk-go-core/CHANGELOG.md | 77 +- .../msgraph-sdk-go-core/CODE_OF_CONDUCT.md | 10 + .../msgraph-sdk-go-core/CONTRIBUTING.md | 31 + .../msgraph-sdk-go-core/README.md | 2 +- .../azure_identity_access_token_provider.go | 2 +- .../batch_request_collection.go | 71 + .../msgraph-sdk-go-core/batch_requests.go | 37 +- .../batch_response_model.go | 43 +- .../graph_client_factory.go | 4 +- .../msgraph-sdk-go-core/page_iterator.go | 94 +- .../release-please-config.json | 17 + .../msgraph-sdk-go-core/version.go | 6 +- .../pkg/apis/cloudcredential/v1/doc.go | 5 +- .../pkg/apis/cloudcredential/v1/register.go | 1 - .../apis/cloudcredential/v1/types_alibaba.go | 47 - .../v1/types_credentialsrequest.go | 6 + .../pkg/apis/cloudcredential/v1/types_gcp.go | 12 + .../v1/zz_generated.deepcopy.go | 78 - .../v1/zz_generated.defaults.go | 17 + .../pkg/aws/client.go | 373 +- .../pkg/aws/utils.go | 95 +- .../std-uritemplate/go/v2/LICENSE | 201 + .../std-uritemplate/go/v2/stduritemplate.go | 709 + .../yosida95/uritemplate/v3/LICENSE | 25 - .../yosida95/uritemplate/v3/README.rst | 46 - .../yosida95/uritemplate/v3/compile.go | 224 - .../yosida95/uritemplate/v3/equals.go | 53 - .../yosida95/uritemplate/v3/error.go | 16 - .../yosida95/uritemplate/v3/escape.go | 190 - .../yosida95/uritemplate/v3/expression.go | 173 - .../yosida95/uritemplate/v3/machine.go | 23 - .../yosida95/uritemplate/v3/match.go | 213 - .../yosida95/uritemplate/v3/parse.go | 277 - .../yosida95/uritemplate/v3/prog.go | 130 - .../yosida95/uritemplate/v3/uritemplate.go | 116 - .../yosida95/uritemplate/v3/value.go | 216 - .../bson/bsonrw/extjson_writer.go | 7 +- .../contrib/detectors/gcp/cloud-function.go | 2 +- .../contrib/detectors/gcp/cloud-run.go | 2 +- .../contrib/detectors/gcp/detector.go | 6 +- .../contrib/detectors/gcp/gce.go | 2 +- .../contrib/detectors/gcp/gke.go | 2 +- .../contrib/detectors/gcp/version.go | 2 +- .../google.golang.org/grpc/otelgrpc/config.go | 37 + .../grpc/otelgrpc/interceptor.go | 125 +- .../grpc/otelgrpc/internal/parse.go | 2 +- .../grpc/otelgrpc/stats_handler.go | 158 +- .../grpc/otelgrpc/version.go | 2 +- .../net/http/otelhttp/internal/semconv/env.go | 70 +- .../net/http/otelhttp/internal/semconv/gen.go | 2 + .../otelhttp/internal/semconv/httpconv.go | 58 +- .../http/otelhttp/internal/semconv/util.go | 2 +- .../net/http/otelhttp/transport.go | 58 +- .../net/http/otelhttp/version.go | 2 +- .../otel/semconv/v1.30.0/MIGRATION.md | 155 - .../otel/semconv/v1.30.0/README.md | 3 - .../otel/semconv/v1.30.0/metric.go | 1750 - .../otel/semconv/v1.34.0/MIGRATION.md | 4 + .../otel/semconv/v1.34.0/README.md | 3 + .../{v1.30.0 => v1.34.0}/attribute_group.go | 2876 +- .../otel/semconv/{v1.30.0 => v1.34.0}/doc.go | 4 +- .../otel/semconv/v1.34.0/error_type.go | 31 + .../semconv/{v1.30.0 => v1.34.0}/exception.go | 2 +- .../otel/semconv/v1.34.0/httpconv/metric.go | 1418 + .../otel/semconv/v1.34.0/rpcconv/metric.go | 713 + .../semconv/{v1.30.0 => v1.34.0}/schema.go | 4 +- vendor/modules.txt | 95 +- 535 files changed, 120031 insertions(+), 143694 deletions(-) create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/CHANGELOG.md create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/LICENSE.txt create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_client.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_AssociateAlias.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CopyDistribution.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateCachePolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateCloudFrontOriginAccessIdentity.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateContinuousDeploymentPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateDistribution.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateDistributionWithTags.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateFieldLevelEncryptionConfig.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateFieldLevelEncryptionProfile.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateFunction.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateInvalidation.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateKeyGroup.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateKeyValueStore.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateMonitoringSubscription.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateOriginAccessControl.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateOriginRequestPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreatePublicKey.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateRealtimeLogConfig.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateResponseHeadersPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateStreamingDistribution.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateStreamingDistributionWithTags.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteCachePolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteCloudFrontOriginAccessIdentity.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteContinuousDeploymentPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteDistribution.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteFieldLevelEncryptionConfig.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteFieldLevelEncryptionProfile.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteFunction.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteKeyGroup.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteKeyValueStore.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteMonitoringSubscription.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteOriginAccessControl.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteOriginRequestPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeletePublicKey.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteRealtimeLogConfig.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteResponseHeadersPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteStreamingDistribution.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DescribeFunction.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DescribeKeyValueStore.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetCachePolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetCachePolicyConfig.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetCloudFrontOriginAccessIdentity.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetCloudFrontOriginAccessIdentityConfig.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetContinuousDeploymentPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetContinuousDeploymentPolicyConfig.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetDistribution.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetDistributionConfig.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetFieldLevelEncryption.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetFieldLevelEncryptionConfig.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetFieldLevelEncryptionProfile.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetFieldLevelEncryptionProfileConfig.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetFunction.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetInvalidation.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetKeyGroup.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetKeyGroupConfig.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetMonitoringSubscription.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetOriginAccessControl.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetOriginAccessControlConfig.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetOriginRequestPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetOriginRequestPolicyConfig.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetPublicKey.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetPublicKeyConfig.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetRealtimeLogConfig.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetResponseHeadersPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetResponseHeadersPolicyConfig.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetStreamingDistribution.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetStreamingDistributionConfig.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListCachePolicies.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListCloudFrontOriginAccessIdentities.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListConflictingAliases.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListContinuousDeploymentPolicies.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListDistributions.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListDistributionsByCachePolicyId.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListDistributionsByKeyGroup.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListDistributionsByOriginRequestPolicyId.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListDistributionsByRealtimeLogConfig.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListDistributionsByResponseHeadersPolicyId.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListDistributionsByWebACLId.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListFieldLevelEncryptionConfigs.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListFieldLevelEncryptionProfiles.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListFunctions.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListInvalidations.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListKeyGroups.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListKeyValueStores.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListOriginAccessControls.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListOriginRequestPolicies.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListPublicKeys.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListRealtimeLogConfigs.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListResponseHeadersPolicies.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListStreamingDistributions.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListTagsForResource.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_PublishFunction.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_TagResource.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_TestFunction.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UntagResource.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateCachePolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateCloudFrontOriginAccessIdentity.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateContinuousDeploymentPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateDistribution.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateDistributionWithStagingConfig.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateFieldLevelEncryptionConfig.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateFieldLevelEncryptionProfile.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateFunction.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateKeyGroup.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateKeyValueStore.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateOriginAccessControl.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateOriginRequestPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdatePublicKey.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateRealtimeLogConfig.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateResponseHeadersPolicy.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateStreamingDistribution.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/auth.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/deserializers.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/endpoints.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/generated.json create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/go_module_metadata.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/internal/endpoints/endpoints.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/options.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/serializers.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/types/enums.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/types/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/types/types.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/validators.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/aws/arn/arn.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/accesspoint_arn.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/arn.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/outpost_arn.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/s3_object_lambda_arn.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/internal/s3shared/endpoint_errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/internal/s3shared/resource_request.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/internal/s3shared/s3err/error.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/private/checksum/content_md5.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/debug.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/decode.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/encode.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/error.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/error.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/reader.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/shared.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/signer.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/stream_writer.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/transport.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/transport_go1.17.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/writer.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header_value.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/message.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudfront/cloudfrontiface/interface.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudfront/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudfront/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudfront/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudfront/waiters.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/iam/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/iam/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/iam/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/iam/iamiface/interface.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/iam/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/iam/waiters.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/api.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/body_hash.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/bucket_location.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/doc_custom.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/endpoint.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/endpoint_builder.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers_go1.6.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/s3iface/interface.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/service.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/sse.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/statusok_error.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/waiters.go delete mode 100644 vendor/github.com/cjlapao/common-go/LICENSE create mode 100644 vendor/github.com/microsoft/kiota-abstractions-go/.release-please-manifest.json create mode 100644 vendor/github.com/microsoft/kiota-abstractions-go/CONTRIBUTING.md create mode 100644 vendor/github.com/microsoft/kiota-abstractions-go/base_request_builder.go create mode 100644 vendor/github.com/microsoft/kiota-abstractions-go/headers.go create mode 100644 vendor/github.com/microsoft/kiota-abstractions-go/multipart_body.go create mode 100644 vendor/github.com/microsoft/kiota-abstractions-go/release-please-config.json create mode 100644 vendor/github.com/microsoft/kiota-abstractions-go/request_configuration.go create mode 100644 vendor/github.com/microsoft/kiota-abstractions-go/response_headers.go create mode 100644 vendor/github.com/microsoft/kiota-abstractions-go/serialization/composed_type_wrapper.go rename vendor/github.com/{cjlapao/common-go/duration/main.go => microsoft/kiota-abstractions-go/serialization/duration.go} (71%) create mode 100644 vendor/github.com/microsoft/kiota-abstractions-go/serialization/kiota_json_serializer.go create mode 100644 vendor/github.com/microsoft/kiota-abstractions-go/serialization/kiota_serializer.go create mode 100644 vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_array.go create mode 100644 vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_boolean.go create mode 100644 vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_double.go create mode 100644 vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_float.go create mode 100644 vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_integer.go create mode 100644 vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_long.go create mode 100644 vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_node.go create mode 100644 vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_null.go create mode 100644 vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_object.go create mode 100644 vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_string.go create mode 100644 vendor/github.com/microsoft/kiota-authentication-azure-go/.release-please-manifest.json create mode 100644 vendor/github.com/microsoft/kiota-authentication-azure-go/CONTRIBUTING.md create mode 100644 vendor/github.com/microsoft/kiota-authentication-azure-go/release-please-config.json create mode 100644 vendor/github.com/microsoft/kiota-http-go/.release-please-manifest.json create mode 100644 vendor/github.com/microsoft/kiota-http-go/CONTRIBUTING.md create mode 100644 vendor/github.com/microsoft/kiota-http-go/headers_inspection_handler.go create mode 100644 vendor/github.com/microsoft/kiota-http-go/release-please-config.json create mode 100644 vendor/github.com/microsoft/kiota-http-go/span_attributes.go create mode 100644 vendor/github.com/microsoft/kiota-serialization-form-go/.release-please-manifest.json create mode 100644 vendor/github.com/microsoft/kiota-serialization-form-go/CONTRIBUTING.md create mode 100644 vendor/github.com/microsoft/kiota-serialization-form-go/release-please-config.json create mode 100644 vendor/github.com/microsoft/kiota-serialization-json-go/.release-please-manifest.json create mode 100644 vendor/github.com/microsoft/kiota-serialization-json-go/CONTRIBUTING.md create mode 100644 vendor/github.com/microsoft/kiota-serialization-json-go/release-please-config.json create mode 100644 vendor/github.com/microsoft/kiota-serialization-json-go/util.go create mode 100644 vendor/github.com/microsoft/kiota-serialization-text-go/.release-please-manifest.json create mode 100644 vendor/github.com/microsoft/kiota-serialization-text-go/CONTRIBUTING.md create mode 100644 vendor/github.com/microsoft/kiota-serialization-text-go/release-please-config.json create mode 100644 vendor/github.com/microsoftgraph/msgraph-sdk-go-core/.release-please-manifest.json create mode 100644 vendor/github.com/microsoftgraph/msgraph-sdk-go-core/CODE_OF_CONDUCT.md create mode 100644 vendor/github.com/microsoftgraph/msgraph-sdk-go-core/batch_request_collection.go create mode 100644 vendor/github.com/microsoftgraph/msgraph-sdk-go-core/release-please-config.json delete mode 100644 vendor/github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1/types_alibaba.go create mode 100644 vendor/github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1/zz_generated.defaults.go create mode 100644 vendor/github.com/std-uritemplate/std-uritemplate/go/v2/LICENSE create mode 100644 vendor/github.com/std-uritemplate/std-uritemplate/go/v2/stduritemplate.go delete mode 100644 vendor/github.com/yosida95/uritemplate/v3/LICENSE delete mode 100644 vendor/github.com/yosida95/uritemplate/v3/README.rst delete mode 100644 vendor/github.com/yosida95/uritemplate/v3/compile.go delete mode 100644 vendor/github.com/yosida95/uritemplate/v3/equals.go delete mode 100644 vendor/github.com/yosida95/uritemplate/v3/error.go delete mode 100644 vendor/github.com/yosida95/uritemplate/v3/escape.go delete mode 100644 vendor/github.com/yosida95/uritemplate/v3/expression.go delete mode 100644 vendor/github.com/yosida95/uritemplate/v3/machine.go delete mode 100644 vendor/github.com/yosida95/uritemplate/v3/match.go delete mode 100644 vendor/github.com/yosida95/uritemplate/v3/parse.go delete mode 100644 vendor/github.com/yosida95/uritemplate/v3/prog.go delete mode 100644 vendor/github.com/yosida95/uritemplate/v3/uritemplate.go delete mode 100644 vendor/github.com/yosida95/uritemplate/v3/value.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.30.0/MIGRATION.md delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.30.0/README.md delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.30.0/metric.go create mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.34.0/MIGRATION.md create mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.34.0/README.md rename vendor/go.opentelemetry.io/otel/semconv/{v1.30.0 => v1.34.0}/attribute_group.go (81%) rename vendor/go.opentelemetry.io/otel/semconv/{v1.30.0 => v1.34.0}/doc.go (96%) create mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.34.0/error_type.go rename vendor/go.opentelemetry.io/otel/semconv/{v1.30.0 => v1.34.0}/exception.go (98%) create mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.34.0/httpconv/metric.go create mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.34.0/rpcconv/metric.go rename vendor/go.opentelemetry.io/otel/semconv/{v1.30.0 => v1.34.0}/schema.go (85%) diff --git a/vendor/github.com/AlecAivazis/survey/v2/README.md b/vendor/github.com/AlecAivazis/survey/v2/README.md index ac2c6fc7f9..ba75b329f4 100644 --- a/vendor/github.com/AlecAivazis/survey/v2/README.md +++ b/vendor/github.com/AlecAivazis/survey/v2/README.md @@ -357,6 +357,39 @@ All of the prompts have a `Help` field which can be defined to provide more info } ``` +## Removing the "Select All" and "Select None" options + +By default, users can select all of the multi-select options using the right arrow key. To prevent users from being able to do this (and remove the ` to all` message from the prompt), use the option `WithRemoveSelectAll`: + +```golang +import ( + "github.com/AlecAivazis/survey/v2" +) + +number := "" +prompt := &survey.Input{ + Message: "This question has the select all option removed", +} + +survey.AskOne(prompt, &number, survey.WithRemoveSelectAll()) +``` + +Also by default, users can use the left arrow key to unselect all of the options. To prevent users from being able to do this (and remove the ` to none` message from the prompt), use the option `WithRemoveSelectNone`: + +```golang +import ( + "github.com/AlecAivazis/survey/v2" +) + +number := "" +prompt := &survey.Input{ + Message: "This question has the select all option removed", +} + +survey.AskOne(prompt, &number, survey.WithRemoveSelectNone()) +``` + + ### Changing the input rune In some situations, `?` is a perfectly valid response. To handle this, you can change the rune that survey diff --git a/vendor/github.com/AlecAivazis/survey/v2/confirm.go b/vendor/github.com/AlecAivazis/survey/v2/confirm.go index 9662e6cdb7..1c23fb4d12 100644 --- a/vendor/github.com/AlecAivazis/survey/v2/confirm.go +++ b/vendor/github.com/AlecAivazis/survey/v2/confirm.go @@ -90,6 +90,7 @@ func (c *Confirm) getBool(showHelp bool, config *PromptConfig) (bool, error) { continue default: // we didnt get a valid answer, so print error and prompt again + //lint:ignore ST1005 it should be fine for this error message to have punctuation if err := c.Error(config, fmt.Errorf("%q is not a valid answer, please try again.", val)); err != nil { return c.Default, err } diff --git a/vendor/github.com/AlecAivazis/survey/v2/core/template.go b/vendor/github.com/AlecAivazis/survey/v2/core/template.go index 6b3d20cdc7..02da879dcb 100644 --- a/vendor/github.com/AlecAivazis/survey/v2/core/template.go +++ b/vendor/github.com/AlecAivazis/survey/v2/core/template.go @@ -2,6 +2,7 @@ package core import ( "bytes" + "os" "sync" "text/template" @@ -23,11 +24,22 @@ var TemplateFuncsNoColor = map[string]interface{}{ }, } -//RunTemplate returns two formatted strings given a template and -//the data it requires. The first string returned is generated for -//user-facing output and may or may not contain ANSI escape codes -//for colored output. The second string does not contain escape codes -//and can be used by the renderer for layout purposes. +// envColorDisabled returns if output colors are forbid by environment variables +func envColorDisabled() bool { + return os.Getenv("NO_COLOR") != "" || os.Getenv("CLICOLOR") == "0" +} + +// envColorForced returns if output colors are forced from environment variables +func envColorForced() bool { + val, ok := os.LookupEnv("CLICOLOR_FORCE") + return ok && val != "0" +} + +// RunTemplate returns two formatted strings given a template and +// the data it requires. The first string returned is generated for +// user-facing output and may or may not contain ANSI escape codes +// for colored output. The second string does not contain escape codes +// and can be used by the renderer for layout purposes. func RunTemplate(tmpl string, data interface{}) (string, string, error) { tPair, err := GetTemplatePair(tmpl) if err != nil { @@ -52,11 +64,11 @@ var ( memoMutex = &sync.RWMutex{} ) -//GetTemplatePair returns a pair of compiled templates where the -//first template is generated for user-facing output and the -//second is generated for use by the renderer. The second -//template does not contain any color escape codes, whereas -//the first template may or may not depending on DisableColor. +// GetTemplatePair returns a pair of compiled templates where the +// first template is generated for user-facing output and the +// second is generated for use by the renderer. The second +// template does not contain any color escape codes, whereas +// the first template may or may not depending on DisableColor. func GetTemplatePair(tmpl string) ([2]*template.Template, error) { memoMutex.RLock() if t, ok := memoizedGetTemplate[tmpl]; ok { @@ -74,7 +86,8 @@ func GetTemplatePair(tmpl string) ([2]*template.Template, error) { templatePair[1] = templateNoColor - if DisableColor { + envColorHide := envColorDisabled() && !envColorForced() + if DisableColor || envColorHide { templatePair[0] = templatePair[1] } else { templateWithColor, err := template.New("prompt").Funcs(TemplateFuncsWithColor).Parse(tmpl) diff --git a/vendor/github.com/AlecAivazis/survey/v2/core/write.go b/vendor/github.com/AlecAivazis/survey/v2/core/write.go index 94a886c361..2225e3b223 100644 --- a/vendor/github.com/AlecAivazis/survey/v2/core/write.go +++ b/vendor/github.com/AlecAivazis/survey/v2/core/write.go @@ -142,12 +142,12 @@ func (err errFieldNotMatch) Is(target error) bool { // implements the dynamic er // It returns the Question.Name that couldn't be matched with a destination field. // // Usage: -// err := survey.Ask(qs, &v); -// if err != nil { -// if name, ok := core.IsFieldNotMatch(err); ok { -// [...name is the not matched question name] -// } -// } +// +// if err := survey.Ask(qs, &v); err != nil { +// if name, ok := core.IsFieldNotMatch(err); ok { +// // name is the question name that did not match a field +// } +// } func IsFieldNotMatch(err error) (string, bool) { if err != nil { if v, ok := err.(errFieldNotMatch); ok { @@ -301,6 +301,7 @@ func copy(t reflect.Value, v reflect.Value) (err error) { case reflect.Float64: castVal, casterr = strconv.ParseFloat(vString, 64) default: + //lint:ignore ST1005 allow this error message to be capitalized return fmt.Errorf("Unable to convert from string to type %s", t.Kind()) } @@ -335,6 +336,7 @@ func copy(t reflect.Value, v reflect.Value) (err error) { } // we're copying an option answer to an incorrect type + //lint:ignore ST1005 allow this error message to be capitalized return fmt.Errorf("Unable to convert from OptionAnswer to type %s", t.Kind()) } diff --git a/vendor/github.com/AlecAivazis/survey/v2/input.go b/vendor/github.com/AlecAivazis/survey/v2/input.go index dbc7c08cd1..047476386f 100644 --- a/vendor/github.com/AlecAivazis/survey/v2/input.go +++ b/vendor/github.com/AlecAivazis/survey/v2/input.go @@ -127,14 +127,14 @@ func (i *Input) onRune(config *PromptConfig) terminal.OnRuneFn { ) if err == nil { - err = readLineAgain + err = errReadLineAgain } return []rune(i.typedAnswer), true, err }) } -var readLineAgain = errors.New("read line again") +var errReadLineAgain = errors.New("read line again") func (i *Input) Prompt(config *PromptConfig) (interface{}, error) { // render the template @@ -170,7 +170,7 @@ func (i *Input) Prompt(config *PromptConfig) (interface{}, error) { } line, err = rr.ReadLineWithDefault(0, line, i.onRune(config)) - if err == readLineAgain { + if err == errReadLineAgain { continue } @@ -207,20 +207,13 @@ func (i *Input) Prompt(config *PromptConfig) (interface{}, error) { } func (i *Input) Cleanup(config *PromptConfig, val interface{}) error { - // use the default answer when cleaning up the prompt if necessary - ans := i.answer - if ans == "" && i.Default != "" { - ans = i.Default - } - - // render the cleanup return i.Render( InputQuestionTemplate, InputTemplateData{ Input: *i, ShowAnswer: true, Config: config, - Answer: ans, + Answer: val.(string), }, ) } diff --git a/vendor/github.com/AlecAivazis/survey/v2/multiselect.go b/vendor/github.com/AlecAivazis/survey/v2/multiselect.go index 3251ea1ccc..396169f3e8 100644 --- a/vendor/github.com/AlecAivazis/survey/v2/multiselect.go +++ b/vendor/github.com/AlecAivazis/survey/v2/multiselect.go @@ -29,6 +29,7 @@ type MultiSelect struct { VimMode bool FilterMessage string Filter func(filter string, value string, index int) bool + Description func(value string, index int) string filter string selectedIndex int checked map[int]bool @@ -43,6 +44,7 @@ type MultiSelectTemplateData struct { Checked map[int]bool SelectedIndex int ShowHelp bool + Description func(value string, index int) string PageEntries []core.OptionAnswer Config *PromptConfig @@ -59,19 +61,26 @@ func (m MultiSelectTemplateData) IterateOption(ix int, opt core.OptionAnswer) in return copy } +func (m MultiSelectTemplateData) GetDescription(opt core.OptionAnswer) string { + if m.Description == nil { + return "" + } + return m.Description(opt.Value, opt.Index) +} + var MultiSelectQuestionTemplate = ` {{- define "option"}} {{- if eq .SelectedIndex .CurrentIndex }}{{color .Config.Icons.SelectFocus.Format }}{{ .Config.Icons.SelectFocus.Text }}{{color "reset"}}{{else}} {{end}} {{- if index .Checked .CurrentOpt.Index }}{{color .Config.Icons.MarkedOption.Format }} {{ .Config.Icons.MarkedOption.Text }} {{else}}{{color .Config.Icons.UnmarkedOption.Format }} {{ .Config.Icons.UnmarkedOption.Text }} {{end}} {{- color "reset"}} - {{- " "}}{{- .CurrentOpt.Value}} + {{- " "}}{{- .CurrentOpt.Value}}{{ if ne ($.GetDescription .CurrentOpt) "" }} - {{color "cyan"}}{{ $.GetDescription .CurrentOpt }}{{color "reset"}}{{end}} {{end}} {{- if .ShowHelp }}{{- color .Config.Icons.Help.Format }}{{ .Config.Icons.Help.Text }} {{ .Help }}{{color "reset"}}{{"\n"}}{{end}} {{- color .Config.Icons.Question.Format }}{{ .Config.Icons.Question.Text }} {{color "reset"}} {{- color "default+hb"}}{{ .Message }}{{ .FilterMessage }}{{color "reset"}} {{- if .ShowAnswer}}{{color "cyan"}} {{.Answer}}{{color "reset"}}{{"\n"}} {{- else }} - {{- " "}}{{- color "cyan"}}[Use arrows to move, space to select, to all, to none, type to filter{{- if and .Help (not .ShowHelp)}}, {{ .Config.HelpInput }} for more help{{end}}]{{color "reset"}} + {{- " "}}{{- color "cyan"}}[Use arrows to move, space to select,{{- if not .Config.RemoveSelectAll }} to all,{{end}}{{- if not .Config.RemoveSelectNone }} to none,{{end}} type to filter{{- if and .Help (not .ShowHelp)}}, {{ .Config.HelpInput }} for more help{{end}}]{{color "reset"}} {{- "\n"}} {{- range $ix, $option := .PageEntries}} {{- template "option" $.IterateOption $ix $option}} @@ -134,14 +143,14 @@ func (m *MultiSelect) OnChange(key rune, config *PromptConfig) { } else if key >= terminal.KeySpace { m.filter += string(key) m.VimMode = false - } else if key == terminal.KeyArrowRight { + } else if !config.RemoveSelectAll && key == terminal.KeyArrowRight { for _, v := range options { m.checked[v.Index] = true } if !config.KeepFilter { m.filter = "" } - } else if key == terminal.KeyArrowLeft { + } else if !config.RemoveSelectNone && key == terminal.KeyArrowLeft { for _, v := range options { m.checked[v.Index] = false } @@ -179,6 +188,7 @@ func (m *MultiSelect) OnChange(key rune, config *PromptConfig) { SelectedIndex: idx, Checked: m.checked, ShowHelp: m.showingHelp, + Description: m.Description, PageEntries: opts, Config: config, } @@ -272,6 +282,7 @@ func (m *MultiSelect) Prompt(config *PromptConfig) (interface{}, error) { tmplData := MultiSelectTemplateData{ MultiSelect: *m, SelectedIndex: idx, + Description: m.Description, Checked: m.checked, PageEntries: opts, Config: config, @@ -342,6 +353,7 @@ func (m *MultiSelect) Cleanup(config *PromptConfig, val interface{}) error { Checked: m.checked, Answer: answer, ShowAnswer: true, + Description: m.Description, Config: config, }, ) diff --git a/vendor/github.com/AlecAivazis/survey/v2/password.go b/vendor/github.com/AlecAivazis/survey/v2/password.go index 877102c69e..96a2ae89fe 100644 --- a/vendor/github.com/AlecAivazis/survey/v2/password.go +++ b/vendor/github.com/AlecAivazis/survey/v2/password.go @@ -60,7 +60,7 @@ func (p *Password) Prompt(config *PromptConfig) (interface{}, error) { // no help msg? Just return any response if p.Help == "" { - line, err := rr.ReadLine('*') + line, err := rr.ReadLine(config.HideCharacter) return string(line), err } @@ -69,7 +69,7 @@ func (p *Password) Prompt(config *PromptConfig) (interface{}, error) { var line []rune // process answers looking for help prompt answer for { - line, err = rr.ReadLine('*') + line, err = rr.ReadLine(config.HideCharacter) if err != nil { return string(line), err } @@ -96,7 +96,7 @@ func (p *Password) Prompt(config *PromptConfig) (interface{}, error) { } lineStr := string(line) - p.AppendRenderedText(strings.Repeat("*", len(lineStr))) + p.AppendRenderedText(strings.Repeat(string(config.HideCharacter), len(lineStr))) return lineStr, err } diff --git a/vendor/github.com/AlecAivazis/survey/v2/renderer.go b/vendor/github.com/AlecAivazis/survey/v2/renderer.go index a89b061e05..a16207de07 100644 --- a/vendor/github.com/AlecAivazis/survey/v2/renderer.go +++ b/vendor/github.com/AlecAivazis/survey/v2/renderer.go @@ -3,8 +3,6 @@ package survey import ( "bytes" "fmt" - "unicode/utf8" - "github.com/AlecAivazis/survey/v2/core" "github.com/AlecAivazis/survey/v2/terminal" "golang.org/x/term" @@ -180,7 +178,8 @@ func (r *Renderer) countLines(buf bytes.Buffer) int { delim = len(bufBytes) // no new line found, read rest of text } - if lineWidth := utf8.RuneCount(bufBytes[curr:delim]); lineWidth > w { + str := string(bufBytes[curr:delim]) + if lineWidth := terminal.StringWidth(str); lineWidth > w { // account for word wrapping count += lineWidth / w if (lineWidth % w) == 0 { diff --git a/vendor/github.com/AlecAivazis/survey/v2/select.go b/vendor/github.com/AlecAivazis/survey/v2/select.go index 494f15d1b9..1210122f40 100644 --- a/vendor/github.com/AlecAivazis/survey/v2/select.go +++ b/vendor/github.com/AlecAivazis/survey/v2/select.go @@ -2,6 +2,7 @@ package survey import ( "errors" + "fmt" "github.com/AlecAivazis/survey/v2/core" "github.com/AlecAivazis/survey/v2/terminal" @@ -31,7 +32,6 @@ type Select struct { Description func(value string, index int) string filter string selectedIndex int - useDefault bool showingHelp bool } @@ -103,8 +103,6 @@ func (s *Select) OnChange(key rune, config *PromptConfig) bool { // if the user pressed the up arrow or 'k' to emulate vim } else if (key == terminal.KeyArrowUp || (s.VimMode && key == 'k')) && len(options) > 0 { - s.useDefault = false - // if we are at the top of the list if s.selectedIndex == 0 { // start from the button @@ -116,7 +114,6 @@ func (s *Select) OnChange(key rune, config *PromptConfig) bool { // if the user pressed down or 'j' to emulate vim } else if (key == terminal.KeyTab || key == terminal.KeyArrowDown || (s.VimMode && key == 'j')) && len(options) > 0 { - s.useDefault = false // if we are at the bottom of the list if s.selectedIndex == len(options)-1 { // start from the top @@ -147,8 +144,6 @@ func (s *Select) OnChange(key rune, config *PromptConfig) bool { s.filter += string(key) // make sure vim mode is disabled s.VimMode = false - // make sure that we use the current value in the filtered list - s.useDefault = false } s.FilterMessage = "" @@ -207,7 +202,6 @@ func (s *Select) filterOptions(config *PromptConfig) []core.OptionAnswer { filter = config.Filter } - // for i, opt := range s.Options { // i the filter says to include the option if filter(s.filter, opt, i) { @@ -229,23 +223,29 @@ func (s *Select) Prompt(config *PromptConfig) (interface{}, error) { return "", errors.New("please provide options to select from") } - // start off with the first option selected - sel := 0 - // if there is a default - if s.Default != "" { - // find the choice - for i, opt := range s.Options { - // if the option corresponds to the default - if opt == s.Default { - // we found our initial value - sel = i - // stop looking - break + s.selectedIndex = 0 + if s.Default != nil { + switch defaultValue := s.Default.(type) { + case string: + var found bool + for i, opt := range s.Options { + if opt == defaultValue { + s.selectedIndex = i + found = true + } + } + if !found { + return "", fmt.Errorf("default value %q not found in options", defaultValue) + } + case int: + if defaultValue >= len(s.Options) { + return "", fmt.Errorf("default index %d exceeds the number of options", defaultValue) } + s.selectedIndex = defaultValue + default: + return "", errors.New("default value of select must be an int or string") } } - // save the selected index - s.selectedIndex = sel // figure out the page size pageSize := s.PageSize @@ -256,7 +256,7 @@ func (s *Select) Prompt(config *PromptConfig) (interface{}, error) { } // figure out the options and index to render - opts, idx := paginate(pageSize, core.OptionAnswerList(s.Options), sel) + opts, idx := paginate(pageSize, core.OptionAnswerList(s.Options), s.selectedIndex) cursor := s.NewCursor() cursor.Save() // for proper cursor placement during selection @@ -279,9 +279,6 @@ func (s *Select) Prompt(config *PromptConfig) (interface{}, error) { return "", err } - // by default, use the default value - s.useDefault = true - rr := s.NewRuneReader() _ = rr.SetTermMode() defer func() { @@ -304,45 +301,16 @@ func (s *Select) Prompt(config *PromptConfig) (interface{}, error) { break } } + options := s.filterOptions(config) s.filter = "" s.FilterMessage = "" - // the index to report - var val string - // if we are supposed to use the default value - if s.useDefault || s.selectedIndex >= len(options) { - // if there is a default value - if s.Default != nil { - // if the default is a string - if defaultString, ok := s.Default.(string); ok { - // use the default value - val = defaultString - // the default value could also be an interpret which is interpretted as the index - } else if defaultIndex, ok := s.Default.(int); ok { - val = s.Options[defaultIndex] - } else { - return val, errors.New("default value of select must be an int or string") - } - } else if len(options) > 0 { - // there is no default value so use the first - val = options[0].Value - } - // otherwise the selected index points to the value - } else if s.selectedIndex < len(options) { - // the - val = options[s.selectedIndex].Value - } - - // now that we have the value lets go hunt down the right index to return - idx = -1 - for i, optionValue := range s.Options { - if optionValue == val { - idx = i - } + if s.selectedIndex < len(options) { + return options[s.selectedIndex], err } - return core.OptionAnswer{Value: val, Index: idx}, err + return options[0], err } func (s *Select) Cleanup(config *PromptConfig, val interface{}) error { diff --git a/vendor/github.com/AlecAivazis/survey/v2/survey.go b/vendor/github.com/AlecAivazis/survey/v2/survey.go index 95136ebe37..aad73bbe70 100644 --- a/vendor/github.com/AlecAivazis/survey/v2/survey.go +++ b/vendor/github.com/AlecAivazis/survey/v2/survey.go @@ -56,8 +56,11 @@ func defaultAskOptions() *AskOptions { // include this option if it matches return strings.Contains(strings.ToLower(value), filter) }, - KeepFilter: false, - ShowCursor: false, + KeepFilter: false, + ShowCursor: false, + RemoveSelectAll: false, + RemoveSelectNone: false, + HideCharacter: '*', }, } } @@ -111,13 +114,16 @@ type Question struct { // PromptConfig holds the global configuration for a prompt type PromptConfig struct { - PageSize int - Icons IconSet - HelpInput string - SuggestInput string - Filter func(filter string, option string, index int) bool - KeepFilter bool - ShowCursor bool + PageSize int + Icons IconSet + HelpInput string + SuggestInput string + Filter func(filter string, option string, index int) bool + KeepFilter bool + ShowCursor bool + RemoveSelectAll bool + RemoveSelectNone bool + HideCharacter rune } // Prompt is the primary interface for the objects that can take user input @@ -175,6 +181,22 @@ func WithKeepFilter(KeepFilter bool) AskOpt { } } +// WithRemoveSelectAll remove the select all option in Multiselect +func WithRemoveSelectAll() AskOpt { + return func(options *AskOptions) error { + options.PromptConfig.RemoveSelectAll = true + return nil + } +} + +// WithRemoveSelectNone remove the select none/unselect all in Multiselect +func WithRemoveSelectNone() AskOpt { + return func(options *AskOptions) error { + options.PromptConfig.RemoveSelectNone = true + return nil + } +} + // WithValidator specifies a validator to use while prompting the user func WithValidator(v Validator) AskOpt { return func(options *AskOptions) error { @@ -234,6 +256,17 @@ func WithShowCursor(ShowCursor bool) AskOpt { } } +// WithHideCharacter sets the default character shown instead of the password for password inputs +func WithHideCharacter(char rune) AskOpt { + return func(options *AskOptions) error { + // set the hide character + options.PromptConfig.HideCharacter = char + + // nothing went wrong + return nil + } +} + /* AskOne performs the prompt for a single prompt and asks for validation if required. Response types should be something that can be casted from the response type designated @@ -245,7 +278,6 @@ in the documentation. For example: } survey.AskOne(prompt, &name) - */ func AskOne(p Prompt, response interface{}, opts ...AskOpt) error { err := Ask([]*Question{{Prompt: p}}, response, opts...) diff --git a/vendor/github.com/AlecAivazis/survey/v2/terminal/display_posix.go b/vendor/github.com/AlecAivazis/survey/v2/terminal/display_posix.go index 4660808751..fbd1b7947b 100644 --- a/vendor/github.com/AlecAivazis/survey/v2/terminal/display_posix.go +++ b/vendor/github.com/AlecAivazis/survey/v2/terminal/display_posix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package terminal diff --git a/vendor/github.com/AlecAivazis/survey/v2/terminal/error.go b/vendor/github.com/AlecAivazis/survey/v2/terminal/error.go index 710c361406..55eb66540c 100644 --- a/vendor/github.com/AlecAivazis/survey/v2/terminal/error.go +++ b/vendor/github.com/AlecAivazis/survey/v2/terminal/error.go @@ -5,5 +5,6 @@ import ( ) var ( + //lint:ignore ST1012 keeping old name for backwards compatibility InterruptErr = errors.New("interrupt") ) diff --git a/vendor/github.com/AlecAivazis/survey/v2/terminal/output.go b/vendor/github.com/AlecAivazis/survey/v2/terminal/output.go index 6fe11c089f..29102420c2 100644 --- a/vendor/github.com/AlecAivazis/survey/v2/terminal/output.go +++ b/vendor/github.com/AlecAivazis/survey/v2/terminal/output.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package terminal diff --git a/vendor/github.com/AlecAivazis/survey/v2/terminal/runereader.go b/vendor/github.com/AlecAivazis/survey/v2/terminal/runereader.go index e881d7532c..998e415e57 100644 --- a/vendor/github.com/AlecAivazis/survey/v2/terminal/runereader.go +++ b/vendor/github.com/AlecAivazis/survey/v2/terminal/runereader.go @@ -377,10 +377,41 @@ func (rr *RuneReader) ReadLineWithDefault(mask rune, d []rune, onRunes ...OnRune } } +// runeWidth returns the number of columns spanned by a rune when printed to the terminal func runeWidth(r rune) int { switch width.LookupRune(r).Kind() { case width.EastAsianWide, width.EastAsianFullwidth: return 2 } + + if !unicode.IsPrint(r) { + return 0 + } return 1 } + +// isAnsiMarker returns if a rune denotes the start of an ANSI sequence +func isAnsiMarker(r rune) bool { + return r == '\x1B' +} + +// isAnsiTerminator returns if a rune denotes the end of an ANSI sequence +func isAnsiTerminator(r rune) bool { + return (r >= 0x40 && r <= 0x5a) || (r == 0x5e) || (r >= 0x60 && r <= 0x7e) +} + +// StringWidth returns the visible width of a string when printed to the terminal +func StringWidth(str string) int { + w := 0 + ansi := false + + for _, r := range str { + // increase width only when outside of ANSI escape sequences + if ansi || isAnsiMarker(r) { + ansi = !isAnsiTerminator(r) + } else { + w += runeWidth(r) + } + } + return w +} diff --git a/vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_bsd.go b/vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_bsd.go index 6ea340923a..57f1014257 100644 --- a/vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_bsd.go +++ b/vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_bsd.go @@ -3,6 +3,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build darwin || dragonfly || freebsd || netbsd || openbsd // +build darwin dragonfly freebsd netbsd openbsd package terminal diff --git a/vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_linux.go b/vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_linux.go index 6dd60ea697..dc7ec670ce 100644 --- a/vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_linux.go +++ b/vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_linux.go @@ -2,6 +2,7 @@ // Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build linux && !ppc64le // +build linux,!ppc64le package terminal diff --git a/vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_posix.go b/vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_posix.go index 3b8460497a..563a08115a 100644 --- a/vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_posix.go +++ b/vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_posix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows // The terminal mode manipulation code is derived heavily from: diff --git a/vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_ppc64le.go b/vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_ppc64le.go index ae4eb09737..450f796c6a 100644 --- a/vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_ppc64le.go +++ b/vendor/github.com/AlecAivazis/survey/v2/terminal/runereader_ppc64le.go @@ -1,3 +1,4 @@ +//go:build ppc64le && linux // +build ppc64le,linux package terminal diff --git a/vendor/github.com/AlecAivazis/survey/v2/transform.go b/vendor/github.com/AlecAivazis/survey/v2/transform.go index 58d5193b03..a78ada3925 100644 --- a/vendor/github.com/AlecAivazis/survey/v2/transform.go +++ b/vendor/github.com/AlecAivazis/survey/v2/transform.go @@ -3,6 +3,9 @@ package survey import ( "reflect" "strings" + + "golang.org/x/text/cases" + "golang.org/x/text/language" ) // TransformString returns a `Transformer` based on the "f" @@ -62,7 +65,7 @@ func ToLower(ans interface{}) interface{} { // return a nil value, meaning that the above answer // will not be affected by this call at all. func Title(ans interface{}) interface{} { - transformer := TransformString(strings.Title) + transformer := TransformString(cases.Title(language.English).String) return transformer(ans) } diff --git a/vendor/github.com/AlecAivazis/survey/v2/validate.go b/vendor/github.com/AlecAivazis/survey/v2/validate.go index f196148433..7f03b23ac7 100644 --- a/vendor/github.com/AlecAivazis/survey/v2/validate.go +++ b/vendor/github.com/AlecAivazis/survey/v2/validate.go @@ -15,6 +15,7 @@ func Required(val interface{}) error { // if the value passed in is the zero value of the appropriate type if isZero(value) && value.Kind() != reflect.Bool { + //lint:ignore ST1005 this error message should render as capitalized return errors.New("Value is required") } return nil diff --git a/vendor/github.com/Azure/go-autorest/autorest/date/go_mod_tidy_hack.go b/vendor/github.com/Azure/go-autorest/autorest/date/go_mod_tidy_hack.go index 4e05432071..c879c200a7 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/date/go_mod_tidy_hack.go +++ b/vendor/github.com/Azure/go-autorest/autorest/date/go_mod_tidy_hack.go @@ -1,3 +1,4 @@ +//go:build modhack // +build modhack package date diff --git a/vendor/github.com/Azure/go-autorest/logger/go_mod_tidy_hack.go b/vendor/github.com/Azure/go-autorest/logger/go_mod_tidy_hack.go index 0aa27680db..be6aa9ee8b 100644 --- a/vendor/github.com/Azure/go-autorest/logger/go_mod_tidy_hack.go +++ b/vendor/github.com/Azure/go-autorest/logger/go_mod_tidy_hack.go @@ -1,3 +1,4 @@ +//go:build modhack // +build modhack package logger diff --git a/vendor/github.com/Azure/go-autorest/logger/logger.go b/vendor/github.com/Azure/go-autorest/logger/logger.go index 2f5d8cc1a1..e70dc3dc29 100644 --- a/vendor/github.com/Azure/go-autorest/logger/logger.go +++ b/vendor/github.com/Azure/go-autorest/logger/logger.go @@ -18,7 +18,6 @@ import ( "bytes" "fmt" "io" - "io/ioutil" "net/http" "net/url" "os" @@ -182,7 +181,7 @@ var Instance Writer // default log level var logLevel = LogNone -// Level returns the value specified in AZURE_GO_AUTOREST_LOG_LEVEL. +// Level returns the value specified in AZURE_GO_SDK_LOG_LEVEL. // If no value was specified the default value is LogNone. // Custom loggers can call this to retrieve the configured log level. func Level() LevelType { @@ -275,7 +274,7 @@ func (fl fileLogger) WriteRequest(req *http.Request, filter Filter) { } if fl.shouldLogBody(req.Header, req.Body) { // dump body - body, err := ioutil.ReadAll(req.Body) + body, err := io.ReadAll(req.Body) if err == nil { fmt.Fprintln(b, string(filter.processBody(body))) if nc, ok := req.Body.(io.Seeker); ok { @@ -283,7 +282,7 @@ func (fl fileLogger) WriteRequest(req *http.Request, filter Filter) { nc.Seek(0, io.SeekStart) } else { // recreate the body - req.Body = ioutil.NopCloser(bytes.NewReader(body)) + req.Body = io.NopCloser(bytes.NewReader(body)) } } else { fmt.Fprintf(b, "failed to read body: %v\n", err) @@ -310,10 +309,10 @@ func (fl fileLogger) WriteResponse(resp *http.Response, filter Filter) { if fl.shouldLogBody(resp.Header, resp.Body) { // dump body defer resp.Body.Close() - body, err := ioutil.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) if err == nil { fmt.Fprintln(b, string(filter.processBody(body))) - resp.Body = ioutil.NopCloser(bytes.NewReader(body)) + resp.Body = io.NopCloser(bytes.NewReader(body)) } else { fmt.Fprintf(b, "failed to read body: %v\n", err) } diff --git a/vendor/github.com/Azure/go-autorest/tracing/go_mod_tidy_hack.go b/vendor/github.com/Azure/go-autorest/tracing/go_mod_tidy_hack.go index e163975cd4..2136925751 100644 --- a/vendor/github.com/Azure/go-autorest/tracing/go_mod_tidy_hack.go +++ b/vendor/github.com/Azure/go-autorest/tracing/go_mod_tidy_hack.go @@ -1,3 +1,4 @@ +//go:build modhack // +build modhack package tracing diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/CHANGELOG.md new file mode 100644 index 0000000000..784e084451 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/CHANGELOG.md @@ -0,0 +1,542 @@ +# v1.40.4 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.40.3 (2024-10-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.40.2 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.40.1 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.40.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.39.4 (2024-10-03) + +* No change notes available for this release. + +# v1.39.3 (2024-09-27) + +* No change notes available for this release. + +# v1.39.2 (2024-09-25) + +* No change notes available for this release. + +# v1.39.1 (2024-09-23) + +* No change notes available for this release. + +# v1.39.0 (2024-09-20) + +* **Feature**: Add tracing and metrics support to service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.38.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.38.7 (2024-09-04) + +* No change notes available for this release. + +# v1.38.6 (2024-09-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.38.5 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.38.4 (2024-07-10.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.38.3 (2024-07-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.38.2 (2024-06-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.38.1 (2024-06-27) + +* **Documentation**: Doc only update for CloudFront that fixes customer-reported issue + +# v1.38.0 (2024-06-26) + +* **Feature**: Support list-of-string endpoint parameter. + +# v1.37.1 (2024-06-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.37.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.36.7 (2024-06-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.36.6 (2024-06-07) + +* **Bug Fix**: Add clock skew correction on all service clients +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.36.5 (2024-06-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.36.4 (2024-05-23) + +* No change notes available for this release. + +# v1.36.3 (2024-05-16) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.36.2 (2024-05-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.36.1 (2024-05-08) + +* **Bug Fix**: GoDoc improvement + +# v1.36.0 (2024-04-11) + +* **Feature**: CloudFront origin access control extends support to AWS Lambda function URLs and AWS Elemental MediaPackage v2 origins. + +# v1.35.4 (2024-03-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.35.3 (2024-03-18) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.35.2 (2024-03-07) + +* **Bug Fix**: Remove dependency on go-cmp. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.35.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.35.0 (2024-02-22) + +* **Feature**: Add middleware stack snapshot tests. + +# v1.34.2 (2024-02-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.34.1 (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.34.0 (2024-02-16) + +* **Feature**: Add new ClientOptions field to waiter config which allows you to extend the config for operation calls made by waiters. + +# v1.33.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.32.6 (2024-01-04) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.5 (2023-12-08) + +* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein. + +# v1.32.4 (2023-12-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.3 (2023-12-06) + +* **Bug Fix**: Restore pre-refactor auth behavior where all operations could technically be performed anonymously. + +# v1.32.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.32.1 (2023-11-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.0 (2023-11-29) + +* **Feature**: Expose Options() accessor on service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.31.2 (2023-11-28.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.31.1 (2023-11-28) + +* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction. + +# v1.31.0 (2023-11-21) + +* **Feature**: This release adds support for CloudFront KeyValueStore, a globally managed key value datastore associated with CloudFront Functions. + +# v1.30.3 (2023-11-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.30.2 (2023-11-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.30.1 (2023-11-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.30.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.29.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.28.7 (2023-10-12) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.6 (2023-10-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.5 (2023-08-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.4 (2023-08-18) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.3 (2023-08-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.2 (2023-08-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.1 (2023-08-01) + +* No change notes available for this release. + +# v1.28.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.27.0 (2023-07-28.2) + +* **Feature**: Add a new JavaScript runtime version for CloudFront Functions. + +# v1.26.10 (2023-07-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.26.9 (2023-07-13) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.26.8 (2023-06-15) + +* No change notes available for this release. + +# v1.26.7 (2023-06-13) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.26.6 (2023-05-04) + +* No change notes available for this release. + +# v1.26.5 (2023-04-24) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.26.4 (2023-04-10) + +* No change notes available for this release. + +# v1.26.3 (2023-04-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.26.2 (2023-03-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.26.1 (2023-03-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.26.0 (2023-02-22) + +* **Feature**: CloudFront now supports block lists in origin request policies so that you can forward all headers, cookies, or query string from viewer requests to the origin *except* for those specified in the block list. +* **Bug Fix**: Prevent nil pointer dereference when retrieving error codes. + +# v1.25.1 (2023-02-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.0 (2023-02-08) + +* **Feature**: CloudFront Origin Access Control extends support to AWS Elemental MediaStore origins. + +# v1.24.1 (2023-02-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.24.0 (2023-01-05) + +* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401). + +# v1.23.0 (2022-12-30) + +* **Feature**: Extend response headers policy to support removing headers from viewer responses + +# v1.22.2 (2022-12-16) + +* **Documentation**: Updated documentation for CloudFront + +# v1.22.1 (2022-12-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.0 (2022-12-07) + +* **Feature**: Introducing UpdateDistributionWithStagingConfig that can be used to promote the staging configuration to the production. + +# v1.21.1 (2022-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.0 (2022-11-18) + +* **Feature**: CloudFront API support for staging distributions and associated traffic management policies. + +# v1.20.7 (2022-10-24) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.6 (2022-10-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.5 (2022-09-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.4 (2022-09-14) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.3 (2022-09-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.2 (2022-08-31) + +* **Documentation**: Update API documentation for CloudFront origin access control (OAC) +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.1 (2022-08-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.0 (2022-08-24) + +* **Feature**: Adds support for CloudFront origin access control (OAC), making it possible to restrict public access to S3 bucket origins in all AWS Regions, those with SSE-KMS, and more. + +# v1.19.0 (2022-08-15) + +* **Feature**: Adds Http 3 support to distributions + +# v1.18.8 (2022-08-11) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.7 (2022-08-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.6 (2022-08-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.5 (2022-08-01) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.4 (2022-07-05) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.3 (2022-06-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.2 (2022-06-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.1 (2022-05-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.0 (2022-05-16) + +* **Feature**: Introduced a new error (TooLongCSPInResponseHeadersPolicy) that is returned when the value of the Content-Security-Policy header in a response headers policy exceeds the maximum allowed length. + +# v1.17.0 (2022-04-26) + +* **Feature**: CloudFront now supports the Server-Timing header in HTTP responses sent from CloudFront. You can use this header to view metrics that help you gain insights about the behavior and performance of CloudFront. To use this header, enable it in a response headers policy. + +# v1.16.4 (2022-04-25) + +* **Dependency Update**: Updated to the latest SDK module versions + +# 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.1 (2022-01-28) + +* **Bug Fix**: Updates SDK API client deserialization to pre-allocate byte slice and string response payloads, [#1565](https://github.com/aws/aws-sdk-go-v2/pull/1565). Thanks to [Tyson Mote](https://github.com/tysonmote) for submitting this PR. + +# v1.14.0 (2022-01-14) + +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.13.0 (2022-01-07) + +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.12.0 (2021-12-21) + +* **Feature**: API Paginators now support specifying the initial starting token, and support stopping on empty string tokens. + +# v1.11.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.11.1 (2021-11-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.0 (2021-11-12) + +* **Feature**: Waiters now have a `WaitForOutput` method, which can be used to retrieve the output of the successful wait operation. Thank you to [Andrew Haines](https://github.com/haines) for contributing this feature. + +# 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 +* **Feature**: Updated service to latest API model. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.9.0 (2021-10-21) + +* **Feature**: Updated to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.8.2 (2021-10-11) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.8.1 (2021-09-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.8.0 (2021-08-27) + +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.7.2 (2021-08-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.7.1 (2021-08-04) + +* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.7.0 (2021-07-15) + +* **Feature**: Updated service model to latest version. +* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.6.0 (2021-06-25) + +* **Feature**: API client updated +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.5.2 (2021-06-04) + +* **Documentation**: Updated service client to latest API model. + +# v1.5.1 (2021-05-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.5.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/cloudfront/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/LICENSE.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/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/cloudfront/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_client.go new file mode 100644 index 0000000000..450808585c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_client.go @@ -0,0 +1,912 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "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" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net" + "net/http" + "sync/atomic" + "time" +) + +const ServiceID = "CloudFront" +const ServiceAPIVersion = "2020-05-31" + +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/cloudfront") + 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/cloudfront") +} + +// Client provides the API client to make operations call for Amazon CloudFront. +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) + + 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/cloudfront") + }) + decorated := middleware.DecorateHandler(handler, stack) + result, metadata, err = decorated.Handle(ctx, params) + if err != nil { + span.SetProperty("exception.type", fmt.Sprintf("%T", err)) + span.SetProperty("exception.message", err.Error()) + + var aerr smithy.APIError + if errors.As(err, &aerr) { + span.SetProperty("api.error_code", aerr.ErrorCode()) + span.SetProperty("api.error_message", aerr.ErrorMessage()) + span.SetProperty("api.error_fault", aerr.ErrorFault().String()) + } + + err = &smithy.OperationError{ + ServiceID: ServiceID, + OperationName: opID, + Err: err, + } + } + + span.SetProperty("error", err != nil) + if err == nil { + span.SetStatus(tracing.SpanStatusOK) + } else { + span.SetStatus(tracing.SpanStatusError) + } + + return result, metadata, err +} + +type operationInputKey struct{} + +func setOperationInput(ctx context.Context, input interface{}) context.Context { + return middleware.WithStackValue(ctx, operationInputKey{}, input) +} + +func getOperationInput(ctx context.Context) interface{} { + return middleware.GetStackValue(ctx, operationInputKey{}) +} + +type setOperationInputMiddleware struct { +} + +func (*setOperationInputMiddleware) ID() string { + return "setOperationInput" +} + +func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + ctx = setOperationInput(ctx, in.Parameters) + return next.HandleSerialize(ctx, in) +} + +func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, operation string) error { + if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, middleware.Before); err != nil { + return fmt.Errorf("add ResolveAuthScheme: %w", err) + } + if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", middleware.After); err != nil { + return fmt.Errorf("add GetIdentity: %v", err) + } + if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil { + return fmt.Errorf("add ResolveEndpointV2: %v", err) + } + if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil { + return fmt.Errorf("add Signing: %w", err) + } + return nil +} +func resolveAuthSchemeResolver(options *Options) { + if options.AuthSchemeResolver == nil { + options.AuthSchemeResolver = &defaultAuthSchemeResolver{} + } +} + +func resolveAuthSchemes(options *Options) { + if options.AuthSchemes == nil { + options.AuthSchemes = []smithyhttp.AuthScheme{ + internalauth.NewHTTPAuthScheme("aws.auth#sigv4", &internalauthsmithy.V4SignerAdapter{ + Signer: options.HTTPSignerV4, + Logger: options.Logger, + LogSigning: options.ClientLogMode.IsSigning(), + }), + } + } +} + +type noSmithyDocumentSerde = smithydocument.NoSerde + +type legacyEndpointContextSetter struct { + LegacyResolver EndpointResolver +} + +func (*legacyEndpointContextSetter) ID() string { + return "legacyEndpointContextSetter" +} + +func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.LegacyResolver != nil { + ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true) + } + + return next.HandleInitialize(ctx, in) + +} +func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error { + return stack.Initialize.Add(&legacyEndpointContextSetter{ + LegacyResolver: o.EndpointResolver, + }, middleware.Before) +} + +func resolveDefaultLogger(o *Options) { + if o.Logger != nil { + return + } + o.Logger = logging.Nop{} +} + +func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { + return middleware.AddSetLoggerMiddleware(stack, o.Logger) +} + +func setResolvedDefaultsMode(o *Options) { + if len(o.resolvedDefaultsMode) > 0 { + return + } + + var mode aws.DefaultsMode + mode.SetFromString(string(o.DefaultsMode)) + + if mode == aws.DefaultsModeAuto { + mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) + } + + o.resolvedDefaultsMode = mode +} + +// NewFromConfig returns a new client from the provided config. +func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { + opts := Options{ + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, + } + resolveAWSRetryerProvider(cfg, &opts) + resolveAWSRetryMaxAttempts(cfg, &opts) + resolveAWSRetryMode(cfg, &opts) + resolveAWSEndpointResolver(cfg, &opts) + resolveUseDualStackEndpoint(cfg, &opts) + resolveUseFIPSEndpoint(cfg, &opts) + resolveBaseEndpoint(cfg, &opts) + return New(opts, optFns...) +} + +func resolveHTTPClient(o *Options) { + var buildable *awshttp.BuildableClient + + if o.HTTPClient != nil { + var ok bool + buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) + if !ok { + return + } + } else { + buildable = awshttp.NewBuildableClient() + } + + modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) + if err == nil { + buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { + if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { + dialer.Timeout = dialerTimeout + } + }) + + buildable = buildable.WithTransportOptions(func(transport *http.Transport) { + if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { + transport.TLSHandshakeTimeout = tlsHandshakeTimeout + } + }) + } + + o.HTTPClient = buildable +} + +func resolveRetryer(o *Options) { + if o.Retryer != nil { + return + } + + if len(o.RetryMode) == 0 { + modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) + if err == nil { + o.RetryMode = modeConfig.RetryMode + } + } + if len(o.RetryMode) == 0 { + o.RetryMode = aws.RetryModeStandard + } + + var standardOptions []func(*retry.StandardOptions) + if v := o.RetryMaxAttempts; v != 0 { + standardOptions = append(standardOptions, func(so *retry.StandardOptions) { + so.MaxAttempts = v + }) + } + + switch o.RetryMode { + case aws.RetryModeAdaptive: + var adaptiveOptions []func(*retry.AdaptiveModeOptions) + if len(standardOptions) != 0 { + adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { + ao.StandardOptions = append(ao.StandardOptions, standardOptions...) + }) + } + o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) + + default: + o.Retryer = retry.NewStandard(standardOptions...) + } +} + +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + +func resolveAWSRetryMode(cfg aws.Config, o *Options) { + if len(cfg.RetryMode) == 0 { + return + } + o.RetryMode = cfg.RetryMode +} +func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { + if cfg.RetryMaxAttempts == 0 { + return + } + o.RetryMaxAttempts = cfg.RetryMaxAttempts +} + +func finalizeRetryMaxAttempts(o *Options) { + if o.RetryMaxAttempts == 0 { + return + } + + o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) +} + +func finalizeOperationRetryMaxAttempts(o *Options, client Client) { + if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { + return + } + + o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) +} + +func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { + if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { + return + } + o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions) +} + +func addClientUserAgent(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "cloudfront", 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 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/cloudfront") + }) + if err := stack.Finalize.Insert(attempt, "Signing", 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 +} + +func resolveTracerProvider(options *Options) { + if options.TracerProvider == nil { + options.TracerProvider = &tracing.NopTracerProvider{} + } +} + +func resolveMeterProvider(options *Options) { + if options.MeterProvider == nil { + options.MeterProvider = metrics.NopMeterProvider{} + } +} + +func addRecursionDetection(stack *middleware.Stack) error { + return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) +} + +func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { + return stack.Deserialize.Insert(&awsmiddleware.RequestIDRetriever{}, "OperationDeserializer", middleware.Before) + +} + +func addResponseErrorMiddleware(stack *middleware.Stack) error { + return stack.Deserialize.Insert(&awshttp.ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before) + +} + +func addRequestResponseLogging(stack *middleware.Stack, o Options) error { + return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ + LogRequest: o.ClientLogMode.IsRequest(), + LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), + LogResponse: o.ClientLogMode.IsResponse(), + LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), + }, middleware.After) +} + +type disableHTTPSMiddleware struct { + DisableHTTPS bool +} + +func (*disableHTTPSMiddleware) ID() string { + return "disableHTTPS" +} + +func (m *disableHTTPSMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.DisableHTTPS && !smithyhttp.GetHostnameImmutable(ctx) { + req.URL.Scheme = "http" + } + + return next.HandleFinalize(ctx, in) +} + +func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { + return stack.Finalize.Insert(&disableHTTPSMiddleware{ + DisableHTTPS: o.EndpointOptions.DisableHTTPS, + }, "ResolveEndpointV2", middleware.After) +} + +type spanInitializeStart struct { +} + +func (*spanInitializeStart) ID() string { + return "spanInitializeStart" +} + +func (m *spanInitializeStart) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "Initialize") + + return next.HandleInitialize(ctx, in) +} + +type spanInitializeEnd struct { +} + +func (*spanInitializeEnd) ID() string { + return "spanInitializeEnd" +} + +func (m *spanInitializeEnd) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleInitialize(ctx, in) +} + +type spanBuildRequestStart struct { +} + +func (*spanBuildRequestStart) ID() string { + return "spanBuildRequestStart" +} + +func (m *spanBuildRequestStart) HandleSerialize( + ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, +) ( + middleware.SerializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "BuildRequest") + + return next.HandleSerialize(ctx, in) +} + +type spanBuildRequestEnd struct { +} + +func (*spanBuildRequestEnd) ID() string { + return "spanBuildRequestEnd" +} + +func (m *spanBuildRequestEnd) HandleBuild( + ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, +) ( + middleware.BuildOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleBuild(ctx, in) +} + +func addSpanInitializeStart(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeStart{}, middleware.Before) +} + +func addSpanInitializeEnd(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeEnd{}, middleware.After) +} + +func addSpanBuildRequestStart(stack *middleware.Stack) error { + return stack.Serialize.Add(&spanBuildRequestStart{}, middleware.Before) +} + +func addSpanBuildRequestEnd(stack *middleware.Stack) error { + return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_AssociateAlias.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_AssociateAlias.go new file mode 100644 index 0000000000..72d08ebaa4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_AssociateAlias.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +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" +) + +// Associates an alias (also known as a CNAME or an alternate domain name) with a +// CloudFront distribution. +// +// With this operation you can move an alias that's already in use on a CloudFront +// distribution to a different distribution in one step. This prevents the downtime +// that could occur if you first remove the alias from one distribution and then +// separately add the alias to another distribution. +// +// To use this operation to associate an alias with a distribution, you provide +// the alias and the ID of the target distribution for the alias. For more +// information, including how to set up the target distribution, prerequisites that +// you must complete, and other restrictions, see [Moving an alternate domain name to a different distribution]in the Amazon CloudFront +// Developer Guide. +// +// [Moving an alternate domain name to a different distribution]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html#alternate-domain-names-move +func (c *Client) AssociateAlias(ctx context.Context, params *AssociateAliasInput, optFns ...func(*Options)) (*AssociateAliasOutput, error) { + if params == nil { + params = &AssociateAliasInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AssociateAlias", params, optFns, c.addOperationAssociateAliasMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AssociateAliasOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AssociateAliasInput struct { + + // The alias (also known as a CNAME) to add to the target distribution. + // + // This member is required. + Alias *string + + // The ID of the distribution that you're associating the alias with. + // + // This member is required. + TargetDistributionId *string + + noSmithyDocumentSerde +} + +type AssociateAliasOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAssociateAliasMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpAssociateAlias{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpAssociateAlias{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateAlias"); 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 = addOpAssociateAliasValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateAlias(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opAssociateAlias(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "AssociateAlias", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CopyDistribution.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CopyDistribution.go new file mode 100644 index 0000000000..2542923c88 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CopyDistribution.go @@ -0,0 +1,209 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a staging distribution using the configuration of the provided primary +// distribution. A staging distribution is a copy of an existing distribution +// (called the primary distribution) that you can use in a continuous deployment +// workflow. +// +// After you create a staging distribution, you can use UpdateDistribution to +// modify the staging distribution's configuration. Then you can use +// CreateContinuousDeploymentPolicy to incrementally move traffic to the staging +// distribution. +// +// This API operation requires the following IAM permissions: +// +// [GetDistribution] +// +// [CreateDistribution] +// +// [CopyDistribution] +// +// [CopyDistribution]: https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_CopyDistribution.html +// [GetDistribution]: https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_GetDistribution.html +// [CreateDistribution]: https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_CreateDistribution.html +func (c *Client) CopyDistribution(ctx context.Context, params *CopyDistributionInput, optFns ...func(*Options)) (*CopyDistributionOutput, error) { + if params == nil { + params = &CopyDistributionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CopyDistribution", params, optFns, c.addOperationCopyDistributionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CopyDistributionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CopyDistributionInput struct { + + // A value that uniquely identifies a request to create a resource. This helps to + // prevent CloudFront from creating a duplicate resource if you accidentally + // resubmit an identical request. + // + // This member is required. + CallerReference *string + + // The identifier of the primary distribution whose configuration you are copying. + // To get a distribution ID, use ListDistributions . + // + // This member is required. + PrimaryDistributionId *string + + // A Boolean flag to specify the state of the staging distribution when it's + // created. When you set this value to True , the staging distribution is enabled. + // When you set this value to False , the staging distribution is disabled. + // + // If you omit this field, the default value is True . + Enabled *bool + + // The version identifier of the primary distribution whose configuration you are + // copying. This is the ETag value returned in the response to GetDistribution and + // GetDistributionConfig . + IfMatch *string + + // The type of distribution that your primary distribution will be copied to. The + // only valid value is True , indicating that you are copying to a staging + // distribution. + Staging *bool + + noSmithyDocumentSerde +} + +type CopyDistributionOutput struct { + + // A distribution tells CloudFront where you want content to be delivered from, + // and the details about how to track and manage content delivery. + Distribution *types.Distribution + + // The version identifier for the current version of the staging distribution. + ETag *string + + // The URL of the staging distribution. + Location *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCopyDistributionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpCopyDistribution{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCopyDistribution{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CopyDistribution"); 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 = addOpCopyDistributionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCopyDistribution(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCopyDistribution(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CopyDistribution", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateCachePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateCachePolicy.go new file mode 100644 index 0000000000..d97cb1f2ba --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateCachePolicy.go @@ -0,0 +1,185 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a cache policy. +// +// After you create a cache policy, you can attach it to one or more cache +// behaviors. When it's attached to a cache behavior, the cache policy determines +// the following: +// +// - The values that CloudFront includes in the cache key. These values can +// include HTTP headers, cookies, and URL query strings. CloudFront uses the cache +// key to find an object in its cache that it can return to the viewer. +// +// - The default, minimum, and maximum time to live (TTL) values that you want +// objects to stay in the CloudFront cache. +// +// The headers, cookies, and query strings that are included in the cache key are +// also included in requests that CloudFront sends to the origin. CloudFront sends +// a request when it can't find an object in its cache that matches the request's +// cache key. If you want to send values to the origin but not include them in the +// cache key, use OriginRequestPolicy . +// +// For more information about cache policies, see [Controlling the cache key] in the Amazon CloudFront +// Developer Guide. +// +// [Controlling the cache key]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html +func (c *Client) CreateCachePolicy(ctx context.Context, params *CreateCachePolicyInput, optFns ...func(*Options)) (*CreateCachePolicyOutput, error) { + if params == nil { + params = &CreateCachePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateCachePolicy", params, optFns, c.addOperationCreateCachePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateCachePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateCachePolicyInput struct { + + // A cache policy configuration. + // + // This member is required. + CachePolicyConfig *types.CachePolicyConfig + + noSmithyDocumentSerde +} + +type CreateCachePolicyOutput struct { + + // A cache policy. + CachePolicy *types.CachePolicy + + // The current version of the cache policy. + ETag *string + + // The fully qualified URI of the cache policy just created. + Location *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateCachePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateCachePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateCachePolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateCachePolicy"); 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 = addOpCreateCachePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCachePolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateCachePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateCachePolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateCloudFrontOriginAccessIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateCloudFrontOriginAccessIdentity.go new file mode 100644 index 0000000000..333c917553 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateCloudFrontOriginAccessIdentity.go @@ -0,0 +1,176 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new origin access identity. If you're using Amazon S3 for your +// origin, you can use an origin access identity to require users to access your +// content using a CloudFront URL instead of the Amazon S3 URL. For more +// information about how to use origin access identities, see [Serving Private Content through CloudFront]in the Amazon +// CloudFront Developer Guide. +// +// [Serving Private Content through CloudFront]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html +func (c *Client) CreateCloudFrontOriginAccessIdentity(ctx context.Context, params *CreateCloudFrontOriginAccessIdentityInput, optFns ...func(*Options)) (*CreateCloudFrontOriginAccessIdentityOutput, error) { + if params == nil { + params = &CreateCloudFrontOriginAccessIdentityInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateCloudFrontOriginAccessIdentity", params, optFns, c.addOperationCreateCloudFrontOriginAccessIdentityMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateCloudFrontOriginAccessIdentityOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The request to create a new origin access identity (OAI). An origin access +// identity is a special CloudFront user that you can associate with Amazon S3 +// origins, so that you can secure all or just some of your Amazon S3 content. For +// more information, see [Restricting Access to Amazon S3 Content by Using an Origin Access Identity]in the Amazon CloudFront Developer Guide. +// +// [Restricting Access to Amazon S3 Content by Using an Origin Access Identity]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html +type CreateCloudFrontOriginAccessIdentityInput struct { + + // The current configuration information for the identity. + // + // This member is required. + CloudFrontOriginAccessIdentityConfig *types.CloudFrontOriginAccessIdentityConfig + + noSmithyDocumentSerde +} + +// The returned result of the corresponding request. +type CreateCloudFrontOriginAccessIdentityOutput struct { + + // The origin access identity's information. + CloudFrontOriginAccessIdentity *types.CloudFrontOriginAccessIdentity + + // The current version of the origin access identity created. + ETag *string + + // The fully qualified URI of the new origin access identity just created. + Location *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateCloudFrontOriginAccessIdentityMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateCloudFrontOriginAccessIdentity{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateCloudFrontOriginAccessIdentity{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateCloudFrontOriginAccessIdentity"); 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 = addOpCreateCloudFrontOriginAccessIdentityValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCloudFrontOriginAccessIdentity(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateCloudFrontOriginAccessIdentity(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateCloudFrontOriginAccessIdentity", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateContinuousDeploymentPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateContinuousDeploymentPolicy.go new file mode 100644 index 0000000000..ea053c224e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateContinuousDeploymentPolicy.go @@ -0,0 +1,174 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a continuous deployment policy that distributes traffic for a custom +// domain name to two different CloudFront distributions. +// +// To use a continuous deployment policy, first use CopyDistribution to create a +// staging distribution, then use UpdateDistribution to modify the staging +// distribution's configuration. +// +// After you create and update a staging distribution, you can use a continuous +// deployment policy to incrementally move traffic to the staging distribution. +// This workflow enables you to test changes to a distribution's configuration +// before moving all of your domain's production traffic to the new configuration. +func (c *Client) CreateContinuousDeploymentPolicy(ctx context.Context, params *CreateContinuousDeploymentPolicyInput, optFns ...func(*Options)) (*CreateContinuousDeploymentPolicyOutput, error) { + if params == nil { + params = &CreateContinuousDeploymentPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateContinuousDeploymentPolicy", params, optFns, c.addOperationCreateContinuousDeploymentPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateContinuousDeploymentPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateContinuousDeploymentPolicyInput struct { + + // Contains the configuration for a continuous deployment policy. + // + // This member is required. + ContinuousDeploymentPolicyConfig *types.ContinuousDeploymentPolicyConfig + + noSmithyDocumentSerde +} + +type CreateContinuousDeploymentPolicyOutput struct { + + // A continuous deployment policy. + ContinuousDeploymentPolicy *types.ContinuousDeploymentPolicy + + // The version identifier for the current version of the continuous deployment + // policy. + ETag *string + + // The location of the continuous deployment policy. + Location *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateContinuousDeploymentPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateContinuousDeploymentPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateContinuousDeploymentPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateContinuousDeploymentPolicy"); 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 = addOpCreateContinuousDeploymentPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateContinuousDeploymentPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateContinuousDeploymentPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateContinuousDeploymentPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateDistribution.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateDistribution.go new file mode 100644 index 0000000000..055b3dc989 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateDistribution.go @@ -0,0 +1,165 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a CloudFront distribution. +func (c *Client) CreateDistribution(ctx context.Context, params *CreateDistributionInput, optFns ...func(*Options)) (*CreateDistributionOutput, error) { + if params == nil { + params = &CreateDistributionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateDistribution", params, optFns, c.addOperationCreateDistributionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateDistributionOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The request to create a new distribution. +type CreateDistributionInput struct { + + // The distribution's configuration information. + // + // This member is required. + DistributionConfig *types.DistributionConfig + + noSmithyDocumentSerde +} + +// The returned result of the corresponding request. +type CreateDistributionOutput struct { + + // The distribution's information. + Distribution *types.Distribution + + // The current version of the distribution created. + ETag *string + + // The fully qualified URI of the new distribution resource just created. + Location *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateDistributionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateDistribution{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateDistribution{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateDistribution"); 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 = addOpCreateDistributionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateDistribution(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateDistribution(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateDistribution", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateDistributionWithTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateDistributionWithTags.go new file mode 100644 index 0000000000..7af9e7afd7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateDistributionWithTags.go @@ -0,0 +1,173 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Create a new distribution with tags. This API operation requires the following +// IAM permissions: +// +// [CreateDistribution] +// +// [TagResource] +// +// [TagResource]: https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_TagResource.html +// [CreateDistribution]: https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_CreateDistribution.html +func (c *Client) CreateDistributionWithTags(ctx context.Context, params *CreateDistributionWithTagsInput, optFns ...func(*Options)) (*CreateDistributionWithTagsOutput, error) { + if params == nil { + params = &CreateDistributionWithTagsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateDistributionWithTags", params, optFns, c.addOperationCreateDistributionWithTagsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateDistributionWithTagsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The request to create a new distribution with tags. +type CreateDistributionWithTagsInput struct { + + // The distribution's configuration information. + // + // This member is required. + DistributionConfigWithTags *types.DistributionConfigWithTags + + noSmithyDocumentSerde +} + +// The returned result of the corresponding request. +type CreateDistributionWithTagsOutput struct { + + // The distribution's information. + Distribution *types.Distribution + + // The current version of the distribution created. + ETag *string + + // The fully qualified URI of the new distribution resource just created. + Location *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateDistributionWithTagsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateDistributionWithTags{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateDistributionWithTags{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateDistributionWithTags"); 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 = addOpCreateDistributionWithTagsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateDistributionWithTags(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateDistributionWithTags(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateDistributionWithTags", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateFieldLevelEncryptionConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateFieldLevelEncryptionConfig.go new file mode 100644 index 0000000000..d328fe2bb5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateFieldLevelEncryptionConfig.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Create a new field-level encryption configuration. +func (c *Client) CreateFieldLevelEncryptionConfig(ctx context.Context, params *CreateFieldLevelEncryptionConfigInput, optFns ...func(*Options)) (*CreateFieldLevelEncryptionConfigOutput, error) { + if params == nil { + params = &CreateFieldLevelEncryptionConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateFieldLevelEncryptionConfig", params, optFns, c.addOperationCreateFieldLevelEncryptionConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateFieldLevelEncryptionConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateFieldLevelEncryptionConfigInput struct { + + // The request to create a new field-level encryption configuration. + // + // This member is required. + FieldLevelEncryptionConfig *types.FieldLevelEncryptionConfig + + noSmithyDocumentSerde +} + +type CreateFieldLevelEncryptionConfigOutput struct { + + // The current version of the field level encryption configuration. For example: + // E2QWRUHAPOMQZL . + ETag *string + + // Returned when you create a new field-level encryption configuration. + FieldLevelEncryption *types.FieldLevelEncryption + + // The fully qualified URI of the new configuration resource just created. + Location *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateFieldLevelEncryptionConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateFieldLevelEncryptionConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateFieldLevelEncryptionConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateFieldLevelEncryptionConfig"); 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 = addOpCreateFieldLevelEncryptionConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateFieldLevelEncryptionConfig(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateFieldLevelEncryptionConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateFieldLevelEncryptionConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateFieldLevelEncryptionProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateFieldLevelEncryptionProfile.go new file mode 100644 index 0000000000..3ff9faea49 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateFieldLevelEncryptionProfile.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Create a field-level encryption profile. +func (c *Client) CreateFieldLevelEncryptionProfile(ctx context.Context, params *CreateFieldLevelEncryptionProfileInput, optFns ...func(*Options)) (*CreateFieldLevelEncryptionProfileOutput, error) { + if params == nil { + params = &CreateFieldLevelEncryptionProfileInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateFieldLevelEncryptionProfile", params, optFns, c.addOperationCreateFieldLevelEncryptionProfileMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateFieldLevelEncryptionProfileOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateFieldLevelEncryptionProfileInput struct { + + // The request to create a field-level encryption profile. + // + // This member is required. + FieldLevelEncryptionProfileConfig *types.FieldLevelEncryptionProfileConfig + + noSmithyDocumentSerde +} + +type CreateFieldLevelEncryptionProfileOutput struct { + + // The current version of the field level encryption profile. For example: + // E2QWRUHAPOMQZL . + ETag *string + + // Returned when you create a new field-level encryption profile. + FieldLevelEncryptionProfile *types.FieldLevelEncryptionProfile + + // The fully qualified URI of the new profile resource just created. + Location *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateFieldLevelEncryptionProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateFieldLevelEncryptionProfile{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateFieldLevelEncryptionProfile{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateFieldLevelEncryptionProfile"); 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 = addOpCreateFieldLevelEncryptionProfileValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateFieldLevelEncryptionProfile(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateFieldLevelEncryptionProfile(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateFieldLevelEncryptionProfile", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateFunction.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateFunction.go new file mode 100644 index 0000000000..4a4dcb442d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateFunction.go @@ -0,0 +1,190 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a CloudFront function. +// +// To create a function, you provide the function code and some configuration +// information about the function. The response contains an Amazon Resource Name +// (ARN) that uniquely identifies the function. +// +// When you create a function, it's in the DEVELOPMENT stage. In this stage, you +// can test the function with TestFunction , and update it with UpdateFunction . +// +// When you're ready to use your function with a CloudFront distribution, use +// PublishFunction to copy the function from the DEVELOPMENT stage to LIVE . When +// it's live, you can attach the function to a distribution's cache behavior, using +// the function's ARN. +func (c *Client) CreateFunction(ctx context.Context, params *CreateFunctionInput, optFns ...func(*Options)) (*CreateFunctionOutput, error) { + if params == nil { + params = &CreateFunctionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateFunction", params, optFns, c.addOperationCreateFunctionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateFunctionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateFunctionInput struct { + + // The function code. For more information about writing a CloudFront function, + // see [Writing function code for CloudFront Functions]in the Amazon CloudFront Developer Guide. + // + // [Writing function code for CloudFront Functions]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/writing-function-code.html + // + // This member is required. + FunctionCode []byte + + // Configuration information about the function, including an optional comment and + // the function's runtime. + // + // This member is required. + FunctionConfig *types.FunctionConfig + + // A name to identify the function. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type CreateFunctionOutput struct { + + // The version identifier for the current version of the CloudFront function. + ETag *string + + // Contains configuration information and metadata about a CloudFront function. + FunctionSummary *types.FunctionSummary + + // The URL of the CloudFront function. Use the URL to manage the function with the + // CloudFront API. + Location *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateFunctionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateFunction{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateFunction{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateFunction"); 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 = addOpCreateFunctionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateFunction(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateFunction(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateFunction", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateInvalidation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateInvalidation.go new file mode 100644 index 0000000000..7370853878 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateInvalidation.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Create a new invalidation. For more information, see [Invalidating files] in the Amazon CloudFront +// Developer Guide. +// +// [Invalidating files]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html +func (c *Client) CreateInvalidation(ctx context.Context, params *CreateInvalidationInput, optFns ...func(*Options)) (*CreateInvalidationOutput, error) { + if params == nil { + params = &CreateInvalidationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateInvalidation", params, optFns, c.addOperationCreateInvalidationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateInvalidationOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The request to create an invalidation. +type CreateInvalidationInput struct { + + // The distribution's id. + // + // This member is required. + DistributionId *string + + // The batch information for the invalidation. + // + // This member is required. + InvalidationBatch *types.InvalidationBatch + + noSmithyDocumentSerde +} + +// The returned result of the corresponding request. +type CreateInvalidationOutput struct { + + // The invalidation's information. + Invalidation *types.Invalidation + + // The fully qualified URI of the distribution and invalidation batch request, + // including the Invalidation ID . + Location *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateInvalidationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateInvalidation{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateInvalidation{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateInvalidation"); 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 = addOpCreateInvalidationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateInvalidation(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateInvalidation(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateInvalidation", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateKeyGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateKeyGroup.go new file mode 100644 index 0000000000..444c88ad44 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateKeyGroup.go @@ -0,0 +1,175 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a key group that you can use with [CloudFront signed URLs and signed cookies]. +// +// To create a key group, you must specify at least one public key for the key +// group. After you create a key group, you can reference it from one or more cache +// behaviors. When you reference a key group in a cache behavior, CloudFront +// requires signed URLs or signed cookies for all requests that match the cache +// behavior. The URLs or cookies must be signed with a private key whose +// corresponding public key is in the key group. The signed URL or cookie contains +// information about which public key CloudFront should use to verify the +// signature. For more information, see [Serving private content]in the Amazon CloudFront Developer Guide. +// +// [Serving private content]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html +// [CloudFront signed URLs and signed cookies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html +func (c *Client) CreateKeyGroup(ctx context.Context, params *CreateKeyGroupInput, optFns ...func(*Options)) (*CreateKeyGroupOutput, error) { + if params == nil { + params = &CreateKeyGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateKeyGroup", params, optFns, c.addOperationCreateKeyGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateKeyGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateKeyGroupInput struct { + + // A key group configuration. + // + // This member is required. + KeyGroupConfig *types.KeyGroupConfig + + noSmithyDocumentSerde +} + +type CreateKeyGroupOutput struct { + + // The identifier for this version of the key group. + ETag *string + + // The key group that was just created. + KeyGroup *types.KeyGroup + + // The URL of the key group. + Location *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateKeyGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateKeyGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateKeyGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateKeyGroup"); 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 = addOpCreateKeyGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateKeyGroup(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateKeyGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateKeyGroup", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateKeyValueStore.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateKeyValueStore.go new file mode 100644 index 0000000000..7527eebde4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateKeyValueStore.go @@ -0,0 +1,174 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Specifies the key value store resource to add to your account. In your account, +// the key value store names must be unique. You can also import key value store +// data in JSON format from an S3 bucket by providing a valid ImportSource that +// you own. +func (c *Client) CreateKeyValueStore(ctx context.Context, params *CreateKeyValueStoreInput, optFns ...func(*Options)) (*CreateKeyValueStoreOutput, error) { + if params == nil { + params = &CreateKeyValueStoreInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateKeyValueStore", params, optFns, c.addOperationCreateKeyValueStoreMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateKeyValueStoreOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateKeyValueStoreInput struct { + + // The name of the key value store. The minimum length is 1 character and the + // maximum length is 64 characters. + // + // This member is required. + Name *string + + // The comment of the key value store. + Comment *string + + // The S3 bucket that provides the source for the import. The source must be in a + // valid JSON format. + ImportSource *types.ImportSource + + noSmithyDocumentSerde +} + +type CreateKeyValueStoreOutput struct { + + // The ETag in the resulting key value store. + ETag *string + + // The resulting key value store. + KeyValueStore *types.KeyValueStore + + // The location of the resulting key value store. + Location *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateKeyValueStoreMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateKeyValueStore{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateKeyValueStore{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateKeyValueStore"); 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 = addOpCreateKeyValueStoreValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateKeyValueStore(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateKeyValueStore(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateKeyValueStore", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateMonitoringSubscription.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateMonitoringSubscription.go new file mode 100644 index 0000000000..fb98db58fe --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateMonitoringSubscription.go @@ -0,0 +1,169 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Enables additional CloudWatch metrics for the specified CloudFront +// distribution. The additional metrics incur an additional cost. +// +// For more information, see [Viewing additional CloudFront distribution metrics] in the Amazon CloudFront Developer Guide. +// +// [Viewing additional CloudFront distribution metrics]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/viewing-cloudfront-metrics.html#monitoring-console.distributions-additional +func (c *Client) CreateMonitoringSubscription(ctx context.Context, params *CreateMonitoringSubscriptionInput, optFns ...func(*Options)) (*CreateMonitoringSubscriptionOutput, error) { + if params == nil { + params = &CreateMonitoringSubscriptionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateMonitoringSubscription", params, optFns, c.addOperationCreateMonitoringSubscriptionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateMonitoringSubscriptionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateMonitoringSubscriptionInput struct { + + // The ID of the distribution that you are enabling metrics for. + // + // This member is required. + DistributionId *string + + // A monitoring subscription. This structure contains information about whether + // additional CloudWatch metrics are enabled for a given CloudFront distribution. + // + // This member is required. + MonitoringSubscription *types.MonitoringSubscription + + noSmithyDocumentSerde +} + +type CreateMonitoringSubscriptionOutput struct { + + // A monitoring subscription. This structure contains information about whether + // additional CloudWatch metrics are enabled for a given CloudFront distribution. + MonitoringSubscription *types.MonitoringSubscription + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateMonitoringSubscriptionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateMonitoringSubscription{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateMonitoringSubscription{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateMonitoringSubscription"); 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 = addOpCreateMonitoringSubscriptionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateMonitoringSubscription(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateMonitoringSubscription(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateMonitoringSubscription", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateOriginAccessControl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateOriginAccessControl.go new file mode 100644 index 0000000000..4e494b12fc --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateOriginAccessControl.go @@ -0,0 +1,173 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new origin access control in CloudFront. After you create an origin +// access control, you can add it to an origin in a CloudFront distribution so that +// CloudFront sends authenticated (signed) requests to the origin. +// +// This makes it possible to block public access to the origin, allowing viewers +// (users) to access the origin's content only through CloudFront. +// +// For more information about using a CloudFront origin access control, see [Restricting access to an Amazon Web Services origin] in +// the Amazon CloudFront Developer Guide. +// +// [Restricting access to an Amazon Web Services origin]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-origin.html +func (c *Client) CreateOriginAccessControl(ctx context.Context, params *CreateOriginAccessControlInput, optFns ...func(*Options)) (*CreateOriginAccessControlOutput, error) { + if params == nil { + params = &CreateOriginAccessControlInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateOriginAccessControl", params, optFns, c.addOperationCreateOriginAccessControlMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateOriginAccessControlOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateOriginAccessControlInput struct { + + // Contains the origin access control. + // + // This member is required. + OriginAccessControlConfig *types.OriginAccessControlConfig + + noSmithyDocumentSerde +} + +type CreateOriginAccessControlOutput struct { + + // The version identifier for the current version of the origin access control. + ETag *string + + // The URL of the origin access control. + Location *string + + // Contains an origin access control. + OriginAccessControl *types.OriginAccessControl + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateOriginAccessControlMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateOriginAccessControl{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateOriginAccessControl{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateOriginAccessControl"); 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 = addOpCreateOriginAccessControlValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateOriginAccessControl(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateOriginAccessControl(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateOriginAccessControl", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateOriginRequestPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateOriginRequestPolicy.go new file mode 100644 index 0000000000..944a37f291 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateOriginRequestPolicy.go @@ -0,0 +1,189 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates an origin request policy. +// +// After you create an origin request policy, you can attach it to one or more +// cache behaviors. When it's attached to a cache behavior, the origin request +// policy determines the values that CloudFront includes in requests that it sends +// to the origin. Each request that CloudFront sends to the origin includes the +// following: +// +// - The request body and the URL path (without the domain name) from the viewer +// request. +// +// - The headers that CloudFront automatically includes in every origin request, +// including Host , User-Agent , and X-Amz-Cf-Id . +// +// - All HTTP headers, cookies, and URL query strings that are specified in the +// cache policy or the origin request policy. These can include items from the +// viewer request and, in the case of headers, additional ones that are added by +// CloudFront. +// +// CloudFront sends a request when it can't find a valid object in its cache that +// matches the request. If you want to send values to the origin and also include +// them in the cache key, use CachePolicy . +// +// For more information about origin request policies, see [Controlling origin requests] in the Amazon +// CloudFront Developer Guide. +// +// [Controlling origin requests]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html +func (c *Client) CreateOriginRequestPolicy(ctx context.Context, params *CreateOriginRequestPolicyInput, optFns ...func(*Options)) (*CreateOriginRequestPolicyOutput, error) { + if params == nil { + params = &CreateOriginRequestPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateOriginRequestPolicy", params, optFns, c.addOperationCreateOriginRequestPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateOriginRequestPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateOriginRequestPolicyInput struct { + + // An origin request policy configuration. + // + // This member is required. + OriginRequestPolicyConfig *types.OriginRequestPolicyConfig + + noSmithyDocumentSerde +} + +type CreateOriginRequestPolicyOutput struct { + + // The current version of the origin request policy. + ETag *string + + // The fully qualified URI of the origin request policy just created. + Location *string + + // An origin request policy. + OriginRequestPolicy *types.OriginRequestPolicy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateOriginRequestPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateOriginRequestPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateOriginRequestPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateOriginRequestPolicy"); 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 = addOpCreateOriginRequestPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateOriginRequestPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateOriginRequestPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateOriginRequestPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreatePublicKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreatePublicKey.go new file mode 100644 index 0000000000..836c950f83 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreatePublicKey.go @@ -0,0 +1,166 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Uploads a public key to CloudFront that you can use with [signed URLs and signed cookies], or with [field-level encryption]. +// +// [signed URLs and signed cookies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html +// [field-level encryption]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/field-level-encryption.html +func (c *Client) CreatePublicKey(ctx context.Context, params *CreatePublicKeyInput, optFns ...func(*Options)) (*CreatePublicKeyOutput, error) { + if params == nil { + params = &CreatePublicKeyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreatePublicKey", params, optFns, c.addOperationCreatePublicKeyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreatePublicKeyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreatePublicKeyInput struct { + + // A CloudFront public key configuration. + // + // This member is required. + PublicKeyConfig *types.PublicKeyConfig + + noSmithyDocumentSerde +} + +type CreatePublicKeyOutput struct { + + // The identifier for this version of the public key. + ETag *string + + // The URL of the public key. + Location *string + + // The public key. + PublicKey *types.PublicKey + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreatePublicKeyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpCreatePublicKey{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreatePublicKey{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreatePublicKey"); 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 = addOpCreatePublicKeyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreatePublicKey(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreatePublicKey(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreatePublicKey", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateRealtimeLogConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateRealtimeLogConfig.go new file mode 100644 index 0000000000..9005876dec --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateRealtimeLogConfig.go @@ -0,0 +1,189 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a real-time log configuration. +// +// After you create a real-time log configuration, you can attach it to one or +// more cache behaviors to send real-time log data to the specified Amazon Kinesis +// data stream. +// +// For more information about real-time log configurations, see [Real-time logs] in the Amazon +// CloudFront Developer Guide. +// +// [Real-time logs]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html +func (c *Client) CreateRealtimeLogConfig(ctx context.Context, params *CreateRealtimeLogConfigInput, optFns ...func(*Options)) (*CreateRealtimeLogConfigOutput, error) { + if params == nil { + params = &CreateRealtimeLogConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateRealtimeLogConfig", params, optFns, c.addOperationCreateRealtimeLogConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateRealtimeLogConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateRealtimeLogConfigInput struct { + + // Contains information about the Amazon Kinesis data stream where you are sending + // real-time log data. + // + // This member is required. + EndPoints []types.EndPoint + + // A list of fields to include in each real-time log record. + // + // For more information about fields, see [Real-time log configuration fields] in the Amazon CloudFront Developer + // Guide. + // + // [Real-time log configuration fields]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html#understand-real-time-log-config-fields + // + // This member is required. + Fields []string + + // A unique name to identify this real-time log configuration. + // + // This member is required. + Name *string + + // The sampling rate for this real-time log configuration. You can specify a whole + // number between 1 and 100 (inclusive) to determine the percentage of viewer + // requests that are represented in the real-time log data. + // + // This member is required. + SamplingRate *int64 + + noSmithyDocumentSerde +} + +type CreateRealtimeLogConfigOutput struct { + + // A real-time log configuration. + RealtimeLogConfig *types.RealtimeLogConfig + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateRealtimeLogConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateRealtimeLogConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateRealtimeLogConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateRealtimeLogConfig"); 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 = addOpCreateRealtimeLogConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateRealtimeLogConfig(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateRealtimeLogConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateRealtimeLogConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateResponseHeadersPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateResponseHeadersPolicy.go new file mode 100644 index 0000000000..197a2844c7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateResponseHeadersPolicy.go @@ -0,0 +1,179 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a response headers policy. +// +// A response headers policy contains information about a set of HTTP headers. To +// create a response headers policy, you provide some metadata about the policy and +// a set of configurations that specify the headers. +// +// After you create a response headers policy, you can use its ID to attach it to +// one or more cache behaviors in a CloudFront distribution. When it's attached to +// a cache behavior, the response headers policy affects the HTTP headers that +// CloudFront includes in HTTP responses to requests that match the cache behavior. +// CloudFront adds or removes response headers according to the configuration of +// the response headers policy. +// +// For more information, see [Adding or removing HTTP headers in CloudFront responses] in the Amazon CloudFront Developer Guide. +// +// [Adding or removing HTTP headers in CloudFront responses]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/modifying-response-headers.html +func (c *Client) CreateResponseHeadersPolicy(ctx context.Context, params *CreateResponseHeadersPolicyInput, optFns ...func(*Options)) (*CreateResponseHeadersPolicyOutput, error) { + if params == nil { + params = &CreateResponseHeadersPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateResponseHeadersPolicy", params, optFns, c.addOperationCreateResponseHeadersPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateResponseHeadersPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateResponseHeadersPolicyInput struct { + + // Contains metadata about the response headers policy, and a set of + // configurations that specify the HTTP headers. + // + // This member is required. + ResponseHeadersPolicyConfig *types.ResponseHeadersPolicyConfig + + noSmithyDocumentSerde +} + +type CreateResponseHeadersPolicyOutput struct { + + // The version identifier for the current version of the response headers policy. + ETag *string + + // The URL of the response headers policy. + Location *string + + // Contains a response headers policy. + ResponseHeadersPolicy *types.ResponseHeadersPolicy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateResponseHeadersPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateResponseHeadersPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateResponseHeadersPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateResponseHeadersPolicy"); 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 = addOpCreateResponseHeadersPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateResponseHeadersPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateResponseHeadersPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateResponseHeadersPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateStreamingDistribution.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateStreamingDistribution.go new file mode 100644 index 0000000000..8b2ce4c5ba --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateStreamingDistribution.go @@ -0,0 +1,169 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// This API is deprecated. Amazon CloudFront is deprecating real-time messaging +// protocol (RTMP) distributions on December 31, 2020. For more information, [read the announcement]on +// the Amazon CloudFront discussion forum. +// +// [read the announcement]: http://forums.aws.amazon.com/ann.jspa?annID=7356 +func (c *Client) CreateStreamingDistribution(ctx context.Context, params *CreateStreamingDistributionInput, optFns ...func(*Options)) (*CreateStreamingDistributionOutput, error) { + if params == nil { + params = &CreateStreamingDistributionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateStreamingDistribution", params, optFns, c.addOperationCreateStreamingDistributionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateStreamingDistributionOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The request to create a new streaming distribution. +type CreateStreamingDistributionInput struct { + + // The streaming distribution's configuration information. + // + // This member is required. + StreamingDistributionConfig *types.StreamingDistributionConfig + + noSmithyDocumentSerde +} + +// The returned result of the corresponding request. +type CreateStreamingDistributionOutput struct { + + // The current version of the streaming distribution created. + ETag *string + + // The fully qualified URI of the new streaming distribution resource just created. + Location *string + + // The streaming distribution's information. + StreamingDistribution *types.StreamingDistribution + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateStreamingDistributionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateStreamingDistribution{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateStreamingDistribution{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateStreamingDistribution"); 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 = addOpCreateStreamingDistributionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateStreamingDistribution(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateStreamingDistribution(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateStreamingDistribution", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateStreamingDistributionWithTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateStreamingDistributionWithTags.go new file mode 100644 index 0000000000..807919c6cb --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_CreateStreamingDistributionWithTags.go @@ -0,0 +1,169 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// This API is deprecated. Amazon CloudFront is deprecating real-time messaging +// protocol (RTMP) distributions on December 31, 2020. For more information, [read the announcement]on +// the Amazon CloudFront discussion forum. +// +// [read the announcement]: http://forums.aws.amazon.com/ann.jspa?annID=7356 +func (c *Client) CreateStreamingDistributionWithTags(ctx context.Context, params *CreateStreamingDistributionWithTagsInput, optFns ...func(*Options)) (*CreateStreamingDistributionWithTagsOutput, error) { + if params == nil { + params = &CreateStreamingDistributionWithTagsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateStreamingDistributionWithTags", params, optFns, c.addOperationCreateStreamingDistributionWithTagsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateStreamingDistributionWithTagsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The request to create a new streaming distribution with tags. +type CreateStreamingDistributionWithTagsInput struct { + + // The streaming distribution's configuration information. + // + // This member is required. + StreamingDistributionConfigWithTags *types.StreamingDistributionConfigWithTags + + noSmithyDocumentSerde +} + +// The returned result of the corresponding request. +type CreateStreamingDistributionWithTagsOutput struct { + + // The current version of the distribution created. + ETag *string + + // The fully qualified URI of the new streaming distribution resource just created. + Location *string + + // The streaming distribution's information. + StreamingDistribution *types.StreamingDistribution + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateStreamingDistributionWithTagsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpCreateStreamingDistributionWithTags{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateStreamingDistributionWithTags{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateStreamingDistributionWithTags"); 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 = addOpCreateStreamingDistributionWithTagsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateStreamingDistributionWithTags(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateStreamingDistributionWithTags(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateStreamingDistributionWithTags", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteCachePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteCachePolicy.go new file mode 100644 index 0000000000..96fe57cc99 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteCachePolicy.go @@ -0,0 +1,165 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +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 cache policy. +// +// You cannot delete a cache policy if it's attached to a cache behavior. First +// update your distributions to remove the cache policy from all cache behaviors, +// then delete the cache policy. +// +// To delete a cache policy, you must provide the policy's identifier and version. +// To get these values, you can use ListCachePolicies or GetCachePolicy . +func (c *Client) DeleteCachePolicy(ctx context.Context, params *DeleteCachePolicyInput, optFns ...func(*Options)) (*DeleteCachePolicyOutput, error) { + if params == nil { + params = &DeleteCachePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteCachePolicy", params, optFns, c.addOperationDeleteCachePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteCachePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteCachePolicyInput struct { + + // The unique identifier for the cache policy that you are deleting. To get the + // identifier, you can use ListCachePolicies . + // + // This member is required. + Id *string + + // The version of the cache policy that you are deleting. The version is the cache + // policy's ETag value, which you can get using ListCachePolicies , GetCachePolicy + // , or GetCachePolicyConfig . + IfMatch *string + + noSmithyDocumentSerde +} + +type DeleteCachePolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteCachePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteCachePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteCachePolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteCachePolicy"); 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 = addOpDeleteCachePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteCachePolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteCachePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteCachePolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteCloudFrontOriginAccessIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteCloudFrontOriginAccessIdentity.go new file mode 100644 index 0000000000..72d6f7e438 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteCloudFrontOriginAccessIdentity.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +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" +) + +// Delete an origin access identity. +func (c *Client) DeleteCloudFrontOriginAccessIdentity(ctx context.Context, params *DeleteCloudFrontOriginAccessIdentityInput, optFns ...func(*Options)) (*DeleteCloudFrontOriginAccessIdentityOutput, error) { + if params == nil { + params = &DeleteCloudFrontOriginAccessIdentityInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteCloudFrontOriginAccessIdentity", params, optFns, c.addOperationDeleteCloudFrontOriginAccessIdentityMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteCloudFrontOriginAccessIdentityOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Deletes a origin access identity. +type DeleteCloudFrontOriginAccessIdentityInput struct { + + // The origin access identity's ID. + // + // This member is required. + Id *string + + // The value of the ETag header you received from a previous GET or PUT request. + // For example: E2QWRUHAPOMQZL . + IfMatch *string + + noSmithyDocumentSerde +} + +type DeleteCloudFrontOriginAccessIdentityOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteCloudFrontOriginAccessIdentityMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteCloudFrontOriginAccessIdentity{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteCloudFrontOriginAccessIdentity{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteCloudFrontOriginAccessIdentity"); 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 = addOpDeleteCloudFrontOriginAccessIdentityValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteCloudFrontOriginAccessIdentity(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteCloudFrontOriginAccessIdentity(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteCloudFrontOriginAccessIdentity", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteContinuousDeploymentPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteContinuousDeploymentPolicy.go new file mode 100644 index 0000000000..143b126dc5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteContinuousDeploymentPolicy.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +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 continuous deployment policy. +// +// You cannot delete a continuous deployment policy that's attached to a primary +// distribution. First update your distribution to remove the continuous deployment +// policy, then you can delete the policy. +func (c *Client) DeleteContinuousDeploymentPolicy(ctx context.Context, params *DeleteContinuousDeploymentPolicyInput, optFns ...func(*Options)) (*DeleteContinuousDeploymentPolicyOutput, error) { + if params == nil { + params = &DeleteContinuousDeploymentPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteContinuousDeploymentPolicy", params, optFns, c.addOperationDeleteContinuousDeploymentPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteContinuousDeploymentPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteContinuousDeploymentPolicyInput struct { + + // The identifier of the continuous deployment policy that you are deleting. + // + // This member is required. + Id *string + + // The current version ( ETag value) of the continuous deployment policy that you + // are deleting. + IfMatch *string + + noSmithyDocumentSerde +} + +type DeleteContinuousDeploymentPolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteContinuousDeploymentPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteContinuousDeploymentPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteContinuousDeploymentPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteContinuousDeploymentPolicy"); 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 = addOpDeleteContinuousDeploymentPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteContinuousDeploymentPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteContinuousDeploymentPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteContinuousDeploymentPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteDistribution.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteDistribution.go new file mode 100644 index 0000000000..825e9e9c6a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteDistribution.go @@ -0,0 +1,192 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +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" +) + +// Delete a distribution. +func (c *Client) DeleteDistribution(ctx context.Context, params *DeleteDistributionInput, optFns ...func(*Options)) (*DeleteDistributionOutput, error) { + if params == nil { + params = &DeleteDistributionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteDistribution", params, optFns, c.addOperationDeleteDistributionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteDistributionOutput) + out.ResultMetadata = metadata + return out, nil +} + +// This action deletes a web distribution. To delete a web distribution using the +// CloudFront API, perform the following steps. +// +// To delete a web distribution using the CloudFront API: +// +// - Disable the web distribution +// +// - Submit a GET Distribution Config request to get the current configuration +// and the Etag header for the distribution. +// +// - Update the XML document that was returned in the response to your GET +// Distribution Config request to change the value of Enabled to false . +// +// - Submit a PUT Distribution Config request to update the configuration for +// your distribution. In the request body, include the XML document that you +// updated in Step 3. Set the value of the HTTP If-Match header to the value of +// the ETag header that CloudFront returned when you submitted the GET +// Distribution Config request in Step 2. +// +// - Review the response to the PUT Distribution Config request to confirm that +// the distribution was successfully disabled. +// +// - Submit a GET Distribution request to confirm that your changes have +// propagated. When propagation is complete, the value of Status is Deployed . +// +// - Submit a DELETE Distribution request. Set the value of the HTTP If-Match +// header to the value of the ETag header that CloudFront returned when you +// submitted the GET Distribution Config request in Step 6. +// +// - Review the response to your DELETE Distribution request to confirm that the +// distribution was successfully deleted. +// +// For information about deleting a distribution using the CloudFront console, see [Deleting a Distribution] +// in the Amazon CloudFront Developer Guide. +// +// [Deleting a Distribution]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/HowToDeleteDistribution.html +type DeleteDistributionInput struct { + + // The distribution ID. + // + // This member is required. + Id *string + + // The value of the ETag header that you received when you disabled the + // distribution. For example: E2QWRUHAPOMQZL . + IfMatch *string + + noSmithyDocumentSerde +} + +type DeleteDistributionOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteDistributionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteDistribution{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteDistribution{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteDistribution"); 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 = addOpDeleteDistributionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteDistribution(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteDistribution(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteDistribution", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteFieldLevelEncryptionConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteFieldLevelEncryptionConfig.go new file mode 100644 index 0000000000..5b124b24c6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteFieldLevelEncryptionConfig.go @@ -0,0 +1,156 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +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" +) + +// Remove a field-level encryption configuration. +func (c *Client) DeleteFieldLevelEncryptionConfig(ctx context.Context, params *DeleteFieldLevelEncryptionConfigInput, optFns ...func(*Options)) (*DeleteFieldLevelEncryptionConfigOutput, error) { + if params == nil { + params = &DeleteFieldLevelEncryptionConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteFieldLevelEncryptionConfig", params, optFns, c.addOperationDeleteFieldLevelEncryptionConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteFieldLevelEncryptionConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteFieldLevelEncryptionConfigInput struct { + + // The ID of the configuration you want to delete from CloudFront. + // + // This member is required. + Id *string + + // The value of the ETag header that you received when retrieving the + // configuration identity to delete. For example: E2QWRUHAPOMQZL . + IfMatch *string + + noSmithyDocumentSerde +} + +type DeleteFieldLevelEncryptionConfigOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteFieldLevelEncryptionConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteFieldLevelEncryptionConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteFieldLevelEncryptionConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteFieldLevelEncryptionConfig"); 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 = addOpDeleteFieldLevelEncryptionConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteFieldLevelEncryptionConfig(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteFieldLevelEncryptionConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteFieldLevelEncryptionConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteFieldLevelEncryptionProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteFieldLevelEncryptionProfile.go new file mode 100644 index 0000000000..ebb87f0754 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteFieldLevelEncryptionProfile.go @@ -0,0 +1,156 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +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" +) + +// Remove a field-level encryption profile. +func (c *Client) DeleteFieldLevelEncryptionProfile(ctx context.Context, params *DeleteFieldLevelEncryptionProfileInput, optFns ...func(*Options)) (*DeleteFieldLevelEncryptionProfileOutput, error) { + if params == nil { + params = &DeleteFieldLevelEncryptionProfileInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteFieldLevelEncryptionProfile", params, optFns, c.addOperationDeleteFieldLevelEncryptionProfileMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteFieldLevelEncryptionProfileOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteFieldLevelEncryptionProfileInput struct { + + // Request the ID of the profile you want to delete from CloudFront. + // + // This member is required. + Id *string + + // The value of the ETag header that you received when retrieving the profile to + // delete. For example: E2QWRUHAPOMQZL . + IfMatch *string + + noSmithyDocumentSerde +} + +type DeleteFieldLevelEncryptionProfileOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteFieldLevelEncryptionProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteFieldLevelEncryptionProfile{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteFieldLevelEncryptionProfile{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteFieldLevelEncryptionProfile"); 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 = addOpDeleteFieldLevelEncryptionProfileValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteFieldLevelEncryptionProfile(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteFieldLevelEncryptionProfile(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteFieldLevelEncryptionProfile", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteFunction.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteFunction.go new file mode 100644 index 0000000000..59c0c34666 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteFunction.go @@ -0,0 +1,165 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +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 CloudFront function. +// +// You cannot delete a function if it's associated with a cache behavior. First, +// update your distributions to remove the function association from all cache +// behaviors, then delete the function. +// +// To delete a function, you must provide the function's name and version ( ETag +// value). To get these values, you can use ListFunctions and DescribeFunction . +func (c *Client) DeleteFunction(ctx context.Context, params *DeleteFunctionInput, optFns ...func(*Options)) (*DeleteFunctionOutput, error) { + if params == nil { + params = &DeleteFunctionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteFunction", params, optFns, c.addOperationDeleteFunctionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteFunctionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteFunctionInput struct { + + // The current version ( ETag value) of the function that you are deleting, which + // you can get using DescribeFunction . + // + // This member is required. + IfMatch *string + + // The name of the function that you are deleting. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type DeleteFunctionOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteFunctionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteFunction{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteFunction{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteFunction"); 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 = addOpDeleteFunctionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteFunction(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteFunction(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteFunction", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteKeyGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteKeyGroup.go new file mode 100644 index 0000000000..94771513ff --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteKeyGroup.go @@ -0,0 +1,165 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +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 key group. +// +// You cannot delete a key group that is referenced in a cache behavior. First +// update your distributions to remove the key group from all cache behaviors, then +// delete the key group. +// +// To delete a key group, you must provide the key group's identifier and version. +// To get these values, use ListKeyGroups followed by GetKeyGroup or +// GetKeyGroupConfig . +func (c *Client) DeleteKeyGroup(ctx context.Context, params *DeleteKeyGroupInput, optFns ...func(*Options)) (*DeleteKeyGroupOutput, error) { + if params == nil { + params = &DeleteKeyGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteKeyGroup", params, optFns, c.addOperationDeleteKeyGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteKeyGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteKeyGroupInput struct { + + // The identifier of the key group that you are deleting. To get the identifier, + // use ListKeyGroups . + // + // This member is required. + Id *string + + // The version of the key group that you are deleting. The version is the key + // group's ETag value. To get the ETag , use GetKeyGroup or GetKeyGroupConfig . + IfMatch *string + + noSmithyDocumentSerde +} + +type DeleteKeyGroupOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteKeyGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteKeyGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteKeyGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteKeyGroup"); 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 = addOpDeleteKeyGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteKeyGroup(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteKeyGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteKeyGroup", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteKeyValueStore.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteKeyValueStore.go new file mode 100644 index 0000000000..2201051b20 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteKeyValueStore.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +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" +) + +// Specifies the key value store to delete. +func (c *Client) DeleteKeyValueStore(ctx context.Context, params *DeleteKeyValueStoreInput, optFns ...func(*Options)) (*DeleteKeyValueStoreOutput, error) { + if params == nil { + params = &DeleteKeyValueStoreInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteKeyValueStore", params, optFns, c.addOperationDeleteKeyValueStoreMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteKeyValueStoreOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteKeyValueStoreInput struct { + + // The key value store to delete, if a match occurs. + // + // This member is required. + IfMatch *string + + // The name of the key value store. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type DeleteKeyValueStoreOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteKeyValueStoreMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteKeyValueStore{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteKeyValueStore{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteKeyValueStore"); 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 = addOpDeleteKeyValueStoreValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteKeyValueStore(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteKeyValueStore(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteKeyValueStore", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteMonitoringSubscription.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteMonitoringSubscription.go new file mode 100644 index 0000000000..9ed68a0066 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteMonitoringSubscription.go @@ -0,0 +1,153 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +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" +) + +// Disables additional CloudWatch metrics for the specified CloudFront +// distribution. +func (c *Client) DeleteMonitoringSubscription(ctx context.Context, params *DeleteMonitoringSubscriptionInput, optFns ...func(*Options)) (*DeleteMonitoringSubscriptionOutput, error) { + if params == nil { + params = &DeleteMonitoringSubscriptionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteMonitoringSubscription", params, optFns, c.addOperationDeleteMonitoringSubscriptionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteMonitoringSubscriptionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteMonitoringSubscriptionInput struct { + + // The ID of the distribution that you are disabling metrics for. + // + // This member is required. + DistributionId *string + + noSmithyDocumentSerde +} + +type DeleteMonitoringSubscriptionOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteMonitoringSubscriptionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteMonitoringSubscription{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteMonitoringSubscription{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteMonitoringSubscription"); 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 = addOpDeleteMonitoringSubscriptionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteMonitoringSubscription(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteMonitoringSubscription(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteMonitoringSubscription", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteOriginAccessControl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteOriginAccessControl.go new file mode 100644 index 0000000000..3e94399b1d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteOriginAccessControl.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +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 CloudFront origin access control. +// +// You cannot delete an origin access control if it's in use. First, update all +// distributions to remove the origin access control from all origins, then delete +// the origin access control. +func (c *Client) DeleteOriginAccessControl(ctx context.Context, params *DeleteOriginAccessControlInput, optFns ...func(*Options)) (*DeleteOriginAccessControlOutput, error) { + if params == nil { + params = &DeleteOriginAccessControlInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteOriginAccessControl", params, optFns, c.addOperationDeleteOriginAccessControlMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteOriginAccessControlOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteOriginAccessControlInput struct { + + // The unique identifier of the origin access control that you are deleting. + // + // This member is required. + Id *string + + // The current version ( ETag value) of the origin access control that you are + // deleting. + IfMatch *string + + noSmithyDocumentSerde +} + +type DeleteOriginAccessControlOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteOriginAccessControlMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteOriginAccessControl{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteOriginAccessControl{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteOriginAccessControl"); 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 = addOpDeleteOriginAccessControlValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteOriginAccessControl(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteOriginAccessControl(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteOriginAccessControl", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteOriginRequestPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteOriginRequestPolicy.go new file mode 100644 index 0000000000..11cdf565f7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteOriginRequestPolicy.go @@ -0,0 +1,167 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +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 an origin request policy. +// +// You cannot delete an origin request policy if it's attached to any cache +// behaviors. First update your distributions to remove the origin request policy +// from all cache behaviors, then delete the origin request policy. +// +// To delete an origin request policy, you must provide the policy's identifier +// and version. To get the identifier, you can use ListOriginRequestPolicies or +// GetOriginRequestPolicy . +func (c *Client) DeleteOriginRequestPolicy(ctx context.Context, params *DeleteOriginRequestPolicyInput, optFns ...func(*Options)) (*DeleteOriginRequestPolicyOutput, error) { + if params == nil { + params = &DeleteOriginRequestPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteOriginRequestPolicy", params, optFns, c.addOperationDeleteOriginRequestPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteOriginRequestPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteOriginRequestPolicyInput struct { + + // The unique identifier for the origin request policy that you are deleting. To + // get the identifier, you can use ListOriginRequestPolicies . + // + // This member is required. + Id *string + + // The version of the origin request policy that you are deleting. The version is + // the origin request policy's ETag value, which you can get using + // ListOriginRequestPolicies , GetOriginRequestPolicy , or + // GetOriginRequestPolicyConfig . + IfMatch *string + + noSmithyDocumentSerde +} + +type DeleteOriginRequestPolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteOriginRequestPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteOriginRequestPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteOriginRequestPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteOriginRequestPolicy"); 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 = addOpDeleteOriginRequestPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteOriginRequestPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteOriginRequestPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteOriginRequestPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeletePublicKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeletePublicKey.go new file mode 100644 index 0000000000..13945148ae --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeletePublicKey.go @@ -0,0 +1,156 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +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" +) + +// Remove a public key you previously added to CloudFront. +func (c *Client) DeletePublicKey(ctx context.Context, params *DeletePublicKeyInput, optFns ...func(*Options)) (*DeletePublicKeyOutput, error) { + if params == nil { + params = &DeletePublicKeyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeletePublicKey", params, optFns, c.addOperationDeletePublicKeyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeletePublicKeyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeletePublicKeyInput struct { + + // The ID of the public key you want to remove from CloudFront. + // + // This member is required. + Id *string + + // The value of the ETag header that you received when retrieving the public key + // identity to delete. For example: E2QWRUHAPOMQZL . + IfMatch *string + + noSmithyDocumentSerde +} + +type DeletePublicKeyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeletePublicKeyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpDeletePublicKey{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeletePublicKey{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeletePublicKey"); 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 = addOpDeletePublicKeyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePublicKey(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeletePublicKey(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeletePublicKey", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteRealtimeLogConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteRealtimeLogConfig.go new file mode 100644 index 0000000000..4db10362cc --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteRealtimeLogConfig.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +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 real-time log configuration. +// +// You cannot delete a real-time log configuration if it's attached to a cache +// behavior. First update your distributions to remove the real-time log +// configuration from all cache behaviors, then delete the real-time log +// configuration. +// +// To delete a real-time log configuration, you can provide the configuration's +// name or its Amazon Resource Name (ARN). You must provide at least one. If you +// provide both, CloudFront uses the name to identify the real-time log +// configuration to delete. +func (c *Client) DeleteRealtimeLogConfig(ctx context.Context, params *DeleteRealtimeLogConfigInput, optFns ...func(*Options)) (*DeleteRealtimeLogConfigOutput, error) { + if params == nil { + params = &DeleteRealtimeLogConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteRealtimeLogConfig", params, optFns, c.addOperationDeleteRealtimeLogConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteRealtimeLogConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteRealtimeLogConfigInput struct { + + // The Amazon Resource Name (ARN) of the real-time log configuration to delete. + ARN *string + + // The name of the real-time log configuration to delete. + Name *string + + noSmithyDocumentSerde +} + +type DeleteRealtimeLogConfigOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteRealtimeLogConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteRealtimeLogConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteRealtimeLogConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteRealtimeLogConfig"); 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRealtimeLogConfig(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteRealtimeLogConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteRealtimeLogConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteResponseHeadersPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteResponseHeadersPolicy.go new file mode 100644 index 0000000000..77fcc6e330 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteResponseHeadersPolicy.go @@ -0,0 +1,169 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +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 response headers policy. +// +// You cannot delete a response headers policy if it's attached to a cache +// behavior. First update your distributions to remove the response headers policy +// from all cache behaviors, then delete the response headers policy. +// +// To delete a response headers policy, you must provide the policy's identifier +// and version. To get these values, you can use ListResponseHeadersPolicies or +// GetResponseHeadersPolicy . +func (c *Client) DeleteResponseHeadersPolicy(ctx context.Context, params *DeleteResponseHeadersPolicyInput, optFns ...func(*Options)) (*DeleteResponseHeadersPolicyOutput, error) { + if params == nil { + params = &DeleteResponseHeadersPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteResponseHeadersPolicy", params, optFns, c.addOperationDeleteResponseHeadersPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteResponseHeadersPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteResponseHeadersPolicyInput struct { + + // The identifier for the response headers policy that you are deleting. + // + // To get the identifier, you can use ListResponseHeadersPolicies . + // + // This member is required. + Id *string + + // The version of the response headers policy that you are deleting. + // + // The version is the response headers policy's ETag value, which you can get + // using ListResponseHeadersPolicies , GetResponseHeadersPolicy , or + // GetResponseHeadersPolicyConfig . + IfMatch *string + + noSmithyDocumentSerde +} + +type DeleteResponseHeadersPolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteResponseHeadersPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteResponseHeadersPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteResponseHeadersPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteResponseHeadersPolicy"); 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 = addOpDeleteResponseHeadersPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteResponseHeadersPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteResponseHeadersPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteResponseHeadersPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteStreamingDistribution.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteStreamingDistribution.go new file mode 100644 index 0000000000..8a4049b84d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DeleteStreamingDistribution.go @@ -0,0 +1,193 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +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" +) + +// Delete a streaming distribution. To delete an RTMP distribution using the +// CloudFront API, perform the following steps. +// +// To delete an RTMP distribution using the CloudFront API: +// +// - Disable the RTMP distribution. +// +// - Submit a GET Streaming Distribution Config request to get the current +// configuration and the Etag header for the distribution. +// +// - Update the XML document that was returned in the response to your GET +// Streaming Distribution Config request to change the value of Enabled to false . +// +// - Submit a PUT Streaming Distribution Config request to update the +// configuration for your distribution. In the request body, include the XML +// document that you updated in Step 3. Then set the value of the HTTP If-Match +// header to the value of the ETag header that CloudFront returned when you +// submitted the GET Streaming Distribution Config request in Step 2. +// +// - Review the response to the PUT Streaming Distribution Config request to +// confirm that the distribution was successfully disabled. +// +// - Submit a GET Streaming Distribution Config request to confirm that your +// changes have propagated. When propagation is complete, the value of Status is +// Deployed . +// +// - Submit a DELETE Streaming Distribution request. Set the value of the HTTP +// If-Match header to the value of the ETag header that CloudFront returned when +// you submitted the GET Streaming Distribution Config request in Step 2. +// +// - Review the response to your DELETE Streaming Distribution request to confirm +// that the distribution was successfully deleted. +// +// For information about deleting a distribution using the CloudFront console, see [Deleting a Distribution] +// in the Amazon CloudFront Developer Guide. +// +// [Deleting a Distribution]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/HowToDeleteDistribution.html +func (c *Client) DeleteStreamingDistribution(ctx context.Context, params *DeleteStreamingDistributionInput, optFns ...func(*Options)) (*DeleteStreamingDistributionOutput, error) { + if params == nil { + params = &DeleteStreamingDistributionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteStreamingDistribution", params, optFns, c.addOperationDeleteStreamingDistributionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteStreamingDistributionOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The request to delete a streaming distribution. +type DeleteStreamingDistributionInput struct { + + // The distribution ID. + // + // This member is required. + Id *string + + // The value of the ETag header that you received when you disabled the streaming + // distribution. For example: E2QWRUHAPOMQZL . + IfMatch *string + + noSmithyDocumentSerde +} + +type DeleteStreamingDistributionOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteStreamingDistributionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteStreamingDistribution{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteStreamingDistribution{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteStreamingDistribution"); 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 = addOpDeleteStreamingDistributionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteStreamingDistribution(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteStreamingDistribution(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteStreamingDistribution", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DescribeFunction.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DescribeFunction.go new file mode 100644 index 0000000000..558448cac4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DescribeFunction.go @@ -0,0 +1,168 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets configuration information and metadata about a CloudFront function, but +// not the function's code. To get a function's code, use GetFunction . +// +// To get configuration information and metadata about a function, you must +// provide the function's name and stage. To get these values, you can use +// ListFunctions . +func (c *Client) DescribeFunction(ctx context.Context, params *DescribeFunctionInput, optFns ...func(*Options)) (*DescribeFunctionOutput, error) { + if params == nil { + params = &DescribeFunctionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeFunction", params, optFns, c.addOperationDescribeFunctionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeFunctionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeFunctionInput struct { + + // The name of the function that you are getting information about. + // + // This member is required. + Name *string + + // The function's stage, either DEVELOPMENT or LIVE . + Stage types.FunctionStage + + noSmithyDocumentSerde +} + +type DescribeFunctionOutput struct { + + // The version identifier for the current version of the CloudFront function. + ETag *string + + // Contains configuration information and metadata about a CloudFront function. + FunctionSummary *types.FunctionSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeFunctionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpDescribeFunction{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDescribeFunction{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeFunction"); 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 = addOpDescribeFunctionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFunction(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeFunction(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeFunction", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DescribeKeyValueStore.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DescribeKeyValueStore.go new file mode 100644 index 0000000000..d84341d4a9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_DescribeKeyValueStore.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Specifies the key value store and its configuration. +func (c *Client) DescribeKeyValueStore(ctx context.Context, params *DescribeKeyValueStoreInput, optFns ...func(*Options)) (*DescribeKeyValueStoreOutput, error) { + if params == nil { + params = &DescribeKeyValueStoreInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeKeyValueStore", params, optFns, c.addOperationDescribeKeyValueStoreMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeKeyValueStoreOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeKeyValueStoreInput struct { + + // The name of the key value store. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type DescribeKeyValueStoreOutput struct { + + // The ETag of the resulting key value store. + ETag *string + + // The resulting key value store. + KeyValueStore *types.KeyValueStore + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeKeyValueStoreMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpDescribeKeyValueStore{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpDescribeKeyValueStore{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeKeyValueStore"); 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 = addOpDescribeKeyValueStoreValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeKeyValueStore(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeKeyValueStore(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeKeyValueStore", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetCachePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetCachePolicy.go new file mode 100644 index 0000000000..a093512b83 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetCachePolicy.go @@ -0,0 +1,173 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a cache policy, including the following metadata: +// +// - The policy's identifier. +// +// - The date and time when the policy was last modified. +// +// To get a cache policy, you must provide the policy's identifier. If the cache +// policy is attached to a distribution's cache behavior, you can get the policy's +// identifier using ListDistributions or GetDistribution . If the cache policy is +// not attached to a cache behavior, you can get the identifier using +// ListCachePolicies . +func (c *Client) GetCachePolicy(ctx context.Context, params *GetCachePolicyInput, optFns ...func(*Options)) (*GetCachePolicyOutput, error) { + if params == nil { + params = &GetCachePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetCachePolicy", params, optFns, c.addOperationGetCachePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetCachePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetCachePolicyInput struct { + + // The unique identifier for the cache policy. If the cache policy is attached to + // a distribution's cache behavior, you can get the policy's identifier using + // ListDistributions or GetDistribution . If the cache policy is not attached to a + // cache behavior, you can get the identifier using ListCachePolicies . + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type GetCachePolicyOutput struct { + + // The cache policy. + CachePolicy *types.CachePolicy + + // The current version of the cache policy. + ETag *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetCachePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetCachePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetCachePolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetCachePolicy"); 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 = addOpGetCachePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCachePolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetCachePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetCachePolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetCachePolicyConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetCachePolicyConfig.go new file mode 100644 index 0000000000..eb6fbaa88b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetCachePolicyConfig.go @@ -0,0 +1,169 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a cache policy configuration. +// +// To get a cache policy configuration, you must provide the policy's identifier. +// If the cache policy is attached to a distribution's cache behavior, you can get +// the policy's identifier using ListDistributions or GetDistribution . If the +// cache policy is not attached to a cache behavior, you can get the identifier +// using ListCachePolicies . +func (c *Client) GetCachePolicyConfig(ctx context.Context, params *GetCachePolicyConfigInput, optFns ...func(*Options)) (*GetCachePolicyConfigOutput, error) { + if params == nil { + params = &GetCachePolicyConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetCachePolicyConfig", params, optFns, c.addOperationGetCachePolicyConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetCachePolicyConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetCachePolicyConfigInput struct { + + // The unique identifier for the cache policy. If the cache policy is attached to + // a distribution's cache behavior, you can get the policy's identifier using + // ListDistributions or GetDistribution . If the cache policy is not attached to a + // cache behavior, you can get the identifier using ListCachePolicies . + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type GetCachePolicyConfigOutput struct { + + // The cache policy configuration. + CachePolicyConfig *types.CachePolicyConfig + + // The current version of the cache policy. + ETag *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetCachePolicyConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetCachePolicyConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetCachePolicyConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetCachePolicyConfig"); 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 = addOpGetCachePolicyConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCachePolicyConfig(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetCachePolicyConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetCachePolicyConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetCloudFrontOriginAccessIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetCloudFrontOriginAccessIdentity.go new file mode 100644 index 0000000000..c21699bb51 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetCloudFrontOriginAccessIdentity.go @@ -0,0 +1,163 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Get the information about an origin access identity. +func (c *Client) GetCloudFrontOriginAccessIdentity(ctx context.Context, params *GetCloudFrontOriginAccessIdentityInput, optFns ...func(*Options)) (*GetCloudFrontOriginAccessIdentityOutput, error) { + if params == nil { + params = &GetCloudFrontOriginAccessIdentityInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetCloudFrontOriginAccessIdentity", params, optFns, c.addOperationGetCloudFrontOriginAccessIdentityMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetCloudFrontOriginAccessIdentityOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The request to get an origin access identity's information. +type GetCloudFrontOriginAccessIdentityInput struct { + + // The identity's ID. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +// The returned result of the corresponding request. +type GetCloudFrontOriginAccessIdentityOutput struct { + + // The origin access identity's information. + CloudFrontOriginAccessIdentity *types.CloudFrontOriginAccessIdentity + + // The current version of the origin access identity's information. For example: + // E2QWRUHAPOMQZL . + ETag *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetCloudFrontOriginAccessIdentityMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetCloudFrontOriginAccessIdentity{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetCloudFrontOriginAccessIdentity{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetCloudFrontOriginAccessIdentity"); 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 = addOpGetCloudFrontOriginAccessIdentityValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCloudFrontOriginAccessIdentity(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetCloudFrontOriginAccessIdentity(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetCloudFrontOriginAccessIdentity", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetCloudFrontOriginAccessIdentityConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetCloudFrontOriginAccessIdentityConfig.go new file mode 100644 index 0000000000..99eb5bca94 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetCloudFrontOriginAccessIdentityConfig.go @@ -0,0 +1,165 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Get the configuration information about an origin access identity. +func (c *Client) GetCloudFrontOriginAccessIdentityConfig(ctx context.Context, params *GetCloudFrontOriginAccessIdentityConfigInput, optFns ...func(*Options)) (*GetCloudFrontOriginAccessIdentityConfigOutput, error) { + if params == nil { + params = &GetCloudFrontOriginAccessIdentityConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetCloudFrontOriginAccessIdentityConfig", params, optFns, c.addOperationGetCloudFrontOriginAccessIdentityConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetCloudFrontOriginAccessIdentityConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The origin access identity's configuration information. For more information, +// see [CloudFrontOriginAccessIdentityConfig]. +// +// [CloudFrontOriginAccessIdentityConfig]: https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_CloudFrontOriginAccessIdentityConfig.html +type GetCloudFrontOriginAccessIdentityConfigInput struct { + + // The identity's ID. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +// The returned result of the corresponding request. +type GetCloudFrontOriginAccessIdentityConfigOutput struct { + + // The origin access identity's configuration information. + CloudFrontOriginAccessIdentityConfig *types.CloudFrontOriginAccessIdentityConfig + + // The current version of the configuration. For example: E2QWRUHAPOMQZL . + ETag *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetCloudFrontOriginAccessIdentityConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetCloudFrontOriginAccessIdentityConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetCloudFrontOriginAccessIdentityConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetCloudFrontOriginAccessIdentityConfig"); 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 = addOpGetCloudFrontOriginAccessIdentityConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCloudFrontOriginAccessIdentityConfig(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetCloudFrontOriginAccessIdentityConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetCloudFrontOriginAccessIdentityConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetContinuousDeploymentPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetContinuousDeploymentPolicy.go new file mode 100644 index 0000000000..d0a5d966bd --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetContinuousDeploymentPolicy.go @@ -0,0 +1,162 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a continuous deployment policy, including metadata (the policy's +// identifier and the date and time when the policy was last modified). +func (c *Client) GetContinuousDeploymentPolicy(ctx context.Context, params *GetContinuousDeploymentPolicyInput, optFns ...func(*Options)) (*GetContinuousDeploymentPolicyOutput, error) { + if params == nil { + params = &GetContinuousDeploymentPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetContinuousDeploymentPolicy", params, optFns, c.addOperationGetContinuousDeploymentPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetContinuousDeploymentPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetContinuousDeploymentPolicyInput struct { + + // The identifier of the continuous deployment policy that you are getting. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type GetContinuousDeploymentPolicyOutput struct { + + // A continuous deployment policy. + ContinuousDeploymentPolicy *types.ContinuousDeploymentPolicy + + // The version identifier for the current version of the continuous deployment + // policy. + ETag *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetContinuousDeploymentPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetContinuousDeploymentPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetContinuousDeploymentPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetContinuousDeploymentPolicy"); 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 = addOpGetContinuousDeploymentPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetContinuousDeploymentPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetContinuousDeploymentPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetContinuousDeploymentPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetContinuousDeploymentPolicyConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetContinuousDeploymentPolicyConfig.go new file mode 100644 index 0000000000..61df01be38 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetContinuousDeploymentPolicyConfig.go @@ -0,0 +1,162 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets configuration information about a continuous deployment policy. +func (c *Client) GetContinuousDeploymentPolicyConfig(ctx context.Context, params *GetContinuousDeploymentPolicyConfigInput, optFns ...func(*Options)) (*GetContinuousDeploymentPolicyConfigOutput, error) { + if params == nil { + params = &GetContinuousDeploymentPolicyConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetContinuousDeploymentPolicyConfig", params, optFns, c.addOperationGetContinuousDeploymentPolicyConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetContinuousDeploymentPolicyConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetContinuousDeploymentPolicyConfigInput struct { + + // The identifier of the continuous deployment policy whose configuration you are + // getting. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type GetContinuousDeploymentPolicyConfigOutput struct { + + // Contains the configuration for a continuous deployment policy. + ContinuousDeploymentPolicyConfig *types.ContinuousDeploymentPolicyConfig + + // The version identifier for the current version of the continuous deployment + // policy. + ETag *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetContinuousDeploymentPolicyConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetContinuousDeploymentPolicyConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetContinuousDeploymentPolicyConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetContinuousDeploymentPolicyConfig"); 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 = addOpGetContinuousDeploymentPolicyConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetContinuousDeploymentPolicyConfig(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetContinuousDeploymentPolicyConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetContinuousDeploymentPolicyConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetDistribution.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetDistribution.go new file mode 100644 index 0000000000..5c04506451 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetDistribution.go @@ -0,0 +1,357 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" + smithywaiter "github.com/aws/smithy-go/waiter" + jmespath "github.com/jmespath/go-jmespath" + "time" +) + +// Get the information about a distribution. +func (c *Client) GetDistribution(ctx context.Context, params *GetDistributionInput, optFns ...func(*Options)) (*GetDistributionOutput, error) { + if params == nil { + params = &GetDistributionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetDistribution", params, optFns, c.addOperationGetDistributionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetDistributionOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The request to get a distribution's information. +type GetDistributionInput struct { + + // The distribution's ID. If the ID is empty, an empty distribution configuration + // is returned. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +// The returned result of the corresponding request. +type GetDistributionOutput struct { + + // The distribution's information. + Distribution *types.Distribution + + // The current version of the distribution's information. For example: + // E2QWRUHAPOMQZL . + ETag *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetDistributionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetDistribution{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetDistribution{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetDistribution"); 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 = addOpGetDistributionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDistribution(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// DistributionDeployedWaiterOptions are waiter options for +// DistributionDeployedWaiter +type DistributionDeployedWaiterOptions 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. + // + // Passing options here is functionally equivalent to passing values to this + // config's ClientOptions field that extend the inner client's APIOptions directly. + APIOptions []func(*middleware.Stack) error + + // Functional options to be passed to all operations invoked by this client. + // + // Function values that modify the inner APIOptions are applied after the waiter + // config's own APIOptions modifiers. + ClientOptions []func(*Options) + + // MinDelay is the minimum amount of time to delay between retries. If unset, + // DistributionDeployedWaiter will use default minimum delay of 60 seconds. Note + // that MinDelay must resolve to a value lesser than or equal to the MaxDelay. + MinDelay time.Duration + + // MaxDelay is the maximum amount of time to delay between retries. If unset or + // set to zero, DistributionDeployedWaiter will use default max delay of 120 + // seconds. Note that MaxDelay must resolve to value greater than or equal to the + // MinDelay. + MaxDelay time.Duration + + // LogWaitAttempts is used to enable logging for waiter retry attempts + LogWaitAttempts bool + + // Retryable is function that can be used to override the service defined + // waiter-behavior based on operation output, or returned error. This function is + // used by the waiter to decide if a state is retryable or a terminal state. + // + // By default service-modeled logic will populate this option. This option can + // thus be used to define a custom waiter state with fall-back to service-modeled + // waiter state mutators.The function returns an error in case of a failure state. + // In case of retry state, this function returns a bool value of true and nil + // error, while in case of success it returns a bool value of false and nil error. + Retryable func(context.Context, *GetDistributionInput, *GetDistributionOutput, error) (bool, error) +} + +// DistributionDeployedWaiter defines the waiters for DistributionDeployed +type DistributionDeployedWaiter struct { + client GetDistributionAPIClient + + options DistributionDeployedWaiterOptions +} + +// NewDistributionDeployedWaiter constructs a DistributionDeployedWaiter. +func NewDistributionDeployedWaiter(client GetDistributionAPIClient, optFns ...func(*DistributionDeployedWaiterOptions)) *DistributionDeployedWaiter { + options := DistributionDeployedWaiterOptions{} + options.MinDelay = 60 * time.Second + options.MaxDelay = 120 * time.Second + options.Retryable = distributionDeployedStateRetryable + + for _, fn := range optFns { + fn(&options) + } + return &DistributionDeployedWaiter{ + client: client, + options: options, + } +} + +// Wait calls the waiter function for DistributionDeployed waiter. The maxWaitDur +// is the maximum wait duration the waiter will wait. The maxWaitDur is required +// and must be greater than zero. +func (w *DistributionDeployedWaiter) Wait(ctx context.Context, params *GetDistributionInput, maxWaitDur time.Duration, optFns ...func(*DistributionDeployedWaiterOptions)) error { + _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) + return err +} + +// WaitForOutput calls the waiter function for DistributionDeployed waiter and +// returns the output of the successful operation. The maxWaitDur is the maximum +// wait duration the waiter will wait. The maxWaitDur is required and must be +// greater than zero. +func (w *DistributionDeployedWaiter) WaitForOutput(ctx context.Context, params *GetDistributionInput, maxWaitDur time.Duration, optFns ...func(*DistributionDeployedWaiterOptions)) (*GetDistributionOutput, error) { + if maxWaitDur <= 0 { + return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") + } + + options := w.options + for _, fn := range optFns { + fn(&options) + } + + if options.MaxDelay <= 0 { + options.MaxDelay = 120 * time.Second + } + + if options.MinDelay > options.MaxDelay { + return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) + } + + ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) + defer cancelFn() + + logger := smithywaiter.Logger{} + remainingTime := maxWaitDur + + var attempt int64 + for { + + attempt++ + apiOptions := options.APIOptions + start := time.Now() + + if options.LogWaitAttempts { + logger.Attempt = attempt + apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) + apiOptions = append(apiOptions, logger.AddLogger) + } + + out, err := w.client.GetDistribution(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } + o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } + for _, opt := range options.ClientOptions { + opt(o) + } + }) + + retryable, err := options.Retryable(ctx, params, out, err) + if err != nil { + return nil, err + } + if !retryable { + return out, nil + } + + remainingTime -= time.Since(start) + if remainingTime < options.MinDelay || remainingTime <= 0 { + break + } + + // compute exponential backoff between waiter retries + delay, err := smithywaiter.ComputeDelay( + attempt, options.MinDelay, options.MaxDelay, remainingTime, + ) + if err != nil { + return nil, fmt.Errorf("error computing waiter delay, %w", err) + } + + remainingTime -= delay + // sleep for the delay amount before invoking a request + if err := smithytime.SleepWithContext(ctx, delay); err != nil { + return nil, fmt.Errorf("request cancelled while waiting, %w", err) + } + } + return nil, fmt.Errorf("exceeded max wait time for DistributionDeployed waiter") +} + +func distributionDeployedStateRetryable(ctx context.Context, input *GetDistributionInput, output *GetDistributionOutput, err error) (bool, error) { + + if err == nil { + pathValue, err := jmespath.Search("Distribution.Status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "Deployed" + value, ok := pathValue.(*string) + if !ok { + return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) + } + + if string(*value) == expectedValue { + return false, nil + } + } + + return true, nil +} + +// GetDistributionAPIClient is a client that implements the GetDistribution +// operation. +type GetDistributionAPIClient interface { + GetDistribution(context.Context, *GetDistributionInput, ...func(*Options)) (*GetDistributionOutput, error) +} + +var _ GetDistributionAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opGetDistribution(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetDistribution", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetDistributionConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetDistributionConfig.go new file mode 100644 index 0000000000..c8798ca5e8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetDistributionConfig.go @@ -0,0 +1,163 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Get the configuration information about a distribution. +func (c *Client) GetDistributionConfig(ctx context.Context, params *GetDistributionConfigInput, optFns ...func(*Options)) (*GetDistributionConfigOutput, error) { + if params == nil { + params = &GetDistributionConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetDistributionConfig", params, optFns, c.addOperationGetDistributionConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetDistributionConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The request to get a distribution configuration. +type GetDistributionConfigInput struct { + + // The distribution's ID. If the ID is empty, an empty distribution configuration + // is returned. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +// The returned result of the corresponding request. +type GetDistributionConfigOutput struct { + + // The distribution's configuration information. + DistributionConfig *types.DistributionConfig + + // The current version of the configuration. For example: E2QWRUHAPOMQZL . + ETag *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetDistributionConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetDistributionConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetDistributionConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetDistributionConfig"); 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 = addOpGetDistributionConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDistributionConfig(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetDistributionConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetDistributionConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetFieldLevelEncryption.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetFieldLevelEncryption.go new file mode 100644 index 0000000000..144cb735f2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetFieldLevelEncryption.go @@ -0,0 +1,161 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Get the field-level encryption configuration information. +func (c *Client) GetFieldLevelEncryption(ctx context.Context, params *GetFieldLevelEncryptionInput, optFns ...func(*Options)) (*GetFieldLevelEncryptionOutput, error) { + if params == nil { + params = &GetFieldLevelEncryptionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetFieldLevelEncryption", params, optFns, c.addOperationGetFieldLevelEncryptionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetFieldLevelEncryptionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetFieldLevelEncryptionInput struct { + + // Request the ID for the field-level encryption configuration information. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type GetFieldLevelEncryptionOutput struct { + + // The current version of the field level encryption configuration. For example: + // E2QWRUHAPOMQZL . + ETag *string + + // Return the field-level encryption configuration information. + FieldLevelEncryption *types.FieldLevelEncryption + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetFieldLevelEncryptionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetFieldLevelEncryption{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetFieldLevelEncryption{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetFieldLevelEncryption"); 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 = addOpGetFieldLevelEncryptionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFieldLevelEncryption(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetFieldLevelEncryption(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetFieldLevelEncryption", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetFieldLevelEncryptionConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetFieldLevelEncryptionConfig.go new file mode 100644 index 0000000000..a69934ff9e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetFieldLevelEncryptionConfig.go @@ -0,0 +1,161 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Get the field-level encryption configuration information. +func (c *Client) GetFieldLevelEncryptionConfig(ctx context.Context, params *GetFieldLevelEncryptionConfigInput, optFns ...func(*Options)) (*GetFieldLevelEncryptionConfigOutput, error) { + if params == nil { + params = &GetFieldLevelEncryptionConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetFieldLevelEncryptionConfig", params, optFns, c.addOperationGetFieldLevelEncryptionConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetFieldLevelEncryptionConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetFieldLevelEncryptionConfigInput struct { + + // Request the ID for the field-level encryption configuration information. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type GetFieldLevelEncryptionConfigOutput struct { + + // The current version of the field level encryption configuration. For example: + // E2QWRUHAPOMQZL . + ETag *string + + // Return the field-level encryption configuration information. + FieldLevelEncryptionConfig *types.FieldLevelEncryptionConfig + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetFieldLevelEncryptionConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetFieldLevelEncryptionConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetFieldLevelEncryptionConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetFieldLevelEncryptionConfig"); 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 = addOpGetFieldLevelEncryptionConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFieldLevelEncryptionConfig(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetFieldLevelEncryptionConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetFieldLevelEncryptionConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetFieldLevelEncryptionProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetFieldLevelEncryptionProfile.go new file mode 100644 index 0000000000..3f564f3a6c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetFieldLevelEncryptionProfile.go @@ -0,0 +1,161 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Get the field-level encryption profile information. +func (c *Client) GetFieldLevelEncryptionProfile(ctx context.Context, params *GetFieldLevelEncryptionProfileInput, optFns ...func(*Options)) (*GetFieldLevelEncryptionProfileOutput, error) { + if params == nil { + params = &GetFieldLevelEncryptionProfileInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetFieldLevelEncryptionProfile", params, optFns, c.addOperationGetFieldLevelEncryptionProfileMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetFieldLevelEncryptionProfileOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetFieldLevelEncryptionProfileInput struct { + + // Get the ID for the field-level encryption profile information. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type GetFieldLevelEncryptionProfileOutput struct { + + // The current version of the field level encryption profile. For example: + // E2QWRUHAPOMQZL . + ETag *string + + // Return the field-level encryption profile information. + FieldLevelEncryptionProfile *types.FieldLevelEncryptionProfile + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetFieldLevelEncryptionProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetFieldLevelEncryptionProfile{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetFieldLevelEncryptionProfile{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetFieldLevelEncryptionProfile"); 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 = addOpGetFieldLevelEncryptionProfileValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFieldLevelEncryptionProfile(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetFieldLevelEncryptionProfile(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetFieldLevelEncryptionProfile", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetFieldLevelEncryptionProfileConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetFieldLevelEncryptionProfileConfig.go new file mode 100644 index 0000000000..a75ecef90c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetFieldLevelEncryptionProfileConfig.go @@ -0,0 +1,161 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Get the field-level encryption profile configuration information. +func (c *Client) GetFieldLevelEncryptionProfileConfig(ctx context.Context, params *GetFieldLevelEncryptionProfileConfigInput, optFns ...func(*Options)) (*GetFieldLevelEncryptionProfileConfigOutput, error) { + if params == nil { + params = &GetFieldLevelEncryptionProfileConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetFieldLevelEncryptionProfileConfig", params, optFns, c.addOperationGetFieldLevelEncryptionProfileConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetFieldLevelEncryptionProfileConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetFieldLevelEncryptionProfileConfigInput struct { + + // Get the ID for the field-level encryption profile configuration information. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type GetFieldLevelEncryptionProfileConfigOutput struct { + + // The current version of the field-level encryption profile configuration result. + // For example: E2QWRUHAPOMQZL . + ETag *string + + // Return the field-level encryption profile configuration information. + FieldLevelEncryptionProfileConfig *types.FieldLevelEncryptionProfileConfig + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetFieldLevelEncryptionProfileConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetFieldLevelEncryptionProfileConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetFieldLevelEncryptionProfileConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetFieldLevelEncryptionProfileConfig"); 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 = addOpGetFieldLevelEncryptionProfileConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFieldLevelEncryptionProfileConfig(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetFieldLevelEncryptionProfileConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetFieldLevelEncryptionProfileConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetFunction.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetFunction.go new file mode 100644 index 0000000000..e473706fed --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetFunction.go @@ -0,0 +1,170 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets the code of a CloudFront function. To get configuration information and +// metadata about a function, use DescribeFunction . +// +// To get a function's code, you must provide the function's name and stage. To +// get these values, you can use ListFunctions . +func (c *Client) GetFunction(ctx context.Context, params *GetFunctionInput, optFns ...func(*Options)) (*GetFunctionOutput, error) { + if params == nil { + params = &GetFunctionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetFunction", params, optFns, c.addOperationGetFunctionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetFunctionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetFunctionInput struct { + + // The name of the function whose code you are getting. + // + // This member is required. + Name *string + + // The function's stage, either DEVELOPMENT or LIVE . + Stage types.FunctionStage + + noSmithyDocumentSerde +} + +type GetFunctionOutput struct { + + // The content type (media type) of the response. + ContentType *string + + // The version identifier for the current version of the CloudFront function. + ETag *string + + // The function code of a CloudFront function. + FunctionCode []byte + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetFunctionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetFunction{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetFunction{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetFunction"); 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 = addOpGetFunctionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFunction(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetFunction(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetFunction", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetInvalidation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetInvalidation.go new file mode 100644 index 0000000000..ae4ce5e173 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetInvalidation.go @@ -0,0 +1,359 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" + smithywaiter "github.com/aws/smithy-go/waiter" + jmespath "github.com/jmespath/go-jmespath" + "time" +) + +// Get the information about an invalidation. +func (c *Client) GetInvalidation(ctx context.Context, params *GetInvalidationInput, optFns ...func(*Options)) (*GetInvalidationOutput, error) { + if params == nil { + params = &GetInvalidationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetInvalidation", params, optFns, c.addOperationGetInvalidationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetInvalidationOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The request to get an invalidation's information. +type GetInvalidationInput struct { + + // The distribution's ID. + // + // This member is required. + DistributionId *string + + // The identifier for the invalidation request, for example, IDFDVBD632BHDS5 . + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +// The returned result of the corresponding request. +type GetInvalidationOutput struct { + + // The invalidation's information. For more information, see [Invalidation Complex Type]. + // + // [Invalidation Complex Type]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/InvalidationDatatype.html + Invalidation *types.Invalidation + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetInvalidationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetInvalidation{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetInvalidation{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetInvalidation"); 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 = addOpGetInvalidationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetInvalidation(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// InvalidationCompletedWaiterOptions are waiter options for +// InvalidationCompletedWaiter +type InvalidationCompletedWaiterOptions 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. + // + // Passing options here is functionally equivalent to passing values to this + // config's ClientOptions field that extend the inner client's APIOptions directly. + APIOptions []func(*middleware.Stack) error + + // Functional options to be passed to all operations invoked by this client. + // + // Function values that modify the inner APIOptions are applied after the waiter + // config's own APIOptions modifiers. + ClientOptions []func(*Options) + + // MinDelay is the minimum amount of time to delay between retries. If unset, + // InvalidationCompletedWaiter will use default minimum delay of 20 seconds. Note + // that MinDelay must resolve to a value lesser than or equal to the MaxDelay. + MinDelay time.Duration + + // MaxDelay is the maximum amount of time to delay between retries. If unset or + // set to zero, InvalidationCompletedWaiter will use default max delay of 120 + // seconds. Note that MaxDelay must resolve to value greater than or equal to the + // MinDelay. + MaxDelay time.Duration + + // LogWaitAttempts is used to enable logging for waiter retry attempts + LogWaitAttempts bool + + // Retryable is function that can be used to override the service defined + // waiter-behavior based on operation output, or returned error. This function is + // used by the waiter to decide if a state is retryable or a terminal state. + // + // By default service-modeled logic will populate this option. This option can + // thus be used to define a custom waiter state with fall-back to service-modeled + // waiter state mutators.The function returns an error in case of a failure state. + // In case of retry state, this function returns a bool value of true and nil + // error, while in case of success it returns a bool value of false and nil error. + Retryable func(context.Context, *GetInvalidationInput, *GetInvalidationOutput, error) (bool, error) +} + +// InvalidationCompletedWaiter defines the waiters for InvalidationCompleted +type InvalidationCompletedWaiter struct { + client GetInvalidationAPIClient + + options InvalidationCompletedWaiterOptions +} + +// NewInvalidationCompletedWaiter constructs a InvalidationCompletedWaiter. +func NewInvalidationCompletedWaiter(client GetInvalidationAPIClient, optFns ...func(*InvalidationCompletedWaiterOptions)) *InvalidationCompletedWaiter { + options := InvalidationCompletedWaiterOptions{} + options.MinDelay = 20 * time.Second + options.MaxDelay = 120 * time.Second + options.Retryable = invalidationCompletedStateRetryable + + for _, fn := range optFns { + fn(&options) + } + return &InvalidationCompletedWaiter{ + client: client, + options: options, + } +} + +// Wait calls the waiter function for InvalidationCompleted waiter. The maxWaitDur +// is the maximum wait duration the waiter will wait. The maxWaitDur is required +// and must be greater than zero. +func (w *InvalidationCompletedWaiter) Wait(ctx context.Context, params *GetInvalidationInput, maxWaitDur time.Duration, optFns ...func(*InvalidationCompletedWaiterOptions)) error { + _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) + return err +} + +// WaitForOutput calls the waiter function for InvalidationCompleted waiter and +// returns the output of the successful operation. The maxWaitDur is the maximum +// wait duration the waiter will wait. The maxWaitDur is required and must be +// greater than zero. +func (w *InvalidationCompletedWaiter) WaitForOutput(ctx context.Context, params *GetInvalidationInput, maxWaitDur time.Duration, optFns ...func(*InvalidationCompletedWaiterOptions)) (*GetInvalidationOutput, error) { + if maxWaitDur <= 0 { + return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") + } + + options := w.options + for _, fn := range optFns { + fn(&options) + } + + if options.MaxDelay <= 0 { + options.MaxDelay = 120 * time.Second + } + + if options.MinDelay > options.MaxDelay { + return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) + } + + ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) + defer cancelFn() + + logger := smithywaiter.Logger{} + remainingTime := maxWaitDur + + var attempt int64 + for { + + attempt++ + apiOptions := options.APIOptions + start := time.Now() + + if options.LogWaitAttempts { + logger.Attempt = attempt + apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) + apiOptions = append(apiOptions, logger.AddLogger) + } + + out, err := w.client.GetInvalidation(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } + o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } + for _, opt := range options.ClientOptions { + opt(o) + } + }) + + retryable, err := options.Retryable(ctx, params, out, err) + if err != nil { + return nil, err + } + if !retryable { + return out, nil + } + + remainingTime -= time.Since(start) + if remainingTime < options.MinDelay || remainingTime <= 0 { + break + } + + // compute exponential backoff between waiter retries + delay, err := smithywaiter.ComputeDelay( + attempt, options.MinDelay, options.MaxDelay, remainingTime, + ) + if err != nil { + return nil, fmt.Errorf("error computing waiter delay, %w", err) + } + + remainingTime -= delay + // sleep for the delay amount before invoking a request + if err := smithytime.SleepWithContext(ctx, delay); err != nil { + return nil, fmt.Errorf("request cancelled while waiting, %w", err) + } + } + return nil, fmt.Errorf("exceeded max wait time for InvalidationCompleted waiter") +} + +func invalidationCompletedStateRetryable(ctx context.Context, input *GetInvalidationInput, output *GetInvalidationOutput, err error) (bool, error) { + + if err == nil { + pathValue, err := jmespath.Search("Invalidation.Status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "Completed" + value, ok := pathValue.(*string) + if !ok { + return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) + } + + if string(*value) == expectedValue { + return false, nil + } + } + + return true, nil +} + +// GetInvalidationAPIClient is a client that implements the GetInvalidation +// operation. +type GetInvalidationAPIClient interface { + GetInvalidation(context.Context, *GetInvalidationInput, ...func(*Options)) (*GetInvalidationOutput, error) +} + +var _ GetInvalidationAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opGetInvalidation(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetInvalidation", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetKeyGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetKeyGroup.go new file mode 100644 index 0000000000..f707f07d5b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetKeyGroup.go @@ -0,0 +1,168 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a key group, including the date and time when the key group was last +// modified. +// +// To get a key group, you must provide the key group's identifier. If the key +// group is referenced in a distribution's cache behavior, you can get the key +// group's identifier using ListDistributions or GetDistribution . If the key group +// is not referenced in a cache behavior, you can get the identifier using +// ListKeyGroups . +func (c *Client) GetKeyGroup(ctx context.Context, params *GetKeyGroupInput, optFns ...func(*Options)) (*GetKeyGroupOutput, error) { + if params == nil { + params = &GetKeyGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetKeyGroup", params, optFns, c.addOperationGetKeyGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetKeyGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetKeyGroupInput struct { + + // The identifier of the key group that you are getting. To get the identifier, + // use ListKeyGroups . + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type GetKeyGroupOutput struct { + + // The identifier for this version of the key group. + ETag *string + + // The key group. + KeyGroup *types.KeyGroup + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetKeyGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetKeyGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetKeyGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetKeyGroup"); 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 = addOpGetKeyGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetKeyGroup(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetKeyGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetKeyGroup", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetKeyGroupConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetKeyGroupConfig.go new file mode 100644 index 0000000000..be485a1c22 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetKeyGroupConfig.go @@ -0,0 +1,167 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a key group configuration. +// +// To get a key group configuration, you must provide the key group's identifier. +// If the key group is referenced in a distribution's cache behavior, you can get +// the key group's identifier using ListDistributions or GetDistribution . If the +// key group is not referenced in a cache behavior, you can get the identifier +// using ListKeyGroups . +func (c *Client) GetKeyGroupConfig(ctx context.Context, params *GetKeyGroupConfigInput, optFns ...func(*Options)) (*GetKeyGroupConfigOutput, error) { + if params == nil { + params = &GetKeyGroupConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetKeyGroupConfig", params, optFns, c.addOperationGetKeyGroupConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetKeyGroupConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetKeyGroupConfigInput struct { + + // The identifier of the key group whose configuration you are getting. To get the + // identifier, use ListKeyGroups . + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type GetKeyGroupConfigOutput struct { + + // The identifier for this version of the key group. + ETag *string + + // The key group configuration. + KeyGroupConfig *types.KeyGroupConfig + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetKeyGroupConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetKeyGroupConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetKeyGroupConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetKeyGroupConfig"); 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 = addOpGetKeyGroupConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetKeyGroupConfig(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetKeyGroupConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetKeyGroupConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetMonitoringSubscription.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetMonitoringSubscription.go new file mode 100644 index 0000000000..7537dfda4b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetMonitoringSubscription.go @@ -0,0 +1,159 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets information about whether additional CloudWatch metrics are enabled for +// the specified CloudFront distribution. +func (c *Client) GetMonitoringSubscription(ctx context.Context, params *GetMonitoringSubscriptionInput, optFns ...func(*Options)) (*GetMonitoringSubscriptionOutput, error) { + if params == nil { + params = &GetMonitoringSubscriptionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetMonitoringSubscription", params, optFns, c.addOperationGetMonitoringSubscriptionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetMonitoringSubscriptionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetMonitoringSubscriptionInput struct { + + // The ID of the distribution that you are getting metrics information for. + // + // This member is required. + DistributionId *string + + noSmithyDocumentSerde +} + +type GetMonitoringSubscriptionOutput struct { + + // A monitoring subscription. This structure contains information about whether + // additional CloudWatch metrics are enabled for a given CloudFront distribution. + MonitoringSubscription *types.MonitoringSubscription + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetMonitoringSubscriptionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetMonitoringSubscription{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetMonitoringSubscription{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetMonitoringSubscription"); 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 = addOpGetMonitoringSubscriptionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMonitoringSubscription(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetMonitoringSubscription(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetMonitoringSubscription", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetOriginAccessControl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetOriginAccessControl.go new file mode 100644 index 0000000000..9fd8a44a70 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetOriginAccessControl.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a CloudFront origin access control, including its unique identifier. +func (c *Client) GetOriginAccessControl(ctx context.Context, params *GetOriginAccessControlInput, optFns ...func(*Options)) (*GetOriginAccessControlOutput, error) { + if params == nil { + params = &GetOriginAccessControlInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetOriginAccessControl", params, optFns, c.addOperationGetOriginAccessControlMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetOriginAccessControlOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetOriginAccessControlInput struct { + + // The unique identifier of the origin access control. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type GetOriginAccessControlOutput struct { + + // The version identifier for the current version of the origin access control. + ETag *string + + // Contains an origin access control, including its unique identifier. + OriginAccessControl *types.OriginAccessControl + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetOriginAccessControlMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetOriginAccessControl{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetOriginAccessControl{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetOriginAccessControl"); 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 = addOpGetOriginAccessControlValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetOriginAccessControl(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetOriginAccessControl(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetOriginAccessControl", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetOriginAccessControlConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetOriginAccessControlConfig.go new file mode 100644 index 0000000000..c79c7ee2bd --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetOriginAccessControlConfig.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a CloudFront origin access control configuration. +func (c *Client) GetOriginAccessControlConfig(ctx context.Context, params *GetOriginAccessControlConfigInput, optFns ...func(*Options)) (*GetOriginAccessControlConfigOutput, error) { + if params == nil { + params = &GetOriginAccessControlConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetOriginAccessControlConfig", params, optFns, c.addOperationGetOriginAccessControlConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetOriginAccessControlConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetOriginAccessControlConfigInput struct { + + // The unique identifier of the origin access control. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type GetOriginAccessControlConfigOutput struct { + + // The version identifier for the current version of the origin access control. + ETag *string + + // Contains an origin access control configuration. + OriginAccessControlConfig *types.OriginAccessControlConfig + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetOriginAccessControlConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetOriginAccessControlConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetOriginAccessControlConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetOriginAccessControlConfig"); 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 = addOpGetOriginAccessControlConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetOriginAccessControlConfig(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetOriginAccessControlConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetOriginAccessControlConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetOriginRequestPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetOriginRequestPolicy.go new file mode 100644 index 0000000000..d7f37a7658 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetOriginRequestPolicy.go @@ -0,0 +1,174 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets an origin request policy, including the following metadata: +// +// - The policy's identifier. +// +// - The date and time when the policy was last modified. +// +// To get an origin request policy, you must provide the policy's identifier. If +// the origin request policy is attached to a distribution's cache behavior, you +// can get the policy's identifier using ListDistributions or GetDistribution . If +// the origin request policy is not attached to a cache behavior, you can get the +// identifier using ListOriginRequestPolicies . +func (c *Client) GetOriginRequestPolicy(ctx context.Context, params *GetOriginRequestPolicyInput, optFns ...func(*Options)) (*GetOriginRequestPolicyOutput, error) { + if params == nil { + params = &GetOriginRequestPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetOriginRequestPolicy", params, optFns, c.addOperationGetOriginRequestPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetOriginRequestPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetOriginRequestPolicyInput struct { + + // The unique identifier for the origin request policy. If the origin request + // policy is attached to a distribution's cache behavior, you can get the policy's + // identifier using ListDistributions or GetDistribution . If the origin request + // policy is not attached to a cache behavior, you can get the identifier using + // ListOriginRequestPolicies . + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type GetOriginRequestPolicyOutput struct { + + // The current version of the origin request policy. + ETag *string + + // The origin request policy. + OriginRequestPolicy *types.OriginRequestPolicy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetOriginRequestPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetOriginRequestPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetOriginRequestPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetOriginRequestPolicy"); 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 = addOpGetOriginRequestPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetOriginRequestPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetOriginRequestPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetOriginRequestPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetOriginRequestPolicyConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetOriginRequestPolicyConfig.go new file mode 100644 index 0000000000..be86fdc6c3 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetOriginRequestPolicyConfig.go @@ -0,0 +1,170 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets an origin request policy configuration. +// +// To get an origin request policy configuration, you must provide the policy's +// identifier. If the origin request policy is attached to a distribution's cache +// behavior, you can get the policy's identifier using ListDistributions or +// GetDistribution . If the origin request policy is not attached to a cache +// behavior, you can get the identifier using ListOriginRequestPolicies . +func (c *Client) GetOriginRequestPolicyConfig(ctx context.Context, params *GetOriginRequestPolicyConfigInput, optFns ...func(*Options)) (*GetOriginRequestPolicyConfigOutput, error) { + if params == nil { + params = &GetOriginRequestPolicyConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetOriginRequestPolicyConfig", params, optFns, c.addOperationGetOriginRequestPolicyConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetOriginRequestPolicyConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetOriginRequestPolicyConfigInput struct { + + // The unique identifier for the origin request policy. If the origin request + // policy is attached to a distribution's cache behavior, you can get the policy's + // identifier using ListDistributions or GetDistribution . If the origin request + // policy is not attached to a cache behavior, you can get the identifier using + // ListOriginRequestPolicies . + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type GetOriginRequestPolicyConfigOutput struct { + + // The current version of the origin request policy. + ETag *string + + // The origin request policy configuration. + OriginRequestPolicyConfig *types.OriginRequestPolicyConfig + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetOriginRequestPolicyConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetOriginRequestPolicyConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetOriginRequestPolicyConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetOriginRequestPolicyConfig"); 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 = addOpGetOriginRequestPolicyConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetOriginRequestPolicyConfig(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetOriginRequestPolicyConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetOriginRequestPolicyConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetPublicKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetPublicKey.go new file mode 100644 index 0000000000..fa0bb2e77a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetPublicKey.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a public key. +func (c *Client) GetPublicKey(ctx context.Context, params *GetPublicKeyInput, optFns ...func(*Options)) (*GetPublicKeyOutput, error) { + if params == nil { + params = &GetPublicKeyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetPublicKey", params, optFns, c.addOperationGetPublicKeyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetPublicKeyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetPublicKeyInput struct { + + // The identifier of the public key you are getting. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type GetPublicKeyOutput struct { + + // The identifier for this version of the public key. + ETag *string + + // The public key. + PublicKey *types.PublicKey + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetPublicKeyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetPublicKey{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetPublicKey{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetPublicKey"); 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 = addOpGetPublicKeyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPublicKey(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetPublicKey(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetPublicKey", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetPublicKeyConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetPublicKeyConfig.go new file mode 100644 index 0000000000..b24b52aae3 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetPublicKeyConfig.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a public key configuration. +func (c *Client) GetPublicKeyConfig(ctx context.Context, params *GetPublicKeyConfigInput, optFns ...func(*Options)) (*GetPublicKeyConfigOutput, error) { + if params == nil { + params = &GetPublicKeyConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetPublicKeyConfig", params, optFns, c.addOperationGetPublicKeyConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetPublicKeyConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetPublicKeyConfigInput struct { + + // The identifier of the public key whose configuration you are getting. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type GetPublicKeyConfigOutput struct { + + // The identifier for this version of the public key configuration. + ETag *string + + // A public key configuration. + PublicKeyConfig *types.PublicKeyConfig + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetPublicKeyConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetPublicKeyConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetPublicKeyConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetPublicKeyConfig"); 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 = addOpGetPublicKeyConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPublicKeyConfig(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetPublicKeyConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetPublicKeyConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetRealtimeLogConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetRealtimeLogConfig.go new file mode 100644 index 0000000000..e85ecf8b82 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetRealtimeLogConfig.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a real-time log configuration. +// +// To get a real-time log configuration, you can provide the configuration's name +// or its Amazon Resource Name (ARN). You must provide at least one. If you provide +// both, CloudFront uses the name to identify the real-time log configuration to +// get. +func (c *Client) GetRealtimeLogConfig(ctx context.Context, params *GetRealtimeLogConfigInput, optFns ...func(*Options)) (*GetRealtimeLogConfigOutput, error) { + if params == nil { + params = &GetRealtimeLogConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetRealtimeLogConfig", params, optFns, c.addOperationGetRealtimeLogConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetRealtimeLogConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetRealtimeLogConfigInput struct { + + // The Amazon Resource Name (ARN) of the real-time log configuration to get. + ARN *string + + // The name of the real-time log configuration to get. + Name *string + + noSmithyDocumentSerde +} + +type GetRealtimeLogConfigOutput struct { + + // A real-time log configuration. + RealtimeLogConfig *types.RealtimeLogConfig + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetRealtimeLogConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetRealtimeLogConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetRealtimeLogConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetRealtimeLogConfig"); 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRealtimeLogConfig(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetRealtimeLogConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetRealtimeLogConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetResponseHeadersPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetResponseHeadersPolicy.go new file mode 100644 index 0000000000..d7c0941c9b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetResponseHeadersPolicy.go @@ -0,0 +1,172 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a response headers policy, including metadata (the policy's identifier and +// the date and time when the policy was last modified). +// +// To get a response headers policy, you must provide the policy's identifier. If +// the response headers policy is attached to a distribution's cache behavior, you +// can get the policy's identifier using ListDistributions or GetDistribution . If +// the response headers policy is not attached to a cache behavior, you can get the +// identifier using ListResponseHeadersPolicies . +func (c *Client) GetResponseHeadersPolicy(ctx context.Context, params *GetResponseHeadersPolicyInput, optFns ...func(*Options)) (*GetResponseHeadersPolicyOutput, error) { + if params == nil { + params = &GetResponseHeadersPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetResponseHeadersPolicy", params, optFns, c.addOperationGetResponseHeadersPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetResponseHeadersPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetResponseHeadersPolicyInput struct { + + // The identifier for the response headers policy. + // + // If the response headers policy is attached to a distribution's cache behavior, + // you can get the policy's identifier using ListDistributions or GetDistribution . + // If the response headers policy is not attached to a cache behavior, you can get + // the identifier using ListResponseHeadersPolicies . + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type GetResponseHeadersPolicyOutput struct { + + // The version identifier for the current version of the response headers policy. + ETag *string + + // Contains a response headers policy. + ResponseHeadersPolicy *types.ResponseHeadersPolicy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetResponseHeadersPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetResponseHeadersPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetResponseHeadersPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetResponseHeadersPolicy"); 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 = addOpGetResponseHeadersPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetResponseHeadersPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetResponseHeadersPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetResponseHeadersPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetResponseHeadersPolicyConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetResponseHeadersPolicyConfig.go new file mode 100644 index 0000000000..8c17d9f490 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetResponseHeadersPolicyConfig.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a response headers policy configuration. +// +// To get a response headers policy configuration, you must provide the policy's +// identifier. If the response headers policy is attached to a distribution's cache +// behavior, you can get the policy's identifier using ListDistributions or +// GetDistribution . If the response headers policy is not attached to a cache +// behavior, you can get the identifier using ListResponseHeadersPolicies . +func (c *Client) GetResponseHeadersPolicyConfig(ctx context.Context, params *GetResponseHeadersPolicyConfigInput, optFns ...func(*Options)) (*GetResponseHeadersPolicyConfigOutput, error) { + if params == nil { + params = &GetResponseHeadersPolicyConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetResponseHeadersPolicyConfig", params, optFns, c.addOperationGetResponseHeadersPolicyConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetResponseHeadersPolicyConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetResponseHeadersPolicyConfigInput struct { + + // The identifier for the response headers policy. + // + // If the response headers policy is attached to a distribution's cache behavior, + // you can get the policy's identifier using ListDistributions or GetDistribution . + // If the response headers policy is not attached to a cache behavior, you can get + // the identifier using ListResponseHeadersPolicies . + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type GetResponseHeadersPolicyConfigOutput struct { + + // The version identifier for the current version of the response headers policy. + ETag *string + + // Contains a response headers policy. + ResponseHeadersPolicyConfig *types.ResponseHeadersPolicyConfig + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetResponseHeadersPolicyConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetResponseHeadersPolicyConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetResponseHeadersPolicyConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetResponseHeadersPolicyConfig"); 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 = addOpGetResponseHeadersPolicyConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetResponseHeadersPolicyConfig(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetResponseHeadersPolicyConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetResponseHeadersPolicyConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetStreamingDistribution.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetStreamingDistribution.go new file mode 100644 index 0000000000..0b087c2f20 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetStreamingDistribution.go @@ -0,0 +1,360 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" + smithywaiter "github.com/aws/smithy-go/waiter" + jmespath "github.com/jmespath/go-jmespath" + "time" +) + +// Gets information about a specified RTMP distribution, including the +// distribution configuration. +func (c *Client) GetStreamingDistribution(ctx context.Context, params *GetStreamingDistributionInput, optFns ...func(*Options)) (*GetStreamingDistributionOutput, error) { + if params == nil { + params = &GetStreamingDistributionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetStreamingDistribution", params, optFns, c.addOperationGetStreamingDistributionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetStreamingDistributionOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The request to get a streaming distribution's information. +type GetStreamingDistributionInput struct { + + // The streaming distribution's ID. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +// The returned result of the corresponding request. +type GetStreamingDistributionOutput struct { + + // The current version of the streaming distribution's information. For example: + // E2QWRUHAPOMQZL . + ETag *string + + // The streaming distribution's information. + StreamingDistribution *types.StreamingDistribution + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetStreamingDistributionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetStreamingDistribution{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetStreamingDistribution{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetStreamingDistribution"); 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 = addOpGetStreamingDistributionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetStreamingDistribution(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// StreamingDistributionDeployedWaiterOptions are waiter options for +// StreamingDistributionDeployedWaiter +type StreamingDistributionDeployedWaiterOptions 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. + // + // Passing options here is functionally equivalent to passing values to this + // config's ClientOptions field that extend the inner client's APIOptions directly. + APIOptions []func(*middleware.Stack) error + + // Functional options to be passed to all operations invoked by this client. + // + // Function values that modify the inner APIOptions are applied after the waiter + // config's own APIOptions modifiers. + ClientOptions []func(*Options) + + // MinDelay is the minimum amount of time to delay between retries. If unset, + // StreamingDistributionDeployedWaiter will use default minimum delay of 60 + // seconds. Note that MinDelay must resolve to a value lesser than or equal to the + // MaxDelay. + MinDelay time.Duration + + // MaxDelay is the maximum amount of time to delay between retries. If unset or + // set to zero, StreamingDistributionDeployedWaiter will use default max delay of + // 120 seconds. Note that MaxDelay must resolve to value greater than or equal to + // the MinDelay. + MaxDelay time.Duration + + // LogWaitAttempts is used to enable logging for waiter retry attempts + LogWaitAttempts bool + + // Retryable is function that can be used to override the service defined + // waiter-behavior based on operation output, or returned error. This function is + // used by the waiter to decide if a state is retryable or a terminal state. + // + // By default service-modeled logic will populate this option. This option can + // thus be used to define a custom waiter state with fall-back to service-modeled + // waiter state mutators.The function returns an error in case of a failure state. + // In case of retry state, this function returns a bool value of true and nil + // error, while in case of success it returns a bool value of false and nil error. + Retryable func(context.Context, *GetStreamingDistributionInput, *GetStreamingDistributionOutput, error) (bool, error) +} + +// StreamingDistributionDeployedWaiter defines the waiters for +// StreamingDistributionDeployed +type StreamingDistributionDeployedWaiter struct { + client GetStreamingDistributionAPIClient + + options StreamingDistributionDeployedWaiterOptions +} + +// NewStreamingDistributionDeployedWaiter constructs a +// StreamingDistributionDeployedWaiter. +func NewStreamingDistributionDeployedWaiter(client GetStreamingDistributionAPIClient, optFns ...func(*StreamingDistributionDeployedWaiterOptions)) *StreamingDistributionDeployedWaiter { + options := StreamingDistributionDeployedWaiterOptions{} + options.MinDelay = 60 * time.Second + options.MaxDelay = 120 * time.Second + options.Retryable = streamingDistributionDeployedStateRetryable + + for _, fn := range optFns { + fn(&options) + } + return &StreamingDistributionDeployedWaiter{ + client: client, + options: options, + } +} + +// Wait calls the waiter function for StreamingDistributionDeployed waiter. The +// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is +// required and must be greater than zero. +func (w *StreamingDistributionDeployedWaiter) Wait(ctx context.Context, params *GetStreamingDistributionInput, maxWaitDur time.Duration, optFns ...func(*StreamingDistributionDeployedWaiterOptions)) error { + _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) + return err +} + +// WaitForOutput calls the waiter function for StreamingDistributionDeployed +// waiter and returns the output of the successful operation. The maxWaitDur is the +// maximum wait duration the waiter will wait. The maxWaitDur is required and must +// be greater than zero. +func (w *StreamingDistributionDeployedWaiter) WaitForOutput(ctx context.Context, params *GetStreamingDistributionInput, maxWaitDur time.Duration, optFns ...func(*StreamingDistributionDeployedWaiterOptions)) (*GetStreamingDistributionOutput, error) { + if maxWaitDur <= 0 { + return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") + } + + options := w.options + for _, fn := range optFns { + fn(&options) + } + + if options.MaxDelay <= 0 { + options.MaxDelay = 120 * time.Second + } + + if options.MinDelay > options.MaxDelay { + return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) + } + + ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) + defer cancelFn() + + logger := smithywaiter.Logger{} + remainingTime := maxWaitDur + + var attempt int64 + for { + + attempt++ + apiOptions := options.APIOptions + start := time.Now() + + if options.LogWaitAttempts { + logger.Attempt = attempt + apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) + apiOptions = append(apiOptions, logger.AddLogger) + } + + out, err := w.client.GetStreamingDistribution(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } + o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } + for _, opt := range options.ClientOptions { + opt(o) + } + }) + + retryable, err := options.Retryable(ctx, params, out, err) + if err != nil { + return nil, err + } + if !retryable { + return out, nil + } + + remainingTime -= time.Since(start) + if remainingTime < options.MinDelay || remainingTime <= 0 { + break + } + + // compute exponential backoff between waiter retries + delay, err := smithywaiter.ComputeDelay( + attempt, options.MinDelay, options.MaxDelay, remainingTime, + ) + if err != nil { + return nil, fmt.Errorf("error computing waiter delay, %w", err) + } + + remainingTime -= delay + // sleep for the delay amount before invoking a request + if err := smithytime.SleepWithContext(ctx, delay); err != nil { + return nil, fmt.Errorf("request cancelled while waiting, %w", err) + } + } + return nil, fmt.Errorf("exceeded max wait time for StreamingDistributionDeployed waiter") +} + +func streamingDistributionDeployedStateRetryable(ctx context.Context, input *GetStreamingDistributionInput, output *GetStreamingDistributionOutput, err error) (bool, error) { + + if err == nil { + pathValue, err := jmespath.Search("StreamingDistribution.Status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "Deployed" + value, ok := pathValue.(*string) + if !ok { + return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) + } + + if string(*value) == expectedValue { + return false, nil + } + } + + return true, nil +} + +// GetStreamingDistributionAPIClient is a client that implements the +// GetStreamingDistribution operation. +type GetStreamingDistributionAPIClient interface { + GetStreamingDistribution(context.Context, *GetStreamingDistributionInput, ...func(*Options)) (*GetStreamingDistributionOutput, error) +} + +var _ GetStreamingDistributionAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opGetStreamingDistribution(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetStreamingDistribution", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetStreamingDistributionConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetStreamingDistributionConfig.go new file mode 100644 index 0000000000..b1a918bcd0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_GetStreamingDistributionConfig.go @@ -0,0 +1,162 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Get the configuration information about a streaming distribution. +func (c *Client) GetStreamingDistributionConfig(ctx context.Context, params *GetStreamingDistributionConfigInput, optFns ...func(*Options)) (*GetStreamingDistributionConfigOutput, error) { + if params == nil { + params = &GetStreamingDistributionConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetStreamingDistributionConfig", params, optFns, c.addOperationGetStreamingDistributionConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetStreamingDistributionConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +// To request to get a streaming distribution configuration. +type GetStreamingDistributionConfigInput struct { + + // The streaming distribution's ID. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +// The returned result of the corresponding request. +type GetStreamingDistributionConfigOutput struct { + + // The current version of the configuration. For example: E2QWRUHAPOMQZL . + ETag *string + + // The streaming distribution's configuration information. + StreamingDistributionConfig *types.StreamingDistributionConfig + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetStreamingDistributionConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpGetStreamingDistributionConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetStreamingDistributionConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetStreamingDistributionConfig"); 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 = addOpGetStreamingDistributionConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetStreamingDistributionConfig(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetStreamingDistributionConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetStreamingDistributionConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListCachePolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListCachePolicies.go new file mode 100644 index 0000000000..5a76254ac5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListCachePolicies.go @@ -0,0 +1,176 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a list of cache policies. +// +// You can optionally apply a filter to return only the managed policies created +// by Amazon Web Services, or only the custom policies created in your Amazon Web +// Services account. +// +// You can optionally specify the maximum number of items to receive in the +// response. If the total number of items in the list exceeds the maximum that you +// specify, or the default maximum, the response is paginated. To get the next page +// of items, send a subsequent request that specifies the NextMarker value from +// the current response as the Marker value in the subsequent request. +func (c *Client) ListCachePolicies(ctx context.Context, params *ListCachePoliciesInput, optFns ...func(*Options)) (*ListCachePoliciesOutput, error) { + if params == nil { + params = &ListCachePoliciesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListCachePolicies", params, optFns, c.addOperationListCachePoliciesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListCachePoliciesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListCachePoliciesInput struct { + + // Use this field when paginating results to indicate where to begin in your list + // of cache policies. The response includes cache policies in the list that occur + // after the marker. To get the next page of the list, set this field's value to + // the value of NextMarker from the current page's response. + Marker *string + + // The maximum number of cache policies that you want in the response. + MaxItems *int32 + + // A filter to return only the specified kinds of cache policies. Valid values are: + // + // - managed – Returns only the managed policies created by Amazon Web Services. + // + // - custom – Returns only the custom policies created in your Amazon Web + // Services account. + Type types.CachePolicyType + + noSmithyDocumentSerde +} + +type ListCachePoliciesOutput struct { + + // A list of cache policies. + CachePolicyList *types.CachePolicyList + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListCachePoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpListCachePolicies{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListCachePolicies{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListCachePolicies"); 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListCachePolicies(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListCachePolicies(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListCachePolicies", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListCloudFrontOriginAccessIdentities.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListCloudFrontOriginAccessIdentities.go new file mode 100644 index 0000000000..d386163f42 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListCloudFrontOriginAccessIdentities.go @@ -0,0 +1,260 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists origin access identities. +func (c *Client) ListCloudFrontOriginAccessIdentities(ctx context.Context, params *ListCloudFrontOriginAccessIdentitiesInput, optFns ...func(*Options)) (*ListCloudFrontOriginAccessIdentitiesOutput, error) { + if params == nil { + params = &ListCloudFrontOriginAccessIdentitiesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListCloudFrontOriginAccessIdentities", params, optFns, c.addOperationListCloudFrontOriginAccessIdentitiesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListCloudFrontOriginAccessIdentitiesOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The request to list origin access identities. +type ListCloudFrontOriginAccessIdentitiesInput struct { + + // Use this when paginating results to indicate where to begin in your list of + // origin access identities. The results include identities in the list that occur + // after the marker. To get the next page of results, set the Marker to the value + // of the NextMarker from the current page's response (which is also the ID of the + // last identity on that page). + Marker *string + + // The maximum number of origin access identities you want in the response body. + MaxItems *int32 + + noSmithyDocumentSerde +} + +// The returned result of the corresponding request. +type ListCloudFrontOriginAccessIdentitiesOutput struct { + + // The CloudFrontOriginAccessIdentityList type. + CloudFrontOriginAccessIdentityList *types.CloudFrontOriginAccessIdentityList + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListCloudFrontOriginAccessIdentitiesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpListCloudFrontOriginAccessIdentities{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListCloudFrontOriginAccessIdentities{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListCloudFrontOriginAccessIdentities"); 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListCloudFrontOriginAccessIdentities(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListCloudFrontOriginAccessIdentitiesPaginatorOptions is the paginator options +// for ListCloudFrontOriginAccessIdentities +type ListCloudFrontOriginAccessIdentitiesPaginatorOptions struct { + // The maximum number of origin access identities you want in the response body. + 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 +} + +// ListCloudFrontOriginAccessIdentitiesPaginator is a paginator for +// ListCloudFrontOriginAccessIdentities +type ListCloudFrontOriginAccessIdentitiesPaginator struct { + options ListCloudFrontOriginAccessIdentitiesPaginatorOptions + client ListCloudFrontOriginAccessIdentitiesAPIClient + params *ListCloudFrontOriginAccessIdentitiesInput + nextToken *string + firstPage bool +} + +// NewListCloudFrontOriginAccessIdentitiesPaginator returns a new +// ListCloudFrontOriginAccessIdentitiesPaginator +func NewListCloudFrontOriginAccessIdentitiesPaginator(client ListCloudFrontOriginAccessIdentitiesAPIClient, params *ListCloudFrontOriginAccessIdentitiesInput, optFns ...func(*ListCloudFrontOriginAccessIdentitiesPaginatorOptions)) *ListCloudFrontOriginAccessIdentitiesPaginator { + if params == nil { + params = &ListCloudFrontOriginAccessIdentitiesInput{} + } + + options := ListCloudFrontOriginAccessIdentitiesPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListCloudFrontOriginAccessIdentitiesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListCloudFrontOriginAccessIdentitiesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListCloudFrontOriginAccessIdentities page. +func (p *ListCloudFrontOriginAccessIdentitiesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCloudFrontOriginAccessIdentitiesOutput, 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.ListCloudFrontOriginAccessIdentities(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = nil + if result.CloudFrontOriginAccessIdentityList != nil { + p.nextToken = result.CloudFrontOriginAccessIdentityList.NextMarker + } + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListCloudFrontOriginAccessIdentitiesAPIClient is a client that implements the +// ListCloudFrontOriginAccessIdentities operation. +type ListCloudFrontOriginAccessIdentitiesAPIClient interface { + ListCloudFrontOriginAccessIdentities(context.Context, *ListCloudFrontOriginAccessIdentitiesInput, ...func(*Options)) (*ListCloudFrontOriginAccessIdentitiesOutput, error) +} + +var _ ListCloudFrontOriginAccessIdentitiesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListCloudFrontOriginAccessIdentities(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListCloudFrontOriginAccessIdentities", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListConflictingAliases.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListConflictingAliases.go new file mode 100644 index 0000000000..a933406f5a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListConflictingAliases.go @@ -0,0 +1,198 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a list of aliases (also called CNAMEs or alternate domain names) that +// conflict or overlap with the provided alias, and the associated CloudFront +// distributions and Amazon Web Services accounts for each conflicting alias. In +// the returned list, the distribution and account IDs are partially hidden, which +// allows you to identify the distributions and accounts that you own, but helps to +// protect the information of ones that you don't own. +// +// Use this operation to find aliases that are in use in CloudFront that conflict +// or overlap with the provided alias. For example, if you provide www.example.com +// as input, the returned list can include www.example.com and the overlapping +// wildcard alternate domain name ( *.example.com ), if they exist. If you provide +// *.example.com as input, the returned list can include *.example.com and any +// alternate domain names covered by that wildcard (for example, www.example.com , +// test.example.com , dev.example.com , and so on), if they exist. +// +// To list conflicting aliases, you provide the alias to search and the ID of a +// distribution in your account that has an attached SSL/TLS certificate that +// includes the provided alias. For more information, including how to set up the +// distribution and certificate, see [Moving an alternate domain name to a different distribution]in the Amazon CloudFront Developer Guide. +// +// You can optionally specify the maximum number of items to receive in the +// response. If the total number of items in the list exceeds the maximum that you +// specify, or the default maximum, the response is paginated. To get the next page +// of items, send a subsequent request that specifies the NextMarker value from +// the current response as the Marker value in the subsequent request. +// +// [Moving an alternate domain name to a different distribution]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html#alternate-domain-names-move +func (c *Client) ListConflictingAliases(ctx context.Context, params *ListConflictingAliasesInput, optFns ...func(*Options)) (*ListConflictingAliasesOutput, error) { + if params == nil { + params = &ListConflictingAliasesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListConflictingAliases", params, optFns, c.addOperationListConflictingAliasesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListConflictingAliasesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListConflictingAliasesInput struct { + + // The alias (also called a CNAME) to search for conflicting aliases. + // + // This member is required. + Alias *string + + // The ID of a distribution in your account that has an attached SSL/TLS + // certificate that includes the provided alias. + // + // This member is required. + DistributionId *string + + // Use this field when paginating results to indicate where to begin in the list + // of conflicting aliases. The response includes conflicting aliases in the list + // that occur after the marker. To get the next page of the list, set this field's + // value to the value of NextMarker from the current page's response. + Marker *string + + // The maximum number of conflicting aliases that you want in the response. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListConflictingAliasesOutput struct { + + // A list of conflicting aliases. + ConflictingAliasesList *types.ConflictingAliasesList + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListConflictingAliasesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpListConflictingAliases{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListConflictingAliases{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListConflictingAliases"); 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 = addOpListConflictingAliasesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListConflictingAliases(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListConflictingAliases(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListConflictingAliases", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListContinuousDeploymentPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListContinuousDeploymentPolicies.go new file mode 100644 index 0000000000..314a05030b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListContinuousDeploymentPolicies.go @@ -0,0 +1,166 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a list of the continuous deployment policies in your Amazon Web Services +// account. +// +// You can optionally specify the maximum number of items to receive in the +// response. If the total number of items in the list exceeds the maximum that you +// specify, or the default maximum, the response is paginated. To get the next page +// of items, send a subsequent request that specifies the NextMarker value from +// the current response as the Marker value in the subsequent request. +func (c *Client) ListContinuousDeploymentPolicies(ctx context.Context, params *ListContinuousDeploymentPoliciesInput, optFns ...func(*Options)) (*ListContinuousDeploymentPoliciesOutput, error) { + if params == nil { + params = &ListContinuousDeploymentPoliciesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListContinuousDeploymentPolicies", params, optFns, c.addOperationListContinuousDeploymentPoliciesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListContinuousDeploymentPoliciesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListContinuousDeploymentPoliciesInput struct { + + // Use this field when paginating results to indicate where to begin in your list + // of continuous deployment policies. The response includes policies in the list + // that occur after the marker. To get the next page of the list, set this field's + // value to the value of NextMarker from the current page's response. + Marker *string + + // The maximum number of continuous deployment policies that you want returned in + // the response. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListContinuousDeploymentPoliciesOutput struct { + + // A list of continuous deployment policies. + ContinuousDeploymentPolicyList *types.ContinuousDeploymentPolicyList + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListContinuousDeploymentPoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpListContinuousDeploymentPolicies{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListContinuousDeploymentPolicies{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListContinuousDeploymentPolicies"); 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListContinuousDeploymentPolicies(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListContinuousDeploymentPolicies(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListContinuousDeploymentPolicies", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListDistributions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListDistributions.go new file mode 100644 index 0000000000..f4b3edf155 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListDistributions.go @@ -0,0 +1,257 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// List CloudFront distributions. +func (c *Client) ListDistributions(ctx context.Context, params *ListDistributionsInput, optFns ...func(*Options)) (*ListDistributionsOutput, error) { + if params == nil { + params = &ListDistributionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListDistributions", params, optFns, c.addOperationListDistributionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListDistributionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The request to list your distributions. +type ListDistributionsInput struct { + + // Use this when paginating results to indicate where to begin in your list of + // distributions. The results include distributions in the list that occur after + // the marker. To get the next page of results, set the Marker to the value of the + // NextMarker from the current page's response (which is also the ID of the last + // distribution on that page). + Marker *string + + // The maximum number of distributions you want in the response body. + MaxItems *int32 + + noSmithyDocumentSerde +} + +// The returned result of the corresponding request. +type ListDistributionsOutput struct { + + // The DistributionList type. + DistributionList *types.DistributionList + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListDistributionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpListDistributions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListDistributions{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListDistributions"); 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListDistributions(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListDistributionsPaginatorOptions is the paginator options for ListDistributions +type ListDistributionsPaginatorOptions struct { + // The maximum number of distributions you want in the response body. + 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 +} + +// ListDistributionsPaginator is a paginator for ListDistributions +type ListDistributionsPaginator struct { + options ListDistributionsPaginatorOptions + client ListDistributionsAPIClient + params *ListDistributionsInput + nextToken *string + firstPage bool +} + +// NewListDistributionsPaginator returns a new ListDistributionsPaginator +func NewListDistributionsPaginator(client ListDistributionsAPIClient, params *ListDistributionsInput, optFns ...func(*ListDistributionsPaginatorOptions)) *ListDistributionsPaginator { + if params == nil { + params = &ListDistributionsInput{} + } + + options := ListDistributionsPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListDistributionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListDistributionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListDistributions page. +func (p *ListDistributionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListDistributionsOutput, 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.ListDistributions(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = nil + if result.DistributionList != nil { + p.nextToken = result.DistributionList.NextMarker + } + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListDistributionsAPIClient is a client that implements the ListDistributions +// operation. +type ListDistributionsAPIClient interface { + ListDistributions(context.Context, *ListDistributionsInput, ...func(*Options)) (*ListDistributionsOutput, error) +} + +var _ ListDistributionsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListDistributions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListDistributions", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListDistributionsByCachePolicyId.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListDistributionsByCachePolicyId.go new file mode 100644 index 0000000000..a24440d128 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListDistributionsByCachePolicyId.go @@ -0,0 +1,173 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a list of distribution IDs for distributions that have a cache behavior +// that's associated with the specified cache policy. +// +// You can optionally specify the maximum number of items to receive in the +// response. If the total number of items in the list exceeds the maximum that you +// specify, or the default maximum, the response is paginated. To get the next page +// of items, send a subsequent request that specifies the NextMarker value from +// the current response as the Marker value in the subsequent request. +func (c *Client) ListDistributionsByCachePolicyId(ctx context.Context, params *ListDistributionsByCachePolicyIdInput, optFns ...func(*Options)) (*ListDistributionsByCachePolicyIdOutput, error) { + if params == nil { + params = &ListDistributionsByCachePolicyIdInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListDistributionsByCachePolicyId", params, optFns, c.addOperationListDistributionsByCachePolicyIdMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListDistributionsByCachePolicyIdOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListDistributionsByCachePolicyIdInput struct { + + // The ID of the cache policy whose associated distribution IDs you want to list. + // + // This member is required. + CachePolicyId *string + + // Use this field when paginating results to indicate where to begin in your list + // of distribution IDs. The response includes distribution IDs in the list that + // occur after the marker. To get the next page of the list, set this field's value + // to the value of NextMarker from the current page's response. + Marker *string + + // The maximum number of distribution IDs that you want in the response. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListDistributionsByCachePolicyIdOutput struct { + + // A list of distribution IDs. + DistributionIdList *types.DistributionIdList + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListDistributionsByCachePolicyIdMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpListDistributionsByCachePolicyId{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListDistributionsByCachePolicyId{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListDistributionsByCachePolicyId"); 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 = addOpListDistributionsByCachePolicyIdValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDistributionsByCachePolicyId(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListDistributionsByCachePolicyId(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListDistributionsByCachePolicyId", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListDistributionsByKeyGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListDistributionsByKeyGroup.go new file mode 100644 index 0000000000..a880d347fa --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListDistributionsByKeyGroup.go @@ -0,0 +1,173 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a list of distribution IDs for distributions that have a cache behavior +// that references the specified key group. +// +// You can optionally specify the maximum number of items to receive in the +// response. If the total number of items in the list exceeds the maximum that you +// specify, or the default maximum, the response is paginated. To get the next page +// of items, send a subsequent request that specifies the NextMarker value from +// the current response as the Marker value in the subsequent request. +func (c *Client) ListDistributionsByKeyGroup(ctx context.Context, params *ListDistributionsByKeyGroupInput, optFns ...func(*Options)) (*ListDistributionsByKeyGroupOutput, error) { + if params == nil { + params = &ListDistributionsByKeyGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListDistributionsByKeyGroup", params, optFns, c.addOperationListDistributionsByKeyGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListDistributionsByKeyGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListDistributionsByKeyGroupInput struct { + + // The ID of the key group whose associated distribution IDs you are listing. + // + // This member is required. + KeyGroupId *string + + // Use this field when paginating results to indicate where to begin in your list + // of distribution IDs. The response includes distribution IDs in the list that + // occur after the marker. To get the next page of the list, set this field's value + // to the value of NextMarker from the current page's response. + Marker *string + + // The maximum number of distribution IDs that you want in the response. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListDistributionsByKeyGroupOutput struct { + + // A list of distribution IDs. + DistributionIdList *types.DistributionIdList + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListDistributionsByKeyGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpListDistributionsByKeyGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListDistributionsByKeyGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListDistributionsByKeyGroup"); 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 = addOpListDistributionsByKeyGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDistributionsByKeyGroup(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListDistributionsByKeyGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListDistributionsByKeyGroup", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListDistributionsByOriginRequestPolicyId.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListDistributionsByOriginRequestPolicyId.go new file mode 100644 index 0000000000..dda79ab131 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListDistributionsByOriginRequestPolicyId.go @@ -0,0 +1,174 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a list of distribution IDs for distributions that have a cache behavior +// that's associated with the specified origin request policy. +// +// You can optionally specify the maximum number of items to receive in the +// response. If the total number of items in the list exceeds the maximum that you +// specify, or the default maximum, the response is paginated. To get the next page +// of items, send a subsequent request that specifies the NextMarker value from +// the current response as the Marker value in the subsequent request. +func (c *Client) ListDistributionsByOriginRequestPolicyId(ctx context.Context, params *ListDistributionsByOriginRequestPolicyIdInput, optFns ...func(*Options)) (*ListDistributionsByOriginRequestPolicyIdOutput, error) { + if params == nil { + params = &ListDistributionsByOriginRequestPolicyIdInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListDistributionsByOriginRequestPolicyId", params, optFns, c.addOperationListDistributionsByOriginRequestPolicyIdMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListDistributionsByOriginRequestPolicyIdOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListDistributionsByOriginRequestPolicyIdInput struct { + + // The ID of the origin request policy whose associated distribution IDs you want + // to list. + // + // This member is required. + OriginRequestPolicyId *string + + // Use this field when paginating results to indicate where to begin in your list + // of distribution IDs. The response includes distribution IDs in the list that + // occur after the marker. To get the next page of the list, set this field's value + // to the value of NextMarker from the current page's response. + Marker *string + + // The maximum number of distribution IDs that you want in the response. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListDistributionsByOriginRequestPolicyIdOutput struct { + + // A list of distribution IDs. + DistributionIdList *types.DistributionIdList + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListDistributionsByOriginRequestPolicyIdMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpListDistributionsByOriginRequestPolicyId{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListDistributionsByOriginRequestPolicyId{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListDistributionsByOriginRequestPolicyId"); 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 = addOpListDistributionsByOriginRequestPolicyIdValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDistributionsByOriginRequestPolicyId(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListDistributionsByOriginRequestPolicyId(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListDistributionsByOriginRequestPolicyId", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListDistributionsByRealtimeLogConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListDistributionsByRealtimeLogConfig.go new file mode 100644 index 0000000000..d879cb22e4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListDistributionsByRealtimeLogConfig.go @@ -0,0 +1,178 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a list of distributions that have a cache behavior that's associated with +// the specified real-time log configuration. +// +// You can specify the real-time log configuration by its name or its Amazon +// Resource Name (ARN). You must provide at least one. If you provide both, +// CloudFront uses the name to identify the real-time log configuration to list +// distributions for. +// +// You can optionally specify the maximum number of items to receive in the +// response. If the total number of items in the list exceeds the maximum that you +// specify, or the default maximum, the response is paginated. To get the next page +// of items, send a subsequent request that specifies the NextMarker value from +// the current response as the Marker value in the subsequent request. +func (c *Client) ListDistributionsByRealtimeLogConfig(ctx context.Context, params *ListDistributionsByRealtimeLogConfigInput, optFns ...func(*Options)) (*ListDistributionsByRealtimeLogConfigOutput, error) { + if params == nil { + params = &ListDistributionsByRealtimeLogConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListDistributionsByRealtimeLogConfig", params, optFns, c.addOperationListDistributionsByRealtimeLogConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListDistributionsByRealtimeLogConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListDistributionsByRealtimeLogConfigInput struct { + + // Use this field when paginating results to indicate where to begin in your list + // of distributions. The response includes distributions in the list that occur + // after the marker. To get the next page of the list, set this field's value to + // the value of NextMarker from the current page's response. + Marker *string + + // The maximum number of distributions that you want in the response. + MaxItems *int32 + + // The Amazon Resource Name (ARN) of the real-time log configuration whose + // associated distributions you want to list. + RealtimeLogConfigArn *string + + // The name of the real-time log configuration whose associated distributions you + // want to list. + RealtimeLogConfigName *string + + noSmithyDocumentSerde +} + +type ListDistributionsByRealtimeLogConfigOutput struct { + + // A distribution list. + DistributionList *types.DistributionList + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListDistributionsByRealtimeLogConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpListDistributionsByRealtimeLogConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListDistributionsByRealtimeLogConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListDistributionsByRealtimeLogConfig"); 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListDistributionsByRealtimeLogConfig(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListDistributionsByRealtimeLogConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListDistributionsByRealtimeLogConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListDistributionsByResponseHeadersPolicyId.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListDistributionsByResponseHeadersPolicyId.go new file mode 100644 index 0000000000..f5f9616222 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListDistributionsByResponseHeadersPolicyId.go @@ -0,0 +1,174 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a list of distribution IDs for distributions that have a cache behavior +// that's associated with the specified response headers policy. +// +// You can optionally specify the maximum number of items to receive in the +// response. If the total number of items in the list exceeds the maximum that you +// specify, or the default maximum, the response is paginated. To get the next page +// of items, send a subsequent request that specifies the NextMarker value from +// the current response as the Marker value in the subsequent request. +func (c *Client) ListDistributionsByResponseHeadersPolicyId(ctx context.Context, params *ListDistributionsByResponseHeadersPolicyIdInput, optFns ...func(*Options)) (*ListDistributionsByResponseHeadersPolicyIdOutput, error) { + if params == nil { + params = &ListDistributionsByResponseHeadersPolicyIdInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListDistributionsByResponseHeadersPolicyId", params, optFns, c.addOperationListDistributionsByResponseHeadersPolicyIdMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListDistributionsByResponseHeadersPolicyIdOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListDistributionsByResponseHeadersPolicyIdInput struct { + + // The ID of the response headers policy whose associated distribution IDs you + // want to list. + // + // This member is required. + ResponseHeadersPolicyId *string + + // Use this field when paginating results to indicate where to begin in your list + // of distribution IDs. The response includes distribution IDs in the list that + // occur after the marker. To get the next page of the list, set this field's value + // to the value of NextMarker from the current page's response. + Marker *string + + // The maximum number of distribution IDs that you want to get in the response. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListDistributionsByResponseHeadersPolicyIdOutput struct { + + // A list of distribution IDs. + DistributionIdList *types.DistributionIdList + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListDistributionsByResponseHeadersPolicyIdMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpListDistributionsByResponseHeadersPolicyId{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListDistributionsByResponseHeadersPolicyId{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListDistributionsByResponseHeadersPolicyId"); 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 = addOpListDistributionsByResponseHeadersPolicyIdValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDistributionsByResponseHeadersPolicyId(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListDistributionsByResponseHeadersPolicyId(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListDistributionsByResponseHeadersPolicyId", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListDistributionsByWebACLId.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListDistributionsByWebACLId.go new file mode 100644 index 0000000000..029c7715bf --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListDistributionsByWebACLId.go @@ -0,0 +1,181 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// List the distributions that are associated with a specified WAF web ACL. +func (c *Client) ListDistributionsByWebACLId(ctx context.Context, params *ListDistributionsByWebACLIdInput, optFns ...func(*Options)) (*ListDistributionsByWebACLIdOutput, error) { + if params == nil { + params = &ListDistributionsByWebACLIdInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListDistributionsByWebACLId", params, optFns, c.addOperationListDistributionsByWebACLIdMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListDistributionsByWebACLIdOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The request to list distributions that are associated with a specified WAF web +// ACL. +type ListDistributionsByWebACLIdInput struct { + + // The ID of the WAF web ACL that you want to list the associated distributions. + // If you specify "null" for the ID, the request returns a list of the + // distributions that aren't associated with a web ACL. + // + // For WAFV2, this is the ARN of the web ACL, such as + // arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111 + // . + // + // For WAF Classic, this is the ID of the web ACL, such as + // a1b2c3d4-5678-90ab-cdef-EXAMPLE11111 . + // + // This member is required. + WebACLId *string + + // Use Marker and MaxItems to control pagination of results. If you have more than + // MaxItems distributions that satisfy the request, the response includes a + // NextMarker element. To get the next page of results, submit another request. For + // the value of Marker , specify the value of NextMarker from the last response. + // (For the first request, omit Marker .) + Marker *string + + // The maximum number of distributions that you want CloudFront to return in the + // response body. The maximum and default values are both 100. + MaxItems *int32 + + noSmithyDocumentSerde +} + +// The response to a request to list the distributions that are associated with a +// specified WAF web ACL. +type ListDistributionsByWebACLIdOutput struct { + + // The DistributionList type. + DistributionList *types.DistributionList + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListDistributionsByWebACLIdMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpListDistributionsByWebACLId{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListDistributionsByWebACLId{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListDistributionsByWebACLId"); 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 = addOpListDistributionsByWebACLIdValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDistributionsByWebACLId(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListDistributionsByWebACLId(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListDistributionsByWebACLId", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListFieldLevelEncryptionConfigs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListFieldLevelEncryptionConfigs.go new file mode 100644 index 0000000000..264f8ca9ce --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListFieldLevelEncryptionConfigs.go @@ -0,0 +1,162 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// List all field-level encryption configurations that have been created in +// CloudFront for this account. +func (c *Client) ListFieldLevelEncryptionConfigs(ctx context.Context, params *ListFieldLevelEncryptionConfigsInput, optFns ...func(*Options)) (*ListFieldLevelEncryptionConfigsOutput, error) { + if params == nil { + params = &ListFieldLevelEncryptionConfigsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListFieldLevelEncryptionConfigs", params, optFns, c.addOperationListFieldLevelEncryptionConfigsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListFieldLevelEncryptionConfigsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListFieldLevelEncryptionConfigsInput struct { + + // Use this when paginating results to indicate where to begin in your list of + // configurations. The results include configurations in the list that occur after + // the marker. To get the next page of results, set the Marker to the value of the + // NextMarker from the current page's response (which is also the ID of the last + // configuration on that page). + Marker *string + + // The maximum number of field-level encryption configurations you want in the + // response body. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListFieldLevelEncryptionConfigsOutput struct { + + // Returns a list of all field-level encryption configurations that have been + // created in CloudFront for this account. + FieldLevelEncryptionList *types.FieldLevelEncryptionList + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListFieldLevelEncryptionConfigsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpListFieldLevelEncryptionConfigs{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListFieldLevelEncryptionConfigs{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListFieldLevelEncryptionConfigs"); 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListFieldLevelEncryptionConfigs(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListFieldLevelEncryptionConfigs(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListFieldLevelEncryptionConfigs", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListFieldLevelEncryptionProfiles.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListFieldLevelEncryptionProfiles.go new file mode 100644 index 0000000000..a498ac7c30 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListFieldLevelEncryptionProfiles.go @@ -0,0 +1,162 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Request a list of field-level encryption profiles that have been created in +// CloudFront for this account. +func (c *Client) ListFieldLevelEncryptionProfiles(ctx context.Context, params *ListFieldLevelEncryptionProfilesInput, optFns ...func(*Options)) (*ListFieldLevelEncryptionProfilesOutput, error) { + if params == nil { + params = &ListFieldLevelEncryptionProfilesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListFieldLevelEncryptionProfiles", params, optFns, c.addOperationListFieldLevelEncryptionProfilesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListFieldLevelEncryptionProfilesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListFieldLevelEncryptionProfilesInput struct { + + // Use this when paginating results to indicate where to begin in your list of + // profiles. The results include profiles in the list that occur after the marker. + // To get the next page of results, set the Marker to the value of the NextMarker + // from the current page's response (which is also the ID of the last profile on + // that page). + Marker *string + + // The maximum number of field-level encryption profiles you want in the response + // body. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListFieldLevelEncryptionProfilesOutput struct { + + // Returns a list of the field-level encryption profiles that have been created in + // CloudFront for this account. + FieldLevelEncryptionProfileList *types.FieldLevelEncryptionProfileList + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListFieldLevelEncryptionProfilesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpListFieldLevelEncryptionProfiles{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListFieldLevelEncryptionProfiles{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListFieldLevelEncryptionProfiles"); 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListFieldLevelEncryptionProfiles(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListFieldLevelEncryptionProfiles(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListFieldLevelEncryptionProfiles", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListFunctions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListFunctions.go new file mode 100644 index 0000000000..0a12f84e62 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListFunctions.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a list of all CloudFront functions in your Amazon Web Services account. +// +// You can optionally apply a filter to return only the functions that are in the +// specified stage, either DEVELOPMENT or LIVE . +// +// You can optionally specify the maximum number of items to receive in the +// response. If the total number of items in the list exceeds the maximum that you +// specify, or the default maximum, the response is paginated. To get the next page +// of items, send a subsequent request that specifies the NextMarker value from +// the current response as the Marker value in the subsequent request. +func (c *Client) ListFunctions(ctx context.Context, params *ListFunctionsInput, optFns ...func(*Options)) (*ListFunctionsOutput, error) { + if params == nil { + params = &ListFunctionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListFunctions", params, optFns, c.addOperationListFunctionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListFunctionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListFunctionsInput struct { + + // Use this field when paginating results to indicate where to begin in your list + // of functions. The response includes functions in the list that occur after the + // marker. To get the next page of the list, set this field's value to the value of + // NextMarker from the current page's response. + Marker *string + + // The maximum number of functions that you want in the response. + MaxItems *int32 + + // An optional filter to return only the functions that are in the specified + // stage, either DEVELOPMENT or LIVE . + Stage types.FunctionStage + + noSmithyDocumentSerde +} + +type ListFunctionsOutput struct { + + // A list of CloudFront functions. + FunctionList *types.FunctionList + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListFunctionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpListFunctions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListFunctions{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListFunctions"); 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListFunctions(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListFunctions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListFunctions", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListInvalidations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListInvalidations.go new file mode 100644 index 0000000000..c358f44384 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListInvalidations.go @@ -0,0 +1,267 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists invalidation batches. +func (c *Client) ListInvalidations(ctx context.Context, params *ListInvalidationsInput, optFns ...func(*Options)) (*ListInvalidationsOutput, error) { + if params == nil { + params = &ListInvalidationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListInvalidations", params, optFns, c.addOperationListInvalidationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListInvalidationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The request to list invalidations. +type ListInvalidationsInput struct { + + // The distribution's ID. + // + // This member is required. + DistributionId *string + + // Use this parameter when paginating results to indicate where to begin in your + // list of invalidation batches. Because the results are returned in decreasing + // order from most recent to oldest, the most recent results are on the first page, + // the second page will contain earlier results, and so on. To get the next page of + // results, set Marker to the value of the NextMarker from the current page's + // response. This value is the same as the ID of the last invalidation batch on + // that page. + Marker *string + + // The maximum number of invalidation batches that you want in the response body. + MaxItems *int32 + + noSmithyDocumentSerde +} + +// The returned result of the corresponding request. +type ListInvalidationsOutput struct { + + // Information about invalidation batches. + InvalidationList *types.InvalidationList + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListInvalidationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpListInvalidations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListInvalidations{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListInvalidations"); 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 = addOpListInvalidationsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInvalidations(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListInvalidationsPaginatorOptions is the paginator options for ListInvalidations +type ListInvalidationsPaginatorOptions struct { + // The maximum number of invalidation batches that you want in the response body. + 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 +} + +// ListInvalidationsPaginator is a paginator for ListInvalidations +type ListInvalidationsPaginator struct { + options ListInvalidationsPaginatorOptions + client ListInvalidationsAPIClient + params *ListInvalidationsInput + nextToken *string + firstPage bool +} + +// NewListInvalidationsPaginator returns a new ListInvalidationsPaginator +func NewListInvalidationsPaginator(client ListInvalidationsAPIClient, params *ListInvalidationsInput, optFns ...func(*ListInvalidationsPaginatorOptions)) *ListInvalidationsPaginator { + if params == nil { + params = &ListInvalidationsInput{} + } + + options := ListInvalidationsPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListInvalidationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListInvalidationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListInvalidations page. +func (p *ListInvalidationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListInvalidationsOutput, 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.ListInvalidations(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = nil + if result.InvalidationList != nil { + p.nextToken = result.InvalidationList.NextMarker + } + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListInvalidationsAPIClient is a client that implements the ListInvalidations +// operation. +type ListInvalidationsAPIClient interface { + ListInvalidations(context.Context, *ListInvalidationsInput, ...func(*Options)) (*ListInvalidationsOutput, error) +} + +var _ ListInvalidationsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListInvalidations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListInvalidations", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListKeyGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListKeyGroups.go new file mode 100644 index 0000000000..f607db7f62 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListKeyGroups.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a list of key groups. +// +// You can optionally specify the maximum number of items to receive in the +// response. If the total number of items in the list exceeds the maximum that you +// specify, or the default maximum, the response is paginated. To get the next page +// of items, send a subsequent request that specifies the NextMarker value from +// the current response as the Marker value in the subsequent request. +func (c *Client) ListKeyGroups(ctx context.Context, params *ListKeyGroupsInput, optFns ...func(*Options)) (*ListKeyGroupsOutput, error) { + if params == nil { + params = &ListKeyGroupsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListKeyGroups", params, optFns, c.addOperationListKeyGroupsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListKeyGroupsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListKeyGroupsInput struct { + + // Use this field when paginating results to indicate where to begin in your list + // of key groups. The response includes key groups in the list that occur after the + // marker. To get the next page of the list, set this field's value to the value of + // NextMarker from the current page's response. + Marker *string + + // The maximum number of key groups that you want in the response. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListKeyGroupsOutput struct { + + // A list of key groups. + KeyGroupList *types.KeyGroupList + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListKeyGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpListKeyGroups{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListKeyGroups{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListKeyGroups"); 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListKeyGroups(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListKeyGroups(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListKeyGroups", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListKeyValueStores.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListKeyValueStores.go new file mode 100644 index 0000000000..7ccdccbf0d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListKeyValueStores.go @@ -0,0 +1,255 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Specifies the key value stores to list. +func (c *Client) ListKeyValueStores(ctx context.Context, params *ListKeyValueStoresInput, optFns ...func(*Options)) (*ListKeyValueStoresOutput, error) { + if params == nil { + params = &ListKeyValueStoresInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListKeyValueStores", params, optFns, c.addOperationListKeyValueStoresMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListKeyValueStoresOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListKeyValueStoresInput struct { + + // The marker associated with the key value stores list. + Marker *string + + // The maximum number of items in the key value stores list. + MaxItems *int32 + + // The status of the request for the key value stores list. + Status *string + + noSmithyDocumentSerde +} + +type ListKeyValueStoresOutput struct { + + // The resulting key value stores list. + KeyValueStoreList *types.KeyValueStoreList + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListKeyValueStoresMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpListKeyValueStores{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListKeyValueStores{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListKeyValueStores"); 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListKeyValueStores(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListKeyValueStoresPaginatorOptions is the paginator options for +// ListKeyValueStores +type ListKeyValueStoresPaginatorOptions struct { + // The maximum number of items in the key value stores list. + 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 +} + +// ListKeyValueStoresPaginator is a paginator for ListKeyValueStores +type ListKeyValueStoresPaginator struct { + options ListKeyValueStoresPaginatorOptions + client ListKeyValueStoresAPIClient + params *ListKeyValueStoresInput + nextToken *string + firstPage bool +} + +// NewListKeyValueStoresPaginator returns a new ListKeyValueStoresPaginator +func NewListKeyValueStoresPaginator(client ListKeyValueStoresAPIClient, params *ListKeyValueStoresInput, optFns ...func(*ListKeyValueStoresPaginatorOptions)) *ListKeyValueStoresPaginator { + if params == nil { + params = &ListKeyValueStoresInput{} + } + + options := ListKeyValueStoresPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListKeyValueStoresPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListKeyValueStoresPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListKeyValueStores page. +func (p *ListKeyValueStoresPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListKeyValueStoresOutput, 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.ListKeyValueStores(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = nil + if result.KeyValueStoreList != nil { + p.nextToken = result.KeyValueStoreList.NextMarker + } + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListKeyValueStoresAPIClient is a client that implements the ListKeyValueStores +// operation. +type ListKeyValueStoresAPIClient interface { + ListKeyValueStores(context.Context, *ListKeyValueStoresInput, ...func(*Options)) (*ListKeyValueStoresOutput, error) +} + +var _ ListKeyValueStoresAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListKeyValueStores(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListKeyValueStores", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListOriginAccessControls.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListOriginAccessControls.go new file mode 100644 index 0000000000..5577c620df --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListOriginAccessControls.go @@ -0,0 +1,165 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets the list of CloudFront origin access controls in this Amazon Web Services +// account. +// +// You can optionally specify the maximum number of items to receive in the +// response. If the total number of items in the list exceeds the maximum that you +// specify, or the default maximum, the response is paginated. To get the next page +// of items, send another request that specifies the NextMarker value from the +// current response as the Marker value in the next request. +func (c *Client) ListOriginAccessControls(ctx context.Context, params *ListOriginAccessControlsInput, optFns ...func(*Options)) (*ListOriginAccessControlsOutput, error) { + if params == nil { + params = &ListOriginAccessControlsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListOriginAccessControls", params, optFns, c.addOperationListOriginAccessControlsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListOriginAccessControlsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListOriginAccessControlsInput struct { + + // Use this field when paginating results to indicate where to begin in your list + // of origin access controls. The response includes the items in the list that + // occur after the marker. To get the next page of the list, set this field's value + // to the value of NextMarker from the current page's response. + Marker *string + + // The maximum number of origin access controls that you want in the response. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListOriginAccessControlsOutput struct { + + // A list of origin access controls. + OriginAccessControlList *types.OriginAccessControlList + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListOriginAccessControlsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpListOriginAccessControls{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListOriginAccessControls{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListOriginAccessControls"); 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListOriginAccessControls(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListOriginAccessControls(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListOriginAccessControls", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListOriginRequestPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListOriginRequestPolicies.go new file mode 100644 index 0000000000..2ab5f6d17b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListOriginRequestPolicies.go @@ -0,0 +1,177 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a list of origin request policies. +// +// You can optionally apply a filter to return only the managed policies created +// by Amazon Web Services, or only the custom policies created in your Amazon Web +// Services account. +// +// You can optionally specify the maximum number of items to receive in the +// response. If the total number of items in the list exceeds the maximum that you +// specify, or the default maximum, the response is paginated. To get the next page +// of items, send a subsequent request that specifies the NextMarker value from +// the current response as the Marker value in the subsequent request. +func (c *Client) ListOriginRequestPolicies(ctx context.Context, params *ListOriginRequestPoliciesInput, optFns ...func(*Options)) (*ListOriginRequestPoliciesOutput, error) { + if params == nil { + params = &ListOriginRequestPoliciesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListOriginRequestPolicies", params, optFns, c.addOperationListOriginRequestPoliciesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListOriginRequestPoliciesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListOriginRequestPoliciesInput struct { + + // Use this field when paginating results to indicate where to begin in your list + // of origin request policies. The response includes origin request policies in the + // list that occur after the marker. To get the next page of the list, set this + // field's value to the value of NextMarker from the current page's response. + Marker *string + + // The maximum number of origin request policies that you want in the response. + MaxItems *int32 + + // A filter to return only the specified kinds of origin request policies. Valid + // values are: + // + // - managed – Returns only the managed policies created by Amazon Web Services. + // + // - custom – Returns only the custom policies created in your Amazon Web + // Services account. + Type types.OriginRequestPolicyType + + noSmithyDocumentSerde +} + +type ListOriginRequestPoliciesOutput struct { + + // A list of origin request policies. + OriginRequestPolicyList *types.OriginRequestPolicyList + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListOriginRequestPoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpListOriginRequestPolicies{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListOriginRequestPolicies{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListOriginRequestPolicies"); 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListOriginRequestPolicies(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListOriginRequestPolicies(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListOriginRequestPolicies", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListPublicKeys.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListPublicKeys.go new file mode 100644 index 0000000000..076807e6fb --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListPublicKeys.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// List all public keys that have been added to CloudFront for this account. +func (c *Client) ListPublicKeys(ctx context.Context, params *ListPublicKeysInput, optFns ...func(*Options)) (*ListPublicKeysOutput, error) { + if params == nil { + params = &ListPublicKeysInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListPublicKeys", params, optFns, c.addOperationListPublicKeysMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListPublicKeysOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListPublicKeysInput struct { + + // Use this when paginating results to indicate where to begin in your list of + // public keys. The results include public keys in the list that occur after the + // marker. To get the next page of results, set the Marker to the value of the + // NextMarker from the current page's response (which is also the ID of the last + // public key on that page). + Marker *string + + // The maximum number of public keys you want in the response body. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListPublicKeysOutput struct { + + // Returns a list of all public keys that have been added to CloudFront for this + // account. + PublicKeyList *types.PublicKeyList + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListPublicKeysMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpListPublicKeys{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListPublicKeys{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListPublicKeys"); 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListPublicKeys(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListPublicKeys(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListPublicKeys", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListRealtimeLogConfigs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListRealtimeLogConfigs.go new file mode 100644 index 0000000000..15be273bc0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListRealtimeLogConfigs.go @@ -0,0 +1,166 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a list of real-time log configurations. +// +// You can optionally specify the maximum number of items to receive in the +// response. If the total number of items in the list exceeds the maximum that you +// specify, or the default maximum, the response is paginated. To get the next page +// of items, send a subsequent request that specifies the NextMarker value from +// the current response as the Marker value in the subsequent request. +func (c *Client) ListRealtimeLogConfigs(ctx context.Context, params *ListRealtimeLogConfigsInput, optFns ...func(*Options)) (*ListRealtimeLogConfigsOutput, error) { + if params == nil { + params = &ListRealtimeLogConfigsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListRealtimeLogConfigs", params, optFns, c.addOperationListRealtimeLogConfigsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListRealtimeLogConfigsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListRealtimeLogConfigsInput struct { + + // Use this field when paginating results to indicate where to begin in your list + // of real-time log configurations. The response includes real-time log + // configurations in the list that occur after the marker. To get the next page of + // the list, set this field's value to the value of NextMarker from the current + // page's response. + Marker *string + + // The maximum number of real-time log configurations that you want in the + // response. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListRealtimeLogConfigsOutput struct { + + // A list of real-time log configurations. + RealtimeLogConfigs *types.RealtimeLogConfigs + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListRealtimeLogConfigsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpListRealtimeLogConfigs{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListRealtimeLogConfigs{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListRealtimeLogConfigs"); 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListRealtimeLogConfigs(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListRealtimeLogConfigs(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListRealtimeLogConfigs", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListResponseHeadersPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListResponseHeadersPolicies.go new file mode 100644 index 0000000000..1cada1b3c7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListResponseHeadersPolicies.go @@ -0,0 +1,178 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a list of response headers policies. +// +// You can optionally apply a filter to get only the managed policies created by +// Amazon Web Services, or only the custom policies created in your Amazon Web +// Services account. +// +// You can optionally specify the maximum number of items to receive in the +// response. If the total number of items in the list exceeds the maximum that you +// specify, or the default maximum, the response is paginated. To get the next page +// of items, send a subsequent request that specifies the NextMarker value from +// the current response as the Marker value in the subsequent request. +func (c *Client) ListResponseHeadersPolicies(ctx context.Context, params *ListResponseHeadersPoliciesInput, optFns ...func(*Options)) (*ListResponseHeadersPoliciesOutput, error) { + if params == nil { + params = &ListResponseHeadersPoliciesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListResponseHeadersPolicies", params, optFns, c.addOperationListResponseHeadersPoliciesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListResponseHeadersPoliciesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListResponseHeadersPoliciesInput struct { + + // Use this field when paginating results to indicate where to begin in your list + // of response headers policies. The response includes response headers policies in + // the list that occur after the marker. To get the next page of the list, set this + // field's value to the value of NextMarker from the current page's response. + Marker *string + + // The maximum number of response headers policies that you want to get in the + // response. + MaxItems *int32 + + // A filter to get only the specified kind of response headers policies. Valid + // values are: + // + // - managed – Gets only the managed policies created by Amazon Web Services. + // + // - custom – Gets only the custom policies created in your Amazon Web Services + // account. + Type types.ResponseHeadersPolicyType + + noSmithyDocumentSerde +} + +type ListResponseHeadersPoliciesOutput struct { + + // A list of response headers policies. + ResponseHeadersPolicyList *types.ResponseHeadersPolicyList + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListResponseHeadersPoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpListResponseHeadersPolicies{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListResponseHeadersPolicies{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListResponseHeadersPolicies"); 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListResponseHeadersPolicies(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListResponseHeadersPolicies(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListResponseHeadersPolicies", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListStreamingDistributions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListStreamingDistributions.go new file mode 100644 index 0000000000..d987da5ccd --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListStreamingDistributions.go @@ -0,0 +1,256 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// List streaming distributions. +func (c *Client) ListStreamingDistributions(ctx context.Context, params *ListStreamingDistributionsInput, optFns ...func(*Options)) (*ListStreamingDistributionsOutput, error) { + if params == nil { + params = &ListStreamingDistributionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListStreamingDistributions", params, optFns, c.addOperationListStreamingDistributionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListStreamingDistributionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The request to list your streaming distributions. +type ListStreamingDistributionsInput struct { + + // The value that you provided for the Marker request parameter. + Marker *string + + // The value that you provided for the MaxItems request parameter. + MaxItems *int32 + + noSmithyDocumentSerde +} + +// The returned result of the corresponding request. +type ListStreamingDistributionsOutput struct { + + // The StreamingDistributionList type. + StreamingDistributionList *types.StreamingDistributionList + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListStreamingDistributionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpListStreamingDistributions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpListStreamingDistributions{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListStreamingDistributions"); 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListStreamingDistributions(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListStreamingDistributionsPaginatorOptions is the paginator options for +// ListStreamingDistributions +type ListStreamingDistributionsPaginatorOptions struct { + // The value that you provided for the MaxItems request parameter. + 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 +} + +// ListStreamingDistributionsPaginator is a paginator for +// ListStreamingDistributions +type ListStreamingDistributionsPaginator struct { + options ListStreamingDistributionsPaginatorOptions + client ListStreamingDistributionsAPIClient + params *ListStreamingDistributionsInput + nextToken *string + firstPage bool +} + +// NewListStreamingDistributionsPaginator returns a new +// ListStreamingDistributionsPaginator +func NewListStreamingDistributionsPaginator(client ListStreamingDistributionsAPIClient, params *ListStreamingDistributionsInput, optFns ...func(*ListStreamingDistributionsPaginatorOptions)) *ListStreamingDistributionsPaginator { + if params == nil { + params = &ListStreamingDistributionsInput{} + } + + options := ListStreamingDistributionsPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListStreamingDistributionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListStreamingDistributionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListStreamingDistributions page. +func (p *ListStreamingDistributionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListStreamingDistributionsOutput, 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.ListStreamingDistributions(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = nil + if result.StreamingDistributionList != nil { + p.nextToken = result.StreamingDistributionList.NextMarker + } + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListStreamingDistributionsAPIClient is a client that implements the +// ListStreamingDistributions operation. +type ListStreamingDistributionsAPIClient interface { + ListStreamingDistributions(context.Context, *ListStreamingDistributionsInput, ...func(*Options)) (*ListStreamingDistributionsOutput, error) +} + +var _ ListStreamingDistributionsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListStreamingDistributions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListStreamingDistributions", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListTagsForResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListTagsForResource.go new file mode 100644 index 0000000000..bea36fd650 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_ListTagsForResource.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// List tags for a CloudFront resource. For more information, see [Tagging a distribution] in the Amazon +// CloudFront Developer Guide. +// +// [Tagging a distribution]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/tagging.html +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 +} + +// The request to list tags for a CloudFront resource. +type ListTagsForResourceInput struct { + + // An ARN of a CloudFront resource. + // + // This member is required. + Resource *string + + noSmithyDocumentSerde +} + +// The returned result of the corresponding request. +type ListTagsForResourceOutput struct { + + // A complex type that contains zero or more Tag elements. + // + // This member is required. + Tags *types.Tags + + // 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(&awsRestxml_serializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_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 = addOpListTagsForResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +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/cloudfront/api_op_PublishFunction.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_PublishFunction.go new file mode 100644 index 0000000000..de4f832503 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_PublishFunction.go @@ -0,0 +1,172 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Publishes a CloudFront function by copying the function code from the +// DEVELOPMENT stage to LIVE . This automatically updates all cache behaviors that +// are using this function to use the newly published copy in the LIVE stage. +// +// When a function is published to the LIVE stage, you can attach the function to +// a distribution's cache behavior, using the function's Amazon Resource Name +// (ARN). +// +// To publish a function, you must provide the function's name and version ( ETag +// value). To get these values, you can use ListFunctions and DescribeFunction . +func (c *Client) PublishFunction(ctx context.Context, params *PublishFunctionInput, optFns ...func(*Options)) (*PublishFunctionOutput, error) { + if params == nil { + params = &PublishFunctionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PublishFunction", params, optFns, c.addOperationPublishFunctionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PublishFunctionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PublishFunctionInput struct { + + // The current version ( ETag value) of the function that you are publishing, + // which you can get using DescribeFunction . + // + // This member is required. + IfMatch *string + + // The name of the function that you are publishing. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type PublishFunctionOutput struct { + + // Contains configuration information and metadata about a CloudFront function. + FunctionSummary *types.FunctionSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPublishFunctionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpPublishFunction{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpPublishFunction{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PublishFunction"); 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 = addOpPublishFunctionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPublishFunction(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPublishFunction(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PublishFunction", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_TagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_TagResource.go new file mode 100644 index 0000000000..90c901fbe6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_TagResource.go @@ -0,0 +1,162 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Add tags to a CloudFront resource. For more information, see [Tagging a distribution] in the Amazon +// CloudFront Developer Guide. +// +// [Tagging a distribution]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/tagging.html +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 +} + +// The request to add tags to a CloudFront resource. +type TagResourceInput struct { + + // An ARN of a CloudFront resource. + // + // This member is required. + Resource *string + + // A complex type that contains zero or more Tag elements. + // + // This member is required. + Tags *types.Tags + + 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(&awsRestxml_serializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_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 = addOpTagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "TagResource", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_TestFunction.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_TestFunction.go new file mode 100644 index 0000000000..4d90245639 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_TestFunction.go @@ -0,0 +1,189 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Tests a CloudFront function. +// +// To test a function, you provide an event object that represents an HTTP request +// or response that your CloudFront distribution could receive in production. +// CloudFront runs the function, passing it the event object that you provided, and +// returns the function's result (the modified event object) in the response. The +// response also contains function logs and error messages, if any exist. For more +// information about testing functions, see [Testing functions]in the Amazon CloudFront Developer +// Guide. +// +// To test a function, you provide the function's name and version ( ETag value) +// along with the event object. To get the function's name and version, you can use +// ListFunctions and DescribeFunction . +// +// [Testing functions]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/managing-functions.html#test-function +func (c *Client) TestFunction(ctx context.Context, params *TestFunctionInput, optFns ...func(*Options)) (*TestFunctionOutput, error) { + if params == nil { + params = &TestFunctionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TestFunction", params, optFns, c.addOperationTestFunctionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TestFunctionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TestFunctionInput struct { + + // The event object to test the function with. For more information about the + // structure of the event object, see [Testing functions]in the Amazon CloudFront Developer Guide. + // + // [Testing functions]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/managing-functions.html#test-function + // + // This member is required. + EventObject []byte + + // The current version ( ETag value) of the function that you are testing, which + // you can get using DescribeFunction . + // + // This member is required. + IfMatch *string + + // The name of the function that you are testing. + // + // This member is required. + Name *string + + // The stage of the function that you are testing, either DEVELOPMENT or LIVE . + Stage types.FunctionStage + + noSmithyDocumentSerde +} + +type TestFunctionOutput struct { + + // An object that represents the result of running the function with the provided + // event object. + TestResult *types.TestResult + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTestFunctionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpTestFunction{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpTestFunction{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "TestFunction"); 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 = addOpTestFunctionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTestFunction(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opTestFunction(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "TestFunction", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UntagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UntagResource.go new file mode 100644 index 0000000000..0e4dd13bec --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UntagResource.go @@ -0,0 +1,162 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Remove tags from a CloudFront resource. For more information, see [Tagging a distribution] in the +// Amazon CloudFront Developer Guide. +// +// [Tagging a distribution]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/tagging.html +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 +} + +// The request to remove tags from a CloudFront resource. +type UntagResourceInput struct { + + // An ARN of a CloudFront resource. + // + // This member is required. + Resource *string + + // A complex type that contains zero or more Tag key elements. + // + // This member is required. + TagKeys *types.TagKeys + + 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(&awsRestxml_serializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_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 = addOpUntagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UntagResource", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateCachePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateCachePolicy.go new file mode 100644 index 0000000000..1073666605 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateCachePolicy.go @@ -0,0 +1,183 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates a cache policy configuration. +// +// When you update a cache policy configuration, all the fields are updated with +// the values provided in the request. You cannot update some fields independent of +// others. To update a cache policy configuration: +// +// - Use GetCachePolicyConfig to get the current configuration. +// +// - Locally modify the fields in the cache policy configuration that you want +// to update. +// +// - Call UpdateCachePolicy by providing the entire cache policy configuration, +// including the fields that you modified and those that you didn't. +func (c *Client) UpdateCachePolicy(ctx context.Context, params *UpdateCachePolicyInput, optFns ...func(*Options)) (*UpdateCachePolicyOutput, error) { + if params == nil { + params = &UpdateCachePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateCachePolicy", params, optFns, c.addOperationUpdateCachePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateCachePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateCachePolicyInput struct { + + // A cache policy configuration. + // + // This member is required. + CachePolicyConfig *types.CachePolicyConfig + + // The unique identifier for the cache policy that you are updating. The + // identifier is returned in a cache behavior's CachePolicyId field in the + // response to GetDistributionConfig . + // + // This member is required. + Id *string + + // The version of the cache policy that you are updating. The version is returned + // in the cache policy's ETag field in the response to GetCachePolicyConfig . + IfMatch *string + + noSmithyDocumentSerde +} + +type UpdateCachePolicyOutput struct { + + // A cache policy. + CachePolicy *types.CachePolicy + + // The current version of the cache policy. + ETag *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateCachePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpUpdateCachePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdateCachePolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateCachePolicy"); 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 = addOpUpdateCachePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateCachePolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateCachePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateCachePolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateCloudFrontOriginAccessIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateCloudFrontOriginAccessIdentity.go new file mode 100644 index 0000000000..a385d9a346 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateCloudFrontOriginAccessIdentity.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Update an origin access identity. +func (c *Client) UpdateCloudFrontOriginAccessIdentity(ctx context.Context, params *UpdateCloudFrontOriginAccessIdentityInput, optFns ...func(*Options)) (*UpdateCloudFrontOriginAccessIdentityOutput, error) { + if params == nil { + params = &UpdateCloudFrontOriginAccessIdentityInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateCloudFrontOriginAccessIdentity", params, optFns, c.addOperationUpdateCloudFrontOriginAccessIdentityMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateCloudFrontOriginAccessIdentityOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The request to update an origin access identity. +type UpdateCloudFrontOriginAccessIdentityInput struct { + + // The identity's configuration information. + // + // This member is required. + CloudFrontOriginAccessIdentityConfig *types.CloudFrontOriginAccessIdentityConfig + + // The identity's id. + // + // This member is required. + Id *string + + // The value of the ETag header that you received when retrieving the identity's + // configuration. For example: E2QWRUHAPOMQZL . + IfMatch *string + + noSmithyDocumentSerde +} + +// The returned result of the corresponding request. +type UpdateCloudFrontOriginAccessIdentityOutput struct { + + // The origin access identity's information. + CloudFrontOriginAccessIdentity *types.CloudFrontOriginAccessIdentity + + // The current version of the configuration. For example: E2QWRUHAPOMQZL . + ETag *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateCloudFrontOriginAccessIdentityMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpUpdateCloudFrontOriginAccessIdentity{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdateCloudFrontOriginAccessIdentity{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateCloudFrontOriginAccessIdentity"); 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 = addOpUpdateCloudFrontOriginAccessIdentityValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateCloudFrontOriginAccessIdentity(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateCloudFrontOriginAccessIdentity(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateCloudFrontOriginAccessIdentity", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateContinuousDeploymentPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateContinuousDeploymentPolicy.go new file mode 100644 index 0000000000..79590345c3 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateContinuousDeploymentPolicy.go @@ -0,0 +1,187 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates a continuous deployment policy. You can update a continuous deployment +// policy to enable or disable it, to change the percentage of traffic that it +// sends to the staging distribution, or to change the staging distribution that it +// sends traffic to. +// +// When you update a continuous deployment policy configuration, all the fields +// are updated with the values that are provided in the request. You cannot update +// some fields independent of others. To update a continuous deployment policy +// configuration: +// +// - Use GetContinuousDeploymentPolicyConfig to get the current configuration. +// +// - Locally modify the fields in the continuous deployment policy configuration +// that you want to update. +// +// - Use UpdateContinuousDeploymentPolicy , providing the entire continuous +// deployment policy configuration, including the fields that you modified and +// those that you didn't. +func (c *Client) UpdateContinuousDeploymentPolicy(ctx context.Context, params *UpdateContinuousDeploymentPolicyInput, optFns ...func(*Options)) (*UpdateContinuousDeploymentPolicyOutput, error) { + if params == nil { + params = &UpdateContinuousDeploymentPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateContinuousDeploymentPolicy", params, optFns, c.addOperationUpdateContinuousDeploymentPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateContinuousDeploymentPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateContinuousDeploymentPolicyInput struct { + + // The continuous deployment policy configuration. + // + // This member is required. + ContinuousDeploymentPolicyConfig *types.ContinuousDeploymentPolicyConfig + + // The identifier of the continuous deployment policy that you are updating. + // + // This member is required. + Id *string + + // The current version ( ETag value) of the continuous deployment policy that you + // are updating. + IfMatch *string + + noSmithyDocumentSerde +} + +type UpdateContinuousDeploymentPolicyOutput struct { + + // A continuous deployment policy. + ContinuousDeploymentPolicy *types.ContinuousDeploymentPolicy + + // The version identifier for the current version of the continuous deployment + // policy. + ETag *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateContinuousDeploymentPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpUpdateContinuousDeploymentPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdateContinuousDeploymentPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateContinuousDeploymentPolicy"); 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 = addOpUpdateContinuousDeploymentPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateContinuousDeploymentPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateContinuousDeploymentPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateContinuousDeploymentPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateDistribution.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateDistribution.go new file mode 100644 index 0000000000..693c1222ba --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateDistribution.go @@ -0,0 +1,194 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the configuration for a CloudFront distribution. +// +// The update process includes getting the current distribution configuration, +// updating it to make your changes, and then submitting an UpdateDistribution +// request to make the updates. +// +// To update a web distribution using the CloudFront API +// +// - Use GetDistributionConfig to get the current configuration, including the +// version identifier ( ETag ). +// +// - Update the distribution configuration that was returned in the response. +// Note the following important requirements and restrictions: +// +// - You must rename the ETag field to IfMatch , leaving the value unchanged. +// (Set the value of IfMatch to the value of ETag , then remove the ETag field.) +// +// - You can't change the value of CallerReference . +// +// - Submit an UpdateDistribution request, providing the distribution +// configuration. The new configuration replaces the existing configuration. The +// values that you specify in an UpdateDistribution request are not merged into +// your existing configuration. Make sure to include all fields: the ones that you +// modified and also the ones that you didn't. +func (c *Client) UpdateDistribution(ctx context.Context, params *UpdateDistributionInput, optFns ...func(*Options)) (*UpdateDistributionOutput, error) { + if params == nil { + params = &UpdateDistributionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateDistribution", params, optFns, c.addOperationUpdateDistributionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateDistributionOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The request to update a distribution. +type UpdateDistributionInput struct { + + // The distribution's configuration information. + // + // This member is required. + DistributionConfig *types.DistributionConfig + + // The distribution's id. + // + // This member is required. + Id *string + + // The value of the ETag header that you received when retrieving the + // distribution's configuration. For example: E2QWRUHAPOMQZL . + IfMatch *string + + noSmithyDocumentSerde +} + +// The returned result of the corresponding request. +type UpdateDistributionOutput struct { + + // The distribution's information. + Distribution *types.Distribution + + // The current version of the configuration. For example: E2QWRUHAPOMQZL . + ETag *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateDistributionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpUpdateDistribution{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdateDistribution{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateDistribution"); 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 = addOpUpdateDistributionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateDistribution(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateDistribution(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateDistribution", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateDistributionWithStagingConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateDistributionWithStagingConfig.go new file mode 100644 index 0000000000..0e3c622919 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateDistributionWithStagingConfig.go @@ -0,0 +1,192 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Copies the staging distribution's configuration to its corresponding primary +// distribution. The primary distribution retains its Aliases (also known as +// alternate domain names or CNAMEs) and ContinuousDeploymentPolicyId value, but +// otherwise its configuration is overwritten to match the staging distribution. +// +// You can use this operation in a continuous deployment workflow after you have +// tested configuration changes on the staging distribution. After using a +// continuous deployment policy to move a portion of your domain name's traffic to +// the staging distribution and verifying that it works as intended, you can use +// this operation to copy the staging distribution's configuration to the primary +// distribution. This action will disable the continuous deployment policy and move +// your domain's traffic back to the primary distribution. +// +// This API operation requires the following IAM permissions: +// +// [GetDistribution] +// +// [UpdateDistribution] +// +// [GetDistribution]: https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_GetDistribution.html +// [UpdateDistribution]: https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_UpdateDistribution.html +func (c *Client) UpdateDistributionWithStagingConfig(ctx context.Context, params *UpdateDistributionWithStagingConfigInput, optFns ...func(*Options)) (*UpdateDistributionWithStagingConfigOutput, error) { + if params == nil { + params = &UpdateDistributionWithStagingConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateDistributionWithStagingConfig", params, optFns, c.addOperationUpdateDistributionWithStagingConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateDistributionWithStagingConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateDistributionWithStagingConfigInput struct { + + // The identifier of the primary distribution to which you are copying a staging + // distribution's configuration. + // + // This member is required. + Id *string + + // The current versions ( ETag values) of both primary and staging distributions. + // Provide these in the following format: + // + // , + IfMatch *string + + // The identifier of the staging distribution whose configuration you are copying + // to the primary distribution. + StagingDistributionId *string + + noSmithyDocumentSerde +} + +type UpdateDistributionWithStagingConfigOutput struct { + + // A distribution tells CloudFront where you want content to be delivered from, + // and the details about how to track and manage content delivery. + Distribution *types.Distribution + + // The current version of the primary distribution (after it's updated). + ETag *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateDistributionWithStagingConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpUpdateDistributionWithStagingConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdateDistributionWithStagingConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateDistributionWithStagingConfig"); 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 = addOpUpdateDistributionWithStagingConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateDistributionWithStagingConfig(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateDistributionWithStagingConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateDistributionWithStagingConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateFieldLevelEncryptionConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateFieldLevelEncryptionConfig.go new file mode 100644 index 0000000000..ad022e431e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateFieldLevelEncryptionConfig.go @@ -0,0 +1,170 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Update a field-level encryption configuration. +func (c *Client) UpdateFieldLevelEncryptionConfig(ctx context.Context, params *UpdateFieldLevelEncryptionConfigInput, optFns ...func(*Options)) (*UpdateFieldLevelEncryptionConfigOutput, error) { + if params == nil { + params = &UpdateFieldLevelEncryptionConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateFieldLevelEncryptionConfig", params, optFns, c.addOperationUpdateFieldLevelEncryptionConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateFieldLevelEncryptionConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateFieldLevelEncryptionConfigInput struct { + + // Request to update a field-level encryption configuration. + // + // This member is required. + FieldLevelEncryptionConfig *types.FieldLevelEncryptionConfig + + // The ID of the configuration you want to update. + // + // This member is required. + Id *string + + // The value of the ETag header that you received when retrieving the + // configuration identity to update. For example: E2QWRUHAPOMQZL . + IfMatch *string + + noSmithyDocumentSerde +} + +type UpdateFieldLevelEncryptionConfigOutput struct { + + // The value of the ETag header that you received when updating the configuration. + // For example: E2QWRUHAPOMQZL . + ETag *string + + // Return the results of updating the configuration. + FieldLevelEncryption *types.FieldLevelEncryption + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateFieldLevelEncryptionConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpUpdateFieldLevelEncryptionConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdateFieldLevelEncryptionConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateFieldLevelEncryptionConfig"); 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 = addOpUpdateFieldLevelEncryptionConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateFieldLevelEncryptionConfig(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateFieldLevelEncryptionConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateFieldLevelEncryptionConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateFieldLevelEncryptionProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateFieldLevelEncryptionProfile.go new file mode 100644 index 0000000000..bc73d68ac9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateFieldLevelEncryptionProfile.go @@ -0,0 +1,169 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Update a field-level encryption profile. +func (c *Client) UpdateFieldLevelEncryptionProfile(ctx context.Context, params *UpdateFieldLevelEncryptionProfileInput, optFns ...func(*Options)) (*UpdateFieldLevelEncryptionProfileOutput, error) { + if params == nil { + params = &UpdateFieldLevelEncryptionProfileInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateFieldLevelEncryptionProfile", params, optFns, c.addOperationUpdateFieldLevelEncryptionProfileMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateFieldLevelEncryptionProfileOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateFieldLevelEncryptionProfileInput struct { + + // Request to update a field-level encryption profile. + // + // This member is required. + FieldLevelEncryptionProfileConfig *types.FieldLevelEncryptionProfileConfig + + // The ID of the field-level encryption profile request. + // + // This member is required. + Id *string + + // The value of the ETag header that you received when retrieving the profile + // identity to update. For example: E2QWRUHAPOMQZL . + IfMatch *string + + noSmithyDocumentSerde +} + +type UpdateFieldLevelEncryptionProfileOutput struct { + + // The result of the field-level encryption profile request. + ETag *string + + // Return the results of updating the profile. + FieldLevelEncryptionProfile *types.FieldLevelEncryptionProfile + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateFieldLevelEncryptionProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpUpdateFieldLevelEncryptionProfile{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdateFieldLevelEncryptionProfile{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateFieldLevelEncryptionProfile"); 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 = addOpUpdateFieldLevelEncryptionProfileValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateFieldLevelEncryptionProfile(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateFieldLevelEncryptionProfile(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateFieldLevelEncryptionProfile", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateFunction.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateFunction.go new file mode 100644 index 0000000000..ef8be7fe6a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateFunction.go @@ -0,0 +1,186 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates a CloudFront function. +// +// You can update a function's code or the comment that describes the function. +// You cannot update a function's name. +// +// To update a function, you provide the function's name and version ( ETag value) +// along with the updated function code. To get the name and version, you can use +// ListFunctions and DescribeFunction . +func (c *Client) UpdateFunction(ctx context.Context, params *UpdateFunctionInput, optFns ...func(*Options)) (*UpdateFunctionOutput, error) { + if params == nil { + params = &UpdateFunctionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateFunction", params, optFns, c.addOperationUpdateFunctionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateFunctionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateFunctionInput struct { + + // The function code. For more information about writing a CloudFront function, + // see [Writing function code for CloudFront Functions]in the Amazon CloudFront Developer Guide. + // + // [Writing function code for CloudFront Functions]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/writing-function-code.html + // + // This member is required. + FunctionCode []byte + + // Configuration information about the function. + // + // This member is required. + FunctionConfig *types.FunctionConfig + + // The current version ( ETag value) of the function that you are updating, which + // you can get using DescribeFunction . + // + // This member is required. + IfMatch *string + + // The name of the function that you are updating. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type UpdateFunctionOutput struct { + + // The version identifier for the current version of the CloudFront function. + ETag *string + + // Contains configuration information and metadata about a CloudFront function. + FunctionSummary *types.FunctionSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateFunctionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpUpdateFunction{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdateFunction{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateFunction"); 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 = addOpUpdateFunctionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateFunction(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateFunction(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateFunction", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateKeyGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateKeyGroup.go new file mode 100644 index 0000000000..5acca6eb0e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateKeyGroup.go @@ -0,0 +1,181 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates a key group. +// +// When you update a key group, all the fields are updated with the values +// provided in the request. You cannot update some fields independent of others. To +// update a key group: +// +// - Get the current key group with GetKeyGroup or GetKeyGroupConfig . +// +// - Locally modify the fields in the key group that you want to update. For +// example, add or remove public key IDs. +// +// - Call UpdateKeyGroup with the entire key group object, including the fields +// that you modified and those that you didn't. +func (c *Client) UpdateKeyGroup(ctx context.Context, params *UpdateKeyGroupInput, optFns ...func(*Options)) (*UpdateKeyGroupOutput, error) { + if params == nil { + params = &UpdateKeyGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateKeyGroup", params, optFns, c.addOperationUpdateKeyGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateKeyGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateKeyGroupInput struct { + + // The identifier of the key group that you are updating. + // + // This member is required. + Id *string + + // The key group configuration. + // + // This member is required. + KeyGroupConfig *types.KeyGroupConfig + + // The version of the key group that you are updating. The version is the key + // group's ETag value. + IfMatch *string + + noSmithyDocumentSerde +} + +type UpdateKeyGroupOutput struct { + + // The identifier for this version of the key group. + ETag *string + + // The key group that was just updated. + KeyGroup *types.KeyGroup + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateKeyGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpUpdateKeyGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdateKeyGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateKeyGroup"); 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 = addOpUpdateKeyGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateKeyGroup(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateKeyGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateKeyGroup", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateKeyValueStore.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateKeyValueStore.go new file mode 100644 index 0000000000..c12f086709 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateKeyValueStore.go @@ -0,0 +1,170 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Specifies the key value store to update. +func (c *Client) UpdateKeyValueStore(ctx context.Context, params *UpdateKeyValueStoreInput, optFns ...func(*Options)) (*UpdateKeyValueStoreOutput, error) { + if params == nil { + params = &UpdateKeyValueStoreInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateKeyValueStore", params, optFns, c.addOperationUpdateKeyValueStoreMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateKeyValueStoreOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateKeyValueStoreInput struct { + + // The comment of the key value store to update. + // + // This member is required. + Comment *string + + // The key value store to update, if a match occurs. + // + // This member is required. + IfMatch *string + + // The name of the key value store to update. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type UpdateKeyValueStoreOutput struct { + + // The ETag of the resulting key value store. + ETag *string + + // The resulting key value store to update. + KeyValueStore *types.KeyValueStore + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateKeyValueStoreMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpUpdateKeyValueStore{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdateKeyValueStore{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateKeyValueStore"); 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 = addOpUpdateKeyValueStoreValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateKeyValueStore(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateKeyValueStore(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateKeyValueStore", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateOriginAccessControl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateOriginAccessControl.go new file mode 100644 index 0000000000..2fdd604490 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateOriginAccessControl.go @@ -0,0 +1,169 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates a CloudFront origin access control. +func (c *Client) UpdateOriginAccessControl(ctx context.Context, params *UpdateOriginAccessControlInput, optFns ...func(*Options)) (*UpdateOriginAccessControlOutput, error) { + if params == nil { + params = &UpdateOriginAccessControlInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateOriginAccessControl", params, optFns, c.addOperationUpdateOriginAccessControlMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateOriginAccessControlOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateOriginAccessControlInput struct { + + // The unique identifier of the origin access control that you are updating. + // + // This member is required. + Id *string + + // An origin access control. + // + // This member is required. + OriginAccessControlConfig *types.OriginAccessControlConfig + + // The current version ( ETag value) of the origin access control that you are + // updating. + IfMatch *string + + noSmithyDocumentSerde +} + +type UpdateOriginAccessControlOutput struct { + + // The new version of the origin access control after it has been updated. + ETag *string + + // The origin access control after it has been updated. + OriginAccessControl *types.OriginAccessControl + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateOriginAccessControlMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpUpdateOriginAccessControl{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdateOriginAccessControl{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateOriginAccessControl"); 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 = addOpUpdateOriginAccessControlValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateOriginAccessControl(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateOriginAccessControl(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateOriginAccessControl", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateOriginRequestPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateOriginRequestPolicy.go new file mode 100644 index 0000000000..cc4ecb92a3 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateOriginRequestPolicy.go @@ -0,0 +1,184 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates an origin request policy configuration. +// +// When you update an origin request policy configuration, all the fields are +// updated with the values provided in the request. You cannot update some fields +// independent of others. To update an origin request policy configuration: +// +// - Use GetOriginRequestPolicyConfig to get the current configuration. +// +// - Locally modify the fields in the origin request policy configuration that +// you want to update. +// +// - Call UpdateOriginRequestPolicy by providing the entire origin request policy +// configuration, including the fields that you modified and those that you didn't. +func (c *Client) UpdateOriginRequestPolicy(ctx context.Context, params *UpdateOriginRequestPolicyInput, optFns ...func(*Options)) (*UpdateOriginRequestPolicyOutput, error) { + if params == nil { + params = &UpdateOriginRequestPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateOriginRequestPolicy", params, optFns, c.addOperationUpdateOriginRequestPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateOriginRequestPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateOriginRequestPolicyInput struct { + + // The unique identifier for the origin request policy that you are updating. The + // identifier is returned in a cache behavior's OriginRequestPolicyId field in the + // response to GetDistributionConfig . + // + // This member is required. + Id *string + + // An origin request policy configuration. + // + // This member is required. + OriginRequestPolicyConfig *types.OriginRequestPolicyConfig + + // The version of the origin request policy that you are updating. The version is + // returned in the origin request policy's ETag field in the response to + // GetOriginRequestPolicyConfig . + IfMatch *string + + noSmithyDocumentSerde +} + +type UpdateOriginRequestPolicyOutput struct { + + // The current version of the origin request policy. + ETag *string + + // An origin request policy. + OriginRequestPolicy *types.OriginRequestPolicy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateOriginRequestPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpUpdateOriginRequestPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdateOriginRequestPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateOriginRequestPolicy"); 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 = addOpUpdateOriginRequestPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateOriginRequestPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateOriginRequestPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateOriginRequestPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdatePublicKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdatePublicKey.go new file mode 100644 index 0000000000..71a6457493 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdatePublicKey.go @@ -0,0 +1,170 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Update public key information. Note that the only value you can change is the +// comment. +func (c *Client) UpdatePublicKey(ctx context.Context, params *UpdatePublicKeyInput, optFns ...func(*Options)) (*UpdatePublicKeyOutput, error) { + if params == nil { + params = &UpdatePublicKeyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdatePublicKey", params, optFns, c.addOperationUpdatePublicKeyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdatePublicKeyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdatePublicKeyInput struct { + + // The identifier of the public key that you are updating. + // + // This member is required. + Id *string + + // A public key configuration. + // + // This member is required. + PublicKeyConfig *types.PublicKeyConfig + + // The value of the ETag header that you received when retrieving the public key + // to update. For example: E2QWRUHAPOMQZL . + IfMatch *string + + noSmithyDocumentSerde +} + +type UpdatePublicKeyOutput struct { + + // The identifier of the current version of the public key. + ETag *string + + // The public key. + PublicKey *types.PublicKey + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdatePublicKeyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpUpdatePublicKey{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdatePublicKey{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdatePublicKey"); 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 = addOpUpdatePublicKeyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdatePublicKey(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdatePublicKey(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdatePublicKey", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateRealtimeLogConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateRealtimeLogConfig.go new file mode 100644 index 0000000000..175baf9255 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateRealtimeLogConfig.go @@ -0,0 +1,190 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates a real-time log configuration. +// +// When you update a real-time log configuration, all the parameters are updated +// with the values provided in the request. You cannot update some parameters +// independent of others. To update a real-time log configuration: +// +// - Call GetRealtimeLogConfig to get the current real-time log configuration. +// +// - Locally modify the parameters in the real-time log configuration that you +// want to update. +// +// - Call this API ( UpdateRealtimeLogConfig ) by providing the entire real-time +// log configuration, including the parameters that you modified and those that you +// didn't. +// +// You cannot update a real-time log configuration's Name or ARN . +func (c *Client) UpdateRealtimeLogConfig(ctx context.Context, params *UpdateRealtimeLogConfigInput, optFns ...func(*Options)) (*UpdateRealtimeLogConfigOutput, error) { + if params == nil { + params = &UpdateRealtimeLogConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateRealtimeLogConfig", params, optFns, c.addOperationUpdateRealtimeLogConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateRealtimeLogConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateRealtimeLogConfigInput struct { + + // The Amazon Resource Name (ARN) for this real-time log configuration. + ARN *string + + // Contains information about the Amazon Kinesis data stream where you are sending + // real-time log data. + EndPoints []types.EndPoint + + // A list of fields to include in each real-time log record. + // + // For more information about fields, see [Real-time log configuration fields] in the Amazon CloudFront Developer + // Guide. + // + // [Real-time log configuration fields]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html#understand-real-time-log-config-fields + Fields []string + + // The name for this real-time log configuration. + Name *string + + // The sampling rate for this real-time log configuration. The sampling rate + // determines the percentage of viewer requests that are represented in the + // real-time log data. You must provide an integer between 1 and 100, inclusive. + SamplingRate *int64 + + noSmithyDocumentSerde +} + +type UpdateRealtimeLogConfigOutput struct { + + // A real-time log configuration. + RealtimeLogConfig *types.RealtimeLogConfig + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateRealtimeLogConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpUpdateRealtimeLogConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdateRealtimeLogConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateRealtimeLogConfig"); 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 = addOpUpdateRealtimeLogConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateRealtimeLogConfig(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateRealtimeLogConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateRealtimeLogConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateResponseHeadersPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateResponseHeadersPolicy.go new file mode 100644 index 0000000000..63eb1a02e1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateResponseHeadersPolicy.go @@ -0,0 +1,184 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates a response headers policy. +// +// When you update a response headers policy, the entire policy is replaced. You +// cannot update some policy fields independent of others. To update a response +// headers policy configuration: +// +// - Use GetResponseHeadersPolicyConfig to get the current policy's configuration. +// +// - Modify the fields in the response headers policy configuration that you +// want to update. +// +// - Call UpdateResponseHeadersPolicy , providing the entire response headers +// policy configuration, including the fields that you modified and those that you +// didn't. +func (c *Client) UpdateResponseHeadersPolicy(ctx context.Context, params *UpdateResponseHeadersPolicyInput, optFns ...func(*Options)) (*UpdateResponseHeadersPolicyOutput, error) { + if params == nil { + params = &UpdateResponseHeadersPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateResponseHeadersPolicy", params, optFns, c.addOperationUpdateResponseHeadersPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateResponseHeadersPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateResponseHeadersPolicyInput struct { + + // The identifier for the response headers policy that you are updating. + // + // This member is required. + Id *string + + // A response headers policy configuration. + // + // This member is required. + ResponseHeadersPolicyConfig *types.ResponseHeadersPolicyConfig + + // The version of the response headers policy that you are updating. + // + // The version is returned in the cache policy's ETag field in the response to + // GetResponseHeadersPolicyConfig . + IfMatch *string + + noSmithyDocumentSerde +} + +type UpdateResponseHeadersPolicyOutput struct { + + // The current version of the response headers policy. + ETag *string + + // A response headers policy. + ResponseHeadersPolicy *types.ResponseHeadersPolicy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateResponseHeadersPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpUpdateResponseHeadersPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdateResponseHeadersPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateResponseHeadersPolicy"); 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 = addOpUpdateResponseHeadersPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateResponseHeadersPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateResponseHeadersPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateResponseHeadersPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateStreamingDistribution.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateStreamingDistribution.go new file mode 100644 index 0000000000..129af7dbc9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/api_op_UpdateStreamingDistribution.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Update a streaming distribution. +func (c *Client) UpdateStreamingDistribution(ctx context.Context, params *UpdateStreamingDistributionInput, optFns ...func(*Options)) (*UpdateStreamingDistributionOutput, error) { + if params == nil { + params = &UpdateStreamingDistributionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateStreamingDistribution", params, optFns, c.addOperationUpdateStreamingDistributionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateStreamingDistributionOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The request to update a streaming distribution. +type UpdateStreamingDistributionInput struct { + + // The streaming distribution's id. + // + // This member is required. + Id *string + + // The streaming distribution's configuration information. + // + // This member is required. + StreamingDistributionConfig *types.StreamingDistributionConfig + + // The value of the ETag header that you received when retrieving the streaming + // distribution's configuration. For example: E2QWRUHAPOMQZL . + IfMatch *string + + noSmithyDocumentSerde +} + +// The returned result of the corresponding request. +type UpdateStreamingDistributionOutput struct { + + // The current version of the configuration. For example: E2QWRUHAPOMQZL . + ETag *string + + // The streaming distribution's information. + StreamingDistribution *types.StreamingDistribution + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateStreamingDistributionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpUpdateStreamingDistribution{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdateStreamingDistribution{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateStreamingDistribution"); 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 = addOpUpdateStreamingDistributionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateStreamingDistribution(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateStreamingDistribution(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateStreamingDistribution", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/auth.go new file mode 100644 index 0000000000..e8983b6cc0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/auth.go @@ -0,0 +1,313 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + smithy "github.com/aws/smithy-go" + smithyauth "github.com/aws/smithy-go/auth" + "github.com/aws/smithy-go/metrics" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) { + params.Region = options.Region +} + +type setLegacyContextSigningOptionsMiddleware struct { +} + +func (*setLegacyContextSigningOptionsMiddleware) ID() string { + return "setLegacyContextSigningOptions" +} + +func (m *setLegacyContextSigningOptionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + rscheme := getResolvedAuthScheme(ctx) + schemeID := rscheme.Scheme.SchemeID() + + if sn := awsmiddleware.GetSigningName(ctx); sn != "" { + if schemeID == "aws.auth#sigv4" { + smithyhttp.SetSigV4SigningName(&rscheme.SignerProperties, sn) + } else if schemeID == "aws.auth#sigv4a" { + smithyhttp.SetSigV4ASigningName(&rscheme.SignerProperties, sn) + } + } + + if sr := awsmiddleware.GetSigningRegion(ctx); sr != "" { + if schemeID == "aws.auth#sigv4" { + smithyhttp.SetSigV4SigningRegion(&rscheme.SignerProperties, sr) + } else if schemeID == "aws.auth#sigv4a" { + smithyhttp.SetSigV4ASigningRegions(&rscheme.SignerProperties, []string{sr}) + } + } + + return next.HandleFinalize(ctx, in) +} + +func addSetLegacyContextSigningOptionsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&setLegacyContextSigningOptionsMiddleware{}, "Signing", middleware.Before) +} + +type withAnonymous struct { + resolver AuthSchemeResolver +} + +var _ AuthSchemeResolver = (*withAnonymous)(nil) + +func (v *withAnonymous) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { + opts, err := v.resolver.ResolveAuthSchemes(ctx, params) + if err != nil { + return nil, err + } + + opts = append(opts, &smithyauth.Option{ + SchemeID: smithyauth.SchemeIDAnonymous, + }) + return opts, nil +} + +func wrapWithAnonymousAuth(options *Options) { + if _, ok := options.AuthSchemeResolver.(*defaultAuthSchemeResolver); !ok { + return + } + + options.AuthSchemeResolver = &withAnonymous{ + resolver: options.AuthSchemeResolver, + } +} + +// AuthResolverParameters contains the set of inputs necessary for auth scheme +// resolution. +type AuthResolverParameters struct { + // The name of the operation being invoked. + Operation string + + // The region in which the operation is being invoked. + Region string +} + +func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters { + params := &AuthResolverParameters{ + Operation: operation, + } + + bindAuthParamsRegion(ctx, params, input, options) + + return params +} + +// AuthSchemeResolver returns a set of possible authentication options for an +// operation. +type AuthSchemeResolver interface { + ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error) +} + +type defaultAuthSchemeResolver struct{} + +var _ AuthSchemeResolver = (*defaultAuthSchemeResolver)(nil) + +func (*defaultAuthSchemeResolver) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { + if overrides, ok := operationAuthOptions[params.Operation]; ok { + return overrides(params), nil + } + return serviceAuthOptions(params), nil +} + +var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyauth.Option{} + +func serviceAuthOptions(params *AuthResolverParameters) []*smithyauth.Option { + return []*smithyauth.Option{ + { + SchemeID: smithyauth.SchemeIDSigV4, + SignerProperties: func() smithy.Properties { + var props smithy.Properties + smithyhttp.SetSigV4SigningName(&props, "cloudfront") + smithyhttp.SetSigV4SigningRegion(&props, params.Region) + return props + }(), + }, + } +} + +type resolveAuthSchemeMiddleware struct { + operation string + options Options +} + +func (*resolveAuthSchemeMiddleware) ID() string { + return "ResolveAuthScheme" +} + +func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") + defer span.End() + + params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) + options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("resolve auth scheme: %w", err) + } + + scheme, ok := m.selectScheme(options) + if !ok { + return out, metadata, fmt.Errorf("could not select an auth scheme") + } + + ctx = setResolvedAuthScheme(ctx, scheme) + + span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID()) + span.End() + return next.HandleFinalize(ctx, in) +} + +func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) (*resolvedAuthScheme, bool) { + for _, option := range options { + if option.SchemeID == smithyauth.SchemeIDAnonymous { + return newResolvedAuthScheme(smithyhttp.NewAnonymousScheme(), option), true + } + + for _, scheme := range m.options.AuthSchemes { + if scheme.SchemeID() != option.SchemeID { + continue + } + + if scheme.IdentityResolver(m.options) != nil { + return newResolvedAuthScheme(scheme, option), true + } + } + } + + return nil, false +} + +type resolvedAuthSchemeKey struct{} + +type resolvedAuthScheme struct { + Scheme smithyhttp.AuthScheme + IdentityProperties smithy.Properties + SignerProperties smithy.Properties +} + +func newResolvedAuthScheme(scheme smithyhttp.AuthScheme, option *smithyauth.Option) *resolvedAuthScheme { + return &resolvedAuthScheme{ + Scheme: scheme, + IdentityProperties: option.IdentityProperties, + SignerProperties: option.SignerProperties, + } +} + +func setResolvedAuthScheme(ctx context.Context, scheme *resolvedAuthScheme) context.Context { + return middleware.WithStackValue(ctx, resolvedAuthSchemeKey{}, scheme) +} + +func getResolvedAuthScheme(ctx context.Context) *resolvedAuthScheme { + v, _ := middleware.GetStackValue(ctx, resolvedAuthSchemeKey{}).(*resolvedAuthScheme) + return v +} + +type getIdentityMiddleware struct { + options Options +} + +func (*getIdentityMiddleware) ID() string { + return "GetIdentity" +} + +func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + innerCtx, span := tracing.StartSpan(ctx, "GetIdentity") + defer span.End() + + rscheme := getResolvedAuthScheme(innerCtx) + if rscheme == nil { + return out, metadata, fmt.Errorf("no resolved auth scheme") + } + + resolver := rscheme.Scheme.IdentityResolver(m.options) + if resolver == nil { + return out, metadata, fmt.Errorf("no identity resolver") + } + + identity, err := timeOperationMetric(ctx, "client.call.resolve_identity_duration", + func() (smithyauth.Identity, error) { + return resolver.GetIdentity(innerCtx, rscheme.IdentityProperties) + }, + func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) + if err != nil { + return out, metadata, fmt.Errorf("get identity: %w", err) + } + + ctx = setIdentity(ctx, identity) + + span.End() + return next.HandleFinalize(ctx, in) +} + +type identityKey struct{} + +func setIdentity(ctx context.Context, identity smithyauth.Identity) context.Context { + return middleware.WithStackValue(ctx, identityKey{}, identity) +} + +func getIdentity(ctx context.Context) smithyauth.Identity { + v, _ := middleware.GetStackValue(ctx, identityKey{}).(smithyauth.Identity) + return v +} + +type signRequestMiddleware struct { + options Options +} + +func (*signRequestMiddleware) ID() string { + return "Signing" +} + +func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "SignRequest") + defer span.End() + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request) + } + + rscheme := getResolvedAuthScheme(ctx) + if rscheme == nil { + return out, metadata, fmt.Errorf("no resolved auth scheme") + } + + identity := getIdentity(ctx) + if identity == nil { + return out, metadata, fmt.Errorf("no identity") + } + + signer := rscheme.Scheme.Signer() + if signer == nil { + return out, metadata, fmt.Errorf("no signer") + } + + _, err = timeOperationMetric(ctx, "client.call.signing_duration", func() (any, error) { + return nil, signer.SignRequest(ctx, req, identity, rscheme.SignerProperties) + }, func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) + if err != nil { + return out, metadata, fmt.Errorf("sign request: %w", err) + } + + span.End() + return next.HandleFinalize(ctx, in) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/deserializers.go new file mode 100644 index 0000000000..abdc42d7fd --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/deserializers.go @@ -0,0 +1,48115 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "bytes" + "context" + "encoding/xml" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + awsxml "github.com/aws/aws-sdk-go-v2/aws/protocol/xml" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + smithy "github.com/aws/smithy-go" + smithyxml "github.com/aws/smithy-go/encoding/xml" + 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" + "strconv" + "strings" + "time" +) + +func deserializeS3Expires(v string) (*time.Time, error) { + t, err := smithytime.ParseHTTPDate(v) + if err != nil { + return nil, nil + } + return &t, nil +} + +type awsRestxml_deserializeOpAssociateAlias struct { +} + +func (*awsRestxml_deserializeOpAssociateAlias) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpAssociateAlias) 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, awsRestxml_deserializeOpErrorAssociateAlias(response, &metadata) + } + output := &AssociateAliasOutput{} + 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 awsRestxml_deserializeOpErrorAssociateAlias(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("IllegalUpdate", errorCode): + return awsRestxml_deserializeErrorIllegalUpdate(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("NoSuchDistribution", errorCode): + return awsRestxml_deserializeErrorNoSuchDistribution(response, errorBody) + + case strings.EqualFold("TooManyDistributionCNAMEs", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionCNAMEs(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpCopyDistribution struct { +} + +func (*awsRestxml_deserializeOpCopyDistribution) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCopyDistribution) 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, awsRestxml_deserializeOpErrorCopyDistribution(response, &metadata) + } + output := &CopyDistributionOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsCopyDistributionOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentDistribution(&output.Distribution, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCopyDistribution(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("CNAMEAlreadyExists", errorCode): + return awsRestxml_deserializeErrorCNAMEAlreadyExists(response, errorBody) + + case strings.EqualFold("DistributionAlreadyExists", errorCode): + return awsRestxml_deserializeErrorDistributionAlreadyExists(response, errorBody) + + case strings.EqualFold("IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior", errorCode): + return awsRestxml_deserializeErrorIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(response, errorBody) + + case strings.EqualFold("InconsistentQuantities", errorCode): + return awsRestxml_deserializeErrorInconsistentQuantities(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidDefaultRootObject", errorCode): + return awsRestxml_deserializeErrorInvalidDefaultRootObject(response, errorBody) + + case strings.EqualFold("InvalidErrorCode", errorCode): + return awsRestxml_deserializeErrorInvalidErrorCode(response, errorBody) + + case strings.EqualFold("InvalidForwardCookies", errorCode): + return awsRestxml_deserializeErrorInvalidForwardCookies(response, errorBody) + + case strings.EqualFold("InvalidFunctionAssociation", errorCode): + return awsRestxml_deserializeErrorInvalidFunctionAssociation(response, errorBody) + + case strings.EqualFold("InvalidGeoRestrictionParameter", errorCode): + return awsRestxml_deserializeErrorInvalidGeoRestrictionParameter(response, errorBody) + + case strings.EqualFold("InvalidHeadersForS3Origin", errorCode): + return awsRestxml_deserializeErrorInvalidHeadersForS3Origin(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("InvalidLambdaFunctionAssociation", errorCode): + return awsRestxml_deserializeErrorInvalidLambdaFunctionAssociation(response, errorBody) + + case strings.EqualFold("InvalidLocationCode", errorCode): + return awsRestxml_deserializeErrorInvalidLocationCode(response, errorBody) + + case strings.EqualFold("InvalidMinimumProtocolVersion", errorCode): + return awsRestxml_deserializeErrorInvalidMinimumProtocolVersion(response, errorBody) + + case strings.EqualFold("InvalidOrigin", errorCode): + return awsRestxml_deserializeErrorInvalidOrigin(response, errorBody) + + case strings.EqualFold("InvalidOriginAccessControl", errorCode): + return awsRestxml_deserializeErrorInvalidOriginAccessControl(response, errorBody) + + case strings.EqualFold("InvalidOriginAccessIdentity", errorCode): + return awsRestxml_deserializeErrorInvalidOriginAccessIdentity(response, errorBody) + + case strings.EqualFold("InvalidOriginKeepaliveTimeout", errorCode): + return awsRestxml_deserializeErrorInvalidOriginKeepaliveTimeout(response, errorBody) + + case strings.EqualFold("InvalidOriginReadTimeout", errorCode): + return awsRestxml_deserializeErrorInvalidOriginReadTimeout(response, errorBody) + + case strings.EqualFold("InvalidProtocolSettings", errorCode): + return awsRestxml_deserializeErrorInvalidProtocolSettings(response, errorBody) + + case strings.EqualFold("InvalidQueryStringParameters", errorCode): + return awsRestxml_deserializeErrorInvalidQueryStringParameters(response, errorBody) + + case strings.EqualFold("InvalidRelativePath", errorCode): + return awsRestxml_deserializeErrorInvalidRelativePath(response, errorBody) + + case strings.EqualFold("InvalidRequiredProtocol", errorCode): + return awsRestxml_deserializeErrorInvalidRequiredProtocol(response, errorBody) + + case strings.EqualFold("InvalidResponseCode", errorCode): + return awsRestxml_deserializeErrorInvalidResponseCode(response, errorBody) + + case strings.EqualFold("InvalidTTLOrder", errorCode): + return awsRestxml_deserializeErrorInvalidTTLOrder(response, errorBody) + + case strings.EqualFold("InvalidViewerCertificate", errorCode): + return awsRestxml_deserializeErrorInvalidViewerCertificate(response, errorBody) + + case strings.EqualFold("InvalidWebACLId", errorCode): + return awsRestxml_deserializeErrorInvalidWebACLId(response, errorBody) + + case strings.EqualFold("MissingBody", errorCode): + return awsRestxml_deserializeErrorMissingBody(response, errorBody) + + case strings.EqualFold("NoSuchCachePolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchCachePolicy(response, errorBody) + + case strings.EqualFold("NoSuchDistribution", errorCode): + return awsRestxml_deserializeErrorNoSuchDistribution(response, errorBody) + + case strings.EqualFold("NoSuchFieldLevelEncryptionConfig", errorCode): + return awsRestxml_deserializeErrorNoSuchFieldLevelEncryptionConfig(response, errorBody) + + case strings.EqualFold("NoSuchOrigin", errorCode): + return awsRestxml_deserializeErrorNoSuchOrigin(response, errorBody) + + case strings.EqualFold("NoSuchOriginRequestPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchOriginRequestPolicy(response, errorBody) + + case strings.EqualFold("NoSuchRealtimeLogConfig", errorCode): + return awsRestxml_deserializeErrorNoSuchRealtimeLogConfig(response, errorBody) + + case strings.EqualFold("NoSuchResponseHeadersPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchResponseHeadersPolicy(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + case strings.EqualFold("RealtimeLogConfigOwnerMismatch", errorCode): + return awsRestxml_deserializeErrorRealtimeLogConfigOwnerMismatch(response, errorBody) + + case strings.EqualFold("TooManyCacheBehaviors", errorCode): + return awsRestxml_deserializeErrorTooManyCacheBehaviors(response, errorBody) + + case strings.EqualFold("TooManyCertificates", errorCode): + return awsRestxml_deserializeErrorTooManyCertificates(response, errorBody) + + case strings.EqualFold("TooManyCookieNamesInWhiteList", errorCode): + return awsRestxml_deserializeErrorTooManyCookieNamesInWhiteList(response, errorBody) + + case strings.EqualFold("TooManyDistributionCNAMEs", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionCNAMEs(response, errorBody) + + case strings.EqualFold("TooManyDistributions", errorCode): + return awsRestxml_deserializeErrorTooManyDistributions(response, errorBody) + + case strings.EqualFold("TooManyDistributionsAssociatedToCachePolicy", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToCachePolicy(response, errorBody) + + case strings.EqualFold("TooManyDistributionsAssociatedToFieldLevelEncryptionConfig", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToFieldLevelEncryptionConfig(response, errorBody) + + case strings.EqualFold("TooManyDistributionsAssociatedToKeyGroup", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToKeyGroup(response, errorBody) + + case strings.EqualFold("TooManyDistributionsAssociatedToOriginAccessControl", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToOriginAccessControl(response, errorBody) + + case strings.EqualFold("TooManyDistributionsAssociatedToOriginRequestPolicy", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToOriginRequestPolicy(response, errorBody) + + case strings.EqualFold("TooManyDistributionsAssociatedToResponseHeadersPolicy", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToResponseHeadersPolicy(response, errorBody) + + case strings.EqualFold("TooManyDistributionsWithFunctionAssociations", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsWithFunctionAssociations(response, errorBody) + + case strings.EqualFold("TooManyDistributionsWithLambdaAssociations", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsWithLambdaAssociations(response, errorBody) + + case strings.EqualFold("TooManyDistributionsWithSingleFunctionARN", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsWithSingleFunctionARN(response, errorBody) + + case strings.EqualFold("TooManyFunctionAssociations", errorCode): + return awsRestxml_deserializeErrorTooManyFunctionAssociations(response, errorBody) + + case strings.EqualFold("TooManyHeadersInForwardedValues", errorCode): + return awsRestxml_deserializeErrorTooManyHeadersInForwardedValues(response, errorBody) + + case strings.EqualFold("TooManyKeyGroupsAssociatedToDistribution", errorCode): + return awsRestxml_deserializeErrorTooManyKeyGroupsAssociatedToDistribution(response, errorBody) + + case strings.EqualFold("TooManyLambdaFunctionAssociations", errorCode): + return awsRestxml_deserializeErrorTooManyLambdaFunctionAssociations(response, errorBody) + + case strings.EqualFold("TooManyOriginCustomHeaders", errorCode): + return awsRestxml_deserializeErrorTooManyOriginCustomHeaders(response, errorBody) + + case strings.EqualFold("TooManyOriginGroupsPerDistribution", errorCode): + return awsRestxml_deserializeErrorTooManyOriginGroupsPerDistribution(response, errorBody) + + case strings.EqualFold("TooManyOrigins", errorCode): + return awsRestxml_deserializeErrorTooManyOrigins(response, errorBody) + + case strings.EqualFold("TooManyQueryStringParameters", errorCode): + return awsRestxml_deserializeErrorTooManyQueryStringParameters(response, errorBody) + + case strings.EqualFold("TooManyTrustedSigners", errorCode): + return awsRestxml_deserializeErrorTooManyTrustedSigners(response, errorBody) + + case strings.EqualFold("TrustedKeyGroupDoesNotExist", errorCode): + return awsRestxml_deserializeErrorTrustedKeyGroupDoesNotExist(response, errorBody) + + case strings.EqualFold("TrustedSignerDoesNotExist", errorCode): + return awsRestxml_deserializeErrorTrustedSignerDoesNotExist(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsCopyDistributionOutput(v *CopyDistributionOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Location = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentCopyDistributionOutput(v **CopyDistributionOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CopyDistributionOutput + if *v == nil { + sv = &CopyDistributionOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Distribution", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentDistribution(&sv.Distribution, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpCreateCachePolicy struct { +} + +func (*awsRestxml_deserializeOpCreateCachePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreateCachePolicy) 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, awsRestxml_deserializeOpErrorCreateCachePolicy(response, &metadata) + } + output := &CreateCachePolicyOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsCreateCachePolicyOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentCachePolicy(&output.CachePolicy, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreateCachePolicy(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("CachePolicyAlreadyExists", errorCode): + return awsRestxml_deserializeErrorCachePolicyAlreadyExists(response, errorBody) + + case strings.EqualFold("InconsistentQuantities", errorCode): + return awsRestxml_deserializeErrorInconsistentQuantities(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("TooManyCachePolicies", errorCode): + return awsRestxml_deserializeErrorTooManyCachePolicies(response, errorBody) + + case strings.EqualFold("TooManyCookiesInCachePolicy", errorCode): + return awsRestxml_deserializeErrorTooManyCookiesInCachePolicy(response, errorBody) + + case strings.EqualFold("TooManyHeadersInCachePolicy", errorCode): + return awsRestxml_deserializeErrorTooManyHeadersInCachePolicy(response, errorBody) + + case strings.EqualFold("TooManyQueryStringsInCachePolicy", errorCode): + return awsRestxml_deserializeErrorTooManyQueryStringsInCachePolicy(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsCreateCachePolicyOutput(v *CreateCachePolicyOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Location = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentCreateCachePolicyOutput(v **CreateCachePolicyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateCachePolicyOutput + if *v == nil { + sv = &CreateCachePolicyOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CachePolicy", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCachePolicy(&sv.CachePolicy, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpCreateCloudFrontOriginAccessIdentity struct { +} + +func (*awsRestxml_deserializeOpCreateCloudFrontOriginAccessIdentity) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreateCloudFrontOriginAccessIdentity) 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, awsRestxml_deserializeOpErrorCreateCloudFrontOriginAccessIdentity(response, &metadata) + } + output := &CreateCloudFrontOriginAccessIdentityOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsCreateCloudFrontOriginAccessIdentityOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentity(&output.CloudFrontOriginAccessIdentity, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreateCloudFrontOriginAccessIdentity(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("CloudFrontOriginAccessIdentityAlreadyExists", errorCode): + return awsRestxml_deserializeErrorCloudFrontOriginAccessIdentityAlreadyExists(response, errorBody) + + case strings.EqualFold("InconsistentQuantities", errorCode): + return awsRestxml_deserializeErrorInconsistentQuantities(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("MissingBody", errorCode): + return awsRestxml_deserializeErrorMissingBody(response, errorBody) + + case strings.EqualFold("TooManyCloudFrontOriginAccessIdentities", errorCode): + return awsRestxml_deserializeErrorTooManyCloudFrontOriginAccessIdentities(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsCreateCloudFrontOriginAccessIdentityOutput(v *CreateCloudFrontOriginAccessIdentityOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Location = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentCreateCloudFrontOriginAccessIdentityOutput(v **CreateCloudFrontOriginAccessIdentityOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateCloudFrontOriginAccessIdentityOutput + if *v == nil { + sv = &CreateCloudFrontOriginAccessIdentityOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CloudFrontOriginAccessIdentity", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentity(&sv.CloudFrontOriginAccessIdentity, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpCreateContinuousDeploymentPolicy struct { +} + +func (*awsRestxml_deserializeOpCreateContinuousDeploymentPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreateContinuousDeploymentPolicy) 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, awsRestxml_deserializeOpErrorCreateContinuousDeploymentPolicy(response, &metadata) + } + output := &CreateContinuousDeploymentPolicyOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsCreateContinuousDeploymentPolicyOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentContinuousDeploymentPolicy(&output.ContinuousDeploymentPolicy, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreateContinuousDeploymentPolicy(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("ContinuousDeploymentPolicyAlreadyExists", errorCode): + return awsRestxml_deserializeErrorContinuousDeploymentPolicyAlreadyExists(response, errorBody) + + case strings.EqualFold("InconsistentQuantities", errorCode): + return awsRestxml_deserializeErrorInconsistentQuantities(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("StagingDistributionInUse", errorCode): + return awsRestxml_deserializeErrorStagingDistributionInUse(response, errorBody) + + case strings.EqualFold("TooManyContinuousDeploymentPolicies", errorCode): + return awsRestxml_deserializeErrorTooManyContinuousDeploymentPolicies(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsCreateContinuousDeploymentPolicyOutput(v *CreateContinuousDeploymentPolicyOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Location = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentCreateContinuousDeploymentPolicyOutput(v **CreateContinuousDeploymentPolicyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateContinuousDeploymentPolicyOutput + if *v == nil { + sv = &CreateContinuousDeploymentPolicyOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ContinuousDeploymentPolicy", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentContinuousDeploymentPolicy(&sv.ContinuousDeploymentPolicy, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpCreateDistribution struct { +} + +func (*awsRestxml_deserializeOpCreateDistribution) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreateDistribution) 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, awsRestxml_deserializeOpErrorCreateDistribution(response, &metadata) + } + output := &CreateDistributionOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsCreateDistributionOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentDistribution(&output.Distribution, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreateDistribution(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("CNAMEAlreadyExists", errorCode): + return awsRestxml_deserializeErrorCNAMEAlreadyExists(response, errorBody) + + case strings.EqualFold("ContinuousDeploymentPolicyInUse", errorCode): + return awsRestxml_deserializeErrorContinuousDeploymentPolicyInUse(response, errorBody) + + case strings.EqualFold("DistributionAlreadyExists", errorCode): + return awsRestxml_deserializeErrorDistributionAlreadyExists(response, errorBody) + + case strings.EqualFold("IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior", errorCode): + return awsRestxml_deserializeErrorIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(response, errorBody) + + case strings.EqualFold("IllegalOriginAccessConfiguration", errorCode): + return awsRestxml_deserializeErrorIllegalOriginAccessConfiguration(response, errorBody) + + case strings.EqualFold("InconsistentQuantities", errorCode): + return awsRestxml_deserializeErrorInconsistentQuantities(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidDefaultRootObject", errorCode): + return awsRestxml_deserializeErrorInvalidDefaultRootObject(response, errorBody) + + case strings.EqualFold("InvalidDomainNameForOriginAccessControl", errorCode): + return awsRestxml_deserializeErrorInvalidDomainNameForOriginAccessControl(response, errorBody) + + case strings.EqualFold("InvalidErrorCode", errorCode): + return awsRestxml_deserializeErrorInvalidErrorCode(response, errorBody) + + case strings.EqualFold("InvalidForwardCookies", errorCode): + return awsRestxml_deserializeErrorInvalidForwardCookies(response, errorBody) + + case strings.EqualFold("InvalidFunctionAssociation", errorCode): + return awsRestxml_deserializeErrorInvalidFunctionAssociation(response, errorBody) + + case strings.EqualFold("InvalidGeoRestrictionParameter", errorCode): + return awsRestxml_deserializeErrorInvalidGeoRestrictionParameter(response, errorBody) + + case strings.EqualFold("InvalidHeadersForS3Origin", errorCode): + return awsRestxml_deserializeErrorInvalidHeadersForS3Origin(response, errorBody) + + case strings.EqualFold("InvalidLambdaFunctionAssociation", errorCode): + return awsRestxml_deserializeErrorInvalidLambdaFunctionAssociation(response, errorBody) + + case strings.EqualFold("InvalidLocationCode", errorCode): + return awsRestxml_deserializeErrorInvalidLocationCode(response, errorBody) + + case strings.EqualFold("InvalidMinimumProtocolVersion", errorCode): + return awsRestxml_deserializeErrorInvalidMinimumProtocolVersion(response, errorBody) + + case strings.EqualFold("InvalidOrigin", errorCode): + return awsRestxml_deserializeErrorInvalidOrigin(response, errorBody) + + case strings.EqualFold("InvalidOriginAccessControl", errorCode): + return awsRestxml_deserializeErrorInvalidOriginAccessControl(response, errorBody) + + case strings.EqualFold("InvalidOriginAccessIdentity", errorCode): + return awsRestxml_deserializeErrorInvalidOriginAccessIdentity(response, errorBody) + + case strings.EqualFold("InvalidOriginKeepaliveTimeout", errorCode): + return awsRestxml_deserializeErrorInvalidOriginKeepaliveTimeout(response, errorBody) + + case strings.EqualFold("InvalidOriginReadTimeout", errorCode): + return awsRestxml_deserializeErrorInvalidOriginReadTimeout(response, errorBody) + + case strings.EqualFold("InvalidProtocolSettings", errorCode): + return awsRestxml_deserializeErrorInvalidProtocolSettings(response, errorBody) + + case strings.EqualFold("InvalidQueryStringParameters", errorCode): + return awsRestxml_deserializeErrorInvalidQueryStringParameters(response, errorBody) + + case strings.EqualFold("InvalidRelativePath", errorCode): + return awsRestxml_deserializeErrorInvalidRelativePath(response, errorBody) + + case strings.EqualFold("InvalidRequiredProtocol", errorCode): + return awsRestxml_deserializeErrorInvalidRequiredProtocol(response, errorBody) + + case strings.EqualFold("InvalidResponseCode", errorCode): + return awsRestxml_deserializeErrorInvalidResponseCode(response, errorBody) + + case strings.EqualFold("InvalidTTLOrder", errorCode): + return awsRestxml_deserializeErrorInvalidTTLOrder(response, errorBody) + + case strings.EqualFold("InvalidViewerCertificate", errorCode): + return awsRestxml_deserializeErrorInvalidViewerCertificate(response, errorBody) + + case strings.EqualFold("InvalidWebACLId", errorCode): + return awsRestxml_deserializeErrorInvalidWebACLId(response, errorBody) + + case strings.EqualFold("MissingBody", errorCode): + return awsRestxml_deserializeErrorMissingBody(response, errorBody) + + case strings.EqualFold("NoSuchCachePolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchCachePolicy(response, errorBody) + + case strings.EqualFold("NoSuchContinuousDeploymentPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchContinuousDeploymentPolicy(response, errorBody) + + case strings.EqualFold("NoSuchFieldLevelEncryptionConfig", errorCode): + return awsRestxml_deserializeErrorNoSuchFieldLevelEncryptionConfig(response, errorBody) + + case strings.EqualFold("NoSuchOrigin", errorCode): + return awsRestxml_deserializeErrorNoSuchOrigin(response, errorBody) + + case strings.EqualFold("NoSuchOriginRequestPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchOriginRequestPolicy(response, errorBody) + + case strings.EqualFold("NoSuchRealtimeLogConfig", errorCode): + return awsRestxml_deserializeErrorNoSuchRealtimeLogConfig(response, errorBody) + + case strings.EqualFold("NoSuchResponseHeadersPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchResponseHeadersPolicy(response, errorBody) + + case strings.EqualFold("RealtimeLogConfigOwnerMismatch", errorCode): + return awsRestxml_deserializeErrorRealtimeLogConfigOwnerMismatch(response, errorBody) + + case strings.EqualFold("TooManyCacheBehaviors", errorCode): + return awsRestxml_deserializeErrorTooManyCacheBehaviors(response, errorBody) + + case strings.EqualFold("TooManyCertificates", errorCode): + return awsRestxml_deserializeErrorTooManyCertificates(response, errorBody) + + case strings.EqualFold("TooManyCookieNamesInWhiteList", errorCode): + return awsRestxml_deserializeErrorTooManyCookieNamesInWhiteList(response, errorBody) + + case strings.EqualFold("TooManyDistributionCNAMEs", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionCNAMEs(response, errorBody) + + case strings.EqualFold("TooManyDistributions", errorCode): + return awsRestxml_deserializeErrorTooManyDistributions(response, errorBody) + + case strings.EqualFold("TooManyDistributionsAssociatedToCachePolicy", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToCachePolicy(response, errorBody) + + case strings.EqualFold("TooManyDistributionsAssociatedToFieldLevelEncryptionConfig", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToFieldLevelEncryptionConfig(response, errorBody) + + case strings.EqualFold("TooManyDistributionsAssociatedToKeyGroup", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToKeyGroup(response, errorBody) + + case strings.EqualFold("TooManyDistributionsAssociatedToOriginAccessControl", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToOriginAccessControl(response, errorBody) + + case strings.EqualFold("TooManyDistributionsAssociatedToOriginRequestPolicy", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToOriginRequestPolicy(response, errorBody) + + case strings.EqualFold("TooManyDistributionsAssociatedToResponseHeadersPolicy", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToResponseHeadersPolicy(response, errorBody) + + case strings.EqualFold("TooManyDistributionsWithFunctionAssociations", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsWithFunctionAssociations(response, errorBody) + + case strings.EqualFold("TooManyDistributionsWithLambdaAssociations", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsWithLambdaAssociations(response, errorBody) + + case strings.EqualFold("TooManyDistributionsWithSingleFunctionARN", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsWithSingleFunctionARN(response, errorBody) + + case strings.EqualFold("TooManyFunctionAssociations", errorCode): + return awsRestxml_deserializeErrorTooManyFunctionAssociations(response, errorBody) + + case strings.EqualFold("TooManyHeadersInForwardedValues", errorCode): + return awsRestxml_deserializeErrorTooManyHeadersInForwardedValues(response, errorBody) + + case strings.EqualFold("TooManyKeyGroupsAssociatedToDistribution", errorCode): + return awsRestxml_deserializeErrorTooManyKeyGroupsAssociatedToDistribution(response, errorBody) + + case strings.EqualFold("TooManyLambdaFunctionAssociations", errorCode): + return awsRestxml_deserializeErrorTooManyLambdaFunctionAssociations(response, errorBody) + + case strings.EqualFold("TooManyOriginCustomHeaders", errorCode): + return awsRestxml_deserializeErrorTooManyOriginCustomHeaders(response, errorBody) + + case strings.EqualFold("TooManyOriginGroupsPerDistribution", errorCode): + return awsRestxml_deserializeErrorTooManyOriginGroupsPerDistribution(response, errorBody) + + case strings.EqualFold("TooManyOrigins", errorCode): + return awsRestxml_deserializeErrorTooManyOrigins(response, errorBody) + + case strings.EqualFold("TooManyQueryStringParameters", errorCode): + return awsRestxml_deserializeErrorTooManyQueryStringParameters(response, errorBody) + + case strings.EqualFold("TooManyTrustedSigners", errorCode): + return awsRestxml_deserializeErrorTooManyTrustedSigners(response, errorBody) + + case strings.EqualFold("TrustedKeyGroupDoesNotExist", errorCode): + return awsRestxml_deserializeErrorTrustedKeyGroupDoesNotExist(response, errorBody) + + case strings.EqualFold("TrustedSignerDoesNotExist", errorCode): + return awsRestxml_deserializeErrorTrustedSignerDoesNotExist(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsCreateDistributionOutput(v *CreateDistributionOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Location = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentCreateDistributionOutput(v **CreateDistributionOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateDistributionOutput + if *v == nil { + sv = &CreateDistributionOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Distribution", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentDistribution(&sv.Distribution, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpCreateDistributionWithTags struct { +} + +func (*awsRestxml_deserializeOpCreateDistributionWithTags) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreateDistributionWithTags) 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, awsRestxml_deserializeOpErrorCreateDistributionWithTags(response, &metadata) + } + output := &CreateDistributionWithTagsOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsCreateDistributionWithTagsOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentDistribution(&output.Distribution, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreateDistributionWithTags(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("CNAMEAlreadyExists", errorCode): + return awsRestxml_deserializeErrorCNAMEAlreadyExists(response, errorBody) + + case strings.EqualFold("ContinuousDeploymentPolicyInUse", errorCode): + return awsRestxml_deserializeErrorContinuousDeploymentPolicyInUse(response, errorBody) + + case strings.EqualFold("DistributionAlreadyExists", errorCode): + return awsRestxml_deserializeErrorDistributionAlreadyExists(response, errorBody) + + case strings.EqualFold("IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior", errorCode): + return awsRestxml_deserializeErrorIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(response, errorBody) + + case strings.EqualFold("IllegalOriginAccessConfiguration", errorCode): + return awsRestxml_deserializeErrorIllegalOriginAccessConfiguration(response, errorBody) + + case strings.EqualFold("InconsistentQuantities", errorCode): + return awsRestxml_deserializeErrorInconsistentQuantities(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidDefaultRootObject", errorCode): + return awsRestxml_deserializeErrorInvalidDefaultRootObject(response, errorBody) + + case strings.EqualFold("InvalidDomainNameForOriginAccessControl", errorCode): + return awsRestxml_deserializeErrorInvalidDomainNameForOriginAccessControl(response, errorBody) + + case strings.EqualFold("InvalidErrorCode", errorCode): + return awsRestxml_deserializeErrorInvalidErrorCode(response, errorBody) + + case strings.EqualFold("InvalidForwardCookies", errorCode): + return awsRestxml_deserializeErrorInvalidForwardCookies(response, errorBody) + + case strings.EqualFold("InvalidFunctionAssociation", errorCode): + return awsRestxml_deserializeErrorInvalidFunctionAssociation(response, errorBody) + + case strings.EqualFold("InvalidGeoRestrictionParameter", errorCode): + return awsRestxml_deserializeErrorInvalidGeoRestrictionParameter(response, errorBody) + + case strings.EqualFold("InvalidHeadersForS3Origin", errorCode): + return awsRestxml_deserializeErrorInvalidHeadersForS3Origin(response, errorBody) + + case strings.EqualFold("InvalidLambdaFunctionAssociation", errorCode): + return awsRestxml_deserializeErrorInvalidLambdaFunctionAssociation(response, errorBody) + + case strings.EqualFold("InvalidLocationCode", errorCode): + return awsRestxml_deserializeErrorInvalidLocationCode(response, errorBody) + + case strings.EqualFold("InvalidMinimumProtocolVersion", errorCode): + return awsRestxml_deserializeErrorInvalidMinimumProtocolVersion(response, errorBody) + + case strings.EqualFold("InvalidOrigin", errorCode): + return awsRestxml_deserializeErrorInvalidOrigin(response, errorBody) + + case strings.EqualFold("InvalidOriginAccessControl", errorCode): + return awsRestxml_deserializeErrorInvalidOriginAccessControl(response, errorBody) + + case strings.EqualFold("InvalidOriginAccessIdentity", errorCode): + return awsRestxml_deserializeErrorInvalidOriginAccessIdentity(response, errorBody) + + case strings.EqualFold("InvalidOriginKeepaliveTimeout", errorCode): + return awsRestxml_deserializeErrorInvalidOriginKeepaliveTimeout(response, errorBody) + + case strings.EqualFold("InvalidOriginReadTimeout", errorCode): + return awsRestxml_deserializeErrorInvalidOriginReadTimeout(response, errorBody) + + case strings.EqualFold("InvalidProtocolSettings", errorCode): + return awsRestxml_deserializeErrorInvalidProtocolSettings(response, errorBody) + + case strings.EqualFold("InvalidQueryStringParameters", errorCode): + return awsRestxml_deserializeErrorInvalidQueryStringParameters(response, errorBody) + + case strings.EqualFold("InvalidRelativePath", errorCode): + return awsRestxml_deserializeErrorInvalidRelativePath(response, errorBody) + + case strings.EqualFold("InvalidRequiredProtocol", errorCode): + return awsRestxml_deserializeErrorInvalidRequiredProtocol(response, errorBody) + + case strings.EqualFold("InvalidResponseCode", errorCode): + return awsRestxml_deserializeErrorInvalidResponseCode(response, errorBody) + + case strings.EqualFold("InvalidTTLOrder", errorCode): + return awsRestxml_deserializeErrorInvalidTTLOrder(response, errorBody) + + case strings.EqualFold("InvalidTagging", errorCode): + return awsRestxml_deserializeErrorInvalidTagging(response, errorBody) + + case strings.EqualFold("InvalidViewerCertificate", errorCode): + return awsRestxml_deserializeErrorInvalidViewerCertificate(response, errorBody) + + case strings.EqualFold("InvalidWebACLId", errorCode): + return awsRestxml_deserializeErrorInvalidWebACLId(response, errorBody) + + case strings.EqualFold("MissingBody", errorCode): + return awsRestxml_deserializeErrorMissingBody(response, errorBody) + + case strings.EqualFold("NoSuchCachePolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchCachePolicy(response, errorBody) + + case strings.EqualFold("NoSuchContinuousDeploymentPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchContinuousDeploymentPolicy(response, errorBody) + + case strings.EqualFold("NoSuchFieldLevelEncryptionConfig", errorCode): + return awsRestxml_deserializeErrorNoSuchFieldLevelEncryptionConfig(response, errorBody) + + case strings.EqualFold("NoSuchOrigin", errorCode): + return awsRestxml_deserializeErrorNoSuchOrigin(response, errorBody) + + case strings.EqualFold("NoSuchOriginRequestPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchOriginRequestPolicy(response, errorBody) + + case strings.EqualFold("NoSuchRealtimeLogConfig", errorCode): + return awsRestxml_deserializeErrorNoSuchRealtimeLogConfig(response, errorBody) + + case strings.EqualFold("NoSuchResponseHeadersPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchResponseHeadersPolicy(response, errorBody) + + case strings.EqualFold("RealtimeLogConfigOwnerMismatch", errorCode): + return awsRestxml_deserializeErrorRealtimeLogConfigOwnerMismatch(response, errorBody) + + case strings.EqualFold("TooManyCacheBehaviors", errorCode): + return awsRestxml_deserializeErrorTooManyCacheBehaviors(response, errorBody) + + case strings.EqualFold("TooManyCertificates", errorCode): + return awsRestxml_deserializeErrorTooManyCertificates(response, errorBody) + + case strings.EqualFold("TooManyCookieNamesInWhiteList", errorCode): + return awsRestxml_deserializeErrorTooManyCookieNamesInWhiteList(response, errorBody) + + case strings.EqualFold("TooManyDistributionCNAMEs", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionCNAMEs(response, errorBody) + + case strings.EqualFold("TooManyDistributions", errorCode): + return awsRestxml_deserializeErrorTooManyDistributions(response, errorBody) + + case strings.EqualFold("TooManyDistributionsAssociatedToCachePolicy", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToCachePolicy(response, errorBody) + + case strings.EqualFold("TooManyDistributionsAssociatedToFieldLevelEncryptionConfig", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToFieldLevelEncryptionConfig(response, errorBody) + + case strings.EqualFold("TooManyDistributionsAssociatedToKeyGroup", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToKeyGroup(response, errorBody) + + case strings.EqualFold("TooManyDistributionsAssociatedToOriginAccessControl", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToOriginAccessControl(response, errorBody) + + case strings.EqualFold("TooManyDistributionsAssociatedToOriginRequestPolicy", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToOriginRequestPolicy(response, errorBody) + + case strings.EqualFold("TooManyDistributionsAssociatedToResponseHeadersPolicy", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToResponseHeadersPolicy(response, errorBody) + + case strings.EqualFold("TooManyDistributionsWithFunctionAssociations", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsWithFunctionAssociations(response, errorBody) + + case strings.EqualFold("TooManyDistributionsWithLambdaAssociations", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsWithLambdaAssociations(response, errorBody) + + case strings.EqualFold("TooManyDistributionsWithSingleFunctionARN", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsWithSingleFunctionARN(response, errorBody) + + case strings.EqualFold("TooManyFunctionAssociations", errorCode): + return awsRestxml_deserializeErrorTooManyFunctionAssociations(response, errorBody) + + case strings.EqualFold("TooManyHeadersInForwardedValues", errorCode): + return awsRestxml_deserializeErrorTooManyHeadersInForwardedValues(response, errorBody) + + case strings.EqualFold("TooManyKeyGroupsAssociatedToDistribution", errorCode): + return awsRestxml_deserializeErrorTooManyKeyGroupsAssociatedToDistribution(response, errorBody) + + case strings.EqualFold("TooManyLambdaFunctionAssociations", errorCode): + return awsRestxml_deserializeErrorTooManyLambdaFunctionAssociations(response, errorBody) + + case strings.EqualFold("TooManyOriginCustomHeaders", errorCode): + return awsRestxml_deserializeErrorTooManyOriginCustomHeaders(response, errorBody) + + case strings.EqualFold("TooManyOriginGroupsPerDistribution", errorCode): + return awsRestxml_deserializeErrorTooManyOriginGroupsPerDistribution(response, errorBody) + + case strings.EqualFold("TooManyOrigins", errorCode): + return awsRestxml_deserializeErrorTooManyOrigins(response, errorBody) + + case strings.EqualFold("TooManyQueryStringParameters", errorCode): + return awsRestxml_deserializeErrorTooManyQueryStringParameters(response, errorBody) + + case strings.EqualFold("TooManyTrustedSigners", errorCode): + return awsRestxml_deserializeErrorTooManyTrustedSigners(response, errorBody) + + case strings.EqualFold("TrustedKeyGroupDoesNotExist", errorCode): + return awsRestxml_deserializeErrorTrustedKeyGroupDoesNotExist(response, errorBody) + + case strings.EqualFold("TrustedSignerDoesNotExist", errorCode): + return awsRestxml_deserializeErrorTrustedSignerDoesNotExist(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsCreateDistributionWithTagsOutput(v *CreateDistributionWithTagsOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Location = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentCreateDistributionWithTagsOutput(v **CreateDistributionWithTagsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateDistributionWithTagsOutput + if *v == nil { + sv = &CreateDistributionWithTagsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Distribution", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentDistribution(&sv.Distribution, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpCreateFieldLevelEncryptionConfig struct { +} + +func (*awsRestxml_deserializeOpCreateFieldLevelEncryptionConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreateFieldLevelEncryptionConfig) 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, awsRestxml_deserializeOpErrorCreateFieldLevelEncryptionConfig(response, &metadata) + } + output := &CreateFieldLevelEncryptionConfigOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsCreateFieldLevelEncryptionConfigOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentFieldLevelEncryption(&output.FieldLevelEncryption, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreateFieldLevelEncryptionConfig(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("FieldLevelEncryptionConfigAlreadyExists", errorCode): + return awsRestxml_deserializeErrorFieldLevelEncryptionConfigAlreadyExists(response, errorBody) + + case strings.EqualFold("InconsistentQuantities", errorCode): + return awsRestxml_deserializeErrorInconsistentQuantities(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("NoSuchFieldLevelEncryptionProfile", errorCode): + return awsRestxml_deserializeErrorNoSuchFieldLevelEncryptionProfile(response, errorBody) + + case strings.EqualFold("QueryArgProfileEmpty", errorCode): + return awsRestxml_deserializeErrorQueryArgProfileEmpty(response, errorBody) + + case strings.EqualFold("TooManyFieldLevelEncryptionConfigs", errorCode): + return awsRestxml_deserializeErrorTooManyFieldLevelEncryptionConfigs(response, errorBody) + + case strings.EqualFold("TooManyFieldLevelEncryptionContentTypeProfiles", errorCode): + return awsRestxml_deserializeErrorTooManyFieldLevelEncryptionContentTypeProfiles(response, errorBody) + + case strings.EqualFold("TooManyFieldLevelEncryptionQueryArgProfiles", errorCode): + return awsRestxml_deserializeErrorTooManyFieldLevelEncryptionQueryArgProfiles(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsCreateFieldLevelEncryptionConfigOutput(v *CreateFieldLevelEncryptionConfigOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Location = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentCreateFieldLevelEncryptionConfigOutput(v **CreateFieldLevelEncryptionConfigOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateFieldLevelEncryptionConfigOutput + if *v == nil { + sv = &CreateFieldLevelEncryptionConfigOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("FieldLevelEncryption", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFieldLevelEncryption(&sv.FieldLevelEncryption, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpCreateFieldLevelEncryptionProfile struct { +} + +func (*awsRestxml_deserializeOpCreateFieldLevelEncryptionProfile) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreateFieldLevelEncryptionProfile) 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, awsRestxml_deserializeOpErrorCreateFieldLevelEncryptionProfile(response, &metadata) + } + output := &CreateFieldLevelEncryptionProfileOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsCreateFieldLevelEncryptionProfileOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentFieldLevelEncryptionProfile(&output.FieldLevelEncryptionProfile, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreateFieldLevelEncryptionProfile(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("FieldLevelEncryptionProfileAlreadyExists", errorCode): + return awsRestxml_deserializeErrorFieldLevelEncryptionProfileAlreadyExists(response, errorBody) + + case strings.EqualFold("FieldLevelEncryptionProfileSizeExceeded", errorCode): + return awsRestxml_deserializeErrorFieldLevelEncryptionProfileSizeExceeded(response, errorBody) + + case strings.EqualFold("InconsistentQuantities", errorCode): + return awsRestxml_deserializeErrorInconsistentQuantities(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("NoSuchPublicKey", errorCode): + return awsRestxml_deserializeErrorNoSuchPublicKey(response, errorBody) + + case strings.EqualFold("TooManyFieldLevelEncryptionEncryptionEntities", errorCode): + return awsRestxml_deserializeErrorTooManyFieldLevelEncryptionEncryptionEntities(response, errorBody) + + case strings.EqualFold("TooManyFieldLevelEncryptionFieldPatterns", errorCode): + return awsRestxml_deserializeErrorTooManyFieldLevelEncryptionFieldPatterns(response, errorBody) + + case strings.EqualFold("TooManyFieldLevelEncryptionProfiles", errorCode): + return awsRestxml_deserializeErrorTooManyFieldLevelEncryptionProfiles(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsCreateFieldLevelEncryptionProfileOutput(v *CreateFieldLevelEncryptionProfileOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Location = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentCreateFieldLevelEncryptionProfileOutput(v **CreateFieldLevelEncryptionProfileOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateFieldLevelEncryptionProfileOutput + if *v == nil { + sv = &CreateFieldLevelEncryptionProfileOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("FieldLevelEncryptionProfile", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFieldLevelEncryptionProfile(&sv.FieldLevelEncryptionProfile, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpCreateFunction struct { +} + +func (*awsRestxml_deserializeOpCreateFunction) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreateFunction) 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, awsRestxml_deserializeOpErrorCreateFunction(response, &metadata) + } + output := &CreateFunctionOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsCreateFunctionOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentFunctionSummary(&output.FunctionSummary, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreateFunction(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("FunctionAlreadyExists", errorCode): + return awsRestxml_deserializeErrorFunctionAlreadyExists(response, errorBody) + + case strings.EqualFold("FunctionSizeLimitExceeded", errorCode): + return awsRestxml_deserializeErrorFunctionSizeLimitExceeded(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("TooManyFunctions", errorCode): + return awsRestxml_deserializeErrorTooManyFunctions(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsCreateFunctionOutput(v *CreateFunctionOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Location = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentCreateFunctionOutput(v **CreateFunctionOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateFunctionOutput + if *v == nil { + sv = &CreateFunctionOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("FunctionSummary", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFunctionSummary(&sv.FunctionSummary, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpCreateInvalidation struct { +} + +func (*awsRestxml_deserializeOpCreateInvalidation) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreateInvalidation) 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, awsRestxml_deserializeOpErrorCreateInvalidation(response, &metadata) + } + output := &CreateInvalidationOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsCreateInvalidationOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentInvalidation(&output.Invalidation, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreateInvalidation(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("BatchTooLarge", errorCode): + return awsRestxml_deserializeErrorBatchTooLarge(response, errorBody) + + case strings.EqualFold("InconsistentQuantities", errorCode): + return awsRestxml_deserializeErrorInconsistentQuantities(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("MissingBody", errorCode): + return awsRestxml_deserializeErrorMissingBody(response, errorBody) + + case strings.EqualFold("NoSuchDistribution", errorCode): + return awsRestxml_deserializeErrorNoSuchDistribution(response, errorBody) + + case strings.EqualFold("TooManyInvalidationsInProgress", errorCode): + return awsRestxml_deserializeErrorTooManyInvalidationsInProgress(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsCreateInvalidationOutput(v *CreateInvalidationOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Location = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentCreateInvalidationOutput(v **CreateInvalidationOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateInvalidationOutput + if *v == nil { + sv = &CreateInvalidationOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Invalidation", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentInvalidation(&sv.Invalidation, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpCreateKeyGroup struct { +} + +func (*awsRestxml_deserializeOpCreateKeyGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreateKeyGroup) 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, awsRestxml_deserializeOpErrorCreateKeyGroup(response, &metadata) + } + output := &CreateKeyGroupOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsCreateKeyGroupOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentKeyGroup(&output.KeyGroup, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreateKeyGroup(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("KeyGroupAlreadyExists", errorCode): + return awsRestxml_deserializeErrorKeyGroupAlreadyExists(response, errorBody) + + case strings.EqualFold("TooManyKeyGroups", errorCode): + return awsRestxml_deserializeErrorTooManyKeyGroups(response, errorBody) + + case strings.EqualFold("TooManyPublicKeysInKeyGroup", errorCode): + return awsRestxml_deserializeErrorTooManyPublicKeysInKeyGroup(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsCreateKeyGroupOutput(v *CreateKeyGroupOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Location = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentCreateKeyGroupOutput(v **CreateKeyGroupOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateKeyGroupOutput + if *v == nil { + sv = &CreateKeyGroupOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("KeyGroup", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentKeyGroup(&sv.KeyGroup, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpCreateKeyValueStore struct { +} + +func (*awsRestxml_deserializeOpCreateKeyValueStore) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreateKeyValueStore) 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, awsRestxml_deserializeOpErrorCreateKeyValueStore(response, &metadata) + } + output := &CreateKeyValueStoreOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsCreateKeyValueStoreOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentKeyValueStore(&output.KeyValueStore, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreateKeyValueStore(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("EntityAlreadyExists", errorCode): + return awsRestxml_deserializeErrorEntityAlreadyExists(response, errorBody) + + case strings.EqualFold("EntityLimitExceeded", errorCode): + return awsRestxml_deserializeErrorEntityLimitExceeded(response, errorBody) + + case strings.EqualFold("EntitySizeLimitExceeded", errorCode): + return awsRestxml_deserializeErrorEntitySizeLimitExceeded(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsCreateKeyValueStoreOutput(v *CreateKeyValueStoreOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Location = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentCreateKeyValueStoreOutput(v **CreateKeyValueStoreOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateKeyValueStoreOutput + if *v == nil { + sv = &CreateKeyValueStoreOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("KeyValueStore", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentKeyValueStore(&sv.KeyValueStore, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpCreateMonitoringSubscription struct { +} + +func (*awsRestxml_deserializeOpCreateMonitoringSubscription) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreateMonitoringSubscription) 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, awsRestxml_deserializeOpErrorCreateMonitoringSubscription(response, &metadata) + } + output := &CreateMonitoringSubscriptionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentMonitoringSubscription(&output.MonitoringSubscription, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreateMonitoringSubscription(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("MonitoringSubscriptionAlreadyExists", errorCode): + return awsRestxml_deserializeErrorMonitoringSubscriptionAlreadyExists(response, errorBody) + + case strings.EqualFold("NoSuchDistribution", errorCode): + return awsRestxml_deserializeErrorNoSuchDistribution(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentCreateMonitoringSubscriptionOutput(v **CreateMonitoringSubscriptionOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateMonitoringSubscriptionOutput + if *v == nil { + sv = &CreateMonitoringSubscriptionOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("MonitoringSubscription", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentMonitoringSubscription(&sv.MonitoringSubscription, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpCreateOriginAccessControl struct { +} + +func (*awsRestxml_deserializeOpCreateOriginAccessControl) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreateOriginAccessControl) 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, awsRestxml_deserializeOpErrorCreateOriginAccessControl(response, &metadata) + } + output := &CreateOriginAccessControlOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsCreateOriginAccessControlOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentOriginAccessControl(&output.OriginAccessControl, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreateOriginAccessControl(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("OriginAccessControlAlreadyExists", errorCode): + return awsRestxml_deserializeErrorOriginAccessControlAlreadyExists(response, errorBody) + + case strings.EqualFold("TooManyOriginAccessControls", errorCode): + return awsRestxml_deserializeErrorTooManyOriginAccessControls(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsCreateOriginAccessControlOutput(v *CreateOriginAccessControlOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Location = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentCreateOriginAccessControlOutput(v **CreateOriginAccessControlOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateOriginAccessControlOutput + if *v == nil { + sv = &CreateOriginAccessControlOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("OriginAccessControl", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOriginAccessControl(&sv.OriginAccessControl, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpCreateOriginRequestPolicy struct { +} + +func (*awsRestxml_deserializeOpCreateOriginRequestPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreateOriginRequestPolicy) 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, awsRestxml_deserializeOpErrorCreateOriginRequestPolicy(response, &metadata) + } + output := &CreateOriginRequestPolicyOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsCreateOriginRequestPolicyOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentOriginRequestPolicy(&output.OriginRequestPolicy, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreateOriginRequestPolicy(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("InconsistentQuantities", errorCode): + return awsRestxml_deserializeErrorInconsistentQuantities(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("OriginRequestPolicyAlreadyExists", errorCode): + return awsRestxml_deserializeErrorOriginRequestPolicyAlreadyExists(response, errorBody) + + case strings.EqualFold("TooManyCookiesInOriginRequestPolicy", errorCode): + return awsRestxml_deserializeErrorTooManyCookiesInOriginRequestPolicy(response, errorBody) + + case strings.EqualFold("TooManyHeadersInOriginRequestPolicy", errorCode): + return awsRestxml_deserializeErrorTooManyHeadersInOriginRequestPolicy(response, errorBody) + + case strings.EqualFold("TooManyOriginRequestPolicies", errorCode): + return awsRestxml_deserializeErrorTooManyOriginRequestPolicies(response, errorBody) + + case strings.EqualFold("TooManyQueryStringsInOriginRequestPolicy", errorCode): + return awsRestxml_deserializeErrorTooManyQueryStringsInOriginRequestPolicy(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsCreateOriginRequestPolicyOutput(v *CreateOriginRequestPolicyOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Location = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentCreateOriginRequestPolicyOutput(v **CreateOriginRequestPolicyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateOriginRequestPolicyOutput + if *v == nil { + sv = &CreateOriginRequestPolicyOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("OriginRequestPolicy", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOriginRequestPolicy(&sv.OriginRequestPolicy, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpCreatePublicKey struct { +} + +func (*awsRestxml_deserializeOpCreatePublicKey) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreatePublicKey) 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, awsRestxml_deserializeOpErrorCreatePublicKey(response, &metadata) + } + output := &CreatePublicKeyOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsCreatePublicKeyOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentPublicKey(&output.PublicKey, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreatePublicKey(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("PublicKeyAlreadyExists", errorCode): + return awsRestxml_deserializeErrorPublicKeyAlreadyExists(response, errorBody) + + case strings.EqualFold("TooManyPublicKeys", errorCode): + return awsRestxml_deserializeErrorTooManyPublicKeys(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsCreatePublicKeyOutput(v *CreatePublicKeyOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Location = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentCreatePublicKeyOutput(v **CreatePublicKeyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreatePublicKeyOutput + if *v == nil { + sv = &CreatePublicKeyOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("PublicKey", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentPublicKey(&sv.PublicKey, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpCreateRealtimeLogConfig struct { +} + +func (*awsRestxml_deserializeOpCreateRealtimeLogConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreateRealtimeLogConfig) 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, awsRestxml_deserializeOpErrorCreateRealtimeLogConfig(response, &metadata) + } + output := &CreateRealtimeLogConfigOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentCreateRealtimeLogConfigOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreateRealtimeLogConfig(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("RealtimeLogConfigAlreadyExists", errorCode): + return awsRestxml_deserializeErrorRealtimeLogConfigAlreadyExists(response, errorBody) + + case strings.EqualFold("TooManyRealtimeLogConfigs", errorCode): + return awsRestxml_deserializeErrorTooManyRealtimeLogConfigs(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentCreateRealtimeLogConfigOutput(v **CreateRealtimeLogConfigOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateRealtimeLogConfigOutput + if *v == nil { + sv = &CreateRealtimeLogConfigOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("RealtimeLogConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentRealtimeLogConfig(&sv.RealtimeLogConfig, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpCreateResponseHeadersPolicy struct { +} + +func (*awsRestxml_deserializeOpCreateResponseHeadersPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreateResponseHeadersPolicy) 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, awsRestxml_deserializeOpErrorCreateResponseHeadersPolicy(response, &metadata) + } + output := &CreateResponseHeadersPolicyOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsCreateResponseHeadersPolicyOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentResponseHeadersPolicy(&output.ResponseHeadersPolicy, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreateResponseHeadersPolicy(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("InconsistentQuantities", errorCode): + return awsRestxml_deserializeErrorInconsistentQuantities(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("ResponseHeadersPolicyAlreadyExists", errorCode): + return awsRestxml_deserializeErrorResponseHeadersPolicyAlreadyExists(response, errorBody) + + case strings.EqualFold("TooLongCSPInResponseHeadersPolicy", errorCode): + return awsRestxml_deserializeErrorTooLongCSPInResponseHeadersPolicy(response, errorBody) + + case strings.EqualFold("TooManyCustomHeadersInResponseHeadersPolicy", errorCode): + return awsRestxml_deserializeErrorTooManyCustomHeadersInResponseHeadersPolicy(response, errorBody) + + case strings.EqualFold("TooManyRemoveHeadersInResponseHeadersPolicy", errorCode): + return awsRestxml_deserializeErrorTooManyRemoveHeadersInResponseHeadersPolicy(response, errorBody) + + case strings.EqualFold("TooManyResponseHeadersPolicies", errorCode): + return awsRestxml_deserializeErrorTooManyResponseHeadersPolicies(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsCreateResponseHeadersPolicyOutput(v *CreateResponseHeadersPolicyOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Location = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentCreateResponseHeadersPolicyOutput(v **CreateResponseHeadersPolicyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateResponseHeadersPolicyOutput + if *v == nil { + sv = &CreateResponseHeadersPolicyOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ResponseHeadersPolicy", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentResponseHeadersPolicy(&sv.ResponseHeadersPolicy, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpCreateStreamingDistribution struct { +} + +func (*awsRestxml_deserializeOpCreateStreamingDistribution) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreateStreamingDistribution) 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, awsRestxml_deserializeOpErrorCreateStreamingDistribution(response, &metadata) + } + output := &CreateStreamingDistributionOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsCreateStreamingDistributionOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentStreamingDistribution(&output.StreamingDistribution, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreateStreamingDistribution(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("CNAMEAlreadyExists", errorCode): + return awsRestxml_deserializeErrorCNAMEAlreadyExists(response, errorBody) + + case strings.EqualFold("InconsistentQuantities", errorCode): + return awsRestxml_deserializeErrorInconsistentQuantities(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidOrigin", errorCode): + return awsRestxml_deserializeErrorInvalidOrigin(response, errorBody) + + case strings.EqualFold("InvalidOriginAccessControl", errorCode): + return awsRestxml_deserializeErrorInvalidOriginAccessControl(response, errorBody) + + case strings.EqualFold("InvalidOriginAccessIdentity", errorCode): + return awsRestxml_deserializeErrorInvalidOriginAccessIdentity(response, errorBody) + + case strings.EqualFold("MissingBody", errorCode): + return awsRestxml_deserializeErrorMissingBody(response, errorBody) + + case strings.EqualFold("StreamingDistributionAlreadyExists", errorCode): + return awsRestxml_deserializeErrorStreamingDistributionAlreadyExists(response, errorBody) + + case strings.EqualFold("TooManyStreamingDistributionCNAMEs", errorCode): + return awsRestxml_deserializeErrorTooManyStreamingDistributionCNAMEs(response, errorBody) + + case strings.EqualFold("TooManyStreamingDistributions", errorCode): + return awsRestxml_deserializeErrorTooManyStreamingDistributions(response, errorBody) + + case strings.EqualFold("TooManyTrustedSigners", errorCode): + return awsRestxml_deserializeErrorTooManyTrustedSigners(response, errorBody) + + case strings.EqualFold("TrustedSignerDoesNotExist", errorCode): + return awsRestxml_deserializeErrorTrustedSignerDoesNotExist(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsCreateStreamingDistributionOutput(v *CreateStreamingDistributionOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Location = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentCreateStreamingDistributionOutput(v **CreateStreamingDistributionOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateStreamingDistributionOutput + if *v == nil { + sv = &CreateStreamingDistributionOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("StreamingDistribution", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentStreamingDistribution(&sv.StreamingDistribution, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpCreateStreamingDistributionWithTags struct { +} + +func (*awsRestxml_deserializeOpCreateStreamingDistributionWithTags) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpCreateStreamingDistributionWithTags) 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, awsRestxml_deserializeOpErrorCreateStreamingDistributionWithTags(response, &metadata) + } + output := &CreateStreamingDistributionWithTagsOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsCreateStreamingDistributionWithTagsOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentStreamingDistribution(&output.StreamingDistribution, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorCreateStreamingDistributionWithTags(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("CNAMEAlreadyExists", errorCode): + return awsRestxml_deserializeErrorCNAMEAlreadyExists(response, errorBody) + + case strings.EqualFold("InconsistentQuantities", errorCode): + return awsRestxml_deserializeErrorInconsistentQuantities(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidOrigin", errorCode): + return awsRestxml_deserializeErrorInvalidOrigin(response, errorBody) + + case strings.EqualFold("InvalidOriginAccessControl", errorCode): + return awsRestxml_deserializeErrorInvalidOriginAccessControl(response, errorBody) + + case strings.EqualFold("InvalidOriginAccessIdentity", errorCode): + return awsRestxml_deserializeErrorInvalidOriginAccessIdentity(response, errorBody) + + case strings.EqualFold("InvalidTagging", errorCode): + return awsRestxml_deserializeErrorInvalidTagging(response, errorBody) + + case strings.EqualFold("MissingBody", errorCode): + return awsRestxml_deserializeErrorMissingBody(response, errorBody) + + case strings.EqualFold("StreamingDistributionAlreadyExists", errorCode): + return awsRestxml_deserializeErrorStreamingDistributionAlreadyExists(response, errorBody) + + case strings.EqualFold("TooManyStreamingDistributionCNAMEs", errorCode): + return awsRestxml_deserializeErrorTooManyStreamingDistributionCNAMEs(response, errorBody) + + case strings.EqualFold("TooManyStreamingDistributions", errorCode): + return awsRestxml_deserializeErrorTooManyStreamingDistributions(response, errorBody) + + case strings.EqualFold("TooManyTrustedSigners", errorCode): + return awsRestxml_deserializeErrorTooManyTrustedSigners(response, errorBody) + + case strings.EqualFold("TrustedSignerDoesNotExist", errorCode): + return awsRestxml_deserializeErrorTrustedSignerDoesNotExist(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsCreateStreamingDistributionWithTagsOutput(v *CreateStreamingDistributionWithTagsOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Location = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentCreateStreamingDistributionWithTagsOutput(v **CreateStreamingDistributionWithTagsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *CreateStreamingDistributionWithTagsOutput + if *v == nil { + sv = &CreateStreamingDistributionWithTagsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("StreamingDistribution", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentStreamingDistribution(&sv.StreamingDistribution, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpDeleteCachePolicy struct { +} + +func (*awsRestxml_deserializeOpDeleteCachePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeleteCachePolicy) 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, awsRestxml_deserializeOpErrorDeleteCachePolicy(response, &metadata) + } + output := &DeleteCachePolicyOutput{} + 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 awsRestxml_deserializeOpErrorDeleteCachePolicy(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("CachePolicyInUse", errorCode): + return awsRestxml_deserializeErrorCachePolicyInUse(response, errorBody) + + case strings.EqualFold("IllegalDelete", errorCode): + return awsRestxml_deserializeErrorIllegalDelete(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("NoSuchCachePolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchCachePolicy(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpDeleteCloudFrontOriginAccessIdentity struct { +} + +func (*awsRestxml_deserializeOpDeleteCloudFrontOriginAccessIdentity) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeleteCloudFrontOriginAccessIdentity) 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, awsRestxml_deserializeOpErrorDeleteCloudFrontOriginAccessIdentity(response, &metadata) + } + output := &DeleteCloudFrontOriginAccessIdentityOutput{} + 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 awsRestxml_deserializeOpErrorDeleteCloudFrontOriginAccessIdentity(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("CloudFrontOriginAccessIdentityInUse", errorCode): + return awsRestxml_deserializeErrorCloudFrontOriginAccessIdentityInUse(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("NoSuchCloudFrontOriginAccessIdentity", errorCode): + return awsRestxml_deserializeErrorNoSuchCloudFrontOriginAccessIdentity(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpDeleteContinuousDeploymentPolicy struct { +} + +func (*awsRestxml_deserializeOpDeleteContinuousDeploymentPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeleteContinuousDeploymentPolicy) 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, awsRestxml_deserializeOpErrorDeleteContinuousDeploymentPolicy(response, &metadata) + } + output := &DeleteContinuousDeploymentPolicyOutput{} + 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 awsRestxml_deserializeOpErrorDeleteContinuousDeploymentPolicy(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("ContinuousDeploymentPolicyInUse", errorCode): + return awsRestxml_deserializeErrorContinuousDeploymentPolicyInUse(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("NoSuchContinuousDeploymentPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchContinuousDeploymentPolicy(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpDeleteDistribution struct { +} + +func (*awsRestxml_deserializeOpDeleteDistribution) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeleteDistribution) 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, awsRestxml_deserializeOpErrorDeleteDistribution(response, &metadata) + } + output := &DeleteDistributionOutput{} + 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 awsRestxml_deserializeOpErrorDeleteDistribution(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("DistributionNotDisabled", errorCode): + return awsRestxml_deserializeErrorDistributionNotDisabled(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("NoSuchDistribution", errorCode): + return awsRestxml_deserializeErrorNoSuchDistribution(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpDeleteFieldLevelEncryptionConfig struct { +} + +func (*awsRestxml_deserializeOpDeleteFieldLevelEncryptionConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeleteFieldLevelEncryptionConfig) 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, awsRestxml_deserializeOpErrorDeleteFieldLevelEncryptionConfig(response, &metadata) + } + output := &DeleteFieldLevelEncryptionConfigOutput{} + 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 awsRestxml_deserializeOpErrorDeleteFieldLevelEncryptionConfig(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("FieldLevelEncryptionConfigInUse", errorCode): + return awsRestxml_deserializeErrorFieldLevelEncryptionConfigInUse(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("NoSuchFieldLevelEncryptionConfig", errorCode): + return awsRestxml_deserializeErrorNoSuchFieldLevelEncryptionConfig(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpDeleteFieldLevelEncryptionProfile struct { +} + +func (*awsRestxml_deserializeOpDeleteFieldLevelEncryptionProfile) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeleteFieldLevelEncryptionProfile) 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, awsRestxml_deserializeOpErrorDeleteFieldLevelEncryptionProfile(response, &metadata) + } + output := &DeleteFieldLevelEncryptionProfileOutput{} + 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 awsRestxml_deserializeOpErrorDeleteFieldLevelEncryptionProfile(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("FieldLevelEncryptionProfileInUse", errorCode): + return awsRestxml_deserializeErrorFieldLevelEncryptionProfileInUse(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("NoSuchFieldLevelEncryptionProfile", errorCode): + return awsRestxml_deserializeErrorNoSuchFieldLevelEncryptionProfile(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpDeleteFunction struct { +} + +func (*awsRestxml_deserializeOpDeleteFunction) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeleteFunction) 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, awsRestxml_deserializeOpErrorDeleteFunction(response, &metadata) + } + output := &DeleteFunctionOutput{} + 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 awsRestxml_deserializeOpErrorDeleteFunction(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("FunctionInUse", errorCode): + return awsRestxml_deserializeErrorFunctionInUse(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("NoSuchFunctionExists", errorCode): + return awsRestxml_deserializeErrorNoSuchFunctionExists(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpDeleteKeyGroup struct { +} + +func (*awsRestxml_deserializeOpDeleteKeyGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeleteKeyGroup) 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, awsRestxml_deserializeOpErrorDeleteKeyGroup(response, &metadata) + } + output := &DeleteKeyGroupOutput{} + 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 awsRestxml_deserializeOpErrorDeleteKeyGroup(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("NoSuchResource", errorCode): + return awsRestxml_deserializeErrorNoSuchResource(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + case strings.EqualFold("ResourceInUse", errorCode): + return awsRestxml_deserializeErrorResourceInUse(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpDeleteKeyValueStore struct { +} + +func (*awsRestxml_deserializeOpDeleteKeyValueStore) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeleteKeyValueStore) 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, awsRestxml_deserializeOpErrorDeleteKeyValueStore(response, &metadata) + } + output := &DeleteKeyValueStoreOutput{} + 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 awsRestxml_deserializeOpErrorDeleteKeyValueStore(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("CannotDeleteEntityWhileInUse", errorCode): + return awsRestxml_deserializeErrorCannotDeleteEntityWhileInUse(response, errorBody) + + case strings.EqualFold("EntityNotFound", errorCode): + return awsRestxml_deserializeErrorEntityNotFound(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpDeleteMonitoringSubscription struct { +} + +func (*awsRestxml_deserializeOpDeleteMonitoringSubscription) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeleteMonitoringSubscription) 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, awsRestxml_deserializeOpErrorDeleteMonitoringSubscription(response, &metadata) + } + output := &DeleteMonitoringSubscriptionOutput{} + out.Result = output + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorDeleteMonitoringSubscription(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("NoSuchDistribution", errorCode): + return awsRestxml_deserializeErrorNoSuchDistribution(response, errorBody) + + case strings.EqualFold("NoSuchMonitoringSubscription", errorCode): + return awsRestxml_deserializeErrorNoSuchMonitoringSubscription(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpDeleteOriginAccessControl struct { +} + +func (*awsRestxml_deserializeOpDeleteOriginAccessControl) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeleteOriginAccessControl) 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, awsRestxml_deserializeOpErrorDeleteOriginAccessControl(response, &metadata) + } + output := &DeleteOriginAccessControlOutput{} + 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 awsRestxml_deserializeOpErrorDeleteOriginAccessControl(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("NoSuchOriginAccessControl", errorCode): + return awsRestxml_deserializeErrorNoSuchOriginAccessControl(response, errorBody) + + case strings.EqualFold("OriginAccessControlInUse", errorCode): + return awsRestxml_deserializeErrorOriginAccessControlInUse(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpDeleteOriginRequestPolicy struct { +} + +func (*awsRestxml_deserializeOpDeleteOriginRequestPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeleteOriginRequestPolicy) 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, awsRestxml_deserializeOpErrorDeleteOriginRequestPolicy(response, &metadata) + } + output := &DeleteOriginRequestPolicyOutput{} + 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 awsRestxml_deserializeOpErrorDeleteOriginRequestPolicy(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("IllegalDelete", errorCode): + return awsRestxml_deserializeErrorIllegalDelete(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("NoSuchOriginRequestPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchOriginRequestPolicy(response, errorBody) + + case strings.EqualFold("OriginRequestPolicyInUse", errorCode): + return awsRestxml_deserializeErrorOriginRequestPolicyInUse(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpDeletePublicKey struct { +} + +func (*awsRestxml_deserializeOpDeletePublicKey) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeletePublicKey) 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, awsRestxml_deserializeOpErrorDeletePublicKey(response, &metadata) + } + output := &DeletePublicKeyOutput{} + 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 awsRestxml_deserializeOpErrorDeletePublicKey(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("NoSuchPublicKey", errorCode): + return awsRestxml_deserializeErrorNoSuchPublicKey(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + case strings.EqualFold("PublicKeyInUse", errorCode): + return awsRestxml_deserializeErrorPublicKeyInUse(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpDeleteRealtimeLogConfig struct { +} + +func (*awsRestxml_deserializeOpDeleteRealtimeLogConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeleteRealtimeLogConfig) 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, awsRestxml_deserializeOpErrorDeleteRealtimeLogConfig(response, &metadata) + } + output := &DeleteRealtimeLogConfigOutput{} + 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 awsRestxml_deserializeOpErrorDeleteRealtimeLogConfig(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("NoSuchRealtimeLogConfig", errorCode): + return awsRestxml_deserializeErrorNoSuchRealtimeLogConfig(response, errorBody) + + case strings.EqualFold("RealtimeLogConfigInUse", errorCode): + return awsRestxml_deserializeErrorRealtimeLogConfigInUse(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpDeleteResponseHeadersPolicy struct { +} + +func (*awsRestxml_deserializeOpDeleteResponseHeadersPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeleteResponseHeadersPolicy) 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, awsRestxml_deserializeOpErrorDeleteResponseHeadersPolicy(response, &metadata) + } + output := &DeleteResponseHeadersPolicyOutput{} + 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 awsRestxml_deserializeOpErrorDeleteResponseHeadersPolicy(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("IllegalDelete", errorCode): + return awsRestxml_deserializeErrorIllegalDelete(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("NoSuchResponseHeadersPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchResponseHeadersPolicy(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + case strings.EqualFold("ResponseHeadersPolicyInUse", errorCode): + return awsRestxml_deserializeErrorResponseHeadersPolicyInUse(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpDeleteStreamingDistribution struct { +} + +func (*awsRestxml_deserializeOpDeleteStreamingDistribution) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDeleteStreamingDistribution) 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, awsRestxml_deserializeOpErrorDeleteStreamingDistribution(response, &metadata) + } + output := &DeleteStreamingDistributionOutput{} + 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 awsRestxml_deserializeOpErrorDeleteStreamingDistribution(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("NoSuchStreamingDistribution", errorCode): + return awsRestxml_deserializeErrorNoSuchStreamingDistribution(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + case strings.EqualFold("StreamingDistributionNotDisabled", errorCode): + return awsRestxml_deserializeErrorStreamingDistributionNotDisabled(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpDescribeFunction struct { +} + +func (*awsRestxml_deserializeOpDescribeFunction) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDescribeFunction) 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, awsRestxml_deserializeOpErrorDescribeFunction(response, &metadata) + } + output := &DescribeFunctionOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsDescribeFunctionOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentFunctionSummary(&output.FunctionSummary, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorDescribeFunction(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("NoSuchFunctionExists", errorCode): + return awsRestxml_deserializeErrorNoSuchFunctionExists(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsDescribeFunctionOutput(v *DescribeFunctionOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentDescribeFunctionOutput(v **DescribeFunctionOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *DescribeFunctionOutput + if *v == nil { + sv = &DescribeFunctionOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("FunctionSummary", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFunctionSummary(&sv.FunctionSummary, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpDescribeKeyValueStore struct { +} + +func (*awsRestxml_deserializeOpDescribeKeyValueStore) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpDescribeKeyValueStore) 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, awsRestxml_deserializeOpErrorDescribeKeyValueStore(response, &metadata) + } + output := &DescribeKeyValueStoreOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsDescribeKeyValueStoreOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentKeyValueStore(&output.KeyValueStore, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorDescribeKeyValueStore(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("EntityNotFound", errorCode): + return awsRestxml_deserializeErrorEntityNotFound(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsDescribeKeyValueStoreOutput(v *DescribeKeyValueStoreOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentDescribeKeyValueStoreOutput(v **DescribeKeyValueStoreOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *DescribeKeyValueStoreOutput + if *v == nil { + sv = &DescribeKeyValueStoreOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("KeyValueStore", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentKeyValueStore(&sv.KeyValueStore, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetCachePolicy struct { +} + +func (*awsRestxml_deserializeOpGetCachePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetCachePolicy) 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, awsRestxml_deserializeOpErrorGetCachePolicy(response, &metadata) + } + output := &GetCachePolicyOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsGetCachePolicyOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentCachePolicy(&output.CachePolicy, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetCachePolicy(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("NoSuchCachePolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchCachePolicy(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsGetCachePolicyOutput(v *GetCachePolicyOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentGetCachePolicyOutput(v **GetCachePolicyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetCachePolicyOutput + if *v == nil { + sv = &GetCachePolicyOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CachePolicy", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCachePolicy(&sv.CachePolicy, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetCachePolicyConfig struct { +} + +func (*awsRestxml_deserializeOpGetCachePolicyConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetCachePolicyConfig) 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, awsRestxml_deserializeOpErrorGetCachePolicyConfig(response, &metadata) + } + output := &GetCachePolicyConfigOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsGetCachePolicyConfigOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentCachePolicyConfig(&output.CachePolicyConfig, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetCachePolicyConfig(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("NoSuchCachePolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchCachePolicy(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsGetCachePolicyConfigOutput(v *GetCachePolicyConfigOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentGetCachePolicyConfigOutput(v **GetCachePolicyConfigOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetCachePolicyConfigOutput + if *v == nil { + sv = &GetCachePolicyConfigOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CachePolicyConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCachePolicyConfig(&sv.CachePolicyConfig, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetCloudFrontOriginAccessIdentity struct { +} + +func (*awsRestxml_deserializeOpGetCloudFrontOriginAccessIdentity) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetCloudFrontOriginAccessIdentity) 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, awsRestxml_deserializeOpErrorGetCloudFrontOriginAccessIdentity(response, &metadata) + } + output := &GetCloudFrontOriginAccessIdentityOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsGetCloudFrontOriginAccessIdentityOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentity(&output.CloudFrontOriginAccessIdentity, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetCloudFrontOriginAccessIdentity(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("NoSuchCloudFrontOriginAccessIdentity", errorCode): + return awsRestxml_deserializeErrorNoSuchCloudFrontOriginAccessIdentity(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsGetCloudFrontOriginAccessIdentityOutput(v *GetCloudFrontOriginAccessIdentityOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentGetCloudFrontOriginAccessIdentityOutput(v **GetCloudFrontOriginAccessIdentityOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetCloudFrontOriginAccessIdentityOutput + if *v == nil { + sv = &GetCloudFrontOriginAccessIdentityOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CloudFrontOriginAccessIdentity", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentity(&sv.CloudFrontOriginAccessIdentity, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetCloudFrontOriginAccessIdentityConfig struct { +} + +func (*awsRestxml_deserializeOpGetCloudFrontOriginAccessIdentityConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetCloudFrontOriginAccessIdentityConfig) 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, awsRestxml_deserializeOpErrorGetCloudFrontOriginAccessIdentityConfig(response, &metadata) + } + output := &GetCloudFrontOriginAccessIdentityConfigOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsGetCloudFrontOriginAccessIdentityConfigOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentityConfig(&output.CloudFrontOriginAccessIdentityConfig, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetCloudFrontOriginAccessIdentityConfig(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("NoSuchCloudFrontOriginAccessIdentity", errorCode): + return awsRestxml_deserializeErrorNoSuchCloudFrontOriginAccessIdentity(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsGetCloudFrontOriginAccessIdentityConfigOutput(v *GetCloudFrontOriginAccessIdentityConfigOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentGetCloudFrontOriginAccessIdentityConfigOutput(v **GetCloudFrontOriginAccessIdentityConfigOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetCloudFrontOriginAccessIdentityConfigOutput + if *v == nil { + sv = &GetCloudFrontOriginAccessIdentityConfigOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CloudFrontOriginAccessIdentityConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentityConfig(&sv.CloudFrontOriginAccessIdentityConfig, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetContinuousDeploymentPolicy struct { +} + +func (*awsRestxml_deserializeOpGetContinuousDeploymentPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetContinuousDeploymentPolicy) 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, awsRestxml_deserializeOpErrorGetContinuousDeploymentPolicy(response, &metadata) + } + output := &GetContinuousDeploymentPolicyOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsGetContinuousDeploymentPolicyOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentContinuousDeploymentPolicy(&output.ContinuousDeploymentPolicy, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetContinuousDeploymentPolicy(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("NoSuchContinuousDeploymentPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchContinuousDeploymentPolicy(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsGetContinuousDeploymentPolicyOutput(v *GetContinuousDeploymentPolicyOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentGetContinuousDeploymentPolicyOutput(v **GetContinuousDeploymentPolicyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetContinuousDeploymentPolicyOutput + if *v == nil { + sv = &GetContinuousDeploymentPolicyOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ContinuousDeploymentPolicy", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentContinuousDeploymentPolicy(&sv.ContinuousDeploymentPolicy, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetContinuousDeploymentPolicyConfig struct { +} + +func (*awsRestxml_deserializeOpGetContinuousDeploymentPolicyConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetContinuousDeploymentPolicyConfig) 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, awsRestxml_deserializeOpErrorGetContinuousDeploymentPolicyConfig(response, &metadata) + } + output := &GetContinuousDeploymentPolicyConfigOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsGetContinuousDeploymentPolicyConfigOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentContinuousDeploymentPolicyConfig(&output.ContinuousDeploymentPolicyConfig, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetContinuousDeploymentPolicyConfig(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("NoSuchContinuousDeploymentPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchContinuousDeploymentPolicy(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsGetContinuousDeploymentPolicyConfigOutput(v *GetContinuousDeploymentPolicyConfigOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentGetContinuousDeploymentPolicyConfigOutput(v **GetContinuousDeploymentPolicyConfigOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetContinuousDeploymentPolicyConfigOutput + if *v == nil { + sv = &GetContinuousDeploymentPolicyConfigOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ContinuousDeploymentPolicyConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentContinuousDeploymentPolicyConfig(&sv.ContinuousDeploymentPolicyConfig, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetDistribution struct { +} + +func (*awsRestxml_deserializeOpGetDistribution) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetDistribution) 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, awsRestxml_deserializeOpErrorGetDistribution(response, &metadata) + } + output := &GetDistributionOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsGetDistributionOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentDistribution(&output.Distribution, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetDistribution(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("NoSuchDistribution", errorCode): + return awsRestxml_deserializeErrorNoSuchDistribution(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsGetDistributionOutput(v *GetDistributionOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentGetDistributionOutput(v **GetDistributionOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetDistributionOutput + if *v == nil { + sv = &GetDistributionOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Distribution", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentDistribution(&sv.Distribution, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetDistributionConfig struct { +} + +func (*awsRestxml_deserializeOpGetDistributionConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetDistributionConfig) 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, awsRestxml_deserializeOpErrorGetDistributionConfig(response, &metadata) + } + output := &GetDistributionConfigOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsGetDistributionConfigOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentDistributionConfig(&output.DistributionConfig, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetDistributionConfig(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("NoSuchDistribution", errorCode): + return awsRestxml_deserializeErrorNoSuchDistribution(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsGetDistributionConfigOutput(v *GetDistributionConfigOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentGetDistributionConfigOutput(v **GetDistributionConfigOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetDistributionConfigOutput + if *v == nil { + sv = &GetDistributionConfigOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("DistributionConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentDistributionConfig(&sv.DistributionConfig, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetFieldLevelEncryption struct { +} + +func (*awsRestxml_deserializeOpGetFieldLevelEncryption) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetFieldLevelEncryption) 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, awsRestxml_deserializeOpErrorGetFieldLevelEncryption(response, &metadata) + } + output := &GetFieldLevelEncryptionOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsGetFieldLevelEncryptionOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentFieldLevelEncryption(&output.FieldLevelEncryption, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetFieldLevelEncryption(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("NoSuchFieldLevelEncryptionConfig", errorCode): + return awsRestxml_deserializeErrorNoSuchFieldLevelEncryptionConfig(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsGetFieldLevelEncryptionOutput(v *GetFieldLevelEncryptionOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentGetFieldLevelEncryptionOutput(v **GetFieldLevelEncryptionOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetFieldLevelEncryptionOutput + if *v == nil { + sv = &GetFieldLevelEncryptionOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("FieldLevelEncryption", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFieldLevelEncryption(&sv.FieldLevelEncryption, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetFieldLevelEncryptionConfig struct { +} + +func (*awsRestxml_deserializeOpGetFieldLevelEncryptionConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetFieldLevelEncryptionConfig) 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, awsRestxml_deserializeOpErrorGetFieldLevelEncryptionConfig(response, &metadata) + } + output := &GetFieldLevelEncryptionConfigOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsGetFieldLevelEncryptionConfigOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentFieldLevelEncryptionConfig(&output.FieldLevelEncryptionConfig, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetFieldLevelEncryptionConfig(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("NoSuchFieldLevelEncryptionConfig", errorCode): + return awsRestxml_deserializeErrorNoSuchFieldLevelEncryptionConfig(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsGetFieldLevelEncryptionConfigOutput(v *GetFieldLevelEncryptionConfigOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentGetFieldLevelEncryptionConfigOutput(v **GetFieldLevelEncryptionConfigOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetFieldLevelEncryptionConfigOutput + if *v == nil { + sv = &GetFieldLevelEncryptionConfigOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("FieldLevelEncryptionConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFieldLevelEncryptionConfig(&sv.FieldLevelEncryptionConfig, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetFieldLevelEncryptionProfile struct { +} + +func (*awsRestxml_deserializeOpGetFieldLevelEncryptionProfile) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetFieldLevelEncryptionProfile) 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, awsRestxml_deserializeOpErrorGetFieldLevelEncryptionProfile(response, &metadata) + } + output := &GetFieldLevelEncryptionProfileOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsGetFieldLevelEncryptionProfileOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentFieldLevelEncryptionProfile(&output.FieldLevelEncryptionProfile, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetFieldLevelEncryptionProfile(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("NoSuchFieldLevelEncryptionProfile", errorCode): + return awsRestxml_deserializeErrorNoSuchFieldLevelEncryptionProfile(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsGetFieldLevelEncryptionProfileOutput(v *GetFieldLevelEncryptionProfileOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentGetFieldLevelEncryptionProfileOutput(v **GetFieldLevelEncryptionProfileOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetFieldLevelEncryptionProfileOutput + if *v == nil { + sv = &GetFieldLevelEncryptionProfileOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("FieldLevelEncryptionProfile", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFieldLevelEncryptionProfile(&sv.FieldLevelEncryptionProfile, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetFieldLevelEncryptionProfileConfig struct { +} + +func (*awsRestxml_deserializeOpGetFieldLevelEncryptionProfileConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetFieldLevelEncryptionProfileConfig) 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, awsRestxml_deserializeOpErrorGetFieldLevelEncryptionProfileConfig(response, &metadata) + } + output := &GetFieldLevelEncryptionProfileConfigOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsGetFieldLevelEncryptionProfileConfigOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentFieldLevelEncryptionProfileConfig(&output.FieldLevelEncryptionProfileConfig, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetFieldLevelEncryptionProfileConfig(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("NoSuchFieldLevelEncryptionProfile", errorCode): + return awsRestxml_deserializeErrorNoSuchFieldLevelEncryptionProfile(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsGetFieldLevelEncryptionProfileConfigOutput(v *GetFieldLevelEncryptionProfileConfigOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentGetFieldLevelEncryptionProfileConfigOutput(v **GetFieldLevelEncryptionProfileConfigOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetFieldLevelEncryptionProfileConfigOutput + if *v == nil { + sv = &GetFieldLevelEncryptionProfileConfigOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("FieldLevelEncryptionProfileConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFieldLevelEncryptionProfileConfig(&sv.FieldLevelEncryptionProfileConfig, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetFunction struct { +} + +func (*awsRestxml_deserializeOpGetFunction) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetFunction) 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, awsRestxml_deserializeOpErrorGetFunction(response, &metadata) + } + output := &GetFunctionOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsGetFunctionOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + err = awsRestxml_deserializeOpDocumentGetFunctionOutput(output, response.Body, response.ContentLength) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)} + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetFunction(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("NoSuchFunctionExists", errorCode): + return awsRestxml_deserializeErrorNoSuchFunctionExists(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsGetFunctionOutput(v *GetFunctionOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("Content-Type"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ContentType = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentGetFunctionOutput(v *GetFunctionOutput, body io.ReadCloser, contentLength int64) error { + if v == nil { + return fmt.Errorf("unsupported deserialization of nil %T", v) + } + var buf bytes.Buffer + if contentLength > 0 { + buf.Grow(int(contentLength)) + } else { + buf.Grow(512) + } + + _, err := buf.ReadFrom(body) + if err != nil { + return err + } + if buf.Len() > 0 { + v.FunctionCode = buf.Bytes() + } + return nil +} + +type awsRestxml_deserializeOpGetInvalidation struct { +} + +func (*awsRestxml_deserializeOpGetInvalidation) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetInvalidation) 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, awsRestxml_deserializeOpErrorGetInvalidation(response, &metadata) + } + output := &GetInvalidationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentInvalidation(&output.Invalidation, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetInvalidation(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("NoSuchDistribution", errorCode): + return awsRestxml_deserializeErrorNoSuchDistribution(response, errorBody) + + case strings.EqualFold("NoSuchInvalidation", errorCode): + return awsRestxml_deserializeErrorNoSuchInvalidation(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentGetInvalidationOutput(v **GetInvalidationOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetInvalidationOutput + if *v == nil { + sv = &GetInvalidationOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Invalidation", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentInvalidation(&sv.Invalidation, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetKeyGroup struct { +} + +func (*awsRestxml_deserializeOpGetKeyGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetKeyGroup) 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, awsRestxml_deserializeOpErrorGetKeyGroup(response, &metadata) + } + output := &GetKeyGroupOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsGetKeyGroupOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentKeyGroup(&output.KeyGroup, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetKeyGroup(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("NoSuchResource", errorCode): + return awsRestxml_deserializeErrorNoSuchResource(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsGetKeyGroupOutput(v *GetKeyGroupOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentGetKeyGroupOutput(v **GetKeyGroupOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetKeyGroupOutput + if *v == nil { + sv = &GetKeyGroupOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("KeyGroup", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentKeyGroup(&sv.KeyGroup, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetKeyGroupConfig struct { +} + +func (*awsRestxml_deserializeOpGetKeyGroupConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetKeyGroupConfig) 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, awsRestxml_deserializeOpErrorGetKeyGroupConfig(response, &metadata) + } + output := &GetKeyGroupConfigOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsGetKeyGroupConfigOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentKeyGroupConfig(&output.KeyGroupConfig, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetKeyGroupConfig(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("NoSuchResource", errorCode): + return awsRestxml_deserializeErrorNoSuchResource(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsGetKeyGroupConfigOutput(v *GetKeyGroupConfigOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentGetKeyGroupConfigOutput(v **GetKeyGroupConfigOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetKeyGroupConfigOutput + if *v == nil { + sv = &GetKeyGroupConfigOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("KeyGroupConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentKeyGroupConfig(&sv.KeyGroupConfig, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetMonitoringSubscription struct { +} + +func (*awsRestxml_deserializeOpGetMonitoringSubscription) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetMonitoringSubscription) 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, awsRestxml_deserializeOpErrorGetMonitoringSubscription(response, &metadata) + } + output := &GetMonitoringSubscriptionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentMonitoringSubscription(&output.MonitoringSubscription, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetMonitoringSubscription(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("NoSuchDistribution", errorCode): + return awsRestxml_deserializeErrorNoSuchDistribution(response, errorBody) + + case strings.EqualFold("NoSuchMonitoringSubscription", errorCode): + return awsRestxml_deserializeErrorNoSuchMonitoringSubscription(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentGetMonitoringSubscriptionOutput(v **GetMonitoringSubscriptionOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetMonitoringSubscriptionOutput + if *v == nil { + sv = &GetMonitoringSubscriptionOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("MonitoringSubscription", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentMonitoringSubscription(&sv.MonitoringSubscription, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetOriginAccessControl struct { +} + +func (*awsRestxml_deserializeOpGetOriginAccessControl) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetOriginAccessControl) 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, awsRestxml_deserializeOpErrorGetOriginAccessControl(response, &metadata) + } + output := &GetOriginAccessControlOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsGetOriginAccessControlOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentOriginAccessControl(&output.OriginAccessControl, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetOriginAccessControl(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("NoSuchOriginAccessControl", errorCode): + return awsRestxml_deserializeErrorNoSuchOriginAccessControl(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsGetOriginAccessControlOutput(v *GetOriginAccessControlOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentGetOriginAccessControlOutput(v **GetOriginAccessControlOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetOriginAccessControlOutput + if *v == nil { + sv = &GetOriginAccessControlOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("OriginAccessControl", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOriginAccessControl(&sv.OriginAccessControl, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetOriginAccessControlConfig struct { +} + +func (*awsRestxml_deserializeOpGetOriginAccessControlConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetOriginAccessControlConfig) 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, awsRestxml_deserializeOpErrorGetOriginAccessControlConfig(response, &metadata) + } + output := &GetOriginAccessControlConfigOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsGetOriginAccessControlConfigOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentOriginAccessControlConfig(&output.OriginAccessControlConfig, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetOriginAccessControlConfig(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("NoSuchOriginAccessControl", errorCode): + return awsRestxml_deserializeErrorNoSuchOriginAccessControl(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsGetOriginAccessControlConfigOutput(v *GetOriginAccessControlConfigOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentGetOriginAccessControlConfigOutput(v **GetOriginAccessControlConfigOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetOriginAccessControlConfigOutput + if *v == nil { + sv = &GetOriginAccessControlConfigOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("OriginAccessControlConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOriginAccessControlConfig(&sv.OriginAccessControlConfig, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetOriginRequestPolicy struct { +} + +func (*awsRestxml_deserializeOpGetOriginRequestPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetOriginRequestPolicy) 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, awsRestxml_deserializeOpErrorGetOriginRequestPolicy(response, &metadata) + } + output := &GetOriginRequestPolicyOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsGetOriginRequestPolicyOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentOriginRequestPolicy(&output.OriginRequestPolicy, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetOriginRequestPolicy(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("NoSuchOriginRequestPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchOriginRequestPolicy(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsGetOriginRequestPolicyOutput(v *GetOriginRequestPolicyOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentGetOriginRequestPolicyOutput(v **GetOriginRequestPolicyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetOriginRequestPolicyOutput + if *v == nil { + sv = &GetOriginRequestPolicyOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("OriginRequestPolicy", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOriginRequestPolicy(&sv.OriginRequestPolicy, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetOriginRequestPolicyConfig struct { +} + +func (*awsRestxml_deserializeOpGetOriginRequestPolicyConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetOriginRequestPolicyConfig) 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, awsRestxml_deserializeOpErrorGetOriginRequestPolicyConfig(response, &metadata) + } + output := &GetOriginRequestPolicyConfigOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsGetOriginRequestPolicyConfigOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentOriginRequestPolicyConfig(&output.OriginRequestPolicyConfig, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetOriginRequestPolicyConfig(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("NoSuchOriginRequestPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchOriginRequestPolicy(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsGetOriginRequestPolicyConfigOutput(v *GetOriginRequestPolicyConfigOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentGetOriginRequestPolicyConfigOutput(v **GetOriginRequestPolicyConfigOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetOriginRequestPolicyConfigOutput + if *v == nil { + sv = &GetOriginRequestPolicyConfigOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("OriginRequestPolicyConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOriginRequestPolicyConfig(&sv.OriginRequestPolicyConfig, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetPublicKey struct { +} + +func (*awsRestxml_deserializeOpGetPublicKey) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetPublicKey) 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, awsRestxml_deserializeOpErrorGetPublicKey(response, &metadata) + } + output := &GetPublicKeyOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsGetPublicKeyOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentPublicKey(&output.PublicKey, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetPublicKey(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("NoSuchPublicKey", errorCode): + return awsRestxml_deserializeErrorNoSuchPublicKey(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsGetPublicKeyOutput(v *GetPublicKeyOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentGetPublicKeyOutput(v **GetPublicKeyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetPublicKeyOutput + if *v == nil { + sv = &GetPublicKeyOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("PublicKey", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentPublicKey(&sv.PublicKey, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetPublicKeyConfig struct { +} + +func (*awsRestxml_deserializeOpGetPublicKeyConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetPublicKeyConfig) 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, awsRestxml_deserializeOpErrorGetPublicKeyConfig(response, &metadata) + } + output := &GetPublicKeyConfigOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsGetPublicKeyConfigOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentPublicKeyConfig(&output.PublicKeyConfig, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetPublicKeyConfig(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("NoSuchPublicKey", errorCode): + return awsRestxml_deserializeErrorNoSuchPublicKey(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsGetPublicKeyConfigOutput(v *GetPublicKeyConfigOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentGetPublicKeyConfigOutput(v **GetPublicKeyConfigOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetPublicKeyConfigOutput + if *v == nil { + sv = &GetPublicKeyConfigOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("PublicKeyConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentPublicKeyConfig(&sv.PublicKeyConfig, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetRealtimeLogConfig struct { +} + +func (*awsRestxml_deserializeOpGetRealtimeLogConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetRealtimeLogConfig) 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, awsRestxml_deserializeOpErrorGetRealtimeLogConfig(response, &metadata) + } + output := &GetRealtimeLogConfigOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentGetRealtimeLogConfigOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetRealtimeLogConfig(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("NoSuchRealtimeLogConfig", errorCode): + return awsRestxml_deserializeErrorNoSuchRealtimeLogConfig(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentGetRealtimeLogConfigOutput(v **GetRealtimeLogConfigOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetRealtimeLogConfigOutput + if *v == nil { + sv = &GetRealtimeLogConfigOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("RealtimeLogConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentRealtimeLogConfig(&sv.RealtimeLogConfig, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetResponseHeadersPolicy struct { +} + +func (*awsRestxml_deserializeOpGetResponseHeadersPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetResponseHeadersPolicy) 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, awsRestxml_deserializeOpErrorGetResponseHeadersPolicy(response, &metadata) + } + output := &GetResponseHeadersPolicyOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsGetResponseHeadersPolicyOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentResponseHeadersPolicy(&output.ResponseHeadersPolicy, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetResponseHeadersPolicy(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("NoSuchResponseHeadersPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchResponseHeadersPolicy(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsGetResponseHeadersPolicyOutput(v *GetResponseHeadersPolicyOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentGetResponseHeadersPolicyOutput(v **GetResponseHeadersPolicyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetResponseHeadersPolicyOutput + if *v == nil { + sv = &GetResponseHeadersPolicyOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ResponseHeadersPolicy", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentResponseHeadersPolicy(&sv.ResponseHeadersPolicy, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetResponseHeadersPolicyConfig struct { +} + +func (*awsRestxml_deserializeOpGetResponseHeadersPolicyConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetResponseHeadersPolicyConfig) 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, awsRestxml_deserializeOpErrorGetResponseHeadersPolicyConfig(response, &metadata) + } + output := &GetResponseHeadersPolicyConfigOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsGetResponseHeadersPolicyConfigOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentResponseHeadersPolicyConfig(&output.ResponseHeadersPolicyConfig, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetResponseHeadersPolicyConfig(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("NoSuchResponseHeadersPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchResponseHeadersPolicy(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsGetResponseHeadersPolicyConfigOutput(v *GetResponseHeadersPolicyConfigOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentGetResponseHeadersPolicyConfigOutput(v **GetResponseHeadersPolicyConfigOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetResponseHeadersPolicyConfigOutput + if *v == nil { + sv = &GetResponseHeadersPolicyConfigOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ResponseHeadersPolicyConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentResponseHeadersPolicyConfig(&sv.ResponseHeadersPolicyConfig, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetStreamingDistribution struct { +} + +func (*awsRestxml_deserializeOpGetStreamingDistribution) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetStreamingDistribution) 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, awsRestxml_deserializeOpErrorGetStreamingDistribution(response, &metadata) + } + output := &GetStreamingDistributionOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsGetStreamingDistributionOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentStreamingDistribution(&output.StreamingDistribution, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetStreamingDistribution(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("NoSuchStreamingDistribution", errorCode): + return awsRestxml_deserializeErrorNoSuchStreamingDistribution(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsGetStreamingDistributionOutput(v *GetStreamingDistributionOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentGetStreamingDistributionOutput(v **GetStreamingDistributionOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetStreamingDistributionOutput + if *v == nil { + sv = &GetStreamingDistributionOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("StreamingDistribution", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentStreamingDistribution(&sv.StreamingDistribution, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpGetStreamingDistributionConfig struct { +} + +func (*awsRestxml_deserializeOpGetStreamingDistributionConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpGetStreamingDistributionConfig) 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, awsRestxml_deserializeOpErrorGetStreamingDistributionConfig(response, &metadata) + } + output := &GetStreamingDistributionConfigOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsGetStreamingDistributionConfigOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentStreamingDistributionConfig(&output.StreamingDistributionConfig, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorGetStreamingDistributionConfig(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("NoSuchStreamingDistribution", errorCode): + return awsRestxml_deserializeErrorNoSuchStreamingDistribution(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsGetStreamingDistributionConfigOutput(v *GetStreamingDistributionConfigOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentGetStreamingDistributionConfigOutput(v **GetStreamingDistributionConfigOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetStreamingDistributionConfigOutput + if *v == nil { + sv = &GetStreamingDistributionConfigOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("StreamingDistributionConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentStreamingDistributionConfig(&sv.StreamingDistributionConfig, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListCachePolicies struct { +} + +func (*awsRestxml_deserializeOpListCachePolicies) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListCachePolicies) 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, awsRestxml_deserializeOpErrorListCachePolicies(response, &metadata) + } + output := &ListCachePoliciesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentCachePolicyList(&output.CachePolicyList, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListCachePolicies(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("NoSuchCachePolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchCachePolicy(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListCachePoliciesOutput(v **ListCachePoliciesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListCachePoliciesOutput + if *v == nil { + sv = &ListCachePoliciesOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CachePolicyList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCachePolicyList(&sv.CachePolicyList, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListCloudFrontOriginAccessIdentities struct { +} + +func (*awsRestxml_deserializeOpListCloudFrontOriginAccessIdentities) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListCloudFrontOriginAccessIdentities) 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, awsRestxml_deserializeOpErrorListCloudFrontOriginAccessIdentities(response, &metadata) + } + output := &ListCloudFrontOriginAccessIdentitiesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentityList(&output.CloudFrontOriginAccessIdentityList, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListCloudFrontOriginAccessIdentities(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListCloudFrontOriginAccessIdentitiesOutput(v **ListCloudFrontOriginAccessIdentitiesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListCloudFrontOriginAccessIdentitiesOutput + if *v == nil { + sv = &ListCloudFrontOriginAccessIdentitiesOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CloudFrontOriginAccessIdentityList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentityList(&sv.CloudFrontOriginAccessIdentityList, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListConflictingAliases struct { +} + +func (*awsRestxml_deserializeOpListConflictingAliases) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListConflictingAliases) 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, awsRestxml_deserializeOpErrorListConflictingAliases(response, &metadata) + } + output := &ListConflictingAliasesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentConflictingAliasesList(&output.ConflictingAliasesList, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListConflictingAliases(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("NoSuchDistribution", errorCode): + return awsRestxml_deserializeErrorNoSuchDistribution(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListConflictingAliasesOutput(v **ListConflictingAliasesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListConflictingAliasesOutput + if *v == nil { + sv = &ListConflictingAliasesOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ConflictingAliasesList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentConflictingAliasesList(&sv.ConflictingAliasesList, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListContinuousDeploymentPolicies struct { +} + +func (*awsRestxml_deserializeOpListContinuousDeploymentPolicies) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListContinuousDeploymentPolicies) 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, awsRestxml_deserializeOpErrorListContinuousDeploymentPolicies(response, &metadata) + } + output := &ListContinuousDeploymentPoliciesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentContinuousDeploymentPolicyList(&output.ContinuousDeploymentPolicyList, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListContinuousDeploymentPolicies(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("NoSuchContinuousDeploymentPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchContinuousDeploymentPolicy(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListContinuousDeploymentPoliciesOutput(v **ListContinuousDeploymentPoliciesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListContinuousDeploymentPoliciesOutput + if *v == nil { + sv = &ListContinuousDeploymentPoliciesOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ContinuousDeploymentPolicyList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentContinuousDeploymentPolicyList(&sv.ContinuousDeploymentPolicyList, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListDistributions struct { +} + +func (*awsRestxml_deserializeOpListDistributions) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListDistributions) 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, awsRestxml_deserializeOpErrorListDistributions(response, &metadata) + } + output := &ListDistributionsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentDistributionList(&output.DistributionList, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListDistributions(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListDistributionsOutput(v **ListDistributionsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListDistributionsOutput + if *v == nil { + sv = &ListDistributionsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("DistributionList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentDistributionList(&sv.DistributionList, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListDistributionsByCachePolicyId struct { +} + +func (*awsRestxml_deserializeOpListDistributionsByCachePolicyId) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListDistributionsByCachePolicyId) 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, awsRestxml_deserializeOpErrorListDistributionsByCachePolicyId(response, &metadata) + } + output := &ListDistributionsByCachePolicyIdOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentDistributionIdList(&output.DistributionIdList, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListDistributionsByCachePolicyId(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("NoSuchCachePolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchCachePolicy(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListDistributionsByCachePolicyIdOutput(v **ListDistributionsByCachePolicyIdOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListDistributionsByCachePolicyIdOutput + if *v == nil { + sv = &ListDistributionsByCachePolicyIdOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("DistributionIdList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentDistributionIdList(&sv.DistributionIdList, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListDistributionsByKeyGroup struct { +} + +func (*awsRestxml_deserializeOpListDistributionsByKeyGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListDistributionsByKeyGroup) 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, awsRestxml_deserializeOpErrorListDistributionsByKeyGroup(response, &metadata) + } + output := &ListDistributionsByKeyGroupOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentDistributionIdList(&output.DistributionIdList, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListDistributionsByKeyGroup(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("NoSuchResource", errorCode): + return awsRestxml_deserializeErrorNoSuchResource(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListDistributionsByKeyGroupOutput(v **ListDistributionsByKeyGroupOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListDistributionsByKeyGroupOutput + if *v == nil { + sv = &ListDistributionsByKeyGroupOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("DistributionIdList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentDistributionIdList(&sv.DistributionIdList, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListDistributionsByOriginRequestPolicyId struct { +} + +func (*awsRestxml_deserializeOpListDistributionsByOriginRequestPolicyId) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListDistributionsByOriginRequestPolicyId) 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, awsRestxml_deserializeOpErrorListDistributionsByOriginRequestPolicyId(response, &metadata) + } + output := &ListDistributionsByOriginRequestPolicyIdOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentDistributionIdList(&output.DistributionIdList, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListDistributionsByOriginRequestPolicyId(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("NoSuchOriginRequestPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchOriginRequestPolicy(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListDistributionsByOriginRequestPolicyIdOutput(v **ListDistributionsByOriginRequestPolicyIdOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListDistributionsByOriginRequestPolicyIdOutput + if *v == nil { + sv = &ListDistributionsByOriginRequestPolicyIdOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("DistributionIdList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentDistributionIdList(&sv.DistributionIdList, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListDistributionsByRealtimeLogConfig struct { +} + +func (*awsRestxml_deserializeOpListDistributionsByRealtimeLogConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListDistributionsByRealtimeLogConfig) 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, awsRestxml_deserializeOpErrorListDistributionsByRealtimeLogConfig(response, &metadata) + } + output := &ListDistributionsByRealtimeLogConfigOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentDistributionList(&output.DistributionList, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListDistributionsByRealtimeLogConfig(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListDistributionsByRealtimeLogConfigOutput(v **ListDistributionsByRealtimeLogConfigOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListDistributionsByRealtimeLogConfigOutput + if *v == nil { + sv = &ListDistributionsByRealtimeLogConfigOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("DistributionList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentDistributionList(&sv.DistributionList, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListDistributionsByResponseHeadersPolicyId struct { +} + +func (*awsRestxml_deserializeOpListDistributionsByResponseHeadersPolicyId) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListDistributionsByResponseHeadersPolicyId) 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, awsRestxml_deserializeOpErrorListDistributionsByResponseHeadersPolicyId(response, &metadata) + } + output := &ListDistributionsByResponseHeadersPolicyIdOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentDistributionIdList(&output.DistributionIdList, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListDistributionsByResponseHeadersPolicyId(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("NoSuchResponseHeadersPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchResponseHeadersPolicy(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListDistributionsByResponseHeadersPolicyIdOutput(v **ListDistributionsByResponseHeadersPolicyIdOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListDistributionsByResponseHeadersPolicyIdOutput + if *v == nil { + sv = &ListDistributionsByResponseHeadersPolicyIdOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("DistributionIdList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentDistributionIdList(&sv.DistributionIdList, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListDistributionsByWebACLId struct { +} + +func (*awsRestxml_deserializeOpListDistributionsByWebACLId) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListDistributionsByWebACLId) 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, awsRestxml_deserializeOpErrorListDistributionsByWebACLId(response, &metadata) + } + output := &ListDistributionsByWebACLIdOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentDistributionList(&output.DistributionList, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListDistributionsByWebACLId(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidWebACLId", errorCode): + return awsRestxml_deserializeErrorInvalidWebACLId(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListDistributionsByWebACLIdOutput(v **ListDistributionsByWebACLIdOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListDistributionsByWebACLIdOutput + if *v == nil { + sv = &ListDistributionsByWebACLIdOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("DistributionList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentDistributionList(&sv.DistributionList, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListFieldLevelEncryptionConfigs struct { +} + +func (*awsRestxml_deserializeOpListFieldLevelEncryptionConfigs) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListFieldLevelEncryptionConfigs) 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, awsRestxml_deserializeOpErrorListFieldLevelEncryptionConfigs(response, &metadata) + } + output := &ListFieldLevelEncryptionConfigsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentFieldLevelEncryptionList(&output.FieldLevelEncryptionList, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListFieldLevelEncryptionConfigs(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListFieldLevelEncryptionConfigsOutput(v **ListFieldLevelEncryptionConfigsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListFieldLevelEncryptionConfigsOutput + if *v == nil { + sv = &ListFieldLevelEncryptionConfigsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("FieldLevelEncryptionList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFieldLevelEncryptionList(&sv.FieldLevelEncryptionList, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListFieldLevelEncryptionProfiles struct { +} + +func (*awsRestxml_deserializeOpListFieldLevelEncryptionProfiles) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListFieldLevelEncryptionProfiles) 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, awsRestxml_deserializeOpErrorListFieldLevelEncryptionProfiles(response, &metadata) + } + output := &ListFieldLevelEncryptionProfilesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentFieldLevelEncryptionProfileList(&output.FieldLevelEncryptionProfileList, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListFieldLevelEncryptionProfiles(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListFieldLevelEncryptionProfilesOutput(v **ListFieldLevelEncryptionProfilesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListFieldLevelEncryptionProfilesOutput + if *v == nil { + sv = &ListFieldLevelEncryptionProfilesOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("FieldLevelEncryptionProfileList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFieldLevelEncryptionProfileList(&sv.FieldLevelEncryptionProfileList, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListFunctions struct { +} + +func (*awsRestxml_deserializeOpListFunctions) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListFunctions) 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, awsRestxml_deserializeOpErrorListFunctions(response, &metadata) + } + output := &ListFunctionsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentFunctionList(&output.FunctionList, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListFunctions(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListFunctionsOutput(v **ListFunctionsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListFunctionsOutput + if *v == nil { + sv = &ListFunctionsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("FunctionList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFunctionList(&sv.FunctionList, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListInvalidations struct { +} + +func (*awsRestxml_deserializeOpListInvalidations) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListInvalidations) 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, awsRestxml_deserializeOpErrorListInvalidations(response, &metadata) + } + output := &ListInvalidationsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentInvalidationList(&output.InvalidationList, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListInvalidations(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("NoSuchDistribution", errorCode): + return awsRestxml_deserializeErrorNoSuchDistribution(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListInvalidationsOutput(v **ListInvalidationsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListInvalidationsOutput + if *v == nil { + sv = &ListInvalidationsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("InvalidationList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentInvalidationList(&sv.InvalidationList, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListKeyGroups struct { +} + +func (*awsRestxml_deserializeOpListKeyGroups) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListKeyGroups) 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, awsRestxml_deserializeOpErrorListKeyGroups(response, &metadata) + } + output := &ListKeyGroupsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentKeyGroupList(&output.KeyGroupList, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListKeyGroups(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListKeyGroupsOutput(v **ListKeyGroupsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListKeyGroupsOutput + if *v == nil { + sv = &ListKeyGroupsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("KeyGroupList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentKeyGroupList(&sv.KeyGroupList, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListKeyValueStores struct { +} + +func (*awsRestxml_deserializeOpListKeyValueStores) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListKeyValueStores) 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, awsRestxml_deserializeOpErrorListKeyValueStores(response, &metadata) + } + output := &ListKeyValueStoresOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentKeyValueStoreList(&output.KeyValueStoreList, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListKeyValueStores(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListKeyValueStoresOutput(v **ListKeyValueStoresOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListKeyValueStoresOutput + if *v == nil { + sv = &ListKeyValueStoresOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("KeyValueStoreList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentKeyValueStoreList(&sv.KeyValueStoreList, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListOriginAccessControls struct { +} + +func (*awsRestxml_deserializeOpListOriginAccessControls) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListOriginAccessControls) 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, awsRestxml_deserializeOpErrorListOriginAccessControls(response, &metadata) + } + output := &ListOriginAccessControlsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentOriginAccessControlList(&output.OriginAccessControlList, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListOriginAccessControls(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListOriginAccessControlsOutput(v **ListOriginAccessControlsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListOriginAccessControlsOutput + if *v == nil { + sv = &ListOriginAccessControlsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("OriginAccessControlList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOriginAccessControlList(&sv.OriginAccessControlList, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListOriginRequestPolicies struct { +} + +func (*awsRestxml_deserializeOpListOriginRequestPolicies) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListOriginRequestPolicies) 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, awsRestxml_deserializeOpErrorListOriginRequestPolicies(response, &metadata) + } + output := &ListOriginRequestPoliciesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentOriginRequestPolicyList(&output.OriginRequestPolicyList, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListOriginRequestPolicies(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("NoSuchOriginRequestPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchOriginRequestPolicy(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListOriginRequestPoliciesOutput(v **ListOriginRequestPoliciesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListOriginRequestPoliciesOutput + if *v == nil { + sv = &ListOriginRequestPoliciesOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("OriginRequestPolicyList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOriginRequestPolicyList(&sv.OriginRequestPolicyList, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListPublicKeys struct { +} + +func (*awsRestxml_deserializeOpListPublicKeys) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListPublicKeys) 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, awsRestxml_deserializeOpErrorListPublicKeys(response, &metadata) + } + output := &ListPublicKeysOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentPublicKeyList(&output.PublicKeyList, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListPublicKeys(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListPublicKeysOutput(v **ListPublicKeysOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListPublicKeysOutput + if *v == nil { + sv = &ListPublicKeysOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("PublicKeyList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentPublicKeyList(&sv.PublicKeyList, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListRealtimeLogConfigs struct { +} + +func (*awsRestxml_deserializeOpListRealtimeLogConfigs) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListRealtimeLogConfigs) 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, awsRestxml_deserializeOpErrorListRealtimeLogConfigs(response, &metadata) + } + output := &ListRealtimeLogConfigsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentRealtimeLogConfigs(&output.RealtimeLogConfigs, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListRealtimeLogConfigs(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("NoSuchRealtimeLogConfig", errorCode): + return awsRestxml_deserializeErrorNoSuchRealtimeLogConfig(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListRealtimeLogConfigsOutput(v **ListRealtimeLogConfigsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListRealtimeLogConfigsOutput + if *v == nil { + sv = &ListRealtimeLogConfigsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("RealtimeLogConfigs", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentRealtimeLogConfigs(&sv.RealtimeLogConfigs, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListResponseHeadersPolicies struct { +} + +func (*awsRestxml_deserializeOpListResponseHeadersPolicies) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListResponseHeadersPolicies) 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, awsRestxml_deserializeOpErrorListResponseHeadersPolicies(response, &metadata) + } + output := &ListResponseHeadersPoliciesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentResponseHeadersPolicyList(&output.ResponseHeadersPolicyList, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListResponseHeadersPolicies(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("NoSuchResponseHeadersPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchResponseHeadersPolicy(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListResponseHeadersPoliciesOutput(v **ListResponseHeadersPoliciesOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListResponseHeadersPoliciesOutput + if *v == nil { + sv = &ListResponseHeadersPoliciesOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ResponseHeadersPolicyList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentResponseHeadersPolicyList(&sv.ResponseHeadersPolicyList, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListStreamingDistributions struct { +} + +func (*awsRestxml_deserializeOpListStreamingDistributions) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpListStreamingDistributions) 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, awsRestxml_deserializeOpErrorListStreamingDistributions(response, &metadata) + } + output := &ListStreamingDistributionsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentStreamingDistributionList(&output.StreamingDistributionList, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorListStreamingDistributions(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListStreamingDistributionsOutput(v **ListStreamingDistributionsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListStreamingDistributionsOutput + if *v == nil { + sv = &ListStreamingDistributionsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("StreamingDistributionList", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentStreamingDistributionList(&sv.StreamingDistributionList, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpListTagsForResource struct { +} + +func (*awsRestxml_deserializeOpListTagsForResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_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, awsRestxml_deserializeOpErrorListTagsForResource(response, &metadata) + } + output := &ListTagsForResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentTags(&output.Tags, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidTagging", errorCode): + return awsRestxml_deserializeErrorInvalidTagging(response, errorBody) + + case strings.EqualFold("NoSuchResource", errorCode): + return awsRestxml_deserializeErrorNoSuchResource(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListTagsForResourceOutput + if *v == nil { + sv = &ListTagsForResourceOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Tags", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentTags(&sv.Tags, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpPublishFunction struct { +} + +func (*awsRestxml_deserializeOpPublishFunction) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpPublishFunction) 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, awsRestxml_deserializeOpErrorPublishFunction(response, &metadata) + } + output := &PublishFunctionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentFunctionSummary(&output.FunctionSummary, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorPublishFunction(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("NoSuchFunctionExists", errorCode): + return awsRestxml_deserializeErrorNoSuchFunctionExists(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentPublishFunctionOutput(v **PublishFunctionOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *PublishFunctionOutput + if *v == nil { + sv = &PublishFunctionOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("FunctionSummary", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFunctionSummary(&sv.FunctionSummary, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpTagResource struct { +} + +func (*awsRestxml_deserializeOpTagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_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, awsRestxml_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 awsRestxml_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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidTagging", errorCode): + return awsRestxml_deserializeErrorInvalidTagging(response, errorBody) + + case strings.EqualFold("NoSuchResource", errorCode): + return awsRestxml_deserializeErrorNoSuchResource(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpTestFunction struct { +} + +func (*awsRestxml_deserializeOpTestFunction) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpTestFunction) 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, awsRestxml_deserializeOpErrorTestFunction(response, &metadata) + } + output := &TestFunctionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentTestResult(&output.TestResult, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorTestFunction(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("NoSuchFunctionExists", errorCode): + return awsRestxml_deserializeErrorNoSuchFunctionExists(response, errorBody) + + case strings.EqualFold("TestFunctionFailed", errorCode): + return awsRestxml_deserializeErrorTestFunctionFailed(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentTestFunctionOutput(v **TestFunctionOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *TestFunctionOutput + if *v == nil { + sv = &TestFunctionOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("TestResult", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentTestResult(&sv.TestResult, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpUntagResource struct { +} + +func (*awsRestxml_deserializeOpUntagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_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, awsRestxml_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 awsRestxml_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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidTagging", errorCode): + return awsRestxml_deserializeErrorInvalidTagging(response, errorBody) + + case strings.EqualFold("NoSuchResource", errorCode): + return awsRestxml_deserializeErrorNoSuchResource(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestxml_deserializeOpUpdateCachePolicy struct { +} + +func (*awsRestxml_deserializeOpUpdateCachePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpUpdateCachePolicy) 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, awsRestxml_deserializeOpErrorUpdateCachePolicy(response, &metadata) + } + output := &UpdateCachePolicyOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsUpdateCachePolicyOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentCachePolicy(&output.CachePolicy, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorUpdateCachePolicy(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("CachePolicyAlreadyExists", errorCode): + return awsRestxml_deserializeErrorCachePolicyAlreadyExists(response, errorBody) + + case strings.EqualFold("IllegalUpdate", errorCode): + return awsRestxml_deserializeErrorIllegalUpdate(response, errorBody) + + case strings.EqualFold("InconsistentQuantities", errorCode): + return awsRestxml_deserializeErrorInconsistentQuantities(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("NoSuchCachePolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchCachePolicy(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + case strings.EqualFold("TooManyCookiesInCachePolicy", errorCode): + return awsRestxml_deserializeErrorTooManyCookiesInCachePolicy(response, errorBody) + + case strings.EqualFold("TooManyHeadersInCachePolicy", errorCode): + return awsRestxml_deserializeErrorTooManyHeadersInCachePolicy(response, errorBody) + + case strings.EqualFold("TooManyQueryStringsInCachePolicy", errorCode): + return awsRestxml_deserializeErrorTooManyQueryStringsInCachePolicy(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsUpdateCachePolicyOutput(v *UpdateCachePolicyOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentUpdateCachePolicyOutput(v **UpdateCachePolicyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *UpdateCachePolicyOutput + if *v == nil { + sv = &UpdateCachePolicyOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CachePolicy", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCachePolicy(&sv.CachePolicy, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpUpdateCloudFrontOriginAccessIdentity struct { +} + +func (*awsRestxml_deserializeOpUpdateCloudFrontOriginAccessIdentity) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpUpdateCloudFrontOriginAccessIdentity) 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, awsRestxml_deserializeOpErrorUpdateCloudFrontOriginAccessIdentity(response, &metadata) + } + output := &UpdateCloudFrontOriginAccessIdentityOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsUpdateCloudFrontOriginAccessIdentityOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentity(&output.CloudFrontOriginAccessIdentity, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorUpdateCloudFrontOriginAccessIdentity(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("IllegalUpdate", errorCode): + return awsRestxml_deserializeErrorIllegalUpdate(response, errorBody) + + case strings.EqualFold("InconsistentQuantities", errorCode): + return awsRestxml_deserializeErrorInconsistentQuantities(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("MissingBody", errorCode): + return awsRestxml_deserializeErrorMissingBody(response, errorBody) + + case strings.EqualFold("NoSuchCloudFrontOriginAccessIdentity", errorCode): + return awsRestxml_deserializeErrorNoSuchCloudFrontOriginAccessIdentity(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsUpdateCloudFrontOriginAccessIdentityOutput(v *UpdateCloudFrontOriginAccessIdentityOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentUpdateCloudFrontOriginAccessIdentityOutput(v **UpdateCloudFrontOriginAccessIdentityOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *UpdateCloudFrontOriginAccessIdentityOutput + if *v == nil { + sv = &UpdateCloudFrontOriginAccessIdentityOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CloudFrontOriginAccessIdentity", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentity(&sv.CloudFrontOriginAccessIdentity, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpUpdateContinuousDeploymentPolicy struct { +} + +func (*awsRestxml_deserializeOpUpdateContinuousDeploymentPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpUpdateContinuousDeploymentPolicy) 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, awsRestxml_deserializeOpErrorUpdateContinuousDeploymentPolicy(response, &metadata) + } + output := &UpdateContinuousDeploymentPolicyOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsUpdateContinuousDeploymentPolicyOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentContinuousDeploymentPolicy(&output.ContinuousDeploymentPolicy, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorUpdateContinuousDeploymentPolicy(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("InconsistentQuantities", errorCode): + return awsRestxml_deserializeErrorInconsistentQuantities(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("NoSuchContinuousDeploymentPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchContinuousDeploymentPolicy(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + case strings.EqualFold("StagingDistributionInUse", errorCode): + return awsRestxml_deserializeErrorStagingDistributionInUse(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsUpdateContinuousDeploymentPolicyOutput(v *UpdateContinuousDeploymentPolicyOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentUpdateContinuousDeploymentPolicyOutput(v **UpdateContinuousDeploymentPolicyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *UpdateContinuousDeploymentPolicyOutput + if *v == nil { + sv = &UpdateContinuousDeploymentPolicyOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ContinuousDeploymentPolicy", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentContinuousDeploymentPolicy(&sv.ContinuousDeploymentPolicy, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpUpdateDistribution struct { +} + +func (*awsRestxml_deserializeOpUpdateDistribution) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpUpdateDistribution) 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, awsRestxml_deserializeOpErrorUpdateDistribution(response, &metadata) + } + output := &UpdateDistributionOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsUpdateDistributionOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentDistribution(&output.Distribution, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorUpdateDistribution(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("CNAMEAlreadyExists", errorCode): + return awsRestxml_deserializeErrorCNAMEAlreadyExists(response, errorBody) + + case strings.EqualFold("ContinuousDeploymentPolicyInUse", errorCode): + return awsRestxml_deserializeErrorContinuousDeploymentPolicyInUse(response, errorBody) + + case strings.EqualFold("IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior", errorCode): + return awsRestxml_deserializeErrorIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(response, errorBody) + + case strings.EqualFold("IllegalOriginAccessConfiguration", errorCode): + return awsRestxml_deserializeErrorIllegalOriginAccessConfiguration(response, errorBody) + + case strings.EqualFold("IllegalUpdate", errorCode): + return awsRestxml_deserializeErrorIllegalUpdate(response, errorBody) + + case strings.EqualFold("InconsistentQuantities", errorCode): + return awsRestxml_deserializeErrorInconsistentQuantities(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidDefaultRootObject", errorCode): + return awsRestxml_deserializeErrorInvalidDefaultRootObject(response, errorBody) + + case strings.EqualFold("InvalidDomainNameForOriginAccessControl", errorCode): + return awsRestxml_deserializeErrorInvalidDomainNameForOriginAccessControl(response, errorBody) + + case strings.EqualFold("InvalidErrorCode", errorCode): + return awsRestxml_deserializeErrorInvalidErrorCode(response, errorBody) + + case strings.EqualFold("InvalidForwardCookies", errorCode): + return awsRestxml_deserializeErrorInvalidForwardCookies(response, errorBody) + + case strings.EqualFold("InvalidFunctionAssociation", errorCode): + return awsRestxml_deserializeErrorInvalidFunctionAssociation(response, errorBody) + + case strings.EqualFold("InvalidGeoRestrictionParameter", errorCode): + return awsRestxml_deserializeErrorInvalidGeoRestrictionParameter(response, errorBody) + + case strings.EqualFold("InvalidHeadersForS3Origin", errorCode): + return awsRestxml_deserializeErrorInvalidHeadersForS3Origin(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("InvalidLambdaFunctionAssociation", errorCode): + return awsRestxml_deserializeErrorInvalidLambdaFunctionAssociation(response, errorBody) + + case strings.EqualFold("InvalidLocationCode", errorCode): + return awsRestxml_deserializeErrorInvalidLocationCode(response, errorBody) + + case strings.EqualFold("InvalidMinimumProtocolVersion", errorCode): + return awsRestxml_deserializeErrorInvalidMinimumProtocolVersion(response, errorBody) + + case strings.EqualFold("InvalidOriginAccessControl", errorCode): + return awsRestxml_deserializeErrorInvalidOriginAccessControl(response, errorBody) + + case strings.EqualFold("InvalidOriginAccessIdentity", errorCode): + return awsRestxml_deserializeErrorInvalidOriginAccessIdentity(response, errorBody) + + case strings.EqualFold("InvalidOriginKeepaliveTimeout", errorCode): + return awsRestxml_deserializeErrorInvalidOriginKeepaliveTimeout(response, errorBody) + + case strings.EqualFold("InvalidOriginReadTimeout", errorCode): + return awsRestxml_deserializeErrorInvalidOriginReadTimeout(response, errorBody) + + case strings.EqualFold("InvalidQueryStringParameters", errorCode): + return awsRestxml_deserializeErrorInvalidQueryStringParameters(response, errorBody) + + case strings.EqualFold("InvalidRelativePath", errorCode): + return awsRestxml_deserializeErrorInvalidRelativePath(response, errorBody) + + case strings.EqualFold("InvalidRequiredProtocol", errorCode): + return awsRestxml_deserializeErrorInvalidRequiredProtocol(response, errorBody) + + case strings.EqualFold("InvalidResponseCode", errorCode): + return awsRestxml_deserializeErrorInvalidResponseCode(response, errorBody) + + case strings.EqualFold("InvalidTTLOrder", errorCode): + return awsRestxml_deserializeErrorInvalidTTLOrder(response, errorBody) + + case strings.EqualFold("InvalidViewerCertificate", errorCode): + return awsRestxml_deserializeErrorInvalidViewerCertificate(response, errorBody) + + case strings.EqualFold("InvalidWebACLId", errorCode): + return awsRestxml_deserializeErrorInvalidWebACLId(response, errorBody) + + case strings.EqualFold("MissingBody", errorCode): + return awsRestxml_deserializeErrorMissingBody(response, errorBody) + + case strings.EqualFold("NoSuchCachePolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchCachePolicy(response, errorBody) + + case strings.EqualFold("NoSuchContinuousDeploymentPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchContinuousDeploymentPolicy(response, errorBody) + + case strings.EqualFold("NoSuchDistribution", errorCode): + return awsRestxml_deserializeErrorNoSuchDistribution(response, errorBody) + + case strings.EqualFold("NoSuchFieldLevelEncryptionConfig", errorCode): + return awsRestxml_deserializeErrorNoSuchFieldLevelEncryptionConfig(response, errorBody) + + case strings.EqualFold("NoSuchOrigin", errorCode): + return awsRestxml_deserializeErrorNoSuchOrigin(response, errorBody) + + case strings.EqualFold("NoSuchOriginRequestPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchOriginRequestPolicy(response, errorBody) + + case strings.EqualFold("NoSuchRealtimeLogConfig", errorCode): + return awsRestxml_deserializeErrorNoSuchRealtimeLogConfig(response, errorBody) + + case strings.EqualFold("NoSuchResponseHeadersPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchResponseHeadersPolicy(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + case strings.EqualFold("RealtimeLogConfigOwnerMismatch", errorCode): + return awsRestxml_deserializeErrorRealtimeLogConfigOwnerMismatch(response, errorBody) + + case strings.EqualFold("StagingDistributionInUse", errorCode): + return awsRestxml_deserializeErrorStagingDistributionInUse(response, errorBody) + + case strings.EqualFold("TooManyCacheBehaviors", errorCode): + return awsRestxml_deserializeErrorTooManyCacheBehaviors(response, errorBody) + + case strings.EqualFold("TooManyCertificates", errorCode): + return awsRestxml_deserializeErrorTooManyCertificates(response, errorBody) + + case strings.EqualFold("TooManyCookieNamesInWhiteList", errorCode): + return awsRestxml_deserializeErrorTooManyCookieNamesInWhiteList(response, errorBody) + + case strings.EqualFold("TooManyDistributionCNAMEs", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionCNAMEs(response, errorBody) + + case strings.EqualFold("TooManyDistributionsAssociatedToCachePolicy", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToCachePolicy(response, errorBody) + + case strings.EqualFold("TooManyDistributionsAssociatedToFieldLevelEncryptionConfig", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToFieldLevelEncryptionConfig(response, errorBody) + + case strings.EqualFold("TooManyDistributionsAssociatedToKeyGroup", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToKeyGroup(response, errorBody) + + case strings.EqualFold("TooManyDistributionsAssociatedToOriginAccessControl", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToOriginAccessControl(response, errorBody) + + case strings.EqualFold("TooManyDistributionsAssociatedToOriginRequestPolicy", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToOriginRequestPolicy(response, errorBody) + + case strings.EqualFold("TooManyDistributionsAssociatedToResponseHeadersPolicy", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToResponseHeadersPolicy(response, errorBody) + + case strings.EqualFold("TooManyDistributionsWithFunctionAssociations", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsWithFunctionAssociations(response, errorBody) + + case strings.EqualFold("TooManyDistributionsWithLambdaAssociations", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsWithLambdaAssociations(response, errorBody) + + case strings.EqualFold("TooManyDistributionsWithSingleFunctionARN", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsWithSingleFunctionARN(response, errorBody) + + case strings.EqualFold("TooManyFunctionAssociations", errorCode): + return awsRestxml_deserializeErrorTooManyFunctionAssociations(response, errorBody) + + case strings.EqualFold("TooManyHeadersInForwardedValues", errorCode): + return awsRestxml_deserializeErrorTooManyHeadersInForwardedValues(response, errorBody) + + case strings.EqualFold("TooManyKeyGroupsAssociatedToDistribution", errorCode): + return awsRestxml_deserializeErrorTooManyKeyGroupsAssociatedToDistribution(response, errorBody) + + case strings.EqualFold("TooManyLambdaFunctionAssociations", errorCode): + return awsRestxml_deserializeErrorTooManyLambdaFunctionAssociations(response, errorBody) + + case strings.EqualFold("TooManyOriginCustomHeaders", errorCode): + return awsRestxml_deserializeErrorTooManyOriginCustomHeaders(response, errorBody) + + case strings.EqualFold("TooManyOriginGroupsPerDistribution", errorCode): + return awsRestxml_deserializeErrorTooManyOriginGroupsPerDistribution(response, errorBody) + + case strings.EqualFold("TooManyOrigins", errorCode): + return awsRestxml_deserializeErrorTooManyOrigins(response, errorBody) + + case strings.EqualFold("TooManyQueryStringParameters", errorCode): + return awsRestxml_deserializeErrorTooManyQueryStringParameters(response, errorBody) + + case strings.EqualFold("TooManyTrustedSigners", errorCode): + return awsRestxml_deserializeErrorTooManyTrustedSigners(response, errorBody) + + case strings.EqualFold("TrustedKeyGroupDoesNotExist", errorCode): + return awsRestxml_deserializeErrorTrustedKeyGroupDoesNotExist(response, errorBody) + + case strings.EqualFold("TrustedSignerDoesNotExist", errorCode): + return awsRestxml_deserializeErrorTrustedSignerDoesNotExist(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsUpdateDistributionOutput(v *UpdateDistributionOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentUpdateDistributionOutput(v **UpdateDistributionOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *UpdateDistributionOutput + if *v == nil { + sv = &UpdateDistributionOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Distribution", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentDistribution(&sv.Distribution, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpUpdateDistributionWithStagingConfig struct { +} + +func (*awsRestxml_deserializeOpUpdateDistributionWithStagingConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpUpdateDistributionWithStagingConfig) 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, awsRestxml_deserializeOpErrorUpdateDistributionWithStagingConfig(response, &metadata) + } + output := &UpdateDistributionWithStagingConfigOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsUpdateDistributionWithStagingConfigOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentDistribution(&output.Distribution, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorUpdateDistributionWithStagingConfig(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("CNAMEAlreadyExists", errorCode): + return awsRestxml_deserializeErrorCNAMEAlreadyExists(response, errorBody) + + case strings.EqualFold("IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior", errorCode): + return awsRestxml_deserializeErrorIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(response, errorBody) + + case strings.EqualFold("IllegalUpdate", errorCode): + return awsRestxml_deserializeErrorIllegalUpdate(response, errorBody) + + case strings.EqualFold("InconsistentQuantities", errorCode): + return awsRestxml_deserializeErrorInconsistentQuantities(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidDefaultRootObject", errorCode): + return awsRestxml_deserializeErrorInvalidDefaultRootObject(response, errorBody) + + case strings.EqualFold("InvalidErrorCode", errorCode): + return awsRestxml_deserializeErrorInvalidErrorCode(response, errorBody) + + case strings.EqualFold("InvalidForwardCookies", errorCode): + return awsRestxml_deserializeErrorInvalidForwardCookies(response, errorBody) + + case strings.EqualFold("InvalidFunctionAssociation", errorCode): + return awsRestxml_deserializeErrorInvalidFunctionAssociation(response, errorBody) + + case strings.EqualFold("InvalidGeoRestrictionParameter", errorCode): + return awsRestxml_deserializeErrorInvalidGeoRestrictionParameter(response, errorBody) + + case strings.EqualFold("InvalidHeadersForS3Origin", errorCode): + return awsRestxml_deserializeErrorInvalidHeadersForS3Origin(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("InvalidLambdaFunctionAssociation", errorCode): + return awsRestxml_deserializeErrorInvalidLambdaFunctionAssociation(response, errorBody) + + case strings.EqualFold("InvalidLocationCode", errorCode): + return awsRestxml_deserializeErrorInvalidLocationCode(response, errorBody) + + case strings.EqualFold("InvalidMinimumProtocolVersion", errorCode): + return awsRestxml_deserializeErrorInvalidMinimumProtocolVersion(response, errorBody) + + case strings.EqualFold("InvalidOriginAccessControl", errorCode): + return awsRestxml_deserializeErrorInvalidOriginAccessControl(response, errorBody) + + case strings.EqualFold("InvalidOriginAccessIdentity", errorCode): + return awsRestxml_deserializeErrorInvalidOriginAccessIdentity(response, errorBody) + + case strings.EqualFold("InvalidOriginKeepaliveTimeout", errorCode): + return awsRestxml_deserializeErrorInvalidOriginKeepaliveTimeout(response, errorBody) + + case strings.EqualFold("InvalidOriginReadTimeout", errorCode): + return awsRestxml_deserializeErrorInvalidOriginReadTimeout(response, errorBody) + + case strings.EqualFold("InvalidQueryStringParameters", errorCode): + return awsRestxml_deserializeErrorInvalidQueryStringParameters(response, errorBody) + + case strings.EqualFold("InvalidRelativePath", errorCode): + return awsRestxml_deserializeErrorInvalidRelativePath(response, errorBody) + + case strings.EqualFold("InvalidRequiredProtocol", errorCode): + return awsRestxml_deserializeErrorInvalidRequiredProtocol(response, errorBody) + + case strings.EqualFold("InvalidResponseCode", errorCode): + return awsRestxml_deserializeErrorInvalidResponseCode(response, errorBody) + + case strings.EqualFold("InvalidTTLOrder", errorCode): + return awsRestxml_deserializeErrorInvalidTTLOrder(response, errorBody) + + case strings.EqualFold("InvalidViewerCertificate", errorCode): + return awsRestxml_deserializeErrorInvalidViewerCertificate(response, errorBody) + + case strings.EqualFold("InvalidWebACLId", errorCode): + return awsRestxml_deserializeErrorInvalidWebACLId(response, errorBody) + + case strings.EqualFold("MissingBody", errorCode): + return awsRestxml_deserializeErrorMissingBody(response, errorBody) + + case strings.EqualFold("NoSuchCachePolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchCachePolicy(response, errorBody) + + case strings.EqualFold("NoSuchDistribution", errorCode): + return awsRestxml_deserializeErrorNoSuchDistribution(response, errorBody) + + case strings.EqualFold("NoSuchFieldLevelEncryptionConfig", errorCode): + return awsRestxml_deserializeErrorNoSuchFieldLevelEncryptionConfig(response, errorBody) + + case strings.EqualFold("NoSuchOrigin", errorCode): + return awsRestxml_deserializeErrorNoSuchOrigin(response, errorBody) + + case strings.EqualFold("NoSuchOriginRequestPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchOriginRequestPolicy(response, errorBody) + + case strings.EqualFold("NoSuchRealtimeLogConfig", errorCode): + return awsRestxml_deserializeErrorNoSuchRealtimeLogConfig(response, errorBody) + + case strings.EqualFold("NoSuchResponseHeadersPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchResponseHeadersPolicy(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + case strings.EqualFold("RealtimeLogConfigOwnerMismatch", errorCode): + return awsRestxml_deserializeErrorRealtimeLogConfigOwnerMismatch(response, errorBody) + + case strings.EqualFold("TooManyCacheBehaviors", errorCode): + return awsRestxml_deserializeErrorTooManyCacheBehaviors(response, errorBody) + + case strings.EqualFold("TooManyCertificates", errorCode): + return awsRestxml_deserializeErrorTooManyCertificates(response, errorBody) + + case strings.EqualFold("TooManyCookieNamesInWhiteList", errorCode): + return awsRestxml_deserializeErrorTooManyCookieNamesInWhiteList(response, errorBody) + + case strings.EqualFold("TooManyDistributionCNAMEs", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionCNAMEs(response, errorBody) + + case strings.EqualFold("TooManyDistributionsAssociatedToCachePolicy", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToCachePolicy(response, errorBody) + + case strings.EqualFold("TooManyDistributionsAssociatedToFieldLevelEncryptionConfig", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToFieldLevelEncryptionConfig(response, errorBody) + + case strings.EqualFold("TooManyDistributionsAssociatedToKeyGroup", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToKeyGroup(response, errorBody) + + case strings.EqualFold("TooManyDistributionsAssociatedToOriginAccessControl", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToOriginAccessControl(response, errorBody) + + case strings.EqualFold("TooManyDistributionsAssociatedToOriginRequestPolicy", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToOriginRequestPolicy(response, errorBody) + + case strings.EqualFold("TooManyDistributionsAssociatedToResponseHeadersPolicy", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToResponseHeadersPolicy(response, errorBody) + + case strings.EqualFold("TooManyDistributionsWithFunctionAssociations", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsWithFunctionAssociations(response, errorBody) + + case strings.EqualFold("TooManyDistributionsWithLambdaAssociations", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsWithLambdaAssociations(response, errorBody) + + case strings.EqualFold("TooManyDistributionsWithSingleFunctionARN", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsWithSingleFunctionARN(response, errorBody) + + case strings.EqualFold("TooManyFunctionAssociations", errorCode): + return awsRestxml_deserializeErrorTooManyFunctionAssociations(response, errorBody) + + case strings.EqualFold("TooManyHeadersInForwardedValues", errorCode): + return awsRestxml_deserializeErrorTooManyHeadersInForwardedValues(response, errorBody) + + case strings.EqualFold("TooManyKeyGroupsAssociatedToDistribution", errorCode): + return awsRestxml_deserializeErrorTooManyKeyGroupsAssociatedToDistribution(response, errorBody) + + case strings.EqualFold("TooManyLambdaFunctionAssociations", errorCode): + return awsRestxml_deserializeErrorTooManyLambdaFunctionAssociations(response, errorBody) + + case strings.EqualFold("TooManyOriginCustomHeaders", errorCode): + return awsRestxml_deserializeErrorTooManyOriginCustomHeaders(response, errorBody) + + case strings.EqualFold("TooManyOriginGroupsPerDistribution", errorCode): + return awsRestxml_deserializeErrorTooManyOriginGroupsPerDistribution(response, errorBody) + + case strings.EqualFold("TooManyOrigins", errorCode): + return awsRestxml_deserializeErrorTooManyOrigins(response, errorBody) + + case strings.EqualFold("TooManyQueryStringParameters", errorCode): + return awsRestxml_deserializeErrorTooManyQueryStringParameters(response, errorBody) + + case strings.EqualFold("TooManyTrustedSigners", errorCode): + return awsRestxml_deserializeErrorTooManyTrustedSigners(response, errorBody) + + case strings.EqualFold("TrustedKeyGroupDoesNotExist", errorCode): + return awsRestxml_deserializeErrorTrustedKeyGroupDoesNotExist(response, errorBody) + + case strings.EqualFold("TrustedSignerDoesNotExist", errorCode): + return awsRestxml_deserializeErrorTrustedSignerDoesNotExist(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsUpdateDistributionWithStagingConfigOutput(v *UpdateDistributionWithStagingConfigOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentUpdateDistributionWithStagingConfigOutput(v **UpdateDistributionWithStagingConfigOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *UpdateDistributionWithStagingConfigOutput + if *v == nil { + sv = &UpdateDistributionWithStagingConfigOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Distribution", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentDistribution(&sv.Distribution, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpUpdateFieldLevelEncryptionConfig struct { +} + +func (*awsRestxml_deserializeOpUpdateFieldLevelEncryptionConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpUpdateFieldLevelEncryptionConfig) 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, awsRestxml_deserializeOpErrorUpdateFieldLevelEncryptionConfig(response, &metadata) + } + output := &UpdateFieldLevelEncryptionConfigOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsUpdateFieldLevelEncryptionConfigOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentFieldLevelEncryption(&output.FieldLevelEncryption, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorUpdateFieldLevelEncryptionConfig(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("IllegalUpdate", errorCode): + return awsRestxml_deserializeErrorIllegalUpdate(response, errorBody) + + case strings.EqualFold("InconsistentQuantities", errorCode): + return awsRestxml_deserializeErrorInconsistentQuantities(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("NoSuchFieldLevelEncryptionConfig", errorCode): + return awsRestxml_deserializeErrorNoSuchFieldLevelEncryptionConfig(response, errorBody) + + case strings.EqualFold("NoSuchFieldLevelEncryptionProfile", errorCode): + return awsRestxml_deserializeErrorNoSuchFieldLevelEncryptionProfile(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + case strings.EqualFold("QueryArgProfileEmpty", errorCode): + return awsRestxml_deserializeErrorQueryArgProfileEmpty(response, errorBody) + + case strings.EqualFold("TooManyFieldLevelEncryptionContentTypeProfiles", errorCode): + return awsRestxml_deserializeErrorTooManyFieldLevelEncryptionContentTypeProfiles(response, errorBody) + + case strings.EqualFold("TooManyFieldLevelEncryptionQueryArgProfiles", errorCode): + return awsRestxml_deserializeErrorTooManyFieldLevelEncryptionQueryArgProfiles(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsUpdateFieldLevelEncryptionConfigOutput(v *UpdateFieldLevelEncryptionConfigOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentUpdateFieldLevelEncryptionConfigOutput(v **UpdateFieldLevelEncryptionConfigOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *UpdateFieldLevelEncryptionConfigOutput + if *v == nil { + sv = &UpdateFieldLevelEncryptionConfigOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("FieldLevelEncryption", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFieldLevelEncryption(&sv.FieldLevelEncryption, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpUpdateFieldLevelEncryptionProfile struct { +} + +func (*awsRestxml_deserializeOpUpdateFieldLevelEncryptionProfile) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpUpdateFieldLevelEncryptionProfile) 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, awsRestxml_deserializeOpErrorUpdateFieldLevelEncryptionProfile(response, &metadata) + } + output := &UpdateFieldLevelEncryptionProfileOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsUpdateFieldLevelEncryptionProfileOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentFieldLevelEncryptionProfile(&output.FieldLevelEncryptionProfile, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorUpdateFieldLevelEncryptionProfile(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("FieldLevelEncryptionProfileAlreadyExists", errorCode): + return awsRestxml_deserializeErrorFieldLevelEncryptionProfileAlreadyExists(response, errorBody) + + case strings.EqualFold("FieldLevelEncryptionProfileSizeExceeded", errorCode): + return awsRestxml_deserializeErrorFieldLevelEncryptionProfileSizeExceeded(response, errorBody) + + case strings.EqualFold("IllegalUpdate", errorCode): + return awsRestxml_deserializeErrorIllegalUpdate(response, errorBody) + + case strings.EqualFold("InconsistentQuantities", errorCode): + return awsRestxml_deserializeErrorInconsistentQuantities(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("NoSuchFieldLevelEncryptionProfile", errorCode): + return awsRestxml_deserializeErrorNoSuchFieldLevelEncryptionProfile(response, errorBody) + + case strings.EqualFold("NoSuchPublicKey", errorCode): + return awsRestxml_deserializeErrorNoSuchPublicKey(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + case strings.EqualFold("TooManyFieldLevelEncryptionEncryptionEntities", errorCode): + return awsRestxml_deserializeErrorTooManyFieldLevelEncryptionEncryptionEntities(response, errorBody) + + case strings.EqualFold("TooManyFieldLevelEncryptionFieldPatterns", errorCode): + return awsRestxml_deserializeErrorTooManyFieldLevelEncryptionFieldPatterns(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsUpdateFieldLevelEncryptionProfileOutput(v *UpdateFieldLevelEncryptionProfileOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentUpdateFieldLevelEncryptionProfileOutput(v **UpdateFieldLevelEncryptionProfileOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *UpdateFieldLevelEncryptionProfileOutput + if *v == nil { + sv = &UpdateFieldLevelEncryptionProfileOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("FieldLevelEncryptionProfile", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFieldLevelEncryptionProfile(&sv.FieldLevelEncryptionProfile, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpUpdateFunction struct { +} + +func (*awsRestxml_deserializeOpUpdateFunction) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpUpdateFunction) 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, awsRestxml_deserializeOpErrorUpdateFunction(response, &metadata) + } + output := &UpdateFunctionOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsUpdateFunctionOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentFunctionSummary(&output.FunctionSummary, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorUpdateFunction(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("FunctionSizeLimitExceeded", errorCode): + return awsRestxml_deserializeErrorFunctionSizeLimitExceeded(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("NoSuchFunctionExists", errorCode): + return awsRestxml_deserializeErrorNoSuchFunctionExists(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsUpdateFunctionOutput(v *UpdateFunctionOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETtag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentUpdateFunctionOutput(v **UpdateFunctionOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *UpdateFunctionOutput + if *v == nil { + sv = &UpdateFunctionOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("FunctionSummary", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFunctionSummary(&sv.FunctionSummary, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpUpdateKeyGroup struct { +} + +func (*awsRestxml_deserializeOpUpdateKeyGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpUpdateKeyGroup) 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, awsRestxml_deserializeOpErrorUpdateKeyGroup(response, &metadata) + } + output := &UpdateKeyGroupOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsUpdateKeyGroupOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentKeyGroup(&output.KeyGroup, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorUpdateKeyGroup(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("KeyGroupAlreadyExists", errorCode): + return awsRestxml_deserializeErrorKeyGroupAlreadyExists(response, errorBody) + + case strings.EqualFold("NoSuchResource", errorCode): + return awsRestxml_deserializeErrorNoSuchResource(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + case strings.EqualFold("TooManyPublicKeysInKeyGroup", errorCode): + return awsRestxml_deserializeErrorTooManyPublicKeysInKeyGroup(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsUpdateKeyGroupOutput(v *UpdateKeyGroupOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentUpdateKeyGroupOutput(v **UpdateKeyGroupOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *UpdateKeyGroupOutput + if *v == nil { + sv = &UpdateKeyGroupOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("KeyGroup", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentKeyGroup(&sv.KeyGroup, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpUpdateKeyValueStore struct { +} + +func (*awsRestxml_deserializeOpUpdateKeyValueStore) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpUpdateKeyValueStore) 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, awsRestxml_deserializeOpErrorUpdateKeyValueStore(response, &metadata) + } + output := &UpdateKeyValueStoreOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsUpdateKeyValueStoreOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentKeyValueStore(&output.KeyValueStore, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorUpdateKeyValueStore(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("EntityNotFound", errorCode): + return awsRestxml_deserializeErrorEntityNotFound(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsUpdateKeyValueStoreOutput(v *UpdateKeyValueStoreOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentUpdateKeyValueStoreOutput(v **UpdateKeyValueStoreOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *UpdateKeyValueStoreOutput + if *v == nil { + sv = &UpdateKeyValueStoreOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("KeyValueStore", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentKeyValueStore(&sv.KeyValueStore, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpUpdateOriginAccessControl struct { +} + +func (*awsRestxml_deserializeOpUpdateOriginAccessControl) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpUpdateOriginAccessControl) 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, awsRestxml_deserializeOpErrorUpdateOriginAccessControl(response, &metadata) + } + output := &UpdateOriginAccessControlOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsUpdateOriginAccessControlOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentOriginAccessControl(&output.OriginAccessControl, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorUpdateOriginAccessControl(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("IllegalUpdate", errorCode): + return awsRestxml_deserializeErrorIllegalUpdate(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("NoSuchOriginAccessControl", errorCode): + return awsRestxml_deserializeErrorNoSuchOriginAccessControl(response, errorBody) + + case strings.EqualFold("OriginAccessControlAlreadyExists", errorCode): + return awsRestxml_deserializeErrorOriginAccessControlAlreadyExists(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsUpdateOriginAccessControlOutput(v *UpdateOriginAccessControlOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentUpdateOriginAccessControlOutput(v **UpdateOriginAccessControlOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *UpdateOriginAccessControlOutput + if *v == nil { + sv = &UpdateOriginAccessControlOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("OriginAccessControl", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOriginAccessControl(&sv.OriginAccessControl, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpUpdateOriginRequestPolicy struct { +} + +func (*awsRestxml_deserializeOpUpdateOriginRequestPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpUpdateOriginRequestPolicy) 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, awsRestxml_deserializeOpErrorUpdateOriginRequestPolicy(response, &metadata) + } + output := &UpdateOriginRequestPolicyOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsUpdateOriginRequestPolicyOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentOriginRequestPolicy(&output.OriginRequestPolicy, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorUpdateOriginRequestPolicy(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("IllegalUpdate", errorCode): + return awsRestxml_deserializeErrorIllegalUpdate(response, errorBody) + + case strings.EqualFold("InconsistentQuantities", errorCode): + return awsRestxml_deserializeErrorInconsistentQuantities(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("NoSuchOriginRequestPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchOriginRequestPolicy(response, errorBody) + + case strings.EqualFold("OriginRequestPolicyAlreadyExists", errorCode): + return awsRestxml_deserializeErrorOriginRequestPolicyAlreadyExists(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + case strings.EqualFold("TooManyCookiesInOriginRequestPolicy", errorCode): + return awsRestxml_deserializeErrorTooManyCookiesInOriginRequestPolicy(response, errorBody) + + case strings.EqualFold("TooManyHeadersInOriginRequestPolicy", errorCode): + return awsRestxml_deserializeErrorTooManyHeadersInOriginRequestPolicy(response, errorBody) + + case strings.EqualFold("TooManyQueryStringsInOriginRequestPolicy", errorCode): + return awsRestxml_deserializeErrorTooManyQueryStringsInOriginRequestPolicy(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsUpdateOriginRequestPolicyOutput(v *UpdateOriginRequestPolicyOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentUpdateOriginRequestPolicyOutput(v **UpdateOriginRequestPolicyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *UpdateOriginRequestPolicyOutput + if *v == nil { + sv = &UpdateOriginRequestPolicyOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("OriginRequestPolicy", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOriginRequestPolicy(&sv.OriginRequestPolicy, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpUpdatePublicKey struct { +} + +func (*awsRestxml_deserializeOpUpdatePublicKey) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpUpdatePublicKey) 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, awsRestxml_deserializeOpErrorUpdatePublicKey(response, &metadata) + } + output := &UpdatePublicKeyOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsUpdatePublicKeyOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentPublicKey(&output.PublicKey, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorUpdatePublicKey(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("CannotChangeImmutablePublicKeyFields", errorCode): + return awsRestxml_deserializeErrorCannotChangeImmutablePublicKeyFields(response, errorBody) + + case strings.EqualFold("IllegalUpdate", errorCode): + return awsRestxml_deserializeErrorIllegalUpdate(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("NoSuchPublicKey", errorCode): + return awsRestxml_deserializeErrorNoSuchPublicKey(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsUpdatePublicKeyOutput(v *UpdatePublicKeyOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentUpdatePublicKeyOutput(v **UpdatePublicKeyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *UpdatePublicKeyOutput + if *v == nil { + sv = &UpdatePublicKeyOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("PublicKey", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentPublicKey(&sv.PublicKey, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpUpdateRealtimeLogConfig struct { +} + +func (*awsRestxml_deserializeOpUpdateRealtimeLogConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpUpdateRealtimeLogConfig) 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, awsRestxml_deserializeOpErrorUpdateRealtimeLogConfig(response, &metadata) + } + output := &UpdateRealtimeLogConfigOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeOpDocumentUpdateRealtimeLogConfigOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorUpdateRealtimeLogConfig(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("NoSuchRealtimeLogConfig", errorCode): + return awsRestxml_deserializeErrorNoSuchRealtimeLogConfig(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpDocumentUpdateRealtimeLogConfigOutput(v **UpdateRealtimeLogConfigOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *UpdateRealtimeLogConfigOutput + if *v == nil { + sv = &UpdateRealtimeLogConfigOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("RealtimeLogConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentRealtimeLogConfig(&sv.RealtimeLogConfig, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpUpdateResponseHeadersPolicy struct { +} + +func (*awsRestxml_deserializeOpUpdateResponseHeadersPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpUpdateResponseHeadersPolicy) 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, awsRestxml_deserializeOpErrorUpdateResponseHeadersPolicy(response, &metadata) + } + output := &UpdateResponseHeadersPolicyOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsUpdateResponseHeadersPolicyOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentResponseHeadersPolicy(&output.ResponseHeadersPolicy, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorUpdateResponseHeadersPolicy(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("IllegalUpdate", errorCode): + return awsRestxml_deserializeErrorIllegalUpdate(response, errorBody) + + case strings.EqualFold("InconsistentQuantities", errorCode): + return awsRestxml_deserializeErrorInconsistentQuantities(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("NoSuchResponseHeadersPolicy", errorCode): + return awsRestxml_deserializeErrorNoSuchResponseHeadersPolicy(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + case strings.EqualFold("ResponseHeadersPolicyAlreadyExists", errorCode): + return awsRestxml_deserializeErrorResponseHeadersPolicyAlreadyExists(response, errorBody) + + case strings.EqualFold("TooLongCSPInResponseHeadersPolicy", errorCode): + return awsRestxml_deserializeErrorTooLongCSPInResponseHeadersPolicy(response, errorBody) + + case strings.EqualFold("TooManyCustomHeadersInResponseHeadersPolicy", errorCode): + return awsRestxml_deserializeErrorTooManyCustomHeadersInResponseHeadersPolicy(response, errorBody) + + case strings.EqualFold("TooManyRemoveHeadersInResponseHeadersPolicy", errorCode): + return awsRestxml_deserializeErrorTooManyRemoveHeadersInResponseHeadersPolicy(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsUpdateResponseHeadersPolicyOutput(v *UpdateResponseHeadersPolicyOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentUpdateResponseHeadersPolicyOutput(v **UpdateResponseHeadersPolicyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *UpdateResponseHeadersPolicyOutput + if *v == nil { + sv = &UpdateResponseHeadersPolicyOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ResponseHeadersPolicy", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentResponseHeadersPolicy(&sv.ResponseHeadersPolicy, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +type awsRestxml_deserializeOpUpdateStreamingDistribution struct { +} + +func (*awsRestxml_deserializeOpUpdateStreamingDistribution) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpUpdateStreamingDistribution) 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, awsRestxml_deserializeOpErrorUpdateStreamingDistribution(response, &metadata) + } + output := &UpdateStreamingDistributionOutput{} + out.Result = output + + err = awsRestxml_deserializeOpHttpBindingsUpdateStreamingDistributionOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsRestxml_deserializeDocumentStreamingDistribution(&output.StreamingDistribution, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorUpdateStreamingDistribution(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("AccessDenied", errorCode): + return awsRestxml_deserializeErrorAccessDenied(response, errorBody) + + case strings.EqualFold("CNAMEAlreadyExists", errorCode): + return awsRestxml_deserializeErrorCNAMEAlreadyExists(response, errorBody) + + case strings.EqualFold("IllegalUpdate", errorCode): + return awsRestxml_deserializeErrorIllegalUpdate(response, errorBody) + + case strings.EqualFold("InconsistentQuantities", errorCode): + return awsRestxml_deserializeErrorInconsistentQuantities(response, errorBody) + + case strings.EqualFold("InvalidArgument", errorCode): + return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + + case strings.EqualFold("InvalidIfMatchVersion", errorCode): + return awsRestxml_deserializeErrorInvalidIfMatchVersion(response, errorBody) + + case strings.EqualFold("InvalidOriginAccessControl", errorCode): + return awsRestxml_deserializeErrorInvalidOriginAccessControl(response, errorBody) + + case strings.EqualFold("InvalidOriginAccessIdentity", errorCode): + return awsRestxml_deserializeErrorInvalidOriginAccessIdentity(response, errorBody) + + case strings.EqualFold("MissingBody", errorCode): + return awsRestxml_deserializeErrorMissingBody(response, errorBody) + + case strings.EqualFold("NoSuchStreamingDistribution", errorCode): + return awsRestxml_deserializeErrorNoSuchStreamingDistribution(response, errorBody) + + case strings.EqualFold("PreconditionFailed", errorCode): + return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + + case strings.EqualFold("TooManyStreamingDistributionCNAMEs", errorCode): + return awsRestxml_deserializeErrorTooManyStreamingDistributionCNAMEs(response, errorBody) + + case strings.EqualFold("TooManyTrustedSigners", errorCode): + return awsRestxml_deserializeErrorTooManyTrustedSigners(response, errorBody) + + case strings.EqualFold("TrustedSignerDoesNotExist", errorCode): + return awsRestxml_deserializeErrorTrustedSignerDoesNotExist(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestxml_deserializeOpHttpBindingsUpdateStreamingDistributionOutput(v *UpdateStreamingDistributionOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestxml_deserializeOpDocumentUpdateStreamingDistributionOutput(v **UpdateStreamingDistributionOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *UpdateStreamingDistributionOutput + if *v == nil { + sv = &UpdateStreamingDistributionOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("StreamingDistribution", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentStreamingDistribution(&sv.StreamingDistribution, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeErrorAccessDenied(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessDenied{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentAccessDenied(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorBatchTooLarge(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.BatchTooLarge{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentBatchTooLarge(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorCachePolicyAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CachePolicyAlreadyExists{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentCachePolicyAlreadyExists(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorCachePolicyInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CachePolicyInUse{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentCachePolicyInUse(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorCannotChangeImmutablePublicKeyFields(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CannotChangeImmutablePublicKeyFields{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentCannotChangeImmutablePublicKeyFields(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorCannotDeleteEntityWhileInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CannotDeleteEntityWhileInUse{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentCannotDeleteEntityWhileInUse(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorCloudFrontOriginAccessIdentityAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CloudFrontOriginAccessIdentityAlreadyExists{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentityAlreadyExists(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorCloudFrontOriginAccessIdentityInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CloudFrontOriginAccessIdentityInUse{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentityInUse(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorCNAMEAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CNAMEAlreadyExists{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentCNAMEAlreadyExists(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorContinuousDeploymentPolicyAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ContinuousDeploymentPolicyAlreadyExists{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentContinuousDeploymentPolicyAlreadyExists(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorContinuousDeploymentPolicyInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ContinuousDeploymentPolicyInUse{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentContinuousDeploymentPolicyInUse(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorDistributionAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.DistributionAlreadyExists{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentDistributionAlreadyExists(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorDistributionNotDisabled(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.DistributionNotDisabled{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentDistributionNotDisabled(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorEntityAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.EntityAlreadyExists{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentEntityAlreadyExists(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorEntityLimitExceeded(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.EntityLimitExceeded{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentEntityLimitExceeded(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorEntityNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.EntityNotFound{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentEntityNotFound(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorEntitySizeLimitExceeded(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.EntitySizeLimitExceeded{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentEntitySizeLimitExceeded(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorFieldLevelEncryptionConfigAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.FieldLevelEncryptionConfigAlreadyExists{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentFieldLevelEncryptionConfigAlreadyExists(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorFieldLevelEncryptionConfigInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.FieldLevelEncryptionConfigInUse{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentFieldLevelEncryptionConfigInUse(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorFieldLevelEncryptionProfileAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.FieldLevelEncryptionProfileAlreadyExists{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentFieldLevelEncryptionProfileAlreadyExists(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorFieldLevelEncryptionProfileInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.FieldLevelEncryptionProfileInUse{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentFieldLevelEncryptionProfileInUse(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorFieldLevelEncryptionProfileSizeExceeded(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.FieldLevelEncryptionProfileSizeExceeded{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentFieldLevelEncryptionProfileSizeExceeded(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorFunctionAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.FunctionAlreadyExists{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentFunctionAlreadyExists(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorFunctionInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.FunctionInUse{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentFunctionInUse(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorFunctionSizeLimitExceeded(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.FunctionSizeLimitExceeded{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentFunctionSizeLimitExceeded(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorIllegalDelete(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.IllegalDelete{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentIllegalDelete(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorIllegalOriginAccessConfiguration(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.IllegalOriginAccessConfiguration{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentIllegalOriginAccessConfiguration(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorIllegalUpdate(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.IllegalUpdate{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentIllegalUpdate(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInconsistentQuantities(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InconsistentQuantities{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInconsistentQuantities(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidArgument(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidArgument{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidArgument(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidDefaultRootObject(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidDefaultRootObject{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidDefaultRootObject(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidDomainNameForOriginAccessControl(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidDomainNameForOriginAccessControl{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidDomainNameForOriginAccessControl(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidErrorCode(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidErrorCode{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidErrorCode(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidForwardCookies(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidForwardCookies{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidForwardCookies(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidFunctionAssociation(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidFunctionAssociation{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidFunctionAssociation(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidGeoRestrictionParameter(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidGeoRestrictionParameter{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidGeoRestrictionParameter(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidHeadersForS3Origin(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidHeadersForS3Origin{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidHeadersForS3Origin(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidIfMatchVersion(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidIfMatchVersion{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidIfMatchVersion(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidLambdaFunctionAssociation(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidLambdaFunctionAssociation{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidLambdaFunctionAssociation(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidLocationCode(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidLocationCode{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidLocationCode(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidMinimumProtocolVersion(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidMinimumProtocolVersion{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidMinimumProtocolVersion(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidOrigin(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidOrigin{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidOrigin(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidOriginAccessControl(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidOriginAccessControl{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidOriginAccessControl(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidOriginAccessIdentity(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidOriginAccessIdentity{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidOriginAccessIdentity(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidOriginKeepaliveTimeout(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidOriginKeepaliveTimeout{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidOriginKeepaliveTimeout(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidOriginReadTimeout(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidOriginReadTimeout{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidOriginReadTimeout(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidProtocolSettings(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidProtocolSettings{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidProtocolSettings(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidQueryStringParameters(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidQueryStringParameters{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidQueryStringParameters(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidRelativePath(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidRelativePath{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidRelativePath(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidRequiredProtocol(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidRequiredProtocol{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidRequiredProtocol(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidResponseCode(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidResponseCode{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidResponseCode(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidTagging(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidTagging{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidTagging(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidTTLOrder(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidTTLOrder{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidTTLOrder(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidViewerCertificate(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidViewerCertificate{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidViewerCertificate(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorInvalidWebACLId(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidWebACLId{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentInvalidWebACLId(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorKeyGroupAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.KeyGroupAlreadyExists{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentKeyGroupAlreadyExists(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorMissingBody(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.MissingBody{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentMissingBody(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorMonitoringSubscriptionAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.MonitoringSubscriptionAlreadyExists{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentMonitoringSubscriptionAlreadyExists(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorNoSuchCachePolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchCachePolicy{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentNoSuchCachePolicy(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorNoSuchCloudFrontOriginAccessIdentity(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchCloudFrontOriginAccessIdentity{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentNoSuchCloudFrontOriginAccessIdentity(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorNoSuchContinuousDeploymentPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchContinuousDeploymentPolicy{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentNoSuchContinuousDeploymentPolicy(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorNoSuchDistribution(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchDistribution{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentNoSuchDistribution(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorNoSuchFieldLevelEncryptionConfig(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchFieldLevelEncryptionConfig{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentNoSuchFieldLevelEncryptionConfig(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorNoSuchFieldLevelEncryptionProfile(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchFieldLevelEncryptionProfile{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentNoSuchFieldLevelEncryptionProfile(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorNoSuchFunctionExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchFunctionExists{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentNoSuchFunctionExists(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorNoSuchInvalidation(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchInvalidation{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentNoSuchInvalidation(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorNoSuchMonitoringSubscription(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchMonitoringSubscription{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentNoSuchMonitoringSubscription(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorNoSuchOrigin(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchOrigin{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentNoSuchOrigin(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorNoSuchOriginAccessControl(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchOriginAccessControl{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentNoSuchOriginAccessControl(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorNoSuchOriginRequestPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchOriginRequestPolicy{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentNoSuchOriginRequestPolicy(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorNoSuchPublicKey(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchPublicKey{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentNoSuchPublicKey(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorNoSuchRealtimeLogConfig(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchRealtimeLogConfig{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentNoSuchRealtimeLogConfig(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorNoSuchResource(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchResource{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentNoSuchResource(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorNoSuchResponseHeadersPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchResponseHeadersPolicy{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentNoSuchResponseHeadersPolicy(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorNoSuchStreamingDistribution(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoSuchStreamingDistribution{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentNoSuchStreamingDistribution(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorOriginAccessControlAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.OriginAccessControlAlreadyExists{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentOriginAccessControlAlreadyExists(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorOriginAccessControlInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.OriginAccessControlInUse{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentOriginAccessControlInUse(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorOriginRequestPolicyAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.OriginRequestPolicyAlreadyExists{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentOriginRequestPolicyAlreadyExists(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorOriginRequestPolicyInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.OriginRequestPolicyInUse{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentOriginRequestPolicyInUse(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorPreconditionFailed(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.PreconditionFailed{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentPreconditionFailed(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorPublicKeyAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.PublicKeyAlreadyExists{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentPublicKeyAlreadyExists(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorPublicKeyInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.PublicKeyInUse{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentPublicKeyInUse(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorQueryArgProfileEmpty(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.QueryArgProfileEmpty{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentQueryArgProfileEmpty(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorRealtimeLogConfigAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.RealtimeLogConfigAlreadyExists{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentRealtimeLogConfigAlreadyExists(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorRealtimeLogConfigInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.RealtimeLogConfigInUse{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentRealtimeLogConfigInUse(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorRealtimeLogConfigOwnerMismatch(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.RealtimeLogConfigOwnerMismatch{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentRealtimeLogConfigOwnerMismatch(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorResourceInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceInUse{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentResourceInUse(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorResponseHeadersPolicyAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResponseHeadersPolicyAlreadyExists{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentResponseHeadersPolicyAlreadyExists(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorResponseHeadersPolicyInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResponseHeadersPolicyInUse{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentResponseHeadersPolicyInUse(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorStagingDistributionInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.StagingDistributionInUse{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentStagingDistributionInUse(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorStreamingDistributionAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.StreamingDistributionAlreadyExists{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentStreamingDistributionAlreadyExists(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorStreamingDistributionNotDisabled(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.StreamingDistributionNotDisabled{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentStreamingDistributionNotDisabled(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTestFunctionFailed(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TestFunctionFailed{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTestFunctionFailed(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooLongCSPInResponseHeadersPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooLongCSPInResponseHeadersPolicy{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooLongCSPInResponseHeadersPolicy(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyCacheBehaviors(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyCacheBehaviors{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyCacheBehaviors(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyCachePolicies(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyCachePolicies{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyCachePolicies(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyCertificates(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyCertificates{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyCertificates(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyCloudFrontOriginAccessIdentities(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyCloudFrontOriginAccessIdentities{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyCloudFrontOriginAccessIdentities(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyContinuousDeploymentPolicies(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyContinuousDeploymentPolicies{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyContinuousDeploymentPolicies(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyCookieNamesInWhiteList(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyCookieNamesInWhiteList{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyCookieNamesInWhiteList(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyCookiesInCachePolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyCookiesInCachePolicy{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyCookiesInCachePolicy(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyCookiesInOriginRequestPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyCookiesInOriginRequestPolicy{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyCookiesInOriginRequestPolicy(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyCustomHeadersInResponseHeadersPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyCustomHeadersInResponseHeadersPolicy{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyCustomHeadersInResponseHeadersPolicy(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyDistributionCNAMEs(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyDistributionCNAMEs{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyDistributionCNAMEs(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyDistributions(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyDistributions{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyDistributions(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyDistributionsAssociatedToCachePolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyDistributionsAssociatedToCachePolicy{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToCachePolicy(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyDistributionsAssociatedToFieldLevelEncryptionConfig(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyDistributionsAssociatedToFieldLevelEncryptionConfig{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToFieldLevelEncryptionConfig(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyDistributionsAssociatedToKeyGroup(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyDistributionsAssociatedToKeyGroup{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToKeyGroup(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyDistributionsAssociatedToOriginAccessControl(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyDistributionsAssociatedToOriginAccessControl{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToOriginAccessControl(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyDistributionsAssociatedToOriginRequestPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyDistributionsAssociatedToOriginRequestPolicy{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToOriginRequestPolicy(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyDistributionsAssociatedToResponseHeadersPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyDistributionsAssociatedToResponseHeadersPolicy{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToResponseHeadersPolicy(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyDistributionsWithFunctionAssociations(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyDistributionsWithFunctionAssociations{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyDistributionsWithFunctionAssociations(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyDistributionsWithLambdaAssociations(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyDistributionsWithLambdaAssociations{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyDistributionsWithLambdaAssociations(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyDistributionsWithSingleFunctionARN(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyDistributionsWithSingleFunctionARN{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyDistributionsWithSingleFunctionARN(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyFieldLevelEncryptionConfigs(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyFieldLevelEncryptionConfigs{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionConfigs(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyFieldLevelEncryptionContentTypeProfiles(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyFieldLevelEncryptionContentTypeProfiles{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionContentTypeProfiles(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyFieldLevelEncryptionEncryptionEntities(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyFieldLevelEncryptionEncryptionEntities{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionEncryptionEntities(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyFieldLevelEncryptionFieldPatterns(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyFieldLevelEncryptionFieldPatterns{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionFieldPatterns(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyFieldLevelEncryptionProfiles(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyFieldLevelEncryptionProfiles{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionProfiles(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyFieldLevelEncryptionQueryArgProfiles(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyFieldLevelEncryptionQueryArgProfiles{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionQueryArgProfiles(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyFunctionAssociations(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyFunctionAssociations{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyFunctionAssociations(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyFunctions(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyFunctions{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyFunctions(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyHeadersInCachePolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyHeadersInCachePolicy{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyHeadersInCachePolicy(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyHeadersInForwardedValues(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyHeadersInForwardedValues{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyHeadersInForwardedValues(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyHeadersInOriginRequestPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyHeadersInOriginRequestPolicy{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyHeadersInOriginRequestPolicy(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyInvalidationsInProgress(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyInvalidationsInProgress{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyInvalidationsInProgress(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyKeyGroups(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyKeyGroups{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyKeyGroups(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyKeyGroupsAssociatedToDistribution(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyKeyGroupsAssociatedToDistribution{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyKeyGroupsAssociatedToDistribution(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyLambdaFunctionAssociations(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyLambdaFunctionAssociations{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyLambdaFunctionAssociations(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyOriginAccessControls(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyOriginAccessControls{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyOriginAccessControls(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyOriginCustomHeaders(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyOriginCustomHeaders{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyOriginCustomHeaders(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyOriginGroupsPerDistribution(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyOriginGroupsPerDistribution{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyOriginGroupsPerDistribution(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyOriginRequestPolicies(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyOriginRequestPolicies{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyOriginRequestPolicies(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyOrigins(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyOrigins{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyOrigins(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyPublicKeys(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyPublicKeys{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyPublicKeys(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyPublicKeysInKeyGroup(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyPublicKeysInKeyGroup{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyPublicKeysInKeyGroup(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyQueryStringParameters(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyQueryStringParameters{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyQueryStringParameters(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyQueryStringsInCachePolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyQueryStringsInCachePolicy{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyQueryStringsInCachePolicy(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyQueryStringsInOriginRequestPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyQueryStringsInOriginRequestPolicy{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyQueryStringsInOriginRequestPolicy(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyRealtimeLogConfigs(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyRealtimeLogConfigs{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyRealtimeLogConfigs(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyRemoveHeadersInResponseHeadersPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyRemoveHeadersInResponseHeadersPolicy{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyRemoveHeadersInResponseHeadersPolicy(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyResponseHeadersPolicies(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyResponseHeadersPolicies{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyResponseHeadersPolicies(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyStreamingDistributionCNAMEs(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyStreamingDistributionCNAMEs{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyStreamingDistributionCNAMEs(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyStreamingDistributions(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyStreamingDistributions{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyStreamingDistributions(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTooManyTrustedSigners(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyTrustedSigners{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTooManyTrustedSigners(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTrustedKeyGroupDoesNotExist(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TrustedKeyGroupDoesNotExist{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTrustedKeyGroupDoesNotExist(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorTrustedSignerDoesNotExist(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TrustedSignerDoesNotExist{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentTrustedSignerDoesNotExist(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeErrorUnsupportedOperation(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.UnsupportedOperation{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsRestxml_deserializeDocumentUnsupportedOperation(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsRestxml_deserializeDocumentAccessControlAllowHeadersList(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("Header", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentAccessControlAllowHeadersListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentAccessControlAllowMethodsList(v *[]types.ResponseHeadersPolicyAccessControlAllowMethodsValues, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.ResponseHeadersPolicyAccessControlAllowMethodsValues + if *v == nil { + sv = make([]types.ResponseHeadersPolicyAccessControlAllowMethodsValues, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("Method", t.Name.Local): + var col types.ResponseHeadersPolicyAccessControlAllowMethodsValues + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = types.ResponseHeadersPolicyAccessControlAllowMethodsValues(xtv) + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentAccessControlAllowMethodsListUnwrapped(v *[]types.ResponseHeadersPolicyAccessControlAllowMethodsValues, decoder smithyxml.NodeDecoder) error { + var sv []types.ResponseHeadersPolicyAccessControlAllowMethodsValues + if *v == nil { + sv = make([]types.ResponseHeadersPolicyAccessControlAllowMethodsValues, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.ResponseHeadersPolicyAccessControlAllowMethodsValues + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = types.ResponseHeadersPolicyAccessControlAllowMethodsValues(xtv) + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentAccessControlAllowOriginsList(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("Origin", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentAccessControlAllowOriginsListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentAccessControlExposeHeadersList(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("Header", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentAccessControlExposeHeadersListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentAccessDenied(v **types.AccessDenied, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.AccessDenied + if *v == nil { + sv = &types.AccessDenied{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentActiveTrustedKeyGroups(v **types.ActiveTrustedKeyGroups, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ActiveTrustedKeyGroups + if *v == nil { + sv = &types.ActiveTrustedKeyGroups{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Enabled", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.Enabled = ptr.Bool(xtv) + } + + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentKGKeyPairIdsList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentActiveTrustedSigners(v **types.ActiveTrustedSigners, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ActiveTrustedSigners + if *v == nil { + sv = &types.ActiveTrustedSigners{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Enabled", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.Enabled = ptr.Bool(xtv) + } + + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentSignerList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentAliases(v **types.Aliases, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.Aliases + if *v == nil { + sv = &types.Aliases{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentAliasList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentAliasICPRecordal(v **types.AliasICPRecordal, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.AliasICPRecordal + if *v == nil { + sv = &types.AliasICPRecordal{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CNAME", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CNAME = ptr.String(xtv) + } + + case strings.EqualFold("ICPRecordalStatus", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ICPRecordalStatus = types.ICPRecordalStatus(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentAliasICPRecordals(v *[]types.AliasICPRecordal, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.AliasICPRecordal + if *v == nil { + sv = make([]types.AliasICPRecordal, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("AliasICPRecordal", t.Name.Local): + var col types.AliasICPRecordal + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentAliasICPRecordal(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentAliasICPRecordalsUnwrapped(v *[]types.AliasICPRecordal, decoder smithyxml.NodeDecoder) error { + var sv []types.AliasICPRecordal + if *v == nil { + sv = make([]types.AliasICPRecordal, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.AliasICPRecordal + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentAliasICPRecordal(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentAliasList(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("CNAME", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentAliasListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentAllowedMethods(v **types.AllowedMethods, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.AllowedMethods + if *v == nil { + sv = &types.AllowedMethods{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CachedMethods", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCachedMethods(&sv.CachedMethods, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentMethodsList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentAwsAccountNumberList(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("AwsAccountNumber", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentAwsAccountNumberListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentBatchTooLarge(v **types.BatchTooLarge, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.BatchTooLarge + if *v == nil { + sv = &types.BatchTooLarge{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCacheBehavior(v **types.CacheBehavior, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CacheBehavior + if *v == nil { + sv = &types.CacheBehavior{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("AllowedMethods", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentAllowedMethods(&sv.AllowedMethods, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("CachePolicyId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CachePolicyId = ptr.String(xtv) + } + + case strings.EqualFold("Compress", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.Compress = ptr.Bool(xtv) + } + + case strings.EqualFold("DefaultTTL", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.DefaultTTL = ptr.Int64(i64) + } + + case strings.EqualFold("FieldLevelEncryptionId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.FieldLevelEncryptionId = ptr.String(xtv) + } + + case strings.EqualFold("ForwardedValues", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentForwardedValues(&sv.ForwardedValues, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("FunctionAssociations", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFunctionAssociations(&sv.FunctionAssociations, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("LambdaFunctionAssociations", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentLambdaFunctionAssociations(&sv.LambdaFunctionAssociations, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("MaxTTL", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxTTL = ptr.Int64(i64) + } + + case strings.EqualFold("MinTTL", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MinTTL = ptr.Int64(i64) + } + + case strings.EqualFold("OriginRequestPolicyId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.OriginRequestPolicyId = ptr.String(xtv) + } + + case strings.EqualFold("PathPattern", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PathPattern = ptr.String(xtv) + } + + case strings.EqualFold("RealtimeLogConfigArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.RealtimeLogConfigArn = ptr.String(xtv) + } + + case strings.EqualFold("ResponseHeadersPolicyId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ResponseHeadersPolicyId = ptr.String(xtv) + } + + case strings.EqualFold("SmoothStreaming", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.SmoothStreaming = ptr.Bool(xtv) + } + + case strings.EqualFold("TargetOriginId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.TargetOriginId = ptr.String(xtv) + } + + case strings.EqualFold("TrustedKeyGroups", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentTrustedKeyGroups(&sv.TrustedKeyGroups, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("TrustedSigners", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentTrustedSigners(&sv.TrustedSigners, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("ViewerProtocolPolicy", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ViewerProtocolPolicy = types.ViewerProtocolPolicy(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCacheBehaviorList(v *[]types.CacheBehavior, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.CacheBehavior + if *v == nil { + sv = make([]types.CacheBehavior, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("CacheBehavior", t.Name.Local): + var col types.CacheBehavior + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentCacheBehavior(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCacheBehaviorListUnwrapped(v *[]types.CacheBehavior, decoder smithyxml.NodeDecoder) error { + var sv []types.CacheBehavior + if *v == nil { + sv = make([]types.CacheBehavior, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.CacheBehavior + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentCacheBehavior(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentCacheBehaviors(v **types.CacheBehaviors, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CacheBehaviors + if *v == nil { + sv = &types.CacheBehaviors{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCacheBehaviorList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCachedMethods(v **types.CachedMethods, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CachedMethods + if *v == nil { + sv = &types.CachedMethods{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentMethodsList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCachePolicy(v **types.CachePolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CachePolicy + if *v == nil { + sv = &types.CachePolicy{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CachePolicyConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCachePolicyConfig(&sv.CachePolicyConfig, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("LastModifiedTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(t) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCachePolicyAlreadyExists(v **types.CachePolicyAlreadyExists, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CachePolicyAlreadyExists + if *v == nil { + sv = &types.CachePolicyAlreadyExists{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCachePolicyConfig(v **types.CachePolicyConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CachePolicyConfig + if *v == nil { + sv = &types.CachePolicyConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Comment", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Comment = ptr.String(xtv) + } + + case strings.EqualFold("DefaultTTL", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.DefaultTTL = ptr.Int64(i64) + } + + case strings.EqualFold("MaxTTL", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxTTL = ptr.Int64(i64) + } + + case strings.EqualFold("MinTTL", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MinTTL = ptr.Int64(i64) + } + + case strings.EqualFold("Name", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Name = ptr.String(xtv) + } + + case strings.EqualFold("ParametersInCacheKeyAndForwardedToOrigin", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentParametersInCacheKeyAndForwardedToOrigin(&sv.ParametersInCacheKeyAndForwardedToOrigin, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCachePolicyCookiesConfig(v **types.CachePolicyCookiesConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CachePolicyCookiesConfig + if *v == nil { + sv = &types.CachePolicyCookiesConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CookieBehavior", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CookieBehavior = types.CachePolicyCookieBehavior(xtv) + } + + case strings.EqualFold("Cookies", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCookieNames(&sv.Cookies, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCachePolicyHeadersConfig(v **types.CachePolicyHeadersConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CachePolicyHeadersConfig + if *v == nil { + sv = &types.CachePolicyHeadersConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("HeaderBehavior", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.HeaderBehavior = types.CachePolicyHeaderBehavior(xtv) + } + + case strings.EqualFold("Headers", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentHeaders(&sv.Headers, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCachePolicyInUse(v **types.CachePolicyInUse, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CachePolicyInUse + if *v == nil { + sv = &types.CachePolicyInUse{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCachePolicyList(v **types.CachePolicyList, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CachePolicyList + if *v == nil { + sv = &types.CachePolicyList{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCachePolicySummaryList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("NextMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextMarker = ptr.String(xtv) + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCachePolicyQueryStringsConfig(v **types.CachePolicyQueryStringsConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CachePolicyQueryStringsConfig + if *v == nil { + sv = &types.CachePolicyQueryStringsConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("QueryStringBehavior", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.QueryStringBehavior = types.CachePolicyQueryStringBehavior(xtv) + } + + case strings.EqualFold("QueryStrings", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentQueryStringNames(&sv.QueryStrings, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCachePolicySummary(v **types.CachePolicySummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CachePolicySummary + if *v == nil { + sv = &types.CachePolicySummary{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CachePolicy", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCachePolicy(&sv.CachePolicy, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Type", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Type = types.CachePolicyType(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCachePolicySummaryList(v *[]types.CachePolicySummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.CachePolicySummary + if *v == nil { + sv = make([]types.CachePolicySummary, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("CachePolicySummary", t.Name.Local): + var col types.CachePolicySummary + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentCachePolicySummary(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCachePolicySummaryListUnwrapped(v *[]types.CachePolicySummary, decoder smithyxml.NodeDecoder) error { + var sv []types.CachePolicySummary + if *v == nil { + sv = make([]types.CachePolicySummary, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.CachePolicySummary + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentCachePolicySummary(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentCannotChangeImmutablePublicKeyFields(v **types.CannotChangeImmutablePublicKeyFields, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CannotChangeImmutablePublicKeyFields + if *v == nil { + sv = &types.CannotChangeImmutablePublicKeyFields{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCannotDeleteEntityWhileInUse(v **types.CannotDeleteEntityWhileInUse, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CannotDeleteEntityWhileInUse + if *v == nil { + sv = &types.CannotDeleteEntityWhileInUse{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentity(v **types.CloudFrontOriginAccessIdentity, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CloudFrontOriginAccessIdentity + if *v == nil { + sv = &types.CloudFrontOriginAccessIdentity{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CloudFrontOriginAccessIdentityConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentityConfig(&sv.CloudFrontOriginAccessIdentityConfig, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("S3CanonicalUserId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.S3CanonicalUserId = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentityAlreadyExists(v **types.CloudFrontOriginAccessIdentityAlreadyExists, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CloudFrontOriginAccessIdentityAlreadyExists + if *v == nil { + sv = &types.CloudFrontOriginAccessIdentityAlreadyExists{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentityConfig(v **types.CloudFrontOriginAccessIdentityConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CloudFrontOriginAccessIdentityConfig + if *v == nil { + sv = &types.CloudFrontOriginAccessIdentityConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CallerReference", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CallerReference = ptr.String(xtv) + } + + case strings.EqualFold("Comment", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Comment = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentityInUse(v **types.CloudFrontOriginAccessIdentityInUse, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CloudFrontOriginAccessIdentityInUse + if *v == nil { + sv = &types.CloudFrontOriginAccessIdentityInUse{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentityList(v **types.CloudFrontOriginAccessIdentityList, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CloudFrontOriginAccessIdentityList + if *v == nil { + sv = &types.CloudFrontOriginAccessIdentityList{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.IsTruncated = ptr.Bool(xtv) + } + + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentitySummaryList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("NextMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextMarker = ptr.String(xtv) + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentitySummary(v **types.CloudFrontOriginAccessIdentitySummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CloudFrontOriginAccessIdentitySummary + if *v == nil { + sv = &types.CloudFrontOriginAccessIdentitySummary{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Comment", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Comment = ptr.String(xtv) + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("S3CanonicalUserId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.S3CanonicalUserId = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentitySummaryList(v *[]types.CloudFrontOriginAccessIdentitySummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.CloudFrontOriginAccessIdentitySummary + if *v == nil { + sv = make([]types.CloudFrontOriginAccessIdentitySummary, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("CloudFrontOriginAccessIdentitySummary", t.Name.Local): + var col types.CloudFrontOriginAccessIdentitySummary + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentitySummary(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentitySummaryListUnwrapped(v *[]types.CloudFrontOriginAccessIdentitySummary, decoder smithyxml.NodeDecoder) error { + var sv []types.CloudFrontOriginAccessIdentitySummary + if *v == nil { + sv = make([]types.CloudFrontOriginAccessIdentitySummary, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.CloudFrontOriginAccessIdentitySummary + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentCloudFrontOriginAccessIdentitySummary(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentCNAMEAlreadyExists(v **types.CNAMEAlreadyExists, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CNAMEAlreadyExists + if *v == nil { + sv = &types.CNAMEAlreadyExists{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentConflictingAlias(v **types.ConflictingAlias, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ConflictingAlias + if *v == nil { + sv = &types.ConflictingAlias{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("AccountId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.AccountId = ptr.String(xtv) + } + + case strings.EqualFold("Alias", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Alias = ptr.String(xtv) + } + + case strings.EqualFold("DistributionId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.DistributionId = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentConflictingAliases(v *[]types.ConflictingAlias, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.ConflictingAlias + if *v == nil { + sv = make([]types.ConflictingAlias, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("ConflictingAlias", t.Name.Local): + var col types.ConflictingAlias + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentConflictingAlias(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentConflictingAliasesUnwrapped(v *[]types.ConflictingAlias, decoder smithyxml.NodeDecoder) error { + var sv []types.ConflictingAlias + if *v == nil { + sv = make([]types.ConflictingAlias, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.ConflictingAlias + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentConflictingAlias(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentConflictingAliasesList(v **types.ConflictingAliasesList, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ConflictingAliasesList + if *v == nil { + sv = &types.ConflictingAliasesList{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentConflictingAliases(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("NextMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextMarker = ptr.String(xtv) + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentContentTypeProfile(v **types.ContentTypeProfile, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ContentTypeProfile + if *v == nil { + sv = &types.ContentTypeProfile{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ContentType", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ContentType = ptr.String(xtv) + } + + case strings.EqualFold("Format", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Format = types.Format(xtv) + } + + case strings.EqualFold("ProfileId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ProfileId = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentContentTypeProfileConfig(v **types.ContentTypeProfileConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ContentTypeProfileConfig + if *v == nil { + sv = &types.ContentTypeProfileConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ContentTypeProfiles", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentContentTypeProfiles(&sv.ContentTypeProfiles, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("ForwardWhenContentTypeIsUnknown", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.ForwardWhenContentTypeIsUnknown = ptr.Bool(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentContentTypeProfileList(v *[]types.ContentTypeProfile, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.ContentTypeProfile + if *v == nil { + sv = make([]types.ContentTypeProfile, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("ContentTypeProfile", t.Name.Local): + var col types.ContentTypeProfile + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentContentTypeProfile(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentContentTypeProfileListUnwrapped(v *[]types.ContentTypeProfile, decoder smithyxml.NodeDecoder) error { + var sv []types.ContentTypeProfile + if *v == nil { + sv = make([]types.ContentTypeProfile, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.ContentTypeProfile + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentContentTypeProfile(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentContentTypeProfiles(v **types.ContentTypeProfiles, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ContentTypeProfiles + if *v == nil { + sv = &types.ContentTypeProfiles{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentContentTypeProfileList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentContinuousDeploymentPolicy(v **types.ContinuousDeploymentPolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ContinuousDeploymentPolicy + if *v == nil { + sv = &types.ContinuousDeploymentPolicy{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ContinuousDeploymentPolicyConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentContinuousDeploymentPolicyConfig(&sv.ContinuousDeploymentPolicyConfig, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("LastModifiedTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(t) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentContinuousDeploymentPolicyAlreadyExists(v **types.ContinuousDeploymentPolicyAlreadyExists, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ContinuousDeploymentPolicyAlreadyExists + if *v == nil { + sv = &types.ContinuousDeploymentPolicyAlreadyExists{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentContinuousDeploymentPolicyConfig(v **types.ContinuousDeploymentPolicyConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ContinuousDeploymentPolicyConfig + if *v == nil { + sv = &types.ContinuousDeploymentPolicyConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Enabled", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.Enabled = ptr.Bool(xtv) + } + + case strings.EqualFold("StagingDistributionDnsNames", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentStagingDistributionDnsNames(&sv.StagingDistributionDnsNames, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("TrafficConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentTrafficConfig(&sv.TrafficConfig, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentContinuousDeploymentPolicyInUse(v **types.ContinuousDeploymentPolicyInUse, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ContinuousDeploymentPolicyInUse + if *v == nil { + sv = &types.ContinuousDeploymentPolicyInUse{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentContinuousDeploymentPolicyList(v **types.ContinuousDeploymentPolicyList, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ContinuousDeploymentPolicyList + if *v == nil { + sv = &types.ContinuousDeploymentPolicyList{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentContinuousDeploymentPolicySummaryList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("NextMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextMarker = ptr.String(xtv) + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentContinuousDeploymentPolicySummary(v **types.ContinuousDeploymentPolicySummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ContinuousDeploymentPolicySummary + if *v == nil { + sv = &types.ContinuousDeploymentPolicySummary{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ContinuousDeploymentPolicy", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentContinuousDeploymentPolicy(&sv.ContinuousDeploymentPolicy, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentContinuousDeploymentPolicySummaryList(v *[]types.ContinuousDeploymentPolicySummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.ContinuousDeploymentPolicySummary + if *v == nil { + sv = make([]types.ContinuousDeploymentPolicySummary, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("ContinuousDeploymentPolicySummary", t.Name.Local): + var col types.ContinuousDeploymentPolicySummary + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentContinuousDeploymentPolicySummary(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentContinuousDeploymentPolicySummaryListUnwrapped(v *[]types.ContinuousDeploymentPolicySummary, decoder smithyxml.NodeDecoder) error { + var sv []types.ContinuousDeploymentPolicySummary + if *v == nil { + sv = make([]types.ContinuousDeploymentPolicySummary, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.ContinuousDeploymentPolicySummary + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentContinuousDeploymentPolicySummary(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentContinuousDeploymentSingleHeaderConfig(v **types.ContinuousDeploymentSingleHeaderConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ContinuousDeploymentSingleHeaderConfig + if *v == nil { + sv = &types.ContinuousDeploymentSingleHeaderConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Header", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Header = ptr.String(xtv) + } + + case strings.EqualFold("Value", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Value = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentContinuousDeploymentSingleWeightConfig(v **types.ContinuousDeploymentSingleWeightConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ContinuousDeploymentSingleWeightConfig + if *v == nil { + sv = &types.ContinuousDeploymentSingleWeightConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("SessionStickinessConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentSessionStickinessConfig(&sv.SessionStickinessConfig, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Weight", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + f64, err := strconv.ParseFloat(xtv, 64) + if err != nil { + return err + } + sv.Weight = ptr.Float32(float32(f64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCookieNameList(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("Name", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCookieNameListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentCookieNames(v **types.CookieNames, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CookieNames + if *v == nil { + sv = &types.CookieNames{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCookieNameList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCookiePreference(v **types.CookiePreference, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CookiePreference + if *v == nil { + sv = &types.CookiePreference{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Forward", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Forward = types.ItemSelection(xtv) + } + + case strings.EqualFold("WhitelistedNames", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCookieNames(&sv.WhitelistedNames, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCustomErrorResponse(v **types.CustomErrorResponse, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CustomErrorResponse + if *v == nil { + sv = &types.CustomErrorResponse{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ErrorCachingMinTTL", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.ErrorCachingMinTTL = ptr.Int64(i64) + } + + case strings.EqualFold("ErrorCode", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.ErrorCode = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("ResponseCode", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ResponseCode = ptr.String(xtv) + } + + case strings.EqualFold("ResponsePagePath", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ResponsePagePath = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCustomErrorResponseList(v *[]types.CustomErrorResponse, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.CustomErrorResponse + if *v == nil { + sv = make([]types.CustomErrorResponse, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("CustomErrorResponse", t.Name.Local): + var col types.CustomErrorResponse + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentCustomErrorResponse(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCustomErrorResponseListUnwrapped(v *[]types.CustomErrorResponse, decoder smithyxml.NodeDecoder) error { + var sv []types.CustomErrorResponse + if *v == nil { + sv = make([]types.CustomErrorResponse, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.CustomErrorResponse + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentCustomErrorResponse(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentCustomErrorResponses(v **types.CustomErrorResponses, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CustomErrorResponses + if *v == nil { + sv = &types.CustomErrorResponses{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCustomErrorResponseList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCustomHeaders(v **types.CustomHeaders, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CustomHeaders + if *v == nil { + sv = &types.CustomHeaders{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOriginCustomHeadersList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentCustomOriginConfig(v **types.CustomOriginConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CustomOriginConfig + if *v == nil { + sv = &types.CustomOriginConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("HTTPPort", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.HTTPPort = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("HTTPSPort", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.HTTPSPort = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("OriginKeepaliveTimeout", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.OriginKeepaliveTimeout = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("OriginProtocolPolicy", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.OriginProtocolPolicy = types.OriginProtocolPolicy(xtv) + } + + case strings.EqualFold("OriginReadTimeout", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.OriginReadTimeout = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("OriginSslProtocols", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOriginSslProtocols(&sv.OriginSslProtocols, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentDefaultCacheBehavior(v **types.DefaultCacheBehavior, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.DefaultCacheBehavior + if *v == nil { + sv = &types.DefaultCacheBehavior{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("AllowedMethods", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentAllowedMethods(&sv.AllowedMethods, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("CachePolicyId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CachePolicyId = ptr.String(xtv) + } + + case strings.EqualFold("Compress", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.Compress = ptr.Bool(xtv) + } + + case strings.EqualFold("DefaultTTL", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.DefaultTTL = ptr.Int64(i64) + } + + case strings.EqualFold("FieldLevelEncryptionId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.FieldLevelEncryptionId = ptr.String(xtv) + } + + case strings.EqualFold("ForwardedValues", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentForwardedValues(&sv.ForwardedValues, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("FunctionAssociations", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFunctionAssociations(&sv.FunctionAssociations, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("LambdaFunctionAssociations", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentLambdaFunctionAssociations(&sv.LambdaFunctionAssociations, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("MaxTTL", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxTTL = ptr.Int64(i64) + } + + case strings.EqualFold("MinTTL", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MinTTL = ptr.Int64(i64) + } + + case strings.EqualFold("OriginRequestPolicyId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.OriginRequestPolicyId = ptr.String(xtv) + } + + case strings.EqualFold("RealtimeLogConfigArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.RealtimeLogConfigArn = ptr.String(xtv) + } + + case strings.EqualFold("ResponseHeadersPolicyId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ResponseHeadersPolicyId = ptr.String(xtv) + } + + case strings.EqualFold("SmoothStreaming", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.SmoothStreaming = ptr.Bool(xtv) + } + + case strings.EqualFold("TargetOriginId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.TargetOriginId = ptr.String(xtv) + } + + case strings.EqualFold("TrustedKeyGroups", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentTrustedKeyGroups(&sv.TrustedKeyGroups, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("TrustedSigners", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentTrustedSigners(&sv.TrustedSigners, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("ViewerProtocolPolicy", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ViewerProtocolPolicy = types.ViewerProtocolPolicy(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentDistribution(v **types.Distribution, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.Distribution + if *v == nil { + sv = &types.Distribution{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ActiveTrustedKeyGroups", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentActiveTrustedKeyGroups(&sv.ActiveTrustedKeyGroups, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("ActiveTrustedSigners", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentActiveTrustedSigners(&sv.ActiveTrustedSigners, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("AliasICPRecordals", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentAliasICPRecordals(&sv.AliasICPRecordals, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("ARN", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ARN = ptr.String(xtv) + } + + case strings.EqualFold("DistributionConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentDistributionConfig(&sv.DistributionConfig, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("DomainName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.DomainName = ptr.String(xtv) + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("InProgressInvalidationBatches", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.InProgressInvalidationBatches = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("LastModifiedTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(t) + } + + case strings.EqualFold("Status", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Status = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentDistributionAlreadyExists(v **types.DistributionAlreadyExists, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.DistributionAlreadyExists + if *v == nil { + sv = &types.DistributionAlreadyExists{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentDistributionConfig(v **types.DistributionConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.DistributionConfig + if *v == nil { + sv = &types.DistributionConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Aliases", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentAliases(&sv.Aliases, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("CacheBehaviors", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCacheBehaviors(&sv.CacheBehaviors, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("CallerReference", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CallerReference = ptr.String(xtv) + } + + case strings.EqualFold("Comment", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Comment = ptr.String(xtv) + } + + case strings.EqualFold("ContinuousDeploymentPolicyId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ContinuousDeploymentPolicyId = ptr.String(xtv) + } + + case strings.EqualFold("CustomErrorResponses", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCustomErrorResponses(&sv.CustomErrorResponses, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("DefaultCacheBehavior", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentDefaultCacheBehavior(&sv.DefaultCacheBehavior, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("DefaultRootObject", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.DefaultRootObject = ptr.String(xtv) + } + + case strings.EqualFold("Enabled", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.Enabled = ptr.Bool(xtv) + } + + case strings.EqualFold("HttpVersion", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.HttpVersion = types.HttpVersion(xtv) + } + + case strings.EqualFold("IsIPV6Enabled", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.IsIPV6Enabled = ptr.Bool(xtv) + } + + case strings.EqualFold("Logging", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentLoggingConfig(&sv.Logging, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("OriginGroups", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOriginGroups(&sv.OriginGroups, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Origins", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOrigins(&sv.Origins, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("PriceClass", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PriceClass = types.PriceClass(xtv) + } + + case strings.EqualFold("Restrictions", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentRestrictions(&sv.Restrictions, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Staging", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.Staging = ptr.Bool(xtv) + } + + case strings.EqualFold("ViewerCertificate", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentViewerCertificate(&sv.ViewerCertificate, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("WebACLId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.WebACLId = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentDistributionIdList(v **types.DistributionIdList, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.DistributionIdList + if *v == nil { + sv = &types.DistributionIdList{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.IsTruncated = ptr.Bool(xtv) + } + + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentDistributionIdListSummary(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("NextMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextMarker = ptr.String(xtv) + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentDistributionIdListSummary(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("DistributionId", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentDistributionIdListSummaryUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentDistributionList(v **types.DistributionList, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.DistributionList + if *v == nil { + sv = &types.DistributionList{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.IsTruncated = ptr.Bool(xtv) + } + + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentDistributionSummaryList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("NextMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextMarker = ptr.String(xtv) + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentDistributionNotDisabled(v **types.DistributionNotDisabled, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.DistributionNotDisabled + if *v == nil { + sv = &types.DistributionNotDisabled{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentDistributionSummary(v **types.DistributionSummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.DistributionSummary + if *v == nil { + sv = &types.DistributionSummary{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Aliases", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentAliases(&sv.Aliases, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("AliasICPRecordals", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentAliasICPRecordals(&sv.AliasICPRecordals, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("ARN", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ARN = ptr.String(xtv) + } + + case strings.EqualFold("CacheBehaviors", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCacheBehaviors(&sv.CacheBehaviors, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Comment", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Comment = ptr.String(xtv) + } + + case strings.EqualFold("CustomErrorResponses", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCustomErrorResponses(&sv.CustomErrorResponses, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("DefaultCacheBehavior", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentDefaultCacheBehavior(&sv.DefaultCacheBehavior, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("DomainName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.DomainName = ptr.String(xtv) + } + + case strings.EqualFold("Enabled", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.Enabled = ptr.Bool(xtv) + } + + case strings.EqualFold("HttpVersion", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.HttpVersion = types.HttpVersion(xtv) + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("IsIPV6Enabled", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.IsIPV6Enabled = ptr.Bool(xtv) + } + + case strings.EqualFold("LastModifiedTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(t) + } + + case strings.EqualFold("OriginGroups", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOriginGroups(&sv.OriginGroups, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Origins", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOrigins(&sv.Origins, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("PriceClass", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PriceClass = types.PriceClass(xtv) + } + + case strings.EqualFold("Restrictions", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentRestrictions(&sv.Restrictions, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Staging", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.Staging = ptr.Bool(xtv) + } + + case strings.EqualFold("Status", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Status = ptr.String(xtv) + } + + case strings.EqualFold("ViewerCertificate", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentViewerCertificate(&sv.ViewerCertificate, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("WebACLId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.WebACLId = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentDistributionSummaryList(v *[]types.DistributionSummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.DistributionSummary + if *v == nil { + sv = make([]types.DistributionSummary, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("DistributionSummary", t.Name.Local): + var col types.DistributionSummary + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentDistributionSummary(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentDistributionSummaryListUnwrapped(v *[]types.DistributionSummary, decoder smithyxml.NodeDecoder) error { + var sv []types.DistributionSummary + if *v == nil { + sv = make([]types.DistributionSummary, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.DistributionSummary + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentDistributionSummary(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentEncryptionEntities(v **types.EncryptionEntities, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.EncryptionEntities + if *v == nil { + sv = &types.EncryptionEntities{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentEncryptionEntityList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentEncryptionEntity(v **types.EncryptionEntity, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.EncryptionEntity + if *v == nil { + sv = &types.EncryptionEntity{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("FieldPatterns", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFieldPatterns(&sv.FieldPatterns, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("ProviderId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ProviderId = ptr.String(xtv) + } + + case strings.EqualFold("PublicKeyId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PublicKeyId = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentEncryptionEntityList(v *[]types.EncryptionEntity, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.EncryptionEntity + if *v == nil { + sv = make([]types.EncryptionEntity, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("EncryptionEntity", t.Name.Local): + var col types.EncryptionEntity + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentEncryptionEntity(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentEncryptionEntityListUnwrapped(v *[]types.EncryptionEntity, decoder smithyxml.NodeDecoder) error { + var sv []types.EncryptionEntity + if *v == nil { + sv = make([]types.EncryptionEntity, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.EncryptionEntity + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentEncryptionEntity(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentEndPoint(v **types.EndPoint, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.EndPoint + if *v == nil { + sv = &types.EndPoint{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("KinesisStreamConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentKinesisStreamConfig(&sv.KinesisStreamConfig, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("StreamType", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.StreamType = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentEndPointList(v *[]types.EndPoint, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.EndPoint + if *v == nil { + sv = make([]types.EndPoint, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.EndPoint + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentEndPoint(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentEndPointListUnwrapped(v *[]types.EndPoint, decoder smithyxml.NodeDecoder) error { + var sv []types.EndPoint + if *v == nil { + sv = make([]types.EndPoint, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.EndPoint + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentEndPoint(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentEntityAlreadyExists(v **types.EntityAlreadyExists, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.EntityAlreadyExists + if *v == nil { + sv = &types.EntityAlreadyExists{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentEntityLimitExceeded(v **types.EntityLimitExceeded, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.EntityLimitExceeded + if *v == nil { + sv = &types.EntityLimitExceeded{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentEntityNotFound(v **types.EntityNotFound, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.EntityNotFound + if *v == nil { + sv = &types.EntityNotFound{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentEntitySizeLimitExceeded(v **types.EntitySizeLimitExceeded, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.EntitySizeLimitExceeded + if *v == nil { + sv = &types.EntitySizeLimitExceeded{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFieldLevelEncryption(v **types.FieldLevelEncryption, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.FieldLevelEncryption + if *v == nil { + sv = &types.FieldLevelEncryption{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("FieldLevelEncryptionConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFieldLevelEncryptionConfig(&sv.FieldLevelEncryptionConfig, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("LastModifiedTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(t) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFieldLevelEncryptionConfig(v **types.FieldLevelEncryptionConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.FieldLevelEncryptionConfig + if *v == nil { + sv = &types.FieldLevelEncryptionConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CallerReference", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CallerReference = ptr.String(xtv) + } + + case strings.EqualFold("Comment", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Comment = ptr.String(xtv) + } + + case strings.EqualFold("ContentTypeProfileConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentContentTypeProfileConfig(&sv.ContentTypeProfileConfig, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("QueryArgProfileConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentQueryArgProfileConfig(&sv.QueryArgProfileConfig, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFieldLevelEncryptionConfigAlreadyExists(v **types.FieldLevelEncryptionConfigAlreadyExists, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.FieldLevelEncryptionConfigAlreadyExists + if *v == nil { + sv = &types.FieldLevelEncryptionConfigAlreadyExists{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFieldLevelEncryptionConfigInUse(v **types.FieldLevelEncryptionConfigInUse, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.FieldLevelEncryptionConfigInUse + if *v == nil { + sv = &types.FieldLevelEncryptionConfigInUse{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFieldLevelEncryptionList(v **types.FieldLevelEncryptionList, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.FieldLevelEncryptionList + if *v == nil { + sv = &types.FieldLevelEncryptionList{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFieldLevelEncryptionSummaryList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("NextMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextMarker = ptr.String(xtv) + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFieldLevelEncryptionProfile(v **types.FieldLevelEncryptionProfile, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.FieldLevelEncryptionProfile + if *v == nil { + sv = &types.FieldLevelEncryptionProfile{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("FieldLevelEncryptionProfileConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFieldLevelEncryptionProfileConfig(&sv.FieldLevelEncryptionProfileConfig, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("LastModifiedTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(t) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFieldLevelEncryptionProfileAlreadyExists(v **types.FieldLevelEncryptionProfileAlreadyExists, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.FieldLevelEncryptionProfileAlreadyExists + if *v == nil { + sv = &types.FieldLevelEncryptionProfileAlreadyExists{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFieldLevelEncryptionProfileConfig(v **types.FieldLevelEncryptionProfileConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.FieldLevelEncryptionProfileConfig + if *v == nil { + sv = &types.FieldLevelEncryptionProfileConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CallerReference", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CallerReference = ptr.String(xtv) + } + + case strings.EqualFold("Comment", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Comment = ptr.String(xtv) + } + + case strings.EqualFold("EncryptionEntities", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentEncryptionEntities(&sv.EncryptionEntities, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Name", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Name = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFieldLevelEncryptionProfileInUse(v **types.FieldLevelEncryptionProfileInUse, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.FieldLevelEncryptionProfileInUse + if *v == nil { + sv = &types.FieldLevelEncryptionProfileInUse{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFieldLevelEncryptionProfileList(v **types.FieldLevelEncryptionProfileList, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.FieldLevelEncryptionProfileList + if *v == nil { + sv = &types.FieldLevelEncryptionProfileList{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFieldLevelEncryptionProfileSummaryList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("NextMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextMarker = ptr.String(xtv) + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFieldLevelEncryptionProfileSizeExceeded(v **types.FieldLevelEncryptionProfileSizeExceeded, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.FieldLevelEncryptionProfileSizeExceeded + if *v == nil { + sv = &types.FieldLevelEncryptionProfileSizeExceeded{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFieldLevelEncryptionProfileSummary(v **types.FieldLevelEncryptionProfileSummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.FieldLevelEncryptionProfileSummary + if *v == nil { + sv = &types.FieldLevelEncryptionProfileSummary{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Comment", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Comment = ptr.String(xtv) + } + + case strings.EqualFold("EncryptionEntities", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentEncryptionEntities(&sv.EncryptionEntities, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("LastModifiedTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(t) + } + + case strings.EqualFold("Name", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Name = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFieldLevelEncryptionProfileSummaryList(v *[]types.FieldLevelEncryptionProfileSummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.FieldLevelEncryptionProfileSummary + if *v == nil { + sv = make([]types.FieldLevelEncryptionProfileSummary, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("FieldLevelEncryptionProfileSummary", t.Name.Local): + var col types.FieldLevelEncryptionProfileSummary + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentFieldLevelEncryptionProfileSummary(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFieldLevelEncryptionProfileSummaryListUnwrapped(v *[]types.FieldLevelEncryptionProfileSummary, decoder smithyxml.NodeDecoder) error { + var sv []types.FieldLevelEncryptionProfileSummary + if *v == nil { + sv = make([]types.FieldLevelEncryptionProfileSummary, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.FieldLevelEncryptionProfileSummary + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentFieldLevelEncryptionProfileSummary(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentFieldLevelEncryptionSummary(v **types.FieldLevelEncryptionSummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.FieldLevelEncryptionSummary + if *v == nil { + sv = &types.FieldLevelEncryptionSummary{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Comment", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Comment = ptr.String(xtv) + } + + case strings.EqualFold("ContentTypeProfileConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentContentTypeProfileConfig(&sv.ContentTypeProfileConfig, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("LastModifiedTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(t) + } + + case strings.EqualFold("QueryArgProfileConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentQueryArgProfileConfig(&sv.QueryArgProfileConfig, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFieldLevelEncryptionSummaryList(v *[]types.FieldLevelEncryptionSummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.FieldLevelEncryptionSummary + if *v == nil { + sv = make([]types.FieldLevelEncryptionSummary, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("FieldLevelEncryptionSummary", t.Name.Local): + var col types.FieldLevelEncryptionSummary + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentFieldLevelEncryptionSummary(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFieldLevelEncryptionSummaryListUnwrapped(v *[]types.FieldLevelEncryptionSummary, decoder smithyxml.NodeDecoder) error { + var sv []types.FieldLevelEncryptionSummary + if *v == nil { + sv = make([]types.FieldLevelEncryptionSummary, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.FieldLevelEncryptionSummary + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentFieldLevelEncryptionSummary(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentFieldList(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("Field", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFieldListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentFieldPatternList(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("FieldPattern", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFieldPatternListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentFieldPatterns(v **types.FieldPatterns, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.FieldPatterns + if *v == nil { + sv = &types.FieldPatterns{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFieldPatternList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentForwardedValues(v **types.ForwardedValues, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ForwardedValues + if *v == nil { + sv = &types.ForwardedValues{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Cookies", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCookiePreference(&sv.Cookies, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Headers", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentHeaders(&sv.Headers, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("QueryString", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.QueryString = ptr.Bool(xtv) + } + + case strings.EqualFold("QueryStringCacheKeys", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentQueryStringCacheKeys(&sv.QueryStringCacheKeys, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFunctionAlreadyExists(v **types.FunctionAlreadyExists, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.FunctionAlreadyExists + if *v == nil { + sv = &types.FunctionAlreadyExists{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFunctionAssociation(v **types.FunctionAssociation, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.FunctionAssociation + if *v == nil { + sv = &types.FunctionAssociation{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("EventType", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.EventType = types.EventType(xtv) + } + + case strings.EqualFold("FunctionARN", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.FunctionARN = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFunctionAssociationList(v *[]types.FunctionAssociation, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.FunctionAssociation + if *v == nil { + sv = make([]types.FunctionAssociation, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("FunctionAssociation", t.Name.Local): + var col types.FunctionAssociation + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentFunctionAssociation(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFunctionAssociationListUnwrapped(v *[]types.FunctionAssociation, decoder smithyxml.NodeDecoder) error { + var sv []types.FunctionAssociation + if *v == nil { + sv = make([]types.FunctionAssociation, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.FunctionAssociation + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentFunctionAssociation(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentFunctionAssociations(v **types.FunctionAssociations, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.FunctionAssociations + if *v == nil { + sv = &types.FunctionAssociations{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFunctionAssociationList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFunctionConfig(v **types.FunctionConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.FunctionConfig + if *v == nil { + sv = &types.FunctionConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Comment", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Comment = ptr.String(xtv) + } + + case strings.EqualFold("KeyValueStoreAssociations", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentKeyValueStoreAssociations(&sv.KeyValueStoreAssociations, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Runtime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Runtime = types.FunctionRuntime(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFunctionExecutionLogList(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("member", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFunctionExecutionLogListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentFunctionInUse(v **types.FunctionInUse, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.FunctionInUse + if *v == nil { + sv = &types.FunctionInUse{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFunctionList(v **types.FunctionList, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.FunctionList + if *v == nil { + sv = &types.FunctionList{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFunctionSummaryList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("NextMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextMarker = ptr.String(xtv) + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFunctionMetadata(v **types.FunctionMetadata, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.FunctionMetadata + if *v == nil { + sv = &types.FunctionMetadata{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CreatedTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(t) + } + + case strings.EqualFold("FunctionARN", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.FunctionARN = ptr.String(xtv) + } + + case strings.EqualFold("LastModifiedTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(t) + } + + case strings.EqualFold("Stage", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Stage = types.FunctionStage(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFunctionSizeLimitExceeded(v **types.FunctionSizeLimitExceeded, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.FunctionSizeLimitExceeded + if *v == nil { + sv = &types.FunctionSizeLimitExceeded{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFunctionSummary(v **types.FunctionSummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.FunctionSummary + if *v == nil { + sv = &types.FunctionSummary{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("FunctionConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFunctionConfig(&sv.FunctionConfig, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("FunctionMetadata", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFunctionMetadata(&sv.FunctionMetadata, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Name", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Name = ptr.String(xtv) + } + + case strings.EqualFold("Status", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Status = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFunctionSummaryList(v *[]types.FunctionSummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.FunctionSummary + if *v == nil { + sv = make([]types.FunctionSummary, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("FunctionSummary", t.Name.Local): + var col types.FunctionSummary + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentFunctionSummary(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentFunctionSummaryListUnwrapped(v *[]types.FunctionSummary, decoder smithyxml.NodeDecoder) error { + var sv []types.FunctionSummary + if *v == nil { + sv = make([]types.FunctionSummary, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.FunctionSummary + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentFunctionSummary(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentGeoRestriction(v **types.GeoRestriction, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.GeoRestriction + if *v == nil { + sv = &types.GeoRestriction{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentLocationList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("RestrictionType", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.RestrictionType = types.GeoRestrictionType(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentHeaderList(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("Name", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentHeaderListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentHeaders(v **types.Headers, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.Headers + if *v == nil { + sv = &types.Headers{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentHeaderList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentIllegalDelete(v **types.IllegalDelete, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.IllegalDelete + if *v == nil { + sv = &types.IllegalDelete{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(v **types.IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior + if *v == nil { + sv = &types.IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentIllegalOriginAccessConfiguration(v **types.IllegalOriginAccessConfiguration, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.IllegalOriginAccessConfiguration + if *v == nil { + sv = &types.IllegalOriginAccessConfiguration{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentIllegalUpdate(v **types.IllegalUpdate, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.IllegalUpdate + if *v == nil { + sv = &types.IllegalUpdate{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInconsistentQuantities(v **types.InconsistentQuantities, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InconsistentQuantities + if *v == nil { + sv = &types.InconsistentQuantities{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidArgument(v **types.InvalidArgument, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidArgument + if *v == nil { + sv = &types.InvalidArgument{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidation(v **types.Invalidation, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.Invalidation + if *v == nil { + sv = &types.Invalidation{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CreateTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.CreateTime = ptr.Time(t) + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("InvalidationBatch", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentInvalidationBatch(&sv.InvalidationBatch, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Status", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Status = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidationBatch(v **types.InvalidationBatch, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidationBatch + if *v == nil { + sv = &types.InvalidationBatch{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CallerReference", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CallerReference = ptr.String(xtv) + } + + case strings.EqualFold("Paths", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentPaths(&sv.Paths, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidationList(v **types.InvalidationList, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidationList + if *v == nil { + sv = &types.InvalidationList{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.IsTruncated = ptr.Bool(xtv) + } + + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentInvalidationSummaryList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("NextMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextMarker = ptr.String(xtv) + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidationSummary(v **types.InvalidationSummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidationSummary + if *v == nil { + sv = &types.InvalidationSummary{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CreateTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.CreateTime = ptr.Time(t) + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("Status", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Status = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidationSummaryList(v *[]types.InvalidationSummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.InvalidationSummary + if *v == nil { + sv = make([]types.InvalidationSummary, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("InvalidationSummary", t.Name.Local): + var col types.InvalidationSummary + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentInvalidationSummary(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidationSummaryListUnwrapped(v *[]types.InvalidationSummary, decoder smithyxml.NodeDecoder) error { + var sv []types.InvalidationSummary + if *v == nil { + sv = make([]types.InvalidationSummary, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.InvalidationSummary + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentInvalidationSummary(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentInvalidDefaultRootObject(v **types.InvalidDefaultRootObject, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidDefaultRootObject + if *v == nil { + sv = &types.InvalidDefaultRootObject{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidDomainNameForOriginAccessControl(v **types.InvalidDomainNameForOriginAccessControl, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidDomainNameForOriginAccessControl + if *v == nil { + sv = &types.InvalidDomainNameForOriginAccessControl{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidErrorCode(v **types.InvalidErrorCode, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidErrorCode + if *v == nil { + sv = &types.InvalidErrorCode{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidForwardCookies(v **types.InvalidForwardCookies, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidForwardCookies + if *v == nil { + sv = &types.InvalidForwardCookies{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidFunctionAssociation(v **types.InvalidFunctionAssociation, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidFunctionAssociation + if *v == nil { + sv = &types.InvalidFunctionAssociation{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidGeoRestrictionParameter(v **types.InvalidGeoRestrictionParameter, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidGeoRestrictionParameter + if *v == nil { + sv = &types.InvalidGeoRestrictionParameter{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidHeadersForS3Origin(v **types.InvalidHeadersForS3Origin, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidHeadersForS3Origin + if *v == nil { + sv = &types.InvalidHeadersForS3Origin{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidIfMatchVersion(v **types.InvalidIfMatchVersion, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidIfMatchVersion + if *v == nil { + sv = &types.InvalidIfMatchVersion{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidLambdaFunctionAssociation(v **types.InvalidLambdaFunctionAssociation, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidLambdaFunctionAssociation + if *v == nil { + sv = &types.InvalidLambdaFunctionAssociation{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidLocationCode(v **types.InvalidLocationCode, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidLocationCode + if *v == nil { + sv = &types.InvalidLocationCode{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidMinimumProtocolVersion(v **types.InvalidMinimumProtocolVersion, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidMinimumProtocolVersion + if *v == nil { + sv = &types.InvalidMinimumProtocolVersion{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidOrigin(v **types.InvalidOrigin, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidOrigin + if *v == nil { + sv = &types.InvalidOrigin{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidOriginAccessControl(v **types.InvalidOriginAccessControl, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidOriginAccessControl + if *v == nil { + sv = &types.InvalidOriginAccessControl{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidOriginAccessIdentity(v **types.InvalidOriginAccessIdentity, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidOriginAccessIdentity + if *v == nil { + sv = &types.InvalidOriginAccessIdentity{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidOriginKeepaliveTimeout(v **types.InvalidOriginKeepaliveTimeout, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidOriginKeepaliveTimeout + if *v == nil { + sv = &types.InvalidOriginKeepaliveTimeout{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidOriginReadTimeout(v **types.InvalidOriginReadTimeout, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidOriginReadTimeout + if *v == nil { + sv = &types.InvalidOriginReadTimeout{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidProtocolSettings(v **types.InvalidProtocolSettings, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidProtocolSettings + if *v == nil { + sv = &types.InvalidProtocolSettings{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidQueryStringParameters(v **types.InvalidQueryStringParameters, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidQueryStringParameters + if *v == nil { + sv = &types.InvalidQueryStringParameters{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidRelativePath(v **types.InvalidRelativePath, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidRelativePath + if *v == nil { + sv = &types.InvalidRelativePath{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidRequiredProtocol(v **types.InvalidRequiredProtocol, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidRequiredProtocol + if *v == nil { + sv = &types.InvalidRequiredProtocol{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidResponseCode(v **types.InvalidResponseCode, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidResponseCode + if *v == nil { + sv = &types.InvalidResponseCode{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidTagging(v **types.InvalidTagging, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidTagging + if *v == nil { + sv = &types.InvalidTagging{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidTTLOrder(v **types.InvalidTTLOrder, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidTTLOrder + if *v == nil { + sv = &types.InvalidTTLOrder{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidViewerCertificate(v **types.InvalidViewerCertificate, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidViewerCertificate + if *v == nil { + sv = &types.InvalidViewerCertificate{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentInvalidWebACLId(v **types.InvalidWebACLId, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidWebACLId + if *v == nil { + sv = &types.InvalidWebACLId{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentKeyGroup(v **types.KeyGroup, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.KeyGroup + if *v == nil { + sv = &types.KeyGroup{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("KeyGroupConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentKeyGroupConfig(&sv.KeyGroupConfig, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("LastModifiedTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(t) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentKeyGroupAlreadyExists(v **types.KeyGroupAlreadyExists, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.KeyGroupAlreadyExists + if *v == nil { + sv = &types.KeyGroupAlreadyExists{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentKeyGroupConfig(v **types.KeyGroupConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.KeyGroupConfig + if *v == nil { + sv = &types.KeyGroupConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Comment", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Comment = ptr.String(xtv) + } + + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentPublicKeyIdList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Name", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Name = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentKeyGroupList(v **types.KeyGroupList, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.KeyGroupList + if *v == nil { + sv = &types.KeyGroupList{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentKeyGroupSummaryList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("NextMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextMarker = ptr.String(xtv) + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentKeyGroupSummary(v **types.KeyGroupSummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.KeyGroupSummary + if *v == nil { + sv = &types.KeyGroupSummary{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("KeyGroup", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentKeyGroup(&sv.KeyGroup, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentKeyGroupSummaryList(v *[]types.KeyGroupSummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.KeyGroupSummary + if *v == nil { + sv = make([]types.KeyGroupSummary, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("KeyGroupSummary", t.Name.Local): + var col types.KeyGroupSummary + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentKeyGroupSummary(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentKeyGroupSummaryListUnwrapped(v *[]types.KeyGroupSummary, decoder smithyxml.NodeDecoder) error { + var sv []types.KeyGroupSummary + if *v == nil { + sv = make([]types.KeyGroupSummary, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.KeyGroupSummary + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentKeyGroupSummary(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentKeyPairIdList(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("KeyPairId", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentKeyPairIdListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentKeyPairIds(v **types.KeyPairIds, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.KeyPairIds + if *v == nil { + sv = &types.KeyPairIds{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentKeyPairIdList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentKeyValueStore(v **types.KeyValueStore, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.KeyValueStore + if *v == nil { + sv = &types.KeyValueStore{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ARN", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ARN = ptr.String(xtv) + } + + case strings.EqualFold("Comment", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Comment = ptr.String(xtv) + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("LastModifiedTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(t) + } + + case strings.EqualFold("Name", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Name = ptr.String(xtv) + } + + case strings.EqualFold("Status", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Status = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentKeyValueStoreAssociation(v **types.KeyValueStoreAssociation, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.KeyValueStoreAssociation + if *v == nil { + sv = &types.KeyValueStoreAssociation{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("KeyValueStoreARN", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.KeyValueStoreARN = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentKeyValueStoreAssociationList(v *[]types.KeyValueStoreAssociation, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.KeyValueStoreAssociation + if *v == nil { + sv = make([]types.KeyValueStoreAssociation, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("KeyValueStoreAssociation", t.Name.Local): + var col types.KeyValueStoreAssociation + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentKeyValueStoreAssociation(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentKeyValueStoreAssociationListUnwrapped(v *[]types.KeyValueStoreAssociation, decoder smithyxml.NodeDecoder) error { + var sv []types.KeyValueStoreAssociation + if *v == nil { + sv = make([]types.KeyValueStoreAssociation, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.KeyValueStoreAssociation + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentKeyValueStoreAssociation(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentKeyValueStoreAssociations(v **types.KeyValueStoreAssociations, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.KeyValueStoreAssociations + if *v == nil { + sv = &types.KeyValueStoreAssociations{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentKeyValueStoreAssociationList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentKeyValueStoreList(v **types.KeyValueStoreList, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.KeyValueStoreList + if *v == nil { + sv = &types.KeyValueStoreList{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentKeyValueStoreSummaryList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("NextMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextMarker = ptr.String(xtv) + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentKeyValueStoreSummaryList(v *[]types.KeyValueStore, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.KeyValueStore + if *v == nil { + sv = make([]types.KeyValueStore, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("KeyValueStore", t.Name.Local): + var col types.KeyValueStore + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentKeyValueStore(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentKeyValueStoreSummaryListUnwrapped(v *[]types.KeyValueStore, decoder smithyxml.NodeDecoder) error { + var sv []types.KeyValueStore + if *v == nil { + sv = make([]types.KeyValueStore, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.KeyValueStore + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentKeyValueStore(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentKGKeyPairIds(v **types.KGKeyPairIds, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.KGKeyPairIds + if *v == nil { + sv = &types.KGKeyPairIds{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("KeyGroupId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.KeyGroupId = ptr.String(xtv) + } + + case strings.EqualFold("KeyPairIds", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentKeyPairIds(&sv.KeyPairIds, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentKGKeyPairIdsList(v *[]types.KGKeyPairIds, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.KGKeyPairIds + if *v == nil { + sv = make([]types.KGKeyPairIds, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("KeyGroup", t.Name.Local): + var col types.KGKeyPairIds + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentKGKeyPairIds(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentKGKeyPairIdsListUnwrapped(v *[]types.KGKeyPairIds, decoder smithyxml.NodeDecoder) error { + var sv []types.KGKeyPairIds + if *v == nil { + sv = make([]types.KGKeyPairIds, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.KGKeyPairIds + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentKGKeyPairIds(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentKinesisStreamConfig(v **types.KinesisStreamConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.KinesisStreamConfig + if *v == nil { + sv = &types.KinesisStreamConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("RoleARN", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.RoleARN = ptr.String(xtv) + } + + case strings.EqualFold("StreamARN", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.StreamARN = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentLambdaFunctionAssociation(v **types.LambdaFunctionAssociation, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.LambdaFunctionAssociation + if *v == nil { + sv = &types.LambdaFunctionAssociation{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("EventType", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.EventType = types.EventType(xtv) + } + + case strings.EqualFold("IncludeBody", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.IncludeBody = ptr.Bool(xtv) + } + + case strings.EqualFold("LambdaFunctionARN", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.LambdaFunctionARN = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentLambdaFunctionAssociationList(v *[]types.LambdaFunctionAssociation, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.LambdaFunctionAssociation + if *v == nil { + sv = make([]types.LambdaFunctionAssociation, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("LambdaFunctionAssociation", t.Name.Local): + var col types.LambdaFunctionAssociation + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentLambdaFunctionAssociation(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentLambdaFunctionAssociationListUnwrapped(v *[]types.LambdaFunctionAssociation, decoder smithyxml.NodeDecoder) error { + var sv []types.LambdaFunctionAssociation + if *v == nil { + sv = make([]types.LambdaFunctionAssociation, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.LambdaFunctionAssociation + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentLambdaFunctionAssociation(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentLambdaFunctionAssociations(v **types.LambdaFunctionAssociations, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.LambdaFunctionAssociations + if *v == nil { + sv = &types.LambdaFunctionAssociations{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentLambdaFunctionAssociationList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentLocationList(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("Location", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentLocationListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentLoggingConfig(v **types.LoggingConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.LoggingConfig + if *v == nil { + sv = &types.LoggingConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Bucket", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Bucket = ptr.String(xtv) + } + + case strings.EqualFold("Enabled", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.Enabled = ptr.Bool(xtv) + } + + case strings.EqualFold("IncludeCookies", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.IncludeCookies = ptr.Bool(xtv) + } + + case strings.EqualFold("Prefix", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Prefix = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentMethodsList(v *[]types.Method, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.Method + if *v == nil { + sv = make([]types.Method, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("Method", t.Name.Local): + var col types.Method + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = types.Method(xtv) + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentMethodsListUnwrapped(v *[]types.Method, decoder smithyxml.NodeDecoder) error { + var sv []types.Method + if *v == nil { + sv = make([]types.Method, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.Method + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = types.Method(xtv) + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentMissingBody(v **types.MissingBody, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.MissingBody + if *v == nil { + sv = &types.MissingBody{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentMonitoringSubscription(v **types.MonitoringSubscription, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.MonitoringSubscription + if *v == nil { + sv = &types.MonitoringSubscription{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("RealtimeMetricsSubscriptionConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentRealtimeMetricsSubscriptionConfig(&sv.RealtimeMetricsSubscriptionConfig, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentMonitoringSubscriptionAlreadyExists(v **types.MonitoringSubscriptionAlreadyExists, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.MonitoringSubscriptionAlreadyExists + if *v == nil { + sv = &types.MonitoringSubscriptionAlreadyExists{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentNoSuchCachePolicy(v **types.NoSuchCachePolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NoSuchCachePolicy + if *v == nil { + sv = &types.NoSuchCachePolicy{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentNoSuchCloudFrontOriginAccessIdentity(v **types.NoSuchCloudFrontOriginAccessIdentity, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NoSuchCloudFrontOriginAccessIdentity + if *v == nil { + sv = &types.NoSuchCloudFrontOriginAccessIdentity{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentNoSuchContinuousDeploymentPolicy(v **types.NoSuchContinuousDeploymentPolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NoSuchContinuousDeploymentPolicy + if *v == nil { + sv = &types.NoSuchContinuousDeploymentPolicy{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentNoSuchDistribution(v **types.NoSuchDistribution, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NoSuchDistribution + if *v == nil { + sv = &types.NoSuchDistribution{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentNoSuchFieldLevelEncryptionConfig(v **types.NoSuchFieldLevelEncryptionConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NoSuchFieldLevelEncryptionConfig + if *v == nil { + sv = &types.NoSuchFieldLevelEncryptionConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentNoSuchFieldLevelEncryptionProfile(v **types.NoSuchFieldLevelEncryptionProfile, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NoSuchFieldLevelEncryptionProfile + if *v == nil { + sv = &types.NoSuchFieldLevelEncryptionProfile{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentNoSuchFunctionExists(v **types.NoSuchFunctionExists, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NoSuchFunctionExists + if *v == nil { + sv = &types.NoSuchFunctionExists{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentNoSuchInvalidation(v **types.NoSuchInvalidation, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NoSuchInvalidation + if *v == nil { + sv = &types.NoSuchInvalidation{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentNoSuchMonitoringSubscription(v **types.NoSuchMonitoringSubscription, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NoSuchMonitoringSubscription + if *v == nil { + sv = &types.NoSuchMonitoringSubscription{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentNoSuchOrigin(v **types.NoSuchOrigin, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NoSuchOrigin + if *v == nil { + sv = &types.NoSuchOrigin{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentNoSuchOriginAccessControl(v **types.NoSuchOriginAccessControl, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NoSuchOriginAccessControl + if *v == nil { + sv = &types.NoSuchOriginAccessControl{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentNoSuchOriginRequestPolicy(v **types.NoSuchOriginRequestPolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NoSuchOriginRequestPolicy + if *v == nil { + sv = &types.NoSuchOriginRequestPolicy{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentNoSuchPublicKey(v **types.NoSuchPublicKey, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NoSuchPublicKey + if *v == nil { + sv = &types.NoSuchPublicKey{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentNoSuchRealtimeLogConfig(v **types.NoSuchRealtimeLogConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NoSuchRealtimeLogConfig + if *v == nil { + sv = &types.NoSuchRealtimeLogConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentNoSuchResource(v **types.NoSuchResource, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NoSuchResource + if *v == nil { + sv = &types.NoSuchResource{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentNoSuchResponseHeadersPolicy(v **types.NoSuchResponseHeadersPolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NoSuchResponseHeadersPolicy + if *v == nil { + sv = &types.NoSuchResponseHeadersPolicy{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentNoSuchStreamingDistribution(v **types.NoSuchStreamingDistribution, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.NoSuchStreamingDistribution + if *v == nil { + sv = &types.NoSuchStreamingDistribution{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOrigin(v **types.Origin, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.Origin + if *v == nil { + sv = &types.Origin{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ConnectionAttempts", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.ConnectionAttempts = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("ConnectionTimeout", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.ConnectionTimeout = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("CustomHeaders", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCustomHeaders(&sv.CustomHeaders, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("CustomOriginConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCustomOriginConfig(&sv.CustomOriginConfig, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("DomainName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.DomainName = ptr.String(xtv) + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("OriginAccessControlId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.OriginAccessControlId = ptr.String(xtv) + } + + case strings.EqualFold("OriginPath", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.OriginPath = ptr.String(xtv) + } + + case strings.EqualFold("OriginShield", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOriginShield(&sv.OriginShield, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("S3OriginConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentS3OriginConfig(&sv.S3OriginConfig, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOriginAccessControl(v **types.OriginAccessControl, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.OriginAccessControl + if *v == nil { + sv = &types.OriginAccessControl{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("OriginAccessControlConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOriginAccessControlConfig(&sv.OriginAccessControlConfig, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOriginAccessControlAlreadyExists(v **types.OriginAccessControlAlreadyExists, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.OriginAccessControlAlreadyExists + if *v == nil { + sv = &types.OriginAccessControlAlreadyExists{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOriginAccessControlConfig(v **types.OriginAccessControlConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.OriginAccessControlConfig + if *v == nil { + sv = &types.OriginAccessControlConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Description", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Description = ptr.String(xtv) + } + + case strings.EqualFold("Name", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Name = ptr.String(xtv) + } + + case strings.EqualFold("OriginAccessControlOriginType", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.OriginAccessControlOriginType = types.OriginAccessControlOriginTypes(xtv) + } + + case strings.EqualFold("SigningBehavior", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SigningBehavior = types.OriginAccessControlSigningBehaviors(xtv) + } + + case strings.EqualFold("SigningProtocol", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SigningProtocol = types.OriginAccessControlSigningProtocols(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOriginAccessControlInUse(v **types.OriginAccessControlInUse, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.OriginAccessControlInUse + if *v == nil { + sv = &types.OriginAccessControlInUse{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOriginAccessControlList(v **types.OriginAccessControlList, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.OriginAccessControlList + if *v == nil { + sv = &types.OriginAccessControlList{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.IsTruncated = ptr.Bool(xtv) + } + + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOriginAccessControlSummaryList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("NextMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextMarker = ptr.String(xtv) + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOriginAccessControlSummary(v **types.OriginAccessControlSummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.OriginAccessControlSummary + if *v == nil { + sv = &types.OriginAccessControlSummary{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Description", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Description = ptr.String(xtv) + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("Name", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Name = ptr.String(xtv) + } + + case strings.EqualFold("OriginAccessControlOriginType", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.OriginAccessControlOriginType = types.OriginAccessControlOriginTypes(xtv) + } + + case strings.EqualFold("SigningBehavior", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SigningBehavior = types.OriginAccessControlSigningBehaviors(xtv) + } + + case strings.EqualFold("SigningProtocol", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SigningProtocol = types.OriginAccessControlSigningProtocols(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOriginAccessControlSummaryList(v *[]types.OriginAccessControlSummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.OriginAccessControlSummary + if *v == nil { + sv = make([]types.OriginAccessControlSummary, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("OriginAccessControlSummary", t.Name.Local): + var col types.OriginAccessControlSummary + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentOriginAccessControlSummary(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOriginAccessControlSummaryListUnwrapped(v *[]types.OriginAccessControlSummary, decoder smithyxml.NodeDecoder) error { + var sv []types.OriginAccessControlSummary + if *v == nil { + sv = make([]types.OriginAccessControlSummary, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.OriginAccessControlSummary + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentOriginAccessControlSummary(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentOriginCustomHeader(v **types.OriginCustomHeader, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.OriginCustomHeader + if *v == nil { + sv = &types.OriginCustomHeader{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("HeaderName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.HeaderName = ptr.String(xtv) + } + + case strings.EqualFold("HeaderValue", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.HeaderValue = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOriginCustomHeadersList(v *[]types.OriginCustomHeader, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.OriginCustomHeader + if *v == nil { + sv = make([]types.OriginCustomHeader, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("OriginCustomHeader", t.Name.Local): + var col types.OriginCustomHeader + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentOriginCustomHeader(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOriginCustomHeadersListUnwrapped(v *[]types.OriginCustomHeader, decoder smithyxml.NodeDecoder) error { + var sv []types.OriginCustomHeader + if *v == nil { + sv = make([]types.OriginCustomHeader, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.OriginCustomHeader + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentOriginCustomHeader(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentOriginGroup(v **types.OriginGroup, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.OriginGroup + if *v == nil { + sv = &types.OriginGroup{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("FailoverCriteria", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOriginGroupFailoverCriteria(&sv.FailoverCriteria, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("Members", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOriginGroupMembers(&sv.Members, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOriginGroupFailoverCriteria(v **types.OriginGroupFailoverCriteria, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.OriginGroupFailoverCriteria + if *v == nil { + sv = &types.OriginGroupFailoverCriteria{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("StatusCodes", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentStatusCodes(&sv.StatusCodes, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOriginGroupList(v *[]types.OriginGroup, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.OriginGroup + if *v == nil { + sv = make([]types.OriginGroup, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("OriginGroup", t.Name.Local): + var col types.OriginGroup + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentOriginGroup(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOriginGroupListUnwrapped(v *[]types.OriginGroup, decoder smithyxml.NodeDecoder) error { + var sv []types.OriginGroup + if *v == nil { + sv = make([]types.OriginGroup, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.OriginGroup + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentOriginGroup(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentOriginGroupMember(v **types.OriginGroupMember, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.OriginGroupMember + if *v == nil { + sv = &types.OriginGroupMember{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("OriginId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.OriginId = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOriginGroupMemberList(v *[]types.OriginGroupMember, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.OriginGroupMember + if *v == nil { + sv = make([]types.OriginGroupMember, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("OriginGroupMember", t.Name.Local): + var col types.OriginGroupMember + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentOriginGroupMember(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOriginGroupMemberListUnwrapped(v *[]types.OriginGroupMember, decoder smithyxml.NodeDecoder) error { + var sv []types.OriginGroupMember + if *v == nil { + sv = make([]types.OriginGroupMember, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.OriginGroupMember + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentOriginGroupMember(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentOriginGroupMembers(v **types.OriginGroupMembers, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.OriginGroupMembers + if *v == nil { + sv = &types.OriginGroupMembers{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOriginGroupMemberList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOriginGroups(v **types.OriginGroups, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.OriginGroups + if *v == nil { + sv = &types.OriginGroups{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOriginGroupList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOriginList(v *[]types.Origin, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.Origin + if *v == nil { + sv = make([]types.Origin, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("Origin", t.Name.Local): + var col types.Origin + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentOrigin(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOriginListUnwrapped(v *[]types.Origin, decoder smithyxml.NodeDecoder) error { + var sv []types.Origin + if *v == nil { + sv = make([]types.Origin, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.Origin + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentOrigin(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentOriginRequestPolicy(v **types.OriginRequestPolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.OriginRequestPolicy + if *v == nil { + sv = &types.OriginRequestPolicy{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("LastModifiedTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(t) + } + + case strings.EqualFold("OriginRequestPolicyConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOriginRequestPolicyConfig(&sv.OriginRequestPolicyConfig, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOriginRequestPolicyAlreadyExists(v **types.OriginRequestPolicyAlreadyExists, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.OriginRequestPolicyAlreadyExists + if *v == nil { + sv = &types.OriginRequestPolicyAlreadyExists{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOriginRequestPolicyConfig(v **types.OriginRequestPolicyConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.OriginRequestPolicyConfig + if *v == nil { + sv = &types.OriginRequestPolicyConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Comment", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Comment = ptr.String(xtv) + } + + case strings.EqualFold("CookiesConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOriginRequestPolicyCookiesConfig(&sv.CookiesConfig, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("HeadersConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOriginRequestPolicyHeadersConfig(&sv.HeadersConfig, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Name", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Name = ptr.String(xtv) + } + + case strings.EqualFold("QueryStringsConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOriginRequestPolicyQueryStringsConfig(&sv.QueryStringsConfig, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOriginRequestPolicyCookiesConfig(v **types.OriginRequestPolicyCookiesConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.OriginRequestPolicyCookiesConfig + if *v == nil { + sv = &types.OriginRequestPolicyCookiesConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CookieBehavior", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CookieBehavior = types.OriginRequestPolicyCookieBehavior(xtv) + } + + case strings.EqualFold("Cookies", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCookieNames(&sv.Cookies, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOriginRequestPolicyHeadersConfig(v **types.OriginRequestPolicyHeadersConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.OriginRequestPolicyHeadersConfig + if *v == nil { + sv = &types.OriginRequestPolicyHeadersConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("HeaderBehavior", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.HeaderBehavior = types.OriginRequestPolicyHeaderBehavior(xtv) + } + + case strings.EqualFold("Headers", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentHeaders(&sv.Headers, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOriginRequestPolicyInUse(v **types.OriginRequestPolicyInUse, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.OriginRequestPolicyInUse + if *v == nil { + sv = &types.OriginRequestPolicyInUse{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOriginRequestPolicyList(v **types.OriginRequestPolicyList, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.OriginRequestPolicyList + if *v == nil { + sv = &types.OriginRequestPolicyList{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOriginRequestPolicySummaryList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("NextMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextMarker = ptr.String(xtv) + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOriginRequestPolicyQueryStringsConfig(v **types.OriginRequestPolicyQueryStringsConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.OriginRequestPolicyQueryStringsConfig + if *v == nil { + sv = &types.OriginRequestPolicyQueryStringsConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("QueryStringBehavior", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.QueryStringBehavior = types.OriginRequestPolicyQueryStringBehavior(xtv) + } + + case strings.EqualFold("QueryStrings", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentQueryStringNames(&sv.QueryStrings, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOriginRequestPolicySummary(v **types.OriginRequestPolicySummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.OriginRequestPolicySummary + if *v == nil { + sv = &types.OriginRequestPolicySummary{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("OriginRequestPolicy", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOriginRequestPolicy(&sv.OriginRequestPolicy, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Type", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Type = types.OriginRequestPolicyType(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOriginRequestPolicySummaryList(v *[]types.OriginRequestPolicySummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.OriginRequestPolicySummary + if *v == nil { + sv = make([]types.OriginRequestPolicySummary, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("OriginRequestPolicySummary", t.Name.Local): + var col types.OriginRequestPolicySummary + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentOriginRequestPolicySummary(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOriginRequestPolicySummaryListUnwrapped(v *[]types.OriginRequestPolicySummary, decoder smithyxml.NodeDecoder) error { + var sv []types.OriginRequestPolicySummary + if *v == nil { + sv = make([]types.OriginRequestPolicySummary, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.OriginRequestPolicySummary + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentOriginRequestPolicySummary(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentOrigins(v **types.Origins, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.Origins + if *v == nil { + sv = &types.Origins{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentOriginList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOriginShield(v **types.OriginShield, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.OriginShield + if *v == nil { + sv = &types.OriginShield{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Enabled", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.Enabled = ptr.Bool(xtv) + } + + case strings.EqualFold("OriginShieldRegion", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.OriginShieldRegion = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentOriginSslProtocols(v **types.OriginSslProtocols, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.OriginSslProtocols + if *v == nil { + sv = &types.OriginSslProtocols{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentSslProtocolsList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentParametersInCacheKeyAndForwardedToOrigin(v **types.ParametersInCacheKeyAndForwardedToOrigin, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ParametersInCacheKeyAndForwardedToOrigin + if *v == nil { + sv = &types.ParametersInCacheKeyAndForwardedToOrigin{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CookiesConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCachePolicyCookiesConfig(&sv.CookiesConfig, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("EnableAcceptEncodingBrotli", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.EnableAcceptEncodingBrotli = ptr.Bool(xtv) + } + + case strings.EqualFold("EnableAcceptEncodingGzip", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.EnableAcceptEncodingGzip = ptr.Bool(xtv) + } + + case strings.EqualFold("HeadersConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCachePolicyHeadersConfig(&sv.HeadersConfig, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("QueryStringsConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentCachePolicyQueryStringsConfig(&sv.QueryStringsConfig, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentPathList(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("Path", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentPathListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentPaths(v **types.Paths, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.Paths + if *v == nil { + sv = &types.Paths{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentPathList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentPreconditionFailed(v **types.PreconditionFailed, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.PreconditionFailed + if *v == nil { + sv = &types.PreconditionFailed{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentPublicKey(v **types.PublicKey, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.PublicKey + if *v == nil { + sv = &types.PublicKey{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CreatedTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(t) + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("PublicKeyConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentPublicKeyConfig(&sv.PublicKeyConfig, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentPublicKeyAlreadyExists(v **types.PublicKeyAlreadyExists, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.PublicKeyAlreadyExists + if *v == nil { + sv = &types.PublicKeyAlreadyExists{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentPublicKeyConfig(v **types.PublicKeyConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.PublicKeyConfig + if *v == nil { + sv = &types.PublicKeyConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CallerReference", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CallerReference = ptr.String(xtv) + } + + case strings.EqualFold("Comment", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Comment = ptr.String(xtv) + } + + case strings.EqualFold("EncodedKey", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.EncodedKey = ptr.String(xtv) + } + + case strings.EqualFold("Name", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Name = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentPublicKeyIdList(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("PublicKey", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentPublicKeyIdListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentPublicKeyInUse(v **types.PublicKeyInUse, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.PublicKeyInUse + if *v == nil { + sv = &types.PublicKeyInUse{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentPublicKeyList(v **types.PublicKeyList, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.PublicKeyList + if *v == nil { + sv = &types.PublicKeyList{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentPublicKeySummaryList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("NextMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextMarker = ptr.String(xtv) + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentPublicKeySummary(v **types.PublicKeySummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.PublicKeySummary + if *v == nil { + sv = &types.PublicKeySummary{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Comment", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Comment = ptr.String(xtv) + } + + case strings.EqualFold("CreatedTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(t) + } + + case strings.EqualFold("EncodedKey", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.EncodedKey = ptr.String(xtv) + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("Name", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Name = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentPublicKeySummaryList(v *[]types.PublicKeySummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.PublicKeySummary + if *v == nil { + sv = make([]types.PublicKeySummary, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("PublicKeySummary", t.Name.Local): + var col types.PublicKeySummary + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentPublicKeySummary(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentPublicKeySummaryListUnwrapped(v *[]types.PublicKeySummary, decoder smithyxml.NodeDecoder) error { + var sv []types.PublicKeySummary + if *v == nil { + sv = make([]types.PublicKeySummary, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.PublicKeySummary + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentPublicKeySummary(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentQueryArgProfile(v **types.QueryArgProfile, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.QueryArgProfile + if *v == nil { + sv = &types.QueryArgProfile{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ProfileId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ProfileId = ptr.String(xtv) + } + + case strings.EqualFold("QueryArg", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.QueryArg = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentQueryArgProfileConfig(v **types.QueryArgProfileConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.QueryArgProfileConfig + if *v == nil { + sv = &types.QueryArgProfileConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ForwardWhenQueryArgProfileIsUnknown", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.ForwardWhenQueryArgProfileIsUnknown = ptr.Bool(xtv) + } + + case strings.EqualFold("QueryArgProfiles", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentQueryArgProfiles(&sv.QueryArgProfiles, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentQueryArgProfileEmpty(v **types.QueryArgProfileEmpty, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.QueryArgProfileEmpty + if *v == nil { + sv = &types.QueryArgProfileEmpty{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentQueryArgProfileList(v *[]types.QueryArgProfile, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.QueryArgProfile + if *v == nil { + sv = make([]types.QueryArgProfile, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("QueryArgProfile", t.Name.Local): + var col types.QueryArgProfile + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentQueryArgProfile(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentQueryArgProfileListUnwrapped(v *[]types.QueryArgProfile, decoder smithyxml.NodeDecoder) error { + var sv []types.QueryArgProfile + if *v == nil { + sv = make([]types.QueryArgProfile, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.QueryArgProfile + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentQueryArgProfile(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentQueryArgProfiles(v **types.QueryArgProfiles, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.QueryArgProfiles + if *v == nil { + sv = &types.QueryArgProfiles{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentQueryArgProfileList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentQueryStringCacheKeys(v **types.QueryStringCacheKeys, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.QueryStringCacheKeys + if *v == nil { + sv = &types.QueryStringCacheKeys{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentQueryStringCacheKeysList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentQueryStringCacheKeysList(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("Name", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentQueryStringCacheKeysListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentQueryStringNames(v **types.QueryStringNames, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.QueryStringNames + if *v == nil { + sv = &types.QueryStringNames{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentQueryStringNamesList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentQueryStringNamesList(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("Name", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentQueryStringNamesListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentRealtimeLogConfig(v **types.RealtimeLogConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.RealtimeLogConfig + if *v == nil { + sv = &types.RealtimeLogConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ARN", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ARN = ptr.String(xtv) + } + + case strings.EqualFold("EndPoints", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentEndPointList(&sv.EndPoints, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Fields", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFieldList(&sv.Fields, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Name", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Name = ptr.String(xtv) + } + + case strings.EqualFold("SamplingRate", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.SamplingRate = ptr.Int64(i64) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentRealtimeLogConfigAlreadyExists(v **types.RealtimeLogConfigAlreadyExists, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.RealtimeLogConfigAlreadyExists + if *v == nil { + sv = &types.RealtimeLogConfigAlreadyExists{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentRealtimeLogConfigInUse(v **types.RealtimeLogConfigInUse, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.RealtimeLogConfigInUse + if *v == nil { + sv = &types.RealtimeLogConfigInUse{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentRealtimeLogConfigList(v *[]types.RealtimeLogConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.RealtimeLogConfig + if *v == nil { + sv = make([]types.RealtimeLogConfig, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.RealtimeLogConfig + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentRealtimeLogConfig(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentRealtimeLogConfigListUnwrapped(v *[]types.RealtimeLogConfig, decoder smithyxml.NodeDecoder) error { + var sv []types.RealtimeLogConfig + if *v == nil { + sv = make([]types.RealtimeLogConfig, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.RealtimeLogConfig + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentRealtimeLogConfig(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentRealtimeLogConfigOwnerMismatch(v **types.RealtimeLogConfigOwnerMismatch, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.RealtimeLogConfigOwnerMismatch + if *v == nil { + sv = &types.RealtimeLogConfigOwnerMismatch{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentRealtimeLogConfigs(v **types.RealtimeLogConfigs, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.RealtimeLogConfigs + if *v == nil { + sv = &types.RealtimeLogConfigs{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.IsTruncated = ptr.Bool(xtv) + } + + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentRealtimeLogConfigList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("NextMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextMarker = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentRealtimeMetricsSubscriptionConfig(v **types.RealtimeMetricsSubscriptionConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.RealtimeMetricsSubscriptionConfig + if *v == nil { + sv = &types.RealtimeMetricsSubscriptionConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("RealtimeMetricsSubscriptionStatus", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.RealtimeMetricsSubscriptionStatus = types.RealtimeMetricsSubscriptionStatus(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResourceInUse(v **types.ResourceInUse, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ResourceInUse + if *v == nil { + sv = &types.ResourceInUse{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResponseHeadersPolicy(v **types.ResponseHeadersPolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ResponseHeadersPolicy + if *v == nil { + sv = &types.ResponseHeadersPolicy{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("LastModifiedTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(t) + } + + case strings.EqualFold("ResponseHeadersPolicyConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentResponseHeadersPolicyConfig(&sv.ResponseHeadersPolicyConfig, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResponseHeadersPolicyAccessControlAllowHeaders(v **types.ResponseHeadersPolicyAccessControlAllowHeaders, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ResponseHeadersPolicyAccessControlAllowHeaders + if *v == nil { + sv = &types.ResponseHeadersPolicyAccessControlAllowHeaders{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentAccessControlAllowHeadersList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResponseHeadersPolicyAccessControlAllowMethods(v **types.ResponseHeadersPolicyAccessControlAllowMethods, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ResponseHeadersPolicyAccessControlAllowMethods + if *v == nil { + sv = &types.ResponseHeadersPolicyAccessControlAllowMethods{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentAccessControlAllowMethodsList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResponseHeadersPolicyAccessControlAllowOrigins(v **types.ResponseHeadersPolicyAccessControlAllowOrigins, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ResponseHeadersPolicyAccessControlAllowOrigins + if *v == nil { + sv = &types.ResponseHeadersPolicyAccessControlAllowOrigins{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentAccessControlAllowOriginsList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResponseHeadersPolicyAccessControlExposeHeaders(v **types.ResponseHeadersPolicyAccessControlExposeHeaders, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ResponseHeadersPolicyAccessControlExposeHeaders + if *v == nil { + sv = &types.ResponseHeadersPolicyAccessControlExposeHeaders{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentAccessControlExposeHeadersList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResponseHeadersPolicyAlreadyExists(v **types.ResponseHeadersPolicyAlreadyExists, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ResponseHeadersPolicyAlreadyExists + if *v == nil { + sv = &types.ResponseHeadersPolicyAlreadyExists{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResponseHeadersPolicyConfig(v **types.ResponseHeadersPolicyConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ResponseHeadersPolicyConfig + if *v == nil { + sv = &types.ResponseHeadersPolicyConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Comment", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Comment = ptr.String(xtv) + } + + case strings.EqualFold("CorsConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentResponseHeadersPolicyCorsConfig(&sv.CorsConfig, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("CustomHeadersConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentResponseHeadersPolicyCustomHeadersConfig(&sv.CustomHeadersConfig, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Name", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Name = ptr.String(xtv) + } + + case strings.EqualFold("RemoveHeadersConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentResponseHeadersPolicyRemoveHeadersConfig(&sv.RemoveHeadersConfig, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("SecurityHeadersConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentResponseHeadersPolicySecurityHeadersConfig(&sv.SecurityHeadersConfig, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("ServerTimingHeadersConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentResponseHeadersPolicyServerTimingHeadersConfig(&sv.ServerTimingHeadersConfig, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResponseHeadersPolicyContentSecurityPolicy(v **types.ResponseHeadersPolicyContentSecurityPolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ResponseHeadersPolicyContentSecurityPolicy + if *v == nil { + sv = &types.ResponseHeadersPolicyContentSecurityPolicy{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ContentSecurityPolicy", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ContentSecurityPolicy = ptr.String(xtv) + } + + case strings.EqualFold("Override", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.Override = ptr.Bool(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResponseHeadersPolicyContentTypeOptions(v **types.ResponseHeadersPolicyContentTypeOptions, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ResponseHeadersPolicyContentTypeOptions + if *v == nil { + sv = &types.ResponseHeadersPolicyContentTypeOptions{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Override", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.Override = ptr.Bool(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResponseHeadersPolicyCorsConfig(v **types.ResponseHeadersPolicyCorsConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ResponseHeadersPolicyCorsConfig + if *v == nil { + sv = &types.ResponseHeadersPolicyCorsConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("AccessControlAllowCredentials", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.AccessControlAllowCredentials = ptr.Bool(xtv) + } + + case strings.EqualFold("AccessControlAllowHeaders", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentResponseHeadersPolicyAccessControlAllowHeaders(&sv.AccessControlAllowHeaders, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("AccessControlAllowMethods", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentResponseHeadersPolicyAccessControlAllowMethods(&sv.AccessControlAllowMethods, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("AccessControlAllowOrigins", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentResponseHeadersPolicyAccessControlAllowOrigins(&sv.AccessControlAllowOrigins, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("AccessControlExposeHeaders", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentResponseHeadersPolicyAccessControlExposeHeaders(&sv.AccessControlExposeHeaders, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("AccessControlMaxAgeSec", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.AccessControlMaxAgeSec = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("OriginOverride", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.OriginOverride = ptr.Bool(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResponseHeadersPolicyCustomHeader(v **types.ResponseHeadersPolicyCustomHeader, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ResponseHeadersPolicyCustomHeader + if *v == nil { + sv = &types.ResponseHeadersPolicyCustomHeader{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Header", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Header = ptr.String(xtv) + } + + case strings.EqualFold("Override", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.Override = ptr.Bool(xtv) + } + + case strings.EqualFold("Value", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Value = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResponseHeadersPolicyCustomHeaderList(v *[]types.ResponseHeadersPolicyCustomHeader, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.ResponseHeadersPolicyCustomHeader + if *v == nil { + sv = make([]types.ResponseHeadersPolicyCustomHeader, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("ResponseHeadersPolicyCustomHeader", t.Name.Local): + var col types.ResponseHeadersPolicyCustomHeader + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentResponseHeadersPolicyCustomHeader(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResponseHeadersPolicyCustomHeaderListUnwrapped(v *[]types.ResponseHeadersPolicyCustomHeader, decoder smithyxml.NodeDecoder) error { + var sv []types.ResponseHeadersPolicyCustomHeader + if *v == nil { + sv = make([]types.ResponseHeadersPolicyCustomHeader, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.ResponseHeadersPolicyCustomHeader + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentResponseHeadersPolicyCustomHeader(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentResponseHeadersPolicyCustomHeadersConfig(v **types.ResponseHeadersPolicyCustomHeadersConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ResponseHeadersPolicyCustomHeadersConfig + if *v == nil { + sv = &types.ResponseHeadersPolicyCustomHeadersConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentResponseHeadersPolicyCustomHeaderList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResponseHeadersPolicyFrameOptions(v **types.ResponseHeadersPolicyFrameOptions, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ResponseHeadersPolicyFrameOptions + if *v == nil { + sv = &types.ResponseHeadersPolicyFrameOptions{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("FrameOption", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.FrameOption = types.FrameOptionsList(xtv) + } + + case strings.EqualFold("Override", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.Override = ptr.Bool(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResponseHeadersPolicyInUse(v **types.ResponseHeadersPolicyInUse, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ResponseHeadersPolicyInUse + if *v == nil { + sv = &types.ResponseHeadersPolicyInUse{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResponseHeadersPolicyList(v **types.ResponseHeadersPolicyList, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ResponseHeadersPolicyList + if *v == nil { + sv = &types.ResponseHeadersPolicyList{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentResponseHeadersPolicySummaryList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("NextMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextMarker = ptr.String(xtv) + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResponseHeadersPolicyReferrerPolicy(v **types.ResponseHeadersPolicyReferrerPolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ResponseHeadersPolicyReferrerPolicy + if *v == nil { + sv = &types.ResponseHeadersPolicyReferrerPolicy{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Override", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.Override = ptr.Bool(xtv) + } + + case strings.EqualFold("ReferrerPolicy", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ReferrerPolicy = types.ReferrerPolicyList(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResponseHeadersPolicyRemoveHeader(v **types.ResponseHeadersPolicyRemoveHeader, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ResponseHeadersPolicyRemoveHeader + if *v == nil { + sv = &types.ResponseHeadersPolicyRemoveHeader{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Header", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Header = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResponseHeadersPolicyRemoveHeaderList(v *[]types.ResponseHeadersPolicyRemoveHeader, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.ResponseHeadersPolicyRemoveHeader + if *v == nil { + sv = make([]types.ResponseHeadersPolicyRemoveHeader, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("ResponseHeadersPolicyRemoveHeader", t.Name.Local): + var col types.ResponseHeadersPolicyRemoveHeader + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentResponseHeadersPolicyRemoveHeader(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResponseHeadersPolicyRemoveHeaderListUnwrapped(v *[]types.ResponseHeadersPolicyRemoveHeader, decoder smithyxml.NodeDecoder) error { + var sv []types.ResponseHeadersPolicyRemoveHeader + if *v == nil { + sv = make([]types.ResponseHeadersPolicyRemoveHeader, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.ResponseHeadersPolicyRemoveHeader + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentResponseHeadersPolicyRemoveHeader(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentResponseHeadersPolicyRemoveHeadersConfig(v **types.ResponseHeadersPolicyRemoveHeadersConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ResponseHeadersPolicyRemoveHeadersConfig + if *v == nil { + sv = &types.ResponseHeadersPolicyRemoveHeadersConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentResponseHeadersPolicyRemoveHeaderList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResponseHeadersPolicySecurityHeadersConfig(v **types.ResponseHeadersPolicySecurityHeadersConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ResponseHeadersPolicySecurityHeadersConfig + if *v == nil { + sv = &types.ResponseHeadersPolicySecurityHeadersConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ContentSecurityPolicy", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentResponseHeadersPolicyContentSecurityPolicy(&sv.ContentSecurityPolicy, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("ContentTypeOptions", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentResponseHeadersPolicyContentTypeOptions(&sv.ContentTypeOptions, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("FrameOptions", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentResponseHeadersPolicyFrameOptions(&sv.FrameOptions, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("ReferrerPolicy", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentResponseHeadersPolicyReferrerPolicy(&sv.ReferrerPolicy, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("StrictTransportSecurity", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentResponseHeadersPolicyStrictTransportSecurity(&sv.StrictTransportSecurity, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("XSSProtection", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentResponseHeadersPolicyXSSProtection(&sv.XSSProtection, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResponseHeadersPolicyServerTimingHeadersConfig(v **types.ResponseHeadersPolicyServerTimingHeadersConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ResponseHeadersPolicyServerTimingHeadersConfig + if *v == nil { + sv = &types.ResponseHeadersPolicyServerTimingHeadersConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Enabled", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.Enabled = ptr.Bool(xtv) + } + + case strings.EqualFold("SamplingRate", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + f64, err := strconv.ParseFloat(xtv, 64) + if err != nil { + return err + } + sv.SamplingRate = ptr.Float64(f64) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResponseHeadersPolicyStrictTransportSecurity(v **types.ResponseHeadersPolicyStrictTransportSecurity, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ResponseHeadersPolicyStrictTransportSecurity + if *v == nil { + sv = &types.ResponseHeadersPolicyStrictTransportSecurity{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("AccessControlMaxAgeSec", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.AccessControlMaxAgeSec = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("IncludeSubdomains", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.IncludeSubdomains = ptr.Bool(xtv) + } + + case strings.EqualFold("Override", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.Override = ptr.Bool(xtv) + } + + case strings.EqualFold("Preload", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.Preload = ptr.Bool(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResponseHeadersPolicySummary(v **types.ResponseHeadersPolicySummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ResponseHeadersPolicySummary + if *v == nil { + sv = &types.ResponseHeadersPolicySummary{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ResponseHeadersPolicy", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentResponseHeadersPolicy(&sv.ResponseHeadersPolicy, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Type", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Type = types.ResponseHeadersPolicyType(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResponseHeadersPolicySummaryList(v *[]types.ResponseHeadersPolicySummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.ResponseHeadersPolicySummary + if *v == nil { + sv = make([]types.ResponseHeadersPolicySummary, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("ResponseHeadersPolicySummary", t.Name.Local): + var col types.ResponseHeadersPolicySummary + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentResponseHeadersPolicySummary(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentResponseHeadersPolicySummaryListUnwrapped(v *[]types.ResponseHeadersPolicySummary, decoder smithyxml.NodeDecoder) error { + var sv []types.ResponseHeadersPolicySummary + if *v == nil { + sv = make([]types.ResponseHeadersPolicySummary, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.ResponseHeadersPolicySummary + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentResponseHeadersPolicySummary(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentResponseHeadersPolicyXSSProtection(v **types.ResponseHeadersPolicyXSSProtection, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ResponseHeadersPolicyXSSProtection + if *v == nil { + sv = &types.ResponseHeadersPolicyXSSProtection{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ModeBlock", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.ModeBlock = ptr.Bool(xtv) + } + + case strings.EqualFold("Override", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.Override = ptr.Bool(xtv) + } + + case strings.EqualFold("Protection", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.Protection = ptr.Bool(xtv) + } + + case strings.EqualFold("ReportUri", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ReportUri = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentRestrictions(v **types.Restrictions, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.Restrictions + if *v == nil { + sv = &types.Restrictions{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("GeoRestriction", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentGeoRestriction(&sv.GeoRestriction, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentS3Origin(v **types.S3Origin, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.S3Origin + if *v == nil { + sv = &types.S3Origin{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("DomainName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.DomainName = ptr.String(xtv) + } + + case strings.EqualFold("OriginAccessIdentity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.OriginAccessIdentity = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentS3OriginConfig(v **types.S3OriginConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.S3OriginConfig + if *v == nil { + sv = &types.S3OriginConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("OriginAccessIdentity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.OriginAccessIdentity = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentSessionStickinessConfig(v **types.SessionStickinessConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.SessionStickinessConfig + if *v == nil { + sv = &types.SessionStickinessConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("IdleTTL", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.IdleTTL = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("MaximumTTL", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaximumTTL = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentSigner(v **types.Signer, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.Signer + if *v == nil { + sv = &types.Signer{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("AwsAccountNumber", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.AwsAccountNumber = ptr.String(xtv) + } + + case strings.EqualFold("KeyPairIds", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentKeyPairIds(&sv.KeyPairIds, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentSignerList(v *[]types.Signer, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.Signer + if *v == nil { + sv = make([]types.Signer, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("Signer", t.Name.Local): + var col types.Signer + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentSigner(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentSignerListUnwrapped(v *[]types.Signer, decoder smithyxml.NodeDecoder) error { + var sv []types.Signer + if *v == nil { + sv = make([]types.Signer, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.Signer + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentSigner(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentSslProtocolsList(v *[]types.SslProtocol, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.SslProtocol + if *v == nil { + sv = make([]types.SslProtocol, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("SslProtocol", t.Name.Local): + var col types.SslProtocol + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = types.SslProtocol(xtv) + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentSslProtocolsListUnwrapped(v *[]types.SslProtocol, decoder smithyxml.NodeDecoder) error { + var sv []types.SslProtocol + if *v == nil { + sv = make([]types.SslProtocol, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.SslProtocol + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = types.SslProtocol(xtv) + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentStagingDistributionDnsNameList(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("DnsName", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentStagingDistributionDnsNameListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentStagingDistributionDnsNames(v **types.StagingDistributionDnsNames, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.StagingDistributionDnsNames + if *v == nil { + sv = &types.StagingDistributionDnsNames{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentStagingDistributionDnsNameList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentStagingDistributionInUse(v **types.StagingDistributionInUse, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.StagingDistributionInUse + if *v == nil { + sv = &types.StagingDistributionInUse{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentStatusCodeList(v *[]int32, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []int32 + if *v == nil { + sv = make([]int32, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("StatusCode", t.Name.Local): + var col int32 + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + col = int32(i64) + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentStatusCodeListUnwrapped(v *[]int32, decoder smithyxml.NodeDecoder) error { + var sv []int32 + if *v == nil { + sv = make([]int32, 0) + } else { + sv = *v + } + + switch { + default: + var mv int32 + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + mv = int32(i64) + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentStatusCodes(v **types.StatusCodes, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.StatusCodes + if *v == nil { + sv = &types.StatusCodes{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentStatusCodeList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentStreamingDistribution(v **types.StreamingDistribution, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.StreamingDistribution + if *v == nil { + sv = &types.StreamingDistribution{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ActiveTrustedSigners", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentActiveTrustedSigners(&sv.ActiveTrustedSigners, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("ARN", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ARN = ptr.String(xtv) + } + + case strings.EqualFold("DomainName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.DomainName = ptr.String(xtv) + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("LastModifiedTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(t) + } + + case strings.EqualFold("Status", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Status = ptr.String(xtv) + } + + case strings.EqualFold("StreamingDistributionConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentStreamingDistributionConfig(&sv.StreamingDistributionConfig, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentStreamingDistributionAlreadyExists(v **types.StreamingDistributionAlreadyExists, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.StreamingDistributionAlreadyExists + if *v == nil { + sv = &types.StreamingDistributionAlreadyExists{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentStreamingDistributionConfig(v **types.StreamingDistributionConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.StreamingDistributionConfig + if *v == nil { + sv = &types.StreamingDistributionConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Aliases", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentAliases(&sv.Aliases, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("CallerReference", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CallerReference = ptr.String(xtv) + } + + case strings.EqualFold("Comment", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Comment = ptr.String(xtv) + } + + case strings.EqualFold("Enabled", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.Enabled = ptr.Bool(xtv) + } + + case strings.EqualFold("Logging", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentStreamingLoggingConfig(&sv.Logging, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("PriceClass", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PriceClass = types.PriceClass(xtv) + } + + case strings.EqualFold("S3Origin", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentS3Origin(&sv.S3Origin, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("TrustedSigners", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentTrustedSigners(&sv.TrustedSigners, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentStreamingDistributionList(v **types.StreamingDistributionList, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.StreamingDistributionList + if *v == nil { + sv = &types.StreamingDistributionList{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("IsTruncated", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.IsTruncated = ptr.Bool(xtv) + } + + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentStreamingDistributionSummaryList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + case strings.EqualFold("MaxItems", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.MaxItems = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("NextMarker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextMarker = ptr.String(xtv) + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentStreamingDistributionNotDisabled(v **types.StreamingDistributionNotDisabled, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.StreamingDistributionNotDisabled + if *v == nil { + sv = &types.StreamingDistributionNotDisabled{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentStreamingDistributionSummary(v **types.StreamingDistributionSummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.StreamingDistributionSummary + if *v == nil { + sv = &types.StreamingDistributionSummary{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Aliases", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentAliases(&sv.Aliases, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("ARN", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ARN = ptr.String(xtv) + } + + case strings.EqualFold("Comment", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Comment = ptr.String(xtv) + } + + case strings.EqualFold("DomainName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.DomainName = ptr.String(xtv) + } + + case strings.EqualFold("Enabled", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.Enabled = ptr.Bool(xtv) + } + + case strings.EqualFold("Id", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Id = ptr.String(xtv) + } + + case strings.EqualFold("LastModifiedTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(t) + } + + case strings.EqualFold("PriceClass", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PriceClass = types.PriceClass(xtv) + } + + case strings.EqualFold("S3Origin", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentS3Origin(&sv.S3Origin, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Status", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Status = ptr.String(xtv) + } + + case strings.EqualFold("TrustedSigners", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentTrustedSigners(&sv.TrustedSigners, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentStreamingDistributionSummaryList(v *[]types.StreamingDistributionSummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.StreamingDistributionSummary + if *v == nil { + sv = make([]types.StreamingDistributionSummary, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("StreamingDistributionSummary", t.Name.Local): + var col types.StreamingDistributionSummary + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentStreamingDistributionSummary(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentStreamingDistributionSummaryListUnwrapped(v *[]types.StreamingDistributionSummary, decoder smithyxml.NodeDecoder) error { + var sv []types.StreamingDistributionSummary + if *v == nil { + sv = make([]types.StreamingDistributionSummary, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.StreamingDistributionSummary + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentStreamingDistributionSummary(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentStreamingLoggingConfig(v **types.StreamingLoggingConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.StreamingLoggingConfig + if *v == nil { + sv = &types.StreamingLoggingConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Bucket", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Bucket = ptr.String(xtv) + } + + case strings.EqualFold("Enabled", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.Enabled = ptr.Bool(xtv) + } + + case strings.EqualFold("Prefix", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Prefix = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTag(v **types.Tag, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.Tag + if *v == nil { + sv = &types.Tag{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Key", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Key = ptr.String(xtv) + } + + case strings.EqualFold("Value", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Value = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTagList(v *[]types.Tag, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.Tag + if *v == nil { + sv = make([]types.Tag, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("Tag", t.Name.Local): + var col types.Tag + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsRestxml_deserializeDocumentTag(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTagListUnwrapped(v *[]types.Tag, decoder smithyxml.NodeDecoder) error { + var sv []types.Tag + if *v == nil { + sv = make([]types.Tag, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.Tag + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsRestxml_deserializeDocumentTag(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentTags(v **types.Tags, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.Tags + if *v == nil { + sv = &types.Tags{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentTagList(&sv.Items, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTestFunctionFailed(v **types.TestFunctionFailed, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TestFunctionFailed + if *v == nil { + sv = &types.TestFunctionFailed{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTestResult(v **types.TestResult, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TestResult + if *v == nil { + sv = &types.TestResult{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ComputeUtilization", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ComputeUtilization = ptr.String(xtv) + } + + case strings.EqualFold("FunctionErrorMessage", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.FunctionErrorMessage = ptr.String(xtv) + } + + case strings.EqualFold("FunctionExecutionLogs", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFunctionExecutionLogList(&sv.FunctionExecutionLogs, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("FunctionOutput", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.FunctionOutput = ptr.String(xtv) + } + + case strings.EqualFold("FunctionSummary", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentFunctionSummary(&sv.FunctionSummary, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooLongCSPInResponseHeadersPolicy(v **types.TooLongCSPInResponseHeadersPolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooLongCSPInResponseHeadersPolicy + if *v == nil { + sv = &types.TooLongCSPInResponseHeadersPolicy{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyCacheBehaviors(v **types.TooManyCacheBehaviors, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyCacheBehaviors + if *v == nil { + sv = &types.TooManyCacheBehaviors{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyCachePolicies(v **types.TooManyCachePolicies, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyCachePolicies + if *v == nil { + sv = &types.TooManyCachePolicies{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyCertificates(v **types.TooManyCertificates, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyCertificates + if *v == nil { + sv = &types.TooManyCertificates{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyCloudFrontOriginAccessIdentities(v **types.TooManyCloudFrontOriginAccessIdentities, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyCloudFrontOriginAccessIdentities + if *v == nil { + sv = &types.TooManyCloudFrontOriginAccessIdentities{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyContinuousDeploymentPolicies(v **types.TooManyContinuousDeploymentPolicies, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyContinuousDeploymentPolicies + if *v == nil { + sv = &types.TooManyContinuousDeploymentPolicies{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyCookieNamesInWhiteList(v **types.TooManyCookieNamesInWhiteList, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyCookieNamesInWhiteList + if *v == nil { + sv = &types.TooManyCookieNamesInWhiteList{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyCookiesInCachePolicy(v **types.TooManyCookiesInCachePolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyCookiesInCachePolicy + if *v == nil { + sv = &types.TooManyCookiesInCachePolicy{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyCookiesInOriginRequestPolicy(v **types.TooManyCookiesInOriginRequestPolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyCookiesInOriginRequestPolicy + if *v == nil { + sv = &types.TooManyCookiesInOriginRequestPolicy{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyCustomHeadersInResponseHeadersPolicy(v **types.TooManyCustomHeadersInResponseHeadersPolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyCustomHeadersInResponseHeadersPolicy + if *v == nil { + sv = &types.TooManyCustomHeadersInResponseHeadersPolicy{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyDistributionCNAMEs(v **types.TooManyDistributionCNAMEs, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyDistributionCNAMEs + if *v == nil { + sv = &types.TooManyDistributionCNAMEs{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyDistributions(v **types.TooManyDistributions, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyDistributions + if *v == nil { + sv = &types.TooManyDistributions{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToCachePolicy(v **types.TooManyDistributionsAssociatedToCachePolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyDistributionsAssociatedToCachePolicy + if *v == nil { + sv = &types.TooManyDistributionsAssociatedToCachePolicy{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToFieldLevelEncryptionConfig(v **types.TooManyDistributionsAssociatedToFieldLevelEncryptionConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyDistributionsAssociatedToFieldLevelEncryptionConfig + if *v == nil { + sv = &types.TooManyDistributionsAssociatedToFieldLevelEncryptionConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToKeyGroup(v **types.TooManyDistributionsAssociatedToKeyGroup, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyDistributionsAssociatedToKeyGroup + if *v == nil { + sv = &types.TooManyDistributionsAssociatedToKeyGroup{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToOriginAccessControl(v **types.TooManyDistributionsAssociatedToOriginAccessControl, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyDistributionsAssociatedToOriginAccessControl + if *v == nil { + sv = &types.TooManyDistributionsAssociatedToOriginAccessControl{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToOriginRequestPolicy(v **types.TooManyDistributionsAssociatedToOriginRequestPolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyDistributionsAssociatedToOriginRequestPolicy + if *v == nil { + sv = &types.TooManyDistributionsAssociatedToOriginRequestPolicy{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyDistributionsAssociatedToResponseHeadersPolicy(v **types.TooManyDistributionsAssociatedToResponseHeadersPolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyDistributionsAssociatedToResponseHeadersPolicy + if *v == nil { + sv = &types.TooManyDistributionsAssociatedToResponseHeadersPolicy{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyDistributionsWithFunctionAssociations(v **types.TooManyDistributionsWithFunctionAssociations, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyDistributionsWithFunctionAssociations + if *v == nil { + sv = &types.TooManyDistributionsWithFunctionAssociations{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyDistributionsWithLambdaAssociations(v **types.TooManyDistributionsWithLambdaAssociations, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyDistributionsWithLambdaAssociations + if *v == nil { + sv = &types.TooManyDistributionsWithLambdaAssociations{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyDistributionsWithSingleFunctionARN(v **types.TooManyDistributionsWithSingleFunctionARN, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyDistributionsWithSingleFunctionARN + if *v == nil { + sv = &types.TooManyDistributionsWithSingleFunctionARN{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionConfigs(v **types.TooManyFieldLevelEncryptionConfigs, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyFieldLevelEncryptionConfigs + if *v == nil { + sv = &types.TooManyFieldLevelEncryptionConfigs{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionContentTypeProfiles(v **types.TooManyFieldLevelEncryptionContentTypeProfiles, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyFieldLevelEncryptionContentTypeProfiles + if *v == nil { + sv = &types.TooManyFieldLevelEncryptionContentTypeProfiles{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionEncryptionEntities(v **types.TooManyFieldLevelEncryptionEncryptionEntities, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyFieldLevelEncryptionEncryptionEntities + if *v == nil { + sv = &types.TooManyFieldLevelEncryptionEncryptionEntities{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionFieldPatterns(v **types.TooManyFieldLevelEncryptionFieldPatterns, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyFieldLevelEncryptionFieldPatterns + if *v == nil { + sv = &types.TooManyFieldLevelEncryptionFieldPatterns{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionProfiles(v **types.TooManyFieldLevelEncryptionProfiles, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyFieldLevelEncryptionProfiles + if *v == nil { + sv = &types.TooManyFieldLevelEncryptionProfiles{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyFieldLevelEncryptionQueryArgProfiles(v **types.TooManyFieldLevelEncryptionQueryArgProfiles, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyFieldLevelEncryptionQueryArgProfiles + if *v == nil { + sv = &types.TooManyFieldLevelEncryptionQueryArgProfiles{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyFunctionAssociations(v **types.TooManyFunctionAssociations, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyFunctionAssociations + if *v == nil { + sv = &types.TooManyFunctionAssociations{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyFunctions(v **types.TooManyFunctions, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyFunctions + if *v == nil { + sv = &types.TooManyFunctions{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyHeadersInCachePolicy(v **types.TooManyHeadersInCachePolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyHeadersInCachePolicy + if *v == nil { + sv = &types.TooManyHeadersInCachePolicy{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyHeadersInForwardedValues(v **types.TooManyHeadersInForwardedValues, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyHeadersInForwardedValues + if *v == nil { + sv = &types.TooManyHeadersInForwardedValues{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyHeadersInOriginRequestPolicy(v **types.TooManyHeadersInOriginRequestPolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyHeadersInOriginRequestPolicy + if *v == nil { + sv = &types.TooManyHeadersInOriginRequestPolicy{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyInvalidationsInProgress(v **types.TooManyInvalidationsInProgress, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyInvalidationsInProgress + if *v == nil { + sv = &types.TooManyInvalidationsInProgress{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyKeyGroups(v **types.TooManyKeyGroups, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyKeyGroups + if *v == nil { + sv = &types.TooManyKeyGroups{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyKeyGroupsAssociatedToDistribution(v **types.TooManyKeyGroupsAssociatedToDistribution, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyKeyGroupsAssociatedToDistribution + if *v == nil { + sv = &types.TooManyKeyGroupsAssociatedToDistribution{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyLambdaFunctionAssociations(v **types.TooManyLambdaFunctionAssociations, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyLambdaFunctionAssociations + if *v == nil { + sv = &types.TooManyLambdaFunctionAssociations{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyOriginAccessControls(v **types.TooManyOriginAccessControls, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyOriginAccessControls + if *v == nil { + sv = &types.TooManyOriginAccessControls{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyOriginCustomHeaders(v **types.TooManyOriginCustomHeaders, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyOriginCustomHeaders + if *v == nil { + sv = &types.TooManyOriginCustomHeaders{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyOriginGroupsPerDistribution(v **types.TooManyOriginGroupsPerDistribution, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyOriginGroupsPerDistribution + if *v == nil { + sv = &types.TooManyOriginGroupsPerDistribution{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyOriginRequestPolicies(v **types.TooManyOriginRequestPolicies, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyOriginRequestPolicies + if *v == nil { + sv = &types.TooManyOriginRequestPolicies{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyOrigins(v **types.TooManyOrigins, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyOrigins + if *v == nil { + sv = &types.TooManyOrigins{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyPublicKeys(v **types.TooManyPublicKeys, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyPublicKeys + if *v == nil { + sv = &types.TooManyPublicKeys{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyPublicKeysInKeyGroup(v **types.TooManyPublicKeysInKeyGroup, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyPublicKeysInKeyGroup + if *v == nil { + sv = &types.TooManyPublicKeysInKeyGroup{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyQueryStringParameters(v **types.TooManyQueryStringParameters, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyQueryStringParameters + if *v == nil { + sv = &types.TooManyQueryStringParameters{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyQueryStringsInCachePolicy(v **types.TooManyQueryStringsInCachePolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyQueryStringsInCachePolicy + if *v == nil { + sv = &types.TooManyQueryStringsInCachePolicy{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyQueryStringsInOriginRequestPolicy(v **types.TooManyQueryStringsInOriginRequestPolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyQueryStringsInOriginRequestPolicy + if *v == nil { + sv = &types.TooManyQueryStringsInOriginRequestPolicy{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyRealtimeLogConfigs(v **types.TooManyRealtimeLogConfigs, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyRealtimeLogConfigs + if *v == nil { + sv = &types.TooManyRealtimeLogConfigs{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyRemoveHeadersInResponseHeadersPolicy(v **types.TooManyRemoveHeadersInResponseHeadersPolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyRemoveHeadersInResponseHeadersPolicy + if *v == nil { + sv = &types.TooManyRemoveHeadersInResponseHeadersPolicy{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyResponseHeadersPolicies(v **types.TooManyResponseHeadersPolicies, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyResponseHeadersPolicies + if *v == nil { + sv = &types.TooManyResponseHeadersPolicies{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyStreamingDistributionCNAMEs(v **types.TooManyStreamingDistributionCNAMEs, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyStreamingDistributionCNAMEs + if *v == nil { + sv = &types.TooManyStreamingDistributionCNAMEs{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyStreamingDistributions(v **types.TooManyStreamingDistributions, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyStreamingDistributions + if *v == nil { + sv = &types.TooManyStreamingDistributions{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTooManyTrustedSigners(v **types.TooManyTrustedSigners, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TooManyTrustedSigners + if *v == nil { + sv = &types.TooManyTrustedSigners{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTrafficConfig(v **types.TrafficConfig, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TrafficConfig + if *v == nil { + sv = &types.TrafficConfig{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("SingleHeaderConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentContinuousDeploymentSingleHeaderConfig(&sv.SingleHeaderConfig, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("SingleWeightConfig", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentContinuousDeploymentSingleWeightConfig(&sv.SingleWeightConfig, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Type", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Type = types.ContinuousDeploymentPolicyType(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTrustedKeyGroupDoesNotExist(v **types.TrustedKeyGroupDoesNotExist, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TrustedKeyGroupDoesNotExist + if *v == nil { + sv = &types.TrustedKeyGroupDoesNotExist{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTrustedKeyGroupIdList(v *[]string, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("KeyGroup", t.Name.Local): + var col string + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + col = xtv + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTrustedKeyGroupIdListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { + var sv []string + if *v == nil { + sv = make([]string, 0) + } else { + sv = *v + } + + switch { + default: + var mv string + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + mv = xtv + } + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsRestxml_deserializeDocumentTrustedKeyGroups(v **types.TrustedKeyGroups, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TrustedKeyGroups + if *v == nil { + sv = &types.TrustedKeyGroups{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Enabled", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.Enabled = ptr.Bool(xtv) + } + + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentTrustedKeyGroupIdList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTrustedSignerDoesNotExist(v **types.TrustedSignerDoesNotExist, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TrustedSignerDoesNotExist + if *v == nil { + sv = &types.TrustedSignerDoesNotExist{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentTrustedSigners(v **types.TrustedSigners, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.TrustedSigners + if *v == nil { + sv = &types.TrustedSigners{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Enabled", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.Enabled = ptr.Bool(xtv) + } + + case strings.EqualFold("Items", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentAwsAccountNumberList(&sv.Items, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Quantity", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Quantity = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentUnsupportedOperation(v **types.UnsupportedOperation, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.UnsupportedOperation + if *v == nil { + sv = &types.UnsupportedOperation{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentViewerCertificate(v **types.ViewerCertificate, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ViewerCertificate + if *v == nil { + sv = &types.ViewerCertificate{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ACMCertificateArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ACMCertificateArn = ptr.String(xtv) + } + + case strings.EqualFold("Certificate", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Certificate = ptr.String(xtv) + } + + case strings.EqualFold("CertificateSource", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CertificateSource = types.CertificateSource(xtv) + } + + case strings.EqualFold("CloudFrontDefaultCertificate", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected boolean to be of type *bool, got %T instead", val) + } + sv.CloudFrontDefaultCertificate = ptr.Bool(xtv) + } + + case strings.EqualFold("IAMCertificateId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.IAMCertificateId = ptr.String(xtv) + } + + case strings.EqualFold("MinimumProtocolVersion", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.MinimumProtocolVersion = types.MinimumProtocolVersion(xtv) + } + + case strings.EqualFold("SSLSupportMethod", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SSLSupportMethod = types.SSLSupportMethod(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/doc.go new file mode 100644 index 0000000000..4990906f98 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/doc.go @@ -0,0 +1,13 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package cloudfront provides the API client, operations, and parameter types for +// Amazon CloudFront. +// +// # Amazon CloudFront +// +// This is the Amazon CloudFront API Reference. This guide is for developers who +// need detailed information about CloudFront API actions, data types, and errors. +// For detailed information about CloudFront features, see the [Amazon CloudFront Developer Guide]. +// +// [Amazon CloudFront Developer Guide]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Introduction.html +package cloudfront diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/endpoints.go new file mode 100644 index 0000000000..1b7240f36a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/endpoints.go @@ -0,0 +1,640 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +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/cloudfront/internal/endpoints" + smithy "github.com/aws/smithy-go" + 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 = "cloudfront" + } + 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_CLOUDFRONT") + + if g && !s { + return + } + + value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "CloudFront", 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 { + // The AWS region used to dispatch the request. + // + // Parameter is + // required. + // + // AWS::Region + Region *string + + // 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 +} + +// ValidateRequired validates required parameters are set. +func (p EndpointParameters) ValidateRequired() error { + if p.UseDualStack == nil { + return fmt.Errorf("parameter UseDualStack is required") + } + + if p.UseFIPS == nil { + return fmt.Errorf("parameter UseFIPS is required") + } + + return nil +} + +// WithDefaults returns a shallow copy of EndpointParameterswith default values +// applied to members where applicable. +func (p EndpointParameters) WithDefaults() EndpointParameters { + if p.UseDualStack == nil { + p.UseDualStack = ptr.Bool(false) + } + + if p.UseFIPS == nil { + p.UseFIPS = ptr.Bool(false) + } + return p +} + +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + +// EndpointResolverV2 provides the interface for resolving service endpoints. +type EndpointResolverV2 interface { + // ResolveEndpoint attempts to resolve the endpoint with the provided options, + // returning the endpoint if found. Otherwise an error is returned. + ResolveEndpoint(ctx context.Context, params EndpointParameters) ( + smithyendpoints.Endpoint, error, + ) +} + +// resolver provides the implementation for resolving endpoints. +type resolver struct{} + +func NewDefaultEndpointResolverV2() EndpointResolverV2 { + return &resolver{} +} + +// ResolveEndpoint attempts to resolve the endpoint with the provided options, +// returning the endpoint if found. Otherwise an error is returned. +func (r *resolver) ResolveEndpoint( + ctx context.Context, params EndpointParameters, +) ( + endpoint smithyendpoints.Endpoint, err error, +) { + params = params.WithDefaults() + if err = params.ValidateRequired(); err != nil { + return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err) + } + _UseDualStack := *params.UseDualStack + _UseFIPS := *params.UseFIPS + + if exprVal := params.Endpoint; exprVal != nil { + _Endpoint := *exprVal + _ = _Endpoint + if _UseFIPS == true { + return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported") + } + if _UseDualStack == true { + return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported") + } + uriString := _Endpoint + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + if exprVal := params.Region; exprVal != nil { + _Region := *exprVal + _ = _Region + if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil { + _PartitionResult := *exprVal + _ = _PartitionResult + if _PartitionResult.Name == "aws" { + if _UseFIPS == false { + if _UseDualStack == false { + uriString := "https://cloudfront.amazonaws.com" + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningName(&sp, "cloudfront") + smithyhttp.SetSigV4ASigningName(&sp, "cloudfront") + + smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") + return sp + }(), + }, + }) + return out + }(), + }, nil + } + } + } + if _PartitionResult.Name == "aws" { + if _UseFIPS == true { + if _UseDualStack == false { + uriString := "https://cloudfront-fips.amazonaws.com" + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningName(&sp, "cloudfront") + smithyhttp.SetSigV4ASigningName(&sp, "cloudfront") + + smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") + return sp + }(), + }, + }) + return out + }(), + }, nil + } + } + } + if _PartitionResult.Name == "aws-cn" { + if _UseFIPS == false { + if _UseDualStack == false { + uriString := "https://cloudfront.cn-northwest-1.amazonaws.com.cn" + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ + { + SchemeID: "aws.auth#sigv4", + SignerProperties: func() smithy.Properties { + var sp smithy.Properties + smithyhttp.SetSigV4SigningName(&sp, "cloudfront") + smithyhttp.SetSigV4ASigningName(&sp, "cloudfront") + + smithyhttp.SetSigV4SigningRegion(&sp, "cn-northwest-1") + return sp + }(), + }, + }) + return out + }(), + }, 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://cloudfront-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 _PartitionResult.SupportsFIPS == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://cloudfront-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 _UseDualStack == true { + if true == _PartitionResult.SupportsDualStack { + uriString := func() string { + var out strings.Builder + out.WriteString("https://cloudfront.") + 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://cloudfront.") + 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.Region = bindRegion(options.Region) + params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled) + params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled) + params.Endpoint = options.BaseEndpoint + + 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/cloudfront/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/generated.json new file mode 100644 index 0000000000..bd06adb328 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/generated.json @@ -0,0 +1,144 @@ +{ + "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", + "github.com/jmespath/go-jmespath": "v0.4.0" + }, + "files": [ + "api_client.go", + "api_client_test.go", + "api_op_AssociateAlias.go", + "api_op_CopyDistribution.go", + "api_op_CreateCachePolicy.go", + "api_op_CreateCloudFrontOriginAccessIdentity.go", + "api_op_CreateContinuousDeploymentPolicy.go", + "api_op_CreateDistribution.go", + "api_op_CreateDistributionWithTags.go", + "api_op_CreateFieldLevelEncryptionConfig.go", + "api_op_CreateFieldLevelEncryptionProfile.go", + "api_op_CreateFunction.go", + "api_op_CreateInvalidation.go", + "api_op_CreateKeyGroup.go", + "api_op_CreateKeyValueStore.go", + "api_op_CreateMonitoringSubscription.go", + "api_op_CreateOriginAccessControl.go", + "api_op_CreateOriginRequestPolicy.go", + "api_op_CreatePublicKey.go", + "api_op_CreateRealtimeLogConfig.go", + "api_op_CreateResponseHeadersPolicy.go", + "api_op_CreateStreamingDistribution.go", + "api_op_CreateStreamingDistributionWithTags.go", + "api_op_DeleteCachePolicy.go", + "api_op_DeleteCloudFrontOriginAccessIdentity.go", + "api_op_DeleteContinuousDeploymentPolicy.go", + "api_op_DeleteDistribution.go", + "api_op_DeleteFieldLevelEncryptionConfig.go", + "api_op_DeleteFieldLevelEncryptionProfile.go", + "api_op_DeleteFunction.go", + "api_op_DeleteKeyGroup.go", + "api_op_DeleteKeyValueStore.go", + "api_op_DeleteMonitoringSubscription.go", + "api_op_DeleteOriginAccessControl.go", + "api_op_DeleteOriginRequestPolicy.go", + "api_op_DeletePublicKey.go", + "api_op_DeleteRealtimeLogConfig.go", + "api_op_DeleteResponseHeadersPolicy.go", + "api_op_DeleteStreamingDistribution.go", + "api_op_DescribeFunction.go", + "api_op_DescribeKeyValueStore.go", + "api_op_GetCachePolicy.go", + "api_op_GetCachePolicyConfig.go", + "api_op_GetCloudFrontOriginAccessIdentity.go", + "api_op_GetCloudFrontOriginAccessIdentityConfig.go", + "api_op_GetContinuousDeploymentPolicy.go", + "api_op_GetContinuousDeploymentPolicyConfig.go", + "api_op_GetDistribution.go", + "api_op_GetDistributionConfig.go", + "api_op_GetFieldLevelEncryption.go", + "api_op_GetFieldLevelEncryptionConfig.go", + "api_op_GetFieldLevelEncryptionProfile.go", + "api_op_GetFieldLevelEncryptionProfileConfig.go", + "api_op_GetFunction.go", + "api_op_GetInvalidation.go", + "api_op_GetKeyGroup.go", + "api_op_GetKeyGroupConfig.go", + "api_op_GetMonitoringSubscription.go", + "api_op_GetOriginAccessControl.go", + "api_op_GetOriginAccessControlConfig.go", + "api_op_GetOriginRequestPolicy.go", + "api_op_GetOriginRequestPolicyConfig.go", + "api_op_GetPublicKey.go", + "api_op_GetPublicKeyConfig.go", + "api_op_GetRealtimeLogConfig.go", + "api_op_GetResponseHeadersPolicy.go", + "api_op_GetResponseHeadersPolicyConfig.go", + "api_op_GetStreamingDistribution.go", + "api_op_GetStreamingDistributionConfig.go", + "api_op_ListCachePolicies.go", + "api_op_ListCloudFrontOriginAccessIdentities.go", + "api_op_ListConflictingAliases.go", + "api_op_ListContinuousDeploymentPolicies.go", + "api_op_ListDistributions.go", + "api_op_ListDistributionsByCachePolicyId.go", + "api_op_ListDistributionsByKeyGroup.go", + "api_op_ListDistributionsByOriginRequestPolicyId.go", + "api_op_ListDistributionsByRealtimeLogConfig.go", + "api_op_ListDistributionsByResponseHeadersPolicyId.go", + "api_op_ListDistributionsByWebACLId.go", + "api_op_ListFieldLevelEncryptionConfigs.go", + "api_op_ListFieldLevelEncryptionProfiles.go", + "api_op_ListFunctions.go", + "api_op_ListInvalidations.go", + "api_op_ListKeyGroups.go", + "api_op_ListKeyValueStores.go", + "api_op_ListOriginAccessControls.go", + "api_op_ListOriginRequestPolicies.go", + "api_op_ListPublicKeys.go", + "api_op_ListRealtimeLogConfigs.go", + "api_op_ListResponseHeadersPolicies.go", + "api_op_ListStreamingDistributions.go", + "api_op_ListTagsForResource.go", + "api_op_PublishFunction.go", + "api_op_TagResource.go", + "api_op_TestFunction.go", + "api_op_UntagResource.go", + "api_op_UpdateCachePolicy.go", + "api_op_UpdateCloudFrontOriginAccessIdentity.go", + "api_op_UpdateContinuousDeploymentPolicy.go", + "api_op_UpdateDistribution.go", + "api_op_UpdateDistributionWithStagingConfig.go", + "api_op_UpdateFieldLevelEncryptionConfig.go", + "api_op_UpdateFieldLevelEncryptionProfile.go", + "api_op_UpdateFunction.go", + "api_op_UpdateKeyGroup.go", + "api_op_UpdateKeyValueStore.go", + "api_op_UpdateOriginAccessControl.go", + "api_op_UpdateOriginRequestPolicy.go", + "api_op_UpdatePublicKey.go", + "api_op_UpdateRealtimeLogConfig.go", + "api_op_UpdateResponseHeadersPolicy.go", + "api_op_UpdateStreamingDistribution.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", + "types/enums.go", + "types/errors.go", + "types/types.go", + "validators.go" + ], + "go": "1.15", + "module": "github.com/aws/aws-sdk-go-v2/service/cloudfront", + "unstable": false +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/go_module_metadata.go new file mode 100644 index 0000000000..d43c5c3d78 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package cloudfront + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "1.40.4" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/internal/endpoints/endpoints.go new file mode 100644 index 0000000000..06a7ddf2b6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/internal/endpoints/endpoints.go @@ -0,0 +1,320 @@ +// 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 CloudFront 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 + 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+$"), + 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: "cloudfront.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "cloudfront-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "cloudfront-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "cloudfront.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.Aws, + IsRegionalized: false, + PartitionEndpoint: "aws-global", + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "aws-global", + }: endpoints.Endpoint{ + Hostname: "cloudfront.amazonaws.com", + Protocols: []string{"http", "https"}, + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-1", + }, + }, + }, + }, + { + ID: "aws-cn", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "cloudfront.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "cloudfront-fips.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "cloudfront-fips.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "cloudfront.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsCn, + IsRegionalized: false, + PartitionEndpoint: "aws-cn-global", + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "aws-cn-global", + }: endpoints.Endpoint{ + Hostname: "cloudfront.cn-northwest-1.amazonaws.com.cn", + Protocols: []string{"http", "https"}, + CredentialScope: endpoints.CredentialScope{ + Region: "cn-northwest-1", + }, + }, + }, + }, + { + ID: "aws-iso", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "cloudfront-fips.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "cloudfront.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIso, + IsRegionalized: true, + }, + { + ID: "aws-iso-b", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "cloudfront-fips.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "cloudfront.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoB, + IsRegionalized: true, + }, + { + ID: "aws-iso-e", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "cloudfront-fips.{region}.cloud.adc-e.uk", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "cloudfront.{region}.cloud.adc-e.uk", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoE, + IsRegionalized: true, + }, + { + ID: "aws-iso-f", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "cloudfront-fips.{region}.csp.hci.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "cloudfront.{region}.csp.hci.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoF, + IsRegionalized: true, + }, + { + ID: "aws-us-gov", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "cloudfront.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "cloudfront-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "cloudfront-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "cloudfront.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsUsGov, + IsRegionalized: true, + }, +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/options.go new file mode 100644 index 0000000000..6bc13459ef --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/options.go @@ -0,0 +1,232 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +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 + + // The logger writer interface to write logging messages to. + Logger logging.Logger + + // The client meter provider. + MeterProvider metrics.MeterProvider + + // The region to send requests to. (Required) + Region string + + // RetryMaxAttempts specifies the maximum number attempts an API client will call + // an operation that fails with a retryable error. A value of 0 is ignored, and + // will not be used to configure the API client created default retryer, or modify + // per operation call's retry max attempts. + // + // If specified in an operation call's functional options with a value that is + // different than the constructed client's Options, the Client's Retryer will be + // wrapped to use the operation's specific RetryMaxAttempts value. + RetryMaxAttempts int + + // RetryMode specifies the retry mode the API client will be created with, if + // Retryer option is not also specified. + // + // When creating a new API Clients this member will only be used if the Retryer + // Options member is nil. This value will be ignored if Retryer is not nil. + // + // Currently does not support per operation call overrides, may in the future. + RetryMode aws.RetryMode + + // Retryer guides how HTTP requests should be retried in case of recoverable + // failures. When nil the API client will use a default retryer. The kind of + // default retry created by the API client can be changed with the RetryMode + // option. + Retryer aws.Retryer + + // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set + // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You + // should not populate this structure programmatically, or rely on the values here + // within your applications. + RuntimeEnvironment aws.RuntimeEnvironment + + // The client tracer provider. + TracerProvider tracing.TracerProvider + + // The initial DefaultsMode used when the client options were constructed. If the + // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved + // value was at that point in time. + // + // Currently does not support per operation call overrides, may in the future. + resolvedDefaultsMode aws.DefaultsMode + + // The HTTP client to invoke API calls with. Defaults to client's default HTTP + // implementation if nil. + HTTPClient HTTPClient + + // The auth scheme resolver which determines how to authenticate for each + // operation. + AuthSchemeResolver AuthSchemeResolver + + // The list of auth schemes supported by the client. + AuthSchemes []smithyhttp.AuthScheme +} + +// Copy creates a clone where the APIOptions list is deep copied. +func (o Options) Copy() Options { + to := o + to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) + copy(to.APIOptions, o.APIOptions) + + return to +} + +func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver { + if schemeID == "aws.auth#sigv4" { + return getSigV4IdentityResolver(o) + } + if schemeID == "smithy.api#noAuth" { + return &smithyauth.AnonymousIdentityResolver{} + } + return nil +} + +// WithAPIOptions returns a functional option for setting the Client's APIOptions +// option. +func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { + return func(o *Options) { + o.APIOptions = append(o.APIOptions, optFns...) + } +} + +// Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for +// this field will likely prevent you from using any endpoint-related service +// features released after the introduction of EndpointResolverV2 and BaseEndpoint. +// +// To migrate an EndpointResolver implementation that uses a custom endpoint, set +// the client option BaseEndpoint instead. +func WithEndpointResolver(v EndpointResolver) func(*Options) { + return func(o *Options) { + o.EndpointResolver = v + } +} + +// WithEndpointResolverV2 returns a functional option for setting the Client's +// EndpointResolverV2 option. +func WithEndpointResolverV2(v EndpointResolverV2) func(*Options) { + return func(o *Options) { + o.EndpointResolverV2 = v + } +} + +func getSigV4IdentityResolver(o Options) smithyauth.IdentityResolver { + if o.Credentials != nil { + return &internalauthsmithy.CredentialsProviderAdapter{Provider: o.Credentials} + } + return nil +} + +// WithSigV4SigningName applies an override to the authentication workflow to +// use the given signing name for SigV4-authenticated operations. +// +// This is an advanced setting. The value here is FINAL, taking precedence over +// the resolved signing name from both auth scheme resolution and endpoint +// resolution. +func WithSigV4SigningName(name string) func(*Options) { + fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, + ) { + return next.HandleInitialize(awsmiddleware.SetSigningName(ctx, name), in) + } + return func(o *Options) { + o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { + return s.Initialize.Add( + middleware.InitializeMiddlewareFunc("withSigV4SigningName", fn), + middleware.Before, + ) + }) + } +} + +// WithSigV4SigningRegion applies an override to the authentication workflow to +// use the given signing region for SigV4-authenticated operations. +// +// This is an advanced setting. The value here is FINAL, taking precedence over +// the resolved signing region from both auth scheme resolution and endpoint +// resolution. +func WithSigV4SigningRegion(region string) func(*Options) { + fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, + ) { + return next.HandleInitialize(awsmiddleware.SetSigningRegion(ctx, region), in) + } + return func(o *Options) { + o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { + return s.Initialize.Add( + middleware.InitializeMiddlewareFunc("withSigV4SigningRegion", fn), + middleware.Before, + ) + }) + } +} + +func ignoreAnonymousAuth(options *Options) { + if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) { + options.Credentials = nil + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/serializers.go new file mode 100644 index 0000000000..f16b819b01 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/serializers.go @@ -0,0 +1,14356 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "bytes" + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/encoding/httpbinding" + smithyxml "github.com/aws/smithy-go/encoding/xml" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "math" +) + +type awsRestxml_serializeOpAssociateAlias struct { +} + +func (*awsRestxml_serializeOpAssociateAlias) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpAssociateAlias) 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.(*AssociateAliasInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distribution/{TargetDistributionId}/associate-alias") + 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 := awsRestxml_serializeOpHttpBindingsAssociateAliasInput(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 awsRestxml_serializeOpHttpBindingsAssociateAliasInput(v *AssociateAliasInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Alias != nil { + encoder.SetQuery("Alias").String(*v.Alias) + } + + if v.TargetDistributionId == nil || len(*v.TargetDistributionId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member TargetDistributionId must not be empty")} + } + if v.TargetDistributionId != nil { + if err := encoder.SetURI("TargetDistributionId").String(*v.TargetDistributionId); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpCopyDistribution struct { +} + +func (*awsRestxml_serializeOpCopyDistribution) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCopyDistribution) 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.(*CopyDistributionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distribution/{PrimaryDistributionId}/copy") + 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 := awsRestxml_serializeOpHttpBindingsCopyDistributionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CopyDistributionRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeOpDocumentCopyDistributionInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.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 awsRestxml_serializeOpHttpBindingsCopyDistributionInput(v *CopyDistributionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + if v.PrimaryDistributionId == nil || len(*v.PrimaryDistributionId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member PrimaryDistributionId must not be empty")} + } + if v.PrimaryDistributionId != nil { + if err := encoder.SetURI("PrimaryDistributionId").String(*v.PrimaryDistributionId); err != nil { + return err + } + } + + if v.Staging != nil { + locationName := "Staging" + encoder.SetHeader(locationName).Boolean(*v.Staging) + } + + return nil +} + +func awsRestxml_serializeOpDocumentCopyDistributionInput(v *CopyDistributionInput, value smithyxml.Value) error { + defer value.Close() + if v.CallerReference != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CallerReference", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.CallerReference) + } + if v.Enabled != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Enabled", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.Enabled) + } + return nil +} + +type awsRestxml_serializeOpCreateCachePolicy struct { +} + +func (*awsRestxml_serializeOpCreateCachePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreateCachePolicy) 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.(*CreateCachePolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/cache-policy") + 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 input.CachePolicyConfig != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CachePolicyConfig", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentCachePolicyConfig(input.CachePolicyConfig, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); 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 awsRestxml_serializeOpHttpBindingsCreateCachePolicyInput(v *CreateCachePolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestxml_serializeOpCreateCloudFrontOriginAccessIdentity struct { +} + +func (*awsRestxml_serializeOpCreateCloudFrontOriginAccessIdentity) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreateCloudFrontOriginAccessIdentity) 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.(*CreateCloudFrontOriginAccessIdentityInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-access-identity/cloudfront") + 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 input.CloudFrontOriginAccessIdentityConfig != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CloudFrontOriginAccessIdentityConfig", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentCloudFrontOriginAccessIdentityConfig(input.CloudFrontOriginAccessIdentityConfig, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); 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 awsRestxml_serializeOpHttpBindingsCreateCloudFrontOriginAccessIdentityInput(v *CreateCloudFrontOriginAccessIdentityInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestxml_serializeOpCreateContinuousDeploymentPolicy struct { +} + +func (*awsRestxml_serializeOpCreateContinuousDeploymentPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreateContinuousDeploymentPolicy) 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.(*CreateContinuousDeploymentPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/continuous-deployment-policy") + 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 input.ContinuousDeploymentPolicyConfig != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ContinuousDeploymentPolicyConfig", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentContinuousDeploymentPolicyConfig(input.ContinuousDeploymentPolicyConfig, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); 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 awsRestxml_serializeOpHttpBindingsCreateContinuousDeploymentPolicyInput(v *CreateContinuousDeploymentPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestxml_serializeOpCreateDistribution struct { +} + +func (*awsRestxml_serializeOpCreateDistribution) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreateDistribution) 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.(*CreateDistributionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distribution") + 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 input.DistributionConfig != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "DistributionConfig", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentDistributionConfig(input.DistributionConfig, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); 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 awsRestxml_serializeOpHttpBindingsCreateDistributionInput(v *CreateDistributionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestxml_serializeOpCreateDistributionWithTags struct { +} + +func (*awsRestxml_serializeOpCreateDistributionWithTags) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreateDistributionWithTags) 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.(*CreateDistributionWithTagsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distribution?WithTags") + 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 input.DistributionConfigWithTags != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "DistributionConfigWithTags", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentDistributionConfigWithTags(input.DistributionConfigWithTags, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); 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 awsRestxml_serializeOpHttpBindingsCreateDistributionWithTagsInput(v *CreateDistributionWithTagsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestxml_serializeOpCreateFieldLevelEncryptionConfig struct { +} + +func (*awsRestxml_serializeOpCreateFieldLevelEncryptionConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreateFieldLevelEncryptionConfig) 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.(*CreateFieldLevelEncryptionConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/field-level-encryption") + 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 input.FieldLevelEncryptionConfig != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "FieldLevelEncryptionConfig", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentFieldLevelEncryptionConfig(input.FieldLevelEncryptionConfig, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); 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 awsRestxml_serializeOpHttpBindingsCreateFieldLevelEncryptionConfigInput(v *CreateFieldLevelEncryptionConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestxml_serializeOpCreateFieldLevelEncryptionProfile struct { +} + +func (*awsRestxml_serializeOpCreateFieldLevelEncryptionProfile) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreateFieldLevelEncryptionProfile) 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.(*CreateFieldLevelEncryptionProfileInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/field-level-encryption-profile") + 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 input.FieldLevelEncryptionProfileConfig != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "FieldLevelEncryptionProfileConfig", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentFieldLevelEncryptionProfileConfig(input.FieldLevelEncryptionProfileConfig, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); 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 awsRestxml_serializeOpHttpBindingsCreateFieldLevelEncryptionProfileInput(v *CreateFieldLevelEncryptionProfileInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestxml_serializeOpCreateFunction struct { +} + +func (*awsRestxml_serializeOpCreateFunction) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreateFunction) 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.(*CreateFunctionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/function") + 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/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CreateFunctionRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeOpDocumentCreateFunctionInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.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 awsRestxml_serializeOpHttpBindingsCreateFunctionInput(v *CreateFunctionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestxml_serializeOpDocumentCreateFunctionInput(v *CreateFunctionInput, value smithyxml.Value) error { + defer value.Close() + if v.FunctionCode != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "FunctionCode", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Base64EncodeBytes(v.FunctionCode) + } + if v.FunctionConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "FunctionConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentFunctionConfig(v.FunctionConfig, el); err != nil { + return err + } + } + if v.Name != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Name", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Name) + } + return nil +} + +type awsRestxml_serializeOpCreateInvalidation struct { +} + +func (*awsRestxml_serializeOpCreateInvalidation) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreateInvalidation) 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.(*CreateInvalidationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distribution/{DistributionId}/invalidation") + 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 := awsRestxml_serializeOpHttpBindingsCreateInvalidationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if input.InvalidationBatch != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "InvalidationBatch", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentInvalidationBatch(input.InvalidationBatch, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); 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 awsRestxml_serializeOpHttpBindingsCreateInvalidationInput(v *CreateInvalidationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DistributionId == nil || len(*v.DistributionId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DistributionId must not be empty")} + } + if v.DistributionId != nil { + if err := encoder.SetURI("DistributionId").String(*v.DistributionId); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpCreateKeyGroup struct { +} + +func (*awsRestxml_serializeOpCreateKeyGroup) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreateKeyGroup) 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.(*CreateKeyGroupInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/key-group") + 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 input.KeyGroupConfig != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "KeyGroupConfig", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentKeyGroupConfig(input.KeyGroupConfig, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); 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 awsRestxml_serializeOpHttpBindingsCreateKeyGroupInput(v *CreateKeyGroupInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestxml_serializeOpCreateKeyValueStore struct { +} + +func (*awsRestxml_serializeOpCreateKeyValueStore) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreateKeyValueStore) 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.(*CreateKeyValueStoreInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/key-value-store") + 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/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CreateKeyValueStoreRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeOpDocumentCreateKeyValueStoreInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.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 awsRestxml_serializeOpHttpBindingsCreateKeyValueStoreInput(v *CreateKeyValueStoreInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestxml_serializeOpDocumentCreateKeyValueStoreInput(v *CreateKeyValueStoreInput, value smithyxml.Value) error { + defer value.Close() + if v.Comment != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Comment", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Comment) + } + if v.ImportSource != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ImportSource", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentImportSource(v.ImportSource, el); err != nil { + return err + } + } + if v.Name != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Name", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Name) + } + return nil +} + +type awsRestxml_serializeOpCreateMonitoringSubscription struct { +} + +func (*awsRestxml_serializeOpCreateMonitoringSubscription) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreateMonitoringSubscription) 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.(*CreateMonitoringSubscriptionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distributions/{DistributionId}/monitoring-subscription") + 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 := awsRestxml_serializeOpHttpBindingsCreateMonitoringSubscriptionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if input.MonitoringSubscription != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "MonitoringSubscription", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentMonitoringSubscription(input.MonitoringSubscription, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); 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 awsRestxml_serializeOpHttpBindingsCreateMonitoringSubscriptionInput(v *CreateMonitoringSubscriptionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DistributionId == nil || len(*v.DistributionId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DistributionId must not be empty")} + } + if v.DistributionId != nil { + if err := encoder.SetURI("DistributionId").String(*v.DistributionId); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpCreateOriginAccessControl struct { +} + +func (*awsRestxml_serializeOpCreateOriginAccessControl) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreateOriginAccessControl) 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.(*CreateOriginAccessControlInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-access-control") + 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 input.OriginAccessControlConfig != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "OriginAccessControlConfig", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentOriginAccessControlConfig(input.OriginAccessControlConfig, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); 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 awsRestxml_serializeOpHttpBindingsCreateOriginAccessControlInput(v *CreateOriginAccessControlInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestxml_serializeOpCreateOriginRequestPolicy struct { +} + +func (*awsRestxml_serializeOpCreateOriginRequestPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreateOriginRequestPolicy) 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.(*CreateOriginRequestPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-request-policy") + 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 input.OriginRequestPolicyConfig != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "OriginRequestPolicyConfig", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentOriginRequestPolicyConfig(input.OriginRequestPolicyConfig, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); 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 awsRestxml_serializeOpHttpBindingsCreateOriginRequestPolicyInput(v *CreateOriginRequestPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestxml_serializeOpCreatePublicKey struct { +} + +func (*awsRestxml_serializeOpCreatePublicKey) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreatePublicKey) 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.(*CreatePublicKeyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/public-key") + 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 input.PublicKeyConfig != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "PublicKeyConfig", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentPublicKeyConfig(input.PublicKeyConfig, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); 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 awsRestxml_serializeOpHttpBindingsCreatePublicKeyInput(v *CreatePublicKeyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestxml_serializeOpCreateRealtimeLogConfig struct { +} + +func (*awsRestxml_serializeOpCreateRealtimeLogConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreateRealtimeLogConfig) 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.(*CreateRealtimeLogConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/realtime-log-config") + 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/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CreateRealtimeLogConfigRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeOpDocumentCreateRealtimeLogConfigInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.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 awsRestxml_serializeOpHttpBindingsCreateRealtimeLogConfigInput(v *CreateRealtimeLogConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestxml_serializeOpDocumentCreateRealtimeLogConfigInput(v *CreateRealtimeLogConfigInput, value smithyxml.Value) error { + defer value.Close() + if v.EndPoints != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "EndPoints", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentEndPointList(v.EndPoints, el); err != nil { + return err + } + } + if v.Fields != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Fields", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentFieldList(v.Fields, el); err != nil { + return err + } + } + if v.Name != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Name", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Name) + } + if v.SamplingRate != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "SamplingRate", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Long(*v.SamplingRate) + } + return nil +} + +type awsRestxml_serializeOpCreateResponseHeadersPolicy struct { +} + +func (*awsRestxml_serializeOpCreateResponseHeadersPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreateResponseHeadersPolicy) 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.(*CreateResponseHeadersPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/response-headers-policy") + 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 input.ResponseHeadersPolicyConfig != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ResponseHeadersPolicyConfig", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentResponseHeadersPolicyConfig(input.ResponseHeadersPolicyConfig, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); 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 awsRestxml_serializeOpHttpBindingsCreateResponseHeadersPolicyInput(v *CreateResponseHeadersPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestxml_serializeOpCreateStreamingDistribution struct { +} + +func (*awsRestxml_serializeOpCreateStreamingDistribution) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreateStreamingDistribution) 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.(*CreateStreamingDistributionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/streaming-distribution") + 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 input.StreamingDistributionConfig != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "StreamingDistributionConfig", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentStreamingDistributionConfig(input.StreamingDistributionConfig, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); 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 awsRestxml_serializeOpHttpBindingsCreateStreamingDistributionInput(v *CreateStreamingDistributionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestxml_serializeOpCreateStreamingDistributionWithTags struct { +} + +func (*awsRestxml_serializeOpCreateStreamingDistributionWithTags) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpCreateStreamingDistributionWithTags) 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.(*CreateStreamingDistributionWithTagsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/streaming-distribution?WithTags") + 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 input.StreamingDistributionConfigWithTags != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "StreamingDistributionConfigWithTags", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentStreamingDistributionConfigWithTags(input.StreamingDistributionConfigWithTags, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); 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 awsRestxml_serializeOpHttpBindingsCreateStreamingDistributionWithTagsInput(v *CreateStreamingDistributionWithTagsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestxml_serializeOpDeleteCachePolicy struct { +} + +func (*awsRestxml_serializeOpDeleteCachePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDeleteCachePolicy) 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.(*DeleteCachePolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/cache-policy/{Id}") + 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 := awsRestxml_serializeOpHttpBindingsDeleteCachePolicyInput(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 awsRestxml_serializeOpHttpBindingsDeleteCachePolicyInput(v *DeleteCachePolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + return nil +} + +type awsRestxml_serializeOpDeleteCloudFrontOriginAccessIdentity struct { +} + +func (*awsRestxml_serializeOpDeleteCloudFrontOriginAccessIdentity) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDeleteCloudFrontOriginAccessIdentity) 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.(*DeleteCloudFrontOriginAccessIdentityInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-access-identity/cloudfront/{Id}") + 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 := awsRestxml_serializeOpHttpBindingsDeleteCloudFrontOriginAccessIdentityInput(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 awsRestxml_serializeOpHttpBindingsDeleteCloudFrontOriginAccessIdentityInput(v *DeleteCloudFrontOriginAccessIdentityInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + return nil +} + +type awsRestxml_serializeOpDeleteContinuousDeploymentPolicy struct { +} + +func (*awsRestxml_serializeOpDeleteContinuousDeploymentPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDeleteContinuousDeploymentPolicy) 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.(*DeleteContinuousDeploymentPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/continuous-deployment-policy/{Id}") + 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 := awsRestxml_serializeOpHttpBindingsDeleteContinuousDeploymentPolicyInput(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 awsRestxml_serializeOpHttpBindingsDeleteContinuousDeploymentPolicyInput(v *DeleteContinuousDeploymentPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + return nil +} + +type awsRestxml_serializeOpDeleteDistribution struct { +} + +func (*awsRestxml_serializeOpDeleteDistribution) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDeleteDistribution) 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.(*DeleteDistributionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distribution/{Id}") + 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 := awsRestxml_serializeOpHttpBindingsDeleteDistributionInput(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 awsRestxml_serializeOpHttpBindingsDeleteDistributionInput(v *DeleteDistributionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + return nil +} + +type awsRestxml_serializeOpDeleteFieldLevelEncryptionConfig struct { +} + +func (*awsRestxml_serializeOpDeleteFieldLevelEncryptionConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDeleteFieldLevelEncryptionConfig) 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.(*DeleteFieldLevelEncryptionConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/field-level-encryption/{Id}") + 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 := awsRestxml_serializeOpHttpBindingsDeleteFieldLevelEncryptionConfigInput(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 awsRestxml_serializeOpHttpBindingsDeleteFieldLevelEncryptionConfigInput(v *DeleteFieldLevelEncryptionConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + return nil +} + +type awsRestxml_serializeOpDeleteFieldLevelEncryptionProfile struct { +} + +func (*awsRestxml_serializeOpDeleteFieldLevelEncryptionProfile) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDeleteFieldLevelEncryptionProfile) 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.(*DeleteFieldLevelEncryptionProfileInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/field-level-encryption-profile/{Id}") + 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 := awsRestxml_serializeOpHttpBindingsDeleteFieldLevelEncryptionProfileInput(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 awsRestxml_serializeOpHttpBindingsDeleteFieldLevelEncryptionProfileInput(v *DeleteFieldLevelEncryptionProfileInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + return nil +} + +type awsRestxml_serializeOpDeleteFunction struct { +} + +func (*awsRestxml_serializeOpDeleteFunction) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDeleteFunction) 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.(*DeleteFunctionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/function/{Name}") + 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 := awsRestxml_serializeOpHttpBindingsDeleteFunctionInput(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 awsRestxml_serializeOpHttpBindingsDeleteFunctionInput(v *DeleteFunctionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("Name").String(*v.Name); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpDeleteKeyGroup struct { +} + +func (*awsRestxml_serializeOpDeleteKeyGroup) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDeleteKeyGroup) 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.(*DeleteKeyGroupInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/key-group/{Id}") + 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 := awsRestxml_serializeOpHttpBindingsDeleteKeyGroupInput(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 awsRestxml_serializeOpHttpBindingsDeleteKeyGroupInput(v *DeleteKeyGroupInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + return nil +} + +type awsRestxml_serializeOpDeleteKeyValueStore struct { +} + +func (*awsRestxml_serializeOpDeleteKeyValueStore) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDeleteKeyValueStore) 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.(*DeleteKeyValueStoreInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/key-value-store/{Name}") + 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 := awsRestxml_serializeOpHttpBindingsDeleteKeyValueStoreInput(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 awsRestxml_serializeOpHttpBindingsDeleteKeyValueStoreInput(v *DeleteKeyValueStoreInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("Name").String(*v.Name); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpDeleteMonitoringSubscription struct { +} + +func (*awsRestxml_serializeOpDeleteMonitoringSubscription) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDeleteMonitoringSubscription) 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.(*DeleteMonitoringSubscriptionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distributions/{DistributionId}/monitoring-subscription") + 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 := awsRestxml_serializeOpHttpBindingsDeleteMonitoringSubscriptionInput(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 awsRestxml_serializeOpHttpBindingsDeleteMonitoringSubscriptionInput(v *DeleteMonitoringSubscriptionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DistributionId == nil || len(*v.DistributionId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DistributionId must not be empty")} + } + if v.DistributionId != nil { + if err := encoder.SetURI("DistributionId").String(*v.DistributionId); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpDeleteOriginAccessControl struct { +} + +func (*awsRestxml_serializeOpDeleteOriginAccessControl) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDeleteOriginAccessControl) 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.(*DeleteOriginAccessControlInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-access-control/{Id}") + 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 := awsRestxml_serializeOpHttpBindingsDeleteOriginAccessControlInput(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 awsRestxml_serializeOpHttpBindingsDeleteOriginAccessControlInput(v *DeleteOriginAccessControlInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + return nil +} + +type awsRestxml_serializeOpDeleteOriginRequestPolicy struct { +} + +func (*awsRestxml_serializeOpDeleteOriginRequestPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDeleteOriginRequestPolicy) 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.(*DeleteOriginRequestPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-request-policy/{Id}") + 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 := awsRestxml_serializeOpHttpBindingsDeleteOriginRequestPolicyInput(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 awsRestxml_serializeOpHttpBindingsDeleteOriginRequestPolicyInput(v *DeleteOriginRequestPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + return nil +} + +type awsRestxml_serializeOpDeletePublicKey struct { +} + +func (*awsRestxml_serializeOpDeletePublicKey) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDeletePublicKey) 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.(*DeletePublicKeyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/public-key/{Id}") + 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 := awsRestxml_serializeOpHttpBindingsDeletePublicKeyInput(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 awsRestxml_serializeOpHttpBindingsDeletePublicKeyInput(v *DeletePublicKeyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + return nil +} + +type awsRestxml_serializeOpDeleteRealtimeLogConfig struct { +} + +func (*awsRestxml_serializeOpDeleteRealtimeLogConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDeleteRealtimeLogConfig) 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.(*DeleteRealtimeLogConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/delete-realtime-log-config") + 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/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "DeleteRealtimeLogConfigRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeOpDocumentDeleteRealtimeLogConfigInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.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 awsRestxml_serializeOpHttpBindingsDeleteRealtimeLogConfigInput(v *DeleteRealtimeLogConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestxml_serializeOpDocumentDeleteRealtimeLogConfigInput(v *DeleteRealtimeLogConfigInput, value smithyxml.Value) error { + defer value.Close() + if v.ARN != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ARN", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.ARN) + } + if v.Name != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Name", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Name) + } + return nil +} + +type awsRestxml_serializeOpDeleteResponseHeadersPolicy struct { +} + +func (*awsRestxml_serializeOpDeleteResponseHeadersPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDeleteResponseHeadersPolicy) 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.(*DeleteResponseHeadersPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/response-headers-policy/{Id}") + 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 := awsRestxml_serializeOpHttpBindingsDeleteResponseHeadersPolicyInput(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 awsRestxml_serializeOpHttpBindingsDeleteResponseHeadersPolicyInput(v *DeleteResponseHeadersPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + return nil +} + +type awsRestxml_serializeOpDeleteStreamingDistribution struct { +} + +func (*awsRestxml_serializeOpDeleteStreamingDistribution) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDeleteStreamingDistribution) 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.(*DeleteStreamingDistributionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/streaming-distribution/{Id}") + 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 := awsRestxml_serializeOpHttpBindingsDeleteStreamingDistributionInput(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 awsRestxml_serializeOpHttpBindingsDeleteStreamingDistributionInput(v *DeleteStreamingDistributionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + return nil +} + +type awsRestxml_serializeOpDescribeFunction struct { +} + +func (*awsRestxml_serializeOpDescribeFunction) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDescribeFunction) 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.(*DescribeFunctionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/function/{Name}/describe") + 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 := awsRestxml_serializeOpHttpBindingsDescribeFunctionInput(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 awsRestxml_serializeOpHttpBindingsDescribeFunctionInput(v *DescribeFunctionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("Name").String(*v.Name); err != nil { + return err + } + } + + if len(v.Stage) > 0 { + encoder.SetQuery("Stage").String(string(v.Stage)) + } + + return nil +} + +type awsRestxml_serializeOpDescribeKeyValueStore struct { +} + +func (*awsRestxml_serializeOpDescribeKeyValueStore) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpDescribeKeyValueStore) 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.(*DescribeKeyValueStoreInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/key-value-store/{Name}") + 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 := awsRestxml_serializeOpHttpBindingsDescribeKeyValueStoreInput(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 awsRestxml_serializeOpHttpBindingsDescribeKeyValueStoreInput(v *DescribeKeyValueStoreInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("Name").String(*v.Name); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetCachePolicy struct { +} + +func (*awsRestxml_serializeOpGetCachePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetCachePolicy) 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.(*GetCachePolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/cache-policy/{Id}") + 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 := awsRestxml_serializeOpHttpBindingsGetCachePolicyInput(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 awsRestxml_serializeOpHttpBindingsGetCachePolicyInput(v *GetCachePolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetCachePolicyConfig struct { +} + +func (*awsRestxml_serializeOpGetCachePolicyConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetCachePolicyConfig) 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.(*GetCachePolicyConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/cache-policy/{Id}/config") + 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 := awsRestxml_serializeOpHttpBindingsGetCachePolicyConfigInput(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 awsRestxml_serializeOpHttpBindingsGetCachePolicyConfigInput(v *GetCachePolicyConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetCloudFrontOriginAccessIdentity struct { +} + +func (*awsRestxml_serializeOpGetCloudFrontOriginAccessIdentity) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetCloudFrontOriginAccessIdentity) 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.(*GetCloudFrontOriginAccessIdentityInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-access-identity/cloudfront/{Id}") + 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 := awsRestxml_serializeOpHttpBindingsGetCloudFrontOriginAccessIdentityInput(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 awsRestxml_serializeOpHttpBindingsGetCloudFrontOriginAccessIdentityInput(v *GetCloudFrontOriginAccessIdentityInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetCloudFrontOriginAccessIdentityConfig struct { +} + +func (*awsRestxml_serializeOpGetCloudFrontOriginAccessIdentityConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetCloudFrontOriginAccessIdentityConfig) 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.(*GetCloudFrontOriginAccessIdentityConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-access-identity/cloudfront/{Id}/config") + 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 := awsRestxml_serializeOpHttpBindingsGetCloudFrontOriginAccessIdentityConfigInput(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 awsRestxml_serializeOpHttpBindingsGetCloudFrontOriginAccessIdentityConfigInput(v *GetCloudFrontOriginAccessIdentityConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetContinuousDeploymentPolicy struct { +} + +func (*awsRestxml_serializeOpGetContinuousDeploymentPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetContinuousDeploymentPolicy) 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.(*GetContinuousDeploymentPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/continuous-deployment-policy/{Id}") + 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 := awsRestxml_serializeOpHttpBindingsGetContinuousDeploymentPolicyInput(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 awsRestxml_serializeOpHttpBindingsGetContinuousDeploymentPolicyInput(v *GetContinuousDeploymentPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetContinuousDeploymentPolicyConfig struct { +} + +func (*awsRestxml_serializeOpGetContinuousDeploymentPolicyConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetContinuousDeploymentPolicyConfig) 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.(*GetContinuousDeploymentPolicyConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/continuous-deployment-policy/{Id}/config") + 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 := awsRestxml_serializeOpHttpBindingsGetContinuousDeploymentPolicyConfigInput(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 awsRestxml_serializeOpHttpBindingsGetContinuousDeploymentPolicyConfigInput(v *GetContinuousDeploymentPolicyConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetDistribution struct { +} + +func (*awsRestxml_serializeOpGetDistribution) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetDistribution) 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.(*GetDistributionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distribution/{Id}") + 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 := awsRestxml_serializeOpHttpBindingsGetDistributionInput(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 awsRestxml_serializeOpHttpBindingsGetDistributionInput(v *GetDistributionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetDistributionConfig struct { +} + +func (*awsRestxml_serializeOpGetDistributionConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetDistributionConfig) 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.(*GetDistributionConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distribution/{Id}/config") + 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 := awsRestxml_serializeOpHttpBindingsGetDistributionConfigInput(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 awsRestxml_serializeOpHttpBindingsGetDistributionConfigInput(v *GetDistributionConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetFieldLevelEncryption struct { +} + +func (*awsRestxml_serializeOpGetFieldLevelEncryption) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetFieldLevelEncryption) 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.(*GetFieldLevelEncryptionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/field-level-encryption/{Id}") + 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 := awsRestxml_serializeOpHttpBindingsGetFieldLevelEncryptionInput(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 awsRestxml_serializeOpHttpBindingsGetFieldLevelEncryptionInput(v *GetFieldLevelEncryptionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetFieldLevelEncryptionConfig struct { +} + +func (*awsRestxml_serializeOpGetFieldLevelEncryptionConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetFieldLevelEncryptionConfig) 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.(*GetFieldLevelEncryptionConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/field-level-encryption/{Id}/config") + 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 := awsRestxml_serializeOpHttpBindingsGetFieldLevelEncryptionConfigInput(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 awsRestxml_serializeOpHttpBindingsGetFieldLevelEncryptionConfigInput(v *GetFieldLevelEncryptionConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetFieldLevelEncryptionProfile struct { +} + +func (*awsRestxml_serializeOpGetFieldLevelEncryptionProfile) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetFieldLevelEncryptionProfile) 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.(*GetFieldLevelEncryptionProfileInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/field-level-encryption-profile/{Id}") + 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 := awsRestxml_serializeOpHttpBindingsGetFieldLevelEncryptionProfileInput(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 awsRestxml_serializeOpHttpBindingsGetFieldLevelEncryptionProfileInput(v *GetFieldLevelEncryptionProfileInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetFieldLevelEncryptionProfileConfig struct { +} + +func (*awsRestxml_serializeOpGetFieldLevelEncryptionProfileConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetFieldLevelEncryptionProfileConfig) 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.(*GetFieldLevelEncryptionProfileConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/field-level-encryption-profile/{Id}/config") + 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 := awsRestxml_serializeOpHttpBindingsGetFieldLevelEncryptionProfileConfigInput(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 awsRestxml_serializeOpHttpBindingsGetFieldLevelEncryptionProfileConfigInput(v *GetFieldLevelEncryptionProfileConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetFunction struct { +} + +func (*awsRestxml_serializeOpGetFunction) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetFunction) 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.(*GetFunctionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/function/{Name}") + 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 := awsRestxml_serializeOpHttpBindingsGetFunctionInput(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 awsRestxml_serializeOpHttpBindingsGetFunctionInput(v *GetFunctionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("Name").String(*v.Name); err != nil { + return err + } + } + + if len(v.Stage) > 0 { + encoder.SetQuery("Stage").String(string(v.Stage)) + } + + return nil +} + +type awsRestxml_serializeOpGetInvalidation struct { +} + +func (*awsRestxml_serializeOpGetInvalidation) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetInvalidation) 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.(*GetInvalidationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distribution/{DistributionId}/invalidation/{Id}") + 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 := awsRestxml_serializeOpHttpBindingsGetInvalidationInput(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 awsRestxml_serializeOpHttpBindingsGetInvalidationInput(v *GetInvalidationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DistributionId == nil || len(*v.DistributionId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DistributionId must not be empty")} + } + if v.DistributionId != nil { + if err := encoder.SetURI("DistributionId").String(*v.DistributionId); err != nil { + return err + } + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetKeyGroup struct { +} + +func (*awsRestxml_serializeOpGetKeyGroup) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetKeyGroup) 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.(*GetKeyGroupInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/key-group/{Id}") + 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 := awsRestxml_serializeOpHttpBindingsGetKeyGroupInput(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 awsRestxml_serializeOpHttpBindingsGetKeyGroupInput(v *GetKeyGroupInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetKeyGroupConfig struct { +} + +func (*awsRestxml_serializeOpGetKeyGroupConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetKeyGroupConfig) 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.(*GetKeyGroupConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/key-group/{Id}/config") + 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 := awsRestxml_serializeOpHttpBindingsGetKeyGroupConfigInput(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 awsRestxml_serializeOpHttpBindingsGetKeyGroupConfigInput(v *GetKeyGroupConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetMonitoringSubscription struct { +} + +func (*awsRestxml_serializeOpGetMonitoringSubscription) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetMonitoringSubscription) 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.(*GetMonitoringSubscriptionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distributions/{DistributionId}/monitoring-subscription") + 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 := awsRestxml_serializeOpHttpBindingsGetMonitoringSubscriptionInput(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 awsRestxml_serializeOpHttpBindingsGetMonitoringSubscriptionInput(v *GetMonitoringSubscriptionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DistributionId == nil || len(*v.DistributionId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DistributionId must not be empty")} + } + if v.DistributionId != nil { + if err := encoder.SetURI("DistributionId").String(*v.DistributionId); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetOriginAccessControl struct { +} + +func (*awsRestxml_serializeOpGetOriginAccessControl) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetOriginAccessControl) 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.(*GetOriginAccessControlInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-access-control/{Id}") + 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 := awsRestxml_serializeOpHttpBindingsGetOriginAccessControlInput(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 awsRestxml_serializeOpHttpBindingsGetOriginAccessControlInput(v *GetOriginAccessControlInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetOriginAccessControlConfig struct { +} + +func (*awsRestxml_serializeOpGetOriginAccessControlConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetOriginAccessControlConfig) 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.(*GetOriginAccessControlConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-access-control/{Id}/config") + 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 := awsRestxml_serializeOpHttpBindingsGetOriginAccessControlConfigInput(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 awsRestxml_serializeOpHttpBindingsGetOriginAccessControlConfigInput(v *GetOriginAccessControlConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetOriginRequestPolicy struct { +} + +func (*awsRestxml_serializeOpGetOriginRequestPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetOriginRequestPolicy) 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.(*GetOriginRequestPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-request-policy/{Id}") + 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 := awsRestxml_serializeOpHttpBindingsGetOriginRequestPolicyInput(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 awsRestxml_serializeOpHttpBindingsGetOriginRequestPolicyInput(v *GetOriginRequestPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetOriginRequestPolicyConfig struct { +} + +func (*awsRestxml_serializeOpGetOriginRequestPolicyConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetOriginRequestPolicyConfig) 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.(*GetOriginRequestPolicyConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-request-policy/{Id}/config") + 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 := awsRestxml_serializeOpHttpBindingsGetOriginRequestPolicyConfigInput(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 awsRestxml_serializeOpHttpBindingsGetOriginRequestPolicyConfigInput(v *GetOriginRequestPolicyConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetPublicKey struct { +} + +func (*awsRestxml_serializeOpGetPublicKey) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetPublicKey) 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.(*GetPublicKeyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/public-key/{Id}") + 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 := awsRestxml_serializeOpHttpBindingsGetPublicKeyInput(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 awsRestxml_serializeOpHttpBindingsGetPublicKeyInput(v *GetPublicKeyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetPublicKeyConfig struct { +} + +func (*awsRestxml_serializeOpGetPublicKeyConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetPublicKeyConfig) 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.(*GetPublicKeyConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/public-key/{Id}/config") + 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 := awsRestxml_serializeOpHttpBindingsGetPublicKeyConfigInput(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 awsRestxml_serializeOpHttpBindingsGetPublicKeyConfigInput(v *GetPublicKeyConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetRealtimeLogConfig struct { +} + +func (*awsRestxml_serializeOpGetRealtimeLogConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetRealtimeLogConfig) 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.(*GetRealtimeLogConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/get-realtime-log-config") + 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/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "GetRealtimeLogConfigRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeOpDocumentGetRealtimeLogConfigInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.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 awsRestxml_serializeOpHttpBindingsGetRealtimeLogConfigInput(v *GetRealtimeLogConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestxml_serializeOpDocumentGetRealtimeLogConfigInput(v *GetRealtimeLogConfigInput, value smithyxml.Value) error { + defer value.Close() + if v.ARN != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ARN", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.ARN) + } + if v.Name != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Name", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Name) + } + return nil +} + +type awsRestxml_serializeOpGetResponseHeadersPolicy struct { +} + +func (*awsRestxml_serializeOpGetResponseHeadersPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetResponseHeadersPolicy) 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.(*GetResponseHeadersPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/response-headers-policy/{Id}") + 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 := awsRestxml_serializeOpHttpBindingsGetResponseHeadersPolicyInput(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 awsRestxml_serializeOpHttpBindingsGetResponseHeadersPolicyInput(v *GetResponseHeadersPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetResponseHeadersPolicyConfig struct { +} + +func (*awsRestxml_serializeOpGetResponseHeadersPolicyConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetResponseHeadersPolicyConfig) 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.(*GetResponseHeadersPolicyConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/response-headers-policy/{Id}/config") + 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 := awsRestxml_serializeOpHttpBindingsGetResponseHeadersPolicyConfigInput(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 awsRestxml_serializeOpHttpBindingsGetResponseHeadersPolicyConfigInput(v *GetResponseHeadersPolicyConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetStreamingDistribution struct { +} + +func (*awsRestxml_serializeOpGetStreamingDistribution) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetStreamingDistribution) 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.(*GetStreamingDistributionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/streaming-distribution/{Id}") + 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 := awsRestxml_serializeOpHttpBindingsGetStreamingDistributionInput(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 awsRestxml_serializeOpHttpBindingsGetStreamingDistributionInput(v *GetStreamingDistributionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpGetStreamingDistributionConfig struct { +} + +func (*awsRestxml_serializeOpGetStreamingDistributionConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpGetStreamingDistributionConfig) 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.(*GetStreamingDistributionConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/streaming-distribution/{Id}/config") + 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 := awsRestxml_serializeOpHttpBindingsGetStreamingDistributionConfigInput(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 awsRestxml_serializeOpHttpBindingsGetStreamingDistributionConfigInput(v *GetStreamingDistributionConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpListCachePolicies struct { +} + +func (*awsRestxml_serializeOpListCachePolicies) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListCachePolicies) 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.(*ListCachePoliciesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/cache-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 := awsRestxml_serializeOpHttpBindingsListCachePoliciesInput(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 awsRestxml_serializeOpHttpBindingsListCachePoliciesInput(v *ListCachePoliciesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + if len(v.Type) > 0 { + encoder.SetQuery("Type").String(string(v.Type)) + } + + return nil +} + +type awsRestxml_serializeOpListCloudFrontOriginAccessIdentities struct { +} + +func (*awsRestxml_serializeOpListCloudFrontOriginAccessIdentities) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListCloudFrontOriginAccessIdentities) 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.(*ListCloudFrontOriginAccessIdentitiesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-access-identity/cloudfront") + 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 := awsRestxml_serializeOpHttpBindingsListCloudFrontOriginAccessIdentitiesInput(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 awsRestxml_serializeOpHttpBindingsListCloudFrontOriginAccessIdentitiesInput(v *ListCloudFrontOriginAccessIdentitiesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + return nil +} + +type awsRestxml_serializeOpListConflictingAliases struct { +} + +func (*awsRestxml_serializeOpListConflictingAliases) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListConflictingAliases) 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.(*ListConflictingAliasesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/conflicting-alias") + 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 := awsRestxml_serializeOpHttpBindingsListConflictingAliasesInput(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 awsRestxml_serializeOpHttpBindingsListConflictingAliasesInput(v *ListConflictingAliasesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Alias != nil { + encoder.SetQuery("Alias").String(*v.Alias) + } + + if v.DistributionId != nil { + encoder.SetQuery("DistributionId").String(*v.DistributionId) + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + return nil +} + +type awsRestxml_serializeOpListContinuousDeploymentPolicies struct { +} + +func (*awsRestxml_serializeOpListContinuousDeploymentPolicies) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListContinuousDeploymentPolicies) 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.(*ListContinuousDeploymentPoliciesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/continuous-deployment-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 := awsRestxml_serializeOpHttpBindingsListContinuousDeploymentPoliciesInput(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 awsRestxml_serializeOpHttpBindingsListContinuousDeploymentPoliciesInput(v *ListContinuousDeploymentPoliciesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + return nil +} + +type awsRestxml_serializeOpListDistributions struct { +} + +func (*awsRestxml_serializeOpListDistributions) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListDistributions) 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.(*ListDistributionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distribution") + 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 := awsRestxml_serializeOpHttpBindingsListDistributionsInput(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 awsRestxml_serializeOpHttpBindingsListDistributionsInput(v *ListDistributionsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + return nil +} + +type awsRestxml_serializeOpListDistributionsByCachePolicyId struct { +} + +func (*awsRestxml_serializeOpListDistributionsByCachePolicyId) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListDistributionsByCachePolicyId) 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.(*ListDistributionsByCachePolicyIdInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distributionsByCachePolicyId/{CachePolicyId}") + 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 := awsRestxml_serializeOpHttpBindingsListDistributionsByCachePolicyIdInput(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 awsRestxml_serializeOpHttpBindingsListDistributionsByCachePolicyIdInput(v *ListDistributionsByCachePolicyIdInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.CachePolicyId == nil || len(*v.CachePolicyId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member CachePolicyId must not be empty")} + } + if v.CachePolicyId != nil { + if err := encoder.SetURI("CachePolicyId").String(*v.CachePolicyId); 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 awsRestxml_serializeOpListDistributionsByKeyGroup struct { +} + +func (*awsRestxml_serializeOpListDistributionsByKeyGroup) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListDistributionsByKeyGroup) 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.(*ListDistributionsByKeyGroupInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distributionsByKeyGroupId/{KeyGroupId}") + 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 := awsRestxml_serializeOpHttpBindingsListDistributionsByKeyGroupInput(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 awsRestxml_serializeOpHttpBindingsListDistributionsByKeyGroupInput(v *ListDistributionsByKeyGroupInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.KeyGroupId == nil || len(*v.KeyGroupId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member KeyGroupId must not be empty")} + } + if v.KeyGroupId != nil { + if err := encoder.SetURI("KeyGroupId").String(*v.KeyGroupId); 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 awsRestxml_serializeOpListDistributionsByOriginRequestPolicyId struct { +} + +func (*awsRestxml_serializeOpListDistributionsByOriginRequestPolicyId) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListDistributionsByOriginRequestPolicyId) 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.(*ListDistributionsByOriginRequestPolicyIdInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distributionsByOriginRequestPolicyId/{OriginRequestPolicyId}") + 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 := awsRestxml_serializeOpHttpBindingsListDistributionsByOriginRequestPolicyIdInput(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 awsRestxml_serializeOpHttpBindingsListDistributionsByOriginRequestPolicyIdInput(v *ListDistributionsByOriginRequestPolicyIdInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + if v.OriginRequestPolicyId == nil || len(*v.OriginRequestPolicyId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member OriginRequestPolicyId must not be empty")} + } + if v.OriginRequestPolicyId != nil { + if err := encoder.SetURI("OriginRequestPolicyId").String(*v.OriginRequestPolicyId); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpListDistributionsByRealtimeLogConfig struct { +} + +func (*awsRestxml_serializeOpListDistributionsByRealtimeLogConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListDistributionsByRealtimeLogConfig) 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.(*ListDistributionsByRealtimeLogConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distributionsByRealtimeLogConfig") + 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/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ListDistributionsByRealtimeLogConfigRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeOpDocumentListDistributionsByRealtimeLogConfigInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.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 awsRestxml_serializeOpHttpBindingsListDistributionsByRealtimeLogConfigInput(v *ListDistributionsByRealtimeLogConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestxml_serializeOpDocumentListDistributionsByRealtimeLogConfigInput(v *ListDistributionsByRealtimeLogConfigInput, value smithyxml.Value) error { + defer value.Close() + if v.Marker != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Marker", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Marker) + } + if v.MaxItems != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "MaxItems", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.MaxItems) + } + if v.RealtimeLogConfigArn != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "RealtimeLogConfigArn", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.RealtimeLogConfigArn) + } + if v.RealtimeLogConfigName != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "RealtimeLogConfigName", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.RealtimeLogConfigName) + } + return nil +} + +type awsRestxml_serializeOpListDistributionsByResponseHeadersPolicyId struct { +} + +func (*awsRestxml_serializeOpListDistributionsByResponseHeadersPolicyId) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListDistributionsByResponseHeadersPolicyId) 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.(*ListDistributionsByResponseHeadersPolicyIdInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distributionsByResponseHeadersPolicyId/{ResponseHeadersPolicyId}") + 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 := awsRestxml_serializeOpHttpBindingsListDistributionsByResponseHeadersPolicyIdInput(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 awsRestxml_serializeOpHttpBindingsListDistributionsByResponseHeadersPolicyIdInput(v *ListDistributionsByResponseHeadersPolicyIdInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + if v.ResponseHeadersPolicyId == nil || len(*v.ResponseHeadersPolicyId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResponseHeadersPolicyId must not be empty")} + } + if v.ResponseHeadersPolicyId != nil { + if err := encoder.SetURI("ResponseHeadersPolicyId").String(*v.ResponseHeadersPolicyId); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpListDistributionsByWebACLId struct { +} + +func (*awsRestxml_serializeOpListDistributionsByWebACLId) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListDistributionsByWebACLId) 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.(*ListDistributionsByWebACLIdInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distributionsByWebACLId/{WebACLId}") + 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 := awsRestxml_serializeOpHttpBindingsListDistributionsByWebACLIdInput(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 awsRestxml_serializeOpHttpBindingsListDistributionsByWebACLIdInput(v *ListDistributionsByWebACLIdInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + if v.WebACLId == nil || len(*v.WebACLId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member WebACLId must not be empty")} + } + if v.WebACLId != nil { + if err := encoder.SetURI("WebACLId").String(*v.WebACLId); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpListFieldLevelEncryptionConfigs struct { +} + +func (*awsRestxml_serializeOpListFieldLevelEncryptionConfigs) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListFieldLevelEncryptionConfigs) 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.(*ListFieldLevelEncryptionConfigsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/field-level-encryption") + 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 := awsRestxml_serializeOpHttpBindingsListFieldLevelEncryptionConfigsInput(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 awsRestxml_serializeOpHttpBindingsListFieldLevelEncryptionConfigsInput(v *ListFieldLevelEncryptionConfigsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + return nil +} + +type awsRestxml_serializeOpListFieldLevelEncryptionProfiles struct { +} + +func (*awsRestxml_serializeOpListFieldLevelEncryptionProfiles) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListFieldLevelEncryptionProfiles) 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.(*ListFieldLevelEncryptionProfilesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/field-level-encryption-profile") + 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 := awsRestxml_serializeOpHttpBindingsListFieldLevelEncryptionProfilesInput(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 awsRestxml_serializeOpHttpBindingsListFieldLevelEncryptionProfilesInput(v *ListFieldLevelEncryptionProfilesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + return nil +} + +type awsRestxml_serializeOpListFunctions struct { +} + +func (*awsRestxml_serializeOpListFunctions) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListFunctions) 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.(*ListFunctionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/function") + 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 := awsRestxml_serializeOpHttpBindingsListFunctionsInput(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 awsRestxml_serializeOpHttpBindingsListFunctionsInput(v *ListFunctionsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + if len(v.Stage) > 0 { + encoder.SetQuery("Stage").String(string(v.Stage)) + } + + return nil +} + +type awsRestxml_serializeOpListInvalidations struct { +} + +func (*awsRestxml_serializeOpListInvalidations) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListInvalidations) 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.(*ListInvalidationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distribution/{DistributionId}/invalidation") + 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 := awsRestxml_serializeOpHttpBindingsListInvalidationsInput(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 awsRestxml_serializeOpHttpBindingsListInvalidationsInput(v *ListInvalidationsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DistributionId == nil || len(*v.DistributionId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DistributionId must not be empty")} + } + if v.DistributionId != nil { + if err := encoder.SetURI("DistributionId").String(*v.DistributionId); 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 awsRestxml_serializeOpListKeyGroups struct { +} + +func (*awsRestxml_serializeOpListKeyGroups) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListKeyGroups) 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.(*ListKeyGroupsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/key-group") + 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 := awsRestxml_serializeOpHttpBindingsListKeyGroupsInput(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 awsRestxml_serializeOpHttpBindingsListKeyGroupsInput(v *ListKeyGroupsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + return nil +} + +type awsRestxml_serializeOpListKeyValueStores struct { +} + +func (*awsRestxml_serializeOpListKeyValueStores) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListKeyValueStores) 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.(*ListKeyValueStoresInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/key-value-store") + 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 := awsRestxml_serializeOpHttpBindingsListKeyValueStoresInput(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 awsRestxml_serializeOpHttpBindingsListKeyValueStoresInput(v *ListKeyValueStoresInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + if v.Status != nil { + encoder.SetQuery("Status").String(*v.Status) + } + + return nil +} + +type awsRestxml_serializeOpListOriginAccessControls struct { +} + +func (*awsRestxml_serializeOpListOriginAccessControls) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListOriginAccessControls) 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.(*ListOriginAccessControlsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-access-control") + 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 := awsRestxml_serializeOpHttpBindingsListOriginAccessControlsInput(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 awsRestxml_serializeOpHttpBindingsListOriginAccessControlsInput(v *ListOriginAccessControlsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + return nil +} + +type awsRestxml_serializeOpListOriginRequestPolicies struct { +} + +func (*awsRestxml_serializeOpListOriginRequestPolicies) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListOriginRequestPolicies) 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.(*ListOriginRequestPoliciesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-request-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 := awsRestxml_serializeOpHttpBindingsListOriginRequestPoliciesInput(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 awsRestxml_serializeOpHttpBindingsListOriginRequestPoliciesInput(v *ListOriginRequestPoliciesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + if len(v.Type) > 0 { + encoder.SetQuery("Type").String(string(v.Type)) + } + + return nil +} + +type awsRestxml_serializeOpListPublicKeys struct { +} + +func (*awsRestxml_serializeOpListPublicKeys) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListPublicKeys) 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.(*ListPublicKeysInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/public-key") + 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 := awsRestxml_serializeOpHttpBindingsListPublicKeysInput(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 awsRestxml_serializeOpHttpBindingsListPublicKeysInput(v *ListPublicKeysInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + return nil +} + +type awsRestxml_serializeOpListRealtimeLogConfigs struct { +} + +func (*awsRestxml_serializeOpListRealtimeLogConfigs) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListRealtimeLogConfigs) 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.(*ListRealtimeLogConfigsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/realtime-log-config") + 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 := awsRestxml_serializeOpHttpBindingsListRealtimeLogConfigsInput(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 awsRestxml_serializeOpHttpBindingsListRealtimeLogConfigsInput(v *ListRealtimeLogConfigsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + return nil +} + +type awsRestxml_serializeOpListResponseHeadersPolicies struct { +} + +func (*awsRestxml_serializeOpListResponseHeadersPolicies) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListResponseHeadersPolicies) 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.(*ListResponseHeadersPoliciesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/response-headers-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 := awsRestxml_serializeOpHttpBindingsListResponseHeadersPoliciesInput(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 awsRestxml_serializeOpHttpBindingsListResponseHeadersPoliciesInput(v *ListResponseHeadersPoliciesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + if len(v.Type) > 0 { + encoder.SetQuery("Type").String(string(v.Type)) + } + + return nil +} + +type awsRestxml_serializeOpListStreamingDistributions struct { +} + +func (*awsRestxml_serializeOpListStreamingDistributions) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpListStreamingDistributions) 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.(*ListStreamingDistributionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/streaming-distribution") + 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 := awsRestxml_serializeOpHttpBindingsListStreamingDistributionsInput(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 awsRestxml_serializeOpHttpBindingsListStreamingDistributionsInput(v *ListStreamingDistributionsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + return nil +} + +type awsRestxml_serializeOpListTagsForResource struct { +} + +func (*awsRestxml_serializeOpListTagsForResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_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("/2020-05-31/tagging") + 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 := awsRestxml_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 awsRestxml_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Resource != nil { + encoder.SetQuery("Resource").String(*v.Resource) + } + + return nil +} + +type awsRestxml_serializeOpPublishFunction struct { +} + +func (*awsRestxml_serializeOpPublishFunction) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpPublishFunction) 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.(*PublishFunctionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/function/{Name}/publish") + 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 := awsRestxml_serializeOpHttpBindingsPublishFunctionInput(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 awsRestxml_serializeOpHttpBindingsPublishFunctionInput(v *PublishFunctionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("Name").String(*v.Name); err != nil { + return err + } + } + + return nil +} + +type awsRestxml_serializeOpTagResource struct { +} + +func (*awsRestxml_serializeOpTagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_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("/2020-05-31/tagging?Operation=Tag") + 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 := awsRestxml_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if input.Tags != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Tags", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentTags(input.Tags, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); 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 awsRestxml_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Resource != nil { + encoder.SetQuery("Resource").String(*v.Resource) + } + + return nil +} + +type awsRestxml_serializeOpTestFunction struct { +} + +func (*awsRestxml_serializeOpTestFunction) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpTestFunction) 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.(*TestFunctionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/function/{Name}/test") + 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 := awsRestxml_serializeOpHttpBindingsTestFunctionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "TestFunctionRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeOpDocumentTestFunctionInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.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 awsRestxml_serializeOpHttpBindingsTestFunctionInput(v *TestFunctionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("Name").String(*v.Name); err != nil { + return err + } + } + + return nil +} + +func awsRestxml_serializeOpDocumentTestFunctionInput(v *TestFunctionInput, value smithyxml.Value) error { + defer value.Close() + if v.EventObject != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "EventObject", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Base64EncodeBytes(v.EventObject) + } + if len(v.Stage) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Stage", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.Stage)) + } + return nil +} + +type awsRestxml_serializeOpUntagResource struct { +} + +func (*awsRestxml_serializeOpUntagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_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("/2020-05-31/tagging?Operation=Untag") + 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 := awsRestxml_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if input.TagKeys != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "TagKeys", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentTagKeys(input.TagKeys, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); 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 awsRestxml_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Resource != nil { + encoder.SetQuery("Resource").String(*v.Resource) + } + + return nil +} + +type awsRestxml_serializeOpUpdateCachePolicy struct { +} + +func (*awsRestxml_serializeOpUpdateCachePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpUpdateCachePolicy) 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.(*UpdateCachePolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/cache-policy/{Id}") + 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 := awsRestxml_serializeOpHttpBindingsUpdateCachePolicyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if input.CachePolicyConfig != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CachePolicyConfig", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentCachePolicyConfig(input.CachePolicyConfig, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); 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 awsRestxml_serializeOpHttpBindingsUpdateCachePolicyInput(v *UpdateCachePolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + return nil +} + +type awsRestxml_serializeOpUpdateCloudFrontOriginAccessIdentity struct { +} + +func (*awsRestxml_serializeOpUpdateCloudFrontOriginAccessIdentity) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpUpdateCloudFrontOriginAccessIdentity) 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.(*UpdateCloudFrontOriginAccessIdentityInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-access-identity/cloudfront/{Id}/config") + 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 := awsRestxml_serializeOpHttpBindingsUpdateCloudFrontOriginAccessIdentityInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if input.CloudFrontOriginAccessIdentityConfig != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CloudFrontOriginAccessIdentityConfig", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentCloudFrontOriginAccessIdentityConfig(input.CloudFrontOriginAccessIdentityConfig, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); 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 awsRestxml_serializeOpHttpBindingsUpdateCloudFrontOriginAccessIdentityInput(v *UpdateCloudFrontOriginAccessIdentityInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + return nil +} + +type awsRestxml_serializeOpUpdateContinuousDeploymentPolicy struct { +} + +func (*awsRestxml_serializeOpUpdateContinuousDeploymentPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpUpdateContinuousDeploymentPolicy) 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.(*UpdateContinuousDeploymentPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/continuous-deployment-policy/{Id}") + 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 := awsRestxml_serializeOpHttpBindingsUpdateContinuousDeploymentPolicyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if input.ContinuousDeploymentPolicyConfig != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ContinuousDeploymentPolicyConfig", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentContinuousDeploymentPolicyConfig(input.ContinuousDeploymentPolicyConfig, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); 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 awsRestxml_serializeOpHttpBindingsUpdateContinuousDeploymentPolicyInput(v *UpdateContinuousDeploymentPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + return nil +} + +type awsRestxml_serializeOpUpdateDistribution struct { +} + +func (*awsRestxml_serializeOpUpdateDistribution) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpUpdateDistribution) 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.(*UpdateDistributionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distribution/{Id}/config") + 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 := awsRestxml_serializeOpHttpBindingsUpdateDistributionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if input.DistributionConfig != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "DistributionConfig", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentDistributionConfig(input.DistributionConfig, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); 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 awsRestxml_serializeOpHttpBindingsUpdateDistributionInput(v *UpdateDistributionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + return nil +} + +type awsRestxml_serializeOpUpdateDistributionWithStagingConfig struct { +} + +func (*awsRestxml_serializeOpUpdateDistributionWithStagingConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpUpdateDistributionWithStagingConfig) 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.(*UpdateDistributionWithStagingConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/distribution/{Id}/promote-staging-config") + 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 := awsRestxml_serializeOpHttpBindingsUpdateDistributionWithStagingConfigInput(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 awsRestxml_serializeOpHttpBindingsUpdateDistributionWithStagingConfigInput(v *UpdateDistributionWithStagingConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + if v.StagingDistributionId != nil { + encoder.SetQuery("StagingDistributionId").String(*v.StagingDistributionId) + } + + return nil +} + +type awsRestxml_serializeOpUpdateFieldLevelEncryptionConfig struct { +} + +func (*awsRestxml_serializeOpUpdateFieldLevelEncryptionConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpUpdateFieldLevelEncryptionConfig) 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.(*UpdateFieldLevelEncryptionConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/field-level-encryption/{Id}/config") + 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 := awsRestxml_serializeOpHttpBindingsUpdateFieldLevelEncryptionConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if input.FieldLevelEncryptionConfig != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "FieldLevelEncryptionConfig", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentFieldLevelEncryptionConfig(input.FieldLevelEncryptionConfig, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); 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 awsRestxml_serializeOpHttpBindingsUpdateFieldLevelEncryptionConfigInput(v *UpdateFieldLevelEncryptionConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + return nil +} + +type awsRestxml_serializeOpUpdateFieldLevelEncryptionProfile struct { +} + +func (*awsRestxml_serializeOpUpdateFieldLevelEncryptionProfile) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpUpdateFieldLevelEncryptionProfile) 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.(*UpdateFieldLevelEncryptionProfileInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/field-level-encryption-profile/{Id}/config") + 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 := awsRestxml_serializeOpHttpBindingsUpdateFieldLevelEncryptionProfileInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if input.FieldLevelEncryptionProfileConfig != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "FieldLevelEncryptionProfileConfig", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentFieldLevelEncryptionProfileConfig(input.FieldLevelEncryptionProfileConfig, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); 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 awsRestxml_serializeOpHttpBindingsUpdateFieldLevelEncryptionProfileInput(v *UpdateFieldLevelEncryptionProfileInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + return nil +} + +type awsRestxml_serializeOpUpdateFunction struct { +} + +func (*awsRestxml_serializeOpUpdateFunction) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpUpdateFunction) 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.(*UpdateFunctionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/function/{Name}") + 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 := awsRestxml_serializeOpHttpBindingsUpdateFunctionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "UpdateFunctionRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeOpDocumentUpdateFunctionInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.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 awsRestxml_serializeOpHttpBindingsUpdateFunctionInput(v *UpdateFunctionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("Name").String(*v.Name); err != nil { + return err + } + } + + return nil +} + +func awsRestxml_serializeOpDocumentUpdateFunctionInput(v *UpdateFunctionInput, value smithyxml.Value) error { + defer value.Close() + if v.FunctionCode != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "FunctionCode", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Base64EncodeBytes(v.FunctionCode) + } + if v.FunctionConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "FunctionConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentFunctionConfig(v.FunctionConfig, el); err != nil { + return err + } + } + return nil +} + +type awsRestxml_serializeOpUpdateKeyGroup struct { +} + +func (*awsRestxml_serializeOpUpdateKeyGroup) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpUpdateKeyGroup) 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.(*UpdateKeyGroupInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/key-group/{Id}") + 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 := awsRestxml_serializeOpHttpBindingsUpdateKeyGroupInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if input.KeyGroupConfig != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "KeyGroupConfig", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentKeyGroupConfig(input.KeyGroupConfig, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); 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 awsRestxml_serializeOpHttpBindingsUpdateKeyGroupInput(v *UpdateKeyGroupInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + return nil +} + +type awsRestxml_serializeOpUpdateKeyValueStore struct { +} + +func (*awsRestxml_serializeOpUpdateKeyValueStore) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpUpdateKeyValueStore) 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.(*UpdateKeyValueStoreInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/key-value-store/{Name}") + 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 := awsRestxml_serializeOpHttpBindingsUpdateKeyValueStoreInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "UpdateKeyValueStoreRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeOpDocumentUpdateKeyValueStoreInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.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 awsRestxml_serializeOpHttpBindingsUpdateKeyValueStoreInput(v *UpdateKeyValueStoreInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("Name").String(*v.Name); err != nil { + return err + } + } + + return nil +} + +func awsRestxml_serializeOpDocumentUpdateKeyValueStoreInput(v *UpdateKeyValueStoreInput, value smithyxml.Value) error { + defer value.Close() + if v.Comment != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Comment", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Comment) + } + return nil +} + +type awsRestxml_serializeOpUpdateOriginAccessControl struct { +} + +func (*awsRestxml_serializeOpUpdateOriginAccessControl) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpUpdateOriginAccessControl) 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.(*UpdateOriginAccessControlInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-access-control/{Id}/config") + 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 := awsRestxml_serializeOpHttpBindingsUpdateOriginAccessControlInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if input.OriginAccessControlConfig != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "OriginAccessControlConfig", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentOriginAccessControlConfig(input.OriginAccessControlConfig, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); 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 awsRestxml_serializeOpHttpBindingsUpdateOriginAccessControlInput(v *UpdateOriginAccessControlInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + return nil +} + +type awsRestxml_serializeOpUpdateOriginRequestPolicy struct { +} + +func (*awsRestxml_serializeOpUpdateOriginRequestPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpUpdateOriginRequestPolicy) 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.(*UpdateOriginRequestPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/origin-request-policy/{Id}") + 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 := awsRestxml_serializeOpHttpBindingsUpdateOriginRequestPolicyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if input.OriginRequestPolicyConfig != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "OriginRequestPolicyConfig", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentOriginRequestPolicyConfig(input.OriginRequestPolicyConfig, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); 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 awsRestxml_serializeOpHttpBindingsUpdateOriginRequestPolicyInput(v *UpdateOriginRequestPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + return nil +} + +type awsRestxml_serializeOpUpdatePublicKey struct { +} + +func (*awsRestxml_serializeOpUpdatePublicKey) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpUpdatePublicKey) 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.(*UpdatePublicKeyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/public-key/{Id}/config") + 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 := awsRestxml_serializeOpHttpBindingsUpdatePublicKeyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if input.PublicKeyConfig != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "PublicKeyConfig", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentPublicKeyConfig(input.PublicKeyConfig, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); 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 awsRestxml_serializeOpHttpBindingsUpdatePublicKeyInput(v *UpdatePublicKeyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + return nil +} + +type awsRestxml_serializeOpUpdateRealtimeLogConfig struct { +} + +func (*awsRestxml_serializeOpUpdateRealtimeLogConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpUpdateRealtimeLogConfig) 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.(*UpdateRealtimeLogConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/realtime-log-config") + 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/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "UpdateRealtimeLogConfigRequest", + }, + Attr: rootAttr, + } + root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeOpDocumentUpdateRealtimeLogConfigInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.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 awsRestxml_serializeOpHttpBindingsUpdateRealtimeLogConfigInput(v *UpdateRealtimeLogConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestxml_serializeOpDocumentUpdateRealtimeLogConfigInput(v *UpdateRealtimeLogConfigInput, value smithyxml.Value) error { + defer value.Close() + if v.ARN != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ARN", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.ARN) + } + if v.EndPoints != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "EndPoints", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentEndPointList(v.EndPoints, el); err != nil { + return err + } + } + if v.Fields != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Fields", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentFieldList(v.Fields, el); err != nil { + return err + } + } + if v.Name != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Name", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Name) + } + if v.SamplingRate != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "SamplingRate", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Long(*v.SamplingRate) + } + return nil +} + +type awsRestxml_serializeOpUpdateResponseHeadersPolicy struct { +} + +func (*awsRestxml_serializeOpUpdateResponseHeadersPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpUpdateResponseHeadersPolicy) 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.(*UpdateResponseHeadersPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/response-headers-policy/{Id}") + 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 := awsRestxml_serializeOpHttpBindingsUpdateResponseHeadersPolicyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if input.ResponseHeadersPolicyConfig != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ResponseHeadersPolicyConfig", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentResponseHeadersPolicyConfig(input.ResponseHeadersPolicyConfig, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); 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 awsRestxml_serializeOpHttpBindingsUpdateResponseHeadersPolicyInput(v *UpdateResponseHeadersPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + return nil +} + +type awsRestxml_serializeOpUpdateStreamingDistribution struct { +} + +func (*awsRestxml_serializeOpUpdateStreamingDistribution) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpUpdateStreamingDistribution) 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.(*UpdateStreamingDistributionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-05-31/streaming-distribution/{Id}/config") + 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 := awsRestxml_serializeOpHttpBindingsUpdateStreamingDistributionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if input.StreamingDistributionConfig != nil { + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/xml") + } + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + payloadRootAttr := []smithyxml.Attr{} + payloadRoot := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "StreamingDistributionConfig", + }, + Attr: payloadRootAttr, + } + payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute("", "http://cloudfront.amazonaws.com/doc/2020-05-31/")) + if err := awsRestxml_serializeDocumentStreamingDistributionConfig(input.StreamingDistributionConfig, xmlEncoder.RootElement(payloadRoot)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(xmlEncoder.Bytes()) + if request, err = request.SetStream(payload); 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 awsRestxml_serializeOpHttpBindingsUpdateStreamingDistributionInput(v *UpdateStreamingDistributionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("Id").String(*v.Id); err != nil { + return err + } + } + + if v.IfMatch != nil { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + return nil +} + +func awsRestxml_serializeDocumentAccessControlAllowHeadersList(v []string, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Header", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + am.String(v[i]) + } + return nil +} + +func awsRestxml_serializeDocumentAccessControlAllowMethodsList(v []types.ResponseHeadersPolicyAccessControlAllowMethodsValues, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Method", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + am.String(string(v[i])) + } + return nil +} + +func awsRestxml_serializeDocumentAccessControlAllowOriginsList(v []string, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Origin", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + am.String(v[i]) + } + return nil +} + +func awsRestxml_serializeDocumentAccessControlExposeHeadersList(v []string, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Header", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + am.String(v[i]) + } + return nil +} + +func awsRestxml_serializeDocumentAliases(v *types.Aliases, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentAliasList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentAliasList(v []string, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CNAME", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + am.String(v[i]) + } + return nil +} + +func awsRestxml_serializeDocumentAllowedMethods(v *types.AllowedMethods, value smithyxml.Value) error { + defer value.Close() + if v.CachedMethods != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CachedMethods", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentCachedMethods(v.CachedMethods, el); err != nil { + return err + } + } + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentMethodsList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentAwsAccountNumberList(v []string, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "AwsAccountNumber", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + am.String(v[i]) + } + return nil +} + +func awsRestxml_serializeDocumentCacheBehavior(v *types.CacheBehavior, value smithyxml.Value) error { + defer value.Close() + if v.AllowedMethods != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "AllowedMethods", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentAllowedMethods(v.AllowedMethods, el); err != nil { + return err + } + } + if v.CachePolicyId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CachePolicyId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.CachePolicyId) + } + if v.Compress != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Compress", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.Compress) + } + if v.DefaultTTL != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "DefaultTTL", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Long(*v.DefaultTTL) + } + if v.FieldLevelEncryptionId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "FieldLevelEncryptionId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.FieldLevelEncryptionId) + } + if v.ForwardedValues != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ForwardedValues", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentForwardedValues(v.ForwardedValues, el); err != nil { + return err + } + } + if v.FunctionAssociations != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "FunctionAssociations", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentFunctionAssociations(v.FunctionAssociations, el); err != nil { + return err + } + } + if v.LambdaFunctionAssociations != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "LambdaFunctionAssociations", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentLambdaFunctionAssociations(v.LambdaFunctionAssociations, el); err != nil { + return err + } + } + if v.MaxTTL != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "MaxTTL", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Long(*v.MaxTTL) + } + if v.MinTTL != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "MinTTL", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Long(*v.MinTTL) + } + if v.OriginRequestPolicyId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "OriginRequestPolicyId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.OriginRequestPolicyId) + } + if v.PathPattern != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "PathPattern", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.PathPattern) + } + if v.RealtimeLogConfigArn != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "RealtimeLogConfigArn", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.RealtimeLogConfigArn) + } + if v.ResponseHeadersPolicyId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ResponseHeadersPolicyId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.ResponseHeadersPolicyId) + } + if v.SmoothStreaming != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "SmoothStreaming", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.SmoothStreaming) + } + if v.TargetOriginId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "TargetOriginId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.TargetOriginId) + } + if v.TrustedKeyGroups != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "TrustedKeyGroups", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentTrustedKeyGroups(v.TrustedKeyGroups, el); err != nil { + return err + } + } + if v.TrustedSigners != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "TrustedSigners", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentTrustedSigners(v.TrustedSigners, el); err != nil { + return err + } + } + if len(v.ViewerProtocolPolicy) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ViewerProtocolPolicy", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.ViewerProtocolPolicy)) + } + return nil +} + +func awsRestxml_serializeDocumentCacheBehaviorList(v []types.CacheBehavior, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CacheBehavior", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + if err := awsRestxml_serializeDocumentCacheBehavior(&v[i], am); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentCacheBehaviors(v *types.CacheBehaviors, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentCacheBehaviorList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentCachedMethods(v *types.CachedMethods, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentMethodsList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentCachePolicyConfig(v *types.CachePolicyConfig, value smithyxml.Value) error { + defer value.Close() + if v.Comment != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Comment", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Comment) + } + if v.DefaultTTL != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "DefaultTTL", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Long(*v.DefaultTTL) + } + if v.MaxTTL != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "MaxTTL", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Long(*v.MaxTTL) + } + if v.MinTTL != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "MinTTL", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Long(*v.MinTTL) + } + if v.Name != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Name", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Name) + } + if v.ParametersInCacheKeyAndForwardedToOrigin != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ParametersInCacheKeyAndForwardedToOrigin", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentParametersInCacheKeyAndForwardedToOrigin(v.ParametersInCacheKeyAndForwardedToOrigin, el); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentCachePolicyCookiesConfig(v *types.CachePolicyCookiesConfig, value smithyxml.Value) error { + defer value.Close() + if len(v.CookieBehavior) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CookieBehavior", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.CookieBehavior)) + } + if v.Cookies != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Cookies", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentCookieNames(v.Cookies, el); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentCachePolicyHeadersConfig(v *types.CachePolicyHeadersConfig, value smithyxml.Value) error { + defer value.Close() + if len(v.HeaderBehavior) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "HeaderBehavior", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.HeaderBehavior)) + } + if v.Headers != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Headers", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentHeaders(v.Headers, el); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentCachePolicyQueryStringsConfig(v *types.CachePolicyQueryStringsConfig, value smithyxml.Value) error { + defer value.Close() + if len(v.QueryStringBehavior) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "QueryStringBehavior", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.QueryStringBehavior)) + } + if v.QueryStrings != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "QueryStrings", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentQueryStringNames(v.QueryStrings, el); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentCloudFrontOriginAccessIdentityConfig(v *types.CloudFrontOriginAccessIdentityConfig, value smithyxml.Value) error { + defer value.Close() + if v.CallerReference != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CallerReference", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.CallerReference) + } + if v.Comment != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Comment", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Comment) + } + return nil +} + +func awsRestxml_serializeDocumentContentTypeProfile(v *types.ContentTypeProfile, value smithyxml.Value) error { + defer value.Close() + if v.ContentType != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ContentType", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.ContentType) + } + if len(v.Format) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Format", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.Format)) + } + if v.ProfileId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ProfileId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.ProfileId) + } + return nil +} + +func awsRestxml_serializeDocumentContentTypeProfileConfig(v *types.ContentTypeProfileConfig, value smithyxml.Value) error { + defer value.Close() + if v.ContentTypeProfiles != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ContentTypeProfiles", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentContentTypeProfiles(v.ContentTypeProfiles, el); err != nil { + return err + } + } + if v.ForwardWhenContentTypeIsUnknown != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ForwardWhenContentTypeIsUnknown", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.ForwardWhenContentTypeIsUnknown) + } + return nil +} + +func awsRestxml_serializeDocumentContentTypeProfileList(v []types.ContentTypeProfile, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ContentTypeProfile", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + if err := awsRestxml_serializeDocumentContentTypeProfile(&v[i], am); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentContentTypeProfiles(v *types.ContentTypeProfiles, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentContentTypeProfileList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentContinuousDeploymentPolicyConfig(v *types.ContinuousDeploymentPolicyConfig, value smithyxml.Value) error { + defer value.Close() + if v.Enabled != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Enabled", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.Enabled) + } + if v.StagingDistributionDnsNames != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "StagingDistributionDnsNames", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentStagingDistributionDnsNames(v.StagingDistributionDnsNames, el); err != nil { + return err + } + } + if v.TrafficConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "TrafficConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentTrafficConfig(v.TrafficConfig, el); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentContinuousDeploymentSingleHeaderConfig(v *types.ContinuousDeploymentSingleHeaderConfig, value smithyxml.Value) error { + defer value.Close() + if v.Header != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Header", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Header) + } + if v.Value != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Value", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Value) + } + return nil +} + +func awsRestxml_serializeDocumentContinuousDeploymentSingleWeightConfig(v *types.ContinuousDeploymentSingleWeightConfig, value smithyxml.Value) error { + defer value.Close() + if v.SessionStickinessConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "SessionStickinessConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentSessionStickinessConfig(v.SessionStickinessConfig, el); err != nil { + return err + } + } + if v.Weight != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Weight", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + switch { + case math.IsNaN(float64(*v.Weight)): + el.String("NaN") + + case math.IsInf(float64(*v.Weight), 1): + el.String("Infinity") + + case math.IsInf(float64(*v.Weight), -1): + el.String("-Infinity") + + default: + el.Float(*v.Weight) + + } + } + return nil +} + +func awsRestxml_serializeDocumentCookieNameList(v []string, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Name", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + am.String(v[i]) + } + return nil +} + +func awsRestxml_serializeDocumentCookieNames(v *types.CookieNames, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentCookieNameList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentCookiePreference(v *types.CookiePreference, value smithyxml.Value) error { + defer value.Close() + if len(v.Forward) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Forward", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.Forward)) + } + if v.WhitelistedNames != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "WhitelistedNames", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentCookieNames(v.WhitelistedNames, el); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentCustomErrorResponse(v *types.CustomErrorResponse, value smithyxml.Value) error { + defer value.Close() + if v.ErrorCachingMinTTL != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ErrorCachingMinTTL", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Long(*v.ErrorCachingMinTTL) + } + if v.ErrorCode != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ErrorCode", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.ErrorCode) + } + if v.ResponseCode != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ResponseCode", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.ResponseCode) + } + if v.ResponsePagePath != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ResponsePagePath", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.ResponsePagePath) + } + return nil +} + +func awsRestxml_serializeDocumentCustomErrorResponseList(v []types.CustomErrorResponse, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CustomErrorResponse", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + if err := awsRestxml_serializeDocumentCustomErrorResponse(&v[i], am); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentCustomErrorResponses(v *types.CustomErrorResponses, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentCustomErrorResponseList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentCustomHeaders(v *types.CustomHeaders, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentOriginCustomHeadersList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentCustomOriginConfig(v *types.CustomOriginConfig, value smithyxml.Value) error { + defer value.Close() + if v.HTTPPort != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "HTTPPort", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.HTTPPort) + } + if v.HTTPSPort != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "HTTPSPort", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.HTTPSPort) + } + if v.OriginKeepaliveTimeout != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "OriginKeepaliveTimeout", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.OriginKeepaliveTimeout) + } + if len(v.OriginProtocolPolicy) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "OriginProtocolPolicy", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.OriginProtocolPolicy)) + } + if v.OriginReadTimeout != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "OriginReadTimeout", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.OriginReadTimeout) + } + if v.OriginSslProtocols != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "OriginSslProtocols", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentOriginSslProtocols(v.OriginSslProtocols, el); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentDefaultCacheBehavior(v *types.DefaultCacheBehavior, value smithyxml.Value) error { + defer value.Close() + if v.AllowedMethods != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "AllowedMethods", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentAllowedMethods(v.AllowedMethods, el); err != nil { + return err + } + } + if v.CachePolicyId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CachePolicyId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.CachePolicyId) + } + if v.Compress != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Compress", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.Compress) + } + if v.DefaultTTL != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "DefaultTTL", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Long(*v.DefaultTTL) + } + if v.FieldLevelEncryptionId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "FieldLevelEncryptionId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.FieldLevelEncryptionId) + } + if v.ForwardedValues != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ForwardedValues", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentForwardedValues(v.ForwardedValues, el); err != nil { + return err + } + } + if v.FunctionAssociations != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "FunctionAssociations", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentFunctionAssociations(v.FunctionAssociations, el); err != nil { + return err + } + } + if v.LambdaFunctionAssociations != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "LambdaFunctionAssociations", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentLambdaFunctionAssociations(v.LambdaFunctionAssociations, el); err != nil { + return err + } + } + if v.MaxTTL != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "MaxTTL", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Long(*v.MaxTTL) + } + if v.MinTTL != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "MinTTL", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Long(*v.MinTTL) + } + if v.OriginRequestPolicyId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "OriginRequestPolicyId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.OriginRequestPolicyId) + } + if v.RealtimeLogConfigArn != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "RealtimeLogConfigArn", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.RealtimeLogConfigArn) + } + if v.ResponseHeadersPolicyId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ResponseHeadersPolicyId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.ResponseHeadersPolicyId) + } + if v.SmoothStreaming != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "SmoothStreaming", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.SmoothStreaming) + } + if v.TargetOriginId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "TargetOriginId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.TargetOriginId) + } + if v.TrustedKeyGroups != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "TrustedKeyGroups", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentTrustedKeyGroups(v.TrustedKeyGroups, el); err != nil { + return err + } + } + if v.TrustedSigners != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "TrustedSigners", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentTrustedSigners(v.TrustedSigners, el); err != nil { + return err + } + } + if len(v.ViewerProtocolPolicy) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ViewerProtocolPolicy", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.ViewerProtocolPolicy)) + } + return nil +} + +func awsRestxml_serializeDocumentDistributionConfig(v *types.DistributionConfig, value smithyxml.Value) error { + defer value.Close() + if v.Aliases != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Aliases", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentAliases(v.Aliases, el); err != nil { + return err + } + } + if v.CacheBehaviors != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CacheBehaviors", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentCacheBehaviors(v.CacheBehaviors, el); err != nil { + return err + } + } + if v.CallerReference != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CallerReference", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.CallerReference) + } + if v.Comment != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Comment", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Comment) + } + if v.ContinuousDeploymentPolicyId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ContinuousDeploymentPolicyId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.ContinuousDeploymentPolicyId) + } + if v.CustomErrorResponses != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CustomErrorResponses", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentCustomErrorResponses(v.CustomErrorResponses, el); err != nil { + return err + } + } + if v.DefaultCacheBehavior != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "DefaultCacheBehavior", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentDefaultCacheBehavior(v.DefaultCacheBehavior, el); err != nil { + return err + } + } + if v.DefaultRootObject != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "DefaultRootObject", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.DefaultRootObject) + } + if v.Enabled != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Enabled", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.Enabled) + } + if len(v.HttpVersion) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "HttpVersion", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.HttpVersion)) + } + if v.IsIPV6Enabled != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "IsIPV6Enabled", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.IsIPV6Enabled) + } + if v.Logging != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Logging", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentLoggingConfig(v.Logging, el); err != nil { + return err + } + } + if v.OriginGroups != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "OriginGroups", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentOriginGroups(v.OriginGroups, el); err != nil { + return err + } + } + if v.Origins != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Origins", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentOrigins(v.Origins, el); err != nil { + return err + } + } + if len(v.PriceClass) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "PriceClass", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.PriceClass)) + } + if v.Restrictions != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Restrictions", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentRestrictions(v.Restrictions, el); err != nil { + return err + } + } + if v.Staging != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Staging", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.Staging) + } + if v.ViewerCertificate != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ViewerCertificate", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentViewerCertificate(v.ViewerCertificate, el); err != nil { + return err + } + } + if v.WebACLId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "WebACLId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.WebACLId) + } + return nil +} + +func awsRestxml_serializeDocumentDistributionConfigWithTags(v *types.DistributionConfigWithTags, value smithyxml.Value) error { + defer value.Close() + if v.DistributionConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "DistributionConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentDistributionConfig(v.DistributionConfig, el); err != nil { + return err + } + } + if v.Tags != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Tags", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentTags(v.Tags, el); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentEncryptionEntities(v *types.EncryptionEntities, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentEncryptionEntityList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentEncryptionEntity(v *types.EncryptionEntity, value smithyxml.Value) error { + defer value.Close() + if v.FieldPatterns != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "FieldPatterns", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentFieldPatterns(v.FieldPatterns, el); err != nil { + return err + } + } + if v.ProviderId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ProviderId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.ProviderId) + } + if v.PublicKeyId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "PublicKeyId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.PublicKeyId) + } + return nil +} + +func awsRestxml_serializeDocumentEncryptionEntityList(v []types.EncryptionEntity, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "EncryptionEntity", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + if err := awsRestxml_serializeDocumentEncryptionEntity(&v[i], am); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentEndPoint(v *types.EndPoint, value smithyxml.Value) error { + defer value.Close() + if v.KinesisStreamConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "KinesisStreamConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentKinesisStreamConfig(v.KinesisStreamConfig, el); err != nil { + return err + } + } + if v.StreamType != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "StreamType", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.StreamType) + } + return nil +} + +func awsRestxml_serializeDocumentEndPointList(v []types.EndPoint, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + array = value.Array() + for i := range v { + am := array.Member() + if err := awsRestxml_serializeDocumentEndPoint(&v[i], am); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentFieldLevelEncryptionConfig(v *types.FieldLevelEncryptionConfig, value smithyxml.Value) error { + defer value.Close() + if v.CallerReference != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CallerReference", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.CallerReference) + } + if v.Comment != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Comment", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Comment) + } + if v.ContentTypeProfileConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ContentTypeProfileConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentContentTypeProfileConfig(v.ContentTypeProfileConfig, el); err != nil { + return err + } + } + if v.QueryArgProfileConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "QueryArgProfileConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentQueryArgProfileConfig(v.QueryArgProfileConfig, el); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentFieldLevelEncryptionProfileConfig(v *types.FieldLevelEncryptionProfileConfig, value smithyxml.Value) error { + defer value.Close() + if v.CallerReference != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CallerReference", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.CallerReference) + } + if v.Comment != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Comment", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Comment) + } + if v.EncryptionEntities != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "EncryptionEntities", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentEncryptionEntities(v.EncryptionEntities, el); err != nil { + return err + } + } + if v.Name != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Name", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Name) + } + return nil +} + +func awsRestxml_serializeDocumentFieldList(v []string, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Field", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + am.String(v[i]) + } + return nil +} + +func awsRestxml_serializeDocumentFieldPatternList(v []string, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "FieldPattern", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + am.String(v[i]) + } + return nil +} + +func awsRestxml_serializeDocumentFieldPatterns(v *types.FieldPatterns, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentFieldPatternList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentForwardedValues(v *types.ForwardedValues, value smithyxml.Value) error { + defer value.Close() + if v.Cookies != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Cookies", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentCookiePreference(v.Cookies, el); err != nil { + return err + } + } + if v.Headers != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Headers", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentHeaders(v.Headers, el); err != nil { + return err + } + } + if v.QueryString != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "QueryString", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.QueryString) + } + if v.QueryStringCacheKeys != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "QueryStringCacheKeys", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentQueryStringCacheKeys(v.QueryStringCacheKeys, el); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentFunctionAssociation(v *types.FunctionAssociation, value smithyxml.Value) error { + defer value.Close() + if len(v.EventType) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "EventType", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.EventType)) + } + if v.FunctionARN != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "FunctionARN", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.FunctionARN) + } + return nil +} + +func awsRestxml_serializeDocumentFunctionAssociationList(v []types.FunctionAssociation, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "FunctionAssociation", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + if err := awsRestxml_serializeDocumentFunctionAssociation(&v[i], am); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentFunctionAssociations(v *types.FunctionAssociations, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentFunctionAssociationList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentFunctionConfig(v *types.FunctionConfig, value smithyxml.Value) error { + defer value.Close() + if v.Comment != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Comment", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Comment) + } + if v.KeyValueStoreAssociations != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "KeyValueStoreAssociations", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentKeyValueStoreAssociations(v.KeyValueStoreAssociations, el); err != nil { + return err + } + } + if len(v.Runtime) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Runtime", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.Runtime)) + } + return nil +} + +func awsRestxml_serializeDocumentGeoRestriction(v *types.GeoRestriction, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentLocationList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + if len(v.RestrictionType) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "RestrictionType", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.RestrictionType)) + } + return nil +} + +func awsRestxml_serializeDocumentHeaderList(v []string, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Name", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + am.String(v[i]) + } + return nil +} + +func awsRestxml_serializeDocumentHeaders(v *types.Headers, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentHeaderList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentImportSource(v *types.ImportSource, value smithyxml.Value) error { + defer value.Close() + if v.SourceARN != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "SourceARN", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.SourceARN) + } + if len(v.SourceType) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "SourceType", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.SourceType)) + } + return nil +} + +func awsRestxml_serializeDocumentInvalidationBatch(v *types.InvalidationBatch, value smithyxml.Value) error { + defer value.Close() + if v.CallerReference != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CallerReference", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.CallerReference) + } + if v.Paths != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Paths", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentPaths(v.Paths, el); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentKeyGroupConfig(v *types.KeyGroupConfig, value smithyxml.Value) error { + defer value.Close() + if v.Comment != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Comment", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Comment) + } + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentPublicKeyIdList(v.Items, el); err != nil { + return err + } + } + if v.Name != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Name", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Name) + } + return nil +} + +func awsRestxml_serializeDocumentKeyValueStoreAssociation(v *types.KeyValueStoreAssociation, value smithyxml.Value) error { + defer value.Close() + if v.KeyValueStoreARN != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "KeyValueStoreARN", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.KeyValueStoreARN) + } + return nil +} + +func awsRestxml_serializeDocumentKeyValueStoreAssociationList(v []types.KeyValueStoreAssociation, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "KeyValueStoreAssociation", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + if err := awsRestxml_serializeDocumentKeyValueStoreAssociation(&v[i], am); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentKeyValueStoreAssociations(v *types.KeyValueStoreAssociations, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentKeyValueStoreAssociationList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentKinesisStreamConfig(v *types.KinesisStreamConfig, value smithyxml.Value) error { + defer value.Close() + if v.RoleARN != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "RoleARN", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.RoleARN) + } + if v.StreamARN != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "StreamARN", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.StreamARN) + } + return nil +} + +func awsRestxml_serializeDocumentLambdaFunctionAssociation(v *types.LambdaFunctionAssociation, value smithyxml.Value) error { + defer value.Close() + if len(v.EventType) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "EventType", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.EventType)) + } + if v.IncludeBody != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "IncludeBody", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.IncludeBody) + } + if v.LambdaFunctionARN != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "LambdaFunctionARN", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.LambdaFunctionARN) + } + return nil +} + +func awsRestxml_serializeDocumentLambdaFunctionAssociationList(v []types.LambdaFunctionAssociation, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "LambdaFunctionAssociation", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + if err := awsRestxml_serializeDocumentLambdaFunctionAssociation(&v[i], am); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentLambdaFunctionAssociations(v *types.LambdaFunctionAssociations, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentLambdaFunctionAssociationList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentLocationList(v []string, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Location", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + am.String(v[i]) + } + return nil +} + +func awsRestxml_serializeDocumentLoggingConfig(v *types.LoggingConfig, value smithyxml.Value) error { + defer value.Close() + if v.Bucket != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Bucket", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Bucket) + } + if v.Enabled != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Enabled", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.Enabled) + } + if v.IncludeCookies != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "IncludeCookies", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.IncludeCookies) + } + if v.Prefix != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Prefix", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Prefix) + } + return nil +} + +func awsRestxml_serializeDocumentMethodsList(v []types.Method, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Method", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + am.String(string(v[i])) + } + return nil +} + +func awsRestxml_serializeDocumentMonitoringSubscription(v *types.MonitoringSubscription, value smithyxml.Value) error { + defer value.Close() + if v.RealtimeMetricsSubscriptionConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "RealtimeMetricsSubscriptionConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentRealtimeMetricsSubscriptionConfig(v.RealtimeMetricsSubscriptionConfig, el); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentOrigin(v *types.Origin, value smithyxml.Value) error { + defer value.Close() + if v.ConnectionAttempts != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ConnectionAttempts", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.ConnectionAttempts) + } + if v.ConnectionTimeout != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ConnectionTimeout", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.ConnectionTimeout) + } + if v.CustomHeaders != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CustomHeaders", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentCustomHeaders(v.CustomHeaders, el); err != nil { + return err + } + } + if v.CustomOriginConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CustomOriginConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentCustomOriginConfig(v.CustomOriginConfig, el); err != nil { + return err + } + } + if v.DomainName != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "DomainName", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.DomainName) + } + if v.Id != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Id", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Id) + } + if v.OriginAccessControlId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "OriginAccessControlId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.OriginAccessControlId) + } + if v.OriginPath != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "OriginPath", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.OriginPath) + } + if v.OriginShield != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "OriginShield", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentOriginShield(v.OriginShield, el); err != nil { + return err + } + } + if v.S3OriginConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "S3OriginConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentS3OriginConfig(v.S3OriginConfig, el); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentOriginAccessControlConfig(v *types.OriginAccessControlConfig, value smithyxml.Value) error { + defer value.Close() + if v.Description != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Description", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Description) + } + if v.Name != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Name", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Name) + } + if len(v.OriginAccessControlOriginType) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "OriginAccessControlOriginType", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.OriginAccessControlOriginType)) + } + if len(v.SigningBehavior) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "SigningBehavior", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.SigningBehavior)) + } + if len(v.SigningProtocol) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "SigningProtocol", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.SigningProtocol)) + } + return nil +} + +func awsRestxml_serializeDocumentOriginCustomHeader(v *types.OriginCustomHeader, value smithyxml.Value) error { + defer value.Close() + if v.HeaderName != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "HeaderName", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.HeaderName) + } + if v.HeaderValue != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "HeaderValue", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.HeaderValue) + } + return nil +} + +func awsRestxml_serializeDocumentOriginCustomHeadersList(v []types.OriginCustomHeader, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "OriginCustomHeader", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + if err := awsRestxml_serializeDocumentOriginCustomHeader(&v[i], am); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentOriginGroup(v *types.OriginGroup, value smithyxml.Value) error { + defer value.Close() + if v.FailoverCriteria != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "FailoverCriteria", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentOriginGroupFailoverCriteria(v.FailoverCriteria, el); err != nil { + return err + } + } + if v.Id != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Id", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Id) + } + if v.Members != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Members", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentOriginGroupMembers(v.Members, el); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentOriginGroupFailoverCriteria(v *types.OriginGroupFailoverCriteria, value smithyxml.Value) error { + defer value.Close() + if v.StatusCodes != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "StatusCodes", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentStatusCodes(v.StatusCodes, el); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentOriginGroupList(v []types.OriginGroup, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "OriginGroup", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + if err := awsRestxml_serializeDocumentOriginGroup(&v[i], am); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentOriginGroupMember(v *types.OriginGroupMember, value smithyxml.Value) error { + defer value.Close() + if v.OriginId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "OriginId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.OriginId) + } + return nil +} + +func awsRestxml_serializeDocumentOriginGroupMemberList(v []types.OriginGroupMember, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "OriginGroupMember", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + if err := awsRestxml_serializeDocumentOriginGroupMember(&v[i], am); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentOriginGroupMembers(v *types.OriginGroupMembers, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentOriginGroupMemberList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentOriginGroups(v *types.OriginGroups, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentOriginGroupList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentOriginList(v []types.Origin, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Origin", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + if err := awsRestxml_serializeDocumentOrigin(&v[i], am); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentOriginRequestPolicyConfig(v *types.OriginRequestPolicyConfig, value smithyxml.Value) error { + defer value.Close() + if v.Comment != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Comment", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Comment) + } + if v.CookiesConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CookiesConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentOriginRequestPolicyCookiesConfig(v.CookiesConfig, el); err != nil { + return err + } + } + if v.HeadersConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "HeadersConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentOriginRequestPolicyHeadersConfig(v.HeadersConfig, el); err != nil { + return err + } + } + if v.Name != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Name", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Name) + } + if v.QueryStringsConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "QueryStringsConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentOriginRequestPolicyQueryStringsConfig(v.QueryStringsConfig, el); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentOriginRequestPolicyCookiesConfig(v *types.OriginRequestPolicyCookiesConfig, value smithyxml.Value) error { + defer value.Close() + if len(v.CookieBehavior) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CookieBehavior", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.CookieBehavior)) + } + if v.Cookies != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Cookies", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentCookieNames(v.Cookies, el); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentOriginRequestPolicyHeadersConfig(v *types.OriginRequestPolicyHeadersConfig, value smithyxml.Value) error { + defer value.Close() + if len(v.HeaderBehavior) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "HeaderBehavior", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.HeaderBehavior)) + } + if v.Headers != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Headers", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentHeaders(v.Headers, el); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentOriginRequestPolicyQueryStringsConfig(v *types.OriginRequestPolicyQueryStringsConfig, value smithyxml.Value) error { + defer value.Close() + if len(v.QueryStringBehavior) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "QueryStringBehavior", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.QueryStringBehavior)) + } + if v.QueryStrings != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "QueryStrings", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentQueryStringNames(v.QueryStrings, el); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentOrigins(v *types.Origins, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentOriginList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentOriginShield(v *types.OriginShield, value smithyxml.Value) error { + defer value.Close() + if v.Enabled != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Enabled", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.Enabled) + } + if v.OriginShieldRegion != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "OriginShieldRegion", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.OriginShieldRegion) + } + return nil +} + +func awsRestxml_serializeDocumentOriginSslProtocols(v *types.OriginSslProtocols, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentSslProtocolsList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentParametersInCacheKeyAndForwardedToOrigin(v *types.ParametersInCacheKeyAndForwardedToOrigin, value smithyxml.Value) error { + defer value.Close() + if v.CookiesConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CookiesConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentCachePolicyCookiesConfig(v.CookiesConfig, el); err != nil { + return err + } + } + if v.EnableAcceptEncodingBrotli != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "EnableAcceptEncodingBrotli", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.EnableAcceptEncodingBrotli) + } + if v.EnableAcceptEncodingGzip != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "EnableAcceptEncodingGzip", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.EnableAcceptEncodingGzip) + } + if v.HeadersConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "HeadersConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentCachePolicyHeadersConfig(v.HeadersConfig, el); err != nil { + return err + } + } + if v.QueryStringsConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "QueryStringsConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentCachePolicyQueryStringsConfig(v.QueryStringsConfig, el); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentPathList(v []string, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Path", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + am.String(v[i]) + } + return nil +} + +func awsRestxml_serializeDocumentPaths(v *types.Paths, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentPathList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentPublicKeyConfig(v *types.PublicKeyConfig, value smithyxml.Value) error { + defer value.Close() + if v.CallerReference != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CallerReference", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.CallerReference) + } + if v.Comment != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Comment", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Comment) + } + if v.EncodedKey != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "EncodedKey", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.EncodedKey) + } + if v.Name != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Name", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Name) + } + return nil +} + +func awsRestxml_serializeDocumentPublicKeyIdList(v []string, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "PublicKey", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + am.String(v[i]) + } + return nil +} + +func awsRestxml_serializeDocumentQueryArgProfile(v *types.QueryArgProfile, value smithyxml.Value) error { + defer value.Close() + if v.ProfileId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ProfileId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.ProfileId) + } + if v.QueryArg != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "QueryArg", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.QueryArg) + } + return nil +} + +func awsRestxml_serializeDocumentQueryArgProfileConfig(v *types.QueryArgProfileConfig, value smithyxml.Value) error { + defer value.Close() + if v.ForwardWhenQueryArgProfileIsUnknown != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ForwardWhenQueryArgProfileIsUnknown", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.ForwardWhenQueryArgProfileIsUnknown) + } + if v.QueryArgProfiles != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "QueryArgProfiles", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentQueryArgProfiles(v.QueryArgProfiles, el); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentQueryArgProfileList(v []types.QueryArgProfile, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "QueryArgProfile", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + if err := awsRestxml_serializeDocumentQueryArgProfile(&v[i], am); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentQueryArgProfiles(v *types.QueryArgProfiles, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentQueryArgProfileList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentQueryStringCacheKeys(v *types.QueryStringCacheKeys, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentQueryStringCacheKeysList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentQueryStringCacheKeysList(v []string, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Name", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + am.String(v[i]) + } + return nil +} + +func awsRestxml_serializeDocumentQueryStringNames(v *types.QueryStringNames, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentQueryStringNamesList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentQueryStringNamesList(v []string, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Name", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + am.String(v[i]) + } + return nil +} + +func awsRestxml_serializeDocumentRealtimeMetricsSubscriptionConfig(v *types.RealtimeMetricsSubscriptionConfig, value smithyxml.Value) error { + defer value.Close() + if len(v.RealtimeMetricsSubscriptionStatus) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "RealtimeMetricsSubscriptionStatus", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.RealtimeMetricsSubscriptionStatus)) + } + return nil +} + +func awsRestxml_serializeDocumentResponseHeadersPolicyAccessControlAllowHeaders(v *types.ResponseHeadersPolicyAccessControlAllowHeaders, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentAccessControlAllowHeadersList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentResponseHeadersPolicyAccessControlAllowMethods(v *types.ResponseHeadersPolicyAccessControlAllowMethods, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentAccessControlAllowMethodsList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentResponseHeadersPolicyAccessControlAllowOrigins(v *types.ResponseHeadersPolicyAccessControlAllowOrigins, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentAccessControlAllowOriginsList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentResponseHeadersPolicyAccessControlExposeHeaders(v *types.ResponseHeadersPolicyAccessControlExposeHeaders, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentAccessControlExposeHeadersList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentResponseHeadersPolicyConfig(v *types.ResponseHeadersPolicyConfig, value smithyxml.Value) error { + defer value.Close() + if v.Comment != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Comment", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Comment) + } + if v.CorsConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CorsConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentResponseHeadersPolicyCorsConfig(v.CorsConfig, el); err != nil { + return err + } + } + if v.CustomHeadersConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CustomHeadersConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentResponseHeadersPolicyCustomHeadersConfig(v.CustomHeadersConfig, el); err != nil { + return err + } + } + if v.Name != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Name", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Name) + } + if v.RemoveHeadersConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "RemoveHeadersConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentResponseHeadersPolicyRemoveHeadersConfig(v.RemoveHeadersConfig, el); err != nil { + return err + } + } + if v.SecurityHeadersConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "SecurityHeadersConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentResponseHeadersPolicySecurityHeadersConfig(v.SecurityHeadersConfig, el); err != nil { + return err + } + } + if v.ServerTimingHeadersConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ServerTimingHeadersConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentResponseHeadersPolicyServerTimingHeadersConfig(v.ServerTimingHeadersConfig, el); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentResponseHeadersPolicyContentSecurityPolicy(v *types.ResponseHeadersPolicyContentSecurityPolicy, value smithyxml.Value) error { + defer value.Close() + if v.ContentSecurityPolicy != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ContentSecurityPolicy", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.ContentSecurityPolicy) + } + if v.Override != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Override", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.Override) + } + return nil +} + +func awsRestxml_serializeDocumentResponseHeadersPolicyContentTypeOptions(v *types.ResponseHeadersPolicyContentTypeOptions, value smithyxml.Value) error { + defer value.Close() + if v.Override != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Override", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.Override) + } + return nil +} + +func awsRestxml_serializeDocumentResponseHeadersPolicyCorsConfig(v *types.ResponseHeadersPolicyCorsConfig, value smithyxml.Value) error { + defer value.Close() + if v.AccessControlAllowCredentials != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "AccessControlAllowCredentials", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.AccessControlAllowCredentials) + } + if v.AccessControlAllowHeaders != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "AccessControlAllowHeaders", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentResponseHeadersPolicyAccessControlAllowHeaders(v.AccessControlAllowHeaders, el); err != nil { + return err + } + } + if v.AccessControlAllowMethods != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "AccessControlAllowMethods", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentResponseHeadersPolicyAccessControlAllowMethods(v.AccessControlAllowMethods, el); err != nil { + return err + } + } + if v.AccessControlAllowOrigins != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "AccessControlAllowOrigins", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentResponseHeadersPolicyAccessControlAllowOrigins(v.AccessControlAllowOrigins, el); err != nil { + return err + } + } + if v.AccessControlExposeHeaders != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "AccessControlExposeHeaders", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentResponseHeadersPolicyAccessControlExposeHeaders(v.AccessControlExposeHeaders, el); err != nil { + return err + } + } + if v.AccessControlMaxAgeSec != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "AccessControlMaxAgeSec", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.AccessControlMaxAgeSec) + } + if v.OriginOverride != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "OriginOverride", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.OriginOverride) + } + return nil +} + +func awsRestxml_serializeDocumentResponseHeadersPolicyCustomHeader(v *types.ResponseHeadersPolicyCustomHeader, value smithyxml.Value) error { + defer value.Close() + if v.Header != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Header", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Header) + } + if v.Override != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Override", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.Override) + } + if v.Value != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Value", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Value) + } + return nil +} + +func awsRestxml_serializeDocumentResponseHeadersPolicyCustomHeaderList(v []types.ResponseHeadersPolicyCustomHeader, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ResponseHeadersPolicyCustomHeader", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + if err := awsRestxml_serializeDocumentResponseHeadersPolicyCustomHeader(&v[i], am); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentResponseHeadersPolicyCustomHeadersConfig(v *types.ResponseHeadersPolicyCustomHeadersConfig, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentResponseHeadersPolicyCustomHeaderList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentResponseHeadersPolicyFrameOptions(v *types.ResponseHeadersPolicyFrameOptions, value smithyxml.Value) error { + defer value.Close() + if len(v.FrameOption) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "FrameOption", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.FrameOption)) + } + if v.Override != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Override", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.Override) + } + return nil +} + +func awsRestxml_serializeDocumentResponseHeadersPolicyReferrerPolicy(v *types.ResponseHeadersPolicyReferrerPolicy, value smithyxml.Value) error { + defer value.Close() + if v.Override != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Override", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.Override) + } + if len(v.ReferrerPolicy) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ReferrerPolicy", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.ReferrerPolicy)) + } + return nil +} + +func awsRestxml_serializeDocumentResponseHeadersPolicyRemoveHeader(v *types.ResponseHeadersPolicyRemoveHeader, value smithyxml.Value) error { + defer value.Close() + if v.Header != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Header", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Header) + } + return nil +} + +func awsRestxml_serializeDocumentResponseHeadersPolicyRemoveHeaderList(v []types.ResponseHeadersPolicyRemoveHeader, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ResponseHeadersPolicyRemoveHeader", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + if err := awsRestxml_serializeDocumentResponseHeadersPolicyRemoveHeader(&v[i], am); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentResponseHeadersPolicyRemoveHeadersConfig(v *types.ResponseHeadersPolicyRemoveHeadersConfig, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentResponseHeadersPolicyRemoveHeaderList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentResponseHeadersPolicySecurityHeadersConfig(v *types.ResponseHeadersPolicySecurityHeadersConfig, value smithyxml.Value) error { + defer value.Close() + if v.ContentSecurityPolicy != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ContentSecurityPolicy", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentResponseHeadersPolicyContentSecurityPolicy(v.ContentSecurityPolicy, el); err != nil { + return err + } + } + if v.ContentTypeOptions != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ContentTypeOptions", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentResponseHeadersPolicyContentTypeOptions(v.ContentTypeOptions, el); err != nil { + return err + } + } + if v.FrameOptions != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "FrameOptions", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentResponseHeadersPolicyFrameOptions(v.FrameOptions, el); err != nil { + return err + } + } + if v.ReferrerPolicy != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ReferrerPolicy", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentResponseHeadersPolicyReferrerPolicy(v.ReferrerPolicy, el); err != nil { + return err + } + } + if v.StrictTransportSecurity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "StrictTransportSecurity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentResponseHeadersPolicyStrictTransportSecurity(v.StrictTransportSecurity, el); err != nil { + return err + } + } + if v.XSSProtection != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "XSSProtection", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentResponseHeadersPolicyXSSProtection(v.XSSProtection, el); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentResponseHeadersPolicyServerTimingHeadersConfig(v *types.ResponseHeadersPolicyServerTimingHeadersConfig, value smithyxml.Value) error { + defer value.Close() + if v.Enabled != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Enabled", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.Enabled) + } + if v.SamplingRate != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "SamplingRate", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + switch { + case math.IsNaN(*v.SamplingRate): + el.String("NaN") + + case math.IsInf(*v.SamplingRate, 1): + el.String("Infinity") + + case math.IsInf(*v.SamplingRate, -1): + el.String("-Infinity") + + default: + el.Double(*v.SamplingRate) + + } + } + return nil +} + +func awsRestxml_serializeDocumentResponseHeadersPolicyStrictTransportSecurity(v *types.ResponseHeadersPolicyStrictTransportSecurity, value smithyxml.Value) error { + defer value.Close() + if v.AccessControlMaxAgeSec != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "AccessControlMaxAgeSec", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.AccessControlMaxAgeSec) + } + if v.IncludeSubdomains != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "IncludeSubdomains", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.IncludeSubdomains) + } + if v.Override != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Override", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.Override) + } + if v.Preload != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Preload", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.Preload) + } + return nil +} + +func awsRestxml_serializeDocumentResponseHeadersPolicyXSSProtection(v *types.ResponseHeadersPolicyXSSProtection, value smithyxml.Value) error { + defer value.Close() + if v.ModeBlock != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ModeBlock", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.ModeBlock) + } + if v.Override != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Override", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.Override) + } + if v.Protection != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Protection", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.Protection) + } + if v.ReportUri != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ReportUri", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.ReportUri) + } + return nil +} + +func awsRestxml_serializeDocumentRestrictions(v *types.Restrictions, value smithyxml.Value) error { + defer value.Close() + if v.GeoRestriction != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "GeoRestriction", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentGeoRestriction(v.GeoRestriction, el); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentS3Origin(v *types.S3Origin, value smithyxml.Value) error { + defer value.Close() + if v.DomainName != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "DomainName", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.DomainName) + } + if v.OriginAccessIdentity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "OriginAccessIdentity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.OriginAccessIdentity) + } + return nil +} + +func awsRestxml_serializeDocumentS3OriginConfig(v *types.S3OriginConfig, value smithyxml.Value) error { + defer value.Close() + if v.OriginAccessIdentity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "OriginAccessIdentity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.OriginAccessIdentity) + } + return nil +} + +func awsRestxml_serializeDocumentSessionStickinessConfig(v *types.SessionStickinessConfig, value smithyxml.Value) error { + defer value.Close() + if v.IdleTTL != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "IdleTTL", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.IdleTTL) + } + if v.MaximumTTL != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "MaximumTTL", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.MaximumTTL) + } + return nil +} + +func awsRestxml_serializeDocumentSslProtocolsList(v []types.SslProtocol, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "SslProtocol", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + am.String(string(v[i])) + } + return nil +} + +func awsRestxml_serializeDocumentStagingDistributionDnsNameList(v []string, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "DnsName", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + am.String(v[i]) + } + return nil +} + +func awsRestxml_serializeDocumentStagingDistributionDnsNames(v *types.StagingDistributionDnsNames, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentStagingDistributionDnsNameList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentStatusCodeList(v []int32, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "StatusCode", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + am.Integer(v[i]) + } + return nil +} + +func awsRestxml_serializeDocumentStatusCodes(v *types.StatusCodes, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentStatusCodeList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentStreamingDistributionConfig(v *types.StreamingDistributionConfig, value smithyxml.Value) error { + defer value.Close() + if v.Aliases != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Aliases", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentAliases(v.Aliases, el); err != nil { + return err + } + } + if v.CallerReference != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CallerReference", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.CallerReference) + } + if v.Comment != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Comment", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Comment) + } + if v.Enabled != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Enabled", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.Enabled) + } + if v.Logging != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Logging", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentStreamingLoggingConfig(v.Logging, el); err != nil { + return err + } + } + if len(v.PriceClass) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "PriceClass", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.PriceClass)) + } + if v.S3Origin != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "S3Origin", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentS3Origin(v.S3Origin, el); err != nil { + return err + } + } + if v.TrustedSigners != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "TrustedSigners", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentTrustedSigners(v.TrustedSigners, el); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentStreamingDistributionConfigWithTags(v *types.StreamingDistributionConfigWithTags, value smithyxml.Value) error { + defer value.Close() + if v.StreamingDistributionConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "StreamingDistributionConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentStreamingDistributionConfig(v.StreamingDistributionConfig, el); err != nil { + return err + } + } + if v.Tags != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Tags", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentTags(v.Tags, el); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentStreamingLoggingConfig(v *types.StreamingLoggingConfig, value smithyxml.Value) error { + defer value.Close() + if v.Bucket != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Bucket", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Bucket) + } + if v.Enabled != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Enabled", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.Enabled) + } + if v.Prefix != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Prefix", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Prefix) + } + return nil +} + +func awsRestxml_serializeDocumentTag(v *types.Tag, value smithyxml.Value) error { + defer value.Close() + if v.Key != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Key", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Key) + } + if v.Value != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Value", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Value) + } + return nil +} + +func awsRestxml_serializeDocumentTagKeyList(v []string, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Key", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + am.String(v[i]) + } + return nil +} + +func awsRestxml_serializeDocumentTagKeys(v *types.TagKeys, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentTagKeyList(v.Items, el); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentTagList(v []types.Tag, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Tag", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + if err := awsRestxml_serializeDocumentTag(&v[i], am); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentTags(v *types.Tags, value smithyxml.Value) error { + defer value.Close() + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentTagList(v.Items, el); err != nil { + return err + } + } + return nil +} + +func awsRestxml_serializeDocumentTrafficConfig(v *types.TrafficConfig, value smithyxml.Value) error { + defer value.Close() + if v.SingleHeaderConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "SingleHeaderConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentContinuousDeploymentSingleHeaderConfig(v.SingleHeaderConfig, el); err != nil { + return err + } + } + if v.SingleWeightConfig != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "SingleWeightConfig", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentContinuousDeploymentSingleWeightConfig(v.SingleWeightConfig, el); err != nil { + return err + } + } + if len(v.Type) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Type", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.Type)) + } + return nil +} + +func awsRestxml_serializeDocumentTrustedKeyGroupIdList(v []string, value smithyxml.Value) error { + var array *smithyxml.Array + if !value.IsFlattened() { + defer value.Close() + } + customMemberNameAttr := []smithyxml.Attr{} + customMemberName := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "KeyGroup", + }, + Attr: customMemberNameAttr, + } + array = value.ArrayWithCustomName(customMemberName) + for i := range v { + am := array.Member() + am.String(v[i]) + } + return nil +} + +func awsRestxml_serializeDocumentTrustedKeyGroups(v *types.TrustedKeyGroups, value smithyxml.Value) error { + defer value.Close() + if v.Enabled != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Enabled", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.Enabled) + } + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentTrustedKeyGroupIdList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentTrustedSigners(v *types.TrustedSigners, value smithyxml.Value) error { + defer value.Close() + if v.Enabled != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Enabled", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.Enabled) + } + if v.Items != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Items", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentAwsAccountNumberList(v.Items, el); err != nil { + return err + } + } + if v.Quantity != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Quantity", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Quantity) + } + return nil +} + +func awsRestxml_serializeDocumentViewerCertificate(v *types.ViewerCertificate, value smithyxml.Value) error { + defer value.Close() + if v.ACMCertificateArn != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ACMCertificateArn", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.ACMCertificateArn) + } + if v.Certificate != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Certificate", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.Certificate) + } + if len(v.CertificateSource) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CertificateSource", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.CertificateSource)) + } + if v.CloudFrontDefaultCertificate != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "CloudFrontDefaultCertificate", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.CloudFrontDefaultCertificate) + } + if v.IAMCertificateId != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "IAMCertificateId", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(*v.IAMCertificateId) + } + if len(v.MinimumProtocolVersion) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "MinimumProtocolVersion", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.MinimumProtocolVersion)) + } + if len(v.SSLSupportMethod) > 0 { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "SSLSupportMethod", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.String(string(v.SSLSupportMethod)) + } + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/types/enums.go new file mode 100644 index 0000000000..c530f123fe --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/types/enums.go @@ -0,0 +1,753 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type CachePolicyCookieBehavior string + +// Enum values for CachePolicyCookieBehavior +const ( + CachePolicyCookieBehaviorNone CachePolicyCookieBehavior = "none" + CachePolicyCookieBehaviorWhitelist CachePolicyCookieBehavior = "whitelist" + CachePolicyCookieBehaviorAllExcept CachePolicyCookieBehavior = "allExcept" + CachePolicyCookieBehaviorAll CachePolicyCookieBehavior = "all" +) + +// Values returns all known values for CachePolicyCookieBehavior. 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 (CachePolicyCookieBehavior) Values() []CachePolicyCookieBehavior { + return []CachePolicyCookieBehavior{ + "none", + "whitelist", + "allExcept", + "all", + } +} + +type CachePolicyHeaderBehavior string + +// Enum values for CachePolicyHeaderBehavior +const ( + CachePolicyHeaderBehaviorNone CachePolicyHeaderBehavior = "none" + CachePolicyHeaderBehaviorWhitelist CachePolicyHeaderBehavior = "whitelist" +) + +// Values returns all known values for CachePolicyHeaderBehavior. 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 (CachePolicyHeaderBehavior) Values() []CachePolicyHeaderBehavior { + return []CachePolicyHeaderBehavior{ + "none", + "whitelist", + } +} + +type CachePolicyQueryStringBehavior string + +// Enum values for CachePolicyQueryStringBehavior +const ( + CachePolicyQueryStringBehaviorNone CachePolicyQueryStringBehavior = "none" + CachePolicyQueryStringBehaviorWhitelist CachePolicyQueryStringBehavior = "whitelist" + CachePolicyQueryStringBehaviorAllExcept CachePolicyQueryStringBehavior = "allExcept" + CachePolicyQueryStringBehaviorAll CachePolicyQueryStringBehavior = "all" +) + +// Values returns all known values for CachePolicyQueryStringBehavior. 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 (CachePolicyQueryStringBehavior) Values() []CachePolicyQueryStringBehavior { + return []CachePolicyQueryStringBehavior{ + "none", + "whitelist", + "allExcept", + "all", + } +} + +type CachePolicyType string + +// Enum values for CachePolicyType +const ( + CachePolicyTypeManaged CachePolicyType = "managed" + CachePolicyTypeCustom CachePolicyType = "custom" +) + +// Values returns all known values for CachePolicyType. 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 (CachePolicyType) Values() []CachePolicyType { + return []CachePolicyType{ + "managed", + "custom", + } +} + +type CertificateSource string + +// Enum values for CertificateSource +const ( + CertificateSourceCloudfront CertificateSource = "cloudfront" + CertificateSourceIam CertificateSource = "iam" + CertificateSourceAcm CertificateSource = "acm" +) + +// Values returns all known values for CertificateSource. 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 (CertificateSource) Values() []CertificateSource { + return []CertificateSource{ + "cloudfront", + "iam", + "acm", + } +} + +type ContinuousDeploymentPolicyType string + +// Enum values for ContinuousDeploymentPolicyType +const ( + ContinuousDeploymentPolicyTypeSingleWeight ContinuousDeploymentPolicyType = "SingleWeight" + ContinuousDeploymentPolicyTypeSingleHeader ContinuousDeploymentPolicyType = "SingleHeader" +) + +// Values returns all known values for ContinuousDeploymentPolicyType. 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 (ContinuousDeploymentPolicyType) Values() []ContinuousDeploymentPolicyType { + return []ContinuousDeploymentPolicyType{ + "SingleWeight", + "SingleHeader", + } +} + +type EventType string + +// Enum values for EventType +const ( + EventTypeViewerRequest EventType = "viewer-request" + EventTypeViewerResponse EventType = "viewer-response" + EventTypeOriginRequest EventType = "origin-request" + EventTypeOriginResponse EventType = "origin-response" +) + +// Values returns all known values for EventType. 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 (EventType) Values() []EventType { + return []EventType{ + "viewer-request", + "viewer-response", + "origin-request", + "origin-response", + } +} + +type Format string + +// Enum values for Format +const ( + FormatURLEncoded Format = "URLEncoded" +) + +// Values returns all known values for Format. 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 (Format) Values() []Format { + return []Format{ + "URLEncoded", + } +} + +type FrameOptionsList string + +// Enum values for FrameOptionsList +const ( + FrameOptionsListDeny FrameOptionsList = "DENY" + FrameOptionsListSameorigin FrameOptionsList = "SAMEORIGIN" +) + +// Values returns all known values for FrameOptionsList. 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 (FrameOptionsList) Values() []FrameOptionsList { + return []FrameOptionsList{ + "DENY", + "SAMEORIGIN", + } +} + +type FunctionRuntime string + +// Enum values for FunctionRuntime +const ( + FunctionRuntimeCloudfrontJs10 FunctionRuntime = "cloudfront-js-1.0" + FunctionRuntimeCloudfrontJs20 FunctionRuntime = "cloudfront-js-2.0" +) + +// Values returns all known values for FunctionRuntime. 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 (FunctionRuntime) Values() []FunctionRuntime { + return []FunctionRuntime{ + "cloudfront-js-1.0", + "cloudfront-js-2.0", + } +} + +type FunctionStage string + +// Enum values for FunctionStage +const ( + FunctionStageDevelopment FunctionStage = "DEVELOPMENT" + FunctionStageLive FunctionStage = "LIVE" +) + +// Values returns all known values for FunctionStage. 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 (FunctionStage) Values() []FunctionStage { + return []FunctionStage{ + "DEVELOPMENT", + "LIVE", + } +} + +type GeoRestrictionType string + +// Enum values for GeoRestrictionType +const ( + GeoRestrictionTypeBlacklist GeoRestrictionType = "blacklist" + GeoRestrictionTypeWhitelist GeoRestrictionType = "whitelist" + GeoRestrictionTypeNone GeoRestrictionType = "none" +) + +// Values returns all known values for GeoRestrictionType. 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 (GeoRestrictionType) Values() []GeoRestrictionType { + return []GeoRestrictionType{ + "blacklist", + "whitelist", + "none", + } +} + +type HttpVersion string + +// Enum values for HttpVersion +const ( + HttpVersionHttp11 HttpVersion = "http1.1" + HttpVersionHttp2 HttpVersion = "http2" + HttpVersionHttp3 HttpVersion = "http3" + HttpVersionHttp2and3 HttpVersion = "http2and3" +) + +// Values returns all known values for HttpVersion. 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 (HttpVersion) Values() []HttpVersion { + return []HttpVersion{ + "http1.1", + "http2", + "http3", + "http2and3", + } +} + +type ICPRecordalStatus string + +// Enum values for ICPRecordalStatus +const ( + ICPRecordalStatusApproved ICPRecordalStatus = "APPROVED" + ICPRecordalStatusSuspended ICPRecordalStatus = "SUSPENDED" + ICPRecordalStatusPending ICPRecordalStatus = "PENDING" +) + +// Values returns all known values for ICPRecordalStatus. 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 (ICPRecordalStatus) Values() []ICPRecordalStatus { + return []ICPRecordalStatus{ + "APPROVED", + "SUSPENDED", + "PENDING", + } +} + +type ImportSourceType string + +// Enum values for ImportSourceType +const ( + ImportSourceTypeS3 ImportSourceType = "S3" +) + +// Values returns all known values for ImportSourceType. 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 (ImportSourceType) Values() []ImportSourceType { + return []ImportSourceType{ + "S3", + } +} + +type ItemSelection string + +// Enum values for ItemSelection +const ( + ItemSelectionNone ItemSelection = "none" + ItemSelectionWhitelist ItemSelection = "whitelist" + ItemSelectionAll ItemSelection = "all" +) + +// Values returns all known values for ItemSelection. 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 (ItemSelection) Values() []ItemSelection { + return []ItemSelection{ + "none", + "whitelist", + "all", + } +} + +type Method string + +// Enum values for Method +const ( + MethodGet Method = "GET" + MethodHead Method = "HEAD" + MethodPost Method = "POST" + MethodPut Method = "PUT" + MethodPatch Method = "PATCH" + MethodOptions Method = "OPTIONS" + MethodDelete Method = "DELETE" +) + +// Values returns all known values for Method. 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 (Method) Values() []Method { + return []Method{ + "GET", + "HEAD", + "POST", + "PUT", + "PATCH", + "OPTIONS", + "DELETE", + } +} + +type MinimumProtocolVersion string + +// Enum values for MinimumProtocolVersion +const ( + MinimumProtocolVersionSSLv3 MinimumProtocolVersion = "SSLv3" + MinimumProtocolVersionTLSv1 MinimumProtocolVersion = "TLSv1" + MinimumProtocolVersionTLSv12016 MinimumProtocolVersion = "TLSv1_2016" + MinimumProtocolVersionTLSv112016 MinimumProtocolVersion = "TLSv1.1_2016" + MinimumProtocolVersionTLSv122018 MinimumProtocolVersion = "TLSv1.2_2018" + MinimumProtocolVersionTLSv122019 MinimumProtocolVersion = "TLSv1.2_2019" + MinimumProtocolVersionTLSv122021 MinimumProtocolVersion = "TLSv1.2_2021" +) + +// Values returns all known values for MinimumProtocolVersion. 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 (MinimumProtocolVersion) Values() []MinimumProtocolVersion { + return []MinimumProtocolVersion{ + "SSLv3", + "TLSv1", + "TLSv1_2016", + "TLSv1.1_2016", + "TLSv1.2_2018", + "TLSv1.2_2019", + "TLSv1.2_2021", + } +} + +type OriginAccessControlOriginTypes string + +// Enum values for OriginAccessControlOriginTypes +const ( + OriginAccessControlOriginTypesS3 OriginAccessControlOriginTypes = "s3" + OriginAccessControlOriginTypesMediastore OriginAccessControlOriginTypes = "mediastore" + OriginAccessControlOriginTypesMediapackagev2 OriginAccessControlOriginTypes = "mediapackagev2" + OriginAccessControlOriginTypesLambda OriginAccessControlOriginTypes = "lambda" +) + +// Values returns all known values for OriginAccessControlOriginTypes. 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 (OriginAccessControlOriginTypes) Values() []OriginAccessControlOriginTypes { + return []OriginAccessControlOriginTypes{ + "s3", + "mediastore", + "mediapackagev2", + "lambda", + } +} + +type OriginAccessControlSigningBehaviors string + +// Enum values for OriginAccessControlSigningBehaviors +const ( + OriginAccessControlSigningBehaviorsNever OriginAccessControlSigningBehaviors = "never" + OriginAccessControlSigningBehaviorsAlways OriginAccessControlSigningBehaviors = "always" + OriginAccessControlSigningBehaviorsNoOverride OriginAccessControlSigningBehaviors = "no-override" +) + +// Values returns all known values for OriginAccessControlSigningBehaviors. 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 (OriginAccessControlSigningBehaviors) Values() []OriginAccessControlSigningBehaviors { + return []OriginAccessControlSigningBehaviors{ + "never", + "always", + "no-override", + } +} + +type OriginAccessControlSigningProtocols string + +// Enum values for OriginAccessControlSigningProtocols +const ( + OriginAccessControlSigningProtocolsSigv4 OriginAccessControlSigningProtocols = "sigv4" +) + +// Values returns all known values for OriginAccessControlSigningProtocols. 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 (OriginAccessControlSigningProtocols) Values() []OriginAccessControlSigningProtocols { + return []OriginAccessControlSigningProtocols{ + "sigv4", + } +} + +type OriginProtocolPolicy string + +// Enum values for OriginProtocolPolicy +const ( + OriginProtocolPolicyHttpOnly OriginProtocolPolicy = "http-only" + OriginProtocolPolicyMatchViewer OriginProtocolPolicy = "match-viewer" + OriginProtocolPolicyHttpsOnly OriginProtocolPolicy = "https-only" +) + +// Values returns all known values for OriginProtocolPolicy. 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 (OriginProtocolPolicy) Values() []OriginProtocolPolicy { + return []OriginProtocolPolicy{ + "http-only", + "match-viewer", + "https-only", + } +} + +type OriginRequestPolicyCookieBehavior string + +// Enum values for OriginRequestPolicyCookieBehavior +const ( + OriginRequestPolicyCookieBehaviorNone OriginRequestPolicyCookieBehavior = "none" + OriginRequestPolicyCookieBehaviorWhitelist OriginRequestPolicyCookieBehavior = "whitelist" + OriginRequestPolicyCookieBehaviorAll OriginRequestPolicyCookieBehavior = "all" + OriginRequestPolicyCookieBehaviorAllExcept OriginRequestPolicyCookieBehavior = "allExcept" +) + +// Values returns all known values for OriginRequestPolicyCookieBehavior. 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 (OriginRequestPolicyCookieBehavior) Values() []OriginRequestPolicyCookieBehavior { + return []OriginRequestPolicyCookieBehavior{ + "none", + "whitelist", + "all", + "allExcept", + } +} + +type OriginRequestPolicyHeaderBehavior string + +// Enum values for OriginRequestPolicyHeaderBehavior +const ( + OriginRequestPolicyHeaderBehaviorNone OriginRequestPolicyHeaderBehavior = "none" + OriginRequestPolicyHeaderBehaviorWhitelist OriginRequestPolicyHeaderBehavior = "whitelist" + OriginRequestPolicyHeaderBehaviorAllViewer OriginRequestPolicyHeaderBehavior = "allViewer" + OriginRequestPolicyHeaderBehaviorAllViewerAndWhitelistCloudFront OriginRequestPolicyHeaderBehavior = "allViewerAndWhitelistCloudFront" + OriginRequestPolicyHeaderBehaviorAllExcept OriginRequestPolicyHeaderBehavior = "allExcept" +) + +// Values returns all known values for OriginRequestPolicyHeaderBehavior. 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 (OriginRequestPolicyHeaderBehavior) Values() []OriginRequestPolicyHeaderBehavior { + return []OriginRequestPolicyHeaderBehavior{ + "none", + "whitelist", + "allViewer", + "allViewerAndWhitelistCloudFront", + "allExcept", + } +} + +type OriginRequestPolicyQueryStringBehavior string + +// Enum values for OriginRequestPolicyQueryStringBehavior +const ( + OriginRequestPolicyQueryStringBehaviorNone OriginRequestPolicyQueryStringBehavior = "none" + OriginRequestPolicyQueryStringBehaviorWhitelist OriginRequestPolicyQueryStringBehavior = "whitelist" + OriginRequestPolicyQueryStringBehaviorAll OriginRequestPolicyQueryStringBehavior = "all" + OriginRequestPolicyQueryStringBehaviorAllExcept OriginRequestPolicyQueryStringBehavior = "allExcept" +) + +// Values returns all known values for OriginRequestPolicyQueryStringBehavior. +// 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 (OriginRequestPolicyQueryStringBehavior) Values() []OriginRequestPolicyQueryStringBehavior { + return []OriginRequestPolicyQueryStringBehavior{ + "none", + "whitelist", + "all", + "allExcept", + } +} + +type OriginRequestPolicyType string + +// Enum values for OriginRequestPolicyType +const ( + OriginRequestPolicyTypeManaged OriginRequestPolicyType = "managed" + OriginRequestPolicyTypeCustom OriginRequestPolicyType = "custom" +) + +// Values returns all known values for OriginRequestPolicyType. 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 (OriginRequestPolicyType) Values() []OriginRequestPolicyType { + return []OriginRequestPolicyType{ + "managed", + "custom", + } +} + +type PriceClass string + +// Enum values for PriceClass +const ( + PriceClassPriceClass100 PriceClass = "PriceClass_100" + PriceClassPriceClass200 PriceClass = "PriceClass_200" + PriceClassPriceClassAll PriceClass = "PriceClass_All" +) + +// Values returns all known values for PriceClass. 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 (PriceClass) Values() []PriceClass { + return []PriceClass{ + "PriceClass_100", + "PriceClass_200", + "PriceClass_All", + } +} + +type RealtimeMetricsSubscriptionStatus string + +// Enum values for RealtimeMetricsSubscriptionStatus +const ( + RealtimeMetricsSubscriptionStatusEnabled RealtimeMetricsSubscriptionStatus = "Enabled" + RealtimeMetricsSubscriptionStatusDisabled RealtimeMetricsSubscriptionStatus = "Disabled" +) + +// Values returns all known values for RealtimeMetricsSubscriptionStatus. 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 (RealtimeMetricsSubscriptionStatus) Values() []RealtimeMetricsSubscriptionStatus { + return []RealtimeMetricsSubscriptionStatus{ + "Enabled", + "Disabled", + } +} + +type ReferrerPolicyList string + +// Enum values for ReferrerPolicyList +const ( + ReferrerPolicyListNoReferrer ReferrerPolicyList = "no-referrer" + ReferrerPolicyListNoReferrerWhenDowngrade ReferrerPolicyList = "no-referrer-when-downgrade" + ReferrerPolicyListOrigin ReferrerPolicyList = "origin" + ReferrerPolicyListOriginWhenCrossOrigin ReferrerPolicyList = "origin-when-cross-origin" + ReferrerPolicyListSameOrigin ReferrerPolicyList = "same-origin" + ReferrerPolicyListStrictOrigin ReferrerPolicyList = "strict-origin" + ReferrerPolicyListStrictOriginWhenCrossOrigin ReferrerPolicyList = "strict-origin-when-cross-origin" + ReferrerPolicyListUnsafeUrl ReferrerPolicyList = "unsafe-url" +) + +// Values returns all known values for ReferrerPolicyList. 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 (ReferrerPolicyList) Values() []ReferrerPolicyList { + return []ReferrerPolicyList{ + "no-referrer", + "no-referrer-when-downgrade", + "origin", + "origin-when-cross-origin", + "same-origin", + "strict-origin", + "strict-origin-when-cross-origin", + "unsafe-url", + } +} + +type ResponseHeadersPolicyAccessControlAllowMethodsValues string + +// Enum values for ResponseHeadersPolicyAccessControlAllowMethodsValues +const ( + ResponseHeadersPolicyAccessControlAllowMethodsValuesGet ResponseHeadersPolicyAccessControlAllowMethodsValues = "GET" + ResponseHeadersPolicyAccessControlAllowMethodsValuesPost ResponseHeadersPolicyAccessControlAllowMethodsValues = "POST" + ResponseHeadersPolicyAccessControlAllowMethodsValuesOptions ResponseHeadersPolicyAccessControlAllowMethodsValues = "OPTIONS" + ResponseHeadersPolicyAccessControlAllowMethodsValuesPut ResponseHeadersPolicyAccessControlAllowMethodsValues = "PUT" + ResponseHeadersPolicyAccessControlAllowMethodsValuesDelete ResponseHeadersPolicyAccessControlAllowMethodsValues = "DELETE" + ResponseHeadersPolicyAccessControlAllowMethodsValuesPatch ResponseHeadersPolicyAccessControlAllowMethodsValues = "PATCH" + ResponseHeadersPolicyAccessControlAllowMethodsValuesHead ResponseHeadersPolicyAccessControlAllowMethodsValues = "HEAD" + ResponseHeadersPolicyAccessControlAllowMethodsValuesAll ResponseHeadersPolicyAccessControlAllowMethodsValues = "ALL" +) + +// Values returns all known values for +// ResponseHeadersPolicyAccessControlAllowMethodsValues. 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 (ResponseHeadersPolicyAccessControlAllowMethodsValues) Values() []ResponseHeadersPolicyAccessControlAllowMethodsValues { + return []ResponseHeadersPolicyAccessControlAllowMethodsValues{ + "GET", + "POST", + "OPTIONS", + "PUT", + "DELETE", + "PATCH", + "HEAD", + "ALL", + } +} + +type ResponseHeadersPolicyType string + +// Enum values for ResponseHeadersPolicyType +const ( + ResponseHeadersPolicyTypeManaged ResponseHeadersPolicyType = "managed" + ResponseHeadersPolicyTypeCustom ResponseHeadersPolicyType = "custom" +) + +// Values returns all known values for ResponseHeadersPolicyType. 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 (ResponseHeadersPolicyType) Values() []ResponseHeadersPolicyType { + return []ResponseHeadersPolicyType{ + "managed", + "custom", + } +} + +type SslProtocol string + +// Enum values for SslProtocol +const ( + SslProtocolSSLv3 SslProtocol = "SSLv3" + SslProtocolTLSv1 SslProtocol = "TLSv1" + SslProtocolTLSv11 SslProtocol = "TLSv1.1" + SslProtocolTLSv12 SslProtocol = "TLSv1.2" +) + +// Values returns all known values for SslProtocol. 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 (SslProtocol) Values() []SslProtocol { + return []SslProtocol{ + "SSLv3", + "TLSv1", + "TLSv1.1", + "TLSv1.2", + } +} + +type SSLSupportMethod string + +// Enum values for SSLSupportMethod +const ( + SSLSupportMethodSniOnly SSLSupportMethod = "sni-only" + SSLSupportMethodVip SSLSupportMethod = "vip" + SSLSupportMethodStaticIp SSLSupportMethod = "static-ip" +) + +// Values returns all known values for SSLSupportMethod. 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 (SSLSupportMethod) Values() []SSLSupportMethod { + return []SSLSupportMethod{ + "sni-only", + "vip", + "static-ip", + } +} + +type ViewerProtocolPolicy string + +// Enum values for ViewerProtocolPolicy +const ( + ViewerProtocolPolicyAllowAll ViewerProtocolPolicy = "allow-all" + ViewerProtocolPolicyHttpsOnly ViewerProtocolPolicy = "https-only" + ViewerProtocolPolicyRedirectToHttps ViewerProtocolPolicy = "redirect-to-https" +) + +// Values returns all known values for ViewerProtocolPolicy. 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 (ViewerProtocolPolicy) Values() []ViewerProtocolPolicy { + return []ViewerProtocolPolicy{ + "allow-all", + "https-only", + "redirect-to-https", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/types/errors.go new file mode 100644 index 0000000000..c004367100 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/types/errors.go @@ -0,0 +1,4132 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "fmt" + smithy "github.com/aws/smithy-go" +) + +// Access denied. +type AccessDenied struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *AccessDenied) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AccessDenied) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AccessDenied) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "AccessDenied" + } + return *e.ErrorCodeOverride +} +func (e *AccessDenied) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Invalidation batch specified is too large. +type BatchTooLarge struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *BatchTooLarge) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *BatchTooLarge) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *BatchTooLarge) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "BatchTooLarge" + } + return *e.ErrorCodeOverride +} +func (e *BatchTooLarge) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// A cache policy with this name already exists. You must provide a unique name. +// To modify an existing cache policy, use UpdateCachePolicy . +type CachePolicyAlreadyExists struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *CachePolicyAlreadyExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *CachePolicyAlreadyExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *CachePolicyAlreadyExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "CachePolicyAlreadyExists" + } + return *e.ErrorCodeOverride +} +func (e *CachePolicyAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Cannot delete the cache policy because it is attached to one or more cache +// behaviors. +type CachePolicyInUse struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *CachePolicyInUse) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *CachePolicyInUse) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *CachePolicyInUse) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "CachePolicyInUse" + } + return *e.ErrorCodeOverride +} +func (e *CachePolicyInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You can't change the value of a public key. +type CannotChangeImmutablePublicKeyFields struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *CannotChangeImmutablePublicKeyFields) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *CannotChangeImmutablePublicKeyFields) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *CannotChangeImmutablePublicKeyFields) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "CannotChangeImmutablePublicKeyFields" + } + return *e.ErrorCodeOverride +} +func (e *CannotChangeImmutablePublicKeyFields) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The key value store entity cannot be deleted while it is in use. +type CannotDeleteEntityWhileInUse struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *CannotDeleteEntityWhileInUse) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *CannotDeleteEntityWhileInUse) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *CannotDeleteEntityWhileInUse) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "CannotDeleteEntityWhileInUse" + } + return *e.ErrorCodeOverride +} +func (e *CannotDeleteEntityWhileInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// If the CallerReference is a value you already sent in a previous request to +// create an identity but the content of the CloudFrontOriginAccessIdentityConfig +// is different from the original request, CloudFront returns a +// CloudFrontOriginAccessIdentityAlreadyExists error. +type CloudFrontOriginAccessIdentityAlreadyExists struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *CloudFrontOriginAccessIdentityAlreadyExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *CloudFrontOriginAccessIdentityAlreadyExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *CloudFrontOriginAccessIdentityAlreadyExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "CloudFrontOriginAccessIdentityAlreadyExists" + } + return *e.ErrorCodeOverride +} +func (e *CloudFrontOriginAccessIdentityAlreadyExists) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The Origin Access Identity specified is already in use. +type CloudFrontOriginAccessIdentityInUse struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *CloudFrontOriginAccessIdentityInUse) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *CloudFrontOriginAccessIdentityInUse) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *CloudFrontOriginAccessIdentityInUse) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "CloudFrontOriginAccessIdentityInUse" + } + return *e.ErrorCodeOverride +} +func (e *CloudFrontOriginAccessIdentityInUse) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The CNAME specified is already defined for CloudFront. +type CNAMEAlreadyExists struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *CNAMEAlreadyExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *CNAMEAlreadyExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *CNAMEAlreadyExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "CNAMEAlreadyExists" + } + return *e.ErrorCodeOverride +} +func (e *CNAMEAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// A continuous deployment policy with this configuration already exists. +type ContinuousDeploymentPolicyAlreadyExists struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ContinuousDeploymentPolicyAlreadyExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ContinuousDeploymentPolicyAlreadyExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ContinuousDeploymentPolicyAlreadyExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ContinuousDeploymentPolicyAlreadyExists" + } + return *e.ErrorCodeOverride +} +func (e *ContinuousDeploymentPolicyAlreadyExists) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// You cannot delete a continuous deployment policy that is associated with a +// primary distribution. +type ContinuousDeploymentPolicyInUse struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ContinuousDeploymentPolicyInUse) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ContinuousDeploymentPolicyInUse) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ContinuousDeploymentPolicyInUse) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ContinuousDeploymentPolicyInUse" + } + return *e.ErrorCodeOverride +} +func (e *ContinuousDeploymentPolicyInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The caller reference you attempted to create the distribution with is +// associated with another distribution. +type DistributionAlreadyExists struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *DistributionAlreadyExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *DistributionAlreadyExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *DistributionAlreadyExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "DistributionAlreadyExists" + } + return *e.ErrorCodeOverride +} +func (e *DistributionAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified CloudFront distribution is not disabled. You must disable the +// distribution before you can delete it. +type DistributionNotDisabled struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *DistributionNotDisabled) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *DistributionNotDisabled) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *DistributionNotDisabled) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "DistributionNotDisabled" + } + return *e.ErrorCodeOverride +} +func (e *DistributionNotDisabled) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The key value store entity already exists. You must provide a unique key value +// store entity. +type EntityAlreadyExists struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *EntityAlreadyExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *EntityAlreadyExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *EntityAlreadyExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "EntityAlreadyExists" + } + return *e.ErrorCodeOverride +} +func (e *EntityAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The key value store entity limit has been exceeded. +type EntityLimitExceeded struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *EntityLimitExceeded) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *EntityLimitExceeded) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *EntityLimitExceeded) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "EntityLimitExceeded" + } + return *e.ErrorCodeOverride +} +func (e *EntityLimitExceeded) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The key value store entity was not found. +type EntityNotFound struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *EntityNotFound) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *EntityNotFound) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *EntityNotFound) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "EntityNotFound" + } + return *e.ErrorCodeOverride +} +func (e *EntityNotFound) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The key value store entity size limit was exceeded. +type EntitySizeLimitExceeded struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *EntitySizeLimitExceeded) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *EntitySizeLimitExceeded) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *EntitySizeLimitExceeded) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "EntitySizeLimitExceeded" + } + return *e.ErrorCodeOverride +} +func (e *EntitySizeLimitExceeded) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified configuration for field-level encryption already exists. +type FieldLevelEncryptionConfigAlreadyExists struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *FieldLevelEncryptionConfigAlreadyExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *FieldLevelEncryptionConfigAlreadyExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *FieldLevelEncryptionConfigAlreadyExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "FieldLevelEncryptionConfigAlreadyExists" + } + return *e.ErrorCodeOverride +} +func (e *FieldLevelEncryptionConfigAlreadyExists) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The specified configuration for field-level encryption is in use. +type FieldLevelEncryptionConfigInUse struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *FieldLevelEncryptionConfigInUse) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *FieldLevelEncryptionConfigInUse) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *FieldLevelEncryptionConfigInUse) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "FieldLevelEncryptionConfigInUse" + } + return *e.ErrorCodeOverride +} +func (e *FieldLevelEncryptionConfigInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified profile for field-level encryption already exists. +type FieldLevelEncryptionProfileAlreadyExists struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *FieldLevelEncryptionProfileAlreadyExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *FieldLevelEncryptionProfileAlreadyExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *FieldLevelEncryptionProfileAlreadyExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "FieldLevelEncryptionProfileAlreadyExists" + } + return *e.ErrorCodeOverride +} +func (e *FieldLevelEncryptionProfileAlreadyExists) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The specified profile for field-level encryption is in use. +type FieldLevelEncryptionProfileInUse struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *FieldLevelEncryptionProfileInUse) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *FieldLevelEncryptionProfileInUse) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *FieldLevelEncryptionProfileInUse) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "FieldLevelEncryptionProfileInUse" + } + return *e.ErrorCodeOverride +} +func (e *FieldLevelEncryptionProfileInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The maximum size of a profile for field-level encryption was exceeded. +type FieldLevelEncryptionProfileSizeExceeded struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *FieldLevelEncryptionProfileSizeExceeded) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *FieldLevelEncryptionProfileSizeExceeded) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *FieldLevelEncryptionProfileSizeExceeded) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "FieldLevelEncryptionProfileSizeExceeded" + } + return *e.ErrorCodeOverride +} +func (e *FieldLevelEncryptionProfileSizeExceeded) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// A function with the same name already exists in this Amazon Web Services +// account. To create a function, you must provide a unique name. To update an +// existing function, use UpdateFunction . +type FunctionAlreadyExists struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *FunctionAlreadyExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *FunctionAlreadyExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *FunctionAlreadyExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "FunctionAlreadyExists" + } + return *e.ErrorCodeOverride +} +func (e *FunctionAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Cannot delete the function because it's attached to one or more cache behaviors. +type FunctionInUse struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *FunctionInUse) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *FunctionInUse) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *FunctionInUse) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "FunctionInUse" + } + return *e.ErrorCodeOverride +} +func (e *FunctionInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The function is too large. For more information, see [Quotas] (formerly known as +// limits) in the Amazon CloudFront Developer Guide. +// +// [Quotas]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html +type FunctionSizeLimitExceeded struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *FunctionSizeLimitExceeded) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *FunctionSizeLimitExceeded) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *FunctionSizeLimitExceeded) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "FunctionSizeLimitExceeded" + } + return *e.ErrorCodeOverride +} +func (e *FunctionSizeLimitExceeded) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You cannot delete a managed policy. +type IllegalDelete struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *IllegalDelete) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *IllegalDelete) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *IllegalDelete) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "IllegalDelete" + } + return *e.ErrorCodeOverride +} +func (e *IllegalDelete) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified configuration for field-level encryption can't be associated with +// the specified cache behavior. +type IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior" + } + return *e.ErrorCodeOverride +} +func (e *IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// An origin cannot contain both an origin access control (OAC) and an origin +// access identity (OAI). +type IllegalOriginAccessConfiguration struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *IllegalOriginAccessConfiguration) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *IllegalOriginAccessConfiguration) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *IllegalOriginAccessConfiguration) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "IllegalOriginAccessConfiguration" + } + return *e.ErrorCodeOverride +} +func (e *IllegalOriginAccessConfiguration) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The update contains modifications that are not allowed. +type IllegalUpdate struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *IllegalUpdate) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *IllegalUpdate) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *IllegalUpdate) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "IllegalUpdate" + } + return *e.ErrorCodeOverride +} +func (e *IllegalUpdate) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The value of Quantity and the size of Items don't match. +type InconsistentQuantities struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InconsistentQuantities) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InconsistentQuantities) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InconsistentQuantities) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InconsistentQuantities" + } + return *e.ErrorCodeOverride +} +func (e *InconsistentQuantities) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// An argument is invalid. +type InvalidArgument struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidArgument) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidArgument) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidArgument) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidArgument" + } + return *e.ErrorCodeOverride +} +func (e *InvalidArgument) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The default root object file name is too big or contains an invalid character. +type InvalidDefaultRootObject struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidDefaultRootObject) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidDefaultRootObject) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidDefaultRootObject) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidDefaultRootObject" + } + return *e.ErrorCodeOverride +} +func (e *InvalidDefaultRootObject) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// An origin access control is associated with an origin whose domain name is not +// supported. +type InvalidDomainNameForOriginAccessControl struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidDomainNameForOriginAccessControl) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidDomainNameForOriginAccessControl) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidDomainNameForOriginAccessControl) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidDomainNameForOriginAccessControl" + } + return *e.ErrorCodeOverride +} +func (e *InvalidDomainNameForOriginAccessControl) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// An invalid error code was specified. +type InvalidErrorCode struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidErrorCode) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidErrorCode) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidErrorCode) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidErrorCode" + } + return *e.ErrorCodeOverride +} +func (e *InvalidErrorCode) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Your request contains forward cookies option which doesn't match with the +// expectation for the whitelisted list of cookie names. Either list of cookie +// names has been specified when not allowed or list of cookie names is missing +// when expected. +type InvalidForwardCookies struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidForwardCookies) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidForwardCookies) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidForwardCookies) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidForwardCookies" + } + return *e.ErrorCodeOverride +} +func (e *InvalidForwardCookies) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// A CloudFront function association is invalid. +type InvalidFunctionAssociation struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidFunctionAssociation) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidFunctionAssociation) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidFunctionAssociation) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidFunctionAssociation" + } + return *e.ErrorCodeOverride +} +func (e *InvalidFunctionAssociation) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified geo restriction parameter is not valid. +type InvalidGeoRestrictionParameter struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidGeoRestrictionParameter) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidGeoRestrictionParameter) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidGeoRestrictionParameter) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidGeoRestrictionParameter" + } + return *e.ErrorCodeOverride +} +func (e *InvalidGeoRestrictionParameter) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The headers specified are not valid for an Amazon S3 origin. +type InvalidHeadersForS3Origin struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidHeadersForS3Origin) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidHeadersForS3Origin) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidHeadersForS3Origin) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidHeadersForS3Origin" + } + return *e.ErrorCodeOverride +} +func (e *InvalidHeadersForS3Origin) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The If-Match version is missing or not valid. +type InvalidIfMatchVersion struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidIfMatchVersion) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidIfMatchVersion) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidIfMatchVersion) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidIfMatchVersion" + } + return *e.ErrorCodeOverride +} +func (e *InvalidIfMatchVersion) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified Lambda@Edge function association is invalid. +type InvalidLambdaFunctionAssociation struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidLambdaFunctionAssociation) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidLambdaFunctionAssociation) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidLambdaFunctionAssociation) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidLambdaFunctionAssociation" + } + return *e.ErrorCodeOverride +} +func (e *InvalidLambdaFunctionAssociation) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The location code specified is not valid. +type InvalidLocationCode struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidLocationCode) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidLocationCode) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidLocationCode) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidLocationCode" + } + return *e.ErrorCodeOverride +} +func (e *InvalidLocationCode) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The minimum protocol version specified is not valid. +type InvalidMinimumProtocolVersion struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidMinimumProtocolVersion) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidMinimumProtocolVersion) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidMinimumProtocolVersion) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidMinimumProtocolVersion" + } + return *e.ErrorCodeOverride +} +func (e *InvalidMinimumProtocolVersion) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The Amazon S3 origin server specified does not refer to a valid Amazon S3 +// bucket. +type InvalidOrigin struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidOrigin) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidOrigin) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidOrigin) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidOrigin" + } + return *e.ErrorCodeOverride +} +func (e *InvalidOrigin) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The origin access control is not valid. +type InvalidOriginAccessControl struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidOriginAccessControl) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidOriginAccessControl) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidOriginAccessControl) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidOriginAccessControl" + } + return *e.ErrorCodeOverride +} +func (e *InvalidOriginAccessControl) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The origin access identity is not valid or doesn't exist. +type InvalidOriginAccessIdentity struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidOriginAccessIdentity) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidOriginAccessIdentity) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidOriginAccessIdentity) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidOriginAccessIdentity" + } + return *e.ErrorCodeOverride +} +func (e *InvalidOriginAccessIdentity) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The keep alive timeout specified for the origin is not valid. +type InvalidOriginKeepaliveTimeout struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidOriginKeepaliveTimeout) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidOriginKeepaliveTimeout) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidOriginKeepaliveTimeout) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidOriginKeepaliveTimeout" + } + return *e.ErrorCodeOverride +} +func (e *InvalidOriginKeepaliveTimeout) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The read timeout specified for the origin is not valid. +type InvalidOriginReadTimeout struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidOriginReadTimeout) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidOriginReadTimeout) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidOriginReadTimeout) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidOriginReadTimeout" + } + return *e.ErrorCodeOverride +} +func (e *InvalidOriginReadTimeout) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You cannot specify SSLv3 as the minimum protocol version if you only want to +// support only clients that support Server Name Indication (SNI). +type InvalidProtocolSettings struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidProtocolSettings) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidProtocolSettings) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidProtocolSettings) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidProtocolSettings" + } + return *e.ErrorCodeOverride +} +func (e *InvalidProtocolSettings) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The query string parameters specified are not valid. +type InvalidQueryStringParameters struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidQueryStringParameters) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidQueryStringParameters) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidQueryStringParameters) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidQueryStringParameters" + } + return *e.ErrorCodeOverride +} +func (e *InvalidQueryStringParameters) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The relative path is too big, is not URL-encoded, or does not begin with a +// slash (/). +type InvalidRelativePath struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidRelativePath) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidRelativePath) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidRelativePath) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidRelativePath" + } + return *e.ErrorCodeOverride +} +func (e *InvalidRelativePath) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// This operation requires the HTTPS protocol. Ensure that you specify the HTTPS +// protocol in your request, or omit the RequiredProtocols element from your +// distribution configuration. +type InvalidRequiredProtocol struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidRequiredProtocol) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidRequiredProtocol) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidRequiredProtocol) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidRequiredProtocol" + } + return *e.ErrorCodeOverride +} +func (e *InvalidRequiredProtocol) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// A response code is not valid. +type InvalidResponseCode struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidResponseCode) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidResponseCode) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidResponseCode) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidResponseCode" + } + return *e.ErrorCodeOverride +} +func (e *InvalidResponseCode) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The tagging specified is not valid. +type InvalidTagging struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidTagging) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidTagging) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidTagging) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidTagging" + } + return *e.ErrorCodeOverride +} +func (e *InvalidTagging) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The TTL order specified is not valid. +type InvalidTTLOrder struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidTTLOrder) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidTTLOrder) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidTTLOrder) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidTTLOrder" + } + return *e.ErrorCodeOverride +} +func (e *InvalidTTLOrder) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// A viewer certificate specified is not valid. +type InvalidViewerCertificate struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidViewerCertificate) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidViewerCertificate) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidViewerCertificate) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidViewerCertificate" + } + return *e.ErrorCodeOverride +} +func (e *InvalidViewerCertificate) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// A web ACL ID specified is not valid. To specify a web ACL created using the +// latest version of WAF, use the ACL ARN, for example +// arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a +// . To specify a web ACL created using WAF Classic, use the ACL ID, for example +// 473e64fd-f30b-4765-81a0-62ad96dd167a . +type InvalidWebACLId struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidWebACLId) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidWebACLId) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidWebACLId) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidWebACLId" + } + return *e.ErrorCodeOverride +} +func (e *InvalidWebACLId) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// A key group with this name already exists. You must provide a unique name. To +// modify an existing key group, use UpdateKeyGroup . +type KeyGroupAlreadyExists struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *KeyGroupAlreadyExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *KeyGroupAlreadyExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *KeyGroupAlreadyExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "KeyGroupAlreadyExists" + } + return *e.ErrorCodeOverride +} +func (e *KeyGroupAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// This operation requires a body. Ensure that the body is present and the +// Content-Type header is set. +type MissingBody struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *MissingBody) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *MissingBody) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *MissingBody) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "MissingBody" + } + return *e.ErrorCodeOverride +} +func (e *MissingBody) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// A monitoring subscription already exists for the specified distribution. +type MonitoringSubscriptionAlreadyExists struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *MonitoringSubscriptionAlreadyExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *MonitoringSubscriptionAlreadyExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *MonitoringSubscriptionAlreadyExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "MonitoringSubscriptionAlreadyExists" + } + return *e.ErrorCodeOverride +} +func (e *MonitoringSubscriptionAlreadyExists) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The cache policy does not exist. +type NoSuchCachePolicy struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoSuchCachePolicy) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoSuchCachePolicy) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoSuchCachePolicy) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoSuchCachePolicy" + } + return *e.ErrorCodeOverride +} +func (e *NoSuchCachePolicy) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified origin access identity does not exist. +type NoSuchCloudFrontOriginAccessIdentity struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoSuchCloudFrontOriginAccessIdentity) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoSuchCloudFrontOriginAccessIdentity) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoSuchCloudFrontOriginAccessIdentity) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoSuchCloudFrontOriginAccessIdentity" + } + return *e.ErrorCodeOverride +} +func (e *NoSuchCloudFrontOriginAccessIdentity) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The continuous deployment policy doesn't exist. +type NoSuchContinuousDeploymentPolicy struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoSuchContinuousDeploymentPolicy) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoSuchContinuousDeploymentPolicy) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoSuchContinuousDeploymentPolicy) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoSuchContinuousDeploymentPolicy" + } + return *e.ErrorCodeOverride +} +func (e *NoSuchContinuousDeploymentPolicy) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified distribution does not exist. +type NoSuchDistribution struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoSuchDistribution) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoSuchDistribution) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoSuchDistribution) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoSuchDistribution" + } + return *e.ErrorCodeOverride +} +func (e *NoSuchDistribution) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified configuration for field-level encryption doesn't exist. +type NoSuchFieldLevelEncryptionConfig struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoSuchFieldLevelEncryptionConfig) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoSuchFieldLevelEncryptionConfig) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoSuchFieldLevelEncryptionConfig) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoSuchFieldLevelEncryptionConfig" + } + return *e.ErrorCodeOverride +} +func (e *NoSuchFieldLevelEncryptionConfig) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified profile for field-level encryption doesn't exist. +type NoSuchFieldLevelEncryptionProfile struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoSuchFieldLevelEncryptionProfile) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoSuchFieldLevelEncryptionProfile) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoSuchFieldLevelEncryptionProfile) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoSuchFieldLevelEncryptionProfile" + } + return *e.ErrorCodeOverride +} +func (e *NoSuchFieldLevelEncryptionProfile) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The function does not exist. +type NoSuchFunctionExists struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoSuchFunctionExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoSuchFunctionExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoSuchFunctionExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoSuchFunctionExists" + } + return *e.ErrorCodeOverride +} +func (e *NoSuchFunctionExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified invalidation does not exist. +type NoSuchInvalidation struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoSuchInvalidation) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoSuchInvalidation) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoSuchInvalidation) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoSuchInvalidation" + } + return *e.ErrorCodeOverride +} +func (e *NoSuchInvalidation) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// A monitoring subscription does not exist for the specified distribution. +type NoSuchMonitoringSubscription struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoSuchMonitoringSubscription) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoSuchMonitoringSubscription) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoSuchMonitoringSubscription) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoSuchMonitoringSubscription" + } + return *e.ErrorCodeOverride +} +func (e *NoSuchMonitoringSubscription) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// No origin exists with the specified Origin Id . +type NoSuchOrigin struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoSuchOrigin) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoSuchOrigin) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoSuchOrigin) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoSuchOrigin" + } + return *e.ErrorCodeOverride +} +func (e *NoSuchOrigin) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The origin access control does not exist. +type NoSuchOriginAccessControl struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoSuchOriginAccessControl) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoSuchOriginAccessControl) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoSuchOriginAccessControl) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoSuchOriginAccessControl" + } + return *e.ErrorCodeOverride +} +func (e *NoSuchOriginAccessControl) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The origin request policy does not exist. +type NoSuchOriginRequestPolicy struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoSuchOriginRequestPolicy) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoSuchOriginRequestPolicy) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoSuchOriginRequestPolicy) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoSuchOriginRequestPolicy" + } + return *e.ErrorCodeOverride +} +func (e *NoSuchOriginRequestPolicy) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified public key doesn't exist. +type NoSuchPublicKey struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoSuchPublicKey) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoSuchPublicKey) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoSuchPublicKey) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoSuchPublicKey" + } + return *e.ErrorCodeOverride +} +func (e *NoSuchPublicKey) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The real-time log configuration does not exist. +type NoSuchRealtimeLogConfig struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoSuchRealtimeLogConfig) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoSuchRealtimeLogConfig) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoSuchRealtimeLogConfig) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoSuchRealtimeLogConfig" + } + return *e.ErrorCodeOverride +} +func (e *NoSuchRealtimeLogConfig) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// A resource that was specified is not valid. +type NoSuchResource struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoSuchResource) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoSuchResource) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoSuchResource) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoSuchResource" + } + return *e.ErrorCodeOverride +} +func (e *NoSuchResource) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The response headers policy does not exist. +type NoSuchResponseHeadersPolicy struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoSuchResponseHeadersPolicy) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoSuchResponseHeadersPolicy) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoSuchResponseHeadersPolicy) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoSuchResponseHeadersPolicy" + } + return *e.ErrorCodeOverride +} +func (e *NoSuchResponseHeadersPolicy) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified streaming distribution does not exist. +type NoSuchStreamingDistribution struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NoSuchStreamingDistribution) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoSuchStreamingDistribution) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoSuchStreamingDistribution) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoSuchStreamingDistribution" + } + return *e.ErrorCodeOverride +} +func (e *NoSuchStreamingDistribution) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// An origin access control with the specified parameters already exists. +type OriginAccessControlAlreadyExists struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *OriginAccessControlAlreadyExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *OriginAccessControlAlreadyExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *OriginAccessControlAlreadyExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "OriginAccessControlAlreadyExists" + } + return *e.ErrorCodeOverride +} +func (e *OriginAccessControlAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Cannot delete the origin access control because it's in use by one or more +// distributions. +type OriginAccessControlInUse struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *OriginAccessControlInUse) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *OriginAccessControlInUse) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *OriginAccessControlInUse) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "OriginAccessControlInUse" + } + return *e.ErrorCodeOverride +} +func (e *OriginAccessControlInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// An origin request policy with this name already exists. You must provide a +// unique name. To modify an existing origin request policy, use +// UpdateOriginRequestPolicy . +type OriginRequestPolicyAlreadyExists struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *OriginRequestPolicyAlreadyExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *OriginRequestPolicyAlreadyExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *OriginRequestPolicyAlreadyExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "OriginRequestPolicyAlreadyExists" + } + return *e.ErrorCodeOverride +} +func (e *OriginRequestPolicyAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Cannot delete the origin request policy because it is attached to one or more +// cache behaviors. +type OriginRequestPolicyInUse struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *OriginRequestPolicyInUse) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *OriginRequestPolicyInUse) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *OriginRequestPolicyInUse) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "OriginRequestPolicyInUse" + } + return *e.ErrorCodeOverride +} +func (e *OriginRequestPolicyInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The precondition in one or more of the request fields evaluated to false . +type PreconditionFailed struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *PreconditionFailed) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *PreconditionFailed) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *PreconditionFailed) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "PreconditionFailed" + } + return *e.ErrorCodeOverride +} +func (e *PreconditionFailed) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified public key already exists. +type PublicKeyAlreadyExists struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *PublicKeyAlreadyExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *PublicKeyAlreadyExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *PublicKeyAlreadyExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "PublicKeyAlreadyExists" + } + return *e.ErrorCodeOverride +} +func (e *PublicKeyAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified public key is in use. +type PublicKeyInUse struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *PublicKeyInUse) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *PublicKeyInUse) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *PublicKeyInUse) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "PublicKeyInUse" + } + return *e.ErrorCodeOverride +} +func (e *PublicKeyInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// No profile specified for the field-level encryption query argument. +type QueryArgProfileEmpty struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *QueryArgProfileEmpty) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *QueryArgProfileEmpty) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *QueryArgProfileEmpty) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "QueryArgProfileEmpty" + } + return *e.ErrorCodeOverride +} +func (e *QueryArgProfileEmpty) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// A real-time log configuration with this name already exists. You must provide a +// unique name. To modify an existing real-time log configuration, use +// UpdateRealtimeLogConfig . +type RealtimeLogConfigAlreadyExists struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *RealtimeLogConfigAlreadyExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *RealtimeLogConfigAlreadyExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *RealtimeLogConfigAlreadyExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "RealtimeLogConfigAlreadyExists" + } + return *e.ErrorCodeOverride +} +func (e *RealtimeLogConfigAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Cannot delete the real-time log configuration because it is attached to one or +// more cache behaviors. +type RealtimeLogConfigInUse struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *RealtimeLogConfigInUse) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *RealtimeLogConfigInUse) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *RealtimeLogConfigInUse) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "RealtimeLogConfigInUse" + } + return *e.ErrorCodeOverride +} +func (e *RealtimeLogConfigInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified real-time log configuration belongs to a different Amazon Web +// Services account. +type RealtimeLogConfigOwnerMismatch struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *RealtimeLogConfigOwnerMismatch) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *RealtimeLogConfigOwnerMismatch) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *RealtimeLogConfigOwnerMismatch) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "RealtimeLogConfigOwnerMismatch" + } + return *e.ErrorCodeOverride +} +func (e *RealtimeLogConfigOwnerMismatch) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Cannot delete this resource because it is in use. +type ResourceInUse struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ResourceInUse) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceInUse) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceInUse) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ResourceInUse" + } + return *e.ErrorCodeOverride +} +func (e *ResourceInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// A response headers policy with this name already exists. You must provide a +// unique name. To modify an existing response headers policy, use +// UpdateResponseHeadersPolicy . +type ResponseHeadersPolicyAlreadyExists struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ResponseHeadersPolicyAlreadyExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResponseHeadersPolicyAlreadyExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResponseHeadersPolicyAlreadyExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ResponseHeadersPolicyAlreadyExists" + } + return *e.ErrorCodeOverride +} +func (e *ResponseHeadersPolicyAlreadyExists) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// Cannot delete the response headers policy because it is attached to one or more +// cache behaviors in a CloudFront distribution. +type ResponseHeadersPolicyInUse struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ResponseHeadersPolicyInUse) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResponseHeadersPolicyInUse) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResponseHeadersPolicyInUse) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ResponseHeadersPolicyInUse" + } + return *e.ErrorCodeOverride +} +func (e *ResponseHeadersPolicyInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// A continuous deployment policy for this staging distribution already exists. +type StagingDistributionInUse struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *StagingDistributionInUse) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *StagingDistributionInUse) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *StagingDistributionInUse) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "StagingDistributionInUse" + } + return *e.ErrorCodeOverride +} +func (e *StagingDistributionInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The caller reference you attempted to create the streaming distribution with is +// associated with another distribution +type StreamingDistributionAlreadyExists struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *StreamingDistributionAlreadyExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *StreamingDistributionAlreadyExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *StreamingDistributionAlreadyExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "StreamingDistributionAlreadyExists" + } + return *e.ErrorCodeOverride +} +func (e *StreamingDistributionAlreadyExists) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The specified CloudFront distribution is not disabled. You must disable the +// distribution before you can delete it. +type StreamingDistributionNotDisabled struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *StreamingDistributionNotDisabled) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *StreamingDistributionNotDisabled) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *StreamingDistributionNotDisabled) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "StreamingDistributionNotDisabled" + } + return *e.ErrorCodeOverride +} +func (e *StreamingDistributionNotDisabled) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The CloudFront function failed. +type TestFunctionFailed struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TestFunctionFailed) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TestFunctionFailed) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TestFunctionFailed) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TestFunctionFailed" + } + return *e.ErrorCodeOverride +} +func (e *TestFunctionFailed) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// The length of the Content-Security-Policy header value in the response headers +// policy exceeds the maximum. +// +// For more information, see [Quotas] (formerly known as limits) in the Amazon CloudFront +// Developer Guide. +// +// [Quotas]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html +type TooLongCSPInResponseHeadersPolicy struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooLongCSPInResponseHeadersPolicy) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooLongCSPInResponseHeadersPolicy) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooLongCSPInResponseHeadersPolicy) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooLongCSPInResponseHeadersPolicy" + } + return *e.ErrorCodeOverride +} +func (e *TooLongCSPInResponseHeadersPolicy) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You cannot create more cache behaviors for the distribution. +type TooManyCacheBehaviors struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyCacheBehaviors) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyCacheBehaviors) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyCacheBehaviors) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyCacheBehaviors" + } + return *e.ErrorCodeOverride +} +func (e *TooManyCacheBehaviors) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You have reached the maximum number of cache policies for this Amazon Web +// Services account. For more information, see [Quotas](formerly known as limits) in the +// Amazon CloudFront Developer Guide. +// +// [Quotas]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html +type TooManyCachePolicies struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyCachePolicies) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyCachePolicies) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyCachePolicies) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyCachePolicies" + } + return *e.ErrorCodeOverride +} +func (e *TooManyCachePolicies) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You cannot create anymore custom SSL/TLS certificates. +type TooManyCertificates struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyCertificates) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyCertificates) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyCertificates) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyCertificates" + } + return *e.ErrorCodeOverride +} +func (e *TooManyCertificates) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Processing your request would cause you to exceed the maximum number of origin +// access identities allowed. +type TooManyCloudFrontOriginAccessIdentities struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyCloudFrontOriginAccessIdentities) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyCloudFrontOriginAccessIdentities) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyCloudFrontOriginAccessIdentities) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyCloudFrontOriginAccessIdentities" + } + return *e.ErrorCodeOverride +} +func (e *TooManyCloudFrontOriginAccessIdentities) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// You have reached the maximum number of continuous deployment policies for this +// Amazon Web Services account. +type TooManyContinuousDeploymentPolicies struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyContinuousDeploymentPolicies) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyContinuousDeploymentPolicies) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyContinuousDeploymentPolicies) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyContinuousDeploymentPolicies" + } + return *e.ErrorCodeOverride +} +func (e *TooManyContinuousDeploymentPolicies) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// Your request contains more cookie names in the whitelist than are allowed per +// cache behavior. +type TooManyCookieNamesInWhiteList struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyCookieNamesInWhiteList) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyCookieNamesInWhiteList) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyCookieNamesInWhiteList) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyCookieNamesInWhiteList" + } + return *e.ErrorCodeOverride +} +func (e *TooManyCookieNamesInWhiteList) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The number of cookies in the cache policy exceeds the maximum. For more +// information, see [Quotas](formerly known as limits) in the Amazon CloudFront Developer +// Guide. +// +// [Quotas]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html +type TooManyCookiesInCachePolicy struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyCookiesInCachePolicy) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyCookiesInCachePolicy) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyCookiesInCachePolicy) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyCookiesInCachePolicy" + } + return *e.ErrorCodeOverride +} +func (e *TooManyCookiesInCachePolicy) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The number of cookies in the origin request policy exceeds the maximum. For +// more information, see [Quotas](formerly known as limits) in the Amazon CloudFront +// Developer Guide. +// +// [Quotas]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html +type TooManyCookiesInOriginRequestPolicy struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyCookiesInOriginRequestPolicy) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyCookiesInOriginRequestPolicy) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyCookiesInOriginRequestPolicy) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyCookiesInOriginRequestPolicy" + } + return *e.ErrorCodeOverride +} +func (e *TooManyCookiesInOriginRequestPolicy) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The number of custom headers in the response headers policy exceeds the maximum. +// +// For more information, see [Quotas] (formerly known as limits) in the Amazon CloudFront +// Developer Guide. +// +// [Quotas]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html +type TooManyCustomHeadersInResponseHeadersPolicy struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyCustomHeadersInResponseHeadersPolicy) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyCustomHeadersInResponseHeadersPolicy) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyCustomHeadersInResponseHeadersPolicy) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyCustomHeadersInResponseHeadersPolicy" + } + return *e.ErrorCodeOverride +} +func (e *TooManyCustomHeadersInResponseHeadersPolicy) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// Your request contains more CNAMEs than are allowed per distribution. +type TooManyDistributionCNAMEs struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyDistributionCNAMEs) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyDistributionCNAMEs) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyDistributionCNAMEs) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyDistributionCNAMEs" + } + return *e.ErrorCodeOverride +} +func (e *TooManyDistributionCNAMEs) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Processing your request would cause you to exceed the maximum number of +// distributions allowed. +type TooManyDistributions struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyDistributions) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyDistributions) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyDistributions) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyDistributions" + } + return *e.ErrorCodeOverride +} +func (e *TooManyDistributions) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The maximum number of distributions have been associated with the specified +// cache policy. For more information, see [Quotas](formerly known as limits) in the +// Amazon CloudFront Developer Guide. +// +// [Quotas]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html +type TooManyDistributionsAssociatedToCachePolicy struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyDistributionsAssociatedToCachePolicy) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyDistributionsAssociatedToCachePolicy) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyDistributionsAssociatedToCachePolicy) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyDistributionsAssociatedToCachePolicy" + } + return *e.ErrorCodeOverride +} +func (e *TooManyDistributionsAssociatedToCachePolicy) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The maximum number of distributions have been associated with the specified +// configuration for field-level encryption. +type TooManyDistributionsAssociatedToFieldLevelEncryptionConfig struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyDistributionsAssociatedToFieldLevelEncryptionConfig) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyDistributionsAssociatedToFieldLevelEncryptionConfig) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyDistributionsAssociatedToFieldLevelEncryptionConfig) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig" + } + return *e.ErrorCodeOverride +} +func (e *TooManyDistributionsAssociatedToFieldLevelEncryptionConfig) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The number of distributions that reference this key group is more than the +// maximum allowed. For more information, see [Quotas](formerly known as limits) in the +// Amazon CloudFront Developer Guide. +// +// [Quotas]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html +type TooManyDistributionsAssociatedToKeyGroup struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyDistributionsAssociatedToKeyGroup) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyDistributionsAssociatedToKeyGroup) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyDistributionsAssociatedToKeyGroup) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyDistributionsAssociatedToKeyGroup" + } + return *e.ErrorCodeOverride +} +func (e *TooManyDistributionsAssociatedToKeyGroup) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The maximum number of distributions have been associated with the specified +// origin access control. +// +// For more information, see [Quotas] (formerly known as limits) in the Amazon CloudFront +// Developer Guide. +// +// [Quotas]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html +type TooManyDistributionsAssociatedToOriginAccessControl struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyDistributionsAssociatedToOriginAccessControl) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyDistributionsAssociatedToOriginAccessControl) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyDistributionsAssociatedToOriginAccessControl) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyDistributionsAssociatedToOriginAccessControl" + } + return *e.ErrorCodeOverride +} +func (e *TooManyDistributionsAssociatedToOriginAccessControl) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The maximum number of distributions have been associated with the specified +// origin request policy. For more information, see [Quotas](formerly known as limits) in +// the Amazon CloudFront Developer Guide. +// +// [Quotas]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html +type TooManyDistributionsAssociatedToOriginRequestPolicy struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyDistributionsAssociatedToOriginRequestPolicy) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyDistributionsAssociatedToOriginRequestPolicy) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyDistributionsAssociatedToOriginRequestPolicy) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyDistributionsAssociatedToOriginRequestPolicy" + } + return *e.ErrorCodeOverride +} +func (e *TooManyDistributionsAssociatedToOriginRequestPolicy) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The maximum number of distributions have been associated with the specified +// response headers policy. +// +// For more information, see [Quotas] (formerly known as limits) in the Amazon CloudFront +// Developer Guide. +// +// [Quotas]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html +type TooManyDistributionsAssociatedToResponseHeadersPolicy struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyDistributionsAssociatedToResponseHeadersPolicy) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyDistributionsAssociatedToResponseHeadersPolicy) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyDistributionsAssociatedToResponseHeadersPolicy) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyDistributionsAssociatedToResponseHeadersPolicy" + } + return *e.ErrorCodeOverride +} +func (e *TooManyDistributionsAssociatedToResponseHeadersPolicy) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// You have reached the maximum number of distributions that are associated with a +// CloudFront function. For more information, see [Quotas](formerly known as limits) in +// the Amazon CloudFront Developer Guide. +// +// [Quotas]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html +type TooManyDistributionsWithFunctionAssociations struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyDistributionsWithFunctionAssociations) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyDistributionsWithFunctionAssociations) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyDistributionsWithFunctionAssociations) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyDistributionsWithFunctionAssociations" + } + return *e.ErrorCodeOverride +} +func (e *TooManyDistributionsWithFunctionAssociations) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// Processing your request would cause the maximum number of distributions with +// Lambda@Edge function associations per owner to be exceeded. +type TooManyDistributionsWithLambdaAssociations struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyDistributionsWithLambdaAssociations) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyDistributionsWithLambdaAssociations) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyDistributionsWithLambdaAssociations) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyDistributionsWithLambdaAssociations" + } + return *e.ErrorCodeOverride +} +func (e *TooManyDistributionsWithLambdaAssociations) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The maximum number of distributions have been associated with the specified +// Lambda@Edge function. +type TooManyDistributionsWithSingleFunctionARN struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyDistributionsWithSingleFunctionARN) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyDistributionsWithSingleFunctionARN) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyDistributionsWithSingleFunctionARN) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyDistributionsWithSingleFunctionARN" + } + return *e.ErrorCodeOverride +} +func (e *TooManyDistributionsWithSingleFunctionARN) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The maximum number of configurations for field-level encryption have been +// created. +type TooManyFieldLevelEncryptionConfigs struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyFieldLevelEncryptionConfigs) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyFieldLevelEncryptionConfigs) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyFieldLevelEncryptionConfigs) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyFieldLevelEncryptionConfigs" + } + return *e.ErrorCodeOverride +} +func (e *TooManyFieldLevelEncryptionConfigs) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The maximum number of content type profiles for field-level encryption have +// been created. +type TooManyFieldLevelEncryptionContentTypeProfiles struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyFieldLevelEncryptionContentTypeProfiles) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyFieldLevelEncryptionContentTypeProfiles) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyFieldLevelEncryptionContentTypeProfiles) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyFieldLevelEncryptionContentTypeProfiles" + } + return *e.ErrorCodeOverride +} +func (e *TooManyFieldLevelEncryptionContentTypeProfiles) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The maximum number of encryption entities for field-level encryption have been +// created. +type TooManyFieldLevelEncryptionEncryptionEntities struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyFieldLevelEncryptionEncryptionEntities) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyFieldLevelEncryptionEncryptionEntities) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyFieldLevelEncryptionEncryptionEntities) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyFieldLevelEncryptionEncryptionEntities" + } + return *e.ErrorCodeOverride +} +func (e *TooManyFieldLevelEncryptionEncryptionEntities) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The maximum number of field patterns for field-level encryption have been +// created. +type TooManyFieldLevelEncryptionFieldPatterns struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyFieldLevelEncryptionFieldPatterns) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyFieldLevelEncryptionFieldPatterns) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyFieldLevelEncryptionFieldPatterns) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyFieldLevelEncryptionFieldPatterns" + } + return *e.ErrorCodeOverride +} +func (e *TooManyFieldLevelEncryptionFieldPatterns) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The maximum number of profiles for field-level encryption have been created. +type TooManyFieldLevelEncryptionProfiles struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyFieldLevelEncryptionProfiles) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyFieldLevelEncryptionProfiles) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyFieldLevelEncryptionProfiles) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyFieldLevelEncryptionProfiles" + } + return *e.ErrorCodeOverride +} +func (e *TooManyFieldLevelEncryptionProfiles) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// The maximum number of query arg profiles for field-level encryption have been +// created. +type TooManyFieldLevelEncryptionQueryArgProfiles struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyFieldLevelEncryptionQueryArgProfiles) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyFieldLevelEncryptionQueryArgProfiles) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyFieldLevelEncryptionQueryArgProfiles) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyFieldLevelEncryptionQueryArgProfiles" + } + return *e.ErrorCodeOverride +} +func (e *TooManyFieldLevelEncryptionQueryArgProfiles) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// You have reached the maximum number of CloudFront function associations for +// this distribution. For more information, see [Quotas](formerly known as limits) in the +// Amazon CloudFront Developer Guide. +// +// [Quotas]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html +type TooManyFunctionAssociations struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyFunctionAssociations) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyFunctionAssociations) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyFunctionAssociations) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyFunctionAssociations" + } + return *e.ErrorCodeOverride +} +func (e *TooManyFunctionAssociations) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You have reached the maximum number of CloudFront functions for this Amazon Web +// Services account. For more information, see [Quotas](formerly known as limits) in the +// Amazon CloudFront Developer Guide. +// +// [Quotas]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html +type TooManyFunctions struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyFunctions) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyFunctions) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyFunctions) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyFunctions" + } + return *e.ErrorCodeOverride +} +func (e *TooManyFunctions) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The number of headers in the cache policy exceeds the maximum. For more +// information, see [Quotas](formerly known as limits) in the Amazon CloudFront Developer +// Guide. +// +// [Quotas]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html +type TooManyHeadersInCachePolicy struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyHeadersInCachePolicy) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyHeadersInCachePolicy) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyHeadersInCachePolicy) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyHeadersInCachePolicy" + } + return *e.ErrorCodeOverride +} +func (e *TooManyHeadersInCachePolicy) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Your request contains too many headers in forwarded values. +type TooManyHeadersInForwardedValues struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyHeadersInForwardedValues) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyHeadersInForwardedValues) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyHeadersInForwardedValues) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyHeadersInForwardedValues" + } + return *e.ErrorCodeOverride +} +func (e *TooManyHeadersInForwardedValues) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The number of headers in the origin request policy exceeds the maximum. For +// more information, see [Quotas](formerly known as limits) in the Amazon CloudFront +// Developer Guide. +// +// [Quotas]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html +type TooManyHeadersInOriginRequestPolicy struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyHeadersInOriginRequestPolicy) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyHeadersInOriginRequestPolicy) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyHeadersInOriginRequestPolicy) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyHeadersInOriginRequestPolicy" + } + return *e.ErrorCodeOverride +} +func (e *TooManyHeadersInOriginRequestPolicy) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// You have exceeded the maximum number of allowable InProgress invalidation batch +// requests, or invalidation objects. +type TooManyInvalidationsInProgress struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyInvalidationsInProgress) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyInvalidationsInProgress) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyInvalidationsInProgress) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyInvalidationsInProgress" + } + return *e.ErrorCodeOverride +} +func (e *TooManyInvalidationsInProgress) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You have reached the maximum number of key groups for this Amazon Web Services +// account. For more information, see [Quotas](formerly known as limits) in the Amazon +// CloudFront Developer Guide. +// +// [Quotas]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html +type TooManyKeyGroups struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyKeyGroups) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyKeyGroups) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyKeyGroups) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyKeyGroups" + } + return *e.ErrorCodeOverride +} +func (e *TooManyKeyGroups) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The number of key groups referenced by this distribution is more than the +// maximum allowed. For more information, see [Quotas](formerly known as limits) in the +// Amazon CloudFront Developer Guide. +// +// [Quotas]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html +type TooManyKeyGroupsAssociatedToDistribution struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyKeyGroupsAssociatedToDistribution) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyKeyGroupsAssociatedToDistribution) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyKeyGroupsAssociatedToDistribution) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyKeyGroupsAssociatedToDistribution" + } + return *e.ErrorCodeOverride +} +func (e *TooManyKeyGroupsAssociatedToDistribution) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// Your request contains more Lambda@Edge function associations than are allowed +// per distribution. +type TooManyLambdaFunctionAssociations struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyLambdaFunctionAssociations) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyLambdaFunctionAssociations) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyLambdaFunctionAssociations) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyLambdaFunctionAssociations" + } + return *e.ErrorCodeOverride +} +func (e *TooManyLambdaFunctionAssociations) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The number of origin access controls in your Amazon Web Services account +// exceeds the maximum allowed. +// +// For more information, see [Quotas] (formerly known as limits) in the Amazon CloudFront +// Developer Guide. +// +// [Quotas]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html +type TooManyOriginAccessControls struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyOriginAccessControls) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyOriginAccessControls) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyOriginAccessControls) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyOriginAccessControls" + } + return *e.ErrorCodeOverride +} +func (e *TooManyOriginAccessControls) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Your request contains too many origin custom headers. +type TooManyOriginCustomHeaders struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyOriginCustomHeaders) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyOriginCustomHeaders) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyOriginCustomHeaders) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyOriginCustomHeaders" + } + return *e.ErrorCodeOverride +} +func (e *TooManyOriginCustomHeaders) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Processing your request would cause you to exceed the maximum number of origin +// groups allowed. +type TooManyOriginGroupsPerDistribution struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyOriginGroupsPerDistribution) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyOriginGroupsPerDistribution) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyOriginGroupsPerDistribution) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyOriginGroupsPerDistribution" + } + return *e.ErrorCodeOverride +} +func (e *TooManyOriginGroupsPerDistribution) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// You have reached the maximum number of origin request policies for this Amazon +// Web Services account. For more information, see [Quotas](formerly known as limits) in +// the Amazon CloudFront Developer Guide. +// +// [Quotas]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html +type TooManyOriginRequestPolicies struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyOriginRequestPolicies) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyOriginRequestPolicies) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyOriginRequestPolicies) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyOriginRequestPolicies" + } + return *e.ErrorCodeOverride +} +func (e *TooManyOriginRequestPolicies) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You cannot create more origins for the distribution. +type TooManyOrigins struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyOrigins) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyOrigins) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyOrigins) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyOrigins" + } + return *e.ErrorCodeOverride +} +func (e *TooManyOrigins) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The maximum number of public keys for field-level encryption have been created. +// To create a new public key, delete one of the existing keys. +type TooManyPublicKeys struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyPublicKeys) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyPublicKeys) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyPublicKeys) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyPublicKeys" + } + return *e.ErrorCodeOverride +} +func (e *TooManyPublicKeys) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The number of public keys in this key group is more than the maximum allowed. +// For more information, see [Quotas](formerly known as limits) in the Amazon CloudFront +// Developer Guide. +// +// [Quotas]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html +type TooManyPublicKeysInKeyGroup struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyPublicKeysInKeyGroup) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyPublicKeysInKeyGroup) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyPublicKeysInKeyGroup) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyPublicKeysInKeyGroup" + } + return *e.ErrorCodeOverride +} +func (e *TooManyPublicKeysInKeyGroup) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Your request contains too many query string parameters. +type TooManyQueryStringParameters struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyQueryStringParameters) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyQueryStringParameters) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyQueryStringParameters) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyQueryStringParameters" + } + return *e.ErrorCodeOverride +} +func (e *TooManyQueryStringParameters) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The number of query strings in the cache policy exceeds the maximum. For more +// information, see [Quotas](formerly known as limits) in the Amazon CloudFront Developer +// Guide. +// +// [Quotas]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html +type TooManyQueryStringsInCachePolicy struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyQueryStringsInCachePolicy) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyQueryStringsInCachePolicy) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyQueryStringsInCachePolicy) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyQueryStringsInCachePolicy" + } + return *e.ErrorCodeOverride +} +func (e *TooManyQueryStringsInCachePolicy) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The number of query strings in the origin request policy exceeds the maximum. +// For more information, see [Quotas](formerly known as limits) in the Amazon CloudFront +// Developer Guide. +// +// [Quotas]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html +type TooManyQueryStringsInOriginRequestPolicy struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyQueryStringsInOriginRequestPolicy) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyQueryStringsInOriginRequestPolicy) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyQueryStringsInOriginRequestPolicy) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyQueryStringsInOriginRequestPolicy" + } + return *e.ErrorCodeOverride +} +func (e *TooManyQueryStringsInOriginRequestPolicy) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// You have reached the maximum number of real-time log configurations for this +// Amazon Web Services account. For more information, see [Quotas](formerly known as +// limits) in the Amazon CloudFront Developer Guide. +// +// [Quotas]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html +type TooManyRealtimeLogConfigs struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyRealtimeLogConfigs) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyRealtimeLogConfigs) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyRealtimeLogConfigs) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyRealtimeLogConfigs" + } + return *e.ErrorCodeOverride +} +func (e *TooManyRealtimeLogConfigs) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The number of headers in RemoveHeadersConfig in the response headers policy +// exceeds the maximum. +// +// For more information, see [Quotas] (formerly known as limits) in the Amazon CloudFront +// Developer Guide. +// +// [Quotas]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html +type TooManyRemoveHeadersInResponseHeadersPolicy struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyRemoveHeadersInResponseHeadersPolicy) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyRemoveHeadersInResponseHeadersPolicy) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyRemoveHeadersInResponseHeadersPolicy) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyRemoveHeadersInResponseHeadersPolicy" + } + return *e.ErrorCodeOverride +} +func (e *TooManyRemoveHeadersInResponseHeadersPolicy) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// You have reached the maximum number of response headers policies for this +// Amazon Web Services account. +// +// For more information, see [Quotas] (formerly known as limits) in the Amazon CloudFront +// Developer Guide. +// +// [Quotas]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html +type TooManyResponseHeadersPolicies struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyResponseHeadersPolicies) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyResponseHeadersPolicies) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyResponseHeadersPolicies) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyResponseHeadersPolicies" + } + return *e.ErrorCodeOverride +} +func (e *TooManyResponseHeadersPolicies) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Your request contains more CNAMEs than are allowed per distribution. +type TooManyStreamingDistributionCNAMEs struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyStreamingDistributionCNAMEs) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyStreamingDistributionCNAMEs) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyStreamingDistributionCNAMEs) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyStreamingDistributionCNAMEs" + } + return *e.ErrorCodeOverride +} +func (e *TooManyStreamingDistributionCNAMEs) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// Processing your request would cause you to exceed the maximum number of +// streaming distributions allowed. +type TooManyStreamingDistributions struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyStreamingDistributions) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyStreamingDistributions) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyStreamingDistributions) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyStreamingDistributions" + } + return *e.ErrorCodeOverride +} +func (e *TooManyStreamingDistributions) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Your request contains more trusted signers than are allowed per distribution. +type TooManyTrustedSigners struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TooManyTrustedSigners) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyTrustedSigners) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyTrustedSigners) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyTrustedSigners" + } + return *e.ErrorCodeOverride +} +func (e *TooManyTrustedSigners) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified key group does not exist. +type TrustedKeyGroupDoesNotExist struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TrustedKeyGroupDoesNotExist) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TrustedKeyGroupDoesNotExist) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TrustedKeyGroupDoesNotExist) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TrustedKeyGroupDoesNotExist" + } + return *e.ErrorCodeOverride +} +func (e *TrustedKeyGroupDoesNotExist) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// One or more of your trusted signers don't exist. +type TrustedSignerDoesNotExist struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *TrustedSignerDoesNotExist) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TrustedSignerDoesNotExist) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TrustedSignerDoesNotExist) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TrustedSignerDoesNotExist" + } + return *e.ErrorCodeOverride +} +func (e *TrustedSignerDoesNotExist) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// This operation is not supported in this region. +type UnsupportedOperation struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *UnsupportedOperation) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *UnsupportedOperation) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *UnsupportedOperation) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "UnsupportedOperation" + } + return *e.ErrorCodeOverride +} +func (e *UnsupportedOperation) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/types/types.go new file mode 100644 index 0000000000..7b8baae95a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/types/types.go @@ -0,0 +1,5600 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + smithydocument "github.com/aws/smithy-go/document" + "time" +) + +// A list of key groups, and the public keys in each key group, that CloudFront +// can use to verify the signatures of signed URLs and signed cookies. +type ActiveTrustedKeyGroups struct { + + // This field is true if any of the key groups have public keys that CloudFront + // can use to verify the signatures of signed URLs and signed cookies. If not, this + // field is false . + // + // This member is required. + Enabled *bool + + // The number of key groups in the list. + // + // This member is required. + Quantity *int32 + + // A list of key groups, including the identifiers of the public keys in each key + // group that CloudFront can use to verify the signatures of signed URLs and signed + // cookies. + Items []KGKeyPairIds + + noSmithyDocumentSerde +} + +// A list of Amazon Web Services accounts and the active CloudFront key pairs in +// each account that CloudFront can use to verify the signatures of signed URLs and +// signed cookies. +type ActiveTrustedSigners struct { + + // This field is true if any of the Amazon Web Services accounts in the list are + // configured as trusted signers. If not, this field is false . + // + // This member is required. + Enabled *bool + + // The number of Amazon Web Services accounts in the list. + // + // This member is required. + Quantity *int32 + + // A list of Amazon Web Services accounts and the identifiers of active CloudFront + // key pairs in each account that CloudFront can use to verify the signatures of + // signed URLs and signed cookies. + Items []Signer + + noSmithyDocumentSerde +} + +// A complex type that contains information about CNAMEs (alternate domain names), +// if any, for this distribution. +type Aliases struct { + + // The number of CNAME aliases, if any, that you want to associate with this + // distribution. + // + // This member is required. + Quantity *int32 + + // A complex type that contains the CNAME aliases, if any, that you want to + // associate with this distribution. + Items []string + + noSmithyDocumentSerde +} + +// Amazon Web Services services in China customers must file for an Internet +// Content Provider (ICP) recordal if they want to serve content publicly on an +// alternate domain name, also known as a CNAME, that they've added to CloudFront. +// AliasICPRecordal provides the ICP recordal status for CNAMEs associated with +// distributions. The status is returned in the CloudFront response; you can't +// configure it yourself. +// +// For more information about ICP recordals, see [Signup, Accounts, and Credentials] in Getting Started with Amazon +// Web Services services in China. +// +// [Signup, Accounts, and Credentials]: https://docs.amazonaws.cn/en_us/aws/latest/userguide/accounts-and-credentials.html +type AliasICPRecordal struct { + + // A domain name associated with a distribution. + CNAME *string + + // The Internet Content Provider (ICP) recordal status for a CNAME. The + // ICPRecordalStatus is set to APPROVED for all CNAMEs (aliases) in regions outside + // of China. + // + // The status values returned are the following: + // + // - APPROVED indicates that the associated CNAME has a valid ICP recordal + // number. Multiple CNAMEs can be associated with a distribution, and CNAMEs can + // correspond to different ICP recordals. To be marked as APPROVED, that is, valid + // to use with China region, a CNAME must have one ICP recordal number associated + // with it. + // + // - SUSPENDED indicates that the associated CNAME does not have a valid ICP + // recordal number. + // + // - PENDING indicates that CloudFront can't determine the ICP recordal status + // of the CNAME associated with the distribution because there was an error in + // trying to determine the status. You can try again to see if the error is + // resolved in which case CloudFront returns an APPROVED or SUSPENDED status. + ICPRecordalStatus ICPRecordalStatus + + noSmithyDocumentSerde +} + +// A complex type that controls which HTTP methods CloudFront processes and +// forwards to your Amazon S3 bucket or your custom origin. There are three +// choices: +// +// - CloudFront forwards only GET and HEAD requests. +// +// - CloudFront forwards only GET , HEAD , and OPTIONS requests. +// +// - CloudFront forwards GET, HEAD, OPTIONS, PUT, PATCH, POST , and DELETE +// requests. +// +// If you pick the third choice, you may need to restrict access to your Amazon S3 +// bucket or to your custom origin so users can't perform operations that you don't +// want them to. For example, you might not want users to have permissions to +// delete objects from your origin. +type AllowedMethods struct { + + // A complex type that contains the HTTP methods that you want CloudFront to + // process and forward to your origin. + // + // This member is required. + Items []Method + + // The number of HTTP methods that you want CloudFront to forward to your origin. + // Valid values are 2 (for GET and HEAD requests), 3 (for GET , HEAD , and OPTIONS + // requests) and 7 (for GET, HEAD, OPTIONS, PUT, PATCH, POST , and DELETE + // requests). + // + // This member is required. + Quantity *int32 + + // A complex type that controls whether CloudFront caches the response to requests + // using the specified HTTP methods. There are two choices: + // + // - CloudFront caches responses to GET and HEAD requests. + // + // - CloudFront caches responses to GET , HEAD , and OPTIONS requests. + // + // If you pick the second choice for your Amazon S3 Origin, you may need to + // forward Access-Control-Request-Method, Access-Control-Request-Headers, and + // Origin headers for the responses to be cached correctly. + CachedMethods *CachedMethods + + noSmithyDocumentSerde +} + +// A complex type that describes how CloudFront processes requests. +// +// You must create at least as many cache behaviors (including the default cache +// behavior) as you have origins if you want CloudFront to serve objects from all +// of the origins. Each cache behavior specifies the one origin from which you want +// CloudFront to get objects. If you have two origins and only the default cache +// behavior, the default cache behavior will cause CloudFront to get objects from +// one of the origins, but the other origin is never used. +// +// For the current quota (formerly known as limit) on the number of cache +// behaviors that you can add to a distribution, see [Quotas]in the Amazon CloudFront +// Developer Guide. +// +// If you don't want to specify any cache behaviors, include only an empty +// CacheBehaviors element. Don't specify an empty individual CacheBehavior +// element, because this is invalid. For more information, see [CacheBehaviors]. +// +// To delete all cache behaviors in an existing distribution, update the +// distribution configuration and include only an empty CacheBehaviors element. +// +// To add, change, or remove one or more cache behaviors, update the distribution +// configuration and specify all of the cache behaviors that you want to include in +// the updated distribution. +// +// For more information about cache behaviors, see [Cache Behavior Settings] in the Amazon CloudFront +// Developer Guide. +// +// [Cache Behavior Settings]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesCacheBehavior +// [Quotas]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html +// [CacheBehaviors]: https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_CacheBehaviors.html +type CacheBehavior struct { + + // The pattern (for example, images/*.jpg ) that specifies which requests to apply + // the behavior to. When CloudFront receives a viewer request, the requested path + // is compared with path patterns in the order in which cache behaviors are listed + // in the distribution. + // + // You can optionally include a slash ( / ) at the beginning of the path pattern. + // For example, /images/*.jpg . CloudFront behavior is the same with or without the + // leading / . + // + // The path pattern for the default cache behavior is * and cannot be changed. If + // the request for an object does not match the path pattern for any cache + // behaviors, CloudFront applies the behavior in the default cache behavior. + // + // For more information, see [Path Pattern] in the Amazon CloudFront Developer Guide. + // + // [Path Pattern]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesPathPattern + // + // This member is required. + PathPattern *string + + // The value of ID for the origin that you want CloudFront to route requests to + // when they match this cache behavior. + // + // This member is required. + TargetOriginId *string + + // The protocol that viewers can use to access the files in the origin specified + // by TargetOriginId when a request matches the path pattern in PathPattern . You + // can specify the following options: + // + // - allow-all : Viewers can use HTTP or HTTPS. + // + // - redirect-to-https : If a viewer submits an HTTP request, CloudFront returns + // an HTTP status code of 301 (Moved Permanently) to the viewer along with the + // HTTPS URL. The viewer then resubmits the request using the new URL. + // + // - https-only : If a viewer sends an HTTP request, CloudFront returns an HTTP + // status code of 403 (Forbidden). + // + // For more information about requiring the HTTPS protocol, see [Requiring HTTPS Between Viewers and CloudFront] in the Amazon + // CloudFront Developer Guide. + // + // The only way to guarantee that viewers retrieve an object that was fetched from + // the origin using HTTPS is never to use any other protocol to fetch the object. + // If you have recently changed from HTTP to HTTPS, we recommend that you clear + // your objects' cache because cached objects are protocol agnostic. That means + // that an edge location will return an object from the cache regardless of whether + // the current request protocol matches the protocol used previously. For more + // information, see [Managing Cache Expiration]in the Amazon CloudFront Developer Guide. + // + // [Requiring HTTPS Between Viewers and CloudFront]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-https-viewers-to-cloudfront.html + // [Managing Cache Expiration]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html + // + // This member is required. + ViewerProtocolPolicy ViewerProtocolPolicy + + // A complex type that controls which HTTP methods CloudFront processes and + // forwards to your Amazon S3 bucket or your custom origin. There are three + // choices: + // + // - CloudFront forwards only GET and HEAD requests. + // + // - CloudFront forwards only GET , HEAD , and OPTIONS requests. + // + // - CloudFront forwards GET, HEAD, OPTIONS, PUT, PATCH, POST , and DELETE + // requests. + // + // If you pick the third choice, you may need to restrict access to your Amazon S3 + // bucket or to your custom origin so users can't perform operations that you don't + // want them to. For example, you might not want users to have permissions to + // delete objects from your origin. + AllowedMethods *AllowedMethods + + // The unique identifier of the cache policy that is attached to this cache + // behavior. For more information, see [Creating cache policies]or [Using the managed cache policies] in the Amazon CloudFront Developer + // Guide. + // + // A CacheBehavior must include either a CachePolicyId or ForwardedValues . We + // recommend that you use a CachePolicyId . + // + // [Creating cache policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy + // [Using the managed cache policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html + CachePolicyId *string + + // Whether you want CloudFront to automatically compress certain files for this + // cache behavior. If so, specify true; if not, specify false. For more + // information, see [Serving Compressed Files]in the Amazon CloudFront Developer Guide. + // + // [Serving Compressed Files]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html + Compress *bool + + // This field is deprecated. We recommend that you use the DefaultTTL field in a + // cache policy instead of this field. For more information, see [Creating cache policies]or [Using the managed cache policies] in the Amazon + // CloudFront Developer Guide. + // + // The default amount of time that you want objects to stay in CloudFront caches + // before CloudFront forwards another request to your origin to determine whether + // the object has been updated. The value that you specify applies only when your + // origin does not add HTTP headers such as Cache-Control max-age , Cache-Control + // s-maxage , and Expires to objects. For more information, see [Managing How Long Content Stays in an Edge Cache (Expiration)] in the Amazon + // CloudFront Developer Guide. + // + // [Creating cache policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy + // [Using the managed cache policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html + // [Managing How Long Content Stays in an Edge Cache (Expiration)]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html + // + // Deprecated: This member has been deprecated. + DefaultTTL *int64 + + // The value of ID for the field-level encryption configuration that you want + // CloudFront to use for encrypting specific fields of data for this cache + // behavior. + FieldLevelEncryptionId *string + + // This field is deprecated. We recommend that you use a cache policy or an origin + // request policy instead of this field. For more information, see [Working with policies]in the Amazon + // CloudFront Developer Guide. + // + // If you want to include values in the cache key, use a cache policy. For more + // information, see [Creating cache policies]or [Using the managed cache policies] in the Amazon CloudFront Developer Guide. + // + // If you want to send values to the origin but not include them in the cache key, + // use an origin request policy. For more information, see [Creating origin request policies]or [Using the managed origin request policies] in the Amazon + // CloudFront Developer Guide. + // + // A CacheBehavior must include either a CachePolicyId or ForwardedValues . We + // recommend that you use a CachePolicyId . + // + // A complex type that specifies how CloudFront handles query strings, cookies, + // and HTTP headers. + // + // [Working with policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/working-with-policies.html + // [Using the managed origin request policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-origin-request-policies.html + // [Creating origin request policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy + // [Creating cache policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy + // [Using the managed cache policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html + // + // Deprecated: This member has been deprecated. + ForwardedValues *ForwardedValues + + // A list of CloudFront functions that are associated with this cache behavior. + // CloudFront functions must be published to the LIVE stage to associate them with + // a cache behavior. + FunctionAssociations *FunctionAssociations + + // A complex type that contains zero or more Lambda@Edge function associations for + // a cache behavior. + LambdaFunctionAssociations *LambdaFunctionAssociations + + // This field is deprecated. We recommend that you use the MaxTTL field in a cache + // policy instead of this field. For more information, see [Creating cache policies]or [Using the managed cache policies] in the Amazon + // CloudFront Developer Guide. + // + // The maximum amount of time that you want objects to stay in CloudFront caches + // before CloudFront forwards another request to your origin to determine whether + // the object has been updated. The value that you specify applies only when your + // origin adds HTTP headers such as Cache-Control max-age , Cache-Control s-maxage + // , and Expires to objects. For more information, see [Managing How Long Content Stays in an Edge Cache (Expiration)] in the Amazon CloudFront + // Developer Guide. + // + // [Creating cache policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy + // [Using the managed cache policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html + // [Managing How Long Content Stays in an Edge Cache (Expiration)]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html + // + // Deprecated: This member has been deprecated. + MaxTTL *int64 + + // This field is deprecated. We recommend that you use the MinTTL field in a cache + // policy instead of this field. For more information, see [Creating cache policies]or [Using the managed cache policies] in the Amazon + // CloudFront Developer Guide. + // + // The minimum amount of time that you want objects to stay in CloudFront caches + // before CloudFront forwards another request to your origin to determine whether + // the object has been updated. For more information, see [Managing How Long Content Stays in an Edge Cache (Expiration)]in the Amazon CloudFront + // Developer Guide. + // + // You must specify 0 for MinTTL if you configure CloudFront to forward all + // headers to your origin (under Headers , if you specify 1 for Quantity and * for + // Name ). + // + // [Creating cache policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy + // [Using the managed cache policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html + // [Managing How Long Content Stays in an Edge Cache (Expiration)]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html + // + // Deprecated: This member has been deprecated. + MinTTL *int64 + + // The unique identifier of the origin request policy that is attached to this + // cache behavior. For more information, see [Creating origin request policies]or [Using the managed origin request policies] in the Amazon CloudFront + // Developer Guide. + // + // [Using the managed origin request policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-origin-request-policies.html + // [Creating origin request policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy + OriginRequestPolicyId *string + + // The Amazon Resource Name (ARN) of the real-time log configuration that is + // attached to this cache behavior. For more information, see [Real-time logs]in the Amazon + // CloudFront Developer Guide. + // + // [Real-time logs]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html + RealtimeLogConfigArn *string + + // The identifier for a response headers policy. + ResponseHeadersPolicyId *string + + // Indicates whether you want to distribute media files in the Microsoft Smooth + // Streaming format using the origin that is associated with this cache behavior. + // If so, specify true ; if not, specify false . If you specify true for + // SmoothStreaming , you can still distribute other content using this cache + // behavior if the content matches the value of PathPattern . + SmoothStreaming *bool + + // A list of key groups that CloudFront can use to validate signed URLs or signed + // cookies. + // + // When a cache behavior contains trusted key groups, CloudFront requires signed + // URLs or signed cookies for all requests that match the cache behavior. The URLs + // or cookies must be signed with a private key whose corresponding public key is + // in the key group. The signed URL or cookie contains information about which + // public key CloudFront should use to verify the signature. For more information, + // see [Serving private content]in the Amazon CloudFront Developer Guide. + // + // [Serving private content]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html + TrustedKeyGroups *TrustedKeyGroups + + // We recommend using TrustedKeyGroups instead of TrustedSigners . + // + // A list of Amazon Web Services account IDs whose public keys CloudFront can use + // to validate signed URLs or signed cookies. + // + // When a cache behavior contains trusted signers, CloudFront requires signed URLs + // or signed cookies for all requests that match the cache behavior. The URLs or + // cookies must be signed with the private key of a CloudFront key pair in the + // trusted signer's Amazon Web Services account. The signed URL or cookie contains + // information about which public key CloudFront should use to verify the + // signature. For more information, see [Serving private content]in the Amazon CloudFront Developer Guide. + // + // [Serving private content]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html + TrustedSigners *TrustedSigners + + noSmithyDocumentSerde +} + +// A complex type that contains zero or more CacheBehavior elements. +type CacheBehaviors struct { + + // The number of cache behaviors for this distribution. + // + // This member is required. + Quantity *int32 + + // Optional: A complex type that contains cache behaviors for this distribution. + // If Quantity is 0 , you can omit Items . + Items []CacheBehavior + + noSmithyDocumentSerde +} + +// A complex type that controls whether CloudFront caches the response to requests +// using the specified HTTP methods. There are two choices: +// +// - CloudFront caches responses to GET and HEAD requests. +// +// - CloudFront caches responses to GET , HEAD , and OPTIONS requests. +// +// If you pick the second choice for your Amazon S3 Origin, you may need to +// forward Access-Control-Request-Method, Access-Control-Request-Headers, and +// Origin headers for the responses to be cached correctly. +type CachedMethods struct { + + // A complex type that contains the HTTP methods that you want CloudFront to cache + // responses to. Valid values for CachedMethods include GET , HEAD , and OPTIONS , + // depending on which caching option you choose. For more information, see the + // preceding section. + // + // This member is required. + Items []Method + + // The number of HTTP methods for which you want CloudFront to cache responses. + // Valid values are 2 (for caching responses to GET and HEAD requests) and 3 (for + // caching responses to GET , HEAD , and OPTIONS requests). + // + // This member is required. + Quantity *int32 + + noSmithyDocumentSerde +} + +// A cache policy. +// +// When it's attached to a cache behavior, the cache policy determines the +// following: +// +// - The values that CloudFront includes in the cache key. These values can +// include HTTP headers, cookies, and URL query strings. CloudFront uses the cache +// key to find an object in its cache that it can return to the viewer. +// +// - The default, minimum, and maximum time to live (TTL) values that you want +// objects to stay in the CloudFront cache. +// +// The headers, cookies, and query strings that are included in the cache key are +// also included in requests that CloudFront sends to the origin. CloudFront sends +// a request when it can't find a valid object in its cache that matches the +// request's cache key. If you want to send values to the origin but not include +// them in the cache key, use OriginRequestPolicy . +type CachePolicy struct { + + // The cache policy configuration. + // + // This member is required. + CachePolicyConfig *CachePolicyConfig + + // The unique identifier for the cache policy. + // + // This member is required. + Id *string + + // The date and time when the cache policy was last modified. + // + // This member is required. + LastModifiedTime *time.Time + + noSmithyDocumentSerde +} + +// A cache policy configuration. +// +// This configuration determines the following: +// +// - The values that CloudFront includes in the cache key. These values can +// include HTTP headers, cookies, and URL query strings. CloudFront uses the cache +// key to find an object in its cache that it can return to the viewer. +// +// - The default, minimum, and maximum time to live (TTL) values that you want +// objects to stay in the CloudFront cache. +// +// The headers, cookies, and query strings that are included in the cache key are +// also included in requests that CloudFront sends to the origin. CloudFront sends +// a request when it can't find a valid object in its cache that matches the +// request's cache key. If you want to send values to the origin but not include +// them in the cache key, use OriginRequestPolicy . +type CachePolicyConfig struct { + + // The minimum amount of time, in seconds, that you want objects to stay in the + // CloudFront cache before CloudFront sends another request to the origin to see if + // the object has been updated. For more information, see [Managing How Long Content Stays in an Edge Cache (Expiration)]in the Amazon CloudFront + // Developer Guide. + // + // [Managing How Long Content Stays in an Edge Cache (Expiration)]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html + // + // This member is required. + MinTTL *int64 + + // A unique name to identify the cache policy. + // + // This member is required. + Name *string + + // A comment to describe the cache policy. The comment cannot be longer than 128 + // characters. + Comment *string + + // The default amount of time, in seconds, that you want objects to stay in the + // CloudFront cache before CloudFront sends another request to the origin to see if + // the object has been updated. CloudFront uses this value as the object's time to + // live (TTL) only when the origin does not send Cache-Control or Expires headers + // with the object. For more information, see [Managing How Long Content Stays in an Edge Cache (Expiration)]in the Amazon CloudFront Developer + // Guide. + // + // The default value for this field is 86400 seconds (one day). If the value of + // MinTTL is more than 86400 seconds, then the default value for this field is the + // same as the value of MinTTL . + // + // [Managing How Long Content Stays in an Edge Cache (Expiration)]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html + DefaultTTL *int64 + + // The maximum amount of time, in seconds, that objects stay in the CloudFront + // cache before CloudFront sends another request to the origin to see if the object + // has been updated. CloudFront uses this value only when the origin sends + // Cache-Control or Expires headers with the object. For more information, see [Managing How Long Content Stays in an Edge Cache (Expiration)] in + // the Amazon CloudFront Developer Guide. + // + // The default value for this field is 31536000 seconds (one year). If the value + // of MinTTL or DefaultTTL is more than 31536000 seconds, then the default value + // for this field is the same as the value of DefaultTTL . + // + // [Managing How Long Content Stays in an Edge Cache (Expiration)]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html + MaxTTL *int64 + + // The HTTP headers, cookies, and URL query strings to include in the cache key. + // The values included in the cache key are also included in requests that + // CloudFront sends to the origin. + ParametersInCacheKeyAndForwardedToOrigin *ParametersInCacheKeyAndForwardedToOrigin + + noSmithyDocumentSerde +} + +// An object that determines whether any cookies in viewer requests (and if so, +// which cookies) are included in the cache key and in requests that CloudFront +// sends to the origin. +type CachePolicyCookiesConfig struct { + + // Determines whether any cookies in viewer requests are included in the cache key + // and in requests that CloudFront sends to the origin. Valid values are: + // + // - none – No cookies in viewer requests are included in the cache key or in + // requests that CloudFront sends to the origin. Even when this field is set to + // none , any cookies that are listed in an OriginRequestPolicy are included in + // origin requests. + // + // - whitelist – Only the cookies in viewer requests that are listed in the + // CookieNames type are included in the cache key and in requests that CloudFront + // sends to the origin. + // + // - allExcept – All cookies in viewer requests are included in the cache key and + // in requests that CloudFront sends to the origin, except for those that are + // listed in the CookieNames type, which are not included. + // + // - all – All cookies in viewer requests are included in the cache key and in + // requests that CloudFront sends to the origin. + // + // This member is required. + CookieBehavior CachePolicyCookieBehavior + + // Contains a list of cookie names. + Cookies *CookieNames + + noSmithyDocumentSerde +} + +// An object that determines whether any HTTP headers (and if so, which headers) +// are included in the cache key and in requests that CloudFront sends to the +// origin. +type CachePolicyHeadersConfig struct { + + // Determines whether any HTTP headers are included in the cache key and in + // requests that CloudFront sends to the origin. Valid values are: + // + // - none – No HTTP headers are included in the cache key or in requests that + // CloudFront sends to the origin. Even when this field is set to none , any + // headers that are listed in an OriginRequestPolicy are included in origin + // requests. + // + // - whitelist – Only the HTTP headers that are listed in the Headers type are + // included in the cache key and in requests that CloudFront sends to the origin. + // + // This member is required. + HeaderBehavior CachePolicyHeaderBehavior + + // Contains a list of HTTP header names. + Headers *Headers + + noSmithyDocumentSerde +} + +// A list of cache policies. +type CachePolicyList struct { + + // The maximum number of cache policies requested. + // + // This member is required. + MaxItems *int32 + + // The total number of cache policies returned in the response. + // + // This member is required. + Quantity *int32 + + // Contains the cache policies in the list. + Items []CachePolicySummary + + // If there are more items in the list than are in this response, this element is + // present. It contains the value that you should use in the Marker field of a + // subsequent request to continue listing cache policies where you left off. + NextMarker *string + + noSmithyDocumentSerde +} + +// An object that determines whether any URL query strings in viewer requests (and +// if so, which query strings) are included in the cache key and in requests that +// CloudFront sends to the origin. +type CachePolicyQueryStringsConfig struct { + + // Determines whether any URL query strings in viewer requests are included in the + // cache key and in requests that CloudFront sends to the origin. Valid values are: + // + // - none – No query strings in viewer requests are included in the cache key or + // in requests that CloudFront sends to the origin. Even when this field is set to + // none , any query strings that are listed in an OriginRequestPolicy are + // included in origin requests. + // + // - whitelist – Only the query strings in viewer requests that are listed in the + // QueryStringNames type are included in the cache key and in requests that + // CloudFront sends to the origin. + // + // - allExcept – All query strings in viewer requests are included in the cache + // key and in requests that CloudFront sends to the origin, except those that are + // listed in the QueryStringNames type, which are not included. + // + // - all – All query strings in viewer requests are included in the cache key and + // in requests that CloudFront sends to the origin. + // + // This member is required. + QueryStringBehavior CachePolicyQueryStringBehavior + + // Contains the specific query strings in viewer requests that either are or are + // not included in the cache key and in requests that CloudFront sends to the + // origin. The behavior depends on whether the QueryStringBehavior field in the + // CachePolicyQueryStringsConfig type is set to whitelist (the listed query + // strings are included) or allExcept (the listed query strings are not included, + // but all other query strings are). + QueryStrings *QueryStringNames + + noSmithyDocumentSerde +} + +// Contains a cache policy. +type CachePolicySummary struct { + + // The cache policy. + // + // This member is required. + CachePolicy *CachePolicy + + // The type of cache policy, either managed (created by Amazon Web Services) or + // custom (created in this Amazon Web Services account). + // + // This member is required. + Type CachePolicyType + + noSmithyDocumentSerde +} + +// CloudFront origin access identity. +type CloudFrontOriginAccessIdentity struct { + + // The ID for the origin access identity, for example, E74FTE3AJFJ256A . + // + // This member is required. + Id *string + + // The Amazon S3 canonical user ID for the origin access identity, used when + // giving the origin access identity read permission to an object in Amazon S3. + // + // This member is required. + S3CanonicalUserId *string + + // The current configuration information for the identity. + CloudFrontOriginAccessIdentityConfig *CloudFrontOriginAccessIdentityConfig + + noSmithyDocumentSerde +} + +// Origin access identity configuration. Send a GET request to the /CloudFront API +// version/CloudFront/identity ID/config resource. +type CloudFrontOriginAccessIdentityConfig struct { + + // A unique value (for example, a date-time stamp) that ensures that the request + // can't be replayed. + // + // If the value of CallerReference is new (regardless of the content of the + // CloudFrontOriginAccessIdentityConfig object), a new origin access identity is + // created. + // + // If the CallerReference is a value already sent in a previous identity request, + // and the content of the CloudFrontOriginAccessIdentityConfig is identical to the + // original request (ignoring white space), the response includes the same + // information returned to the original request. + // + // If the CallerReference is a value you already sent in a previous request to + // create an identity, but the content of the CloudFrontOriginAccessIdentityConfig + // is different from the original request, CloudFront returns a + // CloudFrontOriginAccessIdentityAlreadyExists error. + // + // This member is required. + CallerReference *string + + // A comment to describe the origin access identity. The comment cannot be longer + // than 128 characters. + // + // This member is required. + Comment *string + + noSmithyDocumentSerde +} + +// Lists the origin access identities for CloudFront.Send a GET request to the +// /CloudFront API version/origin-access-identity/cloudfront resource. The response +// includes a CloudFrontOriginAccessIdentityList element with zero or more +// CloudFrontOriginAccessIdentitySummary child elements. By default, your entire +// list of origin access identities is returned in one single page. If the list is +// long, you can paginate it using the MaxItems and Marker parameters. +type CloudFrontOriginAccessIdentityList struct { + + // A flag that indicates whether more origin access identities remain to be + // listed. If your results were truncated, you can make a follow-up pagination + // request using the Marker request parameter to retrieve more items in the list. + // + // This member is required. + IsTruncated *bool + + // Use this when paginating results to indicate where to begin in your list of + // origin access identities. The results include identities in the list that occur + // after the marker. To get the next page of results, set the Marker to the value + // of the NextMarker from the current page's response (which is also the ID of the + // last identity on that page). + // + // This member is required. + Marker *string + + // The maximum number of origin access identities you want in the response body. + // + // This member is required. + MaxItems *int32 + + // The number of CloudFront origin access identities that were created by the + // current Amazon Web Services account. + // + // This member is required. + Quantity *int32 + + // A complex type that contains one CloudFrontOriginAccessIdentitySummary element + // for each origin access identity that was created by the current Amazon Web + // Services account. + Items []CloudFrontOriginAccessIdentitySummary + + // If IsTruncated is true , this element is present and contains the value you can + // use for the Marker request parameter to continue listing your origin access + // identities where they left off. + NextMarker *string + + noSmithyDocumentSerde +} + +// Summary of the information about a CloudFront origin access identity. +type CloudFrontOriginAccessIdentitySummary struct { + + // The comment for this origin access identity, as originally specified when + // created. + // + // This member is required. + Comment *string + + // The ID for the origin access identity. For example: E74FTE3AJFJ256A . + // + // This member is required. + Id *string + + // The Amazon S3 canonical user ID for the origin access identity, which you use + // when giving the origin access identity read permission to an object in Amazon + // S3. + // + // This member is required. + S3CanonicalUserId *string + + noSmithyDocumentSerde +} + +// An alias (also called a CNAME) and the CloudFront distribution and Amazon Web +// Services account ID that it's associated with. The distribution and account IDs +// are partially hidden, which allows you to identify the distributions and +// accounts that you own, but helps to protect the information of ones that you +// don't own. +type ConflictingAlias struct { + + // The (partially hidden) ID of the Amazon Web Services account that owns the + // distribution that's associated with the alias. + AccountId *string + + // An alias (also called a CNAME). + Alias *string + + // The (partially hidden) ID of the CloudFront distribution associated with the + // alias. + DistributionId *string + + noSmithyDocumentSerde +} + +// A list of aliases (also called CNAMEs) and the CloudFront distributions and +// Amazon Web Services accounts that they are associated with. In the list, the +// distribution and account IDs are partially hidden, which allows you to identify +// the distributions and accounts that you own, but helps to protect the +// information of ones that you don't own. +type ConflictingAliasesList struct { + + // Contains the conflicting aliases in the list. + Items []ConflictingAlias + + // The maximum number of conflicting aliases requested. + MaxItems *int32 + + // If there are more items in the list than are in this response, this element is + // present. It contains the value that you should use in the Marker field of a + // subsequent request to continue listing conflicting aliases where you left off. + NextMarker *string + + // The number of conflicting aliases returned in the response. + Quantity *int32 + + noSmithyDocumentSerde +} + +// A field-level encryption content type profile. +type ContentTypeProfile struct { + + // The content type for a field-level encryption content type-profile mapping. + // + // This member is required. + ContentType *string + + // The format for a field-level encryption content type-profile mapping. + // + // This member is required. + Format Format + + // The profile ID for a field-level encryption content type-profile mapping. + ProfileId *string + + noSmithyDocumentSerde +} + +// The configuration for a field-level encryption content type-profile mapping. +type ContentTypeProfileConfig struct { + + // The setting in a field-level encryption content type-profile mapping that + // specifies what to do when an unknown content type is provided for the profile. + // If true, content is forwarded without being encrypted when the content type is + // unknown. If false (the default), an error is returned when the content type is + // unknown. + // + // This member is required. + ForwardWhenContentTypeIsUnknown *bool + + // The configuration for a field-level encryption content type-profile. + ContentTypeProfiles *ContentTypeProfiles + + noSmithyDocumentSerde +} + +// Field-level encryption content type-profile. +type ContentTypeProfiles struct { + + // The number of field-level encryption content type-profile mappings. + // + // This member is required. + Quantity *int32 + + // Items in a field-level encryption content type-profile mapping. + Items []ContentTypeProfile + + noSmithyDocumentSerde +} + +// A continuous deployment policy. +type ContinuousDeploymentPolicy struct { + + // Contains the configuration for a continuous deployment policy. + // + // This member is required. + ContinuousDeploymentPolicyConfig *ContinuousDeploymentPolicyConfig + + // The identifier of the continuous deployment policy. + // + // This member is required. + Id *string + + // The date and time the continuous deployment policy was last modified. + // + // This member is required. + LastModifiedTime *time.Time + + noSmithyDocumentSerde +} + +// Contains the configuration for a continuous deployment policy. +type ContinuousDeploymentPolicyConfig struct { + + // A Boolean that indicates whether this continuous deployment policy is enabled + // (in effect). When this value is true , this policy is enabled and in effect. + // When this value is false , this policy is not enabled and has no effect. + // + // This member is required. + Enabled *bool + + // The CloudFront domain name of the staging distribution. For example: + // d111111abcdef8.cloudfront.net . + // + // This member is required. + StagingDistributionDnsNames *StagingDistributionDnsNames + + // Contains the parameters for routing production traffic from your primary to + // staging distributions. + TrafficConfig *TrafficConfig + + noSmithyDocumentSerde +} + +// Contains a list of continuous deployment policies. +type ContinuousDeploymentPolicyList struct { + + // The maximum number of continuous deployment policies that were specified in + // your request. + // + // This member is required. + MaxItems *int32 + + // The total number of continuous deployment policies in your Amazon Web Services + // account, regardless of the MaxItems value. + // + // This member is required. + Quantity *int32 + + // A list of continuous deployment policy items. + Items []ContinuousDeploymentPolicySummary + + // Indicates the next page of continuous deployment policies. To get the next page + // of the list, use this value in the Marker field of your request. + NextMarker *string + + noSmithyDocumentSerde +} + +// A summary of the information about your continuous deployment policies. +type ContinuousDeploymentPolicySummary struct { + + // The continuous deployment policy. + // + // This member is required. + ContinuousDeploymentPolicy *ContinuousDeploymentPolicy + + noSmithyDocumentSerde +} + +// This configuration determines which HTTP requests are sent to the staging +// distribution. If the HTTP request contains a header and value that matches what +// you specify here, the request is sent to the staging distribution. Otherwise the +// request is sent to the primary distribution. +type ContinuousDeploymentSingleHeaderConfig struct { + + // The request header name that you want CloudFront to send to your staging + // distribution. The header must contain the prefix aws-cf-cd- . + // + // This member is required. + Header *string + + // The request header value. + // + // This member is required. + Value *string + + noSmithyDocumentSerde +} + +// Contains the percentage of traffic to send to a staging distribution. +type ContinuousDeploymentSingleWeightConfig struct { + + // The percentage of traffic to send to a staging distribution, expressed as a + // decimal number between 0 and 0.15. For example, a value of 0.10 means 10% of + // traffic is sent to the staging distribution. + // + // This member is required. + Weight *float32 + + // Session stickiness provides the ability to define multiple requests from a + // single viewer as a single session. This prevents the potentially inconsistent + // experience of sending some of a given user's requests to your staging + // distribution, while others are sent to your primary distribution. Define the + // session duration using TTL values. + SessionStickinessConfig *SessionStickinessConfig + + noSmithyDocumentSerde +} + +// Contains a list of cookie names. +type CookieNames struct { + + // The number of cookie names in the Items list. + // + // This member is required. + Quantity *int32 + + // A list of cookie names. + Items []string + + noSmithyDocumentSerde +} + +// This field is deprecated. We recommend that you use a cache policy or an origin +// request policy instead of this field. +// +// If you want to include cookies in the cache key, use CookiesConfig in a cache +// policy. See CachePolicy . +// +// If you want to send cookies to the origin but not include them in the cache +// key, use CookiesConfig in an origin request policy. See OriginRequestPolicy . +// +// A complex type that specifies whether you want CloudFront to forward cookies to +// the origin and, if so, which ones. For more information about forwarding cookies +// to the origin, see [Caching Content Based on Cookies]in the Amazon CloudFront Developer Guide. +// +// [Caching Content Based on Cookies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Cookies.html +type CookiePreference struct { + + // This field is deprecated. We recommend that you use a cache policy or an origin + // request policy instead of this field. + // + // If you want to include cookies in the cache key, use a cache policy. For more + // information, see [Creating cache policies]in the Amazon CloudFront Developer Guide. + // + // If you want to send cookies to the origin but not include them in the cache + // key, use origin request policy. For more information, see [Creating origin request policies]in the Amazon + // CloudFront Developer Guide. + // + // Specifies which cookies to forward to the origin for this cache behavior: all, + // none, or the list of cookies specified in the WhitelistedNames complex type. + // + // Amazon S3 doesn't process cookies. When the cache behavior is forwarding + // requests to an Amazon S3 origin, specify none for the Forward element. + // + // [Creating origin request policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy + // [Creating cache policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy + // + // This member is required. + Forward ItemSelection + + // This field is deprecated. We recommend that you use a cache policy or an origin + // request policy instead of this field. + // + // If you want to include cookies in the cache key, use a cache policy. For more + // information, see [Creating cache policies]in the Amazon CloudFront Developer Guide. + // + // If you want to send cookies to the origin but not include them in the cache + // key, use an origin request policy. For more information, see [Creating origin request policies]in the Amazon + // CloudFront Developer Guide. + // + // Required if you specify whitelist for the value of Forward . A complex type that + // specifies how many different cookies you want CloudFront to forward to the + // origin for this cache behavior and, if you want to forward selected cookies, the + // names of those cookies. + // + // If you specify all or none for the value of Forward , omit WhitelistedNames . If + // you change the value of Forward from whitelist to all or none and you don't + // delete the WhitelistedNames element and its child elements, CloudFront deletes + // them automatically. + // + // For the current limit on the number of cookie names that you can whitelist for + // each cache behavior, see [CloudFront Limits]in the Amazon Web Services General Reference. + // + // [CloudFront Limits]: https://docs.aws.amazon.com/general/latest/gr/xrefaws_service_limits.html#limits_cloudfront + // [Creating origin request policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy + // [Creating cache policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy + WhitelistedNames *CookieNames + + noSmithyDocumentSerde +} + +// A complex type that controls: +// +// - Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range with +// custom error messages before returning the response to the viewer. +// +// - How long CloudFront caches HTTP status codes in the 4xx and 5xx range. +// +// For more information about custom error pages, see [Customizing Error Responses] in the Amazon CloudFront +// Developer Guide. +// +// [Customizing Error Responses]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html +type CustomErrorResponse struct { + + // The HTTP status code for which you want to specify a custom error page and/or a + // caching duration. + // + // This member is required. + ErrorCode *int32 + + // The minimum amount of time, in seconds, that you want CloudFront to cache the + // HTTP status code specified in ErrorCode . When this time period has elapsed, + // CloudFront queries your origin to see whether the problem that caused the error + // has been resolved and the requested object is now available. + // + // For more information, see [Customizing Error Responses] in the Amazon CloudFront Developer Guide. + // + // [Customizing Error Responses]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html + ErrorCachingMinTTL *int64 + + // The HTTP status code that you want CloudFront to return to the viewer along + // with the custom error page. There are a variety of reasons that you might want + // CloudFront to return a status code different from the status code that your + // origin returned to CloudFront, for example: + // + // - Some Internet devices (some firewalls and corporate proxies, for example) + // intercept HTTP 4xx and 5xx and prevent the response from being returned to the + // viewer. If you substitute 200 , the response typically won't be intercepted. + // + // - If you don't care about distinguishing among different client errors or + // server errors, you can specify 400 or 500 as the ResponseCode for all 4xx or + // 5xx errors. + // + // - You might want to return a 200 status code (OK) and static website so your + // customers don't know that your website is down. + // + // If you specify a value for ResponseCode , you must also specify a value for + // ResponsePagePath . + ResponseCode *string + + // The path to the custom error page that you want CloudFront to return to a + // viewer when your origin returns the HTTP status code specified by ErrorCode , + // for example, /4xx-errors/403-forbidden.html . If you want to store your objects + // and your custom error pages in different locations, your distribution must + // include a cache behavior for which the following is true: + // + // - The value of PathPattern matches the path to your custom error messages. For + // example, suppose you saved custom error pages for 4xx errors in an Amazon S3 + // bucket in a directory named /4xx-errors . Your distribution must include a + // cache behavior for which the path pattern routes requests for your custom error + // pages to that location, for example, /4xx-errors/* . + // + // - The value of TargetOriginId specifies the value of the ID element for the + // origin that contains your custom error pages. + // + // If you specify a value for ResponsePagePath , you must also specify a value for + // ResponseCode . + // + // We recommend that you store custom error pages in an Amazon S3 bucket. If you + // store custom error pages on an HTTP server and the server starts to return 5xx + // errors, CloudFront can't get the files that you want to return to viewers + // because the origin server is unavailable. + ResponsePagePath *string + + noSmithyDocumentSerde +} + +// A complex type that controls: +// +// - Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range with +// custom error messages before returning the response to the viewer. +// +// - How long CloudFront caches HTTP status codes in the 4xx and 5xx range. +// +// For more information about custom error pages, see [Customizing Error Responses] in the Amazon CloudFront +// Developer Guide. +// +// [Customizing Error Responses]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html +type CustomErrorResponses struct { + + // The number of HTTP status codes for which you want to specify a custom error + // page and/or a caching duration. If Quantity is 0 , you can omit Items . + // + // This member is required. + Quantity *int32 + + // A complex type that contains a CustomErrorResponse element for each HTTP status + // code for which you want to specify a custom error page and/or a caching + // duration. + Items []CustomErrorResponse + + noSmithyDocumentSerde +} + +// A complex type that contains the list of Custom Headers for each origin. +type CustomHeaders struct { + + // The number of custom headers, if any, for this distribution. + // + // This member is required. + Quantity *int32 + + // Optional: A list that contains one OriginCustomHeader element for each custom + // header that you want CloudFront to forward to the origin. If Quantity is 0 , + // omit Items . + Items []OriginCustomHeader + + noSmithyDocumentSerde +} + +// A custom origin. A custom origin is any origin that is not an Amazon S3 bucket, +// with one exception. An Amazon S3 bucket that is [configured with static website hosting]is a custom origin. +// +// [configured with static website hosting]: https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html +type CustomOriginConfig struct { + + // The HTTP port that CloudFront uses to connect to the origin. Specify the HTTP + // port that the origin listens on. + // + // This member is required. + HTTPPort *int32 + + // The HTTPS port that CloudFront uses to connect to the origin. Specify the HTTPS + // port that the origin listens on. + // + // This member is required. + HTTPSPort *int32 + + // Specifies the protocol (HTTP or HTTPS) that CloudFront uses to connect to the + // origin. Valid values are: + // + // - http-only – CloudFront always uses HTTP to connect to the origin. + // + // - match-viewer – CloudFront connects to the origin using the same protocol + // that the viewer used to connect to CloudFront. + // + // - https-only – CloudFront always uses HTTPS to connect to the origin. + // + // This member is required. + OriginProtocolPolicy OriginProtocolPolicy + + // Specifies how long, in seconds, CloudFront persists its connection to the + // origin. The minimum timeout is 1 second, the maximum is 60 seconds, and the + // default (if you don't specify otherwise) is 5 seconds. + // + // For more information, see [Origin Keep-alive Timeout] in the Amazon CloudFront Developer Guide. + // + // [Origin Keep-alive Timeout]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginKeepaliveTimeout + OriginKeepaliveTimeout *int32 + + // Specifies how long, in seconds, CloudFront waits for a response from the + // origin. This is also known as the origin response timeout. The minimum timeout + // is 1 second, the maximum is 60 seconds, and the default (if you don't specify + // otherwise) is 30 seconds. + // + // For more information, see [Origin Response Timeout] in the Amazon CloudFront Developer Guide. + // + // [Origin Response Timeout]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginResponseTimeout + OriginReadTimeout *int32 + + // Specifies the minimum SSL/TLS protocol that CloudFront uses when connecting to + // your origin over HTTPS. Valid values include SSLv3 , TLSv1 , TLSv1.1 , and + // TLSv1.2 . + // + // For more information, see [Minimum Origin SSL Protocol] in the Amazon CloudFront Developer Guide. + // + // [Minimum Origin SSL Protocol]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginSSLProtocols + OriginSslProtocols *OriginSslProtocols + + noSmithyDocumentSerde +} + +// A complex type that describes the default cache behavior if you don't specify a +// CacheBehavior element or if request URLs don't match any of the values of +// PathPattern in CacheBehavior elements. You must create exactly one default +// cache behavior. +type DefaultCacheBehavior struct { + + // The value of ID for the origin that you want CloudFront to route requests to + // when they use the default cache behavior. + // + // This member is required. + TargetOriginId *string + + // The protocol that viewers can use to access the files in the origin specified + // by TargetOriginId when a request matches the path pattern in PathPattern . You + // can specify the following options: + // + // - allow-all : Viewers can use HTTP or HTTPS. + // + // - redirect-to-https : If a viewer submits an HTTP request, CloudFront returns + // an HTTP status code of 301 (Moved Permanently) to the viewer along with the + // HTTPS URL. The viewer then resubmits the request using the new URL. + // + // - https-only : If a viewer sends an HTTP request, CloudFront returns an HTTP + // status code of 403 (Forbidden). + // + // For more information about requiring the HTTPS protocol, see [Requiring HTTPS Between Viewers and CloudFront] in the Amazon + // CloudFront Developer Guide. + // + // The only way to guarantee that viewers retrieve an object that was fetched from + // the origin using HTTPS is never to use any other protocol to fetch the object. + // If you have recently changed from HTTP to HTTPS, we recommend that you clear + // your objects' cache because cached objects are protocol agnostic. That means + // that an edge location will return an object from the cache regardless of whether + // the current request protocol matches the protocol used previously. For more + // information, see [Managing Cache Expiration]in the Amazon CloudFront Developer Guide. + // + // [Requiring HTTPS Between Viewers and CloudFront]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-https-viewers-to-cloudfront.html + // [Managing Cache Expiration]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html + // + // This member is required. + ViewerProtocolPolicy ViewerProtocolPolicy + + // A complex type that controls which HTTP methods CloudFront processes and + // forwards to your Amazon S3 bucket or your custom origin. There are three + // choices: + // + // - CloudFront forwards only GET and HEAD requests. + // + // - CloudFront forwards only GET , HEAD , and OPTIONS requests. + // + // - CloudFront forwards GET, HEAD, OPTIONS, PUT, PATCH, POST , and DELETE + // requests. + // + // If you pick the third choice, you may need to restrict access to your Amazon S3 + // bucket or to your custom origin so users can't perform operations that you don't + // want them to. For example, you might not want users to have permissions to + // delete objects from your origin. + AllowedMethods *AllowedMethods + + // The unique identifier of the cache policy that is attached to the default cache + // behavior. For more information, see [Creating cache policies]or [Using the managed cache policies] in the Amazon CloudFront Developer + // Guide. + // + // A DefaultCacheBehavior must include either a CachePolicyId or ForwardedValues . + // We recommend that you use a CachePolicyId . + // + // [Creating cache policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy + // [Using the managed cache policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html + CachePolicyId *string + + // Whether you want CloudFront to automatically compress certain files for this + // cache behavior. If so, specify true ; if not, specify false . For more + // information, see [Serving Compressed Files]in the Amazon CloudFront Developer Guide. + // + // [Serving Compressed Files]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html + Compress *bool + + // This field is deprecated. We recommend that you use the DefaultTTL field in a + // cache policy instead of this field. For more information, see [Creating cache policies]or [Using the managed cache policies] in the Amazon + // CloudFront Developer Guide. + // + // The default amount of time that you want objects to stay in CloudFront caches + // before CloudFront forwards another request to your origin to determine whether + // the object has been updated. The value that you specify applies only when your + // origin does not add HTTP headers such as Cache-Control max-age , Cache-Control + // s-maxage , and Expires to objects. For more information, see [Managing How Long Content Stays in an Edge Cache (Expiration)] in the Amazon + // CloudFront Developer Guide. + // + // [Creating cache policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy + // [Using the managed cache policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html + // [Managing How Long Content Stays in an Edge Cache (Expiration)]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html + // + // Deprecated: This member has been deprecated. + DefaultTTL *int64 + + // The value of ID for the field-level encryption configuration that you want + // CloudFront to use for encrypting specific fields of data for the default cache + // behavior. + FieldLevelEncryptionId *string + + // This field is deprecated. We recommend that you use a cache policy or an origin + // request policy instead of this field. For more information, see [Working with policies]in the Amazon + // CloudFront Developer Guide. + // + // If you want to include values in the cache key, use a cache policy. For more + // information, see [Creating cache policies]or [Using the managed cache policies] in the Amazon CloudFront Developer Guide. + // + // If you want to send values to the origin but not include them in the cache key, + // use an origin request policy. For more information, see [Creating origin request policies]or [Using the managed origin request policies] in the Amazon + // CloudFront Developer Guide. + // + // A DefaultCacheBehavior must include either a CachePolicyId or ForwardedValues . + // We recommend that you use a CachePolicyId . + // + // A complex type that specifies how CloudFront handles query strings, cookies, + // and HTTP headers. + // + // [Working with policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/working-with-policies.html + // [Using the managed origin request policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-origin-request-policies.html + // [Creating origin request policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy + // [Creating cache policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy + // [Using the managed cache policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html + // + // Deprecated: This member has been deprecated. + ForwardedValues *ForwardedValues + + // A list of CloudFront functions that are associated with this cache behavior. + // Your functions must be published to the LIVE stage to associate them with a + // cache behavior. + FunctionAssociations *FunctionAssociations + + // A complex type that contains zero or more Lambda@Edge function associations for + // a cache behavior. + LambdaFunctionAssociations *LambdaFunctionAssociations + + // This field is deprecated. We recommend that you use the MaxTTL field in a cache + // policy instead of this field. For more information, see [Creating cache policies]or [Using the managed cache policies] in the Amazon + // CloudFront Developer Guide. + // + // The maximum amount of time that you want objects to stay in CloudFront caches + // before CloudFront forwards another request to your origin to determine whether + // the object has been updated. The value that you specify applies only when your + // origin adds HTTP headers such as Cache-Control max-age , Cache-Control s-maxage + // , and Expires to objects. For more information, see [Managing How Long Content Stays in an Edge Cache (Expiration)] in the Amazon CloudFront + // Developer Guide. + // + // [Creating cache policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy + // [Using the managed cache policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html + // [Managing How Long Content Stays in an Edge Cache (Expiration)]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html + // + // Deprecated: This member has been deprecated. + MaxTTL *int64 + + // This field is deprecated. We recommend that you use the MinTTL field in a cache + // policy instead of this field. For more information, see [Creating cache policies]or [Using the managed cache policies] in the Amazon + // CloudFront Developer Guide. + // + // The minimum amount of time that you want objects to stay in CloudFront caches + // before CloudFront forwards another request to your origin to determine whether + // the object has been updated. For more information, see [Managing How Long Content Stays in an Edge Cache (Expiration)]in the Amazon CloudFront + // Developer Guide. + // + // You must specify 0 for MinTTL if you configure CloudFront to forward all + // headers to your origin (under Headers , if you specify 1 for Quantity and * for + // Name ). + // + // [Creating cache policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy + // [Using the managed cache policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html + // [Managing How Long Content Stays in an Edge Cache (Expiration)]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html + // + // Deprecated: This member has been deprecated. + MinTTL *int64 + + // The unique identifier of the origin request policy that is attached to the + // default cache behavior. For more information, see [Creating origin request policies]or [Using the managed origin request policies] in the Amazon CloudFront + // Developer Guide. + // + // [Using the managed origin request policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-origin-request-policies.html + // [Creating origin request policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy + OriginRequestPolicyId *string + + // The Amazon Resource Name (ARN) of the real-time log configuration that is + // attached to this cache behavior. For more information, see [Real-time logs]in the Amazon + // CloudFront Developer Guide. + // + // [Real-time logs]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html + RealtimeLogConfigArn *string + + // The identifier for a response headers policy. + ResponseHeadersPolicyId *string + + // Indicates whether you want to distribute media files in the Microsoft Smooth + // Streaming format using the origin that is associated with this cache behavior. + // If so, specify true ; if not, specify false . If you specify true for + // SmoothStreaming , you can still distribute other content using this cache + // behavior if the content matches the value of PathPattern . + SmoothStreaming *bool + + // A list of key groups that CloudFront can use to validate signed URLs or signed + // cookies. + // + // When a cache behavior contains trusted key groups, CloudFront requires signed + // URLs or signed cookies for all requests that match the cache behavior. The URLs + // or cookies must be signed with a private key whose corresponding public key is + // in the key group. The signed URL or cookie contains information about which + // public key CloudFront should use to verify the signature. For more information, + // see [Serving private content]in the Amazon CloudFront Developer Guide. + // + // [Serving private content]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html + TrustedKeyGroups *TrustedKeyGroups + + // We recommend using TrustedKeyGroups instead of TrustedSigners . + // + // A list of Amazon Web Services account IDs whose public keys CloudFront can use + // to validate signed URLs or signed cookies. + // + // When a cache behavior contains trusted signers, CloudFront requires signed URLs + // or signed cookies for all requests that match the cache behavior. The URLs or + // cookies must be signed with the private key of a CloudFront key pair in a + // trusted signer's Amazon Web Services account. The signed URL or cookie contains + // information about which public key CloudFront should use to verify the + // signature. For more information, see [Serving private content]in the Amazon CloudFront Developer Guide. + // + // [Serving private content]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html + TrustedSigners *TrustedSigners + + noSmithyDocumentSerde +} + +// A distribution tells CloudFront where you want content to be delivered from, +// and the details about how to track and manage content delivery. +type Distribution struct { + + // The distribution's Amazon Resource Name (ARN). + // + // This member is required. + ARN *string + + // The distribution's configuration. + // + // This member is required. + DistributionConfig *DistributionConfig + + // The distribution's CloudFront domain name. For example: + // d111111abcdef8.cloudfront.net . + // + // This member is required. + DomainName *string + + // The distribution's identifier. For example: E1U5RQF7T870K0 . + // + // This member is required. + Id *string + + // The number of invalidation batches currently in progress. + // + // This member is required. + InProgressInvalidationBatches *int32 + + // The date and time when the distribution was last modified. + // + // This member is required. + LastModifiedTime *time.Time + + // The distribution's status. When the status is Deployed , the distribution's + // information is fully propagated to all CloudFront edge locations. + // + // This member is required. + Status *string + + // This field contains a list of key groups and the public keys in each key group + // that CloudFront can use to verify the signatures of signed URLs or signed + // cookies. + ActiveTrustedKeyGroups *ActiveTrustedKeyGroups + + // We recommend using TrustedKeyGroups instead of TrustedSigners . + // + // This field contains a list of Amazon Web Services account IDs and the active + // CloudFront key pairs in each account that CloudFront can use to verify the + // signatures of signed URLs or signed cookies. + ActiveTrustedSigners *ActiveTrustedSigners + + // Amazon Web Services services in China customers must file for an Internet + // Content Provider (ICP) recordal if they want to serve content publicly on an + // alternate domain name, also known as a CNAME, that they've added to CloudFront. + // AliasICPRecordal provides the ICP recordal status for CNAMEs associated with + // distributions. + // + // For more information about ICP recordals, see [Signup, Accounts, and Credentials] in Getting Started with Amazon + // Web Services services in China. + // + // [Signup, Accounts, and Credentials]: https://docs.amazonaws.cn/en_us/aws/latest/userguide/accounts-and-credentials.html + AliasICPRecordals []AliasICPRecordal + + noSmithyDocumentSerde +} + +// A distribution configuration. +type DistributionConfig struct { + + // A unique value (for example, a date-time stamp) that ensures that the request + // can't be replayed. + // + // If the value of CallerReference is new (regardless of the content of the + // DistributionConfig object), CloudFront creates a new distribution. + // + // If CallerReference is a value that you already sent in a previous request to + // create a distribution, CloudFront returns a DistributionAlreadyExists error. + // + // This member is required. + CallerReference *string + + // A comment to describe the distribution. The comment cannot be longer than 128 + // characters. + // + // This member is required. + Comment *string + + // A complex type that describes the default cache behavior if you don't specify a + // CacheBehavior element or if files don't match any of the values of PathPattern + // in CacheBehavior elements. You must create exactly one default cache behavior. + // + // This member is required. + DefaultCacheBehavior *DefaultCacheBehavior + + // From this field, you can enable or disable the selected distribution. + // + // This member is required. + Enabled *bool + + // A complex type that contains information about origins for this distribution. + // + // This member is required. + Origins *Origins + + // A complex type that contains information about CNAMEs (alternate domain names), + // if any, for this distribution. + Aliases *Aliases + + // A complex type that contains zero or more CacheBehavior elements. + CacheBehaviors *CacheBehaviors + + // The identifier of a continuous deployment policy. For more information, see + // CreateContinuousDeploymentPolicy . + ContinuousDeploymentPolicyId *string + + // A complex type that controls the following: + // + // - Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range with + // custom error messages before returning the response to the viewer. + // + // - How long CloudFront caches HTTP status codes in the 4xx and 5xx range. + // + // For more information about custom error pages, see [Customizing Error Responses] in the Amazon CloudFront + // Developer Guide. + // + // [Customizing Error Responses]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html + CustomErrorResponses *CustomErrorResponses + + // The object that you want CloudFront to request from your origin (for example, + // index.html ) when a viewer requests the root URL for your distribution ( + // https://www.example.com ) instead of an object in your distribution ( + // https://www.example.com/product-description.html ). Specifying a default root + // object avoids exposing the contents of your distribution. + // + // Specify only the object name, for example, index.html . Don't add a / before + // the object name. + // + // If you don't want to specify a default root object when you create a + // distribution, include an empty DefaultRootObject element. + // + // To delete the default root object from an existing distribution, update the + // distribution configuration and include an empty DefaultRootObject element. + // + // To replace the default root object, update the distribution configuration and + // specify the new object. + // + // For more information about the default root object, see [Creating a Default Root Object] in the Amazon + // CloudFront Developer Guide. + // + // [Creating a Default Root Object]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/DefaultRootObject.html + DefaultRootObject *string + + // (Optional) Specify the HTTP version(s) that you want viewers to use to + // communicate with CloudFront. The default value for new web distributions is + // http2 . Viewers that don't support HTTP/2 automatically use an earlier HTTP + // version. + // + // For viewers and CloudFront to use HTTP/2, viewers must support TLSv1.2 or + // later, and must support Server Name Indication (SNI). + // + // For viewers and CloudFront to use HTTP/3, viewers must support TLSv1.3 and + // Server Name Indication (SNI). CloudFront supports HTTP/3 connection migration to + // allow the viewer to switch networks without losing connection. For more + // information about connection migration, see [Connection Migration]at RFC 9000. For more information + // about supported TLSv1.3 ciphers, see [Supported protocols and ciphers between viewers and CloudFront]. + // + // [Connection Migration]: https://www.rfc-editor.org/rfc/rfc9000.html#name-connection-migration + // [Supported protocols and ciphers between viewers and CloudFront]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/secure-connections-supported-viewer-protocols-ciphers.html + HttpVersion HttpVersion + + // If you want CloudFront to respond to IPv6 DNS requests with an IPv6 address for + // your distribution, specify true . If you specify false , CloudFront responds to + // IPv6 DNS requests with the DNS response code NOERROR and with no IP addresses. + // This allows viewers to submit a second request, for an IPv4 address for your + // distribution. + // + // In general, you should enable IPv6 if you have users on IPv6 networks who want + // to access your content. However, if you're using signed URLs or signed cookies + // to restrict access to your content, and if you're using a custom policy that + // includes the IpAddress parameter to restrict the IP addresses that can access + // your content, don't enable IPv6. If you want to restrict access to some content + // by IP address and not restrict access to other content (or restrict access but + // not by IP address), you can create two distributions. For more information, see [Creating a Signed URL Using a Custom Policy] + // in the Amazon CloudFront Developer Guide. + // + // If you're using an Route 53 Amazon Web Services Integration alias resource + // record set to route traffic to your CloudFront distribution, you need to create + // a second alias resource record set when both of the following are true: + // + // - You enable IPv6 for the distribution + // + // - You're using alternate domain names in the URLs for your objects + // + // For more information, see [Routing Traffic to an Amazon CloudFront Web Distribution by Using Your Domain Name] in the Route 53 Amazon Web Services Integration + // Developer Guide. + // + // If you created a CNAME resource record set, either with Route 53 Amazon Web + // Services Integration or with another DNS service, you don't need to make any + // changes. A CNAME record will route traffic to your distribution regardless of + // the IP address format of the viewer request. + // + // [Routing Traffic to an Amazon CloudFront Web Distribution by Using Your Domain Name]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-cloudfront-distribution.html + // [Creating a Signed URL Using a Custom Policy]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-creating-signed-url-custom-policy.html + IsIPV6Enabled *bool + + // A complex type that controls whether access logs are written for the + // distribution. + // + // For more information about logging, see [Access Logs] in the Amazon CloudFront Developer + // Guide. + // + // [Access Logs]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html + Logging *LoggingConfig + + // A complex type that contains information about origin groups for this + // distribution. + OriginGroups *OriginGroups + + // The price class that corresponds with the maximum price that you want to pay + // for CloudFront service. If you specify PriceClass_All , CloudFront responds to + // requests for your objects from all CloudFront edge locations. + // + // If you specify a price class other than PriceClass_All , CloudFront serves your + // objects from the CloudFront edge location that has the lowest latency among the + // edge locations in your price class. Viewers who are in or near regions that are + // excluded from your specified price class may encounter slower performance. + // + // For more information about price classes, see [Choosing the Price Class for a CloudFront Distribution] in the Amazon CloudFront + // Developer Guide. For information about CloudFront pricing, including how price + // classes (such as Price Class 100) map to CloudFront regions, see [Amazon CloudFront Pricing]. + // + // [Choosing the Price Class for a CloudFront Distribution]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PriceClass.html + // [Amazon CloudFront Pricing]: http://aws.amazon.com/cloudfront/pricing/ + PriceClass PriceClass + + // A complex type that identifies ways in which you want to restrict distribution + // of your content. + Restrictions *Restrictions + + // A Boolean that indicates whether this is a staging distribution. When this + // value is true , this is a staging distribution. When this value is false , this + // is not a staging distribution. + Staging *bool + + // A complex type that determines the distribution's SSL/TLS configuration for + // communicating with viewers. + ViewerCertificate *ViewerCertificate + + // A unique identifier that specifies the WAF web ACL, if any, to associate with + // this distribution. To specify a web ACL created using the latest version of WAF, + // use the ACL ARN, for example + // arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111 + // . To specify a web ACL created using WAF Classic, use the ACL ID, for example + // a1b2c3d4-5678-90ab-cdef-EXAMPLE11111 . + // + // WAF is a web application firewall that lets you monitor the HTTP and HTTPS + // requests that are forwarded to CloudFront, and lets you control access to your + // content. Based on conditions that you specify, such as the IP addresses that + // requests originate from or the values of query strings, CloudFront responds to + // requests either with the requested content or with an HTTP 403 status code + // (Forbidden). You can also configure CloudFront to return a custom error page + // when a request is blocked. For more information about WAF, see the [WAF Developer Guide]. + // + // [WAF Developer Guide]: https://docs.aws.amazon.com/waf/latest/developerguide/what-is-aws-waf.html + WebACLId *string + + noSmithyDocumentSerde +} + +// A distribution Configuration and a list of tags to be associated with the +// distribution. +type DistributionConfigWithTags struct { + + // A distribution configuration. + // + // This member is required. + DistributionConfig *DistributionConfig + + // A complex type that contains zero or more Tag elements. + // + // This member is required. + Tags *Tags + + noSmithyDocumentSerde +} + +// A list of distribution IDs. +type DistributionIdList struct { + + // A flag that indicates whether more distribution IDs remain to be listed. If + // your results were truncated, you can make a subsequent request using the Marker + // request field to retrieve more distribution IDs in the list. + // + // This member is required. + IsTruncated *bool + + // The value provided in the Marker request field. + // + // This member is required. + Marker *string + + // The maximum number of distribution IDs requested. + // + // This member is required. + MaxItems *int32 + + // The total number of distribution IDs returned in the response. + // + // This member is required. + Quantity *int32 + + // Contains the distribution IDs in the list. + Items []string + + // Contains the value that you should use in the Marker field of a subsequent + // request to continue listing distribution IDs where you left off. + NextMarker *string + + noSmithyDocumentSerde +} + +// A distribution list. +type DistributionList struct { + + // A flag that indicates whether more distributions remain to be listed. If your + // results were truncated, you can make a follow-up pagination request using the + // Marker request parameter to retrieve more distributions in the list. + // + // This member is required. + IsTruncated *bool + + // The value you provided for the Marker request parameter. + // + // This member is required. + Marker *string + + // The value you provided for the MaxItems request parameter. + // + // This member is required. + MaxItems *int32 + + // The number of distributions that were created by the current Amazon Web + // Services account. + // + // This member is required. + Quantity *int32 + + // A complex type that contains one DistributionSummary element for each + // distribution that was created by the current Amazon Web Services account. + Items []DistributionSummary + + // If IsTruncated is true , this element is present and contains the value you can + // use for the Marker request parameter to continue listing your distributions + // where they left off. + NextMarker *string + + noSmithyDocumentSerde +} + +// A summary of the information about a CloudFront distribution. +type DistributionSummary struct { + + // The ARN (Amazon Resource Name) for the distribution. For example: + // arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5 , where + // 123456789012 is your Amazon Web Services account ID. + // + // This member is required. + ARN *string + + // A complex type that contains information about CNAMEs (alternate domain names), + // if any, for this distribution. + // + // This member is required. + Aliases *Aliases + + // A complex type that contains zero or more CacheBehavior elements. + // + // This member is required. + CacheBehaviors *CacheBehaviors + + // The comment originally specified when this distribution was created. + // + // This member is required. + Comment *string + + // A complex type that contains zero or more CustomErrorResponses elements. + // + // This member is required. + CustomErrorResponses *CustomErrorResponses + + // A complex type that describes the default cache behavior if you don't specify a + // CacheBehavior element or if files don't match any of the values of PathPattern + // in CacheBehavior elements. You must create exactly one default cache behavior. + // + // This member is required. + DefaultCacheBehavior *DefaultCacheBehavior + + // The domain name that corresponds to the distribution, for example, + // d111111abcdef8.cloudfront.net . + // + // This member is required. + DomainName *string + + // Whether the distribution is enabled to accept user requests for content. + // + // This member is required. + Enabled *bool + + // Specify the maximum HTTP version that you want viewers to use to communicate + // with CloudFront. The default value for new web distributions is http2 . Viewers + // that don't support HTTP/2 will automatically use an earlier version. + // + // This member is required. + HttpVersion HttpVersion + + // The identifier for the distribution. For example: EDFDVBD632BHDS5 . + // + // This member is required. + Id *string + + // Whether CloudFront responds to IPv6 DNS requests with an IPv6 address for your + // distribution. + // + // This member is required. + IsIPV6Enabled *bool + + // The date and time the distribution was last modified. + // + // This member is required. + LastModifiedTime *time.Time + + // A complex type that contains information about origins for this distribution. + // + // This member is required. + Origins *Origins + + // A complex type that contains information about price class for this streaming + // distribution. + // + // This member is required. + PriceClass PriceClass + + // A complex type that identifies ways in which you want to restrict distribution + // of your content. + // + // This member is required. + Restrictions *Restrictions + + // A Boolean that indicates whether this is a staging distribution. When this + // value is true , this is a staging distribution. When this value is false , this + // is not a staging distribution. + // + // This member is required. + Staging *bool + + // The current status of the distribution. When the status is Deployed , the + // distribution's information is propagated to all CloudFront edge locations. + // + // This member is required. + Status *string + + // A complex type that determines the distribution's SSL/TLS configuration for + // communicating with viewers. + // + // This member is required. + ViewerCertificate *ViewerCertificate + + // The Web ACL Id (if any) associated with the distribution. + // + // This member is required. + WebACLId *string + + // Amazon Web Services services in China customers must file for an Internet + // Content Provider (ICP) recordal if they want to serve content publicly on an + // alternate domain name, also known as a CNAME, that they've added to CloudFront. + // AliasICPRecordal provides the ICP recordal status for CNAMEs associated with + // distributions. + // + // For more information about ICP recordals, see [Signup, Accounts, and Credentials] in Getting Started with Amazon + // Web Services services in China. + // + // [Signup, Accounts, and Credentials]: https://docs.amazonaws.cn/en_us/aws/latest/userguide/accounts-and-credentials.html + AliasICPRecordals []AliasICPRecordal + + // A complex type that contains information about origin groups for this + // distribution. + OriginGroups *OriginGroups + + noSmithyDocumentSerde +} + +// Complex data type for field-level encryption profiles that includes all of the +// encryption entities. +type EncryptionEntities struct { + + // Number of field pattern items in a field-level encryption content type-profile + // mapping. + // + // This member is required. + Quantity *int32 + + // An array of field patterns in a field-level encryption content type-profile + // mapping. + Items []EncryptionEntity + + noSmithyDocumentSerde +} + +// Complex data type for field-level encryption profiles that includes the +// encryption key and field pattern specifications. +type EncryptionEntity struct { + + // Field patterns in a field-level encryption content type profile specify the + // fields that you want to be encrypted. You can provide the full field name, or + // any beginning characters followed by a wildcard (*). You can't overlap field + // patterns. For example, you can't have both ABC* and AB*. Note that field + // patterns are case-sensitive. + // + // This member is required. + FieldPatterns *FieldPatterns + + // The provider associated with the public key being used for encryption. This + // value must also be provided with the private key for applications to be able to + // decrypt data. + // + // This member is required. + ProviderId *string + + // The public key associated with a set of field-level encryption patterns, to be + // used when encrypting the fields that match the patterns. + // + // This member is required. + PublicKeyId *string + + noSmithyDocumentSerde +} + +// Contains information about the Amazon Kinesis data stream where you are sending +// real-time log data in a real-time log configuration. +type EndPoint struct { + + // The type of data stream where you are sending real-time log data. The only + // valid value is Kinesis . + // + // This member is required. + StreamType *string + + // Contains information about the Amazon Kinesis data stream where you are sending + // real-time log data. + KinesisStreamConfig *KinesisStreamConfig + + noSmithyDocumentSerde +} + +// A complex data type that includes the profile configurations and other options +// specified for field-level encryption. +type FieldLevelEncryption struct { + + // A complex data type that includes the profile configurations specified for + // field-level encryption. + // + // This member is required. + FieldLevelEncryptionConfig *FieldLevelEncryptionConfig + + // The configuration ID for a field-level encryption configuration which includes + // a set of profiles that specify certain selected data fields to be encrypted by + // specific public keys. + // + // This member is required. + Id *string + + // The last time the field-level encryption configuration was changed. + // + // This member is required. + LastModifiedTime *time.Time + + noSmithyDocumentSerde +} + +// A complex data type that includes the profile configurations specified for +// field-level encryption. +type FieldLevelEncryptionConfig struct { + + // A unique number that ensures the request can't be replayed. + // + // This member is required. + CallerReference *string + + // An optional comment about the configuration. The comment cannot be longer than + // 128 characters. + Comment *string + + // A complex data type that specifies when to forward content if a content type + // isn't recognized and profiles to use as by default in a request if a query + // argument doesn't specify a profile to use. + ContentTypeProfileConfig *ContentTypeProfileConfig + + // A complex data type that specifies when to forward content if a profile isn't + // found and the profile that can be provided as a query argument in a request. + QueryArgProfileConfig *QueryArgProfileConfig + + noSmithyDocumentSerde +} + +// List of field-level encryption configurations. +type FieldLevelEncryptionList struct { + + // The maximum number of elements you want in the response body. + // + // This member is required. + MaxItems *int32 + + // The number of field-level encryption items. + // + // This member is required. + Quantity *int32 + + // An array of field-level encryption items. + Items []FieldLevelEncryptionSummary + + // If there are more elements to be listed, this element is present and contains + // the value that you can use for the Marker request parameter to continue listing + // your configurations where you left off. + NextMarker *string + + noSmithyDocumentSerde +} + +// A complex data type for field-level encryption profiles. +type FieldLevelEncryptionProfile struct { + + // A complex data type that includes the profile name and the encryption entities + // for the field-level encryption profile. + // + // This member is required. + FieldLevelEncryptionProfileConfig *FieldLevelEncryptionProfileConfig + + // The ID for a field-level encryption profile configuration which includes a set + // of profiles that specify certain selected data fields to be encrypted by + // specific public keys. + // + // This member is required. + Id *string + + // The last time the field-level encryption profile was updated. + // + // This member is required. + LastModifiedTime *time.Time + + noSmithyDocumentSerde +} + +// A complex data type of profiles for the field-level encryption. +type FieldLevelEncryptionProfileConfig struct { + + // A unique number that ensures that the request can't be replayed. + // + // This member is required. + CallerReference *string + + // A complex data type of encryption entities for the field-level encryption + // profile that include the public key ID, provider, and field patterns for + // specifying which fields to encrypt with this key. + // + // This member is required. + EncryptionEntities *EncryptionEntities + + // Profile name for the field-level encryption profile. + // + // This member is required. + Name *string + + // An optional comment for the field-level encryption profile. The comment cannot + // be longer than 128 characters. + Comment *string + + noSmithyDocumentSerde +} + +// List of field-level encryption profiles. +type FieldLevelEncryptionProfileList struct { + + // The maximum number of field-level encryption profiles you want in the response + // body. + // + // This member is required. + MaxItems *int32 + + // The number of field-level encryption profiles. + // + // This member is required. + Quantity *int32 + + // The field-level encryption profile items. + Items []FieldLevelEncryptionProfileSummary + + // If there are more elements to be listed, this element is present and contains + // the value that you can use for the Marker request parameter to continue listing + // your profiles where you left off. + NextMarker *string + + noSmithyDocumentSerde +} + +// The field-level encryption profile summary. +type FieldLevelEncryptionProfileSummary struct { + + // A complex data type of encryption entities for the field-level encryption + // profile that include the public key ID, provider, and field patterns for + // specifying which fields to encrypt with this key. + // + // This member is required. + EncryptionEntities *EncryptionEntities + + // ID for the field-level encryption profile summary. + // + // This member is required. + Id *string + + // The time when the field-level encryption profile summary was last updated. + // + // This member is required. + LastModifiedTime *time.Time + + // Name for the field-level encryption profile summary. + // + // This member is required. + Name *string + + // An optional comment for the field-level encryption profile summary. The comment + // cannot be longer than 128 characters. + Comment *string + + noSmithyDocumentSerde +} + +// A summary of a field-level encryption item. +type FieldLevelEncryptionSummary struct { + + // The unique ID of a field-level encryption item. + // + // This member is required. + Id *string + + // The last time that the summary of field-level encryption items was modified. + // + // This member is required. + LastModifiedTime *time.Time + + // An optional comment about the field-level encryption item. The comment cannot + // be longer than 128 characters. + Comment *string + + // A summary of a content type-profile mapping. + ContentTypeProfileConfig *ContentTypeProfileConfig + + // A summary of a query argument-profile mapping. + QueryArgProfileConfig *QueryArgProfileConfig + + noSmithyDocumentSerde +} + +// A complex data type that includes the field patterns to match for field-level +// encryption. +type FieldPatterns struct { + + // The number of field-level encryption field patterns. + // + // This member is required. + Quantity *int32 + + // An array of the field-level encryption field patterns. + Items []string + + noSmithyDocumentSerde +} + +// This field is deprecated. We recommend that you use a cache policy or an origin +// request policy instead of this field. +// +// If you want to include values in the cache key, use a cache policy. For more +// information, see [Creating cache policies]in the Amazon CloudFront Developer Guide. +// +// If you want to send values to the origin but not include them in the cache key, +// use an origin request policy. For more information, see [Creating origin request policies]in the Amazon +// CloudFront Developer Guide. +// +// A complex type that specifies how CloudFront handles query strings, cookies, +// and HTTP headers. +// +// [Creating origin request policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy +// [Creating cache policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy +type ForwardedValues struct { + + // This field is deprecated. We recommend that you use a cache policy or an origin + // request policy instead of this field. + // + // If you want to include cookies in the cache key, use a cache policy. For more + // information, see [Creating cache policies]in the Amazon CloudFront Developer Guide. + // + // If you want to send cookies to the origin but not include them in the cache + // key, use an origin request policy. For more information, see [Creating origin request policies]in the Amazon + // CloudFront Developer Guide. + // + // A complex type that specifies whether you want CloudFront to forward cookies to + // the origin and, if so, which ones. For more information about forwarding cookies + // to the origin, see [How CloudFront Forwards, Caches, and Logs Cookies]in the Amazon CloudFront Developer Guide. + // + // [Creating origin request policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy + // [Creating cache policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy + // [How CloudFront Forwards, Caches, and Logs Cookies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Cookies.html + // + // This member is required. + Cookies *CookiePreference + + // This field is deprecated. We recommend that you use a cache policy or an origin + // request policy instead of this field. + // + // If you want to include query strings in the cache key, use a cache policy. For + // more information, see [Creating cache policies]in the Amazon CloudFront Developer Guide. + // + // If you want to send query strings to the origin but not include them in the + // cache key, use an origin request policy. For more information, see [Creating origin request policies]in the + // Amazon CloudFront Developer Guide. + // + // Indicates whether you want CloudFront to forward query strings to the origin + // that is associated with this cache behavior and cache based on the query string + // parameters. CloudFront behavior depends on the value of QueryString and on the + // values that you specify for QueryStringCacheKeys , if any: + // + // If you specify true for QueryString and you don't specify any values for + // QueryStringCacheKeys , CloudFront forwards all query string parameters to the + // origin and caches based on all query string parameters. Depending on how many + // query string parameters and values you have, this can adversely affect + // performance because CloudFront must forward more requests to the origin. + // + // If you specify true for QueryString and you specify one or more values for + // QueryStringCacheKeys , CloudFront forwards all query string parameters to the + // origin, but it only caches based on the query string parameters that you + // specify. + // + // If you specify false for QueryString , CloudFront doesn't forward any query + // string parameters to the origin, and doesn't cache based on query string + // parameters. + // + // For more information, see [Configuring CloudFront to Cache Based on Query String Parameters] in the Amazon CloudFront Developer Guide. + // + // [Creating origin request policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy + // [Creating cache policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy + // [Configuring CloudFront to Cache Based on Query String Parameters]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/QueryStringParameters.html + // + // This member is required. + QueryString *bool + + // This field is deprecated. We recommend that you use a cache policy or an origin + // request policy instead of this field. + // + // If you want to include headers in the cache key, use a cache policy. For more + // information, see [Creating cache policies]in the Amazon CloudFront Developer Guide. + // + // If you want to send headers to the origin but not include them in the cache + // key, use an origin request policy. For more information, see [Creating origin request policies]in the Amazon + // CloudFront Developer Guide. + // + // A complex type that specifies the Headers , if any, that you want CloudFront to + // forward to the origin for this cache behavior (whitelisted headers). For the + // headers that you specify, CloudFront also caches separate versions of a + // specified object that is based on the header values in viewer requests. + // + // For more information, see [Caching Content Based on Request Headers] in the Amazon CloudFront Developer Guide. + // + // [Creating origin request policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy + // [Creating cache policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy + // [Caching Content Based on Request Headers]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/header-caching.html + Headers *Headers + + // This field is deprecated. We recommend that you use a cache policy or an origin + // request policy instead of this field. + // + // If you want to include query strings in the cache key, use a cache policy. For + // more information, see [Creating cache policies]in the Amazon CloudFront Developer Guide. + // + // If you want to send query strings to the origin but not include them in the + // cache key, use an origin request policy. For more information, see [Creating origin request policies]in the + // Amazon CloudFront Developer Guide. + // + // A complex type that contains information about the query string parameters that + // you want CloudFront to use for caching for this cache behavior. + // + // [Creating origin request policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy + // [Creating cache policies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy + QueryStringCacheKeys *QueryStringCacheKeys + + noSmithyDocumentSerde +} + +// A CloudFront function that is associated with a cache behavior in a CloudFront +// distribution. +type FunctionAssociation struct { + + // The event type of the function, either viewer-request or viewer-response . You + // cannot use origin-facing event types ( origin-request and origin-response ) with + // a CloudFront function. + // + // This member is required. + EventType EventType + + // The Amazon Resource Name (ARN) of the function. + // + // This member is required. + FunctionARN *string + + noSmithyDocumentSerde +} + +// A list of CloudFront functions that are associated with a cache behavior in a +// CloudFront distribution. Your functions must be published to the LIVE stage to +// associate them with a cache behavior. +type FunctionAssociations struct { + + // The number of CloudFront functions in the list. + // + // This member is required. + Quantity *int32 + + // The CloudFront functions that are associated with a cache behavior in a + // CloudFront distribution. Your functions must be published to the LIVE stage to + // associate them with a cache behavior. + Items []FunctionAssociation + + noSmithyDocumentSerde +} + +// Contains configuration information about a CloudFront function. +type FunctionConfig struct { + + // A comment to describe the function. + // + // This member is required. + Comment *string + + // The function's runtime environment version. + // + // This member is required. + Runtime FunctionRuntime + + // The configuration for the key value store associations. + KeyValueStoreAssociations *KeyValueStoreAssociations + + noSmithyDocumentSerde +} + +// A list of CloudFront functions. +type FunctionList struct { + + // The maximum number of functions requested. + // + // This member is required. + MaxItems *int32 + + // The number of functions returned in the response. + // + // This member is required. + Quantity *int32 + + // Contains the functions in the list. + Items []FunctionSummary + + // If there are more items in the list than are in this response, this element is + // present. It contains the value that you should use in the Marker field of a + // subsequent request to continue listing functions where you left off. + NextMarker *string + + noSmithyDocumentSerde +} + +// Contains metadata about a CloudFront function. +type FunctionMetadata struct { + + // The Amazon Resource Name (ARN) of the function. The ARN uniquely identifies the + // function. + // + // This member is required. + FunctionARN *string + + // The date and time when the function was most recently updated. + // + // This member is required. + LastModifiedTime *time.Time + + // The date and time when the function was created. + CreatedTime *time.Time + + // The stage that the function is in, either DEVELOPMENT or LIVE . + // + // When a function is in the DEVELOPMENT stage, you can test the function with + // TestFunction , and update it with UpdateFunction . + // + // When a function is in the LIVE stage, you can attach the function to a + // distribution's cache behavior, using the function's ARN. + Stage FunctionStage + + noSmithyDocumentSerde +} + +// Contains configuration information and metadata about a CloudFront function. +type FunctionSummary struct { + + // Contains configuration information about a CloudFront function. + // + // This member is required. + FunctionConfig *FunctionConfig + + // Contains metadata about a CloudFront function. + // + // This member is required. + FunctionMetadata *FunctionMetadata + + // The name of the CloudFront function. + // + // This member is required. + Name *string + + // The status of the CloudFront function. + Status *string + + noSmithyDocumentSerde +} + +// A complex type that controls the countries in which your content is +// distributed. CloudFront determines the location of your users using MaxMind +// GeoIP databases. +type GeoRestriction struct { + + // When geo restriction is enabled , this is the number of countries in your + // whitelist or blacklist . Otherwise, when it is not enabled, Quantity is 0 , and + // you can omit Items . + // + // This member is required. + Quantity *int32 + + // The method that you want to use to restrict distribution of your content by + // country: + // + // - none : No geo restriction is enabled, meaning access to content is not + // restricted by client geo location. + // + // - blacklist : The Location elements specify the countries in which you don't + // want CloudFront to distribute your content. + // + // - whitelist : The Location elements specify the countries in which you want + // CloudFront to distribute your content. + // + // This member is required. + RestrictionType GeoRestrictionType + + // A complex type that contains a Location element for each country in which you + // want CloudFront either to distribute your content ( whitelist ) or not + // distribute your content ( blacklist ). + // + // The Location element is a two-letter, uppercase country code for a country that + // you want to include in your blacklist or whitelist . Include one Location + // element for each country. + // + // CloudFront and MaxMind both use ISO 3166 country codes. For the current list of + // countries and the corresponding codes, see ISO 3166-1-alpha-2 code on the + // International Organization for Standardization website. You can also refer to + // the country list on the CloudFront console, which includes both country names + // and codes. + Items []string + + noSmithyDocumentSerde +} + +// Contains a list of HTTP header names. +type Headers struct { + + // The number of header names in the Items list. + // + // This member is required. + Quantity *int32 + + // A list of HTTP header names. + Items []string + + noSmithyDocumentSerde +} + +// The import source for the key value store. +type ImportSource struct { + + // The Amazon Resource Name (ARN) of the import source for the key value store. + // + // This member is required. + SourceARN *string + + // The source type of the import source for the key value store. + // + // This member is required. + SourceType ImportSourceType + + noSmithyDocumentSerde +} + +// An invalidation. +type Invalidation struct { + + // The date and time the invalidation request was first made. + // + // This member is required. + CreateTime *time.Time + + // The identifier for the invalidation request. For example: IDFDVBD632BHDS5 . + // + // This member is required. + Id *string + + // The current invalidation information for the batch request. + // + // This member is required. + InvalidationBatch *InvalidationBatch + + // The status of the invalidation request. When the invalidation batch is + // finished, the status is Completed . + // + // This member is required. + Status *string + + noSmithyDocumentSerde +} + +// An invalidation batch. +type InvalidationBatch struct { + + // A value that you specify to uniquely identify an invalidation request. + // CloudFront uses the value to prevent you from accidentally resubmitting an + // identical request. Whenever you create a new invalidation request, you must + // specify a new value for CallerReference and change other values in the request + // as applicable. One way to ensure that the value of CallerReference is unique is + // to use a timestamp , for example, 20120301090000 . + // + // If you make a second invalidation request with the same value for + // CallerReference , and if the rest of the request is the same, CloudFront doesn't + // create a new invalidation request. Instead, CloudFront returns information about + // the invalidation request that you previously created with the same + // CallerReference . + // + // If CallerReference is a value you already sent in a previous invalidation batch + // request but the content of any Path is different from the original request, + // CloudFront returns an InvalidationBatchAlreadyExists error. + // + // This member is required. + CallerReference *string + + // A complex type that contains information about the objects that you want to + // invalidate. For more information, see [Specifying the Objects to Invalidate]in the Amazon CloudFront Developer Guide. + // + // [Specifying the Objects to Invalidate]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html#invalidation-specifying-objects + // + // This member is required. + Paths *Paths + + noSmithyDocumentSerde +} + +// The InvalidationList complex type describes the list of invalidation objects. +// For more information about invalidation, see [Invalidating Objects (Web Distributions Only)]in the Amazon CloudFront Developer +// Guide. +// +// [Invalidating Objects (Web Distributions Only)]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html +type InvalidationList struct { + + // A flag that indicates whether more invalidation batch requests remain to be + // listed. If your results were truncated, you can make a follow-up pagination + // request using the Marker request parameter to retrieve more invalidation + // batches in the list. + // + // This member is required. + IsTruncated *bool + + // The value that you provided for the Marker request parameter. + // + // This member is required. + Marker *string + + // The value that you provided for the MaxItems request parameter. + // + // This member is required. + MaxItems *int32 + + // The number of invalidation batches that were created by the current Amazon Web + // Services account. + // + // This member is required. + Quantity *int32 + + // A complex type that contains one InvalidationSummary element for each + // invalidation batch created by the current Amazon Web Services account. + Items []InvalidationSummary + + // If IsTruncated is true , this element is present and contains the value that you + // can use for the Marker request parameter to continue listing your invalidation + // batches where they left off. + NextMarker *string + + noSmithyDocumentSerde +} + +// A summary of an invalidation request. +type InvalidationSummary struct { + + // The time that an invalidation request was created. + // + // This member is required. + CreateTime *time.Time + + // The unique ID for an invalidation request. + // + // This member is required. + Id *string + + // The status of an invalidation request. + // + // This member is required. + Status *string + + noSmithyDocumentSerde +} + +// A key group. +// +// A key group contains a list of public keys that you can use with [CloudFront signed URLs and signed cookies]. +// +// [CloudFront signed URLs and signed cookies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html +type KeyGroup struct { + + // The identifier for the key group. + // + // This member is required. + Id *string + + // The key group configuration. + // + // This member is required. + KeyGroupConfig *KeyGroupConfig + + // The date and time when the key group was last modified. + // + // This member is required. + LastModifiedTime *time.Time + + noSmithyDocumentSerde +} + +// A key group configuration. +// +// A key group contains a list of public keys that you can use with [CloudFront signed URLs and signed cookies]. +// +// [CloudFront signed URLs and signed cookies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html +type KeyGroupConfig struct { + + // A list of the identifiers of the public keys in the key group. + // + // This member is required. + Items []string + + // A name to identify the key group. + // + // This member is required. + Name *string + + // A comment to describe the key group. The comment cannot be longer than 128 + // characters. + Comment *string + + noSmithyDocumentSerde +} + +// A list of key groups. +type KeyGroupList struct { + + // The maximum number of key groups requested. + // + // This member is required. + MaxItems *int32 + + // The number of key groups returned in the response. + // + // This member is required. + Quantity *int32 + + // A list of key groups. + Items []KeyGroupSummary + + // If there are more items in the list than are in this response, this element is + // present. It contains the value that you should use in the Marker field of a + // subsequent request to continue listing key groups. + NextMarker *string + + noSmithyDocumentSerde +} + +// Contains information about a key group. +type KeyGroupSummary struct { + + // A key group. + // + // This member is required. + KeyGroup *KeyGroup + + noSmithyDocumentSerde +} + +// A list of CloudFront key pair identifiers. +type KeyPairIds struct { + + // The number of key pair identifiers in the list. + // + // This member is required. + Quantity *int32 + + // A list of CloudFront key pair identifiers. + Items []string + + noSmithyDocumentSerde +} + +// The key value store. Use this to separate data from function code, allowing you +// to update data without having to publish a new version of a function. The key +// value store holds keys and their corresponding values. +type KeyValueStore struct { + + // The Amazon Resource Name (ARN) of the key value store. + // + // This member is required. + ARN *string + + // A comment for the key value store. + // + // This member is required. + Comment *string + + // The unique Id for the key value store. + // + // This member is required. + Id *string + + // The last-modified time of the key value store. + // + // This member is required. + LastModifiedTime *time.Time + + // The name of the key value store. + // + // This member is required. + Name *string + + // The status of the key value store. + Status *string + + noSmithyDocumentSerde +} + +// The key value store association. +type KeyValueStoreAssociation struct { + + // The Amazon Resource Name (ARN) of the key value store association. + // + // This member is required. + KeyValueStoreARN *string + + noSmithyDocumentSerde +} + +// The key value store associations. +type KeyValueStoreAssociations struct { + + // The quantity of key value store associations. + // + // This member is required. + Quantity *int32 + + // The items of the key value store association. + Items []KeyValueStoreAssociation + + noSmithyDocumentSerde +} + +// The key value store list. +type KeyValueStoreList struct { + + // The maximum number of items in the key value store list. + // + // This member is required. + MaxItems *int32 + + // The quantity of the key value store list. + // + // This member is required. + Quantity *int32 + + // The items of the key value store list. + Items []KeyValueStore + + // The next marker associated with the key value store list. + NextMarker *string + + noSmithyDocumentSerde +} + +// A list of identifiers for the public keys that CloudFront can use to verify the +// signatures of signed URLs and signed cookies. +type KGKeyPairIds struct { + + // The identifier of the key group that contains the public keys. + KeyGroupId *string + + // A list of CloudFront key pair identifiers. + KeyPairIds *KeyPairIds + + noSmithyDocumentSerde +} + +// Contains information about the Amazon Kinesis data stream where you are sending +// real-time log data. +type KinesisStreamConfig struct { + + // The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role + // that CloudFront can use to send real-time log data to your Kinesis data stream. + // + // For more information the IAM role, see [Real-time log configuration IAM role] in the Amazon CloudFront Developer + // Guide. + // + // [Real-time log configuration IAM role]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html#understand-real-time-log-config-iam-role + // + // This member is required. + RoleARN *string + + // The Amazon Resource Name (ARN) of the Kinesis data stream where you are sending + // real-time log data. + // + // This member is required. + StreamARN *string + + noSmithyDocumentSerde +} + +// A complex type that contains a Lambda@Edge function association. +type LambdaFunctionAssociation struct { + + // Specifies the event type that triggers a Lambda@Edge function invocation. You + // can specify the following values: + // + // - viewer-request : The function executes when CloudFront receives a request + // from a viewer and before it checks to see whether the requested object is in the + // edge cache. + // + // - origin-request : The function executes only when CloudFront sends a request + // to your origin. When the requested object is in the edge cache, the function + // doesn't execute. + // + // - origin-response : The function executes after CloudFront receives a response + // from the origin and before it caches the object in the response. When the + // requested object is in the edge cache, the function doesn't execute. + // + // - viewer-response : The function executes before CloudFront returns the + // requested object to the viewer. The function executes regardless of whether the + // object was already in the edge cache. + // + // If the origin returns an HTTP status code other than HTTP 200 (OK), the + // function doesn't execute. + // + // This member is required. + EventType EventType + + // The ARN of the Lambda@Edge function. You must specify the ARN of a function + // version; you can't specify an alias or $LATEST. + // + // This member is required. + LambdaFunctionARN *string + + // A flag that allows a Lambda@Edge function to have read access to the body + // content. For more information, see [Accessing the Request Body by Choosing the Include Body Option]in the Amazon CloudFront Developer Guide. + // + // [Accessing the Request Body by Choosing the Include Body Option]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-include-body-access.html + IncludeBody *bool + + noSmithyDocumentSerde +} + +// A complex type that specifies a list of Lambda@Edge functions associations for +// a cache behavior. +// +// If you want to invoke one or more Lambda@Edge functions triggered by requests +// that match the PathPattern of the cache behavior, specify the applicable values +// for Quantity and Items . Note that there can be up to 4 +// LambdaFunctionAssociation items in this list (one for each possible value of +// EventType ) and each EventType can be associated with only one function. +// +// If you don't want to invoke any Lambda@Edge functions for the requests that +// match PathPattern , specify 0 for Quantity and omit Items . +type LambdaFunctionAssociations struct { + + // The number of Lambda@Edge function associations for this cache behavior. + // + // This member is required. + Quantity *int32 + + // Optional: A complex type that contains LambdaFunctionAssociation items for + // this cache behavior. If Quantity is 0 , you can omit Items . + Items []LambdaFunctionAssociation + + noSmithyDocumentSerde +} + +// A complex type that controls whether access logs are written for the +// distribution. +type LoggingConfig struct { + + // The Amazon S3 bucket to store the access logs in, for example, + // myawslogbucket.s3.amazonaws.com . + // + // This member is required. + Bucket *string + + // Specifies whether you want CloudFront to save access logs to an Amazon S3 + // bucket. If you don't want to enable logging when you create a distribution or if + // you want to disable logging for an existing distribution, specify false for + // Enabled , and specify empty Bucket and Prefix elements. If you specify false + // for Enabled but you specify values for Bucket , prefix , and IncludeCookies , + // the values are automatically deleted. + // + // This member is required. + Enabled *bool + + // Specifies whether you want CloudFront to include cookies in access logs, + // specify true for IncludeCookies . If you choose to include cookies in logs, + // CloudFront logs all cookies regardless of how you configure the cache behaviors + // for this distribution. If you don't want to include cookies when you create a + // distribution or if you want to disable include cookies for an existing + // distribution, specify false for IncludeCookies . + // + // This member is required. + IncludeCookies *bool + + // An optional string that you want CloudFront to prefix to the access log + // filenames for this distribution, for example, myprefix/ . If you want to enable + // logging, but you don't want to specify a prefix, you still must include an empty + // Prefix element in the Logging element. + // + // This member is required. + Prefix *string + + noSmithyDocumentSerde +} + +// A monitoring subscription. This structure contains information about whether +// additional CloudWatch metrics are enabled for a given CloudFront distribution. +type MonitoringSubscription struct { + + // A subscription configuration for additional CloudWatch metrics. + RealtimeMetricsSubscriptionConfig *RealtimeMetricsSubscriptionConfig + + noSmithyDocumentSerde +} + +// An origin. +// +// An origin is the location where content is stored, and from which CloudFront +// gets content to serve to viewers. To specify an origin: +// +// - Use S3OriginConfig to specify an Amazon S3 bucket that is not configured +// with static website hosting. +// +// - Use CustomOriginConfig to specify all other kinds of origins, including: +// +// - An Amazon S3 bucket that is configured with static website hosting +// +// - An Elastic Load Balancing load balancer +// +// - An Elemental MediaPackage endpoint +// +// - An Elemental MediaStore container +// +// - Any other HTTP server, running on an Amazon EC2 instance or any other kind +// of host +// +// For the current maximum number of origins that you can specify per +// distribution, see [General Quotas on Web Distributions]in the Amazon CloudFront Developer Guide (quotas were +// formerly referred to as limits). +// +// [General Quotas on Web Distributions]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html#limits-web-distributions +type Origin struct { + + // The domain name for the origin. + // + // For more information, see [Origin Domain Name] in the Amazon CloudFront Developer Guide. + // + // [Origin Domain Name]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesDomainName + // + // This member is required. + DomainName *string + + // A unique identifier for the origin. This value must be unique within the + // distribution. + // + // Use this value to specify the TargetOriginId in a CacheBehavior or + // DefaultCacheBehavior . + // + // This member is required. + Id *string + + // The number of times that CloudFront attempts to connect to the origin. The + // minimum number is 1, the maximum is 3, and the default (if you don't specify + // otherwise) is 3. + // + // For a custom origin (including an Amazon S3 bucket that's configured with + // static website hosting), this value also specifies the number of times that + // CloudFront attempts to get a response from the origin, in the case of an [Origin Response Timeout]. + // + // For more information, see [Origin Connection Attempts] in the Amazon CloudFront Developer Guide. + // + // [Origin Connection Attempts]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#origin-connection-attempts + // [Origin Response Timeout]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginResponseTimeout + ConnectionAttempts *int32 + + // The number of seconds that CloudFront waits when trying to establish a + // connection to the origin. The minimum timeout is 1 second, the maximum is 10 + // seconds, and the default (if you don't specify otherwise) is 10 seconds. + // + // For more information, see [Origin Connection Timeout] in the Amazon CloudFront Developer Guide. + // + // [Origin Connection Timeout]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#origin-connection-timeout + ConnectionTimeout *int32 + + // A list of HTTP header names and values that CloudFront adds to the requests + // that it sends to the origin. + // + // For more information, see [Adding Custom Headers to Origin Requests] in the Amazon CloudFront Developer Guide. + // + // [Adding Custom Headers to Origin Requests]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/add-origin-custom-headers.html + CustomHeaders *CustomHeaders + + // Use this type to specify an origin that is not an Amazon S3 bucket, with one + // exception. If the Amazon S3 bucket is configured with static website hosting, + // use this type. If the Amazon S3 bucket is not configured with static website + // hosting, use the S3OriginConfig type instead. + CustomOriginConfig *CustomOriginConfig + + // The unique identifier of an origin access control for this origin. + // + // For more information, see [Restricting access to an Amazon S3 origin] in the Amazon CloudFront Developer Guide. + // + // [Restricting access to an Amazon S3 origin]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html + OriginAccessControlId *string + + // An optional path that CloudFront appends to the origin domain name when + // CloudFront requests content from the origin. + // + // For more information, see [Origin Path] in the Amazon CloudFront Developer Guide. + // + // [Origin Path]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginPath + OriginPath *string + + // CloudFront Origin Shield. Using Origin Shield can help reduce the load on your + // origin. + // + // For more information, see [Using Origin Shield] in the Amazon CloudFront Developer Guide. + // + // [Using Origin Shield]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/origin-shield.html + OriginShield *OriginShield + + // Use this type to specify an origin that is an Amazon S3 bucket that is not + // configured with static website hosting. To specify any other type of origin, + // including an Amazon S3 bucket that is configured with static website hosting, + // use the CustomOriginConfig type instead. + S3OriginConfig *S3OriginConfig + + noSmithyDocumentSerde +} + +// A CloudFront origin access control, including its unique identifier. +type OriginAccessControl struct { + + // The unique identifier of the origin access control. + // + // This member is required. + Id *string + + // The origin access control. + OriginAccessControlConfig *OriginAccessControlConfig + + noSmithyDocumentSerde +} + +// A CloudFront origin access control configuration. +type OriginAccessControlConfig struct { + + // A name to identify the origin access control. You can specify up to 64 + // characters. + // + // This member is required. + Name *string + + // The type of origin that this origin access control is for. + // + // This member is required. + OriginAccessControlOriginType OriginAccessControlOriginTypes + + // Specifies which requests CloudFront signs (adds authentication information to). + // Specify always for the most common use case. For more information, see [origin access control advanced settings] in the + // Amazon CloudFront Developer Guide. + // + // This field can have one of the following values: + // + // - always – CloudFront signs all origin requests, overwriting the Authorization + // header from the viewer request if one exists. + // + // - never – CloudFront doesn't sign any origin requests. This value turns off + // origin access control for all origins in all distributions that use this origin + // access control. + // + // - no-override – If the viewer request doesn't contain the Authorization + // header, then CloudFront signs the origin request. If the viewer request contains + // the Authorization header, then CloudFront doesn't sign the origin request and + // instead passes along the Authorization header from the viewer request. + // WARNING: To pass along the Authorization header from the viewer request, you + // must add the Authorization header to a [cache policy]for all cache behaviors that use + // origins associated with this origin access control. + // + // [origin access control advanced settings]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html#oac-advanced-settings + // [cache policy]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html + // + // This member is required. + SigningBehavior OriginAccessControlSigningBehaviors + + // The signing protocol of the origin access control, which determines how + // CloudFront signs (authenticates) requests. The only valid value is sigv4 . + // + // This member is required. + SigningProtocol OriginAccessControlSigningProtocols + + // A description of the origin access control. + Description *string + + noSmithyDocumentSerde +} + +// A list of CloudFront origin access controls. +type OriginAccessControlList struct { + + // If there are more items in the list than are in this response, this value is + // true . + // + // This member is required. + IsTruncated *bool + + // The value of the Marker field that was provided in the request. + // + // This member is required. + Marker *string + + // The maximum number of origin access controls requested. + // + // This member is required. + MaxItems *int32 + + // The number of origin access controls returned in the response. + // + // This member is required. + Quantity *int32 + + // Contains the origin access controls in the list. + Items []OriginAccessControlSummary + + // If there are more items in the list than are in this response, this element is + // present. It contains the value to use in the Marker field of another request to + // continue listing origin access controls. + NextMarker *string + + noSmithyDocumentSerde +} + +// A CloudFront origin access control. +type OriginAccessControlSummary struct { + + // A description of the origin access control. + // + // This member is required. + Description *string + + // The unique identifier of the origin access control. + // + // This member is required. + Id *string + + // A unique name that identifies the origin access control. + // + // This member is required. + Name *string + + // The type of origin that this origin access control is for. + // + // This member is required. + OriginAccessControlOriginType OriginAccessControlOriginTypes + + // A value that specifies which requests CloudFront signs (adds authentication + // information to). This field can have one of the following values: + // + // - never – CloudFront doesn't sign any origin requests. + // + // - always – CloudFront signs all origin requests, overwriting the Authorization + // header from the viewer request if necessary. + // + // - no-override – If the viewer request doesn't contain the Authorization + // header, CloudFront signs the origin request. If the viewer request contains the + // Authorization header, CloudFront doesn't sign the origin request, but instead + // passes along the Authorization header that it received in the viewer request. + // + // This member is required. + SigningBehavior OriginAccessControlSigningBehaviors + + // The signing protocol of the origin access control. The signing protocol + // determines how CloudFront signs (authenticates) requests. The only valid value + // is sigv4 . + // + // This member is required. + SigningProtocol OriginAccessControlSigningProtocols + + noSmithyDocumentSerde +} + +// A complex type that contains HeaderName and HeaderValue elements, if any, for +// this distribution. +type OriginCustomHeader struct { + + // The name of a header that you want CloudFront to send to your origin. For more + // information, see [Adding Custom Headers to Origin Requests]in the Amazon CloudFront Developer Guide. + // + // [Adding Custom Headers to Origin Requests]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/forward-custom-headers.html + // + // This member is required. + HeaderName *string + + // The value for the header that you specified in the HeaderName field. + // + // This member is required. + HeaderValue *string + + noSmithyDocumentSerde +} + +// An origin group includes two origins (a primary origin and a second origin to +// failover to) and a failover criteria that you specify. You create an origin +// group to support origin failover in CloudFront. When you create or update a +// distribution, you can specify the origin group instead of a single origin, and +// CloudFront will failover from the primary origin to the second origin under the +// failover conditions that you've chosen. +type OriginGroup struct { + + // A complex type that contains information about the failover criteria for an + // origin group. + // + // This member is required. + FailoverCriteria *OriginGroupFailoverCriteria + + // The origin group's ID. + // + // This member is required. + Id *string + + // A complex type that contains information about the origins in an origin group. + // + // This member is required. + Members *OriginGroupMembers + + noSmithyDocumentSerde +} + +// A complex data type that includes information about the failover criteria for +// an origin group, including the status codes for which CloudFront will failover +// from the primary origin to the second origin. +type OriginGroupFailoverCriteria struct { + + // The status codes that, when returned from the primary origin, will trigger + // CloudFront to failover to the second origin. + // + // This member is required. + StatusCodes *StatusCodes + + noSmithyDocumentSerde +} + +// An origin in an origin group. +type OriginGroupMember struct { + + // The ID for an origin in an origin group. + // + // This member is required. + OriginId *string + + noSmithyDocumentSerde +} + +// A complex data type for the origins included in an origin group. +type OriginGroupMembers struct { + + // Items (origins) in an origin group. + // + // This member is required. + Items []OriginGroupMember + + // The number of origins in an origin group. + // + // This member is required. + Quantity *int32 + + noSmithyDocumentSerde +} + +// A complex data type for the origin groups specified for a distribution. +type OriginGroups struct { + + // The number of origin groups. + // + // This member is required. + Quantity *int32 + + // The items (origin groups) in a distribution. + Items []OriginGroup + + noSmithyDocumentSerde +} + +// An origin request policy. +// +// When it's attached to a cache behavior, the origin request policy determines +// the values that CloudFront includes in requests that it sends to the origin. +// Each request that CloudFront sends to the origin includes the following: +// +// - The request body and the URL path (without the domain name) from the viewer +// request. +// +// - The headers that CloudFront automatically includes in every origin request, +// including Host , User-Agent , and X-Amz-Cf-Id . +// +// - All HTTP headers, cookies, and URL query strings that are specified in the +// cache policy or the origin request policy. These can include items from the +// viewer request and, in the case of headers, additional ones that are added by +// CloudFront. +// +// CloudFront sends a request when it can't find an object in its cache that +// matches the request. If you want to send values to the origin and also include +// them in the cache key, use CachePolicy . +type OriginRequestPolicy struct { + + // The unique identifier for the origin request policy. + // + // This member is required. + Id *string + + // The date and time when the origin request policy was last modified. + // + // This member is required. + LastModifiedTime *time.Time + + // The origin request policy configuration. + // + // This member is required. + OriginRequestPolicyConfig *OriginRequestPolicyConfig + + noSmithyDocumentSerde +} + +// An origin request policy configuration. +// +// This configuration determines the values that CloudFront includes in requests +// that it sends to the origin. Each request that CloudFront sends to the origin +// includes the following: +// +// - The request body and the URL path (without the domain name) from the viewer +// request. +// +// - The headers that CloudFront automatically includes in every origin request, +// including Host , User-Agent , and X-Amz-Cf-Id . +// +// - All HTTP headers, cookies, and URL query strings that are specified in the +// cache policy or the origin request policy. These can include items from the +// viewer request and, in the case of headers, additional ones that are added by +// CloudFront. +// +// CloudFront sends a request when it can't find an object in its cache that +// matches the request. If you want to send values to the origin and also include +// them in the cache key, use CachePolicy . +type OriginRequestPolicyConfig struct { + + // The cookies from viewer requests to include in origin requests. + // + // This member is required. + CookiesConfig *OriginRequestPolicyCookiesConfig + + // The HTTP headers to include in origin requests. These can include headers from + // viewer requests and additional headers added by CloudFront. + // + // This member is required. + HeadersConfig *OriginRequestPolicyHeadersConfig + + // A unique name to identify the origin request policy. + // + // This member is required. + Name *string + + // The URL query strings from viewer requests to include in origin requests. + // + // This member is required. + QueryStringsConfig *OriginRequestPolicyQueryStringsConfig + + // A comment to describe the origin request policy. The comment cannot be longer + // than 128 characters. + Comment *string + + noSmithyDocumentSerde +} + +// An object that determines whether any cookies in viewer requests (and if so, +// which cookies) are included in requests that CloudFront sends to the origin. +type OriginRequestPolicyCookiesConfig struct { + + // Determines whether cookies in viewer requests are included in requests that + // CloudFront sends to the origin. Valid values are: + // + // - none – No cookies in viewer requests are included in requests that + // CloudFront sends to the origin. Even when this field is set to none , any + // cookies that are listed in a CachePolicy are included in origin requests. + // + // - whitelist – Only the cookies in viewer requests that are listed in the + // CookieNames type are included in requests that CloudFront sends to the origin. + // + // - all – All cookies in viewer requests are included in requests that + // CloudFront sends to the origin. + // + // - allExcept – All cookies in viewer requests are included in requests that + // CloudFront sends to the origin, except for those listed in the CookieNames + // type, which are not included. + // + // This member is required. + CookieBehavior OriginRequestPolicyCookieBehavior + + // Contains a list of cookie names. + Cookies *CookieNames + + noSmithyDocumentSerde +} + +// An object that determines whether any HTTP headers (and if so, which headers) +// are included in requests that CloudFront sends to the origin. +type OriginRequestPolicyHeadersConfig struct { + + // Determines whether any HTTP headers are included in requests that CloudFront + // sends to the origin. Valid values are: + // + // - none – No HTTP headers in viewer requests are included in requests that + // CloudFront sends to the origin. Even when this field is set to none , any + // headers that are listed in a CachePolicy are included in origin requests. + // + // - whitelist – Only the HTTP headers that are listed in the Headers type are + // included in requests that CloudFront sends to the origin. + // + // - allViewer – All HTTP headers in viewer requests are included in requests + // that CloudFront sends to the origin. + // + // - allViewerAndWhitelistCloudFront – All HTTP headers in viewer requests and + // the additional CloudFront headers that are listed in the Headers type are + // included in requests that CloudFront sends to the origin. The additional headers + // are added by CloudFront. + // + // - allExcept – All HTTP headers in viewer requests are included in requests + // that CloudFront sends to the origin, except for those listed in the Headers + // type, which are not included. + // + // This member is required. + HeaderBehavior OriginRequestPolicyHeaderBehavior + + // Contains a list of HTTP header names. + Headers *Headers + + noSmithyDocumentSerde +} + +// A list of origin request policies. +type OriginRequestPolicyList struct { + + // The maximum number of origin request policies requested. + // + // This member is required. + MaxItems *int32 + + // The total number of origin request policies returned in the response. + // + // This member is required. + Quantity *int32 + + // Contains the origin request policies in the list. + Items []OriginRequestPolicySummary + + // If there are more items in the list than are in this response, this element is + // present. It contains the value that you should use in the Marker field of a + // subsequent request to continue listing origin request policies where you left + // off. + NextMarker *string + + noSmithyDocumentSerde +} + +// An object that determines whether any URL query strings in viewer requests (and +// if so, which query strings) are included in requests that CloudFront sends to +// the origin. +type OriginRequestPolicyQueryStringsConfig struct { + + // Determines whether any URL query strings in viewer requests are included in + // requests that CloudFront sends to the origin. Valid values are: + // + // - none – No query strings in viewer requests are included in requests that + // CloudFront sends to the origin. Even when this field is set to none , any + // query strings that are listed in a CachePolicy are included in origin requests. + // + // - whitelist – Only the query strings in viewer requests that are listed in the + // QueryStringNames type are included in requests that CloudFront sends to the + // origin. + // + // - all – All query strings in viewer requests are included in requests that + // CloudFront sends to the origin. + // + // - allExcept – All query strings in viewer requests are included in requests + // that CloudFront sends to the origin, except for those listed in the + // QueryStringNames type, which are not included. + // + // This member is required. + QueryStringBehavior OriginRequestPolicyQueryStringBehavior + + // Contains the specific query strings in viewer requests that either are or are + // not included in requests that CloudFront sends to the origin. The behavior + // depends on whether the QueryStringBehavior field in the + // OriginRequestPolicyQueryStringsConfig type is set to whitelist (the listed + // query strings are included) or allExcept (the listed query strings are not + // included, but all other query strings are). + QueryStrings *QueryStringNames + + noSmithyDocumentSerde +} + +// Contains an origin request policy. +type OriginRequestPolicySummary struct { + + // The origin request policy. + // + // This member is required. + OriginRequestPolicy *OriginRequestPolicy + + // The type of origin request policy, either managed (created by Amazon Web + // Services) or custom (created in this Amazon Web Services account). + // + // This member is required. + Type OriginRequestPolicyType + + noSmithyDocumentSerde +} + +// Contains information about the origins for this distribution. +type Origins struct { + + // A list of origins. + // + // This member is required. + Items []Origin + + // The number of origins for this distribution. + // + // This member is required. + Quantity *int32 + + noSmithyDocumentSerde +} + +// CloudFront Origin Shield. +// +// Using Origin Shield can help reduce the load on your origin. For more +// information, see [Using Origin Shield]in the Amazon CloudFront Developer Guide. +// +// [Using Origin Shield]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/origin-shield.html +type OriginShield struct { + + // A flag that specifies whether Origin Shield is enabled. + // + // When it's enabled, CloudFront routes all requests through Origin Shield, which + // can help protect your origin. When it's disabled, CloudFront might send requests + // directly to your origin from multiple edge locations or regional edge caches. + // + // This member is required. + Enabled *bool + + // The Amazon Web Services Region for Origin Shield. + // + // Specify the Amazon Web Services Region that has the lowest latency to your + // origin. To specify a region, use the region code, not the region name. For + // example, specify the US East (Ohio) region as us-east-2 . + // + // When you enable CloudFront Origin Shield, you must specify the Amazon Web + // Services Region for Origin Shield. For the list of Amazon Web Services Regions + // that you can specify, and for help choosing the best Region for your origin, see + // [Choosing the Amazon Web Services Region for Origin Shield]in the Amazon CloudFront Developer Guide. + // + // [Choosing the Amazon Web Services Region for Origin Shield]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/origin-shield.html#choose-origin-shield-region + OriginShieldRegion *string + + noSmithyDocumentSerde +} + +// A complex type that contains information about the SSL/TLS protocols that +// CloudFront can use when establishing an HTTPS connection with your origin. +type OriginSslProtocols struct { + + // A list that contains allowed SSL/TLS protocols for this distribution. + // + // This member is required. + Items []SslProtocol + + // The number of SSL/TLS protocols that you want to allow CloudFront to use when + // establishing an HTTPS connection with this origin. + // + // This member is required. + Quantity *int32 + + noSmithyDocumentSerde +} + +// This object determines the values that CloudFront includes in the cache key. +// These values can include HTTP headers, cookies, and URL query strings. +// CloudFront uses the cache key to find an object in its cache that it can return +// to the viewer. +// +// The headers, cookies, and query strings that are included in the cache key are +// also included in requests that CloudFront sends to the origin. CloudFront sends +// a request when it can't find an object in its cache that matches the request's +// cache key. If you want to send values to the origin but not include them in the +// cache key, use OriginRequestPolicy . +type ParametersInCacheKeyAndForwardedToOrigin struct { + + // An object that determines whether any cookies in viewer requests (and if so, + // which cookies) are included in the cache key and in requests that CloudFront + // sends to the origin. + // + // This member is required. + CookiesConfig *CachePolicyCookiesConfig + + // A flag that can affect whether the Accept-Encoding HTTP header is included in + // the cache key and included in requests that CloudFront sends to the origin. + // + // This field is related to the EnableAcceptEncodingBrotli field. If one or both + // of these fields is true and the viewer request includes the Accept-Encoding + // header, then CloudFront does the following: + // + // - Normalizes the value of the viewer's Accept-Encoding header + // + // - Includes the normalized header in the cache key + // + // - Includes the normalized header in the request to the origin, if a request + // is necessary + // + // For more information, see [Compression support] in the Amazon CloudFront Developer Guide. + // + // If you set this value to true , and this cache behavior also has an origin + // request policy attached, do not include the Accept-Encoding header in the + // origin request policy. CloudFront always includes the Accept-Encoding header in + // origin requests when the value of this field is true , so including this header + // in an origin request policy has no effect. + // + // If both of these fields are false , then CloudFront treats the Accept-Encoding + // header the same as any other HTTP header in the viewer request. By default, it's + // not included in the cache key and it's not included in origin requests. In this + // case, you can manually add Accept-Encoding to the headers whitelist like any + // other HTTP header. + // + // [Compression support]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-policy-compressed-objects + // + // This member is required. + EnableAcceptEncodingGzip *bool + + // An object that determines whether any HTTP headers (and if so, which headers) + // are included in the cache key and in requests that CloudFront sends to the + // origin. + // + // This member is required. + HeadersConfig *CachePolicyHeadersConfig + + // An object that determines whether any URL query strings in viewer requests (and + // if so, which query strings) are included in the cache key and in requests that + // CloudFront sends to the origin. + // + // This member is required. + QueryStringsConfig *CachePolicyQueryStringsConfig + + // A flag that can affect whether the Accept-Encoding HTTP header is included in + // the cache key and included in requests that CloudFront sends to the origin. + // + // This field is related to the EnableAcceptEncodingGzip field. If one or both of + // these fields is true and the viewer request includes the Accept-Encoding + // header, then CloudFront does the following: + // + // - Normalizes the value of the viewer's Accept-Encoding header + // + // - Includes the normalized header in the cache key + // + // - Includes the normalized header in the request to the origin, if a request + // is necessary + // + // For more information, see [Compression support] in the Amazon CloudFront Developer Guide. + // + // If you set this value to true , and this cache behavior also has an origin + // request policy attached, do not include the Accept-Encoding header in the + // origin request policy. CloudFront always includes the Accept-Encoding header in + // origin requests when the value of this field is true , so including this header + // in an origin request policy has no effect. + // + // If both of these fields are false , then CloudFront treats the Accept-Encoding + // header the same as any other HTTP header in the viewer request. By default, it's + // not included in the cache key and it's not included in origin requests. In this + // case, you can manually add Accept-Encoding to the headers whitelist like any + // other HTTP header. + // + // [Compression support]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-policy-compressed-objects + EnableAcceptEncodingBrotli *bool + + noSmithyDocumentSerde +} + +// A complex type that contains information about the objects that you want to +// invalidate. For more information, see [Specifying the Objects to Invalidate]in the Amazon CloudFront Developer Guide. +// +// [Specifying the Objects to Invalidate]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html#invalidation-specifying-objects +type Paths struct { + + // The number of invalidation paths specified for the objects that you want to + // invalidate. + // + // This member is required. + Quantity *int32 + + // A complex type that contains a list of the paths that you want to invalidate. + Items []string + + noSmithyDocumentSerde +} + +// A public key that you can use with [signed URLs and signed cookies], or with [field-level encryption]. +// +// [signed URLs and signed cookies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html +// [field-level encryption]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/field-level-encryption.html +type PublicKey struct { + + // The date and time when the public key was uploaded. + // + // This member is required. + CreatedTime *time.Time + + // The identifier of the public key. + // + // This member is required. + Id *string + + // Configuration information about a public key that you can use with [signed URLs and signed cookies], or with [field-level encryption]. + // + // [signed URLs and signed cookies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html + // [field-level encryption]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/field-level-encryption.html + // + // This member is required. + PublicKeyConfig *PublicKeyConfig + + noSmithyDocumentSerde +} + +// Configuration information about a public key that you can use with [signed URLs and signed cookies], or with [field-level encryption]. +// +// [signed URLs and signed cookies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html +// [field-level encryption]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/field-level-encryption.html +type PublicKeyConfig struct { + + // A string included in the request to help make sure that the request can't be + // replayed. + // + // This member is required. + CallerReference *string + + // The public key that you can use with [signed URLs and signed cookies], or with [field-level encryption]. + // + // [signed URLs and signed cookies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html + // [field-level encryption]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/field-level-encryption.html + // + // This member is required. + EncodedKey *string + + // A name to help identify the public key. + // + // This member is required. + Name *string + + // A comment to describe the public key. The comment cannot be longer than 128 + // characters. + Comment *string + + noSmithyDocumentSerde +} + +// A list of public keys that you can use with [signed URLs and signed cookies], or with [field-level encryption]. +// +// [signed URLs and signed cookies]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html +// [field-level encryption]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/field-level-encryption.html +type PublicKeyList struct { + + // The maximum number of public keys you want in the response. + // + // This member is required. + MaxItems *int32 + + // The number of public keys in the list. + // + // This member is required. + Quantity *int32 + + // A list of public keys. + Items []PublicKeySummary + + // If there are more elements to be listed, this element is present and contains + // the value that you can use for the Marker request parameter to continue listing + // your public keys where you left off. + NextMarker *string + + noSmithyDocumentSerde +} + +// Contains information about a public key. +type PublicKeySummary struct { + + // The date and time when the public key was uploaded. + // + // This member is required. + CreatedTime *time.Time + + // The public key. + // + // This member is required. + EncodedKey *string + + // The identifier of the public key. + // + // This member is required. + Id *string + + // A name to help identify the public key. + // + // This member is required. + Name *string + + // A comment to describe the public key. The comment cannot be longer than 128 + // characters. + Comment *string + + noSmithyDocumentSerde +} + +// Query argument-profile mapping for field-level encryption. +type QueryArgProfile struct { + + // ID of profile to use for field-level encryption query argument-profile mapping + // + // This member is required. + ProfileId *string + + // Query argument for field-level encryption query argument-profile mapping. + // + // This member is required. + QueryArg *string + + noSmithyDocumentSerde +} + +// Configuration for query argument-profile mapping for field-level encryption. +type QueryArgProfileConfig struct { + + // Flag to set if you want a request to be forwarded to the origin even if the + // profile specified by the field-level encryption query argument, fle-profile, is + // unknown. + // + // This member is required. + ForwardWhenQueryArgProfileIsUnknown *bool + + // Profiles specified for query argument-profile mapping for field-level + // encryption. + QueryArgProfiles *QueryArgProfiles + + noSmithyDocumentSerde +} + +// Query argument-profile mapping for field-level encryption. +type QueryArgProfiles struct { + + // Number of profiles for query argument-profile mapping for field-level + // encryption. + // + // This member is required. + Quantity *int32 + + // Number of items for query argument-profile mapping for field-level encryption. + Items []QueryArgProfile + + noSmithyDocumentSerde +} + +// This field is deprecated. We recommend that you use a cache policy or an origin +// request policy instead of this field. +// +// If you want to include query strings in the cache key, use QueryStringsConfig +// in a cache policy. See CachePolicy . +// +// If you want to send query strings to the origin but not include them in the +// cache key, use QueryStringsConfig in an origin request policy. See +// OriginRequestPolicy . +// +// A complex type that contains information about the query string parameters that +// you want CloudFront to use for caching for a cache behavior. +type QueryStringCacheKeys struct { + + // The number of whitelisted query string parameters for a cache behavior. + // + // This member is required. + Quantity *int32 + + // A list that contains the query string parameters that you want CloudFront to + // use as a basis for caching for a cache behavior. If Quantity is 0, you can omit + // Items . + Items []string + + noSmithyDocumentSerde +} + +// Contains a list of query string names. +type QueryStringNames struct { + + // The number of query string names in the Items list. + // + // This member is required. + Quantity *int32 + + // A list of query string names. + Items []string + + noSmithyDocumentSerde +} + +// A real-time log configuration. +type RealtimeLogConfig struct { + + // The Amazon Resource Name (ARN) of this real-time log configuration. + // + // This member is required. + ARN *string + + // Contains information about the Amazon Kinesis data stream where you are sending + // real-time log data for this real-time log configuration. + // + // This member is required. + EndPoints []EndPoint + + // A list of fields that are included in each real-time log record. In an API + // response, the fields are provided in the same order in which they are sent to + // the Amazon Kinesis data stream. + // + // For more information about fields, see [Real-time log configuration fields] in the Amazon CloudFront Developer + // Guide. + // + // [Real-time log configuration fields]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html#understand-real-time-log-config-fields + // + // This member is required. + Fields []string + + // The unique name of this real-time log configuration. + // + // This member is required. + Name *string + + // The sampling rate for this real-time log configuration. The sampling rate + // determines the percentage of viewer requests that are represented in the + // real-time log data. The sampling rate is an integer between 1 and 100, + // inclusive. + // + // This member is required. + SamplingRate *int64 + + noSmithyDocumentSerde +} + +// A list of real-time log configurations. +type RealtimeLogConfigs struct { + + // A flag that indicates whether there are more real-time log configurations than + // are contained in this list. + // + // This member is required. + IsTruncated *bool + + // This parameter indicates where this list of real-time log configurations + // begins. This list includes real-time log configurations that occur after the + // marker. + // + // This member is required. + Marker *string + + // The maximum number of real-time log configurations requested. + // + // This member is required. + MaxItems *int32 + + // Contains the list of real-time log configurations. + Items []RealtimeLogConfig + + // If there are more items in the list than are in this response, this element is + // present. It contains the value that you should use in the Marker field of a + // subsequent request to continue listing real-time log configurations where you + // left off. + NextMarker *string + + noSmithyDocumentSerde +} + +// A subscription configuration for additional CloudWatch metrics. +type RealtimeMetricsSubscriptionConfig struct { + + // A flag that indicates whether additional CloudWatch metrics are enabled for a + // given CloudFront distribution. + // + // This member is required. + RealtimeMetricsSubscriptionStatus RealtimeMetricsSubscriptionStatus + + noSmithyDocumentSerde +} + +// A response headers policy. +// +// A response headers policy contains information about a set of HTTP response +// headers. +// +// After you create a response headers policy, you can use its ID to attach it to +// one or more cache behaviors in a CloudFront distribution. When it's attached to +// a cache behavior, the response headers policy affects the HTTP headers that +// CloudFront includes in HTTP responses to requests that match the cache behavior. +// CloudFront adds or removes response headers according to the configuration of +// the response headers policy. +// +// For more information, see [Adding or removing HTTP headers in CloudFront responses] in the Amazon CloudFront Developer Guide. +// +// [Adding or removing HTTP headers in CloudFront responses]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/modifying-response-headers.html +type ResponseHeadersPolicy struct { + + // The identifier for the response headers policy. + // + // This member is required. + Id *string + + // The date and time when the response headers policy was last modified. + // + // This member is required. + LastModifiedTime *time.Time + + // A response headers policy configuration. + // + // This member is required. + ResponseHeadersPolicyConfig *ResponseHeadersPolicyConfig + + noSmithyDocumentSerde +} + +// A list of HTTP header names that CloudFront includes as values for the +// Access-Control-Allow-Headers HTTP response header. +// +// For more information about the Access-Control-Allow-Headers HTTP response +// header, see [Access-Control-Allow-Headers]in the MDN Web Docs. +// +// [Access-Control-Allow-Headers]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Headers +type ResponseHeadersPolicyAccessControlAllowHeaders struct { + + // The list of HTTP header names. You can specify * to allow all headers. + // + // This member is required. + Items []string + + // The number of HTTP header names in the list. + // + // This member is required. + Quantity *int32 + + noSmithyDocumentSerde +} + +// A list of HTTP methods that CloudFront includes as values for the +// Access-Control-Allow-Methods HTTP response header. +// +// For more information about the Access-Control-Allow-Methods HTTP response +// header, see [Access-Control-Allow-Methods]in the MDN Web Docs. +// +// [Access-Control-Allow-Methods]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Methods +type ResponseHeadersPolicyAccessControlAllowMethods struct { + + // The list of HTTP methods. Valid values are: + // + // - GET + // + // - DELETE + // + // - HEAD + // + // - OPTIONS + // + // - PATCH + // + // - POST + // + // - PUT + // + // - ALL + // + // ALL is a special value that includes all of the listed HTTP methods. + // + // This member is required. + Items []ResponseHeadersPolicyAccessControlAllowMethodsValues + + // The number of HTTP methods in the list. + // + // This member is required. + Quantity *int32 + + noSmithyDocumentSerde +} + +// A list of origins (domain names) that CloudFront can use as the value for the +// Access-Control-Allow-Origin HTTP response header. +// +// For more information about the Access-Control-Allow-Origin HTTP response +// header, see [Access-Control-Allow-Origin]in the MDN Web Docs. +// +// [Access-Control-Allow-Origin]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin +type ResponseHeadersPolicyAccessControlAllowOrigins struct { + + // The list of origins (domain names). You can specify * to allow all origins. + // + // This member is required. + Items []string + + // The number of origins in the list. + // + // This member is required. + Quantity *int32 + + noSmithyDocumentSerde +} + +// A list of HTTP headers that CloudFront includes as values for the +// Access-Control-Expose-Headers HTTP response header. +// +// For more information about the Access-Control-Expose-Headers HTTP response +// header, see [Access-Control-Expose-Headers]in the MDN Web Docs. +// +// [Access-Control-Expose-Headers]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Expose-Headers +type ResponseHeadersPolicyAccessControlExposeHeaders struct { + + // The number of HTTP headers in the list. + // + // This member is required. + Quantity *int32 + + // The list of HTTP headers. You can specify * to expose all headers. + Items []string + + noSmithyDocumentSerde +} + +// A response headers policy configuration. +// +// A response headers policy configuration contains metadata about the response +// headers policy, and configurations for sets of HTTP response headers. +type ResponseHeadersPolicyConfig struct { + + // A name to identify the response headers policy. + // + // The name must be unique for response headers policies in this Amazon Web + // Services account. + // + // This member is required. + Name *string + + // A comment to describe the response headers policy. + // + // The comment cannot be longer than 128 characters. + Comment *string + + // A configuration for a set of HTTP response headers that are used for + // cross-origin resource sharing (CORS). + CorsConfig *ResponseHeadersPolicyCorsConfig + + // A configuration for a set of custom HTTP response headers. + CustomHeadersConfig *ResponseHeadersPolicyCustomHeadersConfig + + // A configuration for a set of HTTP headers to remove from the HTTP response. + RemoveHeadersConfig *ResponseHeadersPolicyRemoveHeadersConfig + + // A configuration for a set of security-related HTTP response headers. + SecurityHeadersConfig *ResponseHeadersPolicySecurityHeadersConfig + + // A configuration for enabling the Server-Timing header in HTTP responses sent + // from CloudFront. + ServerTimingHeadersConfig *ResponseHeadersPolicyServerTimingHeadersConfig + + noSmithyDocumentSerde +} + +// The policy directives and their values that CloudFront includes as values for +// the Content-Security-Policy HTTP response header. +// +// For more information about the Content-Security-Policy HTTP response header, +// see [Content-Security-Policy]in the MDN Web Docs. +// +// [Content-Security-Policy]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy +type ResponseHeadersPolicyContentSecurityPolicy struct { + + // The policy directives and their values that CloudFront includes as values for + // the Content-Security-Policy HTTP response header. + // + // This member is required. + ContentSecurityPolicy *string + + // A Boolean that determines whether CloudFront overrides the + // Content-Security-Policy HTTP response header received from the origin with the + // one specified in this response headers policy. + // + // This member is required. + Override *bool + + noSmithyDocumentSerde +} + +// Determines whether CloudFront includes the X-Content-Type-Options HTTP response +// header with its value set to nosniff . +// +// For more information about the X-Content-Type-Options HTTP response header, see [X-Content-Type-Options] +// in the MDN Web Docs. +// +// [X-Content-Type-Options]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options +type ResponseHeadersPolicyContentTypeOptions struct { + + // A Boolean that determines whether CloudFront overrides the + // X-Content-Type-Options HTTP response header received from the origin with the + // one specified in this response headers policy. + // + // This member is required. + Override *bool + + noSmithyDocumentSerde +} + +// A configuration for a set of HTTP response headers that are used for +// cross-origin resource sharing (CORS). CloudFront adds these headers to HTTP +// responses that it sends for CORS requests that match a cache behavior associated +// with this response headers policy. +// +// For more information about CORS, see [Cross-Origin Resource Sharing (CORS)] in the MDN Web Docs. +// +// [Cross-Origin Resource Sharing (CORS)]: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS +type ResponseHeadersPolicyCorsConfig struct { + + // A Boolean that CloudFront uses as the value for the + // Access-Control-Allow-Credentials HTTP response header. + // + // For more information about the Access-Control-Allow-Credentials HTTP response + // header, see [Access-Control-Allow-Credentials]in the MDN Web Docs. + // + // [Access-Control-Allow-Credentials]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials + // + // This member is required. + AccessControlAllowCredentials *bool + + // A list of HTTP header names that CloudFront includes as values for the + // Access-Control-Allow-Headers HTTP response header. + // + // For more information about the Access-Control-Allow-Headers HTTP response + // header, see [Access-Control-Allow-Headers]in the MDN Web Docs. + // + // [Access-Control-Allow-Headers]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Headers + // + // This member is required. + AccessControlAllowHeaders *ResponseHeadersPolicyAccessControlAllowHeaders + + // A list of HTTP methods that CloudFront includes as values for the + // Access-Control-Allow-Methods HTTP response header. + // + // For more information about the Access-Control-Allow-Methods HTTP response + // header, see [Access-Control-Allow-Methods]in the MDN Web Docs. + // + // [Access-Control-Allow-Methods]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Methods + // + // This member is required. + AccessControlAllowMethods *ResponseHeadersPolicyAccessControlAllowMethods + + // A list of origins (domain names) that CloudFront can use as the value for the + // Access-Control-Allow-Origin HTTP response header. + // + // For more information about the Access-Control-Allow-Origin HTTP response + // header, see [Access-Control-Allow-Origin]in the MDN Web Docs. + // + // [Access-Control-Allow-Origin]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin + // + // This member is required. + AccessControlAllowOrigins *ResponseHeadersPolicyAccessControlAllowOrigins + + // A Boolean that determines whether CloudFront overrides HTTP response headers + // received from the origin with the ones specified in this response headers + // policy. + // + // This member is required. + OriginOverride *bool + + // A list of HTTP headers that CloudFront includes as values for the + // Access-Control-Expose-Headers HTTP response header. + // + // For more information about the Access-Control-Expose-Headers HTTP response + // header, see [Access-Control-Expose-Headers]in the MDN Web Docs. + // + // [Access-Control-Expose-Headers]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Expose-Headers + AccessControlExposeHeaders *ResponseHeadersPolicyAccessControlExposeHeaders + + // A number that CloudFront uses as the value for the Access-Control-Max-Age HTTP + // response header. + // + // For more information about the Access-Control-Max-Age HTTP response header, see [Access-Control-Max-Age] + // in the MDN Web Docs. + // + // [Access-Control-Max-Age]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Max-Age + AccessControlMaxAgeSec *int32 + + noSmithyDocumentSerde +} + +// An HTTP response header name and its value. CloudFront includes this header in +// HTTP responses that it sends for requests that match a cache behavior that's +// associated with this response headers policy. +type ResponseHeadersPolicyCustomHeader struct { + + // The HTTP response header name. + // + // This member is required. + Header *string + + // A Boolean that determines whether CloudFront overrides a response header with + // the same name received from the origin with the header specified here. + // + // This member is required. + Override *bool + + // The value for the HTTP response header. + // + // This member is required. + Value *string + + noSmithyDocumentSerde +} + +// A list of HTTP response header names and their values. CloudFront includes +// these headers in HTTP responses that it sends for requests that match a cache +// behavior that's associated with this response headers policy. +type ResponseHeadersPolicyCustomHeadersConfig struct { + + // The number of HTTP response headers in the list. + // + // This member is required. + Quantity *int32 + + // The list of HTTP response headers and their values. + Items []ResponseHeadersPolicyCustomHeader + + noSmithyDocumentSerde +} + +// Determines whether CloudFront includes the X-Frame-Options HTTP response header +// and the header's value. +// +// For more information about the X-Frame-Options HTTP response header, see [X-Frame-Options] in +// the MDN Web Docs. +// +// [X-Frame-Options]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options +type ResponseHeadersPolicyFrameOptions struct { + + // The value of the X-Frame-Options HTTP response header. Valid values are DENY + // and SAMEORIGIN . + // + // For more information about these values, see [X-Frame-Options] in the MDN Web Docs. + // + // [X-Frame-Options]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options + // + // This member is required. + FrameOption FrameOptionsList + + // A Boolean that determines whether CloudFront overrides the X-Frame-Options HTTP + // response header received from the origin with the one specified in this response + // headers policy. + // + // This member is required. + Override *bool + + noSmithyDocumentSerde +} + +// A list of response headers policies. +type ResponseHeadersPolicyList struct { + + // The maximum number of response headers policies requested. + // + // This member is required. + MaxItems *int32 + + // The number of response headers policies returned. + // + // This member is required. + Quantity *int32 + + // The response headers policies in the list. + Items []ResponseHeadersPolicySummary + + // If there are more items in the list than are in this response, this element is + // present. It contains the value that you should use in the Marker field of a + // subsequent request to continue listing response headers policies where you left + // off. + NextMarker *string + + noSmithyDocumentSerde +} + +// Determines whether CloudFront includes the Referrer-Policy HTTP response header +// and the header's value. +// +// For more information about the Referrer-Policy HTTP response header, see [Referrer-Policy] in +// the MDN Web Docs. +// +// [Referrer-Policy]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy +type ResponseHeadersPolicyReferrerPolicy struct { + + // A Boolean that determines whether CloudFront overrides the Referrer-Policy HTTP + // response header received from the origin with the one specified in this response + // headers policy. + // + // This member is required. + Override *bool + + // The value of the Referrer-Policy HTTP response header. Valid values are: + // + // - no-referrer + // + // - no-referrer-when-downgrade + // + // - origin + // + // - origin-when-cross-origin + // + // - same-origin + // + // - strict-origin + // + // - strict-origin-when-cross-origin + // + // - unsafe-url + // + // For more information about these values, see [Referrer-Policy] in the MDN Web Docs. + // + // [Referrer-Policy]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy + // + // This member is required. + ReferrerPolicy ReferrerPolicyList + + noSmithyDocumentSerde +} + +// The name of an HTTP header that CloudFront removes from HTTP responses to +// requests that match the cache behavior that this response headers policy is +// attached to. +type ResponseHeadersPolicyRemoveHeader struct { + + // The HTTP header name. + // + // This member is required. + Header *string + + noSmithyDocumentSerde +} + +// A list of HTTP header names that CloudFront removes from HTTP responses to +// requests that match the cache behavior that this response headers policy is +// attached to. +type ResponseHeadersPolicyRemoveHeadersConfig struct { + + // The number of HTTP header names in the list. + // + // This member is required. + Quantity *int32 + + // The list of HTTP header names. + Items []ResponseHeadersPolicyRemoveHeader + + noSmithyDocumentSerde +} + +// A configuration for a set of security-related HTTP response headers. CloudFront +// adds these headers to HTTP responses that it sends for requests that match a +// cache behavior associated with this response headers policy. +type ResponseHeadersPolicySecurityHeadersConfig struct { + + // The policy directives and their values that CloudFront includes as values for + // the Content-Security-Policy HTTP response header. + // + // For more information about the Content-Security-Policy HTTP response header, + // see [Content-Security-Policy]in the MDN Web Docs. + // + // [Content-Security-Policy]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy + ContentSecurityPolicy *ResponseHeadersPolicyContentSecurityPolicy + + // Determines whether CloudFront includes the X-Content-Type-Options HTTP response + // header with its value set to nosniff . + // + // For more information about the X-Content-Type-Options HTTP response header, see [X-Content-Type-Options] + // in the MDN Web Docs. + // + // [X-Content-Type-Options]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options + ContentTypeOptions *ResponseHeadersPolicyContentTypeOptions + + // Determines whether CloudFront includes the X-Frame-Options HTTP response header + // and the header's value. + // + // For more information about the X-Frame-Options HTTP response header, see [X-Frame-Options] in + // the MDN Web Docs. + // + // [X-Frame-Options]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options + FrameOptions *ResponseHeadersPolicyFrameOptions + + // Determines whether CloudFront includes the Referrer-Policy HTTP response header + // and the header's value. + // + // For more information about the Referrer-Policy HTTP response header, see [Referrer-Policy] in + // the MDN Web Docs. + // + // [Referrer-Policy]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy + ReferrerPolicy *ResponseHeadersPolicyReferrerPolicy + + // Determines whether CloudFront includes the Strict-Transport-Security HTTP + // response header and the header's value. + // + // For more information about the Strict-Transport-Security HTTP response header, + // see [Security headers]in the Amazon CloudFront Developer Guide and [Strict-Transport-Security] in the MDN Web Docs. + // + // [Strict-Transport-Security]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security + // [Security headers]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/understanding-response-headers-policies.html#understanding-response-headers-policies-security + StrictTransportSecurity *ResponseHeadersPolicyStrictTransportSecurity + + // Determines whether CloudFront includes the X-XSS-Protection HTTP response + // header and the header's value. + // + // For more information about the X-XSS-Protection HTTP response header, see [X-XSS-Protection] in + // the MDN Web Docs. + // + // [X-XSS-Protection]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection + XSSProtection *ResponseHeadersPolicyXSSProtection + + noSmithyDocumentSerde +} + +// A configuration for enabling the Server-Timing header in HTTP responses sent +// from CloudFront. CloudFront adds this header to HTTP responses that it sends in +// response to requests that match a cache behavior that's associated with this +// response headers policy. +// +// You can use the Server-Timing header to view metrics that can help you gain +// insights about the behavior and performance of CloudFront. For example, you can +// see which cache layer served a cache hit, or the first byte latency from the +// origin when there was a cache miss. You can use the metrics in the Server-Timing +// header to troubleshoot issues or test the efficiency of your CloudFront +// configuration. For more information, see [Server-Timing header]in the Amazon CloudFront Developer +// Guide. +// +// [Server-Timing header]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/understanding-response-headers-policies.html#server-timing-header +type ResponseHeadersPolicyServerTimingHeadersConfig struct { + + // A Boolean that determines whether CloudFront adds the Server-Timing header to + // HTTP responses that it sends in response to requests that match a cache behavior + // that's associated with this response headers policy. + // + // This member is required. + Enabled *bool + + // A number 0–100 (inclusive) that specifies the percentage of responses that you + // want CloudFront to add the Server-Timing header to. When you set the sampling + // rate to 100, CloudFront adds the Server-Timing header to the HTTP response for + // every request that matches the cache behavior that this response headers policy + // is attached to. When you set it to 50, CloudFront adds the header to 50% of the + // responses for requests that match the cache behavior. You can set the sampling + // rate to any number 0–100 with up to four decimal places. + SamplingRate *float64 + + noSmithyDocumentSerde +} + +// Determines whether CloudFront includes the Strict-Transport-Security HTTP +// response header and the header's value. +// +// For more information about the Strict-Transport-Security HTTP response header, +// see [Strict-Transport-Security]in the MDN Web Docs. +// +// [Strict-Transport-Security]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security +type ResponseHeadersPolicyStrictTransportSecurity struct { + + // A number that CloudFront uses as the value for the max-age directive in the + // Strict-Transport-Security HTTP response header. + // + // This member is required. + AccessControlMaxAgeSec *int32 + + // A Boolean that determines whether CloudFront overrides the + // Strict-Transport-Security HTTP response header received from the origin with the + // one specified in this response headers policy. + // + // This member is required. + Override *bool + + // A Boolean that determines whether CloudFront includes the includeSubDomains + // directive in the Strict-Transport-Security HTTP response header. + IncludeSubdomains *bool + + // A Boolean that determines whether CloudFront includes the preload directive in + // the Strict-Transport-Security HTTP response header. + Preload *bool + + noSmithyDocumentSerde +} + +// Contains a response headers policy. +type ResponseHeadersPolicySummary struct { + + // The response headers policy. + // + // This member is required. + ResponseHeadersPolicy *ResponseHeadersPolicy + + // The type of response headers policy, either managed (created by Amazon Web + // Services) or custom (created in this Amazon Web Services account). + // + // This member is required. + Type ResponseHeadersPolicyType + + noSmithyDocumentSerde +} + +// Determines whether CloudFront includes the X-XSS-Protection HTTP response +// header and the header's value. +// +// For more information about the X-XSS-Protection HTTP response header, see [X-XSS-Protection] in +// the MDN Web Docs. +// +// [X-XSS-Protection]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection +type ResponseHeadersPolicyXSSProtection struct { + + // A Boolean that determines whether CloudFront overrides the X-XSS-Protection + // HTTP response header received from the origin with the one specified in this + // response headers policy. + // + // This member is required. + Override *bool + + // A Boolean that determines the value of the X-XSS-Protection HTTP response + // header. When this setting is true , the value of the X-XSS-Protection header is + // 1 . When this setting is false , the value of the X-XSS-Protection header is 0 . + // + // For more information about these settings, see [X-XSS-Protection] in the MDN Web Docs. + // + // [X-XSS-Protection]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection + // + // This member is required. + Protection *bool + + // A Boolean that determines whether CloudFront includes the mode=block directive + // in the X-XSS-Protection header. + // + // For more information about this directive, see [X-XSS-Protection] in the MDN Web Docs. + // + // [X-XSS-Protection]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection + ModeBlock *bool + + // A reporting URI, which CloudFront uses as the value of the report directive in + // the X-XSS-Protection header. + // + // You cannot specify a ReportUri when ModeBlock is true . + // + // For more information about using a reporting URL, see [X-XSS-Protection] in the MDN Web Docs. + // + // [X-XSS-Protection]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection + ReportUri *string + + noSmithyDocumentSerde +} + +// A complex type that identifies ways in which you want to restrict distribution +// of your content. +type Restrictions struct { + + // A complex type that controls the countries in which your content is + // distributed. CloudFront determines the location of your users using MaxMind + // GeoIP databases. + // + // This member is required. + GeoRestriction *GeoRestriction + + noSmithyDocumentSerde +} + +// A complex type that contains information about the Amazon S3 bucket from which +// you want CloudFront to get your media files for distribution. +type S3Origin struct { + + // The DNS name of the Amazon S3 origin. + // + // This member is required. + DomainName *string + + // The CloudFront origin access identity to associate with the distribution. Use + // an origin access identity to configure the distribution so that end users can + // only access objects in an Amazon S3 bucket through CloudFront. + // + // If you want end users to be able to access objects using either the CloudFront + // URL or the Amazon S3 URL, specify an empty OriginAccessIdentity element. + // + // To delete the origin access identity from an existing distribution, update the + // distribution configuration and include an empty OriginAccessIdentity element. + // + // To replace the origin access identity, update the distribution configuration + // and specify the new origin access identity. + // + // For more information, see [Using an Origin Access Identity to Restrict Access to Your Amazon S3 Content] in the Amazon CloudFront Developer Guide. + // + // [Using an Origin Access Identity to Restrict Access to Your Amazon S3 Content]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html + // + // This member is required. + OriginAccessIdentity *string + + noSmithyDocumentSerde +} + +// A complex type that contains information about the Amazon S3 origin. If the +// origin is a custom origin or an S3 bucket that is configured as a website +// endpoint, use the CustomOriginConfig element instead. +type S3OriginConfig struct { + + // If you're using origin access control (OAC) instead of origin access identity, + // specify an empty OriginAccessIdentity element. For more information, see [Restricting access to an Amazon Web Services] in + // the Amazon CloudFront Developer Guide. + // + // The CloudFront origin access identity to associate with the origin. Use an + // origin access identity to configure the origin so that viewers can only access + // objects in an Amazon S3 bucket through CloudFront. The format of the value is: + // + // origin-access-identity/cloudfront/ID-of-origin-access-identity + // + // The ID-of-origin-access-identity is the value that CloudFront returned in the + // ID element when you created the origin access identity. + // + // If you want viewers to be able to access objects using either the CloudFront + // URL or the Amazon S3 URL, specify an empty OriginAccessIdentity element. + // + // To delete the origin access identity from an existing distribution, update the + // distribution configuration and include an empty OriginAccessIdentity element. + // + // To replace the origin access identity, update the distribution configuration + // and specify the new origin access identity. + // + // For more information about the origin access identity, see [Serving Private Content through CloudFront] in the Amazon + // CloudFront Developer Guide. + // + // [Serving Private Content through CloudFront]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html + // [Restricting access to an Amazon Web Services]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-origin.html + // + // This member is required. + OriginAccessIdentity *string + + noSmithyDocumentSerde +} + +// Session stickiness provides the ability to define multiple requests from a +// single viewer as a single session. This prevents the potentially inconsistent +// experience of sending some of a given user's requests to your staging +// distribution, while others are sent to your primary distribution. Define the +// session duration using TTL values. +type SessionStickinessConfig struct { + + // The amount of time after which you want sessions to cease if no requests are + // received. Allowed values are 300–3600 seconds (5–60 minutes). + // + // The value must be less than or equal to MaximumTTL . + // + // This member is required. + IdleTTL *int32 + + // The maximum amount of time to consider requests from the viewer as being part + // of the same session. Allowed values are 300–3600 seconds (5–60 minutes). + // + // The value must be greater than or equal to IdleTTL . + // + // This member is required. + MaximumTTL *int32 + + noSmithyDocumentSerde +} + +// A list of Amazon Web Services accounts and the active CloudFront key pairs in +// each account that CloudFront can use to verify the signatures of signed URLs and +// signed cookies. +type Signer struct { + + // An Amazon Web Services account number that contains active CloudFront key pairs + // that CloudFront can use to verify the signatures of signed URLs and signed + // cookies. If the Amazon Web Services account that owns the key pairs is the same + // account that owns the CloudFront distribution, the value of this field is self . + AwsAccountNumber *string + + // A list of CloudFront key pair identifiers. + KeyPairIds *KeyPairIds + + noSmithyDocumentSerde +} + +// The CloudFront domain name of the staging distribution. +type StagingDistributionDnsNames struct { + + // The number of CloudFront domain names in your staging distribution. + // + // This member is required. + Quantity *int32 + + // The CloudFront domain name of the staging distribution. + Items []string + + noSmithyDocumentSerde +} + +// A complex data type for the status codes that you specify that, when returned +// by a primary origin, trigger CloudFront to failover to a second origin. +type StatusCodes struct { + + // The items (status codes) for an origin group. + // + // This member is required. + Items []int32 + + // The number of status codes. + // + // This member is required. + Quantity *int32 + + noSmithyDocumentSerde +} + +// A streaming distribution tells CloudFront where you want RTMP content to be +// delivered from, and the details about how to track and manage content delivery. +type StreamingDistribution struct { + + // The ARN (Amazon Resource Name) for the distribution. For example: + // arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5 , where + // 123456789012 is your Amazon Web Services account ID. + // + // This member is required. + ARN *string + + // A complex type that lists the Amazon Web Services accounts, if any, that you + // included in the TrustedSigners complex type for this distribution. These are + // the accounts that you want to allow to create signed URLs for private content. + // + // The Signer complex type lists the Amazon Web Services account number of the + // trusted signer or self if the signer is the Amazon Web Services account that + // created the distribution. The Signer element also includes the IDs of any + // active CloudFront key pairs that are associated with the trusted signer's Amazon + // Web Services account. If no KeyPairId element appears for a Signer , that signer + // can't create signed URLs. + // + // For more information, see [Serving Private Content through CloudFront] in the Amazon CloudFront Developer Guide. + // + // [Serving Private Content through CloudFront]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html + // + // This member is required. + ActiveTrustedSigners *ActiveTrustedSigners + + // The domain name that corresponds to the streaming distribution, for example, + // s5c39gqb8ow64r.cloudfront.net . + // + // This member is required. + DomainName *string + + // The identifier for the RTMP distribution. For example: EGTXBD79EXAMPLE . + // + // This member is required. + Id *string + + // The current status of the RTMP distribution. When the status is Deployed , the + // distribution's information is propagated to all CloudFront edge locations. + // + // This member is required. + Status *string + + // The current configuration information for the RTMP distribution. + // + // This member is required. + StreamingDistributionConfig *StreamingDistributionConfig + + // The date and time that the distribution was last modified. + LastModifiedTime *time.Time + + noSmithyDocumentSerde +} + +// The RTMP distribution's configuration information. +type StreamingDistributionConfig struct { + + // A unique value (for example, a date-time stamp) that ensures that the request + // can't be replayed. + // + // If the value of CallerReference is new (regardless of the content of the + // StreamingDistributionConfig object), CloudFront creates a new distribution. + // + // If CallerReference is a value that you already sent in a previous request to + // create a distribution, CloudFront returns a DistributionAlreadyExists error. + // + // This member is required. + CallerReference *string + + // Any comments you want to include about the streaming distribution. + // + // This member is required. + Comment *string + + // Whether the streaming distribution is enabled to accept user requests for + // content. + // + // This member is required. + Enabled *bool + + // A complex type that contains information about the Amazon S3 bucket from which + // you want CloudFront to get your media files for distribution. + // + // This member is required. + S3Origin *S3Origin + + // A complex type that specifies any Amazon Web Services accounts that you want to + // permit to create signed URLs for private content. If you want the distribution + // to use signed URLs, include this element; if you want the distribution to use + // public URLs, remove this element. For more information, see [Serving Private Content through CloudFront]in the Amazon + // CloudFront Developer Guide. + // + // [Serving Private Content through CloudFront]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html + // + // This member is required. + TrustedSigners *TrustedSigners + + // A complex type that contains information about CNAMEs (alternate domain names), + // if any, for this streaming distribution. + Aliases *Aliases + + // A complex type that controls whether access logs are written for the streaming + // distribution. + Logging *StreamingLoggingConfig + + // A complex type that contains information about price class for this streaming + // distribution. + PriceClass PriceClass + + noSmithyDocumentSerde +} + +// A streaming distribution Configuration and a list of tags to be associated with +// the streaming distribution. +type StreamingDistributionConfigWithTags struct { + + // A streaming distribution Configuration. + // + // This member is required. + StreamingDistributionConfig *StreamingDistributionConfig + + // A complex type that contains zero or more Tag elements. + // + // This member is required. + Tags *Tags + + noSmithyDocumentSerde +} + +// A streaming distribution list. +type StreamingDistributionList struct { + + // A flag that indicates whether more streaming distributions remain to be listed. + // If your results were truncated, you can make a follow-up pagination request + // using the Marker request parameter to retrieve more distributions in the list. + // + // This member is required. + IsTruncated *bool + + // The value you provided for the Marker request parameter. + // + // This member is required. + Marker *string + + // The value you provided for the MaxItems request parameter. + // + // This member is required. + MaxItems *int32 + + // The number of streaming distributions that were created by the current Amazon + // Web Services account. + // + // This member is required. + Quantity *int32 + + // A complex type that contains one StreamingDistributionSummary element for each + // distribution that was created by the current Amazon Web Services account. + Items []StreamingDistributionSummary + + // If IsTruncated is true , this element is present and contains the value you can + // use for the Marker request parameter to continue listing your RTMP + // distributions where they left off. + NextMarker *string + + noSmithyDocumentSerde +} + +// A summary of the information for a CloudFront streaming distribution. +type StreamingDistributionSummary struct { + + // The ARN (Amazon Resource Name) for the streaming distribution. For example: + // arn:aws:cloudfront::123456789012:streaming-distribution/EDFDVBD632BHDS5 , where + // 123456789012 is your Amazon Web Services account ID. + // + // This member is required. + ARN *string + + // A complex type that contains information about CNAMEs (alternate domain names), + // if any, for this streaming distribution. + // + // This member is required. + Aliases *Aliases + + // The comment originally specified when this distribution was created. + // + // This member is required. + Comment *string + + // The domain name corresponding to the distribution, for example, + // d111111abcdef8.cloudfront.net . + // + // This member is required. + DomainName *string + + // Whether the distribution is enabled to accept end user requests for content. + // + // This member is required. + Enabled *bool + + // The identifier for the distribution, for example, EDFDVBD632BHDS5 . + // + // This member is required. + Id *string + + // The date and time the distribution was last modified. + // + // This member is required. + LastModifiedTime *time.Time + + // A complex type that contains information about price class for this streaming + // distribution. + // + // This member is required. + PriceClass PriceClass + + // A complex type that contains information about the Amazon S3 bucket from which + // you want CloudFront to get your media files for distribution. + // + // This member is required. + S3Origin *S3Origin + + // Indicates the current status of the distribution. When the status is Deployed , + // the distribution's information is fully propagated throughout the Amazon + // CloudFront system. + // + // This member is required. + Status *string + + // A complex type that specifies the Amazon Web Services accounts, if any, that + // you want to allow to create signed URLs for private content. If you want to + // require signed URLs in requests for objects in the target origin that match the + // PathPattern for this cache behavior, specify true for Enabled , and specify the + // applicable values for Quantity and Items .If you don't want to require signed + // URLs in requests for objects that match PathPattern , specify false for Enabled + // and 0 for Quantity . Omit Items . To add, change, or remove one or more trusted + // signers, change Enabled to true (if it's currently false ), change Quantity as + // applicable, and specify all of the trusted signers that you want to include in + // the updated distribution. + // + // For more information, see [Serving Private Content through CloudFront] in the Amazon CloudFront Developer Guide. + // + // [Serving Private Content through CloudFront]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html + // + // This member is required. + TrustedSigners *TrustedSigners + + noSmithyDocumentSerde +} + +// A complex type that controls whether access logs are written for this streaming +// distribution. +type StreamingLoggingConfig struct { + + // The Amazon S3 bucket to store the access logs in, for example, + // myawslogbucket.s3.amazonaws.com . + // + // This member is required. + Bucket *string + + // Specifies whether you want CloudFront to save access logs to an Amazon S3 + // bucket. If you don't want to enable logging when you create a streaming + // distribution or if you want to disable logging for an existing streaming + // distribution, specify false for Enabled , and specify empty Bucket and Prefix + // elements. If you specify false for Enabled but you specify values for Bucket + // and Prefix , the values are automatically deleted. + // + // This member is required. + Enabled *bool + + // An optional string that you want CloudFront to prefix to the access log + // filenames for this streaming distribution, for example, myprefix/ . If you want + // to enable logging, but you don't want to specify a prefix, you still must + // include an empty Prefix element in the Logging element. + // + // This member is required. + Prefix *string + + noSmithyDocumentSerde +} + +// A complex type that contains Tag key and Tag value. +type Tag struct { + + // A string that contains Tag key. + // + // The string length should be between 1 and 128 characters. Valid characters + // include a-z , A-Z , 0-9 , space, and the special characters _ - . : / = + @ . + // + // This member is required. + Key *string + + // A string that contains an optional Tag value. + // + // The string length should be between 0 and 256 characters. Valid characters + // include a-z , A-Z , 0-9 , space, and the special characters _ - . : / = + @ . + Value *string + + noSmithyDocumentSerde +} + +// A complex type that contains zero or more Tag elements. +type TagKeys struct { + + // A complex type that contains Tag key elements. + Items []string + + noSmithyDocumentSerde +} + +// A complex type that contains zero or more Tag elements. +type Tags struct { + + // A complex type that contains Tag elements. + Items []Tag + + noSmithyDocumentSerde +} + +// Contains the result of testing a CloudFront function with TestFunction . +type TestResult struct { + + // The amount of time that the function took to run as a percentage of the maximum + // allowed time. For example, a compute utilization of 35 means that the function + // completed in 35% of the maximum allowed time. + ComputeUtilization *string + + // If the result of testing the function was an error, this field contains the + // error message. + FunctionErrorMessage *string + + // Contains the log lines that the function wrote (if any) when running the test. + FunctionExecutionLogs []string + + // The event object returned by the function. For more information about the + // structure of the event object, see [Event object structure]in the Amazon CloudFront Developer Guide. + // + // [Event object structure]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/functions-event-structure.html + FunctionOutput *string + + // Contains configuration information and metadata about the CloudFront function + // that was tested. + FunctionSummary *FunctionSummary + + noSmithyDocumentSerde +} + +// The traffic configuration of your continuous deployment. +type TrafficConfig struct { + + // The type of traffic configuration. + // + // This member is required. + Type ContinuousDeploymentPolicyType + + // Determines which HTTP requests are sent to the staging distribution. + SingleHeaderConfig *ContinuousDeploymentSingleHeaderConfig + + // Contains the percentage of traffic to send to the staging distribution. + SingleWeightConfig *ContinuousDeploymentSingleWeightConfig + + noSmithyDocumentSerde +} + +// A list of key groups whose public keys CloudFront can use to verify the +// signatures of signed URLs and signed cookies. +type TrustedKeyGroups struct { + + // This field is true if any of the key groups in the list have public keys that + // CloudFront can use to verify the signatures of signed URLs and signed cookies. + // If not, this field is false . + // + // This member is required. + Enabled *bool + + // The number of key groups in the list. + // + // This member is required. + Quantity *int32 + + // A list of key groups identifiers. + Items []string + + noSmithyDocumentSerde +} + +// A list of Amazon Web Services accounts whose public keys CloudFront can use to +// verify the signatures of signed URLs and signed cookies. +type TrustedSigners struct { + + // This field is true if any of the Amazon Web Services accounts in the list are + // configured as trusted signers. If not, this field is false . + // + // This member is required. + Enabled *bool + + // The number of Amazon Web Services accounts in the list. + // + // This member is required. + Quantity *int32 + + // A list of Amazon Web Services account identifiers. + Items []string + + noSmithyDocumentSerde +} + +// A complex type that determines the distribution's SSL/TLS configuration for +// communicating with viewers. +// +// If the distribution doesn't use Aliases (also known as alternate domain names +// or CNAMEs)—that is, if the distribution uses the CloudFront domain name such as +// d111111abcdef8.cloudfront.net —set CloudFrontDefaultCertificate to true and +// leave all other fields empty. +// +// If the distribution uses Aliases (alternate domain names or CNAMEs), use the +// fields in this type to specify the following settings: +// +// - Which viewers the distribution accepts HTTPS connections from: only viewers +// that support [server name indication (SNI)](recommended), or all viewers including those that don't support +// SNI. +// +// - To accept HTTPS connections from only viewers that support SNI, set +// SSLSupportMethod to sni-only . This is recommended. Most browsers and clients +// support SNI. +// +// - To accept HTTPS connections from all viewers, including those that don't +// support SNI, set SSLSupportMethod to vip . This is not recommended, and +// results in additional monthly charges from CloudFront. +// +// - The minimum SSL/TLS protocol version that the distribution can use to +// communicate with viewers. To specify a minimum version, choose a value for +// MinimumProtocolVersion . For more information, see [Security Policy]in the Amazon CloudFront +// Developer Guide. +// +// - The location of the SSL/TLS certificate, [Certificate Manager (ACM)](recommended) or [Identity and Access Management (IAM)]. You specify the +// location by setting a value in one of the following fields (not both): +// +// - ACMCertificateArn +// +// - IAMCertificateId +// +// All distributions support HTTPS connections from viewers. To require viewers to +// use HTTPS only, or to redirect them from HTTP to HTTPS, use ViewerProtocolPolicy +// in the CacheBehavior or DefaultCacheBehavior . To specify how CloudFront should +// use SSL/TLS to communicate with your custom origin, use CustomOriginConfig . +// +// For more information, see [Using HTTPS with CloudFront] and [Using Alternate Domain Names and HTTPS] in the Amazon CloudFront Developer Guide. +// +// [Using HTTPS with CloudFront]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-https.html +// [Security Policy]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValues-security-policy +// [Certificate Manager (ACM)]: https://docs.aws.amazon.com/acm/latest/userguide/acm-overview.html +// [Using Alternate Domain Names and HTTPS]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-https-alternate-domain-names.html +// [server name indication (SNI)]: https://en.wikipedia.org/wiki/Server_Name_Indication +// [Identity and Access Management (IAM)]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html +type ViewerCertificate struct { + + // If the distribution uses Aliases (alternate domain names or CNAMEs) and the + // SSL/TLS certificate is stored in [Certificate Manager (ACM)], provide the Amazon Resource Name (ARN) of + // the ACM certificate. CloudFront only supports ACM certificates in the US East + // (N. Virginia) Region ( us-east-1 ). + // + // If you specify an ACM certificate ARN, you must also specify values for + // MinimumProtocolVersion and SSLSupportMethod . + // + // [Certificate Manager (ACM)]: https://docs.aws.amazon.com/acm/latest/userguide/acm-overview.html + ACMCertificateArn *string + + // This field is deprecated. Use one of the following fields instead: + // + // - ACMCertificateArn + // + // - IAMCertificateId + // + // - CloudFrontDefaultCertificate + // + // Deprecated: This member has been deprecated. + Certificate *string + + // This field is deprecated. Use one of the following fields instead: + // + // - ACMCertificateArn + // + // - IAMCertificateId + // + // - CloudFrontDefaultCertificate + // + // Deprecated: This member has been deprecated. + CertificateSource CertificateSource + + // If the distribution uses the CloudFront domain name such as + // d111111abcdef8.cloudfront.net , set this field to true . + // + // If the distribution uses Aliases (alternate domain names or CNAMEs), set this + // field to false and specify values for the following fields: + // + // - ACMCertificateArn or IAMCertificateId (specify a value for one, not both) + // + // - MinimumProtocolVersion + // + // - SSLSupportMethod + CloudFrontDefaultCertificate *bool + + // If the distribution uses Aliases (alternate domain names or CNAMEs) and the + // SSL/TLS certificate is stored in [Identity and Access Management (IAM)], provide the ID of the IAM certificate. + // + // If you specify an IAM certificate ID, you must also specify values for + // MinimumProtocolVersion and SSLSupportMethod . + // + // [Identity and Access Management (IAM)]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html + IAMCertificateId *string + + // If the distribution uses Aliases (alternate domain names or CNAMEs), specify + // the security policy that you want CloudFront to use for HTTPS connections with + // viewers. The security policy determines two settings: + // + // - The minimum SSL/TLS protocol that CloudFront can use to communicate with + // viewers. + // + // - The ciphers that CloudFront can use to encrypt the content that it returns + // to viewers. + // + // For more information, see [Security Policy] and [Supported Protocols and Ciphers Between Viewers and CloudFront] in the Amazon CloudFront Developer Guide. + // + // On the CloudFront console, this setting is called Security Policy. + // + // When you're using SNI only (you set SSLSupportMethod to sni-only ), you must + // specify TLSv1 or higher. + // + // If the distribution uses the CloudFront domain name such as + // d111111abcdef8.cloudfront.net (you set CloudFrontDefaultCertificate to true ), + // CloudFront automatically sets the security policy to TLSv1 regardless of the + // value that you set here. + // + // [Security Policy]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValues-security-policy + // [Supported Protocols and Ciphers Between Viewers and CloudFront]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/secure-connections-supported-viewer-protocols-ciphers.html#secure-connections-supported-ciphers + MinimumProtocolVersion MinimumProtocolVersion + + // If the distribution uses Aliases (alternate domain names or CNAMEs), specify + // which viewers the distribution accepts HTTPS connections from. + // + // - sni-only – The distribution accepts HTTPS connections from only viewers that + // support [server name indication (SNI)]. This is recommended. Most browsers and clients support SNI. + // + // - vip – The distribution accepts HTTPS connections from all viewers including + // those that don't support SNI. This is not recommended, and results in additional + // monthly charges from CloudFront. + // + // - static-ip - Do not specify this value unless your distribution has been + // enabled for this feature by the CloudFront team. If you have a use case that + // requires static IP addresses for a distribution, contact CloudFront through the [Amazon Web Services Support Center] + // . + // + // If the distribution uses the CloudFront domain name such as + // d111111abcdef8.cloudfront.net , don't set a value for this field. + // + // [server name indication (SNI)]: https://en.wikipedia.org/wiki/Server_Name_Indication + // [Amazon Web Services Support Center]: https://console.aws.amazon.com/support/home + SSLSupportMethod SSLSupportMethod + + noSmithyDocumentSerde +} + +type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/validators.go new file mode 100644 index 0000000000..6f73473dd2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudfront/validators.go @@ -0,0 +1,6392 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudfront + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/cloudfront/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +type validateOpAssociateAlias struct { +} + +func (*validateOpAssociateAlias) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAssociateAlias) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AssociateAliasInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAssociateAliasInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCopyDistribution struct { +} + +func (*validateOpCopyDistribution) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCopyDistribution) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CopyDistributionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCopyDistributionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateCachePolicy struct { +} + +func (*validateOpCreateCachePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateCachePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateCachePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateCachePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateCloudFrontOriginAccessIdentity struct { +} + +func (*validateOpCreateCloudFrontOriginAccessIdentity) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateCloudFrontOriginAccessIdentity) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateCloudFrontOriginAccessIdentityInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateCloudFrontOriginAccessIdentityInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateContinuousDeploymentPolicy struct { +} + +func (*validateOpCreateContinuousDeploymentPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateContinuousDeploymentPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateContinuousDeploymentPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateContinuousDeploymentPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateDistribution struct { +} + +func (*validateOpCreateDistribution) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateDistribution) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateDistributionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateDistributionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateDistributionWithTags struct { +} + +func (*validateOpCreateDistributionWithTags) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateDistributionWithTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateDistributionWithTagsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateDistributionWithTagsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateFieldLevelEncryptionConfig struct { +} + +func (*validateOpCreateFieldLevelEncryptionConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateFieldLevelEncryptionConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateFieldLevelEncryptionConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateFieldLevelEncryptionConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateFieldLevelEncryptionProfile struct { +} + +func (*validateOpCreateFieldLevelEncryptionProfile) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateFieldLevelEncryptionProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateFieldLevelEncryptionProfileInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateFieldLevelEncryptionProfileInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateFunction struct { +} + +func (*validateOpCreateFunction) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateFunction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateFunctionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateFunctionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateInvalidation struct { +} + +func (*validateOpCreateInvalidation) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateInvalidation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateInvalidationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateInvalidationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateKeyGroup struct { +} + +func (*validateOpCreateKeyGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateKeyGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateKeyGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateKeyGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateKeyValueStore struct { +} + +func (*validateOpCreateKeyValueStore) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateKeyValueStore) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateKeyValueStoreInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateKeyValueStoreInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateMonitoringSubscription struct { +} + +func (*validateOpCreateMonitoringSubscription) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateMonitoringSubscription) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateMonitoringSubscriptionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateMonitoringSubscriptionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateOriginAccessControl struct { +} + +func (*validateOpCreateOriginAccessControl) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateOriginAccessControl) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateOriginAccessControlInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateOriginAccessControlInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateOriginRequestPolicy struct { +} + +func (*validateOpCreateOriginRequestPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateOriginRequestPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateOriginRequestPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateOriginRequestPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreatePublicKey struct { +} + +func (*validateOpCreatePublicKey) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreatePublicKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreatePublicKeyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreatePublicKeyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateRealtimeLogConfig struct { +} + +func (*validateOpCreateRealtimeLogConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateRealtimeLogConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateRealtimeLogConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateRealtimeLogConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateResponseHeadersPolicy struct { +} + +func (*validateOpCreateResponseHeadersPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateResponseHeadersPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateResponseHeadersPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateResponseHeadersPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateStreamingDistribution struct { +} + +func (*validateOpCreateStreamingDistribution) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateStreamingDistribution) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateStreamingDistributionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateStreamingDistributionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateStreamingDistributionWithTags struct { +} + +func (*validateOpCreateStreamingDistributionWithTags) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateStreamingDistributionWithTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateStreamingDistributionWithTagsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateStreamingDistributionWithTagsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteCachePolicy struct { +} + +func (*validateOpDeleteCachePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteCachePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteCachePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteCachePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteCloudFrontOriginAccessIdentity struct { +} + +func (*validateOpDeleteCloudFrontOriginAccessIdentity) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteCloudFrontOriginAccessIdentity) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteCloudFrontOriginAccessIdentityInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteCloudFrontOriginAccessIdentityInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteContinuousDeploymentPolicy struct { +} + +func (*validateOpDeleteContinuousDeploymentPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteContinuousDeploymentPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteContinuousDeploymentPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteContinuousDeploymentPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteDistribution struct { +} + +func (*validateOpDeleteDistribution) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteDistribution) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteDistributionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteDistributionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteFieldLevelEncryptionConfig struct { +} + +func (*validateOpDeleteFieldLevelEncryptionConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteFieldLevelEncryptionConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteFieldLevelEncryptionConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteFieldLevelEncryptionConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteFieldLevelEncryptionProfile struct { +} + +func (*validateOpDeleteFieldLevelEncryptionProfile) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteFieldLevelEncryptionProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteFieldLevelEncryptionProfileInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteFieldLevelEncryptionProfileInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteFunction struct { +} + +func (*validateOpDeleteFunction) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteFunction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteFunctionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteFunctionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteKeyGroup struct { +} + +func (*validateOpDeleteKeyGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteKeyGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteKeyGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteKeyGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteKeyValueStore struct { +} + +func (*validateOpDeleteKeyValueStore) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteKeyValueStore) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteKeyValueStoreInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteKeyValueStoreInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteMonitoringSubscription struct { +} + +func (*validateOpDeleteMonitoringSubscription) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteMonitoringSubscription) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteMonitoringSubscriptionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteMonitoringSubscriptionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteOriginAccessControl struct { +} + +func (*validateOpDeleteOriginAccessControl) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteOriginAccessControl) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteOriginAccessControlInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteOriginAccessControlInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteOriginRequestPolicy struct { +} + +func (*validateOpDeleteOriginRequestPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteOriginRequestPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteOriginRequestPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteOriginRequestPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeletePublicKey struct { +} + +func (*validateOpDeletePublicKey) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeletePublicKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeletePublicKeyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeletePublicKeyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteResponseHeadersPolicy struct { +} + +func (*validateOpDeleteResponseHeadersPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteResponseHeadersPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteResponseHeadersPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteResponseHeadersPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteStreamingDistribution struct { +} + +func (*validateOpDeleteStreamingDistribution) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteStreamingDistribution) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteStreamingDistributionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteStreamingDistributionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeFunction struct { +} + +func (*validateOpDescribeFunction) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeFunction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeFunctionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeFunctionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeKeyValueStore struct { +} + +func (*validateOpDescribeKeyValueStore) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeKeyValueStore) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeKeyValueStoreInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeKeyValueStoreInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetCachePolicyConfig struct { +} + +func (*validateOpGetCachePolicyConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetCachePolicyConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetCachePolicyConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetCachePolicyConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetCachePolicy struct { +} + +func (*validateOpGetCachePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetCachePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetCachePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetCachePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetCloudFrontOriginAccessIdentityConfig struct { +} + +func (*validateOpGetCloudFrontOriginAccessIdentityConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetCloudFrontOriginAccessIdentityConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetCloudFrontOriginAccessIdentityConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetCloudFrontOriginAccessIdentityConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetCloudFrontOriginAccessIdentity struct { +} + +func (*validateOpGetCloudFrontOriginAccessIdentity) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetCloudFrontOriginAccessIdentity) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetCloudFrontOriginAccessIdentityInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetCloudFrontOriginAccessIdentityInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetContinuousDeploymentPolicyConfig struct { +} + +func (*validateOpGetContinuousDeploymentPolicyConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetContinuousDeploymentPolicyConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetContinuousDeploymentPolicyConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetContinuousDeploymentPolicyConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetContinuousDeploymentPolicy struct { +} + +func (*validateOpGetContinuousDeploymentPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetContinuousDeploymentPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetContinuousDeploymentPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetContinuousDeploymentPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetDistributionConfig struct { +} + +func (*validateOpGetDistributionConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetDistributionConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetDistributionConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetDistributionConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetDistribution struct { +} + +func (*validateOpGetDistribution) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetDistribution) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetDistributionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetDistributionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetFieldLevelEncryptionConfig struct { +} + +func (*validateOpGetFieldLevelEncryptionConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetFieldLevelEncryptionConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetFieldLevelEncryptionConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetFieldLevelEncryptionConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetFieldLevelEncryption struct { +} + +func (*validateOpGetFieldLevelEncryption) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetFieldLevelEncryption) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetFieldLevelEncryptionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetFieldLevelEncryptionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetFieldLevelEncryptionProfileConfig struct { +} + +func (*validateOpGetFieldLevelEncryptionProfileConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetFieldLevelEncryptionProfileConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetFieldLevelEncryptionProfileConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetFieldLevelEncryptionProfileConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetFieldLevelEncryptionProfile struct { +} + +func (*validateOpGetFieldLevelEncryptionProfile) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetFieldLevelEncryptionProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetFieldLevelEncryptionProfileInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetFieldLevelEncryptionProfileInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetFunction struct { +} + +func (*validateOpGetFunction) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetFunction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetFunctionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetFunctionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetInvalidation struct { +} + +func (*validateOpGetInvalidation) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetInvalidation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetInvalidationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetInvalidationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetKeyGroupConfig struct { +} + +func (*validateOpGetKeyGroupConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetKeyGroupConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetKeyGroupConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetKeyGroupConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetKeyGroup struct { +} + +func (*validateOpGetKeyGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetKeyGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetKeyGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetKeyGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetMonitoringSubscription struct { +} + +func (*validateOpGetMonitoringSubscription) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetMonitoringSubscription) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetMonitoringSubscriptionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetMonitoringSubscriptionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetOriginAccessControlConfig struct { +} + +func (*validateOpGetOriginAccessControlConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetOriginAccessControlConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetOriginAccessControlConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetOriginAccessControlConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetOriginAccessControl struct { +} + +func (*validateOpGetOriginAccessControl) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetOriginAccessControl) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetOriginAccessControlInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetOriginAccessControlInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetOriginRequestPolicyConfig struct { +} + +func (*validateOpGetOriginRequestPolicyConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetOriginRequestPolicyConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetOriginRequestPolicyConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetOriginRequestPolicyConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetOriginRequestPolicy struct { +} + +func (*validateOpGetOriginRequestPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetOriginRequestPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetOriginRequestPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetOriginRequestPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetPublicKeyConfig struct { +} + +func (*validateOpGetPublicKeyConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetPublicKeyConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetPublicKeyConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetPublicKeyConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetPublicKey struct { +} + +func (*validateOpGetPublicKey) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetPublicKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetPublicKeyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetPublicKeyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetResponseHeadersPolicyConfig struct { +} + +func (*validateOpGetResponseHeadersPolicyConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetResponseHeadersPolicyConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetResponseHeadersPolicyConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetResponseHeadersPolicyConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetResponseHeadersPolicy struct { +} + +func (*validateOpGetResponseHeadersPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetResponseHeadersPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetResponseHeadersPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetResponseHeadersPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetStreamingDistributionConfig struct { +} + +func (*validateOpGetStreamingDistributionConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetStreamingDistributionConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetStreamingDistributionConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetStreamingDistributionConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetStreamingDistribution struct { +} + +func (*validateOpGetStreamingDistribution) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetStreamingDistribution) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetStreamingDistributionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetStreamingDistributionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListConflictingAliases struct { +} + +func (*validateOpListConflictingAliases) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListConflictingAliases) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListConflictingAliasesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListConflictingAliasesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListDistributionsByCachePolicyId struct { +} + +func (*validateOpListDistributionsByCachePolicyId) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListDistributionsByCachePolicyId) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListDistributionsByCachePolicyIdInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListDistributionsByCachePolicyIdInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListDistributionsByKeyGroup struct { +} + +func (*validateOpListDistributionsByKeyGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListDistributionsByKeyGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListDistributionsByKeyGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListDistributionsByKeyGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListDistributionsByOriginRequestPolicyId struct { +} + +func (*validateOpListDistributionsByOriginRequestPolicyId) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListDistributionsByOriginRequestPolicyId) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListDistributionsByOriginRequestPolicyIdInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListDistributionsByOriginRequestPolicyIdInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListDistributionsByResponseHeadersPolicyId struct { +} + +func (*validateOpListDistributionsByResponseHeadersPolicyId) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListDistributionsByResponseHeadersPolicyId) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListDistributionsByResponseHeadersPolicyIdInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListDistributionsByResponseHeadersPolicyIdInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListDistributionsByWebACLId struct { +} + +func (*validateOpListDistributionsByWebACLId) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListDistributionsByWebACLId) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListDistributionsByWebACLIdInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListDistributionsByWebACLIdInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListInvalidations struct { +} + +func (*validateOpListInvalidations) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListInvalidations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListInvalidationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListInvalidationsInput(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 validateOpPublishFunction struct { +} + +func (*validateOpPublishFunction) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPublishFunction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PublishFunctionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPublishFunctionInput(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 validateOpTestFunction struct { +} + +func (*validateOpTestFunction) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTestFunction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TestFunctionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTestFunctionInput(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 validateOpUpdateCachePolicy struct { +} + +func (*validateOpUpdateCachePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateCachePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateCachePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateCachePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateCloudFrontOriginAccessIdentity struct { +} + +func (*validateOpUpdateCloudFrontOriginAccessIdentity) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateCloudFrontOriginAccessIdentity) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateCloudFrontOriginAccessIdentityInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateCloudFrontOriginAccessIdentityInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateContinuousDeploymentPolicy struct { +} + +func (*validateOpUpdateContinuousDeploymentPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateContinuousDeploymentPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateContinuousDeploymentPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateContinuousDeploymentPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateDistribution struct { +} + +func (*validateOpUpdateDistribution) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateDistribution) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateDistributionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateDistributionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateDistributionWithStagingConfig struct { +} + +func (*validateOpUpdateDistributionWithStagingConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateDistributionWithStagingConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateDistributionWithStagingConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateDistributionWithStagingConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateFieldLevelEncryptionConfig struct { +} + +func (*validateOpUpdateFieldLevelEncryptionConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateFieldLevelEncryptionConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateFieldLevelEncryptionConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateFieldLevelEncryptionConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateFieldLevelEncryptionProfile struct { +} + +func (*validateOpUpdateFieldLevelEncryptionProfile) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateFieldLevelEncryptionProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateFieldLevelEncryptionProfileInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateFieldLevelEncryptionProfileInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateFunction struct { +} + +func (*validateOpUpdateFunction) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateFunction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateFunctionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateFunctionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateKeyGroup struct { +} + +func (*validateOpUpdateKeyGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateKeyGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateKeyGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateKeyGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateKeyValueStore struct { +} + +func (*validateOpUpdateKeyValueStore) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateKeyValueStore) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateKeyValueStoreInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateKeyValueStoreInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateOriginAccessControl struct { +} + +func (*validateOpUpdateOriginAccessControl) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateOriginAccessControl) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateOriginAccessControlInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateOriginAccessControlInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateOriginRequestPolicy struct { +} + +func (*validateOpUpdateOriginRequestPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateOriginRequestPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateOriginRequestPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateOriginRequestPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdatePublicKey struct { +} + +func (*validateOpUpdatePublicKey) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdatePublicKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdatePublicKeyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdatePublicKeyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateRealtimeLogConfig struct { +} + +func (*validateOpUpdateRealtimeLogConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateRealtimeLogConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateRealtimeLogConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateRealtimeLogConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateResponseHeadersPolicy struct { +} + +func (*validateOpUpdateResponseHeadersPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateResponseHeadersPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateResponseHeadersPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateResponseHeadersPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateStreamingDistribution struct { +} + +func (*validateOpUpdateStreamingDistribution) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateStreamingDistribution) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateStreamingDistributionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateStreamingDistributionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpAssociateAliasValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAssociateAlias{}, middleware.After) +} + +func addOpCopyDistributionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCopyDistribution{}, middleware.After) +} + +func addOpCreateCachePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateCachePolicy{}, middleware.After) +} + +func addOpCreateCloudFrontOriginAccessIdentityValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateCloudFrontOriginAccessIdentity{}, middleware.After) +} + +func addOpCreateContinuousDeploymentPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateContinuousDeploymentPolicy{}, middleware.After) +} + +func addOpCreateDistributionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateDistribution{}, middleware.After) +} + +func addOpCreateDistributionWithTagsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateDistributionWithTags{}, middleware.After) +} + +func addOpCreateFieldLevelEncryptionConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateFieldLevelEncryptionConfig{}, middleware.After) +} + +func addOpCreateFieldLevelEncryptionProfileValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateFieldLevelEncryptionProfile{}, middleware.After) +} + +func addOpCreateFunctionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateFunction{}, middleware.After) +} + +func addOpCreateInvalidationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateInvalidation{}, middleware.After) +} + +func addOpCreateKeyGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateKeyGroup{}, middleware.After) +} + +func addOpCreateKeyValueStoreValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateKeyValueStore{}, middleware.After) +} + +func addOpCreateMonitoringSubscriptionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateMonitoringSubscription{}, middleware.After) +} + +func addOpCreateOriginAccessControlValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateOriginAccessControl{}, middleware.After) +} + +func addOpCreateOriginRequestPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateOriginRequestPolicy{}, middleware.After) +} + +func addOpCreatePublicKeyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreatePublicKey{}, middleware.After) +} + +func addOpCreateRealtimeLogConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateRealtimeLogConfig{}, middleware.After) +} + +func addOpCreateResponseHeadersPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateResponseHeadersPolicy{}, middleware.After) +} + +func addOpCreateStreamingDistributionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateStreamingDistribution{}, middleware.After) +} + +func addOpCreateStreamingDistributionWithTagsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateStreamingDistributionWithTags{}, middleware.After) +} + +func addOpDeleteCachePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteCachePolicy{}, middleware.After) +} + +func addOpDeleteCloudFrontOriginAccessIdentityValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteCloudFrontOriginAccessIdentity{}, middleware.After) +} + +func addOpDeleteContinuousDeploymentPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteContinuousDeploymentPolicy{}, middleware.After) +} + +func addOpDeleteDistributionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteDistribution{}, middleware.After) +} + +func addOpDeleteFieldLevelEncryptionConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteFieldLevelEncryptionConfig{}, middleware.After) +} + +func addOpDeleteFieldLevelEncryptionProfileValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteFieldLevelEncryptionProfile{}, middleware.After) +} + +func addOpDeleteFunctionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteFunction{}, middleware.After) +} + +func addOpDeleteKeyGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteKeyGroup{}, middleware.After) +} + +func addOpDeleteKeyValueStoreValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteKeyValueStore{}, middleware.After) +} + +func addOpDeleteMonitoringSubscriptionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteMonitoringSubscription{}, middleware.After) +} + +func addOpDeleteOriginAccessControlValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteOriginAccessControl{}, middleware.After) +} + +func addOpDeleteOriginRequestPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteOriginRequestPolicy{}, middleware.After) +} + +func addOpDeletePublicKeyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeletePublicKey{}, middleware.After) +} + +func addOpDeleteResponseHeadersPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteResponseHeadersPolicy{}, middleware.After) +} + +func addOpDeleteStreamingDistributionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteStreamingDistribution{}, middleware.After) +} + +func addOpDescribeFunctionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeFunction{}, middleware.After) +} + +func addOpDescribeKeyValueStoreValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeKeyValueStore{}, middleware.After) +} + +func addOpGetCachePolicyConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetCachePolicyConfig{}, middleware.After) +} + +func addOpGetCachePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetCachePolicy{}, middleware.After) +} + +func addOpGetCloudFrontOriginAccessIdentityConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetCloudFrontOriginAccessIdentityConfig{}, middleware.After) +} + +func addOpGetCloudFrontOriginAccessIdentityValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetCloudFrontOriginAccessIdentity{}, middleware.After) +} + +func addOpGetContinuousDeploymentPolicyConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetContinuousDeploymentPolicyConfig{}, middleware.After) +} + +func addOpGetContinuousDeploymentPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetContinuousDeploymentPolicy{}, middleware.After) +} + +func addOpGetDistributionConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetDistributionConfig{}, middleware.After) +} + +func addOpGetDistributionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetDistribution{}, middleware.After) +} + +func addOpGetFieldLevelEncryptionConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetFieldLevelEncryptionConfig{}, middleware.After) +} + +func addOpGetFieldLevelEncryptionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetFieldLevelEncryption{}, middleware.After) +} + +func addOpGetFieldLevelEncryptionProfileConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetFieldLevelEncryptionProfileConfig{}, middleware.After) +} + +func addOpGetFieldLevelEncryptionProfileValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetFieldLevelEncryptionProfile{}, middleware.After) +} + +func addOpGetFunctionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetFunction{}, middleware.After) +} + +func addOpGetInvalidationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetInvalidation{}, middleware.After) +} + +func addOpGetKeyGroupConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetKeyGroupConfig{}, middleware.After) +} + +func addOpGetKeyGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetKeyGroup{}, middleware.After) +} + +func addOpGetMonitoringSubscriptionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetMonitoringSubscription{}, middleware.After) +} + +func addOpGetOriginAccessControlConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetOriginAccessControlConfig{}, middleware.After) +} + +func addOpGetOriginAccessControlValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetOriginAccessControl{}, middleware.After) +} + +func addOpGetOriginRequestPolicyConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetOriginRequestPolicyConfig{}, middleware.After) +} + +func addOpGetOriginRequestPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetOriginRequestPolicy{}, middleware.After) +} + +func addOpGetPublicKeyConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetPublicKeyConfig{}, middleware.After) +} + +func addOpGetPublicKeyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetPublicKey{}, middleware.After) +} + +func addOpGetResponseHeadersPolicyConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetResponseHeadersPolicyConfig{}, middleware.After) +} + +func addOpGetResponseHeadersPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetResponseHeadersPolicy{}, middleware.After) +} + +func addOpGetStreamingDistributionConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetStreamingDistributionConfig{}, middleware.After) +} + +func addOpGetStreamingDistributionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetStreamingDistribution{}, middleware.After) +} + +func addOpListConflictingAliasesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListConflictingAliases{}, middleware.After) +} + +func addOpListDistributionsByCachePolicyIdValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListDistributionsByCachePolicyId{}, middleware.After) +} + +func addOpListDistributionsByKeyGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListDistributionsByKeyGroup{}, middleware.After) +} + +func addOpListDistributionsByOriginRequestPolicyIdValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListDistributionsByOriginRequestPolicyId{}, middleware.After) +} + +func addOpListDistributionsByResponseHeadersPolicyIdValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListDistributionsByResponseHeadersPolicyId{}, middleware.After) +} + +func addOpListDistributionsByWebACLIdValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListDistributionsByWebACLId{}, middleware.After) +} + +func addOpListInvalidationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListInvalidations{}, middleware.After) +} + +func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) +} + +func addOpPublishFunctionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPublishFunction{}, middleware.After) +} + +func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) +} + +func addOpTestFunctionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTestFunction{}, middleware.After) +} + +func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) +} + +func addOpUpdateCachePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateCachePolicy{}, middleware.After) +} + +func addOpUpdateCloudFrontOriginAccessIdentityValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateCloudFrontOriginAccessIdentity{}, middleware.After) +} + +func addOpUpdateContinuousDeploymentPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateContinuousDeploymentPolicy{}, middleware.After) +} + +func addOpUpdateDistributionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateDistribution{}, middleware.After) +} + +func addOpUpdateDistributionWithStagingConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateDistributionWithStagingConfig{}, middleware.After) +} + +func addOpUpdateFieldLevelEncryptionConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateFieldLevelEncryptionConfig{}, middleware.After) +} + +func addOpUpdateFieldLevelEncryptionProfileValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateFieldLevelEncryptionProfile{}, middleware.After) +} + +func addOpUpdateFunctionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateFunction{}, middleware.After) +} + +func addOpUpdateKeyGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateKeyGroup{}, middleware.After) +} + +func addOpUpdateKeyValueStoreValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateKeyValueStore{}, middleware.After) +} + +func addOpUpdateOriginAccessControlValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateOriginAccessControl{}, middleware.After) +} + +func addOpUpdateOriginRequestPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateOriginRequestPolicy{}, middleware.After) +} + +func addOpUpdatePublicKeyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdatePublicKey{}, middleware.After) +} + +func addOpUpdateRealtimeLogConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateRealtimeLogConfig{}, middleware.After) +} + +func addOpUpdateResponseHeadersPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateResponseHeadersPolicy{}, middleware.After) +} + +func addOpUpdateStreamingDistributionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateStreamingDistribution{}, middleware.After) +} + +func validateAliases(v *types.Aliases) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Aliases"} + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAllowedMethods(v *types.AllowedMethods) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AllowedMethods"} + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if v.Items == nil { + invalidParams.Add(smithy.NewErrParamRequired("Items")) + } + if v.CachedMethods != nil { + if err := validateCachedMethods(v.CachedMethods); err != nil { + invalidParams.AddNested("CachedMethods", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCacheBehavior(v *types.CacheBehavior) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CacheBehavior"} + if v.PathPattern == nil { + invalidParams.Add(smithy.NewErrParamRequired("PathPattern")) + } + if v.TargetOriginId == nil { + invalidParams.Add(smithy.NewErrParamRequired("TargetOriginId")) + } + if v.TrustedSigners != nil { + if err := validateTrustedSigners(v.TrustedSigners); err != nil { + invalidParams.AddNested("TrustedSigners", err.(smithy.InvalidParamsError)) + } + } + if v.TrustedKeyGroups != nil { + if err := validateTrustedKeyGroups(v.TrustedKeyGroups); err != nil { + invalidParams.AddNested("TrustedKeyGroups", err.(smithy.InvalidParamsError)) + } + } + if len(v.ViewerProtocolPolicy) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ViewerProtocolPolicy")) + } + if v.AllowedMethods != nil { + if err := validateAllowedMethods(v.AllowedMethods); err != nil { + invalidParams.AddNested("AllowedMethods", err.(smithy.InvalidParamsError)) + } + } + if v.LambdaFunctionAssociations != nil { + if err := validateLambdaFunctionAssociations(v.LambdaFunctionAssociations); err != nil { + invalidParams.AddNested("LambdaFunctionAssociations", err.(smithy.InvalidParamsError)) + } + } + if v.FunctionAssociations != nil { + if err := validateFunctionAssociations(v.FunctionAssociations); err != nil { + invalidParams.AddNested("FunctionAssociations", err.(smithy.InvalidParamsError)) + } + } + if v.ForwardedValues != nil { + if err := validateForwardedValues(v.ForwardedValues); err != nil { + invalidParams.AddNested("ForwardedValues", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCacheBehaviorList(v []types.CacheBehavior) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CacheBehaviorList"} + for i := range v { + if err := validateCacheBehavior(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCacheBehaviors(v *types.CacheBehaviors) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CacheBehaviors"} + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if v.Items != nil { + if err := validateCacheBehaviorList(v.Items); err != nil { + invalidParams.AddNested("Items", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCachedMethods(v *types.CachedMethods) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CachedMethods"} + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if v.Items == nil { + invalidParams.Add(smithy.NewErrParamRequired("Items")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCachePolicyConfig(v *types.CachePolicyConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CachePolicyConfig"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.MinTTL == nil { + invalidParams.Add(smithy.NewErrParamRequired("MinTTL")) + } + if v.ParametersInCacheKeyAndForwardedToOrigin != nil { + if err := validateParametersInCacheKeyAndForwardedToOrigin(v.ParametersInCacheKeyAndForwardedToOrigin); err != nil { + invalidParams.AddNested("ParametersInCacheKeyAndForwardedToOrigin", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCachePolicyCookiesConfig(v *types.CachePolicyCookiesConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CachePolicyCookiesConfig"} + if len(v.CookieBehavior) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("CookieBehavior")) + } + if v.Cookies != nil { + if err := validateCookieNames(v.Cookies); err != nil { + invalidParams.AddNested("Cookies", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCachePolicyHeadersConfig(v *types.CachePolicyHeadersConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CachePolicyHeadersConfig"} + if len(v.HeaderBehavior) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("HeaderBehavior")) + } + if v.Headers != nil { + if err := validateHeaders(v.Headers); err != nil { + invalidParams.AddNested("Headers", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCachePolicyQueryStringsConfig(v *types.CachePolicyQueryStringsConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CachePolicyQueryStringsConfig"} + if len(v.QueryStringBehavior) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("QueryStringBehavior")) + } + if v.QueryStrings != nil { + if err := validateQueryStringNames(v.QueryStrings); err != nil { + invalidParams.AddNested("QueryStrings", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCloudFrontOriginAccessIdentityConfig(v *types.CloudFrontOriginAccessIdentityConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CloudFrontOriginAccessIdentityConfig"} + if v.CallerReference == nil { + invalidParams.Add(smithy.NewErrParamRequired("CallerReference")) + } + if v.Comment == nil { + invalidParams.Add(smithy.NewErrParamRequired("Comment")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateContentTypeProfile(v *types.ContentTypeProfile) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ContentTypeProfile"} + if len(v.Format) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Format")) + } + if v.ContentType == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContentType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateContentTypeProfileConfig(v *types.ContentTypeProfileConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ContentTypeProfileConfig"} + if v.ForwardWhenContentTypeIsUnknown == nil { + invalidParams.Add(smithy.NewErrParamRequired("ForwardWhenContentTypeIsUnknown")) + } + if v.ContentTypeProfiles != nil { + if err := validateContentTypeProfiles(v.ContentTypeProfiles); err != nil { + invalidParams.AddNested("ContentTypeProfiles", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateContentTypeProfileList(v []types.ContentTypeProfile) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ContentTypeProfileList"} + for i := range v { + if err := validateContentTypeProfile(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateContentTypeProfiles(v *types.ContentTypeProfiles) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ContentTypeProfiles"} + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if v.Items != nil { + if err := validateContentTypeProfileList(v.Items); err != nil { + invalidParams.AddNested("Items", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateContinuousDeploymentPolicyConfig(v *types.ContinuousDeploymentPolicyConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ContinuousDeploymentPolicyConfig"} + if v.StagingDistributionDnsNames == nil { + invalidParams.Add(smithy.NewErrParamRequired("StagingDistributionDnsNames")) + } else if v.StagingDistributionDnsNames != nil { + if err := validateStagingDistributionDnsNames(v.StagingDistributionDnsNames); err != nil { + invalidParams.AddNested("StagingDistributionDnsNames", err.(smithy.InvalidParamsError)) + } + } + if v.Enabled == nil { + invalidParams.Add(smithy.NewErrParamRequired("Enabled")) + } + if v.TrafficConfig != nil { + if err := validateTrafficConfig(v.TrafficConfig); err != nil { + invalidParams.AddNested("TrafficConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateContinuousDeploymentSingleHeaderConfig(v *types.ContinuousDeploymentSingleHeaderConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ContinuousDeploymentSingleHeaderConfig"} + if v.Header == nil { + invalidParams.Add(smithy.NewErrParamRequired("Header")) + } + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateContinuousDeploymentSingleWeightConfig(v *types.ContinuousDeploymentSingleWeightConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ContinuousDeploymentSingleWeightConfig"} + if v.Weight == nil { + invalidParams.Add(smithy.NewErrParamRequired("Weight")) + } + if v.SessionStickinessConfig != nil { + if err := validateSessionStickinessConfig(v.SessionStickinessConfig); err != nil { + invalidParams.AddNested("SessionStickinessConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCookieNames(v *types.CookieNames) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CookieNames"} + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCookiePreference(v *types.CookiePreference) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CookiePreference"} + if len(v.Forward) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Forward")) + } + if v.WhitelistedNames != nil { + if err := validateCookieNames(v.WhitelistedNames); err != nil { + invalidParams.AddNested("WhitelistedNames", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCustomErrorResponse(v *types.CustomErrorResponse) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CustomErrorResponse"} + if v.ErrorCode == nil { + invalidParams.Add(smithy.NewErrParamRequired("ErrorCode")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCustomErrorResponseList(v []types.CustomErrorResponse) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CustomErrorResponseList"} + for i := range v { + if err := validateCustomErrorResponse(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCustomErrorResponses(v *types.CustomErrorResponses) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CustomErrorResponses"} + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if v.Items != nil { + if err := validateCustomErrorResponseList(v.Items); err != nil { + invalidParams.AddNested("Items", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCustomHeaders(v *types.CustomHeaders) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CustomHeaders"} + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if v.Items != nil { + if err := validateOriginCustomHeadersList(v.Items); err != nil { + invalidParams.AddNested("Items", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCustomOriginConfig(v *types.CustomOriginConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CustomOriginConfig"} + if v.HTTPPort == nil { + invalidParams.Add(smithy.NewErrParamRequired("HTTPPort")) + } + if v.HTTPSPort == nil { + invalidParams.Add(smithy.NewErrParamRequired("HTTPSPort")) + } + if len(v.OriginProtocolPolicy) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("OriginProtocolPolicy")) + } + if v.OriginSslProtocols != nil { + if err := validateOriginSslProtocols(v.OriginSslProtocols); err != nil { + invalidParams.AddNested("OriginSslProtocols", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateDefaultCacheBehavior(v *types.DefaultCacheBehavior) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DefaultCacheBehavior"} + if v.TargetOriginId == nil { + invalidParams.Add(smithy.NewErrParamRequired("TargetOriginId")) + } + if v.TrustedSigners != nil { + if err := validateTrustedSigners(v.TrustedSigners); err != nil { + invalidParams.AddNested("TrustedSigners", err.(smithy.InvalidParamsError)) + } + } + if v.TrustedKeyGroups != nil { + if err := validateTrustedKeyGroups(v.TrustedKeyGroups); err != nil { + invalidParams.AddNested("TrustedKeyGroups", err.(smithy.InvalidParamsError)) + } + } + if len(v.ViewerProtocolPolicy) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ViewerProtocolPolicy")) + } + if v.AllowedMethods != nil { + if err := validateAllowedMethods(v.AllowedMethods); err != nil { + invalidParams.AddNested("AllowedMethods", err.(smithy.InvalidParamsError)) + } + } + if v.LambdaFunctionAssociations != nil { + if err := validateLambdaFunctionAssociations(v.LambdaFunctionAssociations); err != nil { + invalidParams.AddNested("LambdaFunctionAssociations", err.(smithy.InvalidParamsError)) + } + } + if v.FunctionAssociations != nil { + if err := validateFunctionAssociations(v.FunctionAssociations); err != nil { + invalidParams.AddNested("FunctionAssociations", err.(smithy.InvalidParamsError)) + } + } + if v.ForwardedValues != nil { + if err := validateForwardedValues(v.ForwardedValues); err != nil { + invalidParams.AddNested("ForwardedValues", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateDistributionConfig(v *types.DistributionConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DistributionConfig"} + if v.CallerReference == nil { + invalidParams.Add(smithy.NewErrParamRequired("CallerReference")) + } + if v.Aliases != nil { + if err := validateAliases(v.Aliases); err != nil { + invalidParams.AddNested("Aliases", err.(smithy.InvalidParamsError)) + } + } + if v.Origins == nil { + invalidParams.Add(smithy.NewErrParamRequired("Origins")) + } else if v.Origins != nil { + if err := validateOrigins(v.Origins); err != nil { + invalidParams.AddNested("Origins", err.(smithy.InvalidParamsError)) + } + } + if v.OriginGroups != nil { + if err := validateOriginGroups(v.OriginGroups); err != nil { + invalidParams.AddNested("OriginGroups", err.(smithy.InvalidParamsError)) + } + } + if v.DefaultCacheBehavior == nil { + invalidParams.Add(smithy.NewErrParamRequired("DefaultCacheBehavior")) + } else if v.DefaultCacheBehavior != nil { + if err := validateDefaultCacheBehavior(v.DefaultCacheBehavior); err != nil { + invalidParams.AddNested("DefaultCacheBehavior", err.(smithy.InvalidParamsError)) + } + } + if v.CacheBehaviors != nil { + if err := validateCacheBehaviors(v.CacheBehaviors); err != nil { + invalidParams.AddNested("CacheBehaviors", err.(smithy.InvalidParamsError)) + } + } + if v.CustomErrorResponses != nil { + if err := validateCustomErrorResponses(v.CustomErrorResponses); err != nil { + invalidParams.AddNested("CustomErrorResponses", err.(smithy.InvalidParamsError)) + } + } + if v.Comment == nil { + invalidParams.Add(smithy.NewErrParamRequired("Comment")) + } + if v.Logging != nil { + if err := validateLoggingConfig(v.Logging); err != nil { + invalidParams.AddNested("Logging", err.(smithy.InvalidParamsError)) + } + } + if v.Enabled == nil { + invalidParams.Add(smithy.NewErrParamRequired("Enabled")) + } + if v.Restrictions != nil { + if err := validateRestrictions(v.Restrictions); err != nil { + invalidParams.AddNested("Restrictions", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateDistributionConfigWithTags(v *types.DistributionConfigWithTags) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DistributionConfigWithTags"} + if v.DistributionConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("DistributionConfig")) + } else if v.DistributionConfig != nil { + if err := validateDistributionConfig(v.DistributionConfig); err != nil { + invalidParams.AddNested("DistributionConfig", err.(smithy.InvalidParamsError)) + } + } + 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 validateEncryptionEntities(v *types.EncryptionEntities) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EncryptionEntities"} + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if v.Items != nil { + if err := validateEncryptionEntityList(v.Items); err != nil { + invalidParams.AddNested("Items", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateEncryptionEntity(v *types.EncryptionEntity) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EncryptionEntity"} + if v.PublicKeyId == nil { + invalidParams.Add(smithy.NewErrParamRequired("PublicKeyId")) + } + if v.ProviderId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ProviderId")) + } + if v.FieldPatterns == nil { + invalidParams.Add(smithy.NewErrParamRequired("FieldPatterns")) + } else if v.FieldPatterns != nil { + if err := validateFieldPatterns(v.FieldPatterns); err != nil { + invalidParams.AddNested("FieldPatterns", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateEncryptionEntityList(v []types.EncryptionEntity) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EncryptionEntityList"} + for i := range v { + if err := validateEncryptionEntity(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateEndPoint(v *types.EndPoint) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EndPoint"} + if v.StreamType == nil { + invalidParams.Add(smithy.NewErrParamRequired("StreamType")) + } + if v.KinesisStreamConfig != nil { + if err := validateKinesisStreamConfig(v.KinesisStreamConfig); err != nil { + invalidParams.AddNested("KinesisStreamConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateEndPointList(v []types.EndPoint) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EndPointList"} + for i := range v { + if err := validateEndPoint(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateFieldLevelEncryptionConfig(v *types.FieldLevelEncryptionConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FieldLevelEncryptionConfig"} + if v.CallerReference == nil { + invalidParams.Add(smithy.NewErrParamRequired("CallerReference")) + } + if v.QueryArgProfileConfig != nil { + if err := validateQueryArgProfileConfig(v.QueryArgProfileConfig); err != nil { + invalidParams.AddNested("QueryArgProfileConfig", err.(smithy.InvalidParamsError)) + } + } + if v.ContentTypeProfileConfig != nil { + if err := validateContentTypeProfileConfig(v.ContentTypeProfileConfig); err != nil { + invalidParams.AddNested("ContentTypeProfileConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateFieldLevelEncryptionProfileConfig(v *types.FieldLevelEncryptionProfileConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FieldLevelEncryptionProfileConfig"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.CallerReference == nil { + invalidParams.Add(smithy.NewErrParamRequired("CallerReference")) + } + if v.EncryptionEntities == nil { + invalidParams.Add(smithy.NewErrParamRequired("EncryptionEntities")) + } else if v.EncryptionEntities != nil { + if err := validateEncryptionEntities(v.EncryptionEntities); err != nil { + invalidParams.AddNested("EncryptionEntities", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateFieldPatterns(v *types.FieldPatterns) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FieldPatterns"} + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateForwardedValues(v *types.ForwardedValues) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ForwardedValues"} + if v.QueryString == nil { + invalidParams.Add(smithy.NewErrParamRequired("QueryString")) + } + if v.Cookies == nil { + invalidParams.Add(smithy.NewErrParamRequired("Cookies")) + } else if v.Cookies != nil { + if err := validateCookiePreference(v.Cookies); err != nil { + invalidParams.AddNested("Cookies", err.(smithy.InvalidParamsError)) + } + } + if v.Headers != nil { + if err := validateHeaders(v.Headers); err != nil { + invalidParams.AddNested("Headers", err.(smithy.InvalidParamsError)) + } + } + if v.QueryStringCacheKeys != nil { + if err := validateQueryStringCacheKeys(v.QueryStringCacheKeys); err != nil { + invalidParams.AddNested("QueryStringCacheKeys", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateFunctionAssociation(v *types.FunctionAssociation) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FunctionAssociation"} + if v.FunctionARN == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionARN")) + } + if len(v.EventType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("EventType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateFunctionAssociationList(v []types.FunctionAssociation) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FunctionAssociationList"} + for i := range v { + if err := validateFunctionAssociation(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateFunctionAssociations(v *types.FunctionAssociations) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FunctionAssociations"} + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if v.Items != nil { + if err := validateFunctionAssociationList(v.Items); err != nil { + invalidParams.AddNested("Items", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateFunctionConfig(v *types.FunctionConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FunctionConfig"} + if v.Comment == nil { + invalidParams.Add(smithy.NewErrParamRequired("Comment")) + } + if len(v.Runtime) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Runtime")) + } + if v.KeyValueStoreAssociations != nil { + if err := validateKeyValueStoreAssociations(v.KeyValueStoreAssociations); err != nil { + invalidParams.AddNested("KeyValueStoreAssociations", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGeoRestriction(v *types.GeoRestriction) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GeoRestriction"} + if len(v.RestrictionType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("RestrictionType")) + } + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateHeaders(v *types.Headers) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Headers"} + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateImportSource(v *types.ImportSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ImportSource"} + if len(v.SourceType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("SourceType")) + } + if v.SourceARN == nil { + invalidParams.Add(smithy.NewErrParamRequired("SourceARN")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInvalidationBatch(v *types.InvalidationBatch) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InvalidationBatch"} + if v.Paths == nil { + invalidParams.Add(smithy.NewErrParamRequired("Paths")) + } else if v.Paths != nil { + if err := validatePaths(v.Paths); err != nil { + invalidParams.AddNested("Paths", err.(smithy.InvalidParamsError)) + } + } + if v.CallerReference == nil { + invalidParams.Add(smithy.NewErrParamRequired("CallerReference")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateKeyGroupConfig(v *types.KeyGroupConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "KeyGroupConfig"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Items == nil { + invalidParams.Add(smithy.NewErrParamRequired("Items")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateKeyValueStoreAssociation(v *types.KeyValueStoreAssociation) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "KeyValueStoreAssociation"} + if v.KeyValueStoreARN == nil { + invalidParams.Add(smithy.NewErrParamRequired("KeyValueStoreARN")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateKeyValueStoreAssociationList(v []types.KeyValueStoreAssociation) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "KeyValueStoreAssociationList"} + for i := range v { + if err := validateKeyValueStoreAssociation(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateKeyValueStoreAssociations(v *types.KeyValueStoreAssociations) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "KeyValueStoreAssociations"} + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if v.Items != nil { + if err := validateKeyValueStoreAssociationList(v.Items); err != nil { + invalidParams.AddNested("Items", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateKinesisStreamConfig(v *types.KinesisStreamConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "KinesisStreamConfig"} + if v.RoleARN == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleARN")) + } + if v.StreamARN == nil { + invalidParams.Add(smithy.NewErrParamRequired("StreamARN")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateLambdaFunctionAssociation(v *types.LambdaFunctionAssociation) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LambdaFunctionAssociation"} + if v.LambdaFunctionARN == nil { + invalidParams.Add(smithy.NewErrParamRequired("LambdaFunctionARN")) + } + if len(v.EventType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("EventType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateLambdaFunctionAssociationList(v []types.LambdaFunctionAssociation) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LambdaFunctionAssociationList"} + for i := range v { + if err := validateLambdaFunctionAssociation(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateLambdaFunctionAssociations(v *types.LambdaFunctionAssociations) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LambdaFunctionAssociations"} + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if v.Items != nil { + if err := validateLambdaFunctionAssociationList(v.Items); err != nil { + invalidParams.AddNested("Items", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateLoggingConfig(v *types.LoggingConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LoggingConfig"} + if v.Enabled == nil { + invalidParams.Add(smithy.NewErrParamRequired("Enabled")) + } + if v.IncludeCookies == nil { + invalidParams.Add(smithy.NewErrParamRequired("IncludeCookies")) + } + if v.Bucket == nil { + invalidParams.Add(smithy.NewErrParamRequired("Bucket")) + } + if v.Prefix == nil { + invalidParams.Add(smithy.NewErrParamRequired("Prefix")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMonitoringSubscription(v *types.MonitoringSubscription) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MonitoringSubscription"} + if v.RealtimeMetricsSubscriptionConfig != nil { + if err := validateRealtimeMetricsSubscriptionConfig(v.RealtimeMetricsSubscriptionConfig); err != nil { + invalidParams.AddNested("RealtimeMetricsSubscriptionConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOrigin(v *types.Origin) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Origin"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if v.DomainName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainName")) + } + if v.CustomHeaders != nil { + if err := validateCustomHeaders(v.CustomHeaders); err != nil { + invalidParams.AddNested("CustomHeaders", err.(smithy.InvalidParamsError)) + } + } + if v.S3OriginConfig != nil { + if err := validateS3OriginConfig(v.S3OriginConfig); err != nil { + invalidParams.AddNested("S3OriginConfig", err.(smithy.InvalidParamsError)) + } + } + if v.CustomOriginConfig != nil { + if err := validateCustomOriginConfig(v.CustomOriginConfig); err != nil { + invalidParams.AddNested("CustomOriginConfig", err.(smithy.InvalidParamsError)) + } + } + if v.OriginShield != nil { + if err := validateOriginShield(v.OriginShield); err != nil { + invalidParams.AddNested("OriginShield", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOriginAccessControlConfig(v *types.OriginAccessControlConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OriginAccessControlConfig"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if len(v.SigningProtocol) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("SigningProtocol")) + } + if len(v.SigningBehavior) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("SigningBehavior")) + } + if len(v.OriginAccessControlOriginType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("OriginAccessControlOriginType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOriginCustomHeader(v *types.OriginCustomHeader) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OriginCustomHeader"} + if v.HeaderName == nil { + invalidParams.Add(smithy.NewErrParamRequired("HeaderName")) + } + if v.HeaderValue == nil { + invalidParams.Add(smithy.NewErrParamRequired("HeaderValue")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOriginCustomHeadersList(v []types.OriginCustomHeader) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OriginCustomHeadersList"} + for i := range v { + if err := validateOriginCustomHeader(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOriginGroup(v *types.OriginGroup) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OriginGroup"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if v.FailoverCriteria == nil { + invalidParams.Add(smithy.NewErrParamRequired("FailoverCriteria")) + } else if v.FailoverCriteria != nil { + if err := validateOriginGroupFailoverCriteria(v.FailoverCriteria); err != nil { + invalidParams.AddNested("FailoverCriteria", err.(smithy.InvalidParamsError)) + } + } + if v.Members == nil { + invalidParams.Add(smithy.NewErrParamRequired("Members")) + } else if v.Members != nil { + if err := validateOriginGroupMembers(v.Members); err != nil { + invalidParams.AddNested("Members", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOriginGroupFailoverCriteria(v *types.OriginGroupFailoverCriteria) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OriginGroupFailoverCriteria"} + if v.StatusCodes == nil { + invalidParams.Add(smithy.NewErrParamRequired("StatusCodes")) + } else if v.StatusCodes != nil { + if err := validateStatusCodes(v.StatusCodes); err != nil { + invalidParams.AddNested("StatusCodes", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOriginGroupList(v []types.OriginGroup) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OriginGroupList"} + for i := range v { + if err := validateOriginGroup(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOriginGroupMember(v *types.OriginGroupMember) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OriginGroupMember"} + if v.OriginId == nil { + invalidParams.Add(smithy.NewErrParamRequired("OriginId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOriginGroupMemberList(v []types.OriginGroupMember) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OriginGroupMemberList"} + for i := range v { + if err := validateOriginGroupMember(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOriginGroupMembers(v *types.OriginGroupMembers) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OriginGroupMembers"} + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if v.Items == nil { + invalidParams.Add(smithy.NewErrParamRequired("Items")) + } else if v.Items != nil { + if err := validateOriginGroupMemberList(v.Items); err != nil { + invalidParams.AddNested("Items", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOriginGroups(v *types.OriginGroups) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OriginGroups"} + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if v.Items != nil { + if err := validateOriginGroupList(v.Items); err != nil { + invalidParams.AddNested("Items", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOriginList(v []types.Origin) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OriginList"} + for i := range v { + if err := validateOrigin(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOriginRequestPolicyConfig(v *types.OriginRequestPolicyConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OriginRequestPolicyConfig"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.HeadersConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("HeadersConfig")) + } else if v.HeadersConfig != nil { + if err := validateOriginRequestPolicyHeadersConfig(v.HeadersConfig); err != nil { + invalidParams.AddNested("HeadersConfig", err.(smithy.InvalidParamsError)) + } + } + if v.CookiesConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("CookiesConfig")) + } else if v.CookiesConfig != nil { + if err := validateOriginRequestPolicyCookiesConfig(v.CookiesConfig); err != nil { + invalidParams.AddNested("CookiesConfig", err.(smithy.InvalidParamsError)) + } + } + if v.QueryStringsConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("QueryStringsConfig")) + } else if v.QueryStringsConfig != nil { + if err := validateOriginRequestPolicyQueryStringsConfig(v.QueryStringsConfig); err != nil { + invalidParams.AddNested("QueryStringsConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOriginRequestPolicyCookiesConfig(v *types.OriginRequestPolicyCookiesConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OriginRequestPolicyCookiesConfig"} + if len(v.CookieBehavior) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("CookieBehavior")) + } + if v.Cookies != nil { + if err := validateCookieNames(v.Cookies); err != nil { + invalidParams.AddNested("Cookies", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOriginRequestPolicyHeadersConfig(v *types.OriginRequestPolicyHeadersConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OriginRequestPolicyHeadersConfig"} + if len(v.HeaderBehavior) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("HeaderBehavior")) + } + if v.Headers != nil { + if err := validateHeaders(v.Headers); err != nil { + invalidParams.AddNested("Headers", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOriginRequestPolicyQueryStringsConfig(v *types.OriginRequestPolicyQueryStringsConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OriginRequestPolicyQueryStringsConfig"} + if len(v.QueryStringBehavior) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("QueryStringBehavior")) + } + if v.QueryStrings != nil { + if err := validateQueryStringNames(v.QueryStrings); err != nil { + invalidParams.AddNested("QueryStrings", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOrigins(v *types.Origins) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Origins"} + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if v.Items == nil { + invalidParams.Add(smithy.NewErrParamRequired("Items")) + } else if v.Items != nil { + if err := validateOriginList(v.Items); err != nil { + invalidParams.AddNested("Items", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOriginShield(v *types.OriginShield) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OriginShield"} + if v.Enabled == nil { + invalidParams.Add(smithy.NewErrParamRequired("Enabled")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOriginSslProtocols(v *types.OriginSslProtocols) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OriginSslProtocols"} + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if v.Items == nil { + invalidParams.Add(smithy.NewErrParamRequired("Items")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateParametersInCacheKeyAndForwardedToOrigin(v *types.ParametersInCacheKeyAndForwardedToOrigin) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ParametersInCacheKeyAndForwardedToOrigin"} + if v.EnableAcceptEncodingGzip == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnableAcceptEncodingGzip")) + } + if v.HeadersConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("HeadersConfig")) + } else if v.HeadersConfig != nil { + if err := validateCachePolicyHeadersConfig(v.HeadersConfig); err != nil { + invalidParams.AddNested("HeadersConfig", err.(smithy.InvalidParamsError)) + } + } + if v.CookiesConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("CookiesConfig")) + } else if v.CookiesConfig != nil { + if err := validateCachePolicyCookiesConfig(v.CookiesConfig); err != nil { + invalidParams.AddNested("CookiesConfig", err.(smithy.InvalidParamsError)) + } + } + if v.QueryStringsConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("QueryStringsConfig")) + } else if v.QueryStringsConfig != nil { + if err := validateCachePolicyQueryStringsConfig(v.QueryStringsConfig); err != nil { + invalidParams.AddNested("QueryStringsConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePaths(v *types.Paths) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Paths"} + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePublicKeyConfig(v *types.PublicKeyConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PublicKeyConfig"} + if v.CallerReference == nil { + invalidParams.Add(smithy.NewErrParamRequired("CallerReference")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.EncodedKey == nil { + invalidParams.Add(smithy.NewErrParamRequired("EncodedKey")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateQueryArgProfile(v *types.QueryArgProfile) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "QueryArgProfile"} + if v.QueryArg == nil { + invalidParams.Add(smithy.NewErrParamRequired("QueryArg")) + } + if v.ProfileId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ProfileId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateQueryArgProfileConfig(v *types.QueryArgProfileConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "QueryArgProfileConfig"} + if v.ForwardWhenQueryArgProfileIsUnknown == nil { + invalidParams.Add(smithy.NewErrParamRequired("ForwardWhenQueryArgProfileIsUnknown")) + } + if v.QueryArgProfiles != nil { + if err := validateQueryArgProfiles(v.QueryArgProfiles); err != nil { + invalidParams.AddNested("QueryArgProfiles", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateQueryArgProfileList(v []types.QueryArgProfile) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "QueryArgProfileList"} + for i := range v { + if err := validateQueryArgProfile(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateQueryArgProfiles(v *types.QueryArgProfiles) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "QueryArgProfiles"} + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if v.Items != nil { + if err := validateQueryArgProfileList(v.Items); err != nil { + invalidParams.AddNested("Items", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateQueryStringCacheKeys(v *types.QueryStringCacheKeys) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "QueryStringCacheKeys"} + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateQueryStringNames(v *types.QueryStringNames) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "QueryStringNames"} + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRealtimeMetricsSubscriptionConfig(v *types.RealtimeMetricsSubscriptionConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RealtimeMetricsSubscriptionConfig"} + if len(v.RealtimeMetricsSubscriptionStatus) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("RealtimeMetricsSubscriptionStatus")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateResponseHeadersPolicyAccessControlAllowHeaders(v *types.ResponseHeadersPolicyAccessControlAllowHeaders) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResponseHeadersPolicyAccessControlAllowHeaders"} + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if v.Items == nil { + invalidParams.Add(smithy.NewErrParamRequired("Items")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateResponseHeadersPolicyAccessControlAllowMethods(v *types.ResponseHeadersPolicyAccessControlAllowMethods) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResponseHeadersPolicyAccessControlAllowMethods"} + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if v.Items == nil { + invalidParams.Add(smithy.NewErrParamRequired("Items")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateResponseHeadersPolicyAccessControlAllowOrigins(v *types.ResponseHeadersPolicyAccessControlAllowOrigins) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResponseHeadersPolicyAccessControlAllowOrigins"} + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if v.Items == nil { + invalidParams.Add(smithy.NewErrParamRequired("Items")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateResponseHeadersPolicyAccessControlExposeHeaders(v *types.ResponseHeadersPolicyAccessControlExposeHeaders) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResponseHeadersPolicyAccessControlExposeHeaders"} + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateResponseHeadersPolicyConfig(v *types.ResponseHeadersPolicyConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResponseHeadersPolicyConfig"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.CorsConfig != nil { + if err := validateResponseHeadersPolicyCorsConfig(v.CorsConfig); err != nil { + invalidParams.AddNested("CorsConfig", err.(smithy.InvalidParamsError)) + } + } + if v.SecurityHeadersConfig != nil { + if err := validateResponseHeadersPolicySecurityHeadersConfig(v.SecurityHeadersConfig); err != nil { + invalidParams.AddNested("SecurityHeadersConfig", err.(smithy.InvalidParamsError)) + } + } + if v.ServerTimingHeadersConfig != nil { + if err := validateResponseHeadersPolicyServerTimingHeadersConfig(v.ServerTimingHeadersConfig); err != nil { + invalidParams.AddNested("ServerTimingHeadersConfig", err.(smithy.InvalidParamsError)) + } + } + if v.CustomHeadersConfig != nil { + if err := validateResponseHeadersPolicyCustomHeadersConfig(v.CustomHeadersConfig); err != nil { + invalidParams.AddNested("CustomHeadersConfig", err.(smithy.InvalidParamsError)) + } + } + if v.RemoveHeadersConfig != nil { + if err := validateResponseHeadersPolicyRemoveHeadersConfig(v.RemoveHeadersConfig); err != nil { + invalidParams.AddNested("RemoveHeadersConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateResponseHeadersPolicyContentSecurityPolicy(v *types.ResponseHeadersPolicyContentSecurityPolicy) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResponseHeadersPolicyContentSecurityPolicy"} + if v.Override == nil { + invalidParams.Add(smithy.NewErrParamRequired("Override")) + } + if v.ContentSecurityPolicy == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContentSecurityPolicy")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateResponseHeadersPolicyContentTypeOptions(v *types.ResponseHeadersPolicyContentTypeOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResponseHeadersPolicyContentTypeOptions"} + if v.Override == nil { + invalidParams.Add(smithy.NewErrParamRequired("Override")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateResponseHeadersPolicyCorsConfig(v *types.ResponseHeadersPolicyCorsConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResponseHeadersPolicyCorsConfig"} + if v.AccessControlAllowOrigins == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccessControlAllowOrigins")) + } else if v.AccessControlAllowOrigins != nil { + if err := validateResponseHeadersPolicyAccessControlAllowOrigins(v.AccessControlAllowOrigins); err != nil { + invalidParams.AddNested("AccessControlAllowOrigins", err.(smithy.InvalidParamsError)) + } + } + if v.AccessControlAllowHeaders == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccessControlAllowHeaders")) + } else if v.AccessControlAllowHeaders != nil { + if err := validateResponseHeadersPolicyAccessControlAllowHeaders(v.AccessControlAllowHeaders); err != nil { + invalidParams.AddNested("AccessControlAllowHeaders", err.(smithy.InvalidParamsError)) + } + } + if v.AccessControlAllowMethods == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccessControlAllowMethods")) + } else if v.AccessControlAllowMethods != nil { + if err := validateResponseHeadersPolicyAccessControlAllowMethods(v.AccessControlAllowMethods); err != nil { + invalidParams.AddNested("AccessControlAllowMethods", err.(smithy.InvalidParamsError)) + } + } + if v.AccessControlAllowCredentials == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccessControlAllowCredentials")) + } + if v.AccessControlExposeHeaders != nil { + if err := validateResponseHeadersPolicyAccessControlExposeHeaders(v.AccessControlExposeHeaders); err != nil { + invalidParams.AddNested("AccessControlExposeHeaders", err.(smithy.InvalidParamsError)) + } + } + if v.OriginOverride == nil { + invalidParams.Add(smithy.NewErrParamRequired("OriginOverride")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateResponseHeadersPolicyCustomHeader(v *types.ResponseHeadersPolicyCustomHeader) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResponseHeadersPolicyCustomHeader"} + if v.Header == nil { + invalidParams.Add(smithy.NewErrParamRequired("Header")) + } + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if v.Override == nil { + invalidParams.Add(smithy.NewErrParamRequired("Override")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateResponseHeadersPolicyCustomHeaderList(v []types.ResponseHeadersPolicyCustomHeader) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResponseHeadersPolicyCustomHeaderList"} + for i := range v { + if err := validateResponseHeadersPolicyCustomHeader(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateResponseHeadersPolicyCustomHeadersConfig(v *types.ResponseHeadersPolicyCustomHeadersConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResponseHeadersPolicyCustomHeadersConfig"} + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if v.Items != nil { + if err := validateResponseHeadersPolicyCustomHeaderList(v.Items); err != nil { + invalidParams.AddNested("Items", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateResponseHeadersPolicyFrameOptions(v *types.ResponseHeadersPolicyFrameOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResponseHeadersPolicyFrameOptions"} + if v.Override == nil { + invalidParams.Add(smithy.NewErrParamRequired("Override")) + } + if len(v.FrameOption) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("FrameOption")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateResponseHeadersPolicyReferrerPolicy(v *types.ResponseHeadersPolicyReferrerPolicy) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResponseHeadersPolicyReferrerPolicy"} + if v.Override == nil { + invalidParams.Add(smithy.NewErrParamRequired("Override")) + } + if len(v.ReferrerPolicy) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ReferrerPolicy")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateResponseHeadersPolicyRemoveHeader(v *types.ResponseHeadersPolicyRemoveHeader) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResponseHeadersPolicyRemoveHeader"} + if v.Header == nil { + invalidParams.Add(smithy.NewErrParamRequired("Header")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateResponseHeadersPolicyRemoveHeaderList(v []types.ResponseHeadersPolicyRemoveHeader) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResponseHeadersPolicyRemoveHeaderList"} + for i := range v { + if err := validateResponseHeadersPolicyRemoveHeader(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateResponseHeadersPolicyRemoveHeadersConfig(v *types.ResponseHeadersPolicyRemoveHeadersConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResponseHeadersPolicyRemoveHeadersConfig"} + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if v.Items != nil { + if err := validateResponseHeadersPolicyRemoveHeaderList(v.Items); err != nil { + invalidParams.AddNested("Items", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateResponseHeadersPolicySecurityHeadersConfig(v *types.ResponseHeadersPolicySecurityHeadersConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResponseHeadersPolicySecurityHeadersConfig"} + if v.XSSProtection != nil { + if err := validateResponseHeadersPolicyXSSProtection(v.XSSProtection); err != nil { + invalidParams.AddNested("XSSProtection", err.(smithy.InvalidParamsError)) + } + } + if v.FrameOptions != nil { + if err := validateResponseHeadersPolicyFrameOptions(v.FrameOptions); err != nil { + invalidParams.AddNested("FrameOptions", err.(smithy.InvalidParamsError)) + } + } + if v.ReferrerPolicy != nil { + if err := validateResponseHeadersPolicyReferrerPolicy(v.ReferrerPolicy); err != nil { + invalidParams.AddNested("ReferrerPolicy", err.(smithy.InvalidParamsError)) + } + } + if v.ContentSecurityPolicy != nil { + if err := validateResponseHeadersPolicyContentSecurityPolicy(v.ContentSecurityPolicy); err != nil { + invalidParams.AddNested("ContentSecurityPolicy", err.(smithy.InvalidParamsError)) + } + } + if v.ContentTypeOptions != nil { + if err := validateResponseHeadersPolicyContentTypeOptions(v.ContentTypeOptions); err != nil { + invalidParams.AddNested("ContentTypeOptions", err.(smithy.InvalidParamsError)) + } + } + if v.StrictTransportSecurity != nil { + if err := validateResponseHeadersPolicyStrictTransportSecurity(v.StrictTransportSecurity); err != nil { + invalidParams.AddNested("StrictTransportSecurity", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateResponseHeadersPolicyServerTimingHeadersConfig(v *types.ResponseHeadersPolicyServerTimingHeadersConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResponseHeadersPolicyServerTimingHeadersConfig"} + if v.Enabled == nil { + invalidParams.Add(smithy.NewErrParamRequired("Enabled")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateResponseHeadersPolicyStrictTransportSecurity(v *types.ResponseHeadersPolicyStrictTransportSecurity) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResponseHeadersPolicyStrictTransportSecurity"} + if v.Override == nil { + invalidParams.Add(smithy.NewErrParamRequired("Override")) + } + if v.AccessControlMaxAgeSec == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccessControlMaxAgeSec")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateResponseHeadersPolicyXSSProtection(v *types.ResponseHeadersPolicyXSSProtection) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResponseHeadersPolicyXSSProtection"} + if v.Override == nil { + invalidParams.Add(smithy.NewErrParamRequired("Override")) + } + if v.Protection == nil { + invalidParams.Add(smithy.NewErrParamRequired("Protection")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRestrictions(v *types.Restrictions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Restrictions"} + if v.GeoRestriction == nil { + invalidParams.Add(smithy.NewErrParamRequired("GeoRestriction")) + } else if v.GeoRestriction != nil { + if err := validateGeoRestriction(v.GeoRestriction); err != nil { + invalidParams.AddNested("GeoRestriction", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateS3Origin(v *types.S3Origin) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "S3Origin"} + if v.DomainName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainName")) + } + if v.OriginAccessIdentity == nil { + invalidParams.Add(smithy.NewErrParamRequired("OriginAccessIdentity")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateS3OriginConfig(v *types.S3OriginConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "S3OriginConfig"} + if v.OriginAccessIdentity == nil { + invalidParams.Add(smithy.NewErrParamRequired("OriginAccessIdentity")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSessionStickinessConfig(v *types.SessionStickinessConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SessionStickinessConfig"} + if v.IdleTTL == nil { + invalidParams.Add(smithy.NewErrParamRequired("IdleTTL")) + } + if v.MaximumTTL == nil { + invalidParams.Add(smithy.NewErrParamRequired("MaximumTTL")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateStagingDistributionDnsNames(v *types.StagingDistributionDnsNames) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StagingDistributionDnsNames"} + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateStatusCodes(v *types.StatusCodes) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StatusCodes"} + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if v.Items == nil { + invalidParams.Add(smithy.NewErrParamRequired("Items")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateStreamingDistributionConfig(v *types.StreamingDistributionConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StreamingDistributionConfig"} + if v.CallerReference == nil { + invalidParams.Add(smithy.NewErrParamRequired("CallerReference")) + } + if v.S3Origin == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3Origin")) + } else if v.S3Origin != nil { + if err := validateS3Origin(v.S3Origin); err != nil { + invalidParams.AddNested("S3Origin", err.(smithy.InvalidParamsError)) + } + } + if v.Aliases != nil { + if err := validateAliases(v.Aliases); err != nil { + invalidParams.AddNested("Aliases", err.(smithy.InvalidParamsError)) + } + } + if v.Comment == nil { + invalidParams.Add(smithy.NewErrParamRequired("Comment")) + } + if v.Logging != nil { + if err := validateStreamingLoggingConfig(v.Logging); err != nil { + invalidParams.AddNested("Logging", err.(smithy.InvalidParamsError)) + } + } + if v.TrustedSigners == nil { + invalidParams.Add(smithy.NewErrParamRequired("TrustedSigners")) + } else if v.TrustedSigners != nil { + if err := validateTrustedSigners(v.TrustedSigners); err != nil { + invalidParams.AddNested("TrustedSigners", err.(smithy.InvalidParamsError)) + } + } + if v.Enabled == nil { + invalidParams.Add(smithy.NewErrParamRequired("Enabled")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateStreamingDistributionConfigWithTags(v *types.StreamingDistributionConfigWithTags) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StreamingDistributionConfigWithTags"} + if v.StreamingDistributionConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("StreamingDistributionConfig")) + } else if v.StreamingDistributionConfig != nil { + if err := validateStreamingDistributionConfig(v.StreamingDistributionConfig); err != nil { + invalidParams.AddNested("StreamingDistributionConfig", err.(smithy.InvalidParamsError)) + } + } + 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 validateStreamingLoggingConfig(v *types.StreamingLoggingConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StreamingLoggingConfig"} + if v.Enabled == nil { + invalidParams.Add(smithy.NewErrParamRequired("Enabled")) + } + if v.Bucket == nil { + invalidParams.Add(smithy.NewErrParamRequired("Bucket")) + } + if v.Prefix == nil { + invalidParams.Add(smithy.NewErrParamRequired("Prefix")) + } + 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 invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTagList(v []types.Tag) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagList"} + 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 validateTags(v *types.Tags) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Tags"} + if v.Items != nil { + if err := validateTagList(v.Items); err != nil { + invalidParams.AddNested("Items", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTrafficConfig(v *types.TrafficConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TrafficConfig"} + if v.SingleWeightConfig != nil { + if err := validateContinuousDeploymentSingleWeightConfig(v.SingleWeightConfig); err != nil { + invalidParams.AddNested("SingleWeightConfig", err.(smithy.InvalidParamsError)) + } + } + if v.SingleHeaderConfig != nil { + if err := validateContinuousDeploymentSingleHeaderConfig(v.SingleHeaderConfig); err != nil { + invalidParams.AddNested("SingleHeaderConfig", err.(smithy.InvalidParamsError)) + } + } + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTrustedKeyGroups(v *types.TrustedKeyGroups) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TrustedKeyGroups"} + if v.Enabled == nil { + invalidParams.Add(smithy.NewErrParamRequired("Enabled")) + } + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTrustedSigners(v *types.TrustedSigners) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TrustedSigners"} + if v.Enabled == nil { + invalidParams.Add(smithy.NewErrParamRequired("Enabled")) + } + if v.Quantity == nil { + invalidParams.Add(smithy.NewErrParamRequired("Quantity")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpAssociateAliasInput(v *AssociateAliasInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssociateAliasInput"} + if v.TargetDistributionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("TargetDistributionId")) + } + if v.Alias == nil { + invalidParams.Add(smithy.NewErrParamRequired("Alias")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCopyDistributionInput(v *CopyDistributionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CopyDistributionInput"} + if v.PrimaryDistributionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("PrimaryDistributionId")) + } + if v.CallerReference == nil { + invalidParams.Add(smithy.NewErrParamRequired("CallerReference")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateCachePolicyInput(v *CreateCachePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateCachePolicyInput"} + if v.CachePolicyConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("CachePolicyConfig")) + } else if v.CachePolicyConfig != nil { + if err := validateCachePolicyConfig(v.CachePolicyConfig); err != nil { + invalidParams.AddNested("CachePolicyConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateCloudFrontOriginAccessIdentityInput(v *CreateCloudFrontOriginAccessIdentityInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateCloudFrontOriginAccessIdentityInput"} + if v.CloudFrontOriginAccessIdentityConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("CloudFrontOriginAccessIdentityConfig")) + } else if v.CloudFrontOriginAccessIdentityConfig != nil { + if err := validateCloudFrontOriginAccessIdentityConfig(v.CloudFrontOriginAccessIdentityConfig); err != nil { + invalidParams.AddNested("CloudFrontOriginAccessIdentityConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateContinuousDeploymentPolicyInput(v *CreateContinuousDeploymentPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateContinuousDeploymentPolicyInput"} + if v.ContinuousDeploymentPolicyConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContinuousDeploymentPolicyConfig")) + } else if v.ContinuousDeploymentPolicyConfig != nil { + if err := validateContinuousDeploymentPolicyConfig(v.ContinuousDeploymentPolicyConfig); err != nil { + invalidParams.AddNested("ContinuousDeploymentPolicyConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateDistributionInput(v *CreateDistributionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateDistributionInput"} + if v.DistributionConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("DistributionConfig")) + } else if v.DistributionConfig != nil { + if err := validateDistributionConfig(v.DistributionConfig); err != nil { + invalidParams.AddNested("DistributionConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateDistributionWithTagsInput(v *CreateDistributionWithTagsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateDistributionWithTagsInput"} + if v.DistributionConfigWithTags == nil { + invalidParams.Add(smithy.NewErrParamRequired("DistributionConfigWithTags")) + } else if v.DistributionConfigWithTags != nil { + if err := validateDistributionConfigWithTags(v.DistributionConfigWithTags); err != nil { + invalidParams.AddNested("DistributionConfigWithTags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateFieldLevelEncryptionConfigInput(v *CreateFieldLevelEncryptionConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateFieldLevelEncryptionConfigInput"} + if v.FieldLevelEncryptionConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("FieldLevelEncryptionConfig")) + } else if v.FieldLevelEncryptionConfig != nil { + if err := validateFieldLevelEncryptionConfig(v.FieldLevelEncryptionConfig); err != nil { + invalidParams.AddNested("FieldLevelEncryptionConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateFieldLevelEncryptionProfileInput(v *CreateFieldLevelEncryptionProfileInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateFieldLevelEncryptionProfileInput"} + if v.FieldLevelEncryptionProfileConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("FieldLevelEncryptionProfileConfig")) + } else if v.FieldLevelEncryptionProfileConfig != nil { + if err := validateFieldLevelEncryptionProfileConfig(v.FieldLevelEncryptionProfileConfig); err != nil { + invalidParams.AddNested("FieldLevelEncryptionProfileConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateFunctionInput(v *CreateFunctionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateFunctionInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.FunctionConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionConfig")) + } else if v.FunctionConfig != nil { + if err := validateFunctionConfig(v.FunctionConfig); err != nil { + invalidParams.AddNested("FunctionConfig", err.(smithy.InvalidParamsError)) + } + } + if v.FunctionCode == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionCode")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateInvalidationInput(v *CreateInvalidationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateInvalidationInput"} + if v.DistributionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DistributionId")) + } + if v.InvalidationBatch == nil { + invalidParams.Add(smithy.NewErrParamRequired("InvalidationBatch")) + } else if v.InvalidationBatch != nil { + if err := validateInvalidationBatch(v.InvalidationBatch); err != nil { + invalidParams.AddNested("InvalidationBatch", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateKeyGroupInput(v *CreateKeyGroupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateKeyGroupInput"} + if v.KeyGroupConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("KeyGroupConfig")) + } else if v.KeyGroupConfig != nil { + if err := validateKeyGroupConfig(v.KeyGroupConfig); err != nil { + invalidParams.AddNested("KeyGroupConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateKeyValueStoreInput(v *CreateKeyValueStoreInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateKeyValueStoreInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.ImportSource != nil { + if err := validateImportSource(v.ImportSource); err != nil { + invalidParams.AddNested("ImportSource", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateMonitoringSubscriptionInput(v *CreateMonitoringSubscriptionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateMonitoringSubscriptionInput"} + if v.DistributionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DistributionId")) + } + if v.MonitoringSubscription == nil { + invalidParams.Add(smithy.NewErrParamRequired("MonitoringSubscription")) + } else if v.MonitoringSubscription != nil { + if err := validateMonitoringSubscription(v.MonitoringSubscription); err != nil { + invalidParams.AddNested("MonitoringSubscription", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateOriginAccessControlInput(v *CreateOriginAccessControlInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateOriginAccessControlInput"} + if v.OriginAccessControlConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("OriginAccessControlConfig")) + } else if v.OriginAccessControlConfig != nil { + if err := validateOriginAccessControlConfig(v.OriginAccessControlConfig); err != nil { + invalidParams.AddNested("OriginAccessControlConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateOriginRequestPolicyInput(v *CreateOriginRequestPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateOriginRequestPolicyInput"} + if v.OriginRequestPolicyConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("OriginRequestPolicyConfig")) + } else if v.OriginRequestPolicyConfig != nil { + if err := validateOriginRequestPolicyConfig(v.OriginRequestPolicyConfig); err != nil { + invalidParams.AddNested("OriginRequestPolicyConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreatePublicKeyInput(v *CreatePublicKeyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreatePublicKeyInput"} + if v.PublicKeyConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("PublicKeyConfig")) + } else if v.PublicKeyConfig != nil { + if err := validatePublicKeyConfig(v.PublicKeyConfig); err != nil { + invalidParams.AddNested("PublicKeyConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateRealtimeLogConfigInput(v *CreateRealtimeLogConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateRealtimeLogConfigInput"} + if v.EndPoints == nil { + invalidParams.Add(smithy.NewErrParamRequired("EndPoints")) + } else if v.EndPoints != nil { + if err := validateEndPointList(v.EndPoints); err != nil { + invalidParams.AddNested("EndPoints", err.(smithy.InvalidParamsError)) + } + } + if v.Fields == nil { + invalidParams.Add(smithy.NewErrParamRequired("Fields")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.SamplingRate == nil { + invalidParams.Add(smithy.NewErrParamRequired("SamplingRate")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateResponseHeadersPolicyInput(v *CreateResponseHeadersPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateResponseHeadersPolicyInput"} + if v.ResponseHeadersPolicyConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResponseHeadersPolicyConfig")) + } else if v.ResponseHeadersPolicyConfig != nil { + if err := validateResponseHeadersPolicyConfig(v.ResponseHeadersPolicyConfig); err != nil { + invalidParams.AddNested("ResponseHeadersPolicyConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateStreamingDistributionInput(v *CreateStreamingDistributionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateStreamingDistributionInput"} + if v.StreamingDistributionConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("StreamingDistributionConfig")) + } else if v.StreamingDistributionConfig != nil { + if err := validateStreamingDistributionConfig(v.StreamingDistributionConfig); err != nil { + invalidParams.AddNested("StreamingDistributionConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateStreamingDistributionWithTagsInput(v *CreateStreamingDistributionWithTagsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateStreamingDistributionWithTagsInput"} + if v.StreamingDistributionConfigWithTags == nil { + invalidParams.Add(smithy.NewErrParamRequired("StreamingDistributionConfigWithTags")) + } else if v.StreamingDistributionConfigWithTags != nil { + if err := validateStreamingDistributionConfigWithTags(v.StreamingDistributionConfigWithTags); err != nil { + invalidParams.AddNested("StreamingDistributionConfigWithTags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteCachePolicyInput(v *DeleteCachePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteCachePolicyInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteCloudFrontOriginAccessIdentityInput(v *DeleteCloudFrontOriginAccessIdentityInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteCloudFrontOriginAccessIdentityInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteContinuousDeploymentPolicyInput(v *DeleteContinuousDeploymentPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteContinuousDeploymentPolicyInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteDistributionInput(v *DeleteDistributionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteDistributionInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteFieldLevelEncryptionConfigInput(v *DeleteFieldLevelEncryptionConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteFieldLevelEncryptionConfigInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteFieldLevelEncryptionProfileInput(v *DeleteFieldLevelEncryptionProfileInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteFieldLevelEncryptionProfileInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteFunctionInput(v *DeleteFunctionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteFunctionInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.IfMatch == nil { + invalidParams.Add(smithy.NewErrParamRequired("IfMatch")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteKeyGroupInput(v *DeleteKeyGroupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteKeyGroupInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteKeyValueStoreInput(v *DeleteKeyValueStoreInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteKeyValueStoreInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.IfMatch == nil { + invalidParams.Add(smithy.NewErrParamRequired("IfMatch")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteMonitoringSubscriptionInput(v *DeleteMonitoringSubscriptionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteMonitoringSubscriptionInput"} + if v.DistributionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DistributionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteOriginAccessControlInput(v *DeleteOriginAccessControlInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteOriginAccessControlInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteOriginRequestPolicyInput(v *DeleteOriginRequestPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteOriginRequestPolicyInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeletePublicKeyInput(v *DeletePublicKeyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeletePublicKeyInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteResponseHeadersPolicyInput(v *DeleteResponseHeadersPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteResponseHeadersPolicyInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteStreamingDistributionInput(v *DeleteStreamingDistributionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteStreamingDistributionInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeFunctionInput(v *DescribeFunctionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeFunctionInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeKeyValueStoreInput(v *DescribeKeyValueStoreInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeKeyValueStoreInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetCachePolicyConfigInput(v *GetCachePolicyConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetCachePolicyConfigInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetCachePolicyInput(v *GetCachePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetCachePolicyInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetCloudFrontOriginAccessIdentityConfigInput(v *GetCloudFrontOriginAccessIdentityConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetCloudFrontOriginAccessIdentityConfigInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetCloudFrontOriginAccessIdentityInput(v *GetCloudFrontOriginAccessIdentityInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetCloudFrontOriginAccessIdentityInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetContinuousDeploymentPolicyConfigInput(v *GetContinuousDeploymentPolicyConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetContinuousDeploymentPolicyConfigInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetContinuousDeploymentPolicyInput(v *GetContinuousDeploymentPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetContinuousDeploymentPolicyInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetDistributionConfigInput(v *GetDistributionConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetDistributionConfigInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetDistributionInput(v *GetDistributionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetDistributionInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetFieldLevelEncryptionConfigInput(v *GetFieldLevelEncryptionConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetFieldLevelEncryptionConfigInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetFieldLevelEncryptionInput(v *GetFieldLevelEncryptionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetFieldLevelEncryptionInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetFieldLevelEncryptionProfileConfigInput(v *GetFieldLevelEncryptionProfileConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetFieldLevelEncryptionProfileConfigInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetFieldLevelEncryptionProfileInput(v *GetFieldLevelEncryptionProfileInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetFieldLevelEncryptionProfileInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetFunctionInput(v *GetFunctionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetFunctionInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetInvalidationInput(v *GetInvalidationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetInvalidationInput"} + if v.DistributionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DistributionId")) + } + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetKeyGroupConfigInput(v *GetKeyGroupConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetKeyGroupConfigInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetKeyGroupInput(v *GetKeyGroupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetKeyGroupInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetMonitoringSubscriptionInput(v *GetMonitoringSubscriptionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetMonitoringSubscriptionInput"} + if v.DistributionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DistributionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetOriginAccessControlConfigInput(v *GetOriginAccessControlConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetOriginAccessControlConfigInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetOriginAccessControlInput(v *GetOriginAccessControlInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetOriginAccessControlInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetOriginRequestPolicyConfigInput(v *GetOriginRequestPolicyConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetOriginRequestPolicyConfigInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetOriginRequestPolicyInput(v *GetOriginRequestPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetOriginRequestPolicyInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetPublicKeyConfigInput(v *GetPublicKeyConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetPublicKeyConfigInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetPublicKeyInput(v *GetPublicKeyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetPublicKeyInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetResponseHeadersPolicyConfigInput(v *GetResponseHeadersPolicyConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetResponseHeadersPolicyConfigInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetResponseHeadersPolicyInput(v *GetResponseHeadersPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetResponseHeadersPolicyInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetStreamingDistributionConfigInput(v *GetStreamingDistributionConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetStreamingDistributionConfigInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetStreamingDistributionInput(v *GetStreamingDistributionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetStreamingDistributionInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListConflictingAliasesInput(v *ListConflictingAliasesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListConflictingAliasesInput"} + if v.DistributionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DistributionId")) + } + if v.Alias == nil { + invalidParams.Add(smithy.NewErrParamRequired("Alias")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListDistributionsByCachePolicyIdInput(v *ListDistributionsByCachePolicyIdInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListDistributionsByCachePolicyIdInput"} + if v.CachePolicyId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CachePolicyId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListDistributionsByKeyGroupInput(v *ListDistributionsByKeyGroupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListDistributionsByKeyGroupInput"} + if v.KeyGroupId == nil { + invalidParams.Add(smithy.NewErrParamRequired("KeyGroupId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListDistributionsByOriginRequestPolicyIdInput(v *ListDistributionsByOriginRequestPolicyIdInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListDistributionsByOriginRequestPolicyIdInput"} + if v.OriginRequestPolicyId == nil { + invalidParams.Add(smithy.NewErrParamRequired("OriginRequestPolicyId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListDistributionsByResponseHeadersPolicyIdInput(v *ListDistributionsByResponseHeadersPolicyIdInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListDistributionsByResponseHeadersPolicyIdInput"} + if v.ResponseHeadersPolicyId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResponseHeadersPolicyId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListDistributionsByWebACLIdInput(v *ListDistributionsByWebACLIdInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListDistributionsByWebACLIdInput"} + if v.WebACLId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WebACLId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListInvalidationsInput(v *ListInvalidationsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListInvalidationsInput"} + if v.DistributionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DistributionId")) + } + 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.Resource == nil { + invalidParams.Add(smithy.NewErrParamRequired("Resource")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPublishFunctionInput(v *PublishFunctionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PublishFunctionInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.IfMatch == nil { + invalidParams.Add(smithy.NewErrParamRequired("IfMatch")) + } + 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.Resource == nil { + invalidParams.Add(smithy.NewErrParamRequired("Resource")) + } + 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 validateOpTestFunctionInput(v *TestFunctionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TestFunctionInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.IfMatch == nil { + invalidParams.Add(smithy.NewErrParamRequired("IfMatch")) + } + if v.EventObject == nil { + invalidParams.Add(smithy.NewErrParamRequired("EventObject")) + } + 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.Resource == nil { + invalidParams.Add(smithy.NewErrParamRequired("Resource")) + } + if v.TagKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateCachePolicyInput(v *UpdateCachePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateCachePolicyInput"} + if v.CachePolicyConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("CachePolicyConfig")) + } else if v.CachePolicyConfig != nil { + if err := validateCachePolicyConfig(v.CachePolicyConfig); err != nil { + invalidParams.AddNested("CachePolicyConfig", err.(smithy.InvalidParamsError)) + } + } + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateCloudFrontOriginAccessIdentityInput(v *UpdateCloudFrontOriginAccessIdentityInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateCloudFrontOriginAccessIdentityInput"} + if v.CloudFrontOriginAccessIdentityConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("CloudFrontOriginAccessIdentityConfig")) + } else if v.CloudFrontOriginAccessIdentityConfig != nil { + if err := validateCloudFrontOriginAccessIdentityConfig(v.CloudFrontOriginAccessIdentityConfig); err != nil { + invalidParams.AddNested("CloudFrontOriginAccessIdentityConfig", err.(smithy.InvalidParamsError)) + } + } + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateContinuousDeploymentPolicyInput(v *UpdateContinuousDeploymentPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateContinuousDeploymentPolicyInput"} + if v.ContinuousDeploymentPolicyConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContinuousDeploymentPolicyConfig")) + } else if v.ContinuousDeploymentPolicyConfig != nil { + if err := validateContinuousDeploymentPolicyConfig(v.ContinuousDeploymentPolicyConfig); err != nil { + invalidParams.AddNested("ContinuousDeploymentPolicyConfig", err.(smithy.InvalidParamsError)) + } + } + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateDistributionInput(v *UpdateDistributionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateDistributionInput"} + if v.DistributionConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("DistributionConfig")) + } else if v.DistributionConfig != nil { + if err := validateDistributionConfig(v.DistributionConfig); err != nil { + invalidParams.AddNested("DistributionConfig", err.(smithy.InvalidParamsError)) + } + } + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateDistributionWithStagingConfigInput(v *UpdateDistributionWithStagingConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateDistributionWithStagingConfigInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateFieldLevelEncryptionConfigInput(v *UpdateFieldLevelEncryptionConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateFieldLevelEncryptionConfigInput"} + if v.FieldLevelEncryptionConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("FieldLevelEncryptionConfig")) + } else if v.FieldLevelEncryptionConfig != nil { + if err := validateFieldLevelEncryptionConfig(v.FieldLevelEncryptionConfig); err != nil { + invalidParams.AddNested("FieldLevelEncryptionConfig", err.(smithy.InvalidParamsError)) + } + } + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateFieldLevelEncryptionProfileInput(v *UpdateFieldLevelEncryptionProfileInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateFieldLevelEncryptionProfileInput"} + if v.FieldLevelEncryptionProfileConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("FieldLevelEncryptionProfileConfig")) + } else if v.FieldLevelEncryptionProfileConfig != nil { + if err := validateFieldLevelEncryptionProfileConfig(v.FieldLevelEncryptionProfileConfig); err != nil { + invalidParams.AddNested("FieldLevelEncryptionProfileConfig", err.(smithy.InvalidParamsError)) + } + } + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateFunctionInput(v *UpdateFunctionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateFunctionInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.IfMatch == nil { + invalidParams.Add(smithy.NewErrParamRequired("IfMatch")) + } + if v.FunctionConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionConfig")) + } else if v.FunctionConfig != nil { + if err := validateFunctionConfig(v.FunctionConfig); err != nil { + invalidParams.AddNested("FunctionConfig", err.(smithy.InvalidParamsError)) + } + } + if v.FunctionCode == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionCode")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateKeyGroupInput(v *UpdateKeyGroupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateKeyGroupInput"} + if v.KeyGroupConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("KeyGroupConfig")) + } else if v.KeyGroupConfig != nil { + if err := validateKeyGroupConfig(v.KeyGroupConfig); err != nil { + invalidParams.AddNested("KeyGroupConfig", err.(smithy.InvalidParamsError)) + } + } + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateKeyValueStoreInput(v *UpdateKeyValueStoreInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateKeyValueStoreInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Comment == nil { + invalidParams.Add(smithy.NewErrParamRequired("Comment")) + } + if v.IfMatch == nil { + invalidParams.Add(smithy.NewErrParamRequired("IfMatch")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateOriginAccessControlInput(v *UpdateOriginAccessControlInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateOriginAccessControlInput"} + if v.OriginAccessControlConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("OriginAccessControlConfig")) + } else if v.OriginAccessControlConfig != nil { + if err := validateOriginAccessControlConfig(v.OriginAccessControlConfig); err != nil { + invalidParams.AddNested("OriginAccessControlConfig", err.(smithy.InvalidParamsError)) + } + } + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateOriginRequestPolicyInput(v *UpdateOriginRequestPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateOriginRequestPolicyInput"} + if v.OriginRequestPolicyConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("OriginRequestPolicyConfig")) + } else if v.OriginRequestPolicyConfig != nil { + if err := validateOriginRequestPolicyConfig(v.OriginRequestPolicyConfig); err != nil { + invalidParams.AddNested("OriginRequestPolicyConfig", err.(smithy.InvalidParamsError)) + } + } + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdatePublicKeyInput(v *UpdatePublicKeyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdatePublicKeyInput"} + if v.PublicKeyConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("PublicKeyConfig")) + } else if v.PublicKeyConfig != nil { + if err := validatePublicKeyConfig(v.PublicKeyConfig); err != nil { + invalidParams.AddNested("PublicKeyConfig", err.(smithy.InvalidParamsError)) + } + } + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateRealtimeLogConfigInput(v *UpdateRealtimeLogConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateRealtimeLogConfigInput"} + if v.EndPoints != nil { + if err := validateEndPointList(v.EndPoints); err != nil { + invalidParams.AddNested("EndPoints", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateResponseHeadersPolicyInput(v *UpdateResponseHeadersPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateResponseHeadersPolicyInput"} + if v.ResponseHeadersPolicyConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResponseHeadersPolicyConfig")) + } else if v.ResponseHeadersPolicyConfig != nil { + if err := validateResponseHeadersPolicyConfig(v.ResponseHeadersPolicyConfig); err != nil { + invalidParams.AddNested("ResponseHeadersPolicyConfig", err.(smithy.InvalidParamsError)) + } + } + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateStreamingDistributionInput(v *UpdateStreamingDistributionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateStreamingDistributionInput"} + if v.StreamingDistributionConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("StreamingDistributionConfig")) + } else if v.StreamingDistributionConfig != nil { + if err := validateStreamingDistributionConfig(v.StreamingDistributionConfig); err != nil { + invalidParams.AddNested("StreamingDistributionConfig", err.(smithy.InvalidParamsError)) + } + } + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/CHANGELOG.md index 9ce6c8d983..f3bedb5a71 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/CHANGELOG.md @@ -1,3 +1,75 @@ +# v1.35.3 (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.35.2 (2024-09-04) + +* No change notes available for this release. + +# v1.35.1 (2024-09-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.35.0 (2024-08-15) + +* **Feature**: Make the LastUsedDate field in the GetAccessKeyLastUsed response optional. This may break customers who only call the API for access keys with a valid LastUsedDate. This fixes a deserialization issue for access keys without a LastUsedDate, because the field was marked as required but could be null. +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.34.3 (2024-07-10.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.34.2 (2024-07-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.34.1 (2024-06-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.34.0 (2024-06-26) + +* **Feature**: Support list-of-string endpoint parameter. + +# v1.33.1 (2024-06-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.33.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.32.7 (2024-06-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.6 (2024-06-07) + +* **Bug Fix**: Add clock skew correction on all service clients +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.5 (2024-06-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.4 (2024-05-23) + +* No change notes available for this release. + +# v1.32.3 (2024-05-16) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.2 (2024-05-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.1 (2024-05-08) + +* **Bug Fix**: GoDoc improvement + # v1.32.0 (2024-04-11) * **Feature**: For CreateOpenIDConnectProvider API, the ThumbprintList parameter is no longer required. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_client.go index af4dfbab0e..aa7327c2a0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_client.go @@ -14,13 +14,16 @@ import ( 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/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "net" "net/http" + "sync/atomic" "time" ) @@ -31,6 +34,9 @@ const ServiceAPIVersion = "2010-05-08" // Access Management. 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 @@ -69,6 +75,8 @@ func New(options Options, optFns ...func(*Options)) *Client { options: options, } + initializeTimeOffsetResolver(client) + return client } @@ -442,6 +450,30 @@ 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 addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -485,6 +517,44 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { 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 +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddClientIDToOpenIDConnectProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddClientIDToOpenIDConnectProvider.go index b38b1d456c..ab2ac881a8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddClientIDToOpenIDConnectProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddClientIDToOpenIDConnectProvider.go @@ -11,8 +11,9 @@ import ( ) // Adds a new client ID (also known as audience) to the list of client IDs already -// registered for the specified IAM OpenID Connect (OIDC) provider resource. This -// operation is idempotent; it does not fail or return an error if you add an +// registered for the specified IAM OpenID Connect (OIDC) provider resource. +// +// This operation is idempotent; it does not fail or return an error if you add an // existing client ID to the provider. func (c *Client) AddClientIDToOpenIDConnectProvider(ctx context.Context, params *AddClientIDToOpenIDConnectProviderInput, optFns ...func(*Options)) (*AddClientIDToOpenIDConnectProviderOutput, error) { if params == nil { @@ -39,7 +40,7 @@ type AddClientIDToOpenIDConnectProviderInput struct { // The Amazon Resource Name (ARN) of the IAM OpenID Connect (OIDC) provider // resource to add the client ID to. You can get a list of OIDC provider ARNs by - // using the ListOpenIDConnectProviders operation. + // using the ListOpenIDConnectProvidersoperation. // // This member is required. OpenIDConnectProviderArn *string @@ -109,6 +110,12 @@ func (c *Client) addOperationAddClientIDToOpenIDConnectProviderMiddlewares(stack 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 = addOpAddClientIDToOpenIDConnectProviderValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddRoleToInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddRoleToInstanceProfile.go index 54c27cb4b4..a7e2951d6f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddRoleToInstanceProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddRoleToInstanceProfile.go @@ -14,15 +14,20 @@ import ( // profile can contain only one role, and this quota cannot be increased. You can // remove the existing role and then add a different role to an instance profile. // You must then wait for the change to appear across all of Amazon Web Services -// because of eventual consistency (https://en.wikipedia.org/wiki/Eventual_consistency) -// . To force the change, you must disassociate the instance profile (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DisassociateIamInstanceProfile.html) -// and then associate the instance profile (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_AssociateIamInstanceProfile.html) -// , or you can stop your instance and then restart it. The caller of this -// operation must be granted the PassRole permission on the IAM role by a -// permissions policy. For more information about roles, see IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) -// in the IAM User Guide. For more information about instance profiles, see Using -// instance profiles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) -// in the IAM User Guide. +// because of [eventual consistency]. To force the change, you must [disassociate the instance profile] and then [associate the instance profile], or you can stop your +// instance and then restart it. +// +// The caller of this operation must be granted the PassRole permission on the IAM +// role by a permissions policy. +// +// For more information about roles, see [IAM roles] in the IAM User Guide. For more +// information about instance profiles, see [Using instance profiles]in the IAM User Guide. +// +// [disassociate the instance profile]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DisassociateIamInstanceProfile.html +// [associate the instance profile]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_AssociateIamInstanceProfile.html +// [Using instance profiles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html +// [eventual consistency]: https://en.wikipedia.org/wiki/Eventual_consistency +// [IAM roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html func (c *Client) AddRoleToInstanceProfile(ctx context.Context, params *AddRoleToInstanceProfileInput, optFns ...func(*Options)) (*AddRoleToInstanceProfileOutput, error) { if params == nil { params = &AddRoleToInstanceProfileInput{} @@ -40,18 +45,24 @@ func (c *Client) AddRoleToInstanceProfile(ctx context.Context, params *AddRoleTo type AddRoleToInstanceProfileInput struct { - // The name of the instance profile to update. This parameter allows (through its - // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters - // consisting of upper and lowercase alphanumeric characters with no spaces. You - // can also include any of the following characters: _+=,.@- + // The name of the instance profile to update. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. InstanceProfileName *string - // The name of the role to add. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // The name of the role to add. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -121,6 +132,12 @@ func (c *Client) addOperationAddRoleToInstanceProfileMiddlewares(stack *middlewa 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 = addOpAddRoleToInstanceProfileValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddUserToGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddUserToGroup.go index 23c34433ad..48fa5fe0e7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddUserToGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddUserToGroup.go @@ -28,18 +28,24 @@ func (c *Client) AddUserToGroup(ctx context.Context, params *AddUserToGroupInput type AddUserToGroupInput struct { - // The name of the group to update. This parameter allows (through its regex - // pattern (http://wikipedia.org/wiki/regex) ) a string of characters consisting of - // upper and lowercase alphanumeric characters with no spaces. You can also include - // any of the following characters: _+=,.@- + // The name of the group to update. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. GroupName *string - // The name of the user to add. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // The name of the user to add. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -109,6 +115,12 @@ func (c *Client) addOperationAddUserToGroupMiddlewares(stack *middleware.Stack, 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 = addOpAddUserToGroupValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachGroupPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachGroupPolicy.go index 28063a7b90..ed638d95d5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachGroupPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachGroupPolicy.go @@ -10,14 +10,19 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Attaches the specified managed policy to the specified IAM group. You use this -// operation to attach a managed policy to a group. To embed an inline policy in a -// group, use PutGroupPolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_PutGroupPolicy.html) -// . As a best practice, you can validate your IAM policies. To learn more, see -// Validating IAM policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html) -// in the IAM User Guide. For more information about policies, see Managed -// policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. +// Attaches the specified managed policy to the specified IAM group. +// +// You use this operation to attach a managed policy to a group. To embed an +// inline policy in a group, use [PutGroupPolicy]PutGroupPolicy . +// +// As a best practice, you can validate your IAM policies. To learn more, see [Validating IAM policies] in +// the IAM User Guide. +// +// For more information about policies, see [Managed policies and inline policies] in the IAM User Guide. +// +// [PutGroupPolicy]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_PutGroupPolicy.html +// [Validating IAM policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) AttachGroupPolicy(ctx context.Context, params *AttachGroupPolicyInput, optFns ...func(*Options)) (*AttachGroupPolicyOutput, error) { if params == nil { params = &AttachGroupPolicyInput{} @@ -35,17 +40,23 @@ func (c *Client) AttachGroupPolicy(ctx context.Context, params *AttachGroupPolic type AttachGroupPolicyInput struct { - // The name (friendly name, not ARN) of the group to attach the policy to. This - // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- + // The name (friendly name, not ARN) of the group to attach the policy to. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. GroupName *string - // The Amazon Resource Name (ARN) of the IAM policy you want to attach. For more - // information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // The Amazon Resource Name (ARN) of the IAM policy you want to attach. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. PolicyArn *string @@ -115,6 +126,12 @@ func (c *Client) addOperationAttachGroupPolicyMiddlewares(stack *middleware.Stac 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 = addOpAttachGroupPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachRolePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachRolePolicy.go index 649f766092..4e7573272f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachRolePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachRolePolicy.go @@ -12,16 +12,24 @@ import ( // Attaches the specified managed policy to the specified IAM role. When you // attach a managed policy to a role, the managed policy becomes part of the role's -// permission (access) policy. You cannot use a managed policy as the role's trust -// policy. The role's trust policy is created at the same time as the role, using -// CreateRole (https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html) -// . You can update a role's trust policy using UpdateAssumerolePolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_UpdateAssumeRolePolicy.html) -// . Use this operation to attach a managed policy to a role. To embed an inline -// policy in a role, use PutRolePolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_PutRolePolicy.html) -// . For more information about policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. As a best practice, you can validate your IAM policies. -// To learn more, see Validating IAM policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html) +// permission (access) policy. +// +// You cannot use a managed policy as the role's trust policy. The role's trust +// policy is created at the same time as the role, using [CreateRole]CreateRole . You can +// update a role's trust policy using [UpdateAssumerolePolicy]UpdateAssumerolePolicy . +// +// Use this operation to attach a managed policy to a role. To embed an inline +// policy in a role, use [PutRolePolicy]PutRolePolicy . For more information about policies, see [Managed policies and inline policies] // in the IAM User Guide. +// +// As a best practice, you can validate your IAM policies. To learn more, see [Validating IAM policies] in +// the IAM User Guide. +// +// [Validating IAM policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html +// [UpdateAssumerolePolicy]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_UpdateAssumeRolePolicy.html +// [PutRolePolicy]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_PutRolePolicy.html +// [CreateRole]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) AttachRolePolicy(ctx context.Context, params *AttachRolePolicyInput, optFns ...func(*Options)) (*AttachRolePolicyOutput, error) { if params == nil { params = &AttachRolePolicyInput{} @@ -39,17 +47,23 @@ func (c *Client) AttachRolePolicy(ctx context.Context, params *AttachRolePolicyI type AttachRolePolicyInput struct { - // The Amazon Resource Name (ARN) of the IAM policy you want to attach. For more - // information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // The Amazon Resource Name (ARN) of the IAM policy you want to attach. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. PolicyArn *string - // The name (friendly name, not ARN) of the role to attach the policy to. This - // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- + // The name (friendly name, not ARN) of the role to attach the policy to. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -119,6 +133,12 @@ func (c *Client) addOperationAttachRolePolicyMiddlewares(stack *middleware.Stack 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 = addOpAttachRolePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachUserPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachUserPolicy.go index 52f4010a62..9791f0fbf4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachUserPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachUserPolicy.go @@ -10,14 +10,19 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Attaches the specified managed policy to the specified user. You use this -// operation to attach a managed policy to a user. To embed an inline policy in a -// user, use PutUserPolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_PutUserPolicy.html) -// . As a best practice, you can validate your IAM policies. To learn more, see -// Validating IAM policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html) -// in the IAM User Guide. For more information about policies, see Managed -// policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. +// Attaches the specified managed policy to the specified user. +// +// You use this operation to attach a managed policy to a user. To embed an inline +// policy in a user, use [PutUserPolicy]PutUserPolicy . +// +// As a best practice, you can validate your IAM policies. To learn more, see [Validating IAM policies] in +// the IAM User Guide. +// +// For more information about policies, see [Managed policies and inline policies] in the IAM User Guide. +// +// [Validating IAM policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html +// [PutUserPolicy]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_PutUserPolicy.html +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) AttachUserPolicy(ctx context.Context, params *AttachUserPolicyInput, optFns ...func(*Options)) (*AttachUserPolicyOutput, error) { if params == nil { params = &AttachUserPolicyInput{} @@ -35,17 +40,23 @@ func (c *Client) AttachUserPolicy(ctx context.Context, params *AttachUserPolicyI type AttachUserPolicyInput struct { - // The Amazon Resource Name (ARN) of the IAM policy you want to attach. For more - // information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // The Amazon Resource Name (ARN) of the IAM policy you want to attach. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. PolicyArn *string - // The name (friendly name, not ARN) of the IAM user to attach the policy to. This - // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- + // The name (friendly name, not ARN) of the IAM user to attach the policy to. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -115,6 +126,12 @@ func (c *Client) addOperationAttachUserPolicyMiddlewares(stack *middleware.Stack 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 = addOpAttachUserPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ChangePassword.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ChangePassword.go index 5999053d31..ef04c7499a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ChangePassword.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ChangePassword.go @@ -14,10 +14,13 @@ import ( // operation can be performed using the CLI, the Amazon Web Services API, or the My // Security Credentials page in the Amazon Web Services Management Console. The // Amazon Web Services account root user password is not affected by this -// operation. Use UpdateLoginProfile to use the CLI, the Amazon Web Services API, -// or the Users page in the IAM console to change the password for any IAM user. -// For more information about modifying passwords, see Managing passwords (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingLogins.html) -// in the IAM User Guide. +// operation. +// +// Use UpdateLoginProfile to use the CLI, the Amazon Web Services API, or the Users page in the IAM +// console to change the password for any IAM user. For more information about +// modifying passwords, see [Managing passwords]in the IAM User Guide. +// +// [Managing passwords]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingLogins.html func (c *Client) ChangePassword(ctx context.Context, params *ChangePasswordInput, optFns ...func(*Options)) (*ChangePasswordOutput, error) { if params == nil { params = &ChangePasswordInput{} @@ -36,16 +39,19 @@ func (c *Client) ChangePassword(ctx context.Context, params *ChangePasswordInput type ChangePasswordInput struct { // The new password. The new password must conform to the Amazon Web Services - // account's password policy, if one exists. The regex pattern (http://wikipedia.org/wiki/regex) - // that is used to validate this parameter is a string of characters. That string - // can include almost any printable ASCII character from the space ( \u0020 ) - // through the end of the ASCII character range ( \u00FF ). You can also include + // account's password policy, if one exists. + // + // The [regex pattern] that is used to validate this parameter is a string of characters. That + // string can include almost any printable ASCII character from the space ( \u0020 + // ) through the end of the ASCII character range ( \u00FF ). You can also include // the tab ( \u0009 ), line feed ( \u000A ), and carriage return ( \u000D ) // characters. Any of these characters are valid in a password. However, many // tools, such as the Amazon Web Services Management Console, might restrict the // ability to type certain characters because they have special meaning within that // tool. // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // This member is required. NewPassword *string @@ -119,6 +125,12 @@ func (c *Client) addOperationChangePasswordMiddlewares(stack *middleware.Stack, 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 = addOpChangePasswordValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccessKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccessKey.go index 03776db677..1d3f96c7d7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccessKey.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccessKey.go @@ -11,20 +11,28 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates a new Amazon Web Services secret access key and corresponding Amazon +// Creates a new Amazon Web Services secret access key and corresponding Amazon +// // Web Services access key ID for the specified user. The default status for new -// keys is Active . If you do not specify a user name, IAM determines the user name -// implicitly based on the Amazon Web Services access key ID signing the request. -// This operation works for access keys under the Amazon Web Services account. +// keys is Active . +// +// If you do not specify a user name, IAM determines the user name implicitly +// based on the Amazon Web Services access key ID signing the request. This +// operation works for access keys under the Amazon Web Services account. // Consequently, you can use this operation to manage Amazon Web Services account // root user credentials. This is true even if the Amazon Web Services account has -// no associated users. For information about quotas on the number of keys you can -// create, see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM User Guide. To ensure the security of your Amazon Web Services -// account, the secret access key is accessible only during key and user creation. -// You must save the key (for example, in a text file) if you want to be able to -// access it again. If a secret key is lost, you can delete the access keys for the -// associated user and then create new keys. +// no associated users. +// +// For information about quotas on the number of keys you can create, see [IAM and STS quotas] in the +// IAM User Guide. +// +// To ensure the security of your Amazon Web Services account, the secret access +// key is accessible only during key and user creation. You must save the key (for +// example, in a text file) if you want to be able to access it again. If a secret +// key is lost, you can delete the access keys for the associated user and then +// create new keys. +// +// [IAM and STS quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html func (c *Client) CreateAccessKey(ctx context.Context, params *CreateAccessKeyInput, optFns ...func(*Options)) (*CreateAccessKeyOutput, error) { if params == nil { params = &CreateAccessKeyInput{} @@ -42,10 +50,13 @@ func (c *Client) CreateAccessKey(ctx context.Context, params *CreateAccessKeyInp type CreateAccessKeyInput struct { - // The name of the IAM user that the new key will belong to. This parameter allows - // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of - // characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the IAM user that the new key will belong to. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex UserName *string noSmithyDocumentSerde @@ -120,6 +131,12 @@ func (c *Client) addOperationCreateAccessKeyMiddlewares(stack *middleware.Stack, 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAccessKey(options.Region), middleware.Before); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccountAlias.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccountAlias.go index 9306a0cd8e..f36dd0f4ea 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccountAlias.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccountAlias.go @@ -11,9 +11,10 @@ import ( ) // Creates an alias for your Amazon Web Services account. For information about -// using an Amazon Web Services account alias, see Creating, deleting, and listing -// an Amazon Web Services account alias (https://docs.aws.amazon.com/signin/latest/userguide/CreateAccountAlias.html) -// in the Amazon Web Services Sign-In User Guide. +// using an Amazon Web Services account alias, see [Creating, deleting, and listing an Amazon Web Services account alias]in the Amazon Web Services +// Sign-In User Guide. +// +// [Creating, deleting, and listing an Amazon Web Services account alias]: https://docs.aws.amazon.com/signin/latest/userguide/CreateAccountAlias.html func (c *Client) CreateAccountAlias(ctx context.Context, params *CreateAccountAliasInput, optFns ...func(*Options)) (*CreateAccountAliasOutput, error) { if params == nil { params = &CreateAccountAliasInput{} @@ -31,9 +32,13 @@ func (c *Client) CreateAccountAlias(ctx context.Context, params *CreateAccountAl type CreateAccountAliasInput struct { - // The account alias to create. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of lowercase letters, digits, and dashes. - // You cannot start or finish with a dash, nor can you have two dashes in a row. + // The account alias to create. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of + // lowercase letters, digits, and dashes. You cannot start or finish with a dash, + // nor can you have two dashes in a row. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. AccountAlias *string @@ -103,6 +108,12 @@ func (c *Client) addOperationCreateAccountAliasMiddlewares(stack *middleware.Sta 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 = addOpCreateAccountAliasValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateGroup.go index 91c330e05b..d289c04225 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateGroup.go @@ -11,9 +11,12 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates a new group. For information about the number of groups you can create, -// see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM User Guide. +// Creates a new group. +// +// For information about the number of groups you can create, see [IAM and STS quotas] in the IAM User +// Guide. +// +// [IAM and STS quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html func (c *Client) CreateGroup(ctx context.Context, params *CreateGroupInput, optFns ...func(*Options)) (*CreateGroupOutput, error) { if params == nil { params = &CreateGroupInput{} @@ -31,21 +34,28 @@ func (c *Client) CreateGroup(ctx context.Context, params *CreateGroupInput, optF type CreateGroupInput struct { - // The name of the group to create. Do not include the path in this value. IAM - // user, group, role, and policy names must be unique within the account. Names are - // not distinguished by case. For example, you cannot create resources named both - // "MyResource" and "myresource". + // The name of the group to create. Do not include the path in this value. + // + // IAM user, group, role, and policy names must be unique within the account. + // Names are not distinguished by case. For example, you cannot create resources + // named both "MyResource" and "myresource". // // This member is required. GroupName *string - // The path to the group. For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. This parameter is optional. If it is not included, it - // defaults to a slash (/). This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of either a forward slash (/) by itself or a - // string that must begin and end with forward slashes. In addition, it can contain - // any ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), - // including most punctuation characters, digits, and upper and lowercased letters. + // The path to the group. For more information about paths, see [IAM identifiers] in the IAM User + // Guide. + // + // This parameter is optional. If it is not included, it defaults to a slash (/). + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of + // either a forward slash (/) by itself or a string that must begin and end with + // forward slashes. In addition, it can contain any ASCII character from the ! ( + // \u0021 ) through the DEL character ( \u007F ), including most punctuation + // characters, digits, and upper and lowercased letters. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html + // [regex pattern]: http://wikipedia.org/wiki/regex Path *string noSmithyDocumentSerde @@ -120,6 +130,12 @@ func (c *Client) addOperationCreateGroupMiddlewares(stack *middleware.Stack, opt 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 = addOpCreateGroupValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateInstanceProfile.go index dde7912f4a..c3b199c1da 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateInstanceProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateInstanceProfile.go @@ -11,12 +11,17 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates a new instance profile. For information about instance profiles, see -// Using roles for applications on Amazon EC2 (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html) -// in the IAM User Guide, and Instance profiles (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#ec2-instance-profile) -// in the Amazon EC2 User Guide. For information about the number of instance -// profiles you can create, see IAM object quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM User Guide. +// Creates a new instance profile. For information about instance profiles, see [Using roles for applications on Amazon EC2] +// +// in the IAM User Guide, and [Instance profiles]in the Amazon EC2 User Guide. +// +// For information about the number of instance profiles you can create, see [IAM object quotas] in +// the IAM User Guide. +// +// [Instance profiles]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#ec2-instance-profile +// [IAM object quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html +// +// [Using roles for applications on Amazon EC2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html func (c *Client) CreateInstanceProfile(ctx context.Context, params *CreateInstanceProfileInput, optFns ...func(*Options)) (*CreateInstanceProfileOutput, error) { if params == nil { params = &CreateInstanceProfileInput{} @@ -34,30 +39,40 @@ func (c *Client) CreateInstanceProfile(ctx context.Context, params *CreateInstan type CreateInstanceProfileInput struct { - // The name of the instance profile to create. This parameter allows (through its - // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters - // consisting of upper and lowercase alphanumeric characters with no spaces. You - // can also include any of the following characters: _+=,.@- + // The name of the instance profile to create. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. InstanceProfileName *string - // The path to the instance profile. For more information about paths, see IAM - // Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. This parameter is optional. If it is not included, it - // defaults to a slash (/). This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of either a forward slash (/) by itself or a - // string that must begin and end with forward slashes. In addition, it can contain - // any ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), - // including most punctuation characters, digits, and upper and lowercased letters. + // The path to the instance profile. For more information about paths, see [IAM Identifiers] in + // the IAM User Guide. + // + // This parameter is optional. If it is not included, it defaults to a slash (/). + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of + // either a forward slash (/) by itself or a string that must begin and end with + // forward slashes. In addition, it can contain any ASCII character from the ! ( + // \u0021 ) through the DEL character ( \u007F ), including most punctuation + // characters, digits, and upper and lowercased letters. + // + // [regex pattern]: http://wikipedia.org/wiki/regex + // [IAM Identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html Path *string // A list of tags that you want to attach to the newly created IAM instance // profile. Each tag consists of a key name and an associated value. For more - // information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. If any one of the tags is invalid or if you exceed the - // allowed maximum number of tags, then the entire request fails and the resource - // is not created. + // information about tagging, see [Tagging IAM resources]in the IAM User Guide. + // + // If any one of the tags is invalid or if you exceed the allowed maximum number + // of tags, then the entire request fails and the resource is not created. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []types.Tag noSmithyDocumentSerde @@ -132,6 +147,12 @@ func (c *Client) addOperationCreateInstanceProfileMiddlewares(stack *middleware. 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 = addOpCreateInstanceProfileValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateLoginProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateLoginProfile.go index 0e00a84da2..66dbdb0387 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateLoginProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateLoginProfile.go @@ -13,12 +13,16 @@ import ( // Creates a password for the specified IAM user. A password allows an IAM user to // access Amazon Web Services services through the Amazon Web Services Management -// Console. You can use the CLI, the Amazon Web Services API, or the Users page in -// the IAM console to create a password for any IAM user. Use ChangePassword to -// update your own existing password in the My Security Credentials page in the -// Amazon Web Services Management Console. For more information about managing -// passwords, see Managing passwords (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingLogins.html) -// in the IAM User Guide. +// Console. +// +// You can use the CLI, the Amazon Web Services API, or the Users page in the IAM +// console to create a password for any IAM user. Use ChangePasswordto update your own existing +// password in the My Security Credentials page in the Amazon Web Services +// Management Console. +// +// For more information about managing passwords, see [Managing passwords] in the IAM User Guide. +// +// [Managing passwords]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingLogins.html func (c *Client) CreateLoginProfile(ctx context.Context, params *CreateLoginProfileInput, optFns ...func(*Options)) (*CreateLoginProfileOutput, error) { if params == nil { params = &CreateLoginProfileInput{} @@ -36,24 +40,29 @@ func (c *Client) CreateLoginProfile(ctx context.Context, params *CreateLoginProf type CreateLoginProfileInput struct { - // The new password for the user. The regex pattern (http://wikipedia.org/wiki/regex) - // that is used to validate this parameter is a string of characters. That string - // can include almost any printable ASCII character from the space ( \u0020 ) - // through the end of the ASCII character range ( \u00FF ). You can also include + // The new password for the user. + // + // The [regex pattern] that is used to validate this parameter is a string of characters. That + // string can include almost any printable ASCII character from the space ( \u0020 + // ) through the end of the ASCII character range ( \u00FF ). You can also include // the tab ( \u0009 ), line feed ( \u000A ), and carriage return ( \u000D ) // characters. Any of these characters are valid in a password. However, many // tools, such as the Amazon Web Services Management Console, might restrict the // ability to type certain characters because they have special meaning within that // tool. // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // This member is required. Password *string // The name of the IAM user to create a password for. The user must already exist. - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -133,6 +142,12 @@ func (c *Client) addOperationCreateLoginProfileMiddlewares(stack *middleware.Sta 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 = addOpCreateLoginProfileValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateOpenIDConnectProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateOpenIDConnectProvider.go index d90f27fced..500f15b16f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateOpenIDConnectProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateOpenIDConnectProvider.go @@ -11,35 +11,44 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates an IAM entity to describe an identity provider (IdP) that supports -// OpenID Connect (OIDC) (http://openid.net/connect/) . The OIDC provider that you -// create with this operation can be used as a principal in a role's trust policy. -// Such a policy establishes a trust relationship between Amazon Web Services and -// the OIDC provider. If you are using an OIDC identity provider from Google, -// Facebook, or Amazon Cognito, you don't need to create a separate IAM identity -// provider. These OIDC identity providers are already built-in to Amazon Web -// Services and are available for your use. Instead, you can move directly to -// creating new roles using your identity provider. To learn more, see Creating a -// role for web identity or OpenID connect federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_oidc.html) -// in the IAM User Guide. When you create the IAM OIDC provider, you specify the -// following: +// Creates an IAM entity to describe an identity provider (IdP) that supports [OpenID Connect (OIDC)]. +// +// The OIDC provider that you create with this operation can be used as a +// principal in a role's trust policy. Such a policy establishes a trust +// relationship between Amazon Web Services and the OIDC provider. +// +// If you are using an OIDC identity provider from Google, Facebook, or Amazon +// Cognito, you don't need to create a separate IAM identity provider. These OIDC +// identity providers are already built-in to Amazon Web Services and are available +// for your use. Instead, you can move directly to creating new roles using your +// identity provider. To learn more, see [Creating a role for web identity or OpenID connect federation]in the IAM User Guide. +// +// When you create the IAM OIDC provider, you specify the following: +// // - The URL of the OIDC identity provider (IdP) to trust +// // - A list of client IDs (also known as audiences) that identify the // application or applications allowed to authenticate using the OIDC provider +// // - A list of tags that are attached to the specified IAM OIDC provider +// // - A list of thumbprints of one or more server certificates that the IdP uses // // You get all of this information from the OIDC IdP you want to use to access -// Amazon Web Services. Amazon Web Services secures communication with some OIDC -// identity providers (IdPs) through our library of trusted root certificate -// authorities (CAs) instead of using a certificate thumbprint to verify your IdP -// server certificate. In these cases, your legacy thumbprint remains in your -// configuration, but is no longer used for validation. These OIDC IdPs include -// Auth0, GitHub, GitLab, Google, and those that use an Amazon S3 bucket to host a -// JSON Web Key Set (JWKS) endpoint. The trust for the OIDC provider is derived -// from the IAM provider that this operation creates. Therefore, it is best to -// limit access to the CreateOpenIDConnectProvider operation to highly privileged -// users. +// Amazon Web Services. +// +// Amazon Web Services secures communication with OIDC identity providers (IdPs) +// using our library of trusted root certificate authorities (CAs) to verify the +// JSON Web Key Set (JWKS) endpoint's TLS certificate. If your OIDC IdP relies on a +// certificate that is not signed by one of these trusted CAs, only then we secure +// communication using the thumbprints set in the IdP's configuration. +// +// The trust for the OIDC provider is derived from the IAM provider that this +// operation creates. Therefore, it is best to limit access to the CreateOpenIDConnectProvideroperation to +// highly privileged users. +// +// [OpenID Connect (OIDC)]: http://openid.net/connect/ +// [Creating a role for web identity or OpenID connect federation]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_oidc.html func (c *Client) CreateOpenIDConnectProvider(ctx context.Context, params *CreateOpenIDConnectProviderInput, optFns ...func(*Options)) (*CreateOpenIDConnectProviderOutput, error) { if params == nil { params = &CreateOpenIDConnectProviderInput{} @@ -61,10 +70,12 @@ type CreateOpenIDConnectProviderInput struct { // correspond to the iss claim in the provider's OpenID Connect ID tokens. Per the // OIDC standard, path components are allowed but query parameters are not. // Typically the URL consists of only a hostname, like https://server.example.org - // or https://example.com . The URL should not contain a port number. You cannot - // register the same provider multiple times in a single Amazon Web Services - // account. If you try to submit a URL that has already been used for an OpenID - // Connect provider in the Amazon Web Services account, you will get an error. + // or https://example.com . The URL should not contain a port number. + // + // You cannot register the same provider multiple times in a single Amazon Web + // Services account. If you try to submit a URL that has already been used for an + // OpenID Connect provider in the Amazon Web Services account, you will get an + // error. // // This member is required. Url *string @@ -72,38 +83,50 @@ type CreateOpenIDConnectProviderInput struct { // Provides a list of client IDs, also known as audiences. When a mobile or web // app registers with an OpenID Connect provider, they establish a value that // identifies the application. This is the value that's sent as the client_id - // parameter on OAuth requests. You can register multiple client IDs with the same - // provider. For example, you might have multiple applications that use the same - // OIDC provider. You cannot register more than 100 client IDs with a single IAM - // OIDC provider. There is no defined format for a client ID. The + // parameter on OAuth requests. + // + // You can register multiple client IDs with the same provider. For example, you + // might have multiple applications that use the same OIDC provider. You cannot + // register more than 100 client IDs with a single IAM OIDC provider. + // + // There is no defined format for a client ID. The // CreateOpenIDConnectProviderRequest operation accepts client IDs up to 255 // characters long. ClientIDList []string // A list of tags that you want to attach to the new IAM OpenID Connect (OIDC) // provider. Each tag consists of a key name and an associated value. For more - // information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. If any one of the tags is invalid or if you exceed the - // allowed maximum number of tags, then the entire request fails and the resource - // is not created. + // information about tagging, see [Tagging IAM resources]in the IAM User Guide. + // + // If any one of the tags is invalid or if you exceed the allowed maximum number + // of tags, then the entire request fails and the resource is not created. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []types.Tag // A list of server certificate thumbprints for the OpenID Connect (OIDC) identity // provider's server certificates. Typically this list includes only one entry. // However, IAM lets you have up to five thumbprints for an OIDC provider. This // lets you maintain multiple thumbprints if the identity provider is rotating - // certificates. This parameter is optional. If it is not included, IAM will - // retrieve and use the top intermediate certificate authority (CA) thumbprint of - // the OpenID Connect identity provider server certificate. The server certificate - // thumbprint is the hex-encoded SHA-1 hash value of the X.509 certificate used by - // the domain where the OpenID Connect provider makes its keys available. It is - // always a 40-character string. For example, assume that the OIDC provider is - // server.example.com and the provider stores its keys at - // https://keys.server.example.com/openid-connect. In that case, the thumbprint - // string would be the hex-encoded SHA-1 hash value of the certificate used by - // https://keys.server.example.com. For more information about obtaining the OIDC - // provider thumbprint, see Obtaining the thumbprint for an OpenID Connect provider (https://docs.aws.amazon.com/IAM/latest/UserGuide/identity-providers-oidc-obtain-thumbprint.html) - // in the IAM user Guide. + // certificates. + // + // This parameter is optional. If it is not included, IAM will retrieve and use + // the top intermediate certificate authority (CA) thumbprint of the OpenID Connect + // identity provider server certificate. + // + // The server certificate thumbprint is the hex-encoded SHA-1 hash value of the + // X.509 certificate used by the domain where the OpenID Connect provider makes its + // keys available. It is always a 40-character string. + // + // For example, assume that the OIDC provider is server.example.com and the + // provider stores its keys at https://keys.server.example.com/openid-connect. In + // that case, the thumbprint string would be the hex-encoded SHA-1 hash value of + // the certificate used by https://keys.server.example.com. + // + // For more information about obtaining the OIDC provider thumbprint, see [Obtaining the thumbprint for an OpenID Connect provider] in the + // IAM user Guide. + // + // [Obtaining the thumbprint for an OpenID Connect provider]: https://docs.aws.amazon.com/IAM/latest/UserGuide/identity-providers-oidc-obtain-thumbprint.html ThumbprintList []string noSmithyDocumentSerde @@ -113,13 +136,14 @@ type CreateOpenIDConnectProviderInput struct { type CreateOpenIDConnectProviderOutput struct { // The Amazon Resource Name (ARN) of the new IAM OpenID Connect provider that is - // created. For more information, see OpenIDConnectProviderListEntry . + // created. For more information, see OpenIDConnectProviderListEntry. OpenIDConnectProviderArn *string // A list of tags that are attached to the new IAM OIDC provider. The returned - // list of tags is sorted by tag key. For more information about tagging, see - // Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. + // list of tags is sorted by tag key. For more information about tagging, see [Tagging IAM resources]in + // the IAM User Guide. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []types.Tag // Metadata pertaining to the operation's result. @@ -183,6 +207,12 @@ func (c *Client) addOperationCreateOpenIDConnectProviderMiddlewares(stack *middl 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 = addOpCreateOpenIDConnectProviderValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicy.go index 6aa86d5833..79962acdc8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicy.go @@ -11,15 +11,21 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates a new managed policy for your Amazon Web Services account. This -// operation creates a policy version with a version identifier of v1 and sets v1 -// as the policy's default version. For more information about policy versions, see -// Versioning for managed policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) -// in the IAM User Guide. As a best practice, you can validate your IAM policies. -// To learn more, see Validating IAM policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html) -// in the IAM User Guide. For more information about managed policies in general, -// see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. +// Creates a new managed policy for your Amazon Web Services account. +// +// This operation creates a policy version with a version identifier of v1 and +// sets v1 as the policy's default version. For more information about policy +// versions, see [Versioning for managed policies]in the IAM User Guide. +// +// As a best practice, you can validate your IAM policies. To learn more, see [Validating IAM policies] in +// the IAM User Guide. +// +// For more information about managed policies in general, see [Managed policies and inline policies] in the IAM User +// Guide. +// +// [Validating IAM policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html +// [Versioning for managed policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) CreatePolicy(ctx context.Context, params *CreatePolicyInput, optFns ...func(*Options)) (*CreatePolicyOutput, error) { if params == nil { params = &CreatePolicyInput{} @@ -37,58 +43,82 @@ func (c *Client) CreatePolicy(ctx context.Context, params *CreatePolicyInput, op type CreatePolicyInput struct { - // The JSON policy document that you want to use as the content for the new - // policy. You must provide policies in JSON format in IAM. However, for - // CloudFormation templates formatted in YAML, you can provide the policy in JSON - // or YAML format. CloudFormation always converts a YAML policy to JSON format - // before submitting it to IAM. The maximum length of the policy document that you - // can pass in this operation, including whitespace, is listed below. To view the - // maximum character counts of a managed policy with no whitespaces, see IAM and - // STS character quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length) - // . To learn more about JSON policy grammar, see Grammar of the IAM JSON policy - // language (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_grammar.html) - // in the IAM User Guide. The regex pattern (http://wikipedia.org/wiki/regex) used - // to validate this parameter is a string of characters consisting of the - // following: + // The JSON policy document that you want to use as the content for the new policy. + // + // You must provide policies in JSON format in IAM. However, for CloudFormation + // templates formatted in YAML, you can provide the policy in JSON or YAML format. + // CloudFormation always converts a YAML policy to JSON format before submitting it + // to IAM. + // + // The maximum length of the policy document that you can pass in this operation, + // including whitespace, is listed below. To view the maximum character counts of a + // managed policy with no whitespaces, see [IAM and STS character quotas]. + // + // To learn more about JSON policy grammar, see [Grammar of the IAM JSON policy language] in the IAM User Guide. + // + // The [regex pattern] used to validate this parameter is a string of characters consisting of + // the following: + // // - Any printable ASCII character ranging from the space character ( \u0020 ) // through the end of the ASCII character range + // // - The printable characters in the Basic Latin and Latin-1 Supplement // character set (through \u00FF ) + // // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage // return ( \u000D ) // + // [Grammar of the IAM JSON policy language]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_grammar.html + // [regex pattern]: http://wikipedia.org/wiki/regex + // [IAM and STS character quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length + // // This member is required. PolicyDocument *string - // The friendly name of the policy. IAM user, group, role, and policy names must - // be unique within the account. Names are not distinguished by case. For example, - // you cannot create resources named both "MyResource" and "myresource". + // The friendly name of the policy. + // + // IAM user, group, role, and policy names must be unique within the account. + // Names are not distinguished by case. For example, you cannot create resources + // named both "MyResource" and "myresource". // // This member is required. PolicyName *string - // A friendly description of the policy. Typically used to store information about - // the permissions defined in the policy. For example, "Grants access to production - // DynamoDB tables." The policy description is immutable. After a value is - // assigned, it cannot be changed. + // A friendly description of the policy. + // + // Typically used to store information about the permissions defined in the + // policy. For example, "Grants access to production DynamoDB tables." + // + // The policy description is immutable. After a value is assigned, it cannot be + // changed. Description *string - // The path for the policy. For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. This parameter is optional. If it is not included, it - // defaults to a slash (/). This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of either a forward slash (/) by itself or a - // string that must begin and end with forward slashes. In addition, it can contain - // any ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), - // including most punctuation characters, digits, and upper and lowercased letters. + // The path for the policy. + // + // For more information about paths, see [IAM identifiers] in the IAM User Guide. + // + // This parameter is optional. If it is not included, it defaults to a slash (/). + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of + // either a forward slash (/) by itself or a string that must begin and end with + // forward slashes. In addition, it can contain any ASCII character from the ! ( + // \u0021 ) through the DEL character ( \u007F ), including most punctuation + // characters, digits, and upper and lowercased letters. + // // You cannot use an asterisk (*) in the path name. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html + // [regex pattern]: http://wikipedia.org/wiki/regex Path *string // A list of tags that you want to attach to the new IAM customer managed policy. // Each tag consists of a key name and an associated value. For more information - // about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. If any one of the tags is invalid or if you exceed the - // allowed maximum number of tags, then the entire request fails and the resource - // is not created. + // about tagging, see [Tagging IAM resources]in the IAM User Guide. + // + // If any one of the tags is invalid or if you exceed the allowed maximum number + // of tags, then the entire request fails and the resource is not created. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []types.Tag noSmithyDocumentSerde @@ -161,6 +191,12 @@ func (c *Client) addOperationCreatePolicyMiddlewares(stack *middleware.Stack, op 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 = addOpCreatePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicyVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicyVersion.go index ac9ad2eb92..a4f8aafc46 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicyVersion.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicyVersion.go @@ -14,12 +14,15 @@ import ( // Creates a new version of the specified managed policy. To update a managed // policy, you create a new policy version. A managed policy can have up to five // versions. If the policy has five versions, you must delete an existing version -// using DeletePolicyVersion before you create a new version. Optionally, you can -// set the new version as the policy's default version. The default version is the -// version that is in effect for the IAM users, groups, and roles to which the -// policy is attached. For more information about managed policy versions, see -// Versioning for managed policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) -// in the IAM User Guide. +// using DeletePolicyVersionbefore you create a new version. +// +// Optionally, you can set the new version as the policy's default version. The +// default version is the version that is in effect for the IAM users, groups, and +// roles to which the policy is attached. +// +// For more information about managed policy versions, see [Versioning for managed policies] in the IAM User Guide. +// +// [Versioning for managed policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html func (c *Client) CreatePolicyVersion(ctx context.Context, params *CreatePolicyVersionInput, optFns ...func(*Options)) (*CreatePolicyVersionOutput, error) { if params == nil { params = &CreatePolicyVersionInput{} @@ -38,38 +41,55 @@ func (c *Client) CreatePolicyVersion(ctx context.Context, params *CreatePolicyVe type CreatePolicyVersionInput struct { // The Amazon Resource Name (ARN) of the IAM policy to which you want to add a new - // version. For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // version. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. PolicyArn *string // The JSON policy document that you want to use as the content for this new - // version of the policy. You must provide policies in JSON format in IAM. However, - // for CloudFormation templates formatted in YAML, you can provide the policy in - // JSON or YAML format. CloudFormation always converts a YAML policy to JSON format - // before submitting it to IAM. The maximum length of the policy document that you - // can pass in this operation, including whitespace, is listed below. To view the - // maximum character counts of a managed policy with no whitespaces, see IAM and - // STS character quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length) - // . The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: + // version of the policy. + // + // You must provide policies in JSON format in IAM. However, for CloudFormation + // templates formatted in YAML, you can provide the policy in JSON or YAML format. + // CloudFormation always converts a YAML policy to JSON format before submitting it + // to IAM. + // + // The maximum length of the policy document that you can pass in this operation, + // including whitespace, is listed below. To view the maximum character counts of a + // managed policy with no whitespaces, see [IAM and STS character quotas]. + // + // The [regex pattern] used to validate this parameter is a string of characters consisting of + // the following: + // // - Any printable ASCII character ranging from the space character ( \u0020 ) // through the end of the ASCII character range + // // - The printable characters in the Basic Latin and Latin-1 Supplement // character set (through \u00FF ) + // // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage // return ( \u000D ) // + // [regex pattern]: http://wikipedia.org/wiki/regex + // [IAM and STS character quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length + // // This member is required. PolicyDocument *string - // Specifies whether to set this version as the policy's default version. When - // this parameter is true , the new policy version becomes the operative version. - // That is, it becomes the version that is in effect for the IAM users, groups, and - // roles that the policy is attached to. For more information about managed policy - // versions, see Versioning for managed policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) - // in the IAM User Guide. + // Specifies whether to set this version as the policy's default version. + // + // When this parameter is true , the new policy version becomes the operative + // version. That is, it becomes the version that is in effect for the IAM users, + // groups, and roles that the policy is attached to. + // + // For more information about managed policy versions, see [Versioning for managed policies] in the IAM User Guide. + // + // [Versioning for managed policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html SetAsDefault bool noSmithyDocumentSerde @@ -142,6 +162,12 @@ func (c *Client) addOperationCreatePolicyVersionMiddlewares(stack *middleware.St 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 = addOpCreatePolicyVersionValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateRole.go index 3cf0102ca1..3105cd8755 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateRole.go @@ -11,11 +11,14 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates a new role for your Amazon Web Services account. For more information -// about roles, see IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) -// in the IAM User Guide. For information about quotas for role names and the -// number of roles you can create, see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM User Guide. +// Creates a new role for your Amazon Web Services account. +// +// For more information about roles, see [IAM roles] in the IAM User Guide. For information +// about quotas for role names and the number of roles you can create, see [IAM and STS quotas]in the +// IAM User Guide. +// +// [IAM and STS quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html +// [IAM roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html func (c *Client) CreateRole(ctx context.Context, params *CreateRoleInput, optFns ...func(*Options)) (*CreateRoleOutput, error) { if params == nil { params = &CreateRoleInput{} @@ -34,29 +37,43 @@ func (c *Client) CreateRole(ctx context.Context, params *CreateRoleInput, optFns type CreateRoleInput struct { // The trust relationship policy document that grants an entity permission to - // assume the role. In IAM, you must provide a JSON policy that has been converted - // to a string. However, for CloudFormation templates formatted in YAML, you can - // provide the policy in JSON or YAML format. CloudFormation always converts a YAML - // policy to JSON format before submitting it to IAM. The regex pattern (http://wikipedia.org/wiki/regex) - // used to validate this parameter is a string of characters consisting of the - // following: + // assume the role. + // + // In IAM, you must provide a JSON policy that has been converted to a string. + // However, for CloudFormation templates formatted in YAML, you can provide the + // policy in JSON or YAML format. CloudFormation always converts a YAML policy to + // JSON format before submitting it to IAM. + // + // The [regex pattern] used to validate this parameter is a string of characters consisting of + // the following: + // // - Any printable ASCII character ranging from the space character ( \u0020 ) // through the end of the ASCII character range + // // - The printable characters in the Basic Latin and Latin-1 Supplement // character set (through \u00FF ) + // // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage // return ( \u000D ) + // // Upon success, the response includes the same trust policy in JSON format. // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // This member is required. AssumeRolePolicyDocument *string - // The name of the role to create. IAM user, group, role, and policy names must be - // unique within the account. Names are not distinguished by case. For example, you - // cannot create resources named both "MyResource" and "myresource". This parameter - // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string - // of characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the role to create. + // + // IAM user, group, role, and policy names must be unique within the account. + // Names are not distinguished by case. For example, you cannot create resources + // named both "MyResource" and "myresource". + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -67,44 +84,59 @@ type CreateRoleInput struct { // The maximum session duration (in seconds) that you want to set for the // specified role. If you do not specify a value for this setting, the default // value of one hour is applied. This setting can have a value from 1 hour to 12 - // hours. Anyone who assumes the role from the CLI or API can use the - // DurationSeconds API parameter or the duration-seconds CLI parameter to request - // a longer session. The MaxSessionDuration setting determines the maximum - // duration that can be requested using the DurationSeconds parameter. If users - // don't specify a value for the DurationSeconds parameter, their security - // credentials are valid for one hour by default. This applies when you use the - // AssumeRole* API operations or the assume-role* CLI operations but does not - // apply when you use those operations to create a console URL. For more - // information, see Using IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html) - // in the IAM User Guide. + // hours. + // + // Anyone who assumes the role from the CLI or API can use the DurationSeconds API + // parameter or the duration-seconds CLI parameter to request a longer session. + // The MaxSessionDuration setting determines the maximum duration that can be + // requested using the DurationSeconds parameter. If users don't specify a value + // for the DurationSeconds parameter, their security credentials are valid for one + // hour by default. This applies when you use the AssumeRole* API operations or + // the assume-role* CLI operations but does not apply when you use those + // operations to create a console URL. For more information, see [Using IAM roles]in the IAM User + // Guide. + // + // [Using IAM roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html MaxSessionDuration *int32 - // The path to the role. For more information about paths, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. This parameter is optional. If it is not included, it - // defaults to a slash (/). This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of either a forward slash (/) by itself or a - // string that must begin and end with forward slashes. In addition, it can contain - // any ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), - // including most punctuation characters, digits, and upper and lowercased letters. + // The path to the role. For more information about paths, see [IAM Identifiers] in the IAM User + // Guide. + // + // This parameter is optional. If it is not included, it defaults to a slash (/). + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of + // either a forward slash (/) by itself or a string that must begin and end with + // forward slashes. In addition, it can contain any ASCII character from the ! ( + // \u0021 ) through the DEL character ( \u007F ), including most punctuation + // characters, digits, and upper and lowercased letters. + // + // [regex pattern]: http://wikipedia.org/wiki/regex + // [IAM Identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html Path *string // The ARN of the managed policy that is used to set the permissions boundary for - // the role. A permissions boundary policy defines the maximum permissions that + // the role. + // + // A permissions boundary policy defines the maximum permissions that // identity-based policies can grant to an entity, but does not grant permissions. // Permissions boundaries do not define the maximum permissions that a - // resource-based policy can grant to an entity. To learn more, see Permissions - // boundaries for IAM entities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. For more information about policy types, see Policy - // types (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types) - // in the IAM User Guide. + // resource-based policy can grant to an entity. To learn more, see [Permissions boundaries for IAM entities]in the IAM + // User Guide. + // + // For more information about policy types, see [Policy types] in the IAM User Guide. + // + // [Policy types]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types + // [Permissions boundaries for IAM entities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html PermissionsBoundary *string // A list of tags that you want to attach to the new role. Each tag consists of a - // key name and an associated value. For more information about tagging, see - // Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. If any one of the tags is invalid or if you exceed the - // allowed maximum number of tags, then the entire request fails and the resource - // is not created. + // key name and an associated value. For more information about tagging, see [Tagging IAM resources]in + // the IAM User Guide. + // + // If any one of the tags is invalid or if you exceed the allowed maximum number + // of tags, then the entire request fails and the resource is not created. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []types.Tag noSmithyDocumentSerde @@ -179,6 +211,12 @@ func (c *Client) addOperationCreateRoleMiddlewares(stack *middleware.Stack, opti 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 = addOpCreateRoleValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateSAMLProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateSAMLProvider.go index e2d1720cad..b807221a95 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateSAMLProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateSAMLProvider.go @@ -12,21 +12,28 @@ import ( ) // Creates an IAM resource that describes an identity provider (IdP) that supports -// SAML 2.0. The SAML provider resource that you create with this operation can be -// used as a principal in an IAM role's trust policy. Such a policy can enable -// federated users who sign in using the SAML IdP to assume the role. You can -// create an IAM role that supports Web-based single sign-on (SSO) to the Amazon -// Web Services Management Console or one that supports API access to Amazon Web -// Services. When you create the SAML provider resource, you upload a SAML metadata -// document that you get from your IdP. That document includes the issuer's name, -// expiration information, and keys that can be used to validate the SAML -// authentication response (assertions) that the IdP sends. You must generate the -// metadata document using the identity management software that is used as your -// organization's IdP. This operation requires Signature Version 4 (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html) -// . For more information, see Enabling SAML 2.0 federated users to access the -// Amazon Web Services Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-saml.html) -// and About SAML 2.0-based federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html) -// in the IAM User Guide. +// SAML 2.0. +// +// The SAML provider resource that you create with this operation can be used as a +// principal in an IAM role's trust policy. Such a policy can enable federated +// users who sign in using the SAML IdP to assume the role. You can create an IAM +// role that supports Web-based single sign-on (SSO) to the Amazon Web Services +// Management Console or one that supports API access to Amazon Web Services. +// +// When you create the SAML provider resource, you upload a SAML metadata document +// that you get from your IdP. That document includes the issuer's name, expiration +// information, and keys that can be used to validate the SAML authentication +// response (assertions) that the IdP sends. You must generate the metadata +// document using the identity management software that is used as your +// organization's IdP. +// +// This operation requires [Signature Version 4]. +// +// For more information, see [Enabling SAML 2.0 federated users to access the Amazon Web Services Management Console] and [About SAML 2.0-based federation] in the IAM User Guide. +// +// [Signature Version 4]: https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html +// [About SAML 2.0-based federation]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html +// [Enabling SAML 2.0 federated users to access the Amazon Web Services Management Console]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-saml.html func (c *Client) CreateSAMLProvider(ctx context.Context, params *CreateSAMLProviderInput, optFns ...func(*Options)) (*CreateSAMLProviderOutput, error) { if params == nil { params = &CreateSAMLProviderInput{} @@ -44,10 +51,13 @@ func (c *Client) CreateSAMLProvider(ctx context.Context, params *CreateSAMLProvi type CreateSAMLProviderInput struct { - // The name of the provider to create. This parameter allows (through its regex - // pattern (http://wikipedia.org/wiki/regex) ) a string of characters consisting of - // upper and lowercase alphanumeric characters with no spaces. You can also include - // any of the following characters: _+=,.@- + // The name of the provider to create. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. Name *string @@ -56,19 +66,23 @@ type CreateSAMLProviderInput struct { // The document includes the issuer's name, expiration information, and keys that // can be used to validate the SAML authentication response (assertions) that are // received from the IdP. You must generate the metadata document using the - // identity management software that is used as your organization's IdP. For more - // information, see About SAML 2.0-based federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html) - // in the IAM User Guide + // identity management software that is used as your organization's IdP. + // + // For more information, see [About SAML 2.0-based federation] in the IAM User Guide + // + // [About SAML 2.0-based federation]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html // // This member is required. SAMLMetadataDocument *string // A list of tags that you want to attach to the new IAM SAML provider. Each tag // consists of a key name and an associated value. For more information about - // tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. If any one of the tags is invalid or if you exceed the - // allowed maximum number of tags, then the entire request fails and the resource - // is not created. + // tagging, see [Tagging IAM resources]in the IAM User Guide. + // + // If any one of the tags is invalid or if you exceed the allowed maximum number + // of tags, then the entire request fails and the resource is not created. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []types.Tag noSmithyDocumentSerde @@ -81,9 +95,10 @@ type CreateSAMLProviderOutput struct { SAMLProviderArn *string // A list of tags that are attached to the new IAM SAML provider. The returned - // list of tags is sorted by tag key. For more information about tagging, see - // Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. + // list of tags is sorted by tag key. For more information about tagging, see [Tagging IAM resources]in + // the IAM User Guide. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []types.Tag // Metadata pertaining to the operation's result. @@ -147,6 +162,12 @@ func (c *Client) addOperationCreateSAMLProviderMiddlewares(stack *middleware.Sta 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 = addOpCreateSAMLProviderValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceLinkedRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceLinkedRole.go index 99cca53631..b3d3f15411 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceLinkedRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceLinkedRole.go @@ -17,10 +17,12 @@ import ( // deleted role, which could put your Amazon Web Services resources into an unknown // state. Allowing the service to control the role helps improve service stability // and proper cleanup when a service and its role are no longer needed. For more -// information, see Using service-linked roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html) -// in the IAM User Guide. To attach a policy to this service-linked role, you must -// make the request using the Amazon Web Services service that depends on this -// role. +// information, see [Using service-linked roles]in the IAM User Guide. +// +// To attach a policy to this service-linked role, you must make the request using +// the Amazon Web Services service that depends on this role. +// +// [Using service-linked roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html func (c *Client) CreateServiceLinkedRole(ctx context.Context, params *CreateServiceLinkedRoleInput, optFns ...func(*Options)) (*CreateServiceLinkedRoleOutput, error) { if params == nil { params = &CreateServiceLinkedRoleInput{} @@ -40,12 +42,14 @@ type CreateServiceLinkedRoleInput struct { // The service principal for the Amazon Web Services service to which this role is // attached. You use a string similar to a URL but without the http:// in front. - // For example: elasticbeanstalk.amazonaws.com . Service principals are unique and - // case-sensitive. To find the exact service principal for your service-linked - // role, see Amazon Web Services services that work with IAM (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html) - // in the IAM User Guide. Look for the services that have Yes in the Service-Linked - // Role column. Choose the Yes link to view the service-linked role documentation - // for that service. + // For example: elasticbeanstalk.amazonaws.com . + // + // Service principals are unique and case-sensitive. To find the exact service + // principal for your service-linked role, see [Amazon Web Services services that work with IAM]in the IAM User Guide. Look for the + // services that have Yes in the Service-Linked Role column. Choose the Yes link to + // view the service-linked role documentation for that service. + // + // [Amazon Web Services services that work with IAM]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html // // This member is required. AWSServiceName *string @@ -54,9 +58,11 @@ type CreateServiceLinkedRoleInput struct { // to form the complete role name. If you make multiple requests for the same // service, then you must supply a different CustomSuffix for each request. // Otherwise the request fails with a duplicate role name error. For example, you - // could add -1 or -debug to the suffix. Some services do not support the - // CustomSuffix parameter. If you provide an optional suffix and the operation - // fails, try the operation again without the suffix. + // could add -1 or -debug to the suffix. + // + // Some services do not support the CustomSuffix parameter. If you provide an + // optional suffix and the operation fails, try the operation again without the + // suffix. CustomSuffix *string // The description of the role. @@ -131,6 +137,12 @@ func (c *Client) addOperationCreateServiceLinkedRoleMiddlewares(stack *middlewar 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 = addOpCreateServiceLinkedRoleValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceSpecificCredential.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceSpecificCredential.go index 0b36b81f15..a5290f0ef8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceSpecificCredential.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceSpecificCredential.go @@ -13,14 +13,20 @@ import ( // Generates a set of credentials consisting of a user name and password that can // be used to access the service specified in the request. These credentials are -// generated by IAM, and can be used only for the specified service. You can have a -// maximum of two sets of service-specific credentials for each supported service -// per user. You can create service-specific credentials for CodeCommit and Amazon -// Keyspaces (for Apache Cassandra). You can reset the password to a new -// service-generated value by calling ResetServiceSpecificCredential . For more -// information about service-specific credentials, see Using IAM with CodeCommit: -// Git credentials, SSH keys, and Amazon Web Services access keys (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_ssh-keys.html) -// in the IAM User Guide. +// generated by IAM, and can be used only for the specified service. +// +// You can have a maximum of two sets of service-specific credentials for each +// supported service per user. +// +// You can create service-specific credentials for CodeCommit and Amazon Keyspaces +// (for Apache Cassandra). +// +// You can reset the password to a new service-generated value by calling ResetServiceSpecificCredential. +// +// For more information about service-specific credentials, see [Using IAM with CodeCommit: Git credentials, SSH keys, and Amazon Web Services access keys] in the IAM User +// Guide. +// +// [Using IAM with CodeCommit: Git credentials, SSH keys, and Amazon Web Services access keys]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_ssh-keys.html func (c *Client) CreateServiceSpecificCredential(ctx context.Context, params *CreateServiceSpecificCredentialInput, optFns ...func(*Options)) (*CreateServiceSpecificCredentialOutput, error) { if params == nil { params = &CreateServiceSpecificCredentialInput{} @@ -47,10 +53,13 @@ type CreateServiceSpecificCredentialInput struct { // The name of the IAM user that is to be associated with the credentials. The new // service-specific credentials have the same permissions as the associated user - // except that they can be used only to access the specified service. This - // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- + // except that they can be used only to access the specified service. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -61,9 +70,10 @@ type CreateServiceSpecificCredentialInput struct { type CreateServiceSpecificCredentialOutput struct { // A structure that contains information about the newly created service-specific - // credential. This is the only time that the password for this credential set is - // available. It cannot be recovered later. Instead, you must reset the password - // with ResetServiceSpecificCredential . + // credential. + // + // This is the only time that the password for this credential set is available. + // It cannot be recovered later. Instead, you must reset the password with ResetServiceSpecificCredential. ServiceSpecificCredential *types.ServiceSpecificCredential // Metadata pertaining to the operation's result. @@ -127,6 +137,12 @@ func (c *Client) addOperationCreateServiceSpecificCredentialMiddlewares(stack *m 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 = addOpCreateServiceSpecificCredentialValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateUser.go index 6b8c403339..8c40fb899f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateUser.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateUser.go @@ -11,9 +11,12 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates a new IAM user for your Amazon Web Services account. For information -// about quotas for the number of IAM users you can create, see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) +// Creates a new IAM user for your Amazon Web Services account. +// +// For information about quotas for the number of IAM users you can create, see [IAM and STS quotas] // in the IAM User Guide. +// +// [IAM and STS quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html func (c *Client) CreateUser(ctx context.Context, params *CreateUserInput, optFns ...func(*Options)) (*CreateUserOutput, error) { if params == nil { params = &CreateUserInput{} @@ -31,40 +34,53 @@ func (c *Client) CreateUser(ctx context.Context, params *CreateUserInput, optFns type CreateUserInput struct { - // The name of the user to create. IAM user, group, role, and policy names must be - // unique within the account. Names are not distinguished by case. For example, you - // cannot create resources named both "MyResource" and "myresource". + // The name of the user to create. + // + // IAM user, group, role, and policy names must be unique within the account. + // Names are not distinguished by case. For example, you cannot create resources + // named both "MyResource" and "myresource". // // This member is required. UserName *string - // The path for the user name. For more information about paths, see IAM - // identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. This parameter is optional. If it is not included, it - // defaults to a slash (/). This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of either a forward slash (/) by itself or a - // string that must begin and end with forward slashes. In addition, it can contain - // any ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), - // including most punctuation characters, digits, and upper and lowercased letters. + // The path for the user name. For more information about paths, see [IAM identifiers] in the IAM + // User Guide. + // + // This parameter is optional. If it is not included, it defaults to a slash (/). + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of + // either a forward slash (/) by itself or a string that must begin and end with + // forward slashes. In addition, it can contain any ASCII character from the ! ( + // \u0021 ) through the DEL character ( \u007F ), including most punctuation + // characters, digits, and upper and lowercased letters. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html + // [regex pattern]: http://wikipedia.org/wiki/regex Path *string // The ARN of the managed policy that is used to set the permissions boundary for - // the user. A permissions boundary policy defines the maximum permissions that + // the user. + // + // A permissions boundary policy defines the maximum permissions that // identity-based policies can grant to an entity, but does not grant permissions. // Permissions boundaries do not define the maximum permissions that a - // resource-based policy can grant to an entity. To learn more, see Permissions - // boundaries for IAM entities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. For more information about policy types, see Policy - // types (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types) - // in the IAM User Guide. + // resource-based policy can grant to an entity. To learn more, see [Permissions boundaries for IAM entities]in the IAM + // User Guide. + // + // For more information about policy types, see [Policy types] in the IAM User Guide. + // + // [Policy types]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types + // [Permissions boundaries for IAM entities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html PermissionsBoundary *string // A list of tags that you want to attach to the new user. Each tag consists of a - // key name and an associated value. For more information about tagging, see - // Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. If any one of the tags is invalid or if you exceed the - // allowed maximum number of tags, then the entire request fails and the resource - // is not created. + // key name and an associated value. For more information about tagging, see [Tagging IAM resources]in + // the IAM User Guide. + // + // If any one of the tags is invalid or if you exceed the allowed maximum number + // of tags, then the entire request fails and the resource is not created. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []types.Tag noSmithyDocumentSerde @@ -137,6 +153,12 @@ func (c *Client) addOperationCreateUserMiddlewares(stack *middleware.Stack, opti 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 = addOpCreateUserValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateVirtualMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateVirtualMFADevice.go index 6d8e0d6867..512e34d74b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateVirtualMFADevice.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateVirtualMFADevice.go @@ -12,16 +12,21 @@ import ( ) // Creates a new virtual MFA device for the Amazon Web Services account. After -// creating the virtual MFA, use EnableMFADevice to attach the MFA device to an -// IAM user. For more information about creating and working with virtual MFA -// devices, see Using a virtual MFA device (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html) -// in the IAM User Guide. For information about the maximum number of MFA devices -// you can create, see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM User Guide. The seed information contained in the QR code and the -// Base32 string should be treated like any other secret access information. In -// other words, protect the seed information as you would your Amazon Web Services -// access keys or your passwords. After you provision your virtual device, you -// should ensure that the information is destroyed following secure procedures. +// creating the virtual MFA, use EnableMFADeviceto attach the MFA device to an IAM user. For more +// information about creating and working with virtual MFA devices, see [Using a virtual MFA device]in the IAM +// User Guide. +// +// For information about the maximum number of MFA devices you can create, see [IAM and STS quotas] in +// the IAM User Guide. +// +// The seed information contained in the QR code and the Base32 string should be +// treated like any other secret access information. In other words, protect the +// seed information as you would your Amazon Web Services access keys or your +// passwords. After you provision your virtual device, you should ensure that the +// information is destroyed following secure procedures. +// +// [Using a virtual MFA device]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html +// [IAM and STS quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html func (c *Client) CreateVirtualMFADevice(ctx context.Context, params *CreateVirtualMFADeviceInput, optFns ...func(*Options)) (*CreateVirtualMFADeviceOutput, error) { if params == nil { params = &CreateVirtualMFADeviceInput{} @@ -40,30 +45,40 @@ func (c *Client) CreateVirtualMFADevice(ctx context.Context, params *CreateVirtu type CreateVirtualMFADeviceInput struct { // The name of the virtual MFA device, which must be unique. Use with path to - // uniquely identify a virtual MFA device. This parameter allows (through its - // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters - // consisting of upper and lowercase alphanumeric characters with no spaces. You - // can also include any of the following characters: _+=,.@- + // uniquely identify a virtual MFA device. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. VirtualMFADeviceName *string - // The path for the virtual MFA device. For more information about paths, see IAM - // identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. This parameter is optional. If it is not included, it - // defaults to a slash (/). This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of either a forward slash (/) by itself or a - // string that must begin and end with forward slashes. In addition, it can contain - // any ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), - // including most punctuation characters, digits, and upper and lowercased letters. + // The path for the virtual MFA device. For more information about paths, see [IAM identifiers] in + // the IAM User Guide. + // + // This parameter is optional. If it is not included, it defaults to a slash (/). + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of + // either a forward slash (/) by itself or a string that must begin and end with + // forward slashes. In addition, it can contain any ASCII character from the ! ( + // \u0021 ) through the DEL character ( \u007F ), including most punctuation + // characters, digits, and upper and lowercased letters. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html + // [regex pattern]: http://wikipedia.org/wiki/regex Path *string // A list of tags that you want to attach to the new IAM virtual MFA device. Each // tag consists of a key name and an associated value. For more information about - // tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. If any one of the tags is invalid or if you exceed the - // allowed maximum number of tags, then the entire request fails and the resource - // is not created. + // tagging, see [Tagging IAM resources]in the IAM User Guide. + // + // If any one of the tags is invalid or if you exceed the allowed maximum number + // of tags, then the entire request fails and the resource is not created. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []types.Tag noSmithyDocumentSerde @@ -138,6 +153,12 @@ func (c *Client) addOperationCreateVirtualMFADeviceMiddlewares(stack *middleware 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 = addOpCreateVirtualMFADeviceValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeactivateMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeactivateMFADevice.go index be155c45d0..390dc81e57 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeactivateMFADevice.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeactivateMFADevice.go @@ -11,10 +11,12 @@ import ( ) // Deactivates the specified MFA device and removes it from association with the -// user name for which it was originally enabled. For more information about -// creating and working with virtual MFA devices, see Enabling a virtual -// multi-factor authentication (MFA) device (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html) +// user name for which it was originally enabled. +// +// For more information about creating and working with virtual MFA devices, see [Enabling a virtual multi-factor authentication (MFA) device] // in the IAM User Guide. +// +// [Enabling a virtual multi-factor authentication (MFA) device]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html func (c *Client) DeactivateMFADevice(ctx context.Context, params *DeactivateMFADeviceInput, optFns ...func(*Options)) (*DeactivateMFADeviceOutput, error) { if params == nil { params = &DeactivateMFADeviceInput{} @@ -33,18 +35,24 @@ func (c *Client) DeactivateMFADevice(ctx context.Context, params *DeactivateMFAD type DeactivateMFADeviceInput struct { // The serial number that uniquely identifies the MFA device. For virtual MFA - // devices, the serial number is the device ARN. This parameter allows (through its - // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters - // consisting of upper and lowercase alphanumeric characters with no spaces. You - // can also include any of the following characters: =,.@:/- + // devices, the serial number is the device ARN. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: =,.@:/- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. SerialNumber *string - // The name of the user whose MFA device you want to deactivate. This parameter - // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string - // of characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the user whose MFA device you want to deactivate. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -114,6 +122,12 @@ func (c *Client) addOperationDeactivateMFADeviceMiddlewares(stack *middleware.St 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 = addOpDeactivateMFADeviceValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccessKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccessKey.go index 600a677605..0441f5be7c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccessKey.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccessKey.go @@ -10,12 +10,14 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes the access key pair associated with the specified IAM user. If you do -// not specify a user name, IAM determines the user name implicitly based on the -// Amazon Web Services access key ID signing the request. This operation works for -// access keys under the Amazon Web Services account. Consequently, you can use -// this operation to manage Amazon Web Services account root user credentials even -// if the Amazon Web Services account has no associated users. +// Deletes the access key pair associated with the specified IAM user. +// +// If you do not specify a user name, IAM determines the user name implicitly +// based on the Amazon Web Services access key ID signing the request. This +// operation works for access keys under the Amazon Web Services account. +// Consequently, you can use this operation to manage Amazon Web Services account +// root user credentials even if the Amazon Web Services account has no associated +// users. func (c *Client) DeleteAccessKey(ctx context.Context, params *DeleteAccessKeyInput, optFns ...func(*Options)) (*DeleteAccessKeyOutput, error) { if params == nil { params = &DeleteAccessKeyInput{} @@ -34,17 +36,23 @@ func (c *Client) DeleteAccessKey(ctx context.Context, params *DeleteAccessKeyInp type DeleteAccessKeyInput struct { // The access key ID for the access key ID and secret access key you want to - // delete. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters that can consist of any upper or lowercased letter or - // digit. + // delete. + // + // This parameter allows (through its [regex pattern]) a string of characters that can consist of + // any upper or lowercased letter or digit. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. AccessKeyId *string - // The name of the user whose access key pair you want to delete. This parameter - // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string - // of characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the user whose access key pair you want to delete. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex UserName *string noSmithyDocumentSerde @@ -112,6 +120,12 @@ func (c *Client) addOperationDeleteAccessKeyMiddlewares(stack *middleware.Stack, 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 = addOpDeleteAccessKeyValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountAlias.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountAlias.go index 0424523ca9..d84bc422b5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountAlias.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountAlias.go @@ -10,10 +10,12 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes the specified Amazon Web Services account alias. For information about -// using an Amazon Web Services account alias, see Creating, deleting, and listing -// an Amazon Web Services account alias (https://docs.aws.amazon.com/signin/latest/userguide/CreateAccountAlias.html) -// in the Amazon Web Services Sign-In User Guide. +// Deletes the specified Amazon Web Services account alias. For information about +// +// using an Amazon Web Services account alias, see [Creating, deleting, and listing an Amazon Web Services account alias]in the Amazon Web Services +// Sign-In User Guide. +// +// [Creating, deleting, and listing an Amazon Web Services account alias]: https://docs.aws.amazon.com/signin/latest/userguide/CreateAccountAlias.html func (c *Client) DeleteAccountAlias(ctx context.Context, params *DeleteAccountAliasInput, optFns ...func(*Options)) (*DeleteAccountAliasOutput, error) { if params == nil { params = &DeleteAccountAliasInput{} @@ -31,10 +33,13 @@ func (c *Client) DeleteAccountAlias(ctx context.Context, params *DeleteAccountAl type DeleteAccountAliasInput struct { - // The name of the account alias to delete. This parameter allows (through its - // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters - // consisting of lowercase letters, digits, and dashes. You cannot start or finish - // with a dash, nor can you have two dashes in a row. + // The name of the account alias to delete. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of + // lowercase letters, digits, and dashes. You cannot start or finish with a dash, + // nor can you have two dashes in a row. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. AccountAlias *string @@ -104,6 +109,12 @@ func (c *Client) addOperationDeleteAccountAliasMiddlewares(stack *middleware.Sta 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 = addOpDeleteAccountAliasValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountPasswordPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountPasswordPolicy.go index a9edc762dd..3095a5acea 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountPasswordPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountPasswordPolicy.go @@ -93,6 +93,12 @@ func (c *Client) addOperationDeleteAccountPasswordPolicyMiddlewares(stack *middl 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAccountPasswordPolicy(options.Region), middleware.Before); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroup.go index c23bd792bd..a1dde6d64c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroup.go @@ -29,10 +29,13 @@ func (c *Client) DeleteGroup(ctx context.Context, params *DeleteGroupInput, optF type DeleteGroupInput struct { - // The name of the IAM group to delete. This parameter allows (through its regex - // pattern (http://wikipedia.org/wiki/regex) ) a string of characters consisting of - // upper and lowercase alphanumeric characters with no spaces. You can also include - // any of the following characters: _+=,.@- + // The name of the IAM group to delete. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. GroupName *string @@ -102,6 +105,12 @@ func (c *Client) addOperationDeleteGroupMiddlewares(stack *middleware.Stack, opt 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 = addOpDeleteGroupValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroupPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroupPolicy.go index cc3afbcc54..746693c40b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroupPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroupPolicy.go @@ -10,11 +10,13 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes the specified inline policy that is embedded in the specified IAM -// group. A group can also have managed policies attached to it. To detach a -// managed policy from a group, use DetachGroupPolicy . For more information about -// policies, refer to Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. +// Deletes the specified inline policy that is embedded in the specified IAM group. +// +// A group can also have managed policies attached to it. To detach a managed +// policy from a group, use DetachGroupPolicy. For more information about policies, refer to [Managed policies and inline policies] in +// the IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) DeleteGroupPolicy(ctx context.Context, params *DeleteGroupPolicyInput, optFns ...func(*Options)) (*DeleteGroupPolicyOutput, error) { if params == nil { params = &DeleteGroupPolicyInput{} @@ -33,18 +35,24 @@ func (c *Client) DeleteGroupPolicy(ctx context.Context, params *DeleteGroupPolic type DeleteGroupPolicyInput struct { // The name (friendly name, not ARN) identifying the group that the policy is - // embedded in. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // embedded in. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. GroupName *string - // The name identifying the policy document to delete. This parameter allows - // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of - // characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name identifying the policy document to delete. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. PolicyName *string @@ -114,6 +122,12 @@ func (c *Client) addOperationDeleteGroupPolicyMiddlewares(stack *middleware.Stac 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 = addOpDeleteGroupPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteInstanceProfile.go index 732a2a0a58..fc18e6b9d4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteInstanceProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteInstanceProfile.go @@ -11,12 +11,16 @@ import ( ) // Deletes the specified instance profile. The instance profile must not have an -// associated role. Make sure that you do not have any Amazon EC2 instances running -// with the instance profile you are about to delete. Deleting a role or instance -// profile that is associated with a running instance will break any applications -// running on the instance. For more information about instance profiles, see -// Using instance profiles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) -// in the IAM User Guide. +// associated role. +// +// Make sure that you do not have any Amazon EC2 instances running with the +// instance profile you are about to delete. Deleting a role or instance profile +// that is associated with a running instance will break any applications running +// on the instance. +// +// For more information about instance profiles, see [Using instance profiles] in the IAM User Guide. +// +// [Using instance profiles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html func (c *Client) DeleteInstanceProfile(ctx context.Context, params *DeleteInstanceProfileInput, optFns ...func(*Options)) (*DeleteInstanceProfileOutput, error) { if params == nil { params = &DeleteInstanceProfileInput{} @@ -34,10 +38,13 @@ func (c *Client) DeleteInstanceProfile(ctx context.Context, params *DeleteInstan type DeleteInstanceProfileInput struct { - // The name of the instance profile to delete. This parameter allows (through its - // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters - // consisting of upper and lowercase alphanumeric characters with no spaces. You - // can also include any of the following characters: _+=,.@- + // The name of the instance profile to delete. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. InstanceProfileName *string @@ -107,6 +114,12 @@ func (c *Client) addOperationDeleteInstanceProfileMiddlewares(stack *middleware. 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 = addOpDeleteInstanceProfileValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteLoginProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteLoginProfile.go index fac350f819..d1061e5889 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteLoginProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteLoginProfile.go @@ -10,16 +10,19 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes the password for the specified IAM user, For more information, see -// Managing passwords for IAM users (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_passwords_admin-change-user.html) -// . You can use the CLI, the Amazon Web Services API, or the Users page in the IAM -// console to delete a password for any IAM user. You can use ChangePassword to -// update, but not delete, your own password in the My Security Credentials page in -// the Amazon Web Services Management Console. Deleting a user's password does not -// prevent a user from accessing Amazon Web Services through the command line -// interface or the API. To prevent all user access, you must also either make any -// access keys inactive or delete them. For more information about making keys -// inactive or deleting them, see UpdateAccessKey and DeleteAccessKey . +// Deletes the password for the specified IAM user, For more information, see [Managing passwords for IAM users]. +// +// You can use the CLI, the Amazon Web Services API, or the Users page in the IAM +// console to delete a password for any IAM user. You can use ChangePasswordto update, but not +// delete, your own password in the My Security Credentials page in the Amazon Web +// Services Management Console. +// +// Deleting a user's password does not prevent a user from accessing Amazon Web +// Services through the command line interface or the API. To prevent all user +// access, you must also either make any access keys inactive or delete them. For +// more information about making keys inactive or deleting them, see UpdateAccessKeyand DeleteAccessKey. +// +// [Managing passwords for IAM users]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_passwords_admin-change-user.html func (c *Client) DeleteLoginProfile(ctx context.Context, params *DeleteLoginProfileInput, optFns ...func(*Options)) (*DeleteLoginProfileOutput, error) { if params == nil { params = &DeleteLoginProfileInput{} @@ -37,10 +40,13 @@ func (c *Client) DeleteLoginProfile(ctx context.Context, params *DeleteLoginProf type DeleteLoginProfileInput struct { - // The name of the user whose password you want to delete. This parameter allows - // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of - // characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the user whose password you want to delete. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -110,6 +116,12 @@ func (c *Client) addOperationDeleteLoginProfileMiddlewares(stack *middleware.Sta 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 = addOpDeleteLoginProfileValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteOpenIDConnectProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteOpenIDConnectProvider.go index 37df78331d..38c6dc8c7c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteOpenIDConnectProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteOpenIDConnectProvider.go @@ -11,11 +11,13 @@ import ( ) // Deletes an OpenID Connect identity provider (IdP) resource object in IAM. +// // Deleting an IAM OIDC provider resource does not update any roles that reference // the provider as a principal in their trust policies. Any attempt to assume a -// role that references a deleted provider fails. This operation is idempotent; it -// does not fail or return an error if you call the operation for a provider that -// does not exist. +// role that references a deleted provider fails. +// +// This operation is idempotent; it does not fail or return an error if you call +// the operation for a provider that does not exist. func (c *Client) DeleteOpenIDConnectProvider(ctx context.Context, params *DeleteOpenIDConnectProviderInput, optFns ...func(*Options)) (*DeleteOpenIDConnectProviderOutput, error) { if params == nil { params = &DeleteOpenIDConnectProviderInput{} @@ -35,7 +37,7 @@ type DeleteOpenIDConnectProviderInput struct { // The Amazon Resource Name (ARN) of the IAM OpenID Connect provider resource // object to delete. You can get a list of OpenID Connect provider resource ARNs by - // using the ListOpenIDConnectProviders operation. + // using the ListOpenIDConnectProvidersoperation. // // This member is required. OpenIDConnectProviderArn *string @@ -105,6 +107,12 @@ func (c *Client) addOperationDeleteOpenIDConnectProviderMiddlewares(stack *middl 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 = addOpDeleteOpenIDConnectProviderValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicy.go index 3f6e743979..4a9cf7fc33 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicy.go @@ -10,23 +10,28 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes the specified managed policy. Before you can delete a managed policy, -// you must first detach the policy from all users, groups, and roles that it is -// attached to. In addition, you must delete all the policy's versions. The -// following steps describe the process for deleting a managed policy: +// Deletes the specified managed policy. +// +// Before you can delete a managed policy, you must first detach the policy from +// all users, groups, and roles that it is attached to. In addition, you must +// delete all the policy's versions. The following steps describe the process for +// deleting a managed policy: +// // - Detach the policy from all users, groups, and roles that the policy is -// attached to, using DetachUserPolicy , DetachGroupPolicy , or DetachRolePolicy -// . To list all the users, groups, and roles that a policy is attached to, use -// ListEntitiesForPolicy . -// - Delete all versions of the policy using DeletePolicyVersion . To list the -// policy's versions, use ListPolicyVersions . You cannot use DeletePolicyVersion -// to delete the version that is marked as the default version. You delete the -// policy's default version in the next step of the process. +// attached to, using DetachUserPolicy, DetachGroupPolicy, or DetachRolePolicy. To list all the users, groups, and roles that a +// policy is attached to, use ListEntitiesForPolicy. +// +// - Delete all versions of the policy using DeletePolicyVersion. To list the policy's versions, +// use ListPolicyVersions. You cannot use DeletePolicyVersionto delete the version that is marked as the default +// version. You delete the policy's default version in the next step of the +// process. +// // - Delete the policy (this automatically deletes the policy's default version) // using this operation. // -// For information about managed policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. +// For information about managed policies, see [Managed policies and inline policies] in the IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) DeletePolicy(ctx context.Context, params *DeletePolicyInput, optFns ...func(*Options)) (*DeletePolicyOutput, error) { if params == nil { params = &DeletePolicyInput{} @@ -44,9 +49,12 @@ func (c *Client) DeletePolicy(ctx context.Context, params *DeletePolicyInput, op type DeletePolicyInput struct { - // The Amazon Resource Name (ARN) of the IAM policy you want to delete. For more - // information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // The Amazon Resource Name (ARN) of the IAM policy you want to delete. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. PolicyArn *string @@ -116,6 +124,12 @@ func (c *Client) addOperationDeletePolicyMiddlewares(stack *middleware.Stack, op 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 = addOpDeletePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicyVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicyVersion.go index b470dc39be..a136ef86d6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicyVersion.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicyVersion.go @@ -10,13 +10,15 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes the specified version from the specified managed policy. You cannot -// delete the default version from a policy using this operation. To delete the -// default version from a policy, use DeletePolicy . To find out which version of a -// policy is marked as the default version, use ListPolicyVersions . For -// information about versions for managed policies, see Versioning for managed -// policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) -// in the IAM User Guide. +// Deletes the specified version from the specified managed policy. +// +// You cannot delete the default version from a policy using this operation. To +// delete the default version from a policy, use DeletePolicy. To find out which version of a +// policy is marked as the default version, use ListPolicyVersions. +// +// For information about versions for managed policies, see [Versioning for managed policies] in the IAM User Guide. +// +// [Versioning for managed policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html func (c *Client) DeletePolicyVersion(ctx context.Context, params *DeletePolicyVersionInput, optFns ...func(*Options)) (*DeletePolicyVersionOutput, error) { if params == nil { params = &DeletePolicyVersionInput{} @@ -35,18 +37,26 @@ func (c *Client) DeletePolicyVersion(ctx context.Context, params *DeletePolicyVe type DeletePolicyVersionInput struct { // The Amazon Resource Name (ARN) of the IAM policy from which you want to delete - // a version. For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // a version. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. PolicyArn *string - // The policy version to delete. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters that consists of the lowercase letter 'v' followed by - // one or two digits, and optionally followed by a period '.' and a string of - // letters and digits. For more information about managed policy versions, see - // Versioning for managed policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) - // in the IAM User Guide. + // The policy version to delete. + // + // This parameter allows (through its [regex pattern]) a string of characters that consists of + // the lowercase letter 'v' followed by one or two digits, and optionally followed + // by a period '.' and a string of letters and digits. + // + // For more information about managed policy versions, see [Versioning for managed policies] in the IAM User Guide. + // + // [regex pattern]: http://wikipedia.org/wiki/regex + // [Versioning for managed policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html // // This member is required. VersionId *string @@ -116,6 +126,12 @@ func (c *Client) addOperationDeletePolicyVersionMiddlewares(stack *middleware.St 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 = addOpDeletePolicyVersionValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRole.go index 67989ef86d..cae15f3c08 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRole.go @@ -12,18 +12,23 @@ import ( // Deletes the specified role. Unlike the Amazon Web Services Management Console, // when you delete a role programmatically, you must delete the items attached to -// the role manually, or the deletion fails. For more information, see Deleting an -// IAM role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_manage_delete.html#roles-managingrole-deleting-cli) -// . Before attempting to delete a role, remove the following attached items: -// - Inline policies ( DeleteRolePolicy ) -// - Attached managed policies ( DetachRolePolicy ) -// - Instance profile ( RemoveRoleFromInstanceProfile ) +// the role manually, or the deletion fails. For more information, see [Deleting an IAM role]. Before +// attempting to delete a role, remove the following attached items: +// +// - Inline policies (DeleteRolePolicy ) +// +// - Attached managed policies (DetachRolePolicy ) +// +// - Instance profile (RemoveRoleFromInstanceProfile ) +// // - Optional – Delete instance profile after detaching from role for resource -// clean up ( DeleteInstanceProfile ) +// clean up (DeleteInstanceProfile ) // // Make sure that you do not have any Amazon EC2 instances running with the role // you are about to delete. Deleting a role or instance profile that is associated // with a running instance will break any applications running on the instance. +// +// [Deleting an IAM role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_manage_delete.html#roles-managingrole-deleting-cli func (c *Client) DeleteRole(ctx context.Context, params *DeleteRoleInput, optFns ...func(*Options)) (*DeleteRoleOutput, error) { if params == nil { params = &DeleteRoleInput{} @@ -41,10 +46,13 @@ func (c *Client) DeleteRole(ctx context.Context, params *DeleteRoleInput, optFns type DeleteRoleInput struct { - // The name of the role to delete. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // The name of the role to delete. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -114,6 +122,12 @@ func (c *Client) addOperationDeleteRoleMiddlewares(stack *middleware.Stack, opti 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 = addOpDeleteRoleValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePermissionsBoundary.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePermissionsBoundary.go index 425bcfd335..7f172b1ca2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePermissionsBoundary.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePermissionsBoundary.go @@ -10,10 +10,13 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes the permissions boundary for the specified IAM role. You cannot set the -// boundary for a service-linked role. Deleting the permissions boundary for a role -// might increase its permissions. For example, it might allow anyone who assumes -// the role to perform all the actions granted in its permissions policies. +// Deletes the permissions boundary for the specified IAM role. +// +// You cannot set the boundary for a service-linked role. +// +// Deleting the permissions boundary for a role might increase its permissions. +// For example, it might allow anyone who assumes the role to perform all the +// actions granted in its permissions policies. func (c *Client) DeleteRolePermissionsBoundary(ctx context.Context, params *DeleteRolePermissionsBoundaryInput, optFns ...func(*Options)) (*DeleteRolePermissionsBoundaryOutput, error) { if params == nil { params = &DeleteRolePermissionsBoundaryInput{} @@ -102,6 +105,12 @@ func (c *Client) addOperationDeleteRolePermissionsBoundaryMiddlewares(stack *mid 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 = addOpDeleteRolePermissionsBoundaryValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePolicy.go index 41cc1bc772..85fdf9e1e4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePolicy.go @@ -11,10 +11,12 @@ import ( ) // Deletes the specified inline policy that is embedded in the specified IAM role. -// A role can also have managed policies attached to it. To detach a managed policy -// from a role, use DetachRolePolicy . For more information about policies, refer -// to Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. +// +// A role can also have managed policies attached to it. To detach a managed +// policy from a role, use DetachRolePolicy. For more information about policies, refer to [Managed policies and inline policies] in the +// IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) DeleteRolePolicy(ctx context.Context, params *DeleteRolePolicyInput, optFns ...func(*Options)) (*DeleteRolePolicyOutput, error) { if params == nil { params = &DeleteRolePolicyInput{} @@ -32,19 +34,25 @@ func (c *Client) DeleteRolePolicy(ctx context.Context, params *DeleteRolePolicyI type DeleteRolePolicyInput struct { - // The name of the inline policy to delete from the specified IAM role. This - // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- + // The name of the inline policy to delete from the specified IAM role. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. PolicyName *string // The name (friendly name, not ARN) identifying the role that the policy is - // embedded in. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // embedded in. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -114,6 +122,12 @@ func (c *Client) addOperationDeleteRolePolicyMiddlewares(stack *middleware.Stack 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 = addOpDeleteRolePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSAMLProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSAMLProvider.go index 59cf5189eb..d76a02183f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSAMLProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSAMLProvider.go @@ -10,12 +10,16 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes a SAML provider resource in IAM. Deleting the provider resource from -// IAM does not update any roles that reference the SAML provider resource's ARN as -// a principal in their trust policies. Any attempt to assume a role that -// references a non-existent provider resource ARN fails. This operation requires -// Signature Version 4 (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html) -// . +// Deletes a SAML provider resource in IAM. +// +// Deleting the provider resource from IAM does not update any roles that +// reference the SAML provider resource's ARN as a principal in their trust +// policies. Any attempt to assume a role that references a non-existent provider +// resource ARN fails. +// +// This operation requires [Signature Version 4]. +// +// [Signature Version 4]: https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html func (c *Client) DeleteSAMLProvider(ctx context.Context, params *DeleteSAMLProviderInput, optFns ...func(*Options)) (*DeleteSAMLProviderOutput, error) { if params == nil { params = &DeleteSAMLProviderInput{} @@ -103,6 +107,12 @@ func (c *Client) addOperationDeleteSAMLProviderMiddlewares(stack *middleware.Sta 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 = addOpDeleteSAMLProviderValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSSHPublicKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSSHPublicKey.go index 6b90de1fa3..08f4f66c65 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSSHPublicKey.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSSHPublicKey.go @@ -10,11 +10,14 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes the specified SSH public key. The SSH public key deleted by this -// operation is used only for authenticating the associated IAM user to an -// CodeCommit repository. For more information about using SSH keys to authenticate -// to an CodeCommit repository, see Set up CodeCommit for SSH connections (https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html) -// in the CodeCommit User Guide. +// Deletes the specified SSH public key. +// +// The SSH public key deleted by this operation is used only for authenticating +// the associated IAM user to an CodeCommit repository. For more information about +// using SSH keys to authenticate to an CodeCommit repository, see [Set up CodeCommit for SSH connections]in the +// CodeCommit User Guide. +// +// [Set up CodeCommit for SSH connections]: https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html func (c *Client) DeleteSSHPublicKey(ctx context.Context, params *DeleteSSHPublicKeyInput, optFns ...func(*Options)) (*DeleteSSHPublicKeyOutput, error) { if params == nil { params = &DeleteSSHPublicKeyInput{} @@ -32,17 +35,23 @@ func (c *Client) DeleteSSHPublicKey(ctx context.Context, params *DeleteSSHPublic type DeleteSSHPublicKeyInput struct { - // The unique identifier for the SSH public key. This parameter allows (through - // its regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters - // that can consist of any upper or lowercased letter or digit. + // The unique identifier for the SSH public key. + // + // This parameter allows (through its [regex pattern]) a string of characters that can consist of + // any upper or lowercased letter or digit. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. SSHPublicKeyId *string - // The name of the IAM user associated with the SSH public key. This parameter - // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string - // of characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the IAM user associated with the SSH public key. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -112,6 +121,12 @@ func (c *Client) addOperationDeleteSSHPublicKeyMiddlewares(stack *middleware.Sta 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 = addOpDeleteSSHPublicKeyValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServerCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServerCertificate.go index f91110f6a2..b576da97d3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServerCertificate.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServerCertificate.go @@ -10,18 +10,22 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes the specified server certificate. For more information about working -// with server certificates, see Working with server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) -// in the IAM User Guide. This topic also includes a list of Amazon Web Services -// services that can use the server certificates that you manage with IAM. If you -// are using a server certificate with Elastic Load Balancing, deleting the +// Deletes the specified server certificate. +// +// For more information about working with server certificates, see [Working with server certificates] in the IAM +// User Guide. This topic also includes a list of Amazon Web Services services that +// can use the server certificates that you manage with IAM. +// +// If you are using a server certificate with Elastic Load Balancing, deleting the // certificate could have implications for your application. If Elastic Load // Balancing doesn't detect the deletion of bound certificates, it may continue to // use the certificates. This could cause Elastic Load Balancing to stop accepting // traffic. We recommend that you remove the reference to the certificate from // Elastic Load Balancing before using this command to delete the certificate. For -// more information, see DeleteLoadBalancerListeners (https://docs.aws.amazon.com/ElasticLoadBalancing/latest/APIReference/API_DeleteLoadBalancerListeners.html) -// in the Elastic Load Balancing API Reference. +// more information, see [DeleteLoadBalancerListeners]in the Elastic Load Balancing API Reference. +// +// [Working with server certificates]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html +// [DeleteLoadBalancerListeners]: https://docs.aws.amazon.com/ElasticLoadBalancing/latest/APIReference/API_DeleteLoadBalancerListeners.html func (c *Client) DeleteServerCertificate(ctx context.Context, params *DeleteServerCertificateInput, optFns ...func(*Options)) (*DeleteServerCertificateOutput, error) { if params == nil { params = &DeleteServerCertificateInput{} @@ -39,10 +43,13 @@ func (c *Client) DeleteServerCertificate(ctx context.Context, params *DeleteServ type DeleteServerCertificateInput struct { - // The name of the server certificate you want to delete. This parameter allows - // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of - // characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the server certificate you want to delete. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. ServerCertificateName *string @@ -112,6 +119,12 @@ func (c *Client) addOperationDeleteServerCertificateMiddlewares(stack *middlewar 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 = addOpDeleteServerCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceLinkedRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceLinkedRole.go index d4b7c69d7a..6ce0f1a020 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceLinkedRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceLinkedRole.go @@ -15,18 +15,21 @@ import ( // operation, confirm that the role has no active sessions and that any resources // used by the role in the linked service are deleted. If you call this operation // more than once for the same service-linked role and an earlier deletion task is -// not complete, then the DeletionTaskId of the earlier request is returned. If -// you submit a deletion request for a service-linked role whose linked service is -// still accessing a resource, then the deletion task fails. If it fails, the -// GetServiceLinkedRoleDeletionStatus operation returns the reason for the failure, -// usually including the resources that must be deleted. To delete the -// service-linked role, you must first remove those resources from the linked -// service and then submit the deletion request again. Resources are specific to -// the service that is linked to the role. For more information about removing -// resources from a service, see the Amazon Web Services documentation (http://docs.aws.amazon.com/) -// for your service. For more information about service-linked roles, see Roles -// terms and concepts: Amazon Web Services service-linked role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-service-linked-role) -// in the IAM User Guide. +// not complete, then the DeletionTaskId of the earlier request is returned. +// +// If you submit a deletion request for a service-linked role whose linked service +// is still accessing a resource, then the deletion task fails. If it fails, the GetServiceLinkedRoleDeletionStatus +// operation returns the reason for the failure, usually including the resources +// that must be deleted. To delete the service-linked role, you must first remove +// those resources from the linked service and then submit the deletion request +// again. Resources are specific to the service that is linked to the role. For +// more information about removing resources from a service, see the [Amazon Web Services documentation]for your +// service. +// +// For more information about service-linked roles, see [Roles terms and concepts: Amazon Web Services service-linked role] in the IAM User Guide. +// +// [Roles terms and concepts: Amazon Web Services service-linked role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-service-linked-role +// [Amazon Web Services documentation]: http://docs.aws.amazon.com/ func (c *Client) DeleteServiceLinkedRole(ctx context.Context, params *DeleteServiceLinkedRoleInput, optFns ...func(*Options)) (*DeleteServiceLinkedRoleOutput, error) { if params == nil { params = &DeleteServiceLinkedRoleInput{} @@ -121,6 +124,12 @@ func (c *Client) addOperationDeleteServiceLinkedRoleMiddlewares(stack *middlewar 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 = addOpDeleteServiceLinkedRoleValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceSpecificCredential.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceSpecificCredential.go index 99aeb8e992..5e8ede90f9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceSpecificCredential.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceSpecificCredential.go @@ -29,19 +29,25 @@ func (c *Client) DeleteServiceSpecificCredential(ctx context.Context, params *De type DeleteServiceSpecificCredentialInput struct { // The unique identifier of the service-specific credential. You can get this - // value by calling ListServiceSpecificCredentials . This parameter allows (through - // its regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters - // that can consist of any upper or lowercased letter or digit. + // value by calling ListServiceSpecificCredentials. + // + // This parameter allows (through its [regex pattern]) a string of characters that can consist of + // any upper or lowercased letter or digit. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. ServiceSpecificCredentialId *string // The name of the IAM user associated with the service-specific credential. If // this value is not specified, then the operation assumes the user whose - // credentials are used to call the operation. This parameter allows (through its - // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters - // consisting of upper and lowercase alphanumeric characters with no spaces. You - // can also include any of the following characters: _+=,.@- + // credentials are used to call the operation. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex UserName *string noSmithyDocumentSerde @@ -109,6 +115,12 @@ func (c *Client) addOperationDeleteServiceSpecificCredentialMiddlewares(stack *m 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 = addOpDeleteServiceSpecificCredentialValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSigningCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSigningCertificate.go index 866433d1f0..3a0f71a783 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSigningCertificate.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSigningCertificate.go @@ -10,12 +10,14 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes a signing certificate associated with the specified IAM user. If you do -// not specify a user name, IAM determines the user name implicitly based on the -// Amazon Web Services access key ID signing the request. This operation works for -// access keys under the Amazon Web Services account. Consequently, you can use -// this operation to manage Amazon Web Services account root user credentials even -// if the Amazon Web Services account has no associated IAM users. +// Deletes a signing certificate associated with the specified IAM user. +// +// If you do not specify a user name, IAM determines the user name implicitly +// based on the Amazon Web Services access key ID signing the request. This +// operation works for access keys under the Amazon Web Services account. +// Consequently, you can use this operation to manage Amazon Web Services account +// root user credentials even if the Amazon Web Services account has no associated +// IAM users. func (c *Client) DeleteSigningCertificate(ctx context.Context, params *DeleteSigningCertificateInput, optFns ...func(*Options)) (*DeleteSigningCertificateOutput, error) { if params == nil { params = &DeleteSigningCertificateInput{} @@ -33,17 +35,23 @@ func (c *Client) DeleteSigningCertificate(ctx context.Context, params *DeleteSig type DeleteSigningCertificateInput struct { - // The ID of the signing certificate to delete. The format of this parameter, as - // described by its regex (http://wikipedia.org/wiki/regex) pattern, is a string - // of characters that can be upper- or lower-cased letters or digits. + // The ID of the signing certificate to delete. + // + // The format of this parameter, as described by its [regex] pattern, is a string of + // characters that can be upper- or lower-cased letters or digits. + // + // [regex]: http://wikipedia.org/wiki/regex // // This member is required. CertificateId *string - // The name of the user the signing certificate belongs to. This parameter allows - // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of - // characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the user the signing certificate belongs to. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex UserName *string noSmithyDocumentSerde @@ -111,6 +119,12 @@ func (c *Client) addOperationDeleteSigningCertificateMiddlewares(stack *middlewa 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 = addOpDeleteSigningCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUser.go index ec1a279b49..753e9a8a15 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUser.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUser.go @@ -12,19 +12,28 @@ import ( // Deletes the specified IAM user. Unlike the Amazon Web Services Management // Console, when you delete a user programmatically, you must delete the items -// attached to the user manually, or the deletion fails. For more information, see -// Deleting an IAM user (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_manage.html#id_users_deleting_cli) +// attached to the user manually, or the deletion fails. For more information, see [Deleting an IAM user] // . Before attempting to delete a user, remove the following items: -// - Password ( DeleteLoginProfile ) -// - Access keys ( DeleteAccessKey ) -// - Signing certificate ( DeleteSigningCertificate ) -// - SSH public key ( DeleteSSHPublicKey ) -// - Git credentials ( DeleteServiceSpecificCredential ) -// - Multi-factor authentication (MFA) device ( DeactivateMFADevice , -// DeleteVirtualMFADevice ) -// - Inline policies ( DeleteUserPolicy ) -// - Attached managed policies ( DetachUserPolicy ) -// - Group memberships ( RemoveUserFromGroup ) +// +// - Password (DeleteLoginProfile ) +// +// - Access keys (DeleteAccessKey ) +// +// - Signing certificate (DeleteSigningCertificate ) +// +// - SSH public key (DeleteSSHPublicKey ) +// +// - Git credentials (DeleteServiceSpecificCredential ) +// +// - Multi-factor authentication (MFA) device (DeactivateMFADevice , DeleteVirtualMFADevice) +// +// - Inline policies (DeleteUserPolicy ) +// +// - Attached managed policies (DetachUserPolicy ) +// +// - Group memberships (RemoveUserFromGroup ) +// +// [Deleting an IAM user]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_manage.html#id_users_deleting_cli func (c *Client) DeleteUser(ctx context.Context, params *DeleteUserInput, optFns ...func(*Options)) (*DeleteUserOutput, error) { if params == nil { params = &DeleteUserInput{} @@ -42,10 +51,13 @@ func (c *Client) DeleteUser(ctx context.Context, params *DeleteUserInput, optFns type DeleteUserInput struct { - // The name of the user to delete. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // The name of the user to delete. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -115,6 +127,12 @@ func (c *Client) addOperationDeleteUserMiddlewares(stack *middleware.Stack, opti 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 = addOpDeleteUserValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPermissionsBoundary.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPermissionsBoundary.go index 6cfceb1186..c5a082c2e3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPermissionsBoundary.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPermissionsBoundary.go @@ -10,9 +10,11 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes the permissions boundary for the specified IAM user. Deleting the -// permissions boundary for a user might increase its permissions by allowing the -// user to perform all the actions granted in its permissions policies. +// Deletes the permissions boundary for the specified IAM user. +// +// Deleting the permissions boundary for a user might increase its permissions by +// allowing the user to perform all the actions granted in its permissions +// policies. func (c *Client) DeleteUserPermissionsBoundary(ctx context.Context, params *DeleteUserPermissionsBoundaryInput, optFns ...func(*Options)) (*DeleteUserPermissionsBoundaryOutput, error) { if params == nil { params = &DeleteUserPermissionsBoundaryInput{} @@ -101,6 +103,12 @@ func (c *Client) addOperationDeleteUserPermissionsBoundaryMiddlewares(stack *mid 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 = addOpDeleteUserPermissionsBoundaryValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPolicy.go index 15213695b9..4adfc7d51b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPolicy.go @@ -11,10 +11,12 @@ import ( ) // Deletes the specified inline policy that is embedded in the specified IAM user. -// A user can also have managed policies attached to it. To detach a managed policy -// from a user, use DetachUserPolicy . For more information about policies, refer -// to Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. +// +// A user can also have managed policies attached to it. To detach a managed +// policy from a user, use DetachUserPolicy. For more information about policies, refer to [Managed policies and inline policies] in the +// IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) DeleteUserPolicy(ctx context.Context, params *DeleteUserPolicyInput, optFns ...func(*Options)) (*DeleteUserPolicyOutput, error) { if params == nil { params = &DeleteUserPolicyInput{} @@ -32,19 +34,25 @@ func (c *Client) DeleteUserPolicy(ctx context.Context, params *DeleteUserPolicyI type DeleteUserPolicyInput struct { - // The name identifying the policy document to delete. This parameter allows - // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of - // characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name identifying the policy document to delete. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. PolicyName *string // The name (friendly name, not ARN) identifying the user that the policy is - // embedded in. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // embedded in. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -114,6 +122,12 @@ func (c *Client) addOperationDeleteUserPolicyMiddlewares(stack *middleware.Stack 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 = addOpDeleteUserPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteVirtualMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteVirtualMFADevice.go index 5804cb4413..1298b29f9d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteVirtualMFADevice.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteVirtualMFADevice.go @@ -10,9 +10,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes a virtual MFA device. You must deactivate a user's virtual MFA device -// before you can delete it. For information about deactivating MFA devices, see -// DeactivateMFADevice . +// Deletes a virtual MFA device. +// +// You must deactivate a user's virtual MFA device before you can delete it. For +// information about deactivating MFA devices, see DeactivateMFADevice. func (c *Client) DeleteVirtualMFADevice(ctx context.Context, params *DeleteVirtualMFADeviceInput, optFns ...func(*Options)) (*DeleteVirtualMFADeviceOutput, error) { if params == nil { params = &DeleteVirtualMFADeviceInput{} @@ -31,10 +32,13 @@ func (c *Client) DeleteVirtualMFADevice(ctx context.Context, params *DeleteVirtu type DeleteVirtualMFADeviceInput struct { // The serial number that uniquely identifies the MFA device. For virtual MFA - // devices, the serial number is the same as the ARN. This parameter allows - // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of - // characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: =,.@:/- + // devices, the serial number is the same as the ARN. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: =,.@:/- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. SerialNumber *string @@ -104,6 +108,12 @@ func (c *Client) addOperationDeleteVirtualMFADeviceMiddlewares(stack *middleware 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 = addOpDeleteVirtualMFADeviceValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachGroupPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachGroupPolicy.go index 0189737930..5d2456b241 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachGroupPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachGroupPolicy.go @@ -10,11 +10,12 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Removes the specified managed policy from the specified IAM group. A group can -// also have inline policies embedded with it. To delete an inline policy, use -// DeleteGroupPolicy . For information about policies, see Managed policies and -// inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. +// Removes the specified managed policy from the specified IAM group. +// +// A group can also have inline policies embedded with it. To delete an inline +// policy, use DeleteGroupPolicy. For information about policies, see [Managed policies and inline policies] in the IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) DetachGroupPolicy(ctx context.Context, params *DetachGroupPolicyInput, optFns ...func(*Options)) (*DetachGroupPolicyOutput, error) { if params == nil { params = &DetachGroupPolicyInput{} @@ -33,17 +34,22 @@ func (c *Client) DetachGroupPolicy(ctx context.Context, params *DetachGroupPolic type DetachGroupPolicyInput struct { // The name (friendly name, not ARN) of the IAM group to detach the policy from. - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. GroupName *string - // The Amazon Resource Name (ARN) of the IAM policy you want to detach. For more - // information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // The Amazon Resource Name (ARN) of the IAM policy you want to detach. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. PolicyArn *string @@ -113,6 +119,12 @@ func (c *Client) addOperationDetachGroupPolicyMiddlewares(stack *middleware.Stac 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 = addOpDetachGroupPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachRolePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachRolePolicy.go index 3cf8d7fecb..1450d9826f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachRolePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachRolePolicy.go @@ -10,11 +10,12 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Removes the specified managed policy from the specified role. A role can also -// have inline policies embedded with it. To delete an inline policy, use -// DeleteRolePolicy . For information about policies, see Managed policies and -// inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. +// Removes the specified managed policy from the specified role. +// +// A role can also have inline policies embedded with it. To delete an inline +// policy, use DeleteRolePolicy. For information about policies, see [Managed policies and inline policies] in the IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) DetachRolePolicy(ctx context.Context, params *DetachRolePolicyInput, optFns ...func(*Options)) (*DetachRolePolicyOutput, error) { if params == nil { params = &DetachRolePolicyInput{} @@ -32,18 +33,23 @@ func (c *Client) DetachRolePolicy(ctx context.Context, params *DetachRolePolicyI type DetachRolePolicyInput struct { - // The Amazon Resource Name (ARN) of the IAM policy you want to detach. For more - // information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // The Amazon Resource Name (ARN) of the IAM policy you want to detach. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. PolicyArn *string // The name (friendly name, not ARN) of the IAM role to detach the policy from. - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -113,6 +119,12 @@ func (c *Client) addOperationDetachRolePolicyMiddlewares(stack *middleware.Stack 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 = addOpDetachRolePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachUserPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachUserPolicy.go index d9a608a79a..067db8a4b5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachUserPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachUserPolicy.go @@ -10,11 +10,12 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Removes the specified managed policy from the specified user. A user can also -// have inline policies embedded with it. To delete an inline policy, use -// DeleteUserPolicy . For information about policies, see Managed policies and -// inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. +// Removes the specified managed policy from the specified user. +// +// A user can also have inline policies embedded with it. To delete an inline +// policy, use DeleteUserPolicy. For information about policies, see [Managed policies and inline policies] in the IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) DetachUserPolicy(ctx context.Context, params *DetachUserPolicyInput, optFns ...func(*Options)) (*DetachUserPolicyOutput, error) { if params == nil { params = &DetachUserPolicyInput{} @@ -32,18 +33,23 @@ func (c *Client) DetachUserPolicy(ctx context.Context, params *DetachUserPolicyI type DetachUserPolicyInput struct { - // The Amazon Resource Name (ARN) of the IAM policy you want to detach. For more - // information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // The Amazon Resource Name (ARN) of the IAM policy you want to detach. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. PolicyArn *string // The name (friendly name, not ARN) of the IAM user to detach the policy from. - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -113,6 +119,12 @@ func (c *Client) addOperationDetachUserPolicyMiddlewares(stack *middleware.Stack 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 = addOpDetachUserPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_EnableMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_EnableMFADevice.go index d9911cbb82..20054bc484 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_EnableMFADevice.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_EnableMFADevice.go @@ -30,43 +30,55 @@ func (c *Client) EnableMFADevice(ctx context.Context, params *EnableMFADeviceInp type EnableMFADeviceInput struct { - // An authentication code emitted by the device. The format for this parameter is - // a string of six digits. Submit your request immediately after generating the - // authentication codes. If you generate the codes and then wait too long to submit - // the request, the MFA device successfully associates with the user but the MFA - // device becomes out of sync. This happens because time-based one-time passwords - // (TOTP) expire after a short period of time. If this happens, you can resync the - // device (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_sync.html) - // . + // An authentication code emitted by the device. + // + // The format for this parameter is a string of six digits. + // + // Submit your request immediately after generating the authentication codes. If + // you generate the codes and then wait too long to submit the request, the MFA + // device successfully associates with the user but the MFA device becomes out of + // sync. This happens because time-based one-time passwords (TOTP) expire after a + // short period of time. If this happens, you can [resync the device]. + // + // [resync the device]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_sync.html // // This member is required. AuthenticationCode1 *string - // A subsequent authentication code emitted by the device. The format for this - // parameter is a string of six digits. Submit your request immediately after - // generating the authentication codes. If you generate the codes and then wait too - // long to submit the request, the MFA device successfully associates with the user - // but the MFA device becomes out of sync. This happens because time-based one-time - // passwords (TOTP) expire after a short period of time. If this happens, you can - // resync the device (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_sync.html) - // . + // A subsequent authentication code emitted by the device. + // + // The format for this parameter is a string of six digits. + // + // Submit your request immediately after generating the authentication codes. If + // you generate the codes and then wait too long to submit the request, the MFA + // device successfully associates with the user but the MFA device becomes out of + // sync. This happens because time-based one-time passwords (TOTP) expire after a + // short period of time. If this happens, you can [resync the device]. + // + // [resync the device]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_sync.html // // This member is required. AuthenticationCode2 *string // The serial number that uniquely identifies the MFA device. For virtual MFA - // devices, the serial number is the device ARN. This parameter allows (through its - // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters - // consisting of upper and lowercase alphanumeric characters with no spaces. You - // can also include any of the following characters: =,.@:/- + // devices, the serial number is the device ARN. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: =,.@:/- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. SerialNumber *string - // The name of the IAM user for whom you want to enable the MFA device. This - // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- + // The name of the IAM user for whom you want to enable the MFA device. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -136,6 +148,12 @@ func (c *Client) addOperationEnableMFADeviceMiddlewares(stack *middleware.Stack, 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 = addOpEnableMFADeviceValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateCredentialReport.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateCredentialReport.go index 6ed0670cab..96296dc332 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateCredentialReport.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateCredentialReport.go @@ -11,9 +11,11 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Generates a credential report for the Amazon Web Services account. For more -// information about the credential report, see Getting credential reports (https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html) -// in the IAM User Guide. +// Generates a credential report for the Amazon Web Services account. For more +// +// information about the credential report, see [Getting credential reports]in the IAM User Guide. +// +// [Getting credential reports]: https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html func (c *Client) GenerateCredentialReport(ctx context.Context, params *GenerateCredentialReportInput, optFns ...func(*Options)) (*GenerateCredentialReportOutput, error) { if params == nil { params = &GenerateCredentialReportInput{} @@ -103,6 +105,12 @@ func (c *Client) addOperationGenerateCredentialReportMiddlewares(stack *middlewa 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opGenerateCredentialReport(options.Region), middleware.Before); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateOrganizationsAccessReport.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateOrganizationsAccessReport.go index 7998fcadf5..6b3ce12fc3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateOrganizationsAccessReport.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateOrganizationsAccessReport.go @@ -12,54 +12,63 @@ import ( // Generates a report for service last accessed data for Organizations. You can // generate a report for any entities (organization root, organizational unit, or -// account) or policies in your organization. To call this operation, you must be -// signed in using your Organizations management account credentials. You can use -// your long-term IAM user or root user credentials, or temporary credentials from -// assuming an IAM role. SCPs must be enabled for your organization root. You must -// have the required IAM and Organizations permissions. For more information, see -// Refining permissions using service last accessed data (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html) -// in the IAM User Guide. You can generate a service last accessed data report for -// entities by specifying only the entity's path. This data includes a list of -// services that are allowed by any service control policies (SCPs) that apply to -// the entity. You can generate a service last accessed data report for a policy by -// specifying an entity's path and an optional Organizations policy ID. This data -// includes a list of services that are allowed by the specified SCP. For each -// service in both report types, the data includes the most recent account activity -// that the policy allows to account principals in the entity or the entity's -// children. For important information about the data, reporting period, -// permissions required, troubleshooting, and supported Regions see Reducing -// permissions using service last accessed data (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html) -// in the IAM User Guide. The data includes all attempts to access Amazon Web -// Services, not just the successful ones. This includes all attempts that were -// made using the Amazon Web Services Management Console, the Amazon Web Services -// API through any of the SDKs, or any of the command line tools. An unexpected -// entry in the service last accessed data does not mean that an account has been -// compromised, because the request might have been denied. Refer to your -// CloudTrail logs as the authoritative source for information about all API calls -// and whether they were successful or denied access. For more information, see -// Logging IAM events with CloudTrail (https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html) -// in the IAM User Guide. This operation returns a JobId . Use this parameter in -// the GetOrganizationsAccessReport operation to check the status of the report -// generation. To check the status of this request, use the JobId parameter in the -// GetOrganizationsAccessReport operation and test the JobStatus response -// parameter. When the job is complete, you can retrieve the report. To generate a -// service last accessed data report for entities, specify an entity path without -// specifying the optional Organizations policy ID. The type of entity that you -// specify determines the data returned in the report. +// account) or policies in your organization. +// +// To call this operation, you must be signed in using your Organizations +// management account credentials. You can use your long-term IAM user or root user +// credentials, or temporary credentials from assuming an IAM role. SCPs must be +// enabled for your organization root. You must have the required IAM and +// Organizations permissions. For more information, see [Refining permissions using service last accessed data]in the IAM User Guide. +// +// You can generate a service last accessed data report for entities by specifying +// only the entity's path. This data includes a list of services that are allowed +// by any service control policies (SCPs) that apply to the entity. +// +// You can generate a service last accessed data report for a policy by specifying +// an entity's path and an optional Organizations policy ID. This data includes a +// list of services that are allowed by the specified SCP. +// +// For each service in both report types, the data includes the most recent +// account activity that the policy allows to account principals in the entity or +// the entity's children. For important information about the data, reporting +// period, permissions required, troubleshooting, and supported Regions see [Reducing permissions using service last accessed data]in the +// IAM User Guide. +// +// The data includes all attempts to access Amazon Web Services, not just the +// successful ones. This includes all attempts that were made using the Amazon Web +// Services Management Console, the Amazon Web Services API through any of the +// SDKs, or any of the command line tools. An unexpected entry in the service last +// accessed data does not mean that an account has been compromised, because the +// request might have been denied. Refer to your CloudTrail logs as the +// authoritative source for information about all API calls and whether they were +// successful or denied access. For more information, see [Logging IAM events with CloudTrail]in the IAM User Guide. +// +// This operation returns a JobId . Use this parameter in the GetOrganizationsAccessReport operation to check +// the status of the report generation. To check the status of this request, use +// the JobId parameter in the GetOrganizationsAccessReport operation and test the JobStatus response +// parameter. When the job is complete, you can retrieve the report. +// +// To generate a service last accessed data report for entities, specify an entity +// path without specifying the optional Organizations policy ID. The type of entity +// that you specify determines the data returned in the report. +// // - Root – When you specify the organizations root as the entity, the resulting // report lists all of the services allowed by SCPs that are attached to your root. // For each service, the report includes data for all accounts in your organization // except the management account, because the management account is not limited by // SCPs. +// // - OU – When you specify an organizational unit (OU) as the entity, the // resulting report lists all of the services allowed by SCPs that are attached to // the OU and its parents. For each service, the report includes data for all // accounts in the OU or its children. This data excludes the management account, // because the management account is not limited by SCPs. +// // - management account – When you specify the management account, the resulting // report lists all Amazon Web Services services, because the management account is // not limited by SCPs. For each service, the report includes data for only the // management account. +// // - Account – When you specify another account as the entity, the resulting // report lists all of the services allowed by SCPs that are attached to the // account and its parents. For each service, the report includes data for only the @@ -68,6 +77,7 @@ import ( // To generate a service last accessed data report for policies, specify an entity // path and the optional Organizations policy ID. The type of entity that you // specify determines the data returned for each service. +// // - Root – When you specify the root entity and a policy ID, the resulting // report lists all of the services that are allowed by the specified SCP. For each // service, the report includes data for all accounts in your organization to which @@ -75,6 +85,7 @@ import ( // management account is not limited by SCPs. If the SCP is not attached to any // entities in the organization, then the report will return a list of services // with no data. +// // - OU – When you specify an OU entity and a policy ID, the resulting report // lists all of the services that are allowed by the specified SCP. For each // service, the report includes data for all accounts in the OU or its children to @@ -83,11 +94,13 @@ import ( // management account, because the management account is not limited by SCPs. If // the SCP is not attached to the OU or one of its children, the report will return // a list of services with no data. +// // - management account – When you specify the management account, the resulting // report lists all Amazon Web Services services, because the management account is // not limited by SCPs. If you specify a policy ID in the CLI or API, the policy is // ignored. For each service, the report includes data for only the management // account. +// // - Account – When you specify another account entity and a policy ID, the // resulting report lists all of the services that are allowed by the specified // SCP. For each service, the report includes data for only the specified account. @@ -99,10 +112,16 @@ import ( // whether a principal could access a service. These other policy types include // identity-based policies, resource-based policies, access control lists, IAM // permissions boundaries, and STS assume role policies. It only applies SCP logic. -// For more about the evaluation of policy types, see Evaluating policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics) -// in the IAM User Guide. For more information about service last accessed data, -// see Reducing policy scope by viewing user activity (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html) -// in the IAM User Guide. +// For more about the evaluation of policy types, see [Evaluating policies]in the IAM User Guide. +// +// For more information about service last accessed data, see [Reducing policy scope by viewing user activity] in the IAM User +// Guide. +// +// [Logging IAM events with CloudTrail]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html +// [Refining permissions using service last accessed data]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html +// [Reducing permissions using service last accessed data]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html +// [Evaluating policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics +// [Reducing policy scope by viewing user activity]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html func (c *Client) GenerateOrganizationsAccessReport(ctx context.Context, params *GenerateOrganizationsAccessReportInput, optFns ...func(*Options)) (*GenerateOrganizationsAccessReportOutput, error) { if params == nil { params = &GenerateOrganizationsAccessReportInput{} @@ -131,9 +150,10 @@ type GenerateOrganizationsAccessReportInput struct { EntityPath *string // The identifier of the Organizations service control policy (SCP). This - // parameter is optional. This ID is used to generate information about when an - // account principal that is limited by the SCP attempted to access an Amazon Web - // Services service. + // parameter is optional. + // + // This ID is used to generate information about when an account principal that is + // limited by the SCP attempted to access an Amazon Web Services service. OrganizationsPolicyId *string noSmithyDocumentSerde @@ -141,8 +161,7 @@ type GenerateOrganizationsAccessReportInput struct { type GenerateOrganizationsAccessReportOutput struct { - // The job identifier that you can use in the GetOrganizationsAccessReport - // operation. + // The job identifier that you can use in the GetOrganizationsAccessReport operation. JobId *string // Metadata pertaining to the operation's result. @@ -206,6 +225,12 @@ func (c *Client) addOperationGenerateOrganizationsAccessReportMiddlewares(stack 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 = addOpGenerateOrganizationsAccessReportValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateServiceLastAccessedDetails.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateServiceLastAccessedDetails.go index 1afe4cd264..9dec730af0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateServiceLastAccessedDetails.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateServiceLastAccessedDetails.go @@ -15,46 +15,62 @@ import ( // group, role, or policy) was last used in an attempt to access Amazon Web // Services services. Recent activity usually appears within four hours. IAM // reports activity for at least the last 400 days, or less if your Region began -// supporting this feature within the last year. For more information, see Regions -// where data is tracked (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period) -// . For more information about services and actions for which action last accessed -// information is displayed, see IAM action last accessed information services and -// actions (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor-action-last-accessed.html) -// . The service last accessed data includes all attempts to access an Amazon Web +// supporting this feature within the last year. For more information, see [Regions where data is tracked]. For +// more information about services and actions for which action last accessed +// information is displayed, see [IAM action last accessed information services and actions]. +// +// The service last accessed data includes all attempts to access an Amazon Web // Services API, not just the successful ones. This includes all attempts that were // made using the Amazon Web Services Management Console, the Amazon Web Services // API through any of the SDKs, or any of the command line tools. An unexpected // entry in the service last accessed data does not mean that your account has been // compromised, because the request might have been denied. Refer to your // CloudTrail logs as the authoritative source for information about all API calls -// and whether they were successful or denied access. For more information, see -// Logging IAM events with CloudTrail (https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html) -// in the IAM User Guide. The GenerateServiceLastAccessedDetails operation returns -// a JobId . Use this parameter in the following operations to retrieve the -// following details from your report: -// - GetServiceLastAccessedDetails – Use this operation for users, groups, roles, -// or policies to list every Amazon Web Services service that the resource could -// access using permissions policies. For each service, the response includes -// information about the most recent access attempt. The JobId returned by -// GenerateServiceLastAccessedDetail must be used by the same role within a -// session, or by the same user when used to call GetServiceLastAccessedDetail . -// - GetServiceLastAccessedDetailsWithEntities – Use this operation for groups -// and policies to list information about the associated entities (users or roles) -// that attempted to access a specific Amazon Web Services service. +// and whether they were successful or denied access. For more information, see [Logging IAM events with CloudTrail]in +// the IAM User Guide. +// +// The GenerateServiceLastAccessedDetails operation returns a JobId . Use this +// parameter in the following operations to retrieve the following details from +// your report: +// +// GetServiceLastAccessedDetails +// - – Use this operation for users, groups, roles, or policies to list every +// Amazon Web Services service that the resource could access using permissions +// policies. For each service, the response includes information about the most +// recent access attempt. +// +// The JobId returned by GenerateServiceLastAccessedDetail must be used by the same +// +// role within a session, or by the same user when used to call +// GetServiceLastAccessedDetail . +// +// GetServiceLastAccessedDetailsWithEntities +// - – Use this operation for groups and policies to list information about the +// associated entities (users or roles) that attempted to access a specific Amazon +// Web Services service. // // To check the status of the GenerateServiceLastAccessedDetails request, use the // JobId parameter in the same operations and test the JobStatus response -// parameter. For additional information about the permissions policies that allow -// an identity (user, group, or role) to access specific services, use the -// ListPoliciesGrantingServiceAccess operation. Service last accessed data does not -// use other policy types when determining whether a resource could access a -// service. These other policy types include resource-based policies, access -// control lists, Organizations policies, IAM permissions boundaries, and STS -// assume role policies. It only applies permissions policy logic. For more about -// the evaluation of policy types, see Evaluating policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics) -// in the IAM User Guide. For more information about service and action last -// accessed data, see Reducing permissions using service last accessed data (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html) -// in the IAM User Guide. +// parameter. +// +// For additional information about the permissions policies that allow an +// identity (user, group, or role) to access specific services, use the ListPoliciesGrantingServiceAccessoperation. +// +// Service last accessed data does not use other policy types when determining +// whether a resource could access a service. These other policy types include +// resource-based policies, access control lists, Organizations policies, IAM +// permissions boundaries, and STS assume role policies. It only applies +// permissions policy logic. For more about the evaluation of policy types, see [Evaluating policies]in +// the IAM User Guide. +// +// For more information about service and action last accessed data, see [Reducing permissions using service last accessed data] in the +// IAM User Guide. +// +// [Logging IAM events with CloudTrail]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html +// [Reducing permissions using service last accessed data]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html +// [Regions where data is tracked]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period +// [Evaluating policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics +// [IAM action last accessed information services and actions]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor-action-last-accessed.html func (c *Client) GenerateServiceLastAccessedDetails(ctx context.Context, params *GenerateServiceLastAccessedDetailsInput, optFns ...func(*Options)) (*GenerateServiceLastAccessedDetailsOutput, error) { if params == nil { params = &GenerateServiceLastAccessedDetailsInput{} @@ -92,8 +108,7 @@ type GenerateServiceLastAccessedDetailsInput struct { type GenerateServiceLastAccessedDetailsOutput struct { - // The JobId that you can use in the GetServiceLastAccessedDetails or - // GetServiceLastAccessedDetailsWithEntities operations. The JobId returned by + // The JobId that you can use in the GetServiceLastAccessedDetails or GetServiceLastAccessedDetailsWithEntities operations. The JobId returned by // GenerateServiceLastAccessedDetail must be used by the same role within a // session, or by the same user when used to call GetServiceLastAccessedDetail . JobId *string @@ -159,6 +174,12 @@ func (c *Client) addOperationGenerateServiceLastAccessedDetailsMiddlewares(stack 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 = addOpGenerateServiceLastAccessedDetailsValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccessKeyLastUsed.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccessKeyLastUsed.go index 50ac658cd2..e39438c41f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccessKeyLastUsed.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccessKeyLastUsed.go @@ -32,9 +32,12 @@ func (c *Client) GetAccessKeyLastUsed(ctx context.Context, params *GetAccessKeyL type GetAccessKeyLastUsedInput struct { - // The identifier of an access key. This parameter allows (through its regex - // pattern (http://wikipedia.org/wiki/regex) ) a string of characters that can - // consist of any upper or lowercased letter or digit. + // The identifier of an access key. + // + // This parameter allows (through its [regex pattern]) a string of characters that can consist of + // any upper or lowercased letter or digit. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. AccessKeyId *string @@ -42,9 +45,8 @@ type GetAccessKeyLastUsedInput struct { noSmithyDocumentSerde } -// Contains the response to a successful GetAccessKeyLastUsed request. It is also -// returned as a member of the AccessKeyMetaData structure returned by the -// ListAccessKeys action. +// Contains the response to a successful GetAccessKeyLastUsed request. It is also returned as a member +// of the AccessKeyMetaDatastructure returned by the ListAccessKeys action. type GetAccessKeyLastUsedOutput struct { // Contains information about the last time the access key was used. @@ -114,6 +116,12 @@ func (c *Client) addOperationGetAccessKeyLastUsedMiddlewares(stack *middleware.S 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 = addOpGetAccessKeyLastUsedValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountAuthorizationDetails.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountAuthorizationDetails.go index 565b0d9dfe..c55c15ca4f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountAuthorizationDetails.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountAuthorizationDetails.go @@ -14,14 +14,18 @@ import ( // Retrieves information about all IAM users, groups, roles, and policies in your // Amazon Web Services account, including their relationships to one another. Use // this operation to obtain a snapshot of the configuration of IAM permissions -// (users, groups, roles, and policies) in your account. Policies returned by this -// operation are URL-encoded compliant with RFC 3986 (https://tools.ietf.org/html/rfc3986) -// . You can use a URL decoding method to convert the policy back to plain JSON -// text. For example, if you use Java, you can use the decode method of the +// (users, groups, roles, and policies) in your account. +// +// Policies returned by this operation are URL-encoded compliant with [RFC 3986]. You can +// use a URL decoding method to convert the policy back to plain JSON text. For +// example, if you use Java, you can use the decode method of the // java.net.URLDecoder utility class in the Java SDK. Other languages and SDKs -// provide similar functionality. You can optionally filter the results using the -// Filter parameter. You can paginate the results using the MaxItems and Marker -// parameters. +// provide similar functionality. +// +// You can optionally filter the results using the Filter parameter. You can +// paginate the results using the MaxItems and Marker parameters. +// +// [RFC 3986]: https://tools.ietf.org/html/rfc3986 func (c *Client) GetAccountAuthorizationDetails(ctx context.Context, params *GetAccountAuthorizationDetailsInput, optFns ...func(*Options)) (*GetAccountAuthorizationDetailsOutput, error) { if params == nil { params = &GetAccountAuthorizationDetailsInput{} @@ -41,9 +45,11 @@ type GetAccountAuthorizationDetailsInput struct { // A list of entity types used to filter the results. Only the entities that match // the types you specify are included in the output. Use the value - // LocalManagedPolicy to include customer managed policies. The format for this - // parameter is a comma-separated (if more than one) list of strings. Each string - // value in the list must be one of the valid values listed below. + // LocalManagedPolicy to include customer managed policies. + // + // The format for this parameter is a comma-separated (if more than one) list of + // strings. Each string value in the list must be one of the valid values listed + // below. Filter []types.EntityType // Use this parameter only when paginating results and only after you receive a @@ -54,11 +60,13 @@ type GetAccountAuthorizationDetailsInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 noSmithyDocumentSerde @@ -152,6 +160,12 @@ func (c *Client) addOperationGetAccountAuthorizationDetailsMiddlewares(stack *mi 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountAuthorizationDetails(options.Region), middleware.Before); err != nil { return err } @@ -173,24 +187,18 @@ func (c *Client) addOperationGetAccountAuthorizationDetailsMiddlewares(stack *mi return nil } -// GetAccountAuthorizationDetailsAPIClient is a client that implements the -// GetAccountAuthorizationDetails operation. -type GetAccountAuthorizationDetailsAPIClient interface { - GetAccountAuthorizationDetails(context.Context, *GetAccountAuthorizationDetailsInput, ...func(*Options)) (*GetAccountAuthorizationDetailsOutput, error) -} - -var _ GetAccountAuthorizationDetailsAPIClient = (*Client)(nil) - // GetAccountAuthorizationDetailsPaginatorOptions is the paginator options for // GetAccountAuthorizationDetails type GetAccountAuthorizationDetailsPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -253,6 +261,9 @@ func (p *GetAccountAuthorizationDetailsPaginator) NextPage(ctx context.Context, } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetAccountAuthorizationDetails(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -272,6 +283,14 @@ func (p *GetAccountAuthorizationDetailsPaginator) NextPage(ctx context.Context, return result, nil } +// GetAccountAuthorizationDetailsAPIClient is a client that implements the +// GetAccountAuthorizationDetails operation. +type GetAccountAuthorizationDetailsAPIClient interface { + GetAccountAuthorizationDetails(context.Context, *GetAccountAuthorizationDetailsInput, ...func(*Options)) (*GetAccountAuthorizationDetailsOutput, error) +} + +var _ GetAccountAuthorizationDetailsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetAccountAuthorizationDetails(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountPasswordPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountPasswordPolicy.go index 88fca11ea8..effb87235f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountPasswordPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountPasswordPolicy.go @@ -14,8 +14,9 @@ import ( // Retrieves the password policy for the Amazon Web Services account. This tells // you the complexity requirements and mandatory rotation periods for the IAM user // passwords in your account. For more information about using a password policy, -// see Managing an IAM password policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingPasswordPolicies.html) -// . +// see [Managing an IAM password policy]. +// +// [Managing an IAM password policy]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingPasswordPolicies.html func (c *Client) GetAccountPasswordPolicy(ctx context.Context, params *GetAccountPasswordPolicyInput, optFns ...func(*Options)) (*GetAccountPasswordPolicyOutput, error) { if params == nil { params = &GetAccountPasswordPolicyInput{} @@ -104,6 +105,12 @@ func (c *Client) addOperationGetAccountPasswordPolicyMiddlewares(stack *middlewa 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountPasswordPolicy(options.Region), middleware.Before); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountSummary.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountSummary.go index 0897618152..3ea716970d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountSummary.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountSummary.go @@ -11,8 +11,11 @@ import ( ) // Retrieves information about IAM entity usage and IAM quotas in the Amazon Web -// Services account. For information about IAM quotas, see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM User Guide. +// Services account. +// +// For information about IAM quotas, see [IAM and STS quotas] in the IAM User Guide. +// +// [IAM and STS quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html func (c *Client) GetAccountSummary(ctx context.Context, params *GetAccountSummaryInput, optFns ...func(*Options)) (*GetAccountSummaryOutput, error) { if params == nil { params = &GetAccountSummaryInput{} @@ -100,6 +103,12 @@ func (c *Client) addOperationGetAccountSummaryMiddlewares(stack *middleware.Stac 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountSummary(options.Region), middleware.Before); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForCustomPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForCustomPolicy.go index 0f71d4c276..7dc7c48527 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForCustomPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForCustomPolicy.go @@ -12,14 +12,15 @@ import ( // Gets a list of all of the context keys referenced in the input policies. The // policies are supplied as a list of one or more strings. To get the context keys -// from policies associated with an IAM user, group, or role, use -// GetContextKeysForPrincipalPolicy . Context keys are variables maintained by -// Amazon Web Services and its services that provide details about the context of -// an API query request. Context keys can be evaluated by testing against a value -// specified in an IAM policy. Use GetContextKeysForCustomPolicy to understand -// what key names and values you must supply when you call SimulateCustomPolicy . -// Note that all parameters are shown in unencoded form here for clarity but must -// be URL encoded to be included as a part of a real HTML request. +// from policies associated with an IAM user, group, or role, use GetContextKeysForPrincipalPolicy. +// +// Context keys are variables maintained by Amazon Web Services and its services +// that provide details about the context of an API query request. Context keys can +// be evaluated by testing against a value specified in an IAM policy. Use +// GetContextKeysForCustomPolicy to understand what key names and values you must +// supply when you call SimulateCustomPolicy. Note that all parameters are shown in unencoded form +// here for clarity but must be URL encoded to be included as a part of a real HTML +// request. func (c *Client) GetContextKeysForCustomPolicy(ctx context.Context, params *GetContextKeysForCustomPolicyInput, optFns ...func(*Options)) (*GetContextKeysForCustomPolicyOutput, error) { if params == nil { params = &GetContextKeysForCustomPolicyInput{} @@ -39,24 +40,29 @@ type GetContextKeysForCustomPolicyInput struct { // A list of policies for which you want the list of context keys referenced in // those policies. Each document is specified as a string containing the complete, - // valid JSON text of an IAM policy. The regex pattern (http://wikipedia.org/wiki/regex) - // used to validate this parameter is a string of characters consisting of the - // following: + // valid JSON text of an IAM policy. + // + // The [regex pattern] used to validate this parameter is a string of characters consisting of + // the following: + // // - Any printable ASCII character ranging from the space character ( \u0020 ) // through the end of the ASCII character range + // // - The printable characters in the Basic Latin and Latin-1 Supplement // character set (through \u00FF ) + // // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage // return ( \u000D ) // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // This member is required. PolicyInputList []string noSmithyDocumentSerde } -// Contains the response to a successful GetContextKeysForPrincipalPolicy or -// GetContextKeysForCustomPolicy request. +// Contains the response to a successful GetContextKeysForPrincipalPolicy or GetContextKeysForCustomPolicy request. type GetContextKeysForCustomPolicyOutput struct { // The list of context keys that are referenced in the input policies. @@ -123,6 +129,12 @@ func (c *Client) addOperationGetContextKeysForCustomPolicyMiddlewares(stack *mid 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 = addOpGetContextKeysForCustomPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForPrincipalPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForPrincipalPolicy.go index 2383ee56ac..5d47169dc8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForPrincipalPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForPrincipalPolicy.go @@ -13,17 +13,20 @@ import ( // Gets a list of all of the context keys referenced in all the IAM policies that // are attached to the specified IAM entity. The entity can be an IAM user, group, // or role. If you specify a user, then the request also includes all of the -// policies attached to groups that the user is a member of. You can optionally -// include a list of one or more additional policies, specified as strings. If you -// want to include only a list of policies by string, use -// GetContextKeysForCustomPolicy instead. Note: This operation discloses -// information about the permissions granted to other users. If you do not want -// users to see other user's permissions, then consider allowing them to use -// GetContextKeysForCustomPolicy instead. Context keys are variables maintained by -// Amazon Web Services and its services that provide details about the context of -// an API query request. Context keys can be evaluated by testing against a value -// in an IAM policy. Use GetContextKeysForPrincipalPolicy to understand what key -// names and values you must supply when you call SimulatePrincipalPolicy . +// policies attached to groups that the user is a member of. +// +// You can optionally include a list of one or more additional policies, specified +// as strings. If you want to include only a list of policies by string, use GetContextKeysForCustomPolicy +// instead. +// +// Note: This operation discloses information about the permissions granted to +// other users. If you do not want users to see other user's permissions, then +// consider allowing them to use GetContextKeysForCustomPolicyinstead. +// +// Context keys are variables maintained by Amazon Web Services and its services +// that provide details about the context of an API query request. Context keys can +// be evaluated by testing against a value in an IAM policy. Use GetContextKeysForPrincipalPolicyto understand +// what key names and values you must supply when you call SimulatePrincipalPolicy. func (c *Client) GetContextKeysForPrincipalPolicy(ctx context.Context, params *GetContextKeysForPrincipalPolicyInput, optFns ...func(*Options)) (*GetContextKeysForPrincipalPolicyOutput, error) { if params == nil { params = &GetContextKeysForPrincipalPolicyInput{} @@ -47,30 +50,38 @@ type GetContextKeysForPrincipalPolicyInput struct { // groups that the user is a member of. If you pick a group or a role, then it // includes only those context keys that are found in policies attached to that // entity. Note that all parameters are shown in unencoded form here for clarity, - // but must be URL encoded to be included as a part of a real HTML request. For - // more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // but must be URL encoded to be included as a part of a real HTML request. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. PolicySourceArn *string // An optional list of additional policies for which you want the list of context - // keys that are referenced. The regex pattern (http://wikipedia.org/wiki/regex) - // used to validate this parameter is a string of characters consisting of the - // following: + // keys that are referenced. + // + // The [regex pattern] used to validate this parameter is a string of characters consisting of + // the following: + // // - Any printable ASCII character ranging from the space character ( \u0020 ) // through the end of the ASCII character range + // // - The printable characters in the Basic Latin and Latin-1 Supplement // character set (through \u00FF ) + // // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage // return ( \u000D ) + // + // [regex pattern]: http://wikipedia.org/wiki/regex PolicyInputList []string noSmithyDocumentSerde } -// Contains the response to a successful GetContextKeysForPrincipalPolicy or -// GetContextKeysForCustomPolicy request. +// Contains the response to a successful GetContextKeysForPrincipalPolicy or GetContextKeysForCustomPolicy request. type GetContextKeysForPrincipalPolicyOutput struct { // The list of context keys that are referenced in the input policies. @@ -137,6 +148,12 @@ func (c *Client) addOperationGetContextKeysForPrincipalPolicyMiddlewares(stack * 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 = addOpGetContextKeysForPrincipalPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetCredentialReport.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetCredentialReport.go index c27fffc081..abf7df4649 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetCredentialReport.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetCredentialReport.go @@ -12,9 +12,11 @@ import ( "time" ) -// Retrieves a credential report for the Amazon Web Services account. For more -// information about the credential report, see Getting credential reports (https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html) -// in the IAM User Guide. +// Retrieves a credential report for the Amazon Web Services account. For more +// +// information about the credential report, see [Getting credential reports]in the IAM User Guide. +// +// [Getting credential reports]: https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html func (c *Client) GetCredentialReport(ctx context.Context, params *GetCredentialReportInput, optFns ...func(*Options)) (*GetCredentialReportOutput, error) { if params == nil { params = &GetCredentialReportInput{} @@ -40,8 +42,9 @@ type GetCredentialReportOutput struct { // Contains the credential report. The report is Base64-encoded. Content []byte - // The date and time when the credential report was created, in ISO 8601 date-time - // format (http://www.iso.org/iso/iso8601) . + // The date and time when the credential report was created, in [ISO 8601 date-time format]. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 GeneratedTime *time.Time // The format (MIME type) of the credential report. @@ -108,6 +111,12 @@ func (c *Client) addOperationGetCredentialReportMiddlewares(stack *middleware.St 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCredentialReport(options.Region), middleware.Before); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroup.go index 5edf08a30b..ab844d0023 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroup.go @@ -11,7 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Returns a list of IAM users that are in the specified IAM group. You can +// Returns a list of IAM users that are in the specified IAM group. You can +// // paginate the results using the MaxItems and Marker parameters. func (c *Client) GetGroup(ctx context.Context, params *GetGroupInput, optFns ...func(*Options)) (*GetGroupOutput, error) { if params == nil { @@ -30,10 +31,13 @@ func (c *Client) GetGroup(ctx context.Context, params *GetGroupInput, optFns ... type GetGroupInput struct { - // The name of the group. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // The name of the group. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. GroupName *string @@ -46,11 +50,13 @@ type GetGroupInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 noSmithyDocumentSerde @@ -142,6 +148,12 @@ func (c *Client) addOperationGetGroupMiddlewares(stack *middleware.Stack, option 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 = addOpGetGroupValidationMiddleware(stack); err != nil { return err } @@ -166,22 +178,17 @@ func (c *Client) addOperationGetGroupMiddlewares(stack *middleware.Stack, option return nil } -// GetGroupAPIClient is a client that implements the GetGroup operation. -type GetGroupAPIClient interface { - GetGroup(context.Context, *GetGroupInput, ...func(*Options)) (*GetGroupOutput, error) -} - -var _ GetGroupAPIClient = (*Client)(nil) - // GetGroupPaginatorOptions is the paginator options for GetGroup type GetGroupPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -242,6 +249,9 @@ func (p *GetGroupPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetGroup(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +271,13 @@ func (p *GetGroupPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// GetGroupAPIClient is a client that implements the GetGroup operation. +type GetGroupAPIClient interface { + GetGroup(context.Context, *GetGroupInput, ...func(*Options)) (*GetGroupOutput, error) +} + +var _ GetGroupAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroupPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroupPolicy.go index 9f9386196f..fd01808e8a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroupPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroupPolicy.go @@ -11,17 +11,22 @@ import ( ) // Retrieves the specified inline policy document that is embedded in the -// specified IAM group. Policies returned by this operation are URL-encoded -// compliant with RFC 3986 (https://tools.ietf.org/html/rfc3986) . You can use a -// URL decoding method to convert the policy back to plain JSON text. For example, -// if you use Java, you can use the decode method of the java.net.URLDecoder -// utility class in the Java SDK. Other languages and SDKs provide similar -// functionality. An IAM group can also have managed policies attached to it. To -// retrieve a managed policy document that is attached to a group, use GetPolicy -// to determine the policy's default version, then use GetPolicyVersion to -// retrieve the policy document. For more information about policies, see Managed -// policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. +// specified IAM group. +// +// Policies returned by this operation are URL-encoded compliant with [RFC 3986]. You can +// use a URL decoding method to convert the policy back to plain JSON text. For +// example, if you use Java, you can use the decode method of the +// java.net.URLDecoder utility class in the Java SDK. Other languages and SDKs +// provide similar functionality. +// +// An IAM group can also have managed policies attached to it. To retrieve a +// managed policy document that is attached to a group, use GetPolicyto determine the +// policy's default version, then use GetPolicyVersionto retrieve the policy document. +// +// For more information about policies, see [Managed policies and inline policies] in the IAM User Guide. +// +// [RFC 3986]: https://tools.ietf.org/html/rfc3986 +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) GetGroupPolicy(ctx context.Context, params *GetGroupPolicyInput, optFns ...func(*Options)) (*GetGroupPolicyOutput, error) { if params == nil { params = &GetGroupPolicyInput{} @@ -39,18 +44,24 @@ func (c *Client) GetGroupPolicy(ctx context.Context, params *GetGroupPolicyInput type GetGroupPolicyInput struct { - // The name of the group the policy is associated with. This parameter allows - // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of - // characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the group the policy is associated with. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. GroupName *string - // The name of the policy document to get. This parameter allows (through its - // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters - // consisting of upper and lowercase alphanumeric characters with no spaces. You - // can also include any of the following characters: _+=,.@- + // The name of the policy document to get. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. PolicyName *string @@ -66,10 +77,11 @@ type GetGroupPolicyOutput struct { // This member is required. GroupName *string - // The policy document. IAM stores policies in JSON format. However, resources - // that were created using CloudFormation templates can be formatted in YAML. - // CloudFormation always converts a YAML policy to JSON format before submitting it - // to IAM. + // The policy document. + // + // IAM stores policies in JSON format. However, resources that were created using + // CloudFormation templates can be formatted in YAML. CloudFormation always + // converts a YAML policy to JSON format before submitting it to IAM. // // This member is required. PolicyDocument *string @@ -140,6 +152,12 @@ func (c *Client) addOperationGetGroupPolicyMiddlewares(stack *middleware.Stack, 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 = addOpGetGroupPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetInstanceProfile.go index d0da98ceb3..618689e8e8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetInstanceProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetInstanceProfile.go @@ -15,10 +15,12 @@ import ( "time" ) -// Retrieves information about the specified instance profile, including the +// Retrieves information about the specified instance profile, including the +// // instance profile's path, GUID, ARN, and role. For more information about -// instance profiles, see Using instance profiles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) -// in the IAM User Guide. +// instance profiles, see [Using instance profiles]in the IAM User Guide. +// +// [Using instance profiles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html func (c *Client) GetInstanceProfile(ctx context.Context, params *GetInstanceProfileInput, optFns ...func(*Options)) (*GetInstanceProfileOutput, error) { if params == nil { params = &GetInstanceProfileInput{} @@ -36,10 +38,13 @@ func (c *Client) GetInstanceProfile(ctx context.Context, params *GetInstanceProf type GetInstanceProfileInput struct { - // The name of the instance profile to get information about. This parameter - // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string - // of characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the instance profile to get information about. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. InstanceProfileName *string @@ -116,6 +121,12 @@ func (c *Client) addOperationGetInstanceProfileMiddlewares(stack *middleware.Sta 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 = addOpGetInstanceProfileValidationMiddleware(stack); err != nil { return err } @@ -140,14 +151,6 @@ func (c *Client) addOperationGetInstanceProfileMiddlewares(stack *middleware.Sta return nil } -// GetInstanceProfileAPIClient is a client that implements the GetInstanceProfile -// operation. -type GetInstanceProfileAPIClient interface { - GetInstanceProfile(context.Context, *GetInstanceProfileInput, ...func(*Options)) (*GetInstanceProfileOutput, error) -} - -var _ GetInstanceProfileAPIClient = (*Client)(nil) - // InstanceProfileExistsWaiterOptions are waiter options for // InstanceProfileExistsWaiter type InstanceProfileExistsWaiterOptions struct { @@ -182,12 +185,13 @@ type InstanceProfileExistsWaiterOptions struct { // Retryable is function that can be used to override the service defined // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. + // used by the waiter to decide if a state is retryable or a terminal state. + // + // By default service-modeled logic will populate this option. This option can + // thus be used to define a custom waiter state with fall-back to service-modeled + // waiter state mutators.The function returns an error in case of a failure state. + // In case of retry state, this function returns a bool value of true and nil + // error, while in case of success it returns a bool value of false and nil error. Retryable func(context.Context, *GetInstanceProfileInput, *GetInstanceProfileOutput, error) (bool, error) } @@ -264,7 +268,13 @@ func (w *InstanceProfileExistsWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.GetInstanceProfile(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -316,6 +326,14 @@ func instanceProfileExistsStateRetryable(ctx context.Context, input *GetInstance return true, nil } +// GetInstanceProfileAPIClient is a client that implements the GetInstanceProfile +// operation. +type GetInstanceProfileAPIClient interface { + GetInstanceProfile(context.Context, *GetInstanceProfileInput, ...func(*Options)) (*GetInstanceProfileOutput, error) +} + +var _ GetInstanceProfileAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetInstanceProfile(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetLoginProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetLoginProfile.go index b9e498b3e1..a67e9852c2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetLoginProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetLoginProfile.go @@ -14,13 +14,16 @@ import ( // Retrieves the user name for the specified IAM user. A login profile is created // when you create a password for the user to access the Amazon Web Services // Management Console. If the user does not exist or does not have a password, the -// operation returns a 404 ( NoSuchEntity ) error. If you create an IAM user with -// access to the console, the CreateDate reflects the date you created the initial -// password for the user. If you create an IAM user with programmatic access, and -// then later add a password for the user to access the Amazon Web Services -// Management Console, the CreateDate reflects the initial password creation date. -// A user with programmatic access does not have a login profile unless you create -// a password for the user to access the Amazon Web Services Management Console. +// operation returns a 404 ( NoSuchEntity ) error. +// +// If you create an IAM user with access to the console, the CreateDate reflects +// the date you created the initial password for the user. +// +// If you create an IAM user with programmatic access, and then later add a +// password for the user to access the Amazon Web Services Management Console, the +// CreateDate reflects the initial password creation date. A user with programmatic +// access does not have a login profile unless you create a password for the user +// to access the Amazon Web Services Management Console. func (c *Client) GetLoginProfile(ctx context.Context, params *GetLoginProfileInput, optFns ...func(*Options)) (*GetLoginProfileOutput, error) { if params == nil { params = &GetLoginProfileInput{} @@ -38,10 +41,13 @@ func (c *Client) GetLoginProfile(ctx context.Context, params *GetLoginProfileInp type GetLoginProfileInput struct { - // The name of the user whose login profile you want to retrieve. This parameter - // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string - // of characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the user whose login profile you want to retrieve. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -118,6 +124,12 @@ func (c *Client) addOperationGetLoginProfileMiddlewares(stack *middleware.Stack, 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 = addOpGetLoginProfileValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetMFADevice.go index d32d80f004..45d7723491 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetMFADevice.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetMFADevice.go @@ -30,8 +30,9 @@ func (c *Client) GetMFADevice(ctx context.Context, params *GetMFADeviceInput, op type GetMFADeviceInput struct { // Serial number that uniquely identifies the MFA device. For this API, we only - // accept FIDO security key ARNs (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html) - // . + // accept FIDO security key [ARNs]. + // + // [ARNs]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html // // This member is required. SerialNumber *string @@ -45,15 +46,17 @@ type GetMFADeviceInput struct { type GetMFADeviceOutput struct { // Serial number that uniquely identifies the MFA device. For this API, we only - // accept FIDO security key ARNs (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html) - // . + // accept FIDO security key [ARNs]. + // + // [ARNs]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html // // This member is required. SerialNumber *string // The certifications of a specified user's MFA device. We currently provide - // FIPS-140-2, FIPS-140-3, and FIDO certification levels obtained from FIDO - // Alliance Metadata Service (MDS) (https://fidoalliance.org/metadata/) . + // FIPS-140-2, FIPS-140-3, and FIDO certification levels obtained from [FIDO Alliance Metadata Service (MDS)]. + // + // [FIDO Alliance Metadata Service (MDS)]: https://fidoalliance.org/metadata/ Certifications map[string]string // The date that a specified user's MFA device was first enabled. @@ -123,6 +126,12 @@ func (c *Client) addOperationGetMFADeviceMiddlewares(stack *middleware.Stack, op 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 = addOpGetMFADeviceValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOpenIDConnectProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOpenIDConnectProvider.go index 81ed6e1bdc..4f5cf7480b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOpenIDConnectProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOpenIDConnectProvider.go @@ -33,9 +33,12 @@ type GetOpenIDConnectProviderInput struct { // The Amazon Resource Name (ARN) of the OIDC provider resource object in IAM to // get information for. You can get a list of OIDC provider resource ARNs by using - // the ListOpenIDConnectProviders operation. For more information about ARNs, see - // Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // the ListOpenIDConnectProvidersoperation. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. OpenIDConnectProviderArn *string @@ -47,8 +50,7 @@ type GetOpenIDConnectProviderInput struct { type GetOpenIDConnectProviderOutput struct { // A list of client IDs (also known as audiences) that are associated with the - // specified IAM OIDC provider resource object. For more information, see - // CreateOpenIDConnectProvider . + // specified IAM OIDC provider resource object. For more information, see CreateOpenIDConnectProvider. ClientIDList []string // The date and time when the IAM OIDC provider resource object was created in the @@ -57,17 +59,17 @@ type GetOpenIDConnectProviderOutput struct { // A list of tags that are attached to the specified IAM OIDC provider. The // returned list of tags is sorted by tag key. For more information about tagging, - // see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. + // see [Tagging IAM resources]in the IAM User Guide. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []types.Tag // A list of certificate thumbprints that are associated with the specified IAM - // OIDC provider resource object. For more information, see - // CreateOpenIDConnectProvider . + // OIDC provider resource object. For more information, see CreateOpenIDConnectProvider. ThumbprintList []string // The URL that the IAM OIDC provider resource object is associated with. For more - // information, see CreateOpenIDConnectProvider . + // information, see CreateOpenIDConnectProvider. Url *string // Metadata pertaining to the operation's result. @@ -131,6 +133,12 @@ func (c *Client) addOperationGetOpenIDConnectProviderMiddlewares(stack *middlewa 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 = addOpGetOpenIDConnectProviderValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOrganizationsAccessReport.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOrganizationsAccessReport.go index 007b348cf6..60e6b989d5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOrganizationsAccessReport.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOrganizationsAccessReport.go @@ -13,20 +13,26 @@ import ( ) // Retrieves the service last accessed data report for Organizations that was -// previously generated using the GenerateOrganizationsAccessReport operation. -// This operation retrieves the status of your report job and the report contents. +// previously generated using the GenerateOrganizationsAccessReportoperation. This operation retrieves the status +// of your report job and the report contents. +// // Depending on the parameters that you passed when you generated the report, the -// data returned could include different information. For details, see -// GenerateOrganizationsAccessReport . To call this operation, you must be signed -// in to the management account in your organization. SCPs must be enabled for your -// organization root. You must have permissions to perform this operation. For more -// information, see Refining permissions using service last accessed data (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html) -// in the IAM User Guide. For each service that principals in an account (root -// user, IAM users, or IAM roles) could access using SCPs, the operation returns -// details about the most recent access attempt. If there was no attempt, the -// service is listed without details about the most recent attempt to access the -// service. If the operation fails, it returns the reason that it failed. By -// default, the list is sorted by service namespace. +// data returned could include different information. For details, see GenerateOrganizationsAccessReport. +// +// To call this operation, you must be signed in to the management account in your +// organization. SCPs must be enabled for your organization root. You must have +// permissions to perform this operation. For more information, see [Refining permissions using service last accessed data]in the IAM +// User Guide. +// +// For each service that principals in an account (root user, IAM users, or IAM +// roles) could access using SCPs, the operation returns details about the most +// recent access attempt. If there was no attempt, the service is listed without +// details about the most recent attempt to access the service. If the operation +// fails, it returns the reason that it failed. +// +// By default, the list is sorted by service namespace. +// +// [Refining permissions using service last accessed data]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html func (c *Client) GetOrganizationsAccessReport(ctx context.Context, params *GetOrganizationsAccessReportInput, optFns ...func(*Options)) (*GetOrganizationsAccessReportOutput, error) { if params == nil { params = &GetOrganizationsAccessReportInput{} @@ -44,8 +50,7 @@ func (c *Client) GetOrganizationsAccessReport(ctx context.Context, params *GetOr type GetOrganizationsAccessReportInput struct { - // The identifier of the request generated by the GenerateOrganizationsAccessReport - // operation. + // The identifier of the request generated by the GenerateOrganizationsAccessReport operation. // // This member is required. JobId *string @@ -58,11 +63,13 @@ type GetOrganizationsAccessReportInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 // The key that is used to sort the results. If you choose the namespace key, the @@ -75,8 +82,9 @@ type GetOrganizationsAccessReportInput struct { type GetOrganizationsAccessReportOutput struct { - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // , when the report job was created. + // The date and time, in [ISO 8601 date-time format], when the report job was created. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 // // This member is required. JobCreationDate *time.Time @@ -90,10 +98,9 @@ type GetOrganizationsAccessReportOutput struct { // service. AccessDetails []types.AccessDetail - // Contains information about the reason that the operation failed. This data type - // is used as a response element in the GetOrganizationsAccessReport , - // GetServiceLastAccessedDetails , and GetServiceLastAccessedDetailsWithEntities - // operations. + // Contains information about the reason that the operation failed. + // + // This data type is used as a response element in the GetOrganizationsAccessReport, GetServiceLastAccessedDetails, and GetServiceLastAccessedDetailsWithEntities operations. ErrorDetails *types.ErrorDetails // A flag that indicates whether there are more items to return. If your results @@ -104,9 +111,12 @@ type GetOrganizationsAccessReportOutput struct { // receive all your results. IsTruncated bool - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // , when the generated report job was completed or failed. This field is null if - // the job is still in progress, as indicated by a job status value of IN_PROGRESS . + // The date and time, in [ISO 8601 date-time format], when the generated report job was completed or failed. + // + // This field is null if the job is still in progress, as indicated by a job + // status value of IN_PROGRESS . + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 JobCompletionDate *time.Time // When IsTruncated is true , this element is present and contains the value to use @@ -182,6 +192,12 @@ func (c *Client) addOperationGetOrganizationsAccessReportMiddlewares(stack *midd 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 = addOpGetOrganizationsAccessReportValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicy.go index 833b99532a..97bb0a52bb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicy.go @@ -19,14 +19,17 @@ import ( // Retrieves information about the specified managed policy, including the // policy's default version and the total number of IAM users, groups, and roles to // which the policy is attached. To retrieve the list of the specific users, -// groups, and roles that the policy is attached to, use ListEntitiesForPolicy . -// This operation returns metadata about the policy. To retrieve the actual policy -// document for a specific version of the policy, use GetPolicyVersion . This -// operation retrieves information about managed policies. To retrieve information -// about an inline policy that is embedded with an IAM user, group, or role, use -// GetUserPolicy , GetGroupPolicy , or GetRolePolicy . For more information about -// policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. +// groups, and roles that the policy is attached to, use ListEntitiesForPolicy. This operation returns +// metadata about the policy. To retrieve the actual policy document for a specific +// version of the policy, use GetPolicyVersion. +// +// This operation retrieves information about managed policies. To retrieve +// information about an inline policy that is embedded with an IAM user, group, or +// role, use GetUserPolicy, GetGroupPolicy, or GetRolePolicy. +// +// For more information about policies, see [Managed policies and inline policies] in the IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) GetPolicy(ctx context.Context, params *GetPolicyInput, optFns ...func(*Options)) (*GetPolicyOutput, error) { if params == nil { params = &GetPolicyInput{} @@ -45,8 +48,12 @@ func (c *Client) GetPolicy(ctx context.Context, params *GetPolicyInput, optFns . type GetPolicyInput struct { // The Amazon Resource Name (ARN) of the managed policy that you want information - // about. For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // about. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. PolicyArn *string @@ -121,6 +128,12 @@ func (c *Client) addOperationGetPolicyMiddlewares(stack *middleware.Stack, optio 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 = addOpGetPolicyValidationMiddleware(stack); err != nil { return err } @@ -145,13 +158,6 @@ func (c *Client) addOperationGetPolicyMiddlewares(stack *middleware.Stack, optio return nil } -// GetPolicyAPIClient is a client that implements the GetPolicy operation. -type GetPolicyAPIClient interface { - GetPolicy(context.Context, *GetPolicyInput, ...func(*Options)) (*GetPolicyOutput, error) -} - -var _ GetPolicyAPIClient = (*Client)(nil) - // PolicyExistsWaiterOptions are waiter options for PolicyExistsWaiter type PolicyExistsWaiterOptions struct { @@ -184,12 +190,13 @@ type PolicyExistsWaiterOptions struct { // Retryable is function that can be used to override the service defined // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. + // used by the waiter to decide if a state is retryable or a terminal state. + // + // By default service-modeled logic will populate this option. This option can + // thus be used to define a custom waiter state with fall-back to service-modeled + // waiter state mutators.The function returns an error in case of a failure state. + // In case of retry state, this function returns a bool value of true and nil + // error, while in case of success it returns a bool value of false and nil error. Retryable func(context.Context, *GetPolicyInput, *GetPolicyOutput, error) (bool, error) } @@ -265,7 +272,13 @@ func (w *PolicyExistsWaiter) WaitForOutput(ctx context.Context, params *GetPolic } out, err := w.client.GetPolicy(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -322,6 +335,13 @@ func policyExistsStateRetryable(ctx context.Context, input *GetPolicyInput, outp return true, nil } +// GetPolicyAPIClient is a client that implements the GetPolicy operation. +type GetPolicyAPIClient interface { + GetPolicy(context.Context, *GetPolicyInput, ...func(*Options)) (*GetPolicyOutput, error) +} + +var _ GetPolicyAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicyVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicyVersion.go index 9f6b731013..a61c280337 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicyVersion.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicyVersion.go @@ -12,20 +12,27 @@ import ( ) // Retrieves information about the specified version of the specified managed -// policy, including the policy document. Policies returned by this operation are -// URL-encoded compliant with RFC 3986 (https://tools.ietf.org/html/rfc3986) . You -// can use a URL decoding method to convert the policy back to plain JSON text. For +// policy, including the policy document. +// +// Policies returned by this operation are URL-encoded compliant with [RFC 3986]. You can +// use a URL decoding method to convert the policy back to plain JSON text. For // example, if you use Java, you can use the decode method of the // java.net.URLDecoder utility class in the Java SDK. Other languages and SDKs -// provide similar functionality. To list the available versions for a policy, use -// ListPolicyVersions . This operation retrieves information about managed -// policies. To retrieve information about an inline policy that is embedded in a -// user, group, or role, use GetUserPolicy , GetGroupPolicy , or GetRolePolicy . -// For more information about the types of policies, see Managed policies and -// inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. For more information about managed policy versions, see -// Versioning for managed policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) -// in the IAM User Guide. +// provide similar functionality. +// +// To list the available versions for a policy, use ListPolicyVersions. +// +// This operation retrieves information about managed policies. To retrieve +// information about an inline policy that is embedded in a user, group, or role, +// use GetUserPolicy, GetGroupPolicy, or GetRolePolicy. +// +// For more information about the types of policies, see [Managed policies and inline policies] in the IAM User Guide. +// +// For more information about managed policy versions, see [Versioning for managed policies] in the IAM User Guide. +// +// [RFC 3986]: https://tools.ietf.org/html/rfc3986 +// [Versioning for managed policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) GetPolicyVersion(ctx context.Context, params *GetPolicyVersionInput, optFns ...func(*Options)) (*GetPolicyVersionOutput, error) { if params == nil { params = &GetPolicyVersionInput{} @@ -44,16 +51,23 @@ func (c *Client) GetPolicyVersion(ctx context.Context, params *GetPolicyVersionI type GetPolicyVersionInput struct { // The Amazon Resource Name (ARN) of the managed policy that you want information - // about. For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // about. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. PolicyArn *string - // Identifies the policy version to retrieve. This parameter allows (through its - // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters that - // consists of the lowercase letter 'v' followed by one or two digits, and - // optionally followed by a period '.' and a string of letters and digits. + // Identifies the policy version to retrieve. + // + // This parameter allows (through its [regex pattern]) a string of characters that consists of + // the lowercase letter 'v' followed by one or two digits, and optionally followed + // by a period '.' and a string of letters and digits. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. VersionId *string @@ -128,6 +142,12 @@ func (c *Client) addOperationGetPolicyVersionMiddlewares(stack *middleware.Stack 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 = addOpGetPolicyVersionValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRole.go index b8e7667c2f..6d2312d71b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRole.go @@ -18,13 +18,16 @@ import ( // Retrieves information about the specified role, including the role's path, // GUID, ARN, and the role's trust policy that grants permission to assume the -// role. For more information about roles, see IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) -// in the IAM User Guide. Policies returned by this operation are URL-encoded -// compliant with RFC 3986 (https://tools.ietf.org/html/rfc3986) . You can use a -// URL decoding method to convert the policy back to plain JSON text. For example, -// if you use Java, you can use the decode method of the java.net.URLDecoder -// utility class in the Java SDK. Other languages and SDKs provide similar -// functionality. +// role. For more information about roles, see [IAM roles]in the IAM User Guide. +// +// Policies returned by this operation are URL-encoded compliant with [RFC 3986]. You can +// use a URL decoding method to convert the policy back to plain JSON text. For +// example, if you use Java, you can use the decode method of the +// java.net.URLDecoder utility class in the Java SDK. Other languages and SDKs +// provide similar functionality. +// +// [RFC 3986]: https://tools.ietf.org/html/rfc3986 +// [IAM roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html func (c *Client) GetRole(ctx context.Context, params *GetRoleInput, optFns ...func(*Options)) (*GetRoleOutput, error) { if params == nil { params = &GetRoleInput{} @@ -42,10 +45,13 @@ func (c *Client) GetRole(ctx context.Context, params *GetRoleInput, optFns ...fu type GetRoleInput struct { - // The name of the IAM role to get information about. This parameter allows - // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of - // characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the IAM role to get information about. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -122,6 +128,12 @@ func (c *Client) addOperationGetRoleMiddlewares(stack *middleware.Stack, options 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 = addOpGetRoleValidationMiddleware(stack); err != nil { return err } @@ -146,13 +158,6 @@ func (c *Client) addOperationGetRoleMiddlewares(stack *middleware.Stack, options return nil } -// GetRoleAPIClient is a client that implements the GetRole operation. -type GetRoleAPIClient interface { - GetRole(context.Context, *GetRoleInput, ...func(*Options)) (*GetRoleOutput, error) -} - -var _ GetRoleAPIClient = (*Client)(nil) - // RoleExistsWaiterOptions are waiter options for RoleExistsWaiter type RoleExistsWaiterOptions struct { @@ -185,12 +190,13 @@ type RoleExistsWaiterOptions struct { // Retryable is function that can be used to override the service defined // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. + // used by the waiter to decide if a state is retryable or a terminal state. + // + // By default service-modeled logic will populate this option. This option can + // thus be used to define a custom waiter state with fall-back to service-modeled + // waiter state mutators.The function returns an error in case of a failure state. + // In case of retry state, this function returns a bool value of true and nil + // error, while in case of success it returns a bool value of false and nil error. Retryable func(context.Context, *GetRoleInput, *GetRoleOutput, error) (bool, error) } @@ -266,7 +272,13 @@ func (w *RoleExistsWaiter) WaitForOutput(ctx context.Context, params *GetRoleInp } out, err := w.client.GetRole(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -323,6 +335,13 @@ func roleExistsStateRetryable(ctx context.Context, input *GetRoleInput, output * return true, nil } +// GetRoleAPIClient is a client that implements the GetRole operation. +type GetRoleAPIClient interface { + GetRole(context.Context, *GetRoleInput, ...func(*Options)) (*GetRoleOutput, error) +} + +var _ GetRoleAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetRole(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRolePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRolePolicy.go index 567b7f2079..d3cd2878ae 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRolePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRolePolicy.go @@ -11,18 +11,25 @@ import ( ) // Retrieves the specified inline policy document that is embedded with the -// specified IAM role. Policies returned by this operation are URL-encoded -// compliant with RFC 3986 (https://tools.ietf.org/html/rfc3986) . You can use a -// URL decoding method to convert the policy back to plain JSON text. For example, -// if you use Java, you can use the decode method of the java.net.URLDecoder -// utility class in the Java SDK. Other languages and SDKs provide similar -// functionality. An IAM role can also have managed policies attached to it. To -// retrieve a managed policy document that is attached to a role, use GetPolicy to -// determine the policy's default version, then use GetPolicyVersion to retrieve -// the policy document. For more information about policies, see Managed policies -// and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. For more information about roles, see IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) -// in the IAM User Guide. +// specified IAM role. +// +// Policies returned by this operation are URL-encoded compliant with [RFC 3986]. You can +// use a URL decoding method to convert the policy back to plain JSON text. For +// example, if you use Java, you can use the decode method of the +// java.net.URLDecoder utility class in the Java SDK. Other languages and SDKs +// provide similar functionality. +// +// An IAM role can also have managed policies attached to it. To retrieve a +// managed policy document that is attached to a role, use GetPolicyto determine the +// policy's default version, then use GetPolicyVersionto retrieve the policy document. +// +// For more information about policies, see [Managed policies and inline policies] in the IAM User Guide. +// +// For more information about roles, see [IAM roles] in the IAM User Guide. +// +// [RFC 3986]: https://tools.ietf.org/html/rfc3986 +// [IAM roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) GetRolePolicy(ctx context.Context, params *GetRolePolicyInput, optFns ...func(*Options)) (*GetRolePolicyOutput, error) { if params == nil { params = &GetRolePolicyInput{} @@ -40,18 +47,24 @@ func (c *Client) GetRolePolicy(ctx context.Context, params *GetRolePolicyInput, type GetRolePolicyInput struct { - // The name of the policy document to get. This parameter allows (through its - // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters - // consisting of upper and lowercase alphanumeric characters with no spaces. You - // can also include any of the following characters: _+=,.@- + // The name of the policy document to get. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. PolicyName *string - // The name of the role associated with the policy. This parameter allows (through - // its regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters - // consisting of upper and lowercase alphanumeric characters with no spaces. You - // can also include any of the following characters: _+=,.@- + // The name of the role associated with the policy. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -62,10 +75,11 @@ type GetRolePolicyInput struct { // Contains the response to a successful GetRolePolicy request. type GetRolePolicyOutput struct { - // The policy document. IAM stores policies in JSON format. However, resources - // that were created using CloudFormation templates can be formatted in YAML. - // CloudFormation always converts a YAML policy to JSON format before submitting it - // to IAM. + // The policy document. + // + // IAM stores policies in JSON format. However, resources that were created using + // CloudFormation templates can be formatted in YAML. CloudFormation always + // converts a YAML policy to JSON format before submitting it to IAM. // // This member is required. PolicyDocument *string @@ -141,6 +155,12 @@ func (c *Client) addOperationGetRolePolicyMiddlewares(stack *middleware.Stack, o 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 = addOpGetRolePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSAMLProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSAMLProvider.go index b5432021f7..08fa99e4aa 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSAMLProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSAMLProvider.go @@ -13,9 +13,11 @@ import ( ) // Returns the SAML provider metadocument that was uploaded when the IAM SAML -// provider resource object was created or updated. This operation requires -// Signature Version 4 (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html) -// . +// provider resource object was created or updated. +// +// This operation requires [Signature Version 4]. +// +// [Signature Version 4]: https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html func (c *Client) GetSAMLProvider(ctx context.Context, params *GetSAMLProviderInput, optFns ...func(*Options)) (*GetSAMLProviderOutput, error) { if params == nil { params = &GetSAMLProviderInput{} @@ -34,9 +36,12 @@ func (c *Client) GetSAMLProvider(ctx context.Context, params *GetSAMLProviderInp type GetSAMLProviderInput struct { // The Amazon Resource Name (ARN) of the SAML provider resource object in IAM to - // get information about. For more information about ARNs, see Amazon Resource - // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // get information about. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. SAMLProviderArn *string @@ -55,8 +60,9 @@ type GetSAMLProviderOutput struct { // A list of tags that are attached to the specified IAM SAML provider. The // returned list of tags is sorted by tag key. For more information about tagging, - // see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. + // see [Tagging IAM resources]in the IAM User Guide. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []types.Tag // The expiration date and time for the SAML provider. @@ -123,6 +129,12 @@ func (c *Client) addOperationGetSAMLProviderMiddlewares(stack *middleware.Stack, 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 = addOpGetSAMLProviderValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSSHPublicKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSSHPublicKey.go index 5d9134b6dc..7bc9673d0b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSSHPublicKey.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSSHPublicKey.go @@ -11,12 +11,14 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves the specified SSH public key, including metadata about the key. The -// SSH public key retrieved by this operation is used only for authenticating the -// associated IAM user to an CodeCommit repository. For more information about -// using SSH keys to authenticate to an CodeCommit repository, see Set up -// CodeCommit for SSH connections (https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html) -// in the CodeCommit User Guide. +// Retrieves the specified SSH public key, including metadata about the key. +// +// The SSH public key retrieved by this operation is used only for authenticating +// the associated IAM user to an CodeCommit repository. For more information about +// using SSH keys to authenticate to an CodeCommit repository, see [Set up CodeCommit for SSH connections]in the +// CodeCommit User Guide. +// +// [Set up CodeCommit for SSH connections]: https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html func (c *Client) GetSSHPublicKey(ctx context.Context, params *GetSSHPublicKeyInput, optFns ...func(*Options)) (*GetSSHPublicKeyOutput, error) { if params == nil { params = &GetSSHPublicKeyInput{} @@ -41,17 +43,23 @@ type GetSSHPublicKeyInput struct { // This member is required. Encoding types.EncodingType - // The unique identifier for the SSH public key. This parameter allows (through - // its regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters - // that can consist of any upper or lowercased letter or digit. + // The unique identifier for the SSH public key. + // + // This parameter allows (through its [regex pattern]) a string of characters that can consist of + // any upper or lowercased letter or digit. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. SSHPublicKeyId *string - // The name of the IAM user associated with the SSH public key. This parameter - // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string - // of characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the IAM user associated with the SSH public key. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -126,6 +134,12 @@ func (c *Client) addOperationGetSSHPublicKeyMiddlewares(stack *middleware.Stack, 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 = addOpGetSSHPublicKeyValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServerCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServerCertificate.go index 94950e6735..22cb7b8cc1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServerCertificate.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServerCertificate.go @@ -11,11 +11,13 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves information about the specified server certificate stored in IAM. For -// more information about working with server certificates, see Working with -// server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) -// in the IAM User Guide. This topic includes a list of Amazon Web Services -// services that can use the server certificates that you manage with IAM. +// Retrieves information about the specified server certificate stored in IAM. +// +// For more information about working with server certificates, see [Working with server certificates] in the IAM +// User Guide. This topic includes a list of Amazon Web Services services that can +// use the server certificates that you manage with IAM. +// +// [Working with server certificates]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html func (c *Client) GetServerCertificate(ctx context.Context, params *GetServerCertificateInput, optFns ...func(*Options)) (*GetServerCertificateOutput, error) { if params == nil { params = &GetServerCertificateInput{} @@ -33,10 +35,13 @@ func (c *Client) GetServerCertificate(ctx context.Context, params *GetServerCert type GetServerCertificateInput struct { - // The name of the server certificate you want to retrieve information about. This - // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- + // The name of the server certificate you want to retrieve information about. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. ServerCertificateName *string @@ -113,6 +118,12 @@ func (c *Client) addOperationGetServerCertificateMiddlewares(stack *middleware.S 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 = addOpGetServerCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetails.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetails.go index 7bc933caf2..f16423db6e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetails.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetails.go @@ -17,35 +17,49 @@ import ( // in GetServiceLastAccessedDetails to retrieve the status of your report job. // When the report is complete, you can retrieve the generated report. The report // includes a list of Amazon Web Services services that the resource (user, group, -// role, or managed policy) can access. Service last accessed data does not use -// other policy types when determining whether a resource could access a service. -// These other policy types include resource-based policies, access control lists, -// Organizations policies, IAM permissions boundaries, and STS assume role -// policies. It only applies permissions policy logic. For more about the -// evaluation of policy types, see Evaluating policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics) -// in the IAM User Guide. For each service that the resource could access using -// permissions policies, the operation returns details about the most recent access -// attempt. If there was no attempt, the service is listed without details about -// the most recent attempt to access the service. If the operation fails, the -// GetServiceLastAccessedDetails operation returns the reason that it failed. The -// GetServiceLastAccessedDetails operation returns a list of services. This list -// includes the number of entities that have attempted to access the service and -// the date and time of the last attempt. It also returns the ARN of the following -// entity, depending on the resource ARN that you used to generate the report: +// role, or managed policy) can access. +// +// Service last accessed data does not use other policy types when determining +// whether a resource could access a service. These other policy types include +// resource-based policies, access control lists, Organizations policies, IAM +// permissions boundaries, and STS assume role policies. It only applies +// permissions policy logic. For more about the evaluation of policy types, see [Evaluating policies]in +// the IAM User Guide. +// +// For each service that the resource could access using permissions policies, the +// operation returns details about the most recent access attempt. If there was no +// attempt, the service is listed without details about the most recent attempt to +// access the service. If the operation fails, the GetServiceLastAccessedDetails +// operation returns the reason that it failed. +// +// The GetServiceLastAccessedDetails operation returns a list of services. This +// list includes the number of entities that have attempted to access the service +// and the date and time of the last attempt. It also returns the ARN of the +// following entity, depending on the resource ARN that you used to generate the +// report: +// // - User – Returns the user ARN that you used to generate the report +// // - Group – Returns the ARN of the group member (user) that last attempted to // access the service +// // - Role – Returns the role ARN that you used to generate the report +// // - Policy – Returns the ARN of the user or role that last used the policy to // attempt to access the service // -// By default, the list is sorted by service namespace. If you specified -// ACTION_LEVEL granularity when you generated the report, this operation returns -// service and action last accessed data. This includes the most recent access -// attempt for each tracked action within a service. Otherwise, this operation -// returns only service data. For more information about service and action last -// accessed data, see Reducing permissions using service last accessed data (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html) -// in the IAM User Guide. +// By default, the list is sorted by service namespace. +// +// If you specified ACTION_LEVEL granularity when you generated the report, this +// operation returns service and action last accessed data. This includes the most +// recent access attempt for each tracked action within a service. Otherwise, this +// operation returns only service data. +// +// For more information about service and action last accessed data, see [Reducing permissions using service last accessed data] in the +// IAM User Guide. +// +// [Reducing permissions using service last accessed data]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html +// [Evaluating policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics func (c *Client) GetServiceLastAccessedDetails(ctx context.Context, params *GetServiceLastAccessedDetailsInput, optFns ...func(*Options)) (*GetServiceLastAccessedDetailsOutput, error) { if params == nil { params = &GetServiceLastAccessedDetailsInput{} @@ -63,10 +77,9 @@ func (c *Client) GetServiceLastAccessedDetails(ctx context.Context, params *GetS type GetServiceLastAccessedDetailsInput struct { - // The ID of the request generated by the GenerateServiceLastAccessedDetails - // operation. The JobId returned by GenerateServiceLastAccessedDetail must be used - // by the same role within a session, or by the same user when used to call - // GetServiceLastAccessedDetail . + // The ID of the request generated by the GenerateServiceLastAccessedDetails operation. The JobId returned by + // GenerateServiceLastAccessedDetail must be used by the same role within a + // session, or by the same user when used to call GetServiceLastAccessedDetail . // // This member is required. JobId *string @@ -79,11 +92,13 @@ type GetServiceLastAccessedDetailsInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 noSmithyDocumentSerde @@ -91,15 +106,19 @@ type GetServiceLastAccessedDetailsInput struct { type GetServiceLastAccessedDetailsOutput struct { - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // , when the generated report job was completed or failed. This field is null if - // the job is still in progress, as indicated by a job status value of IN_PROGRESS . + // The date and time, in [ISO 8601 date-time format], when the generated report job was completed or failed. + // + // This field is null if the job is still in progress, as indicated by a job + // status value of IN_PROGRESS . + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 // // This member is required. JobCompletionDate *time.Time - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // , when the report job was created. + // The date and time, in [ISO 8601 date-time format], when the report job was created. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 // // This member is required. JobCreationDate *time.Time @@ -109,7 +128,7 @@ type GetServiceLastAccessedDetailsOutput struct { // This member is required. JobStatus types.JobStatusType - // A ServiceLastAccessed object that contains details about the most recent + // A ServiceLastAccessed object that contains details about the most recent // attempt to access the service. // // This member is required. @@ -196,6 +215,12 @@ func (c *Client) addOperationGetServiceLastAccessedDetailsMiddlewares(stack *mid 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 = addOpGetServiceLastAccessedDetailsValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetailsWithEntities.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetailsWithEntities.go index 7f48701d22..3fa77e9ece 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetailsWithEntities.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetailsWithEntities.go @@ -17,18 +17,23 @@ import ( // in GetServiceLastAccessedDetailsWithEntities . This operation retrieves the // status of your report job and a list of entities that could have used group or // policy permissions to access the specified service. +// // - Group – For a group report, this operation returns a list of users in the // group that could have used the group’s policies in an attempt to access the // service. +// // - Policy – For a policy report, this operation returns a list of entities // (users or roles) that could have used the policy in an attempt to access the // service. // // You can also use this operation for user or role reports to retrieve details -// about those entities. If the operation fails, the -// GetServiceLastAccessedDetailsWithEntities operation returns the reason that it -// failed. By default, the list of associated entities is sorted by date, with the -// most recent access listed first. +// about those entities. +// +// If the operation fails, the GetServiceLastAccessedDetailsWithEntities operation +// returns the reason that it failed. +// +// By default, the list of associated entities is sorted by date, with the most +// recent access listed first. func (c *Client) GetServiceLastAccessedDetailsWithEntities(ctx context.Context, params *GetServiceLastAccessedDetailsWithEntitiesInput, optFns ...func(*Options)) (*GetServiceLastAccessedDetailsWithEntitiesOutput, error) { if params == nil { params = &GetServiceLastAccessedDetailsWithEntitiesInput{} @@ -54,13 +59,16 @@ type GetServiceLastAccessedDetailsWithEntitiesInput struct { // The service namespace for an Amazon Web Services service. Provide the service // namespace to learn when the IAM entity last attempted to access the specified - // service. To learn the service namespace for a service, see Actions, resources, - // and condition keys for Amazon Web Services services (https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html) - // in the IAM User Guide. Choose the name of the service to view details for that - // service. In the first paragraph, find the service prefix. For example, (service - // prefix: a4b) . For more information about service namespaces, see Amazon Web - // Services service namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. + // service. + // + // To learn the service namespace for a service, see [Actions, resources, and condition keys for Amazon Web Services services] in the IAM User Guide. + // Choose the name of the service to view details for that service. In the first + // paragraph, find the service prefix. For example, (service prefix: a4b) . For + // more information about service namespaces, see [Amazon Web Services service namespaces]in the Amazon Web Services + // General Reference. + // + // [Amazon Web Services service namespaces]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces + // [Actions, resources, and condition keys for Amazon Web Services services]: https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html // // This member is required. ServiceNamespace *string @@ -73,11 +81,13 @@ type GetServiceLastAccessedDetailsWithEntitiesInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 noSmithyDocumentSerde @@ -92,15 +102,19 @@ type GetServiceLastAccessedDetailsWithEntitiesOutput struct { // This member is required. EntityDetailsList []types.EntityDetails - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // , when the generated report job was completed or failed. This field is null if - // the job is still in progress, as indicated by a job status value of IN_PROGRESS . + // The date and time, in [ISO 8601 date-time format], when the generated report job was completed or failed. + // + // This field is null if the job is still in progress, as indicated by a job + // status value of IN_PROGRESS . + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 // // This member is required. JobCompletionDate *time.Time - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // , when the report job was created. + // The date and time, in [ISO 8601 date-time format], when the report job was created. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 // // This member is required. JobCreationDate *time.Time @@ -186,6 +200,12 @@ func (c *Client) addOperationGetServiceLastAccessedDetailsWithEntitiesMiddleware 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 = addOpGetServiceLastAccessedDetailsWithEntitiesValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLinkedRoleDeletionStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLinkedRoleDeletionStatus.go index 2b3777c644..59a4503cfa 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLinkedRoleDeletionStatus.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLinkedRoleDeletionStatus.go @@ -11,11 +11,11 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves the status of your service-linked role deletion. After you use -// DeleteServiceLinkedRole to submit a service-linked role for deletion, you can -// use the DeletionTaskId parameter in GetServiceLinkedRoleDeletionStatus to check -// the status of the deletion. If the deletion fails, this operation returns the -// reason that it failed, if that information is returned by the service. +// Retrieves the status of your service-linked role deletion. After you use DeleteServiceLinkedRole to +// submit a service-linked role for deletion, you can use the DeletionTaskId +// parameter in GetServiceLinkedRoleDeletionStatus to check the status of the +// deletion. If the deletion fails, this operation returns the reason that it +// failed, if that information is returned by the service. func (c *Client) GetServiceLinkedRoleDeletionStatus(ctx context.Context, params *GetServiceLinkedRoleDeletionStatusInput, optFns ...func(*Options)) (*GetServiceLinkedRoleDeletionStatusOutput, error) { if params == nil { params = &GetServiceLinkedRoleDeletionStatusInput{} @@ -33,8 +33,8 @@ func (c *Client) GetServiceLinkedRoleDeletionStatus(ctx context.Context, params type GetServiceLinkedRoleDeletionStatusInput struct { - // The deletion task identifier. This identifier is returned by the - // DeleteServiceLinkedRole operation in the format task/aws-service-role/// . + // The deletion task identifier. This identifier is returned by the DeleteServiceLinkedRole operation in + // the format task/aws-service-role/// . // // This member is required. DeletionTaskId *string @@ -113,6 +113,12 @@ func (c *Client) addOperationGetServiceLinkedRoleDeletionStatusMiddlewares(stack 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 = addOpGetServiceLinkedRoleDeletionStatusValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUser.go index 8346bcf6ef..f4d8b71216 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUser.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUser.go @@ -17,9 +17,11 @@ import ( ) // Retrieves information about the specified IAM user, including the user's -// creation date, path, unique ID, and ARN. If you do not specify a user name, IAM -// determines the user name implicitly based on the Amazon Web Services access key -// ID used to sign the request to this operation. +// creation date, path, unique ID, and ARN. +// +// If you do not specify a user name, IAM determines the user name implicitly +// based on the Amazon Web Services access key ID used to sign the request to this +// operation. func (c *Client) GetUser(ctx context.Context, params *GetUserInput, optFns ...func(*Options)) (*GetUserOutput, error) { if params == nil { params = &GetUserInput{} @@ -37,11 +39,14 @@ func (c *Client) GetUser(ctx context.Context, params *GetUserInput, optFns ...fu type GetUserInput struct { - // The name of the user to get information about. This parameter is optional. If - // it is not included, it defaults to the user making the request. This parameter - // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string - // of characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the user to get information about. + // + // This parameter is optional. If it is not included, it defaults to the user + // making the request. This parameter allows (through its [regex pattern]) a string of characters + // consisting of upper and lowercase alphanumeric characters with no spaces. You + // can also include any of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex UserName *string noSmithyDocumentSerde @@ -50,21 +55,26 @@ type GetUserInput struct { // Contains the response to a successful GetUser request. type GetUserOutput struct { - // A structure containing details about the IAM user. Due to a service issue, - // password last used data does not include password use from May 3, 2018 22:50 PDT - // to May 23, 2018 14:08 PDT. This affects last sign-in (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_finding-unused.html) - // dates shown in the IAM console and password last used dates in the IAM - // credential report (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html) - // , and returned by this operation. If users signed in during the affected time, - // the password last used date that is returned is the date the user last signed in - // before May 3, 2018. For users that signed in after May 23, 2018 14:08 PDT, the - // returned password last used date is accurate. You can use password last used - // information to identify unused credentials for deletion. For example, you might - // delete users who did not sign in to Amazon Web Services in the last 90 days. In - // cases like this, we recommend that you adjust your evaluation window to include - // dates after May 23, 2018. Alternatively, if your users use access keys to access - // Amazon Web Services programmatically you can refer to access key last used - // information because it is accurate for all dates. + // A structure containing details about the IAM user. + // + // Due to a service issue, password last used data does not include password use + // from May 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects [last sign-in]dates shown + // in the IAM console and password last used dates in the [IAM credential report], and returned by this + // operation. If users signed in during the affected time, the password last used + // date that is returned is the date the user last signed in before May 3, 2018. + // For users that signed in after May 23, 2018 14:08 PDT, the returned password + // last used date is accurate. + // + // You can use password last used information to identify unused credentials for + // deletion. For example, you might delete users who did not sign in to Amazon Web + // Services in the last 90 days. In cases like this, we recommend that you adjust + // your evaluation window to include dates after May 23, 2018. Alternatively, if + // your users use access keys to access Amazon Web Services programmatically you + // can refer to access key last used information because it is accurate for all + // dates. + // + // [IAM credential report]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html + // [last sign-in]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_finding-unused.html // // This member is required. User *types.User @@ -130,6 +140,12 @@ func (c *Client) addOperationGetUserMiddlewares(stack *middleware.Stack, options 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opGetUser(options.Region), middleware.Before); err != nil { return err } @@ -151,13 +167,6 @@ func (c *Client) addOperationGetUserMiddlewares(stack *middleware.Stack, options return nil } -// GetUserAPIClient is a client that implements the GetUser operation. -type GetUserAPIClient interface { - GetUser(context.Context, *GetUserInput, ...func(*Options)) (*GetUserOutput, error) -} - -var _ GetUserAPIClient = (*Client)(nil) - // UserExistsWaiterOptions are waiter options for UserExistsWaiter type UserExistsWaiterOptions struct { @@ -190,12 +199,13 @@ type UserExistsWaiterOptions struct { // Retryable is function that can be used to override the service defined // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. + // used by the waiter to decide if a state is retryable or a terminal state. + // + // By default service-modeled logic will populate this option. This option can + // thus be used to define a custom waiter state with fall-back to service-modeled + // waiter state mutators.The function returns an error in case of a failure state. + // In case of retry state, this function returns a bool value of true and nil + // error, while in case of success it returns a bool value of false and nil error. Retryable func(context.Context, *GetUserInput, *GetUserOutput, error) (bool, error) } @@ -271,7 +281,13 @@ func (w *UserExistsWaiter) WaitForOutput(ctx context.Context, params *GetUserInp } out, err := w.client.GetUser(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -328,6 +344,13 @@ func userExistsStateRetryable(ctx context.Context, input *GetUserInput, output * return true, nil } +// GetUserAPIClient is a client that implements the GetUser operation. +type GetUserAPIClient interface { + GetUser(context.Context, *GetUserInput, ...func(*Options)) (*GetUserOutput, error) +} + +var _ GetUserAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetUser(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUserPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUserPolicy.go index 22854dda97..05d46d641a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUserPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUserPolicy.go @@ -11,17 +11,22 @@ import ( ) // Retrieves the specified inline policy document that is embedded in the -// specified IAM user. Policies returned by this operation are URL-encoded -// compliant with RFC 3986 (https://tools.ietf.org/html/rfc3986) . You can use a -// URL decoding method to convert the policy back to plain JSON text. For example, -// if you use Java, you can use the decode method of the java.net.URLDecoder -// utility class in the Java SDK. Other languages and SDKs provide similar -// functionality. An IAM user can also have managed policies attached to it. To -// retrieve a managed policy document that is attached to a user, use GetPolicy to -// determine the policy's default version. Then use GetPolicyVersion to retrieve -// the policy document. For more information about policies, see Managed policies -// and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. +// specified IAM user. +// +// Policies returned by this operation are URL-encoded compliant with [RFC 3986]. You can +// use a URL decoding method to convert the policy back to plain JSON text. For +// example, if you use Java, you can use the decode method of the +// java.net.URLDecoder utility class in the Java SDK. Other languages and SDKs +// provide similar functionality. +// +// An IAM user can also have managed policies attached to it. To retrieve a +// managed policy document that is attached to a user, use GetPolicyto determine the +// policy's default version. Then use GetPolicyVersionto retrieve the policy document. +// +// For more information about policies, see [Managed policies and inline policies] in the IAM User Guide. +// +// [RFC 3986]: https://tools.ietf.org/html/rfc3986 +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) GetUserPolicy(ctx context.Context, params *GetUserPolicyInput, optFns ...func(*Options)) (*GetUserPolicyOutput, error) { if params == nil { params = &GetUserPolicyInput{} @@ -39,18 +44,24 @@ func (c *Client) GetUserPolicy(ctx context.Context, params *GetUserPolicyInput, type GetUserPolicyInput struct { - // The name of the policy document to get. This parameter allows (through its - // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters - // consisting of upper and lowercase alphanumeric characters with no spaces. You - // can also include any of the following characters: _+=,.@- + // The name of the policy document to get. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. PolicyName *string - // The name of the user who the policy is associated with. This parameter allows - // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of - // characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the user who the policy is associated with. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -61,10 +72,11 @@ type GetUserPolicyInput struct { // Contains the response to a successful GetUserPolicy request. type GetUserPolicyOutput struct { - // The policy document. IAM stores policies in JSON format. However, resources - // that were created using CloudFormation templates can be formatted in YAML. - // CloudFormation always converts a YAML policy to JSON format before submitting it - // to IAM. + // The policy document. + // + // IAM stores policies in JSON format. However, resources that were created using + // CloudFormation templates can be formatted in YAML. CloudFormation always + // converts a YAML policy to JSON format before submitting it to IAM. // // This member is required. PolicyDocument *string @@ -140,6 +152,12 @@ func (c *Client) addOperationGetUserPolicyMiddlewares(stack *middleware.Stack, o 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 = addOpGetUserPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccessKeys.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccessKeys.go index fa23681079..5b5f619aa7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccessKeys.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccessKeys.go @@ -12,17 +12,22 @@ import ( ) // Returns information about the access key IDs associated with the specified IAM -// user. If there is none, the operation returns an empty list. Although each user -// is limited to a small number of keys, you can still paginate the results using -// the MaxItems and Marker parameters. If the UserName is not specified, the user -// name is determined implicitly based on the Amazon Web Services access key ID -// used to sign the request. If a temporary access key is used, then UserName is -// required. If a long-term key is assigned to the user, then UserName is not -// required. This operation works for access keys under the Amazon Web Services -// account. If the Amazon Web Services account has no associated users, the root -// user returns it's own access key IDs by running this command. To ensure the -// security of your Amazon Web Services account, the secret access key is -// accessible only during key and user creation. +// user. If there is none, the operation returns an empty list. +// +// Although each user is limited to a small number of keys, you can still paginate +// the results using the MaxItems and Marker parameters. +// +// If the UserName is not specified, the user name is determined implicitly based +// on the Amazon Web Services access key ID used to sign the request. If a +// temporary access key is used, then UserName is required. If a long-term key is +// assigned to the user, then UserName is not required. +// +// This operation works for access keys under the Amazon Web Services account. If +// the Amazon Web Services account has no associated users, the root user returns +// it's own access key IDs by running this command. +// +// To ensure the security of your Amazon Web Services account, the secret access +// key is accessible only during key and user creation. func (c *Client) ListAccessKeys(ctx context.Context, params *ListAccessKeysInput, optFns ...func(*Options)) (*ListAccessKeysOutput, error) { if params == nil { params = &ListAccessKeysInput{} @@ -48,17 +53,22 @@ type ListAccessKeysInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 - // The name of the user. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // The name of the user. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex UserName *string noSmithyDocumentSerde @@ -145,6 +155,12 @@ func (c *Client) addOperationListAccessKeysMiddlewares(stack *middleware.Stack, 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccessKeys(options.Region), middleware.Before); err != nil { return err } @@ -166,23 +182,17 @@ func (c *Client) addOperationListAccessKeysMiddlewares(stack *middleware.Stack, return nil } -// ListAccessKeysAPIClient is a client that implements the ListAccessKeys -// operation. -type ListAccessKeysAPIClient interface { - ListAccessKeys(context.Context, *ListAccessKeysInput, ...func(*Options)) (*ListAccessKeysOutput, error) -} - -var _ ListAccessKeysAPIClient = (*Client)(nil) - // ListAccessKeysPaginatorOptions is the paginator options for ListAccessKeys type ListAccessKeysPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -243,6 +253,9 @@ func (p *ListAccessKeysPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccessKeys(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -262,6 +275,14 @@ func (p *ListAccessKeysPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListAccessKeysAPIClient is a client that implements the ListAccessKeys +// operation. +type ListAccessKeysAPIClient interface { + ListAccessKeys(context.Context, *ListAccessKeysInput, ...func(*Options)) (*ListAccessKeysOutput, error) +} + +var _ ListAccessKeysAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccessKeys(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccountAliases.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccountAliases.go index b8c2c0c231..52f2855fef 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccountAliases.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccountAliases.go @@ -12,9 +12,9 @@ import ( // Lists the account alias associated with the Amazon Web Services account (Note: // you can have only one). For information about using an Amazon Web Services -// account alias, see Creating, deleting, and listing an Amazon Web Services -// account alias (https://docs.aws.amazon.com/signin/latest/userguide/CreateAccountAlias.html) -// in the Amazon Web Services Sign-In User Guide. +// account alias, see [Creating, deleting, and listing an Amazon Web Services account alias]in the IAM User Guide. +// +// [Creating, deleting, and listing an Amazon Web Services account alias]: https://docs.aws.amazon.com/IAM/latest/UserGuide/console_account-alias.html#CreateAccountAlias func (c *Client) ListAccountAliases(ctx context.Context, params *ListAccountAliasesInput, optFns ...func(*Options)) (*ListAccountAliasesOutput, error) { if params == nil { params = &ListAccountAliasesInput{} @@ -40,11 +40,13 @@ type ListAccountAliasesInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 noSmithyDocumentSerde @@ -132,6 +134,12 @@ func (c *Client) addOperationListAccountAliasesMiddlewares(stack *middleware.Sta 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccountAliases(options.Region), middleware.Before); err != nil { return err } @@ -153,24 +161,18 @@ func (c *Client) addOperationListAccountAliasesMiddlewares(stack *middleware.Sta return nil } -// ListAccountAliasesAPIClient is a client that implements the ListAccountAliases -// operation. -type ListAccountAliasesAPIClient interface { - ListAccountAliases(context.Context, *ListAccountAliasesInput, ...func(*Options)) (*ListAccountAliasesOutput, error) -} - -var _ ListAccountAliasesAPIClient = (*Client)(nil) - // ListAccountAliasesPaginatorOptions is the paginator options for // ListAccountAliases type ListAccountAliasesPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -231,6 +233,9 @@ func (p *ListAccountAliasesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccountAliases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +255,14 @@ func (p *ListAccountAliasesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListAccountAliasesAPIClient is a client that implements the ListAccountAliases +// operation. +type ListAccountAliasesAPIClient interface { + ListAccountAliases(context.Context, *ListAccountAliasesInput, ...func(*Options)) (*ListAccountAliasesOutput, error) +} + +var _ ListAccountAliasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccountAliases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedGroupPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedGroupPolicies.go index 638e893df2..1be507e5de 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedGroupPolicies.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedGroupPolicies.go @@ -11,15 +11,19 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists all managed policies that are attached to the specified IAM group. An IAM -// group can also have inline policies embedded with it. To list the inline -// policies for a group, use ListGroupPolicies . For information about policies, -// see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. You can paginate the results using the MaxItems and -// Marker parameters. You can use the PathPrefix parameter to limit the list of -// policies to only those matching the specified path prefix. If there are no -// policies attached to the specified group (or none that match the specified path -// prefix), the operation returns an empty list. +// Lists all managed policies that are attached to the specified IAM group. +// +// An IAM group can also have inline policies embedded with it. To list the inline +// policies for a group, use ListGroupPolicies. For information about policies, see [Managed policies and inline policies] in the IAM +// User Guide. +// +// You can paginate the results using the MaxItems and Marker parameters. You can +// use the PathPrefix parameter to limit the list of policies to only those +// matching the specified path prefix. If there are no policies attached to the +// specified group (or none that match the specified path prefix), the operation +// returns an empty list. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) ListAttachedGroupPolicies(ctx context.Context, params *ListAttachedGroupPoliciesInput, optFns ...func(*Options)) (*ListAttachedGroupPoliciesOutput, error) { if params == nil { params = &ListAttachedGroupPoliciesInput{} @@ -38,10 +42,12 @@ func (c *Client) ListAttachedGroupPolicies(ctx context.Context, params *ListAtta type ListAttachedGroupPoliciesInput struct { // The name (friendly name, not ARN) of the group to list attached policies for. - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. GroupName *string @@ -54,20 +60,25 @@ type ListAttachedGroupPoliciesInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 // The path prefix for filtering the results. This parameter is optional. If it is - // not included, it defaults to a slash (/), listing all policies. This parameter - // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string - // of characters consisting of either a forward slash (/) by itself or a string - // that must begin and end with forward slashes. In addition, it can contain any - // ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), - // including most punctuation characters, digits, and upper and lowercased letters. + // not included, it defaults to a slash (/), listing all policies. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of + // either a forward slash (/) by itself or a string that must begin and end with + // forward slashes. In addition, it can contain any ASCII character from the ! ( + // \u0021 ) through the DEL character ( \u007F ), including most punctuation + // characters, digits, and upper and lowercased letters. + // + // [regex pattern]: http://wikipedia.org/wiki/regex PathPrefix *string noSmithyDocumentSerde @@ -152,6 +163,12 @@ func (c *Client) addOperationListAttachedGroupPoliciesMiddlewares(stack *middlew 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 = addOpListAttachedGroupPoliciesValidationMiddleware(stack); err != nil { return err } @@ -176,24 +193,18 @@ func (c *Client) addOperationListAttachedGroupPoliciesMiddlewares(stack *middlew return nil } -// ListAttachedGroupPoliciesAPIClient is a client that implements the -// ListAttachedGroupPolicies operation. -type ListAttachedGroupPoliciesAPIClient interface { - ListAttachedGroupPolicies(context.Context, *ListAttachedGroupPoliciesInput, ...func(*Options)) (*ListAttachedGroupPoliciesOutput, error) -} - -var _ ListAttachedGroupPoliciesAPIClient = (*Client)(nil) - // ListAttachedGroupPoliciesPaginatorOptions is the paginator options for // ListAttachedGroupPolicies type ListAttachedGroupPoliciesPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -255,6 +266,9 @@ func (p *ListAttachedGroupPoliciesPaginator) NextPage(ctx context.Context, optFn } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAttachedGroupPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -274,6 +288,14 @@ func (p *ListAttachedGroupPoliciesPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListAttachedGroupPoliciesAPIClient is a client that implements the +// ListAttachedGroupPolicies operation. +type ListAttachedGroupPoliciesAPIClient interface { + ListAttachedGroupPolicies(context.Context, *ListAttachedGroupPoliciesInput, ...func(*Options)) (*ListAttachedGroupPoliciesOutput, error) +} + +var _ ListAttachedGroupPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAttachedGroupPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedRolePolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedRolePolicies.go index e99a3990f6..ed7f5a5fa3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedRolePolicies.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedRolePolicies.go @@ -11,15 +11,19 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists all managed policies that are attached to the specified IAM role. An IAM -// role can also have inline policies embedded with it. To list the inline policies -// for a role, use ListRolePolicies . For information about policies, see Managed -// policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. You can paginate the results using the MaxItems and -// Marker parameters. You can use the PathPrefix parameter to limit the list of -// policies to only those matching the specified path prefix. If there are no -// policies attached to the specified role (or none that match the specified path -// prefix), the operation returns an empty list. +// Lists all managed policies that are attached to the specified IAM role. +// +// An IAM role can also have inline policies embedded with it. To list the inline +// policies for a role, use ListRolePolicies. For information about policies, see [Managed policies and inline policies] in the IAM User +// Guide. +// +// You can paginate the results using the MaxItems and Marker parameters. You can +// use the PathPrefix parameter to limit the list of policies to only those +// matching the specified path prefix. If there are no policies attached to the +// specified role (or none that match the specified path prefix), the operation +// returns an empty list. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) ListAttachedRolePolicies(ctx context.Context, params *ListAttachedRolePoliciesInput, optFns ...func(*Options)) (*ListAttachedRolePoliciesOutput, error) { if params == nil { params = &ListAttachedRolePoliciesInput{} @@ -38,10 +42,12 @@ func (c *Client) ListAttachedRolePolicies(ctx context.Context, params *ListAttac type ListAttachedRolePoliciesInput struct { // The name (friendly name, not ARN) of the role to list attached policies for. - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -54,20 +60,25 @@ type ListAttachedRolePoliciesInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 // The path prefix for filtering the results. This parameter is optional. If it is - // not included, it defaults to a slash (/), listing all policies. This parameter - // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string - // of characters consisting of either a forward slash (/) by itself or a string - // that must begin and end with forward slashes. In addition, it can contain any - // ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), - // including most punctuation characters, digits, and upper and lowercased letters. + // not included, it defaults to a slash (/), listing all policies. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of + // either a forward slash (/) by itself or a string that must begin and end with + // forward slashes. In addition, it can contain any ASCII character from the ! ( + // \u0021 ) through the DEL character ( \u007F ), including most punctuation + // characters, digits, and upper and lowercased letters. + // + // [regex pattern]: http://wikipedia.org/wiki/regex PathPrefix *string noSmithyDocumentSerde @@ -152,6 +163,12 @@ func (c *Client) addOperationListAttachedRolePoliciesMiddlewares(stack *middlewa 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 = addOpListAttachedRolePoliciesValidationMiddleware(stack); err != nil { return err } @@ -176,24 +193,18 @@ func (c *Client) addOperationListAttachedRolePoliciesMiddlewares(stack *middlewa return nil } -// ListAttachedRolePoliciesAPIClient is a client that implements the -// ListAttachedRolePolicies operation. -type ListAttachedRolePoliciesAPIClient interface { - ListAttachedRolePolicies(context.Context, *ListAttachedRolePoliciesInput, ...func(*Options)) (*ListAttachedRolePoliciesOutput, error) -} - -var _ ListAttachedRolePoliciesAPIClient = (*Client)(nil) - // ListAttachedRolePoliciesPaginatorOptions is the paginator options for // ListAttachedRolePolicies type ListAttachedRolePoliciesPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -255,6 +266,9 @@ func (p *ListAttachedRolePoliciesPaginator) NextPage(ctx context.Context, optFns } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAttachedRolePolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -274,6 +288,14 @@ func (p *ListAttachedRolePoliciesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListAttachedRolePoliciesAPIClient is a client that implements the +// ListAttachedRolePolicies operation. +type ListAttachedRolePoliciesAPIClient interface { + ListAttachedRolePolicies(context.Context, *ListAttachedRolePoliciesInput, ...func(*Options)) (*ListAttachedRolePoliciesOutput, error) +} + +var _ ListAttachedRolePoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAttachedRolePolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedUserPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedUserPolicies.go index 7062315623..b71e0341c4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedUserPolicies.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedUserPolicies.go @@ -11,15 +11,19 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists all managed policies that are attached to the specified IAM user. An IAM -// user can also have inline policies embedded with it. To list the inline policies -// for a user, use ListUserPolicies . For information about policies, see Managed -// policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. You can paginate the results using the MaxItems and -// Marker parameters. You can use the PathPrefix parameter to limit the list of -// policies to only those matching the specified path prefix. If there are no -// policies attached to the specified group (or none that match the specified path -// prefix), the operation returns an empty list. +// Lists all managed policies that are attached to the specified IAM user. +// +// An IAM user can also have inline policies embedded with it. To list the inline +// policies for a user, use ListUserPolicies. For information about policies, see [Managed policies and inline policies] in the IAM User +// Guide. +// +// You can paginate the results using the MaxItems and Marker parameters. You can +// use the PathPrefix parameter to limit the list of policies to only those +// matching the specified path prefix. If there are no policies attached to the +// specified group (or none that match the specified path prefix), the operation +// returns an empty list. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) ListAttachedUserPolicies(ctx context.Context, params *ListAttachedUserPoliciesInput, optFns ...func(*Options)) (*ListAttachedUserPoliciesOutput, error) { if params == nil { params = &ListAttachedUserPoliciesInput{} @@ -38,10 +42,12 @@ func (c *Client) ListAttachedUserPolicies(ctx context.Context, params *ListAttac type ListAttachedUserPoliciesInput struct { // The name (friendly name, not ARN) of the user to list attached policies for. - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -54,20 +60,25 @@ type ListAttachedUserPoliciesInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 // The path prefix for filtering the results. This parameter is optional. If it is - // not included, it defaults to a slash (/), listing all policies. This parameter - // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string - // of characters consisting of either a forward slash (/) by itself or a string - // that must begin and end with forward slashes. In addition, it can contain any - // ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), - // including most punctuation characters, digits, and upper and lowercased letters. + // not included, it defaults to a slash (/), listing all policies. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of + // either a forward slash (/) by itself or a string that must begin and end with + // forward slashes. In addition, it can contain any ASCII character from the ! ( + // \u0021 ) through the DEL character ( \u007F ), including most punctuation + // characters, digits, and upper and lowercased letters. + // + // [regex pattern]: http://wikipedia.org/wiki/regex PathPrefix *string noSmithyDocumentSerde @@ -152,6 +163,12 @@ func (c *Client) addOperationListAttachedUserPoliciesMiddlewares(stack *middlewa 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 = addOpListAttachedUserPoliciesValidationMiddleware(stack); err != nil { return err } @@ -176,24 +193,18 @@ func (c *Client) addOperationListAttachedUserPoliciesMiddlewares(stack *middlewa return nil } -// ListAttachedUserPoliciesAPIClient is a client that implements the -// ListAttachedUserPolicies operation. -type ListAttachedUserPoliciesAPIClient interface { - ListAttachedUserPolicies(context.Context, *ListAttachedUserPoliciesInput, ...func(*Options)) (*ListAttachedUserPoliciesOutput, error) -} - -var _ ListAttachedUserPoliciesAPIClient = (*Client)(nil) - // ListAttachedUserPoliciesPaginatorOptions is the paginator options for // ListAttachedUserPolicies type ListAttachedUserPoliciesPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -255,6 +266,9 @@ func (p *ListAttachedUserPoliciesPaginator) NextPage(ctx context.Context, optFns } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAttachedUserPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -274,6 +288,14 @@ func (p *ListAttachedUserPoliciesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListAttachedUserPoliciesAPIClient is a client that implements the +// ListAttachedUserPolicies operation. +type ListAttachedUserPoliciesAPIClient interface { + ListAttachedUserPolicies(context.Context, *ListAttachedUserPoliciesInput, ...func(*Options)) (*ListAttachedUserPoliciesOutput, error) +} + +var _ ListAttachedUserPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAttachedUserPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListEntitiesForPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListEntitiesForPolicy.go index 2fcc45b069..17a4bac71e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListEntitiesForPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListEntitiesForPolicy.go @@ -12,11 +12,13 @@ import ( ) // Lists all IAM users, groups, and roles that the specified managed policy is -// attached to. You can use the optional EntityFilter parameter to limit the -// results to a particular type of entity (users, groups, or roles). For example, -// to list only the roles that are attached to the specified policy, set -// EntityFilter to Role . You can paginate the results using the MaxItems and -// Marker parameters. +// attached to. +// +// You can use the optional EntityFilter parameter to limit the results to a +// particular type of entity (users, groups, or roles). For example, to list only +// the roles that are attached to the specified policy, set EntityFilter to Role . +// +// You can paginate the results using the MaxItems and Marker parameters. func (c *Client) ListEntitiesForPolicy(ctx context.Context, params *ListEntitiesForPolicyInput, optFns ...func(*Options)) (*ListEntitiesForPolicyOutput, error) { if params == nil { params = &ListEntitiesForPolicyInput{} @@ -35,17 +37,22 @@ func (c *Client) ListEntitiesForPolicy(ctx context.Context, params *ListEntities type ListEntitiesForPolicyInput struct { // The Amazon Resource Name (ARN) of the IAM policy for which you want the - // versions. For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // versions. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. PolicyArn *string - // The entity type to use for filtering the results. For example, when EntityFilter - // is Role , only the roles that are attached to the specified policy are returned. - // This parameter is optional. If it is not included, all attached entities (users, - // groups, and roles) are returned. The argument for this parameter must be one of - // the valid values listed below. + // The entity type to use for filtering the results. + // + // For example, when EntityFilter is Role , only the roles that are attached to the + // specified policy are returned. This parameter is optional. If it is not + // included, all attached entities (users, groups, and roles) are returned. The + // argument for this parameter must be one of the valid values listed below. EntityFilter types.EntityType // Use this parameter only when paginating results and only after you receive a @@ -56,27 +63,34 @@ type ListEntitiesForPolicyInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 // The path prefix for filtering the results. This parameter is optional. If it is - // not included, it defaults to a slash (/), listing all entities. This parameter - // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string - // of characters consisting of either a forward slash (/) by itself or a string - // that must begin and end with forward slashes. In addition, it can contain any - // ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), - // including most punctuation characters, digits, and upper and lowercased letters. + // not included, it defaults to a slash (/), listing all entities. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of + // either a forward slash (/) by itself or a string that must begin and end with + // forward slashes. In addition, it can contain any ASCII character from the ! ( + // \u0021 ) through the DEL character ( \u007F ), including most punctuation + // characters, digits, and upper and lowercased letters. + // + // [regex pattern]: http://wikipedia.org/wiki/regex PathPrefix *string - // The policy usage method to use for filtering the results. To list only - // permissions policies, set PolicyUsageFilter to PermissionsPolicy . To list only - // the policies used to set permissions boundaries, set the value to - // PermissionsBoundary . This parameter is optional. If it is not included, all - // policies are returned. + // The policy usage method to use for filtering the results. + // + // To list only permissions policies, set PolicyUsageFilter to PermissionsPolicy . + // To list only the policies used to set permissions boundaries, set the value to + // PermissionsBoundary . + // + // This parameter is optional. If it is not included, all policies are returned. PolicyUsageFilter types.PolicyUsageType noSmithyDocumentSerde @@ -167,6 +181,12 @@ func (c *Client) addOperationListEntitiesForPolicyMiddlewares(stack *middleware. 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 = addOpListEntitiesForPolicyValidationMiddleware(stack); err != nil { return err } @@ -191,24 +211,18 @@ func (c *Client) addOperationListEntitiesForPolicyMiddlewares(stack *middleware. return nil } -// ListEntitiesForPolicyAPIClient is a client that implements the -// ListEntitiesForPolicy operation. -type ListEntitiesForPolicyAPIClient interface { - ListEntitiesForPolicy(context.Context, *ListEntitiesForPolicyInput, ...func(*Options)) (*ListEntitiesForPolicyOutput, error) -} - -var _ ListEntitiesForPolicyAPIClient = (*Client)(nil) - // ListEntitiesForPolicyPaginatorOptions is the paginator options for // ListEntitiesForPolicy type ListEntitiesForPolicyPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -269,6 +283,9 @@ func (p *ListEntitiesForPolicyPaginator) NextPage(ctx context.Context, optFns .. } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEntitiesForPolicy(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -288,6 +305,14 @@ func (p *ListEntitiesForPolicyPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListEntitiesForPolicyAPIClient is a client that implements the +// ListEntitiesForPolicy operation. +type ListEntitiesForPolicyAPIClient interface { + ListEntitiesForPolicy(context.Context, *ListEntitiesForPolicyInput, ...func(*Options)) (*ListEntitiesForPolicyOutput, error) +} + +var _ ListEntitiesForPolicyAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEntitiesForPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupPolicies.go index e13340e8f9..1949a118de 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupPolicies.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupPolicies.go @@ -11,12 +11,17 @@ import ( ) // Lists the names of the inline policies that are embedded in the specified IAM -// group. An IAM group can also have managed policies attached to it. To list the -// managed policies that are attached to a group, use ListAttachedGroupPolicies . -// For more information about policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. You can paginate the results using the MaxItems and -// Marker parameters. If there are no inline policies embedded with the specified -// group, the operation returns an empty list. +// group. +// +// An IAM group can also have managed policies attached to it. To list the managed +// policies that are attached to a group, use ListAttachedGroupPolicies. For more information about +// policies, see [Managed policies and inline policies]in the IAM User Guide. +// +// You can paginate the results using the MaxItems and Marker parameters. If there +// are no inline policies embedded with the specified group, the operation returns +// an empty list. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) ListGroupPolicies(ctx context.Context, params *ListGroupPoliciesInput, optFns ...func(*Options)) (*ListGroupPoliciesOutput, error) { if params == nil { params = &ListGroupPoliciesInput{} @@ -34,10 +39,13 @@ func (c *Client) ListGroupPolicies(ctx context.Context, params *ListGroupPolicie type ListGroupPoliciesInput struct { - // The name of the group to list policies for. This parameter allows (through its - // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters - // consisting of upper and lowercase alphanumeric characters with no spaces. You - // can also include any of the following characters: _+=,.@- + // The name of the group to list policies for. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. GroupName *string @@ -50,11 +58,13 @@ type ListGroupPoliciesInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 noSmithyDocumentSerde @@ -63,10 +73,13 @@ type ListGroupPoliciesInput struct { // Contains the response to a successful ListGroupPolicies request. type ListGroupPoliciesOutput struct { - // A list of policy names. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // A list of policy names. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. PolicyNames []string @@ -144,6 +157,12 @@ func (c *Client) addOperationListGroupPoliciesMiddlewares(stack *middleware.Stac 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 = addOpListGroupPoliciesValidationMiddleware(stack); err != nil { return err } @@ -168,23 +187,17 @@ func (c *Client) addOperationListGroupPoliciesMiddlewares(stack *middleware.Stac return nil } -// ListGroupPoliciesAPIClient is a client that implements the ListGroupPolicies -// operation. -type ListGroupPoliciesAPIClient interface { - ListGroupPolicies(context.Context, *ListGroupPoliciesInput, ...func(*Options)) (*ListGroupPoliciesOutput, error) -} - -var _ ListGroupPoliciesAPIClient = (*Client)(nil) - // ListGroupPoliciesPaginatorOptions is the paginator options for ListGroupPolicies type ListGroupPoliciesPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -245,6 +258,9 @@ func (p *ListGroupPoliciesPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGroupPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -264,6 +280,14 @@ func (p *ListGroupPoliciesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListGroupPoliciesAPIClient is a client that implements the ListGroupPolicies +// operation. +type ListGroupPoliciesAPIClient interface { + ListGroupPolicies(context.Context, *ListGroupPoliciesInput, ...func(*Options)) (*ListGroupPoliciesOutput, error) +} + +var _ ListGroupPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGroupPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroups.go index 069df2c0a9..74bfed3735 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroups.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroups.go @@ -11,8 +11,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists the IAM groups that have the specified path prefix. You can paginate the -// results using the MaxItems and Marker parameters. +// Lists the IAM groups that have the specified path prefix. +// +// You can paginate the results using the MaxItems and Marker parameters. func (c *Client) ListGroups(ctx context.Context, params *ListGroupsInput, optFns ...func(*Options)) (*ListGroupsOutput, error) { if params == nil { params = &ListGroupsInput{} @@ -38,22 +39,27 @@ type ListGroupsInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 - // The path prefix for filtering the results. For example, the prefix + // The path prefix for filtering the results. For example, the prefix // /division_abc/subdivision_xyz/ gets all groups whose path starts with - // /division_abc/subdivision_xyz/ . This parameter is optional. If it is not - // included, it defaults to a slash (/), listing all groups. This parameter allows - // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of - // characters consisting of either a forward slash (/) by itself or a string that - // must begin and end with forward slashes. In addition, it can contain any ASCII - // character from the ! ( \u0021 ) through the DEL character ( \u007F ), including - // most punctuation characters, digits, and upper and lowercased letters. + // /division_abc/subdivision_xyz/ . + // + // This parameter is optional. If it is not included, it defaults to a slash (/), + // listing all groups. This parameter allows (through its [regex pattern]) a string of characters + // consisting of either a forward slash (/) by itself or a string that must begin + // and end with forward slashes. In addition, it can contain any ASCII character + // from the ! ( \u0021 ) through the DEL character ( \u007F ), including most + // punctuation characters, digits, and upper and lowercased letters. + // + // [regex pattern]: http://wikipedia.org/wiki/regex PathPrefix *string noSmithyDocumentSerde @@ -140,6 +146,12 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListGroups(options.Region), middleware.Before); err != nil { return err } @@ -161,22 +173,17 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti return nil } -// ListGroupsAPIClient is a client that implements the ListGroups operation. -type ListGroupsAPIClient interface { - ListGroups(context.Context, *ListGroupsInput, ...func(*Options)) (*ListGroupsOutput, error) -} - -var _ ListGroupsAPIClient = (*Client)(nil) - // ListGroupsPaginatorOptions is the paginator options for ListGroups type ListGroupsPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -237,6 +244,9 @@ func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +266,13 @@ func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListGroupsAPIClient is a client that implements the ListGroups operation. +type ListGroupsAPIClient interface { + ListGroups(context.Context, *ListGroupsInput, ...func(*Options)) (*ListGroupsOutput, error) +} + +var _ ListGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupsForUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupsForUser.go index 003c559515..50d270229e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupsForUser.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupsForUser.go @@ -11,8 +11,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists the IAM groups that the specified IAM user belongs to. You can paginate -// the results using the MaxItems and Marker parameters. +// Lists the IAM groups that the specified IAM user belongs to. +// +// You can paginate the results using the MaxItems and Marker parameters. func (c *Client) ListGroupsForUser(ctx context.Context, params *ListGroupsForUserInput, optFns ...func(*Options)) (*ListGroupsForUserOutput, error) { if params == nil { params = &ListGroupsForUserInput{} @@ -30,10 +31,13 @@ func (c *Client) ListGroupsForUser(ctx context.Context, params *ListGroupsForUse type ListGroupsForUserInput struct { - // The name of the user to list groups for. This parameter allows (through its - // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters - // consisting of upper and lowercase alphanumeric characters with no spaces. You - // can also include any of the following characters: _+=,.@- + // The name of the user to list groups for. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -46,11 +50,13 @@ type ListGroupsForUserInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 noSmithyDocumentSerde @@ -137,6 +143,12 @@ func (c *Client) addOperationListGroupsForUserMiddlewares(stack *middleware.Stac 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 = addOpListGroupsForUserValidationMiddleware(stack); err != nil { return err } @@ -161,23 +173,17 @@ func (c *Client) addOperationListGroupsForUserMiddlewares(stack *middleware.Stac return nil } -// ListGroupsForUserAPIClient is a client that implements the ListGroupsForUser -// operation. -type ListGroupsForUserAPIClient interface { - ListGroupsForUser(context.Context, *ListGroupsForUserInput, ...func(*Options)) (*ListGroupsForUserOutput, error) -} - -var _ ListGroupsForUserAPIClient = (*Client)(nil) - // ListGroupsForUserPaginatorOptions is the paginator options for ListGroupsForUser type ListGroupsForUserPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -238,6 +244,9 @@ func (p *ListGroupsForUserPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGroupsForUser(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +266,14 @@ func (p *ListGroupsForUserPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListGroupsForUserAPIClient is a client that implements the ListGroupsForUser +// operation. +type ListGroupsForUserAPIClient interface { + ListGroupsForUser(context.Context, *ListGroupsForUserInput, ...func(*Options)) (*ListGroupsForUserOutput, error) +} + +var _ ListGroupsForUserAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGroupsForUser(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfileTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfileTags.go index a5a2c758e6..8f20f6b1e9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfileTags.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfileTags.go @@ -13,8 +13,9 @@ import ( // Lists the tags that are attached to the specified IAM instance profile. The // returned list of tags is sorted by tag key. For more information about tagging, -// see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. +// see [Tagging IAM resources]in the IAM User Guide. +// +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) ListInstanceProfileTags(ctx context.Context, params *ListInstanceProfileTagsInput, optFns ...func(*Options)) (*ListInstanceProfileTagsOutput, error) { if params == nil { params = &ListInstanceProfileTagsInput{} @@ -32,10 +33,13 @@ func (c *Client) ListInstanceProfileTags(ctx context.Context, params *ListInstan type ListInstanceProfileTagsInput struct { - // The name of the IAM instance profile whose tags you want to see. This parameter - // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string - // of characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the IAM instance profile whose tags you want to see. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. InstanceProfileName *string @@ -48,11 +52,13 @@ type ListInstanceProfileTagsInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 noSmithyDocumentSerde @@ -140,6 +146,12 @@ func (c *Client) addOperationListInstanceProfileTagsMiddlewares(stack *middlewar 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 = addOpListInstanceProfileTagsValidationMiddleware(stack); err != nil { return err } @@ -164,24 +176,18 @@ func (c *Client) addOperationListInstanceProfileTagsMiddlewares(stack *middlewar return nil } -// ListInstanceProfileTagsAPIClient is a client that implements the -// ListInstanceProfileTags operation. -type ListInstanceProfileTagsAPIClient interface { - ListInstanceProfileTags(context.Context, *ListInstanceProfileTagsInput, ...func(*Options)) (*ListInstanceProfileTagsOutput, error) -} - -var _ ListInstanceProfileTagsAPIClient = (*Client)(nil) - // ListInstanceProfileTagsPaginatorOptions is the paginator options for // ListInstanceProfileTags type ListInstanceProfileTagsPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -243,6 +249,9 @@ func (p *ListInstanceProfileTagsPaginator) NextPage(ctx context.Context, optFns } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInstanceProfileTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -262,6 +271,14 @@ func (p *ListInstanceProfileTagsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListInstanceProfileTagsAPIClient is a client that implements the +// ListInstanceProfileTags operation. +type ListInstanceProfileTagsAPIClient interface { + ListInstanceProfileTags(context.Context, *ListInstanceProfileTagsInput, ...func(*Options)) (*ListInstanceProfileTagsOutput, error) +} + +var _ ListInstanceProfileTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInstanceProfileTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfiles.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfiles.go index beeeebea41..939b1a13f0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfiles.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfiles.go @@ -13,12 +13,16 @@ import ( // Lists the instance profiles that have the specified path prefix. If there are // none, the operation returns an empty list. For more information about instance -// profiles, see Using instance profiles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) -// in the IAM User Guide. IAM resource-listing operations return a subset of the -// available attributes for the resource. For example, this operation does not -// return tags, even though they are an attribute of the returned object. To view -// all of the information for an instance profile, see GetInstanceProfile . You can -// paginate the results using the MaxItems and Marker parameters. +// profiles, see [Using instance profiles]in the IAM User Guide. +// +// IAM resource-listing operations return a subset of the available attributes for +// the resource. For example, this operation does not return tags, even though they +// are an attribute of the returned object. To view all of the information for an +// instance profile, see GetInstanceProfile. +// +// You can paginate the results using the MaxItems and Marker parameters. +// +// [Using instance profiles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html func (c *Client) ListInstanceProfiles(ctx context.Context, params *ListInstanceProfilesInput, optFns ...func(*Options)) (*ListInstanceProfilesOutput, error) { if params == nil { params = &ListInstanceProfilesInput{} @@ -44,22 +48,27 @@ type ListInstanceProfilesInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 - // The path prefix for filtering the results. For example, the prefix + // The path prefix for filtering the results. For example, the prefix // /application_abc/component_xyz/ gets all instance profiles whose path starts - // with /application_abc/component_xyz/ . This parameter is optional. If it is not - // included, it defaults to a slash (/), listing all instance profiles. This - // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) - // a string of characters consisting of either a forward slash (/) by itself or a - // string that must begin and end with forward slashes. In addition, it can contain - // any ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), - // including most punctuation characters, digits, and upper and lowercased letters. + // with /application_abc/component_xyz/ . + // + // This parameter is optional. If it is not included, it defaults to a slash (/), + // listing all instance profiles. This parameter allows (through its [regex pattern]) a string of + // characters consisting of either a forward slash (/) by itself or a string that + // must begin and end with forward slashes. In addition, it can contain any ASCII + // character from the ! ( \u0021 ) through the DEL character ( \u007F ), including + // most punctuation characters, digits, and upper and lowercased letters. + // + // [regex pattern]: http://wikipedia.org/wiki/regex PathPrefix *string noSmithyDocumentSerde @@ -146,6 +155,12 @@ func (c *Client) addOperationListInstanceProfilesMiddlewares(stack *middleware.S 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListInstanceProfiles(options.Region), middleware.Before); err != nil { return err } @@ -167,24 +182,18 @@ func (c *Client) addOperationListInstanceProfilesMiddlewares(stack *middleware.S return nil } -// ListInstanceProfilesAPIClient is a client that implements the -// ListInstanceProfiles operation. -type ListInstanceProfilesAPIClient interface { - ListInstanceProfiles(context.Context, *ListInstanceProfilesInput, ...func(*Options)) (*ListInstanceProfilesOutput, error) -} - -var _ ListInstanceProfilesAPIClient = (*Client)(nil) - // ListInstanceProfilesPaginatorOptions is the paginator options for // ListInstanceProfiles type ListInstanceProfilesPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -245,6 +254,9 @@ func (p *ListInstanceProfilesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInstanceProfiles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -264,6 +276,14 @@ func (p *ListInstanceProfilesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListInstanceProfilesAPIClient is a client that implements the +// ListInstanceProfiles operation. +type ListInstanceProfilesAPIClient interface { + ListInstanceProfiles(context.Context, *ListInstanceProfilesInput, ...func(*Options)) (*ListInstanceProfilesOutput, error) +} + +var _ ListInstanceProfilesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInstanceProfiles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfilesForRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfilesForRole.go index d79f1f89d3..83237fafd6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfilesForRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfilesForRole.go @@ -13,9 +13,11 @@ import ( // Lists the instance profiles that have the specified associated IAM role. If // there are none, the operation returns an empty list. For more information about -// instance profiles, go to Using instance profiles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) -// in the IAM User Guide. You can paginate the results using the MaxItems and -// Marker parameters. +// instance profiles, go to [Using instance profiles]in the IAM User Guide. +// +// You can paginate the results using the MaxItems and Marker parameters. +// +// [Using instance profiles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html func (c *Client) ListInstanceProfilesForRole(ctx context.Context, params *ListInstanceProfilesForRoleInput, optFns ...func(*Options)) (*ListInstanceProfilesForRoleOutput, error) { if params == nil { params = &ListInstanceProfilesForRoleInput{} @@ -33,10 +35,13 @@ func (c *Client) ListInstanceProfilesForRole(ctx context.Context, params *ListIn type ListInstanceProfilesForRoleInput struct { - // The name of the role to list instance profiles for. This parameter allows - // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of - // characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the role to list instance profiles for. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -49,11 +54,13 @@ type ListInstanceProfilesForRoleInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 noSmithyDocumentSerde @@ -140,6 +147,12 @@ func (c *Client) addOperationListInstanceProfilesForRoleMiddlewares(stack *middl 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 = addOpListInstanceProfilesForRoleValidationMiddleware(stack); err != nil { return err } @@ -164,24 +177,18 @@ func (c *Client) addOperationListInstanceProfilesForRoleMiddlewares(stack *middl return nil } -// ListInstanceProfilesForRoleAPIClient is a client that implements the -// ListInstanceProfilesForRole operation. -type ListInstanceProfilesForRoleAPIClient interface { - ListInstanceProfilesForRole(context.Context, *ListInstanceProfilesForRoleInput, ...func(*Options)) (*ListInstanceProfilesForRoleOutput, error) -} - -var _ ListInstanceProfilesForRoleAPIClient = (*Client)(nil) - // ListInstanceProfilesForRolePaginatorOptions is the paginator options for // ListInstanceProfilesForRole type ListInstanceProfilesForRolePaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -244,6 +251,9 @@ func (p *ListInstanceProfilesForRolePaginator) NextPage(ctx context.Context, opt } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInstanceProfilesForRole(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -263,6 +273,14 @@ func (p *ListInstanceProfilesForRolePaginator) NextPage(ctx context.Context, opt return result, nil } +// ListInstanceProfilesForRoleAPIClient is a client that implements the +// ListInstanceProfilesForRole operation. +type ListInstanceProfilesForRoleAPIClient interface { + ListInstanceProfilesForRole(context.Context, *ListInstanceProfilesForRoleInput, ...func(*Options)) (*ListInstanceProfilesForRoleOutput, error) +} + +var _ ListInstanceProfilesForRoleAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInstanceProfilesForRole(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADeviceTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADeviceTags.go index 72b824eb39..3807505d5c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADeviceTags.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADeviceTags.go @@ -13,8 +13,9 @@ import ( // Lists the tags that are attached to the specified IAM virtual multi-factor // authentication (MFA) device. The returned list of tags is sorted by tag key. For -// more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. +// more information about tagging, see [Tagging IAM resources]in the IAM User Guide. +// +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) ListMFADeviceTags(ctx context.Context, params *ListMFADeviceTagsInput, optFns ...func(*Options)) (*ListMFADeviceTagsOutput, error) { if params == nil { params = &ListMFADeviceTagsInput{} @@ -33,10 +34,13 @@ func (c *Client) ListMFADeviceTags(ctx context.Context, params *ListMFADeviceTag type ListMFADeviceTagsInput struct { // The unique identifier for the IAM virtual MFA device whose tags you want to - // see. For virtual MFA devices, the serial number is the same as the ARN. This - // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- + // see. For virtual MFA devices, the serial number is the same as the ARN. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. SerialNumber *string @@ -49,11 +53,13 @@ type ListMFADeviceTagsInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 noSmithyDocumentSerde @@ -141,6 +147,12 @@ func (c *Client) addOperationListMFADeviceTagsMiddlewares(stack *middleware.Stac 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 = addOpListMFADeviceTagsValidationMiddleware(stack); err != nil { return err } @@ -165,23 +177,17 @@ func (c *Client) addOperationListMFADeviceTagsMiddlewares(stack *middleware.Stac return nil } -// ListMFADeviceTagsAPIClient is a client that implements the ListMFADeviceTags -// operation. -type ListMFADeviceTagsAPIClient interface { - ListMFADeviceTags(context.Context, *ListMFADeviceTagsInput, ...func(*Options)) (*ListMFADeviceTagsOutput, error) -} - -var _ ListMFADeviceTagsAPIClient = (*Client)(nil) - // ListMFADeviceTagsPaginatorOptions is the paginator options for ListMFADeviceTags type ListMFADeviceTagsPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -242,6 +248,9 @@ func (p *ListMFADeviceTagsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMFADeviceTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +270,14 @@ func (p *ListMFADeviceTagsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListMFADeviceTagsAPIClient is a client that implements the ListMFADeviceTags +// operation. +type ListMFADeviceTagsAPIClient interface { + ListMFADeviceTags(context.Context, *ListMFADeviceTagsInput, ...func(*Options)) (*ListMFADeviceTagsOutput, error) +} + +var _ ListMFADeviceTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMFADeviceTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADevices.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADevices.go index 50d499562a..7a4ed1eaf8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADevices.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADevices.go @@ -15,8 +15,9 @@ import ( // then this operation lists all the MFA devices associated with the specified // user. If you do not specify a user name, IAM determines the user name implicitly // based on the Amazon Web Services access key ID signing the request for this -// operation. You can paginate the results using the MaxItems and Marker -// parameters. +// operation. +// +// You can paginate the results using the MaxItems and Marker parameters. func (c *Client) ListMFADevices(ctx context.Context, params *ListMFADevicesInput, optFns ...func(*Options)) (*ListMFADevicesOutput, error) { if params == nil { params = &ListMFADevicesInput{} @@ -42,17 +43,22 @@ type ListMFADevicesInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 - // The name of the user whose MFA devices you want to list. This parameter allows - // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of - // characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the user whose MFA devices you want to list. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex UserName *string noSmithyDocumentSerde @@ -139,6 +145,12 @@ func (c *Client) addOperationListMFADevicesMiddlewares(stack *middleware.Stack, 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListMFADevices(options.Region), middleware.Before); err != nil { return err } @@ -160,23 +172,17 @@ func (c *Client) addOperationListMFADevicesMiddlewares(stack *middleware.Stack, return nil } -// ListMFADevicesAPIClient is a client that implements the ListMFADevices -// operation. -type ListMFADevicesAPIClient interface { - ListMFADevices(context.Context, *ListMFADevicesInput, ...func(*Options)) (*ListMFADevicesOutput, error) -} - -var _ ListMFADevicesAPIClient = (*Client)(nil) - // ListMFADevicesPaginatorOptions is the paginator options for ListMFADevices type ListMFADevicesPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -237,6 +243,9 @@ func (p *ListMFADevicesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMFADevices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +265,14 @@ func (p *ListMFADevicesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListMFADevicesAPIClient is a client that implements the ListMFADevices +// operation. +type ListMFADevicesAPIClient interface { + ListMFADevices(context.Context, *ListMFADevicesInput, ...func(*Options)) (*ListMFADevicesOutput, error) +} + +var _ ListMFADevicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMFADevices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviderTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviderTags.go index fc7f9d2bc4..2deb644f0a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviderTags.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviderTags.go @@ -13,9 +13,12 @@ import ( // Lists the tags that are attached to the specified OpenID Connect // (OIDC)-compatible identity provider. The returned list of tags is sorted by tag -// key. For more information, see About web identity federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc.html) -// . For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. +// key. For more information, see [About web identity federation]. +// +// For more information about tagging, see [Tagging IAM resources] in the IAM User Guide. +// +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html +// [About web identity federation]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc.html func (c *Client) ListOpenIDConnectProviderTags(ctx context.Context, params *ListOpenIDConnectProviderTagsInput, optFns ...func(*Options)) (*ListOpenIDConnectProviderTagsOutput, error) { if params == nil { params = &ListOpenIDConnectProviderTagsInput{} @@ -34,10 +37,13 @@ func (c *Client) ListOpenIDConnectProviderTags(ctx context.Context, params *List type ListOpenIDConnectProviderTagsInput struct { // The ARN of the OpenID Connect (OIDC) identity provider whose tags you want to - // see. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // see. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. OpenIDConnectProviderArn *string @@ -50,11 +56,13 @@ type ListOpenIDConnectProviderTagsInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 noSmithyDocumentSerde @@ -143,6 +151,12 @@ func (c *Client) addOperationListOpenIDConnectProviderTagsMiddlewares(stack *mid 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 = addOpListOpenIDConnectProviderTagsValidationMiddleware(stack); err != nil { return err } @@ -167,24 +181,18 @@ func (c *Client) addOperationListOpenIDConnectProviderTagsMiddlewares(stack *mid return nil } -// ListOpenIDConnectProviderTagsAPIClient is a client that implements the -// ListOpenIDConnectProviderTags operation. -type ListOpenIDConnectProviderTagsAPIClient interface { - ListOpenIDConnectProviderTags(context.Context, *ListOpenIDConnectProviderTagsInput, ...func(*Options)) (*ListOpenIDConnectProviderTagsOutput, error) -} - -var _ ListOpenIDConnectProviderTagsAPIClient = (*Client)(nil) - // ListOpenIDConnectProviderTagsPaginatorOptions is the paginator options for // ListOpenIDConnectProviderTags type ListOpenIDConnectProviderTagsPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -247,6 +255,9 @@ func (p *ListOpenIDConnectProviderTagsPaginator) NextPage(ctx context.Context, o } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOpenIDConnectProviderTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +277,14 @@ func (p *ListOpenIDConnectProviderTagsPaginator) NextPage(ctx context.Context, o return result, nil } +// ListOpenIDConnectProviderTagsAPIClient is a client that implements the +// ListOpenIDConnectProviderTags operation. +type ListOpenIDConnectProviderTagsAPIClient interface { + ListOpenIDConnectProviderTags(context.Context, *ListOpenIDConnectProviderTagsInput, ...func(*Options)) (*ListOpenIDConnectProviderTagsOutput, error) +} + +var _ ListOpenIDConnectProviderTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOpenIDConnectProviderTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviders.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviders.go index d735e308d2..54fc86505d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviders.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviders.go @@ -12,11 +12,12 @@ import ( ) // Lists information about the IAM OpenID Connect (OIDC) provider resource objects -// defined in the Amazon Web Services account. IAM resource-listing operations -// return a subset of the available attributes for the resource. For example, this -// operation does not return tags, even though they are an attribute of the -// returned object. To view all of the information for an OIDC provider, see -// GetOpenIDConnectProvider . +// defined in the Amazon Web Services account. +// +// IAM resource-listing operations return a subset of the available attributes for +// the resource. For example, this operation does not return tags, even though they +// are an attribute of the returned object. To view all of the information for an +// OIDC provider, see GetOpenIDConnectProvider. func (c *Client) ListOpenIDConnectProviders(ctx context.Context, params *ListOpenIDConnectProvidersInput, optFns ...func(*Options)) (*ListOpenIDConnectProvidersOutput, error) { if params == nil { params = &ListOpenIDConnectProvidersInput{} @@ -104,6 +105,12 @@ func (c *Client) addOperationListOpenIDConnectProvidersMiddlewares(stack *middle 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListOpenIDConnectProviders(options.Region), middleware.Before); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicies.go index bc1506af19..10b13b1e98 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicies.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicies.go @@ -13,17 +13,23 @@ import ( // Lists all the managed policies that are available in your Amazon Web Services // account, including your own customer-defined managed policies and all Amazon Web -// Services managed policies. You can filter the list of policies that is returned -// using the optional OnlyAttached , Scope , and PathPrefix parameters. For -// example, to list only the customer managed policies in your Amazon Web Services -// account, set Scope to Local . To list only Amazon Web Services managed policies, -// set Scope to AWS . You can paginate the results using the MaxItems and Marker -// parameters. For more information about managed policies, see Managed policies -// and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. IAM resource-listing operations return a subset of the -// available attributes for the resource. For example, this operation does not -// return tags, even though they are an attribute of the returned object. To view -// all of the information for a customer manged policy, see GetPolicy . +// Services managed policies. +// +// You can filter the list of policies that is returned using the optional +// OnlyAttached , Scope , and PathPrefix parameters. For example, to list only the +// customer managed policies in your Amazon Web Services account, set Scope to +// Local . To list only Amazon Web Services managed policies, set Scope to AWS . +// +// You can paginate the results using the MaxItems and Marker parameters. +// +// For more information about managed policies, see [Managed policies and inline policies] in the IAM User Guide. +// +// IAM resource-listing operations return a subset of the available attributes for +// the resource. For example, this operation does not return tags, even though they +// are an attribute of the returned object. To view all of the information for a +// customer manged policy, see GetPolicy. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) ListPolicies(ctx context.Context, params *ListPoliciesInput, optFns ...func(*Options)) (*ListPoliciesOutput, error) { if params == nil { params = &ListPoliciesInput{} @@ -49,40 +55,50 @@ type ListPoliciesInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 - // A flag to filter the results to only the attached policies. When OnlyAttached - // is true , the returned list contains only the policies that are attached to an - // IAM user, group, or role. When OnlyAttached is false , or when the parameter is - // not included, all policies are returned. + // A flag to filter the results to only the attached policies. + // + // When OnlyAttached is true , the returned list contains only the policies that + // are attached to an IAM user, group, or role. When OnlyAttached is false , or + // when the parameter is not included, all policies are returned. OnlyAttached bool // The path prefix for filtering the results. This parameter is optional. If it is // not included, it defaults to a slash (/), listing all policies. This parameter - // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string - // of characters consisting of either a forward slash (/) by itself or a string - // that must begin and end with forward slashes. In addition, it can contain any - // ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), - // including most punctuation characters, digits, and upper and lowercased letters. + // allows (through its [regex pattern]) a string of characters consisting of either a forward + // slash (/) by itself or a string that must begin and end with forward slashes. In + // addition, it can contain any ASCII character from the ! ( \u0021 ) through the + // DEL character ( \u007F ), including most punctuation characters, digits, and + // upper and lowercased letters. + // + // [regex pattern]: http://wikipedia.org/wiki/regex PathPrefix *string - // The policy usage method to use for filtering the results. To list only - // permissions policies, set PolicyUsageFilter to PermissionsPolicy . To list only - // the policies used to set permissions boundaries, set the value to - // PermissionsBoundary . This parameter is optional. If it is not included, all - // policies are returned. + // The policy usage method to use for filtering the results. + // + // To list only permissions policies, set PolicyUsageFilter to PermissionsPolicy . + // To list only the policies used to set permissions boundaries, set the value to + // PermissionsBoundary . + // + // This parameter is optional. If it is not included, all policies are returned. PolicyUsageFilter types.PolicyUsageType - // The scope to use for filtering the results. To list only Amazon Web Services - // managed policies, set Scope to AWS . To list only the customer managed policies - // in your Amazon Web Services account, set Scope to Local . This parameter is - // optional. If it is not included, or if it is set to All , all policies are - // returned. + // The scope to use for filtering the results. + // + // To list only Amazon Web Services managed policies, set Scope to AWS . To list + // only the customer managed policies in your Amazon Web Services account, set + // Scope to Local . + // + // This parameter is optional. If it is not included, or if it is set to All , all + // policies are returned. Scope types.PolicyScopeType noSmithyDocumentSerde @@ -167,6 +183,12 @@ func (c *Client) addOperationListPoliciesMiddlewares(stack *middleware.Stack, op 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListPolicies(options.Region), middleware.Before); err != nil { return err } @@ -188,22 +210,17 @@ func (c *Client) addOperationListPoliciesMiddlewares(stack *middleware.Stack, op return nil } -// ListPoliciesAPIClient is a client that implements the ListPolicies operation. -type ListPoliciesAPIClient interface { - ListPolicies(context.Context, *ListPoliciesInput, ...func(*Options)) (*ListPoliciesOutput, error) -} - -var _ ListPoliciesAPIClient = (*Client)(nil) - // ListPoliciesPaginatorOptions is the paginator options for ListPolicies type ListPoliciesPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -264,6 +281,9 @@ func (p *ListPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -283,6 +303,13 @@ func (p *ListPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListPoliciesAPIClient is a client that implements the ListPolicies operation. +type ListPoliciesAPIClient interface { + ListPolicies(context.Context, *ListPoliciesInput, ...func(*Options)) (*ListPoliciesOutput, error) +} + +var _ ListPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPoliciesGrantingServiceAccess.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPoliciesGrantingServiceAccess.go index 8ad9b16f08..4fd6f3ac56 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPoliciesGrantingServiceAccess.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPoliciesGrantingServiceAccess.go @@ -12,31 +12,39 @@ import ( ) // Retrieves a list of policies that the IAM identity (user, group, or role) can -// use to access each specified service. This operation does not use other policy -// types when determining whether a resource could access a service. These other -// policy types include resource-based policies, access control lists, -// Organizations policies, IAM permissions boundaries, and STS assume role -// policies. It only applies permissions policy logic. For more about the -// evaluation of policy types, see Evaluating policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics) -// in the IAM User Guide. The list of policies returned by the operation depends on -// the ARN of the identity that you provide. +// use to access each specified service. +// +// This operation does not use other policy types when determining whether a +// resource could access a service. These other policy types include resource-based +// policies, access control lists, Organizations policies, IAM permissions +// boundaries, and STS assume role policies. It only applies permissions policy +// logic. For more about the evaluation of policy types, see [Evaluating policies]in the IAM User Guide. +// +// The list of policies returned by the operation depends on the ARN of the +// identity that you provide. +// // - User – The list of policies includes the managed and inline policies that // are attached to the user directly. The list also includes any additional managed // and inline policies that are attached to the group to which the user belongs. +// // - Group – The list of policies includes only the managed and inline policies // that are attached to the group directly. Policies that are attached to the // group’s user are not included. +// // - Role – The list of policies includes only the managed and inline policies // that are attached to the role. // // For each managed policy, this operation returns the ARN and policy name. For // each inline policy, it returns the policy name and the entity to which it is // attached. Inline policies do not have an ARN. For more information about these -// policy types, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html) -// in the IAM User Guide. Policies that are attached to users and roles as -// permissions boundaries are not returned. To view which managed policy is -// currently used to set the permissions boundary for a user or role, use the -// GetUser or GetRole operations. +// policy types, see [Managed policies and inline policies]in the IAM User Guide. +// +// Policies that are attached to users and roles as permissions boundaries are not +// returned. To view which managed policy is currently used to set the permissions +// boundary for a user or role, use the GetUseror GetRole operations. +// +// [Evaluating policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html func (c *Client) ListPoliciesGrantingServiceAccess(ctx context.Context, params *ListPoliciesGrantingServiceAccessInput, optFns ...func(*Options)) (*ListPoliciesGrantingServiceAccessOutput, error) { if params == nil { params = &ListPoliciesGrantingServiceAccessInput{} @@ -61,13 +69,16 @@ type ListPoliciesGrantingServiceAccessInput struct { Arn *string // The service namespace for the Amazon Web Services services whose policies you - // want to list. To learn the service namespace for a service, see Actions, - // resources, and condition keys for Amazon Web Services services (https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html) - // in the IAM User Guide. Choose the name of the service to view details for that - // service. In the first paragraph, find the service prefix. For example, (service - // prefix: a4b) . For more information about service namespaces, see Amazon Web - // Services service namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. + // want to list. + // + // To learn the service namespace for a service, see [Actions, resources, and condition keys for Amazon Web Services services] in the IAM User Guide. + // Choose the name of the service to view details for that service. In the first + // paragraph, find the service prefix. For example, (service prefix: a4b) . For + // more information about service namespaces, see [Amazon Web Services service namespaces]in the Amazon Web Services + // General Reference. + // + // [Amazon Web Services service namespaces]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces + // [Actions, resources, and condition keys for Amazon Web Services services]: https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html // // This member is required. ServiceNamespaces []string @@ -160,6 +171,12 @@ func (c *Client) addOperationListPoliciesGrantingServiceAccessMiddlewares(stack 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 = addOpListPoliciesGrantingServiceAccessValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyTags.go index 621216fd84..c1f0a55955 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyTags.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyTags.go @@ -13,8 +13,9 @@ import ( // Lists the tags that are attached to the specified IAM customer managed policy. // The returned list of tags is sorted by tag key. For more information about -// tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. +// tagging, see [Tagging IAM resources]in the IAM User Guide. +// +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) ListPolicyTags(ctx context.Context, params *ListPolicyTagsInput, optFns ...func(*Options)) (*ListPolicyTagsOutput, error) { if params == nil { params = &ListPolicyTagsInput{} @@ -32,10 +33,13 @@ func (c *Client) ListPolicyTags(ctx context.Context, params *ListPolicyTagsInput type ListPolicyTagsInput struct { - // The ARN of the IAM customer managed policy whose tags you want to see. This - // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- + // The ARN of the IAM customer managed policy whose tags you want to see. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. PolicyArn *string @@ -48,11 +52,13 @@ type ListPolicyTagsInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 noSmithyDocumentSerde @@ -140,6 +146,12 @@ func (c *Client) addOperationListPolicyTagsMiddlewares(stack *middleware.Stack, 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 = addOpListPolicyTagsValidationMiddleware(stack); err != nil { return err } @@ -164,23 +176,17 @@ func (c *Client) addOperationListPolicyTagsMiddlewares(stack *middleware.Stack, return nil } -// ListPolicyTagsAPIClient is a client that implements the ListPolicyTags -// operation. -type ListPolicyTagsAPIClient interface { - ListPolicyTags(context.Context, *ListPolicyTagsInput, ...func(*Options)) (*ListPolicyTagsOutput, error) -} - -var _ ListPolicyTagsAPIClient = (*Client)(nil) - // ListPolicyTagsPaginatorOptions is the paginator options for ListPolicyTags type ListPolicyTagsPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -241,6 +247,9 @@ func (p *ListPolicyTagsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPolicyTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +269,14 @@ func (p *ListPolicyTagsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListPolicyTagsAPIClient is a client that implements the ListPolicyTags +// operation. +type ListPolicyTagsAPIClient interface { + ListPolicyTags(context.Context, *ListPolicyTagsInput, ...func(*Options)) (*ListPolicyTagsOutput, error) +} + +var _ ListPolicyTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPolicyTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyVersions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyVersions.go index 5cdb73481b..f4f5ef14ed 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyVersions.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyVersions.go @@ -12,9 +12,11 @@ import ( ) // Lists information about the versions of the specified managed policy, including -// the version that is currently set as the policy's default version. For more -// information about managed policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. +// the version that is currently set as the policy's default version. +// +// For more information about managed policies, see [Managed policies and inline policies] in the IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) ListPolicyVersions(ctx context.Context, params *ListPolicyVersionsInput, optFns ...func(*Options)) (*ListPolicyVersionsOutput, error) { if params == nil { params = &ListPolicyVersionsInput{} @@ -33,8 +35,12 @@ func (c *Client) ListPolicyVersions(ctx context.Context, params *ListPolicyVersi type ListPolicyVersionsInput struct { // The Amazon Resource Name (ARN) of the IAM policy for which you want the - // versions. For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // versions. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. PolicyArn *string @@ -47,11 +53,13 @@ type ListPolicyVersionsInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 noSmithyDocumentSerde @@ -72,9 +80,11 @@ type ListPolicyVersionsOutput struct { // for the Marker parameter in a subsequent pagination request. Marker *string - // A list of policy versions. For more information about managed policy versions, - // see Versioning for managed policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) - // in the IAM User Guide. + // A list of policy versions. + // + // For more information about managed policy versions, see [Versioning for managed policies] in the IAM User Guide. + // + // [Versioning for managed policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html Versions []types.PolicyVersion // Metadata pertaining to the operation's result. @@ -138,6 +148,12 @@ func (c *Client) addOperationListPolicyVersionsMiddlewares(stack *middleware.Sta 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 = addOpListPolicyVersionsValidationMiddleware(stack); err != nil { return err } @@ -162,24 +178,18 @@ func (c *Client) addOperationListPolicyVersionsMiddlewares(stack *middleware.Sta return nil } -// ListPolicyVersionsAPIClient is a client that implements the ListPolicyVersions -// operation. -type ListPolicyVersionsAPIClient interface { - ListPolicyVersions(context.Context, *ListPolicyVersionsInput, ...func(*Options)) (*ListPolicyVersionsOutput, error) -} - -var _ ListPolicyVersionsAPIClient = (*Client)(nil) - // ListPolicyVersionsPaginatorOptions is the paginator options for // ListPolicyVersions type ListPolicyVersionsPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -240,6 +250,9 @@ func (p *ListPolicyVersionsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPolicyVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -259,6 +272,14 @@ func (p *ListPolicyVersionsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListPolicyVersionsAPIClient is a client that implements the ListPolicyVersions +// operation. +type ListPolicyVersionsAPIClient interface { + ListPolicyVersions(context.Context, *ListPolicyVersionsInput, ...func(*Options)) (*ListPolicyVersionsOutput, error) +} + +var _ ListPolicyVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPolicyVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRolePolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRolePolicies.go index 0729bda627..15a17eb916 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRolePolicies.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRolePolicies.go @@ -11,12 +11,17 @@ import ( ) // Lists the names of the inline policies that are embedded in the specified IAM -// role. An IAM role can also have managed policies attached to it. To list the -// managed policies that are attached to a role, use ListAttachedRolePolicies . For -// more information about policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. You can paginate the results using the MaxItems and -// Marker parameters. If there are no inline policies embedded with the specified -// role, the operation returns an empty list. +// role. +// +// An IAM role can also have managed policies attached to it. To list the managed +// policies that are attached to a role, use ListAttachedRolePolicies. For more information about +// policies, see [Managed policies and inline policies]in the IAM User Guide. +// +// You can paginate the results using the MaxItems and Marker parameters. If there +// are no inline policies embedded with the specified role, the operation returns +// an empty list. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) ListRolePolicies(ctx context.Context, params *ListRolePoliciesInput, optFns ...func(*Options)) (*ListRolePoliciesOutput, error) { if params == nil { params = &ListRolePoliciesInput{} @@ -34,10 +39,13 @@ func (c *Client) ListRolePolicies(ctx context.Context, params *ListRolePoliciesI type ListRolePoliciesInput struct { - // The name of the role to list policies for. This parameter allows (through its - // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters - // consisting of upper and lowercase alphanumeric characters with no spaces. You - // can also include any of the following characters: _+=,.@- + // The name of the role to list policies for. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -50,11 +58,13 @@ type ListRolePoliciesInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 noSmithyDocumentSerde @@ -141,6 +151,12 @@ func (c *Client) addOperationListRolePoliciesMiddlewares(stack *middleware.Stack 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 = addOpListRolePoliciesValidationMiddleware(stack); err != nil { return err } @@ -165,23 +181,17 @@ func (c *Client) addOperationListRolePoliciesMiddlewares(stack *middleware.Stack return nil } -// ListRolePoliciesAPIClient is a client that implements the ListRolePolicies -// operation. -type ListRolePoliciesAPIClient interface { - ListRolePolicies(context.Context, *ListRolePoliciesInput, ...func(*Options)) (*ListRolePoliciesOutput, error) -} - -var _ ListRolePoliciesAPIClient = (*Client)(nil) - // ListRolePoliciesPaginatorOptions is the paginator options for ListRolePolicies type ListRolePoliciesPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -242,6 +252,9 @@ func (p *ListRolePoliciesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRolePolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +274,14 @@ func (p *ListRolePoliciesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListRolePoliciesAPIClient is a client that implements the ListRolePolicies +// operation. +type ListRolePoliciesAPIClient interface { + ListRolePolicies(context.Context, *ListRolePoliciesInput, ...func(*Options)) (*ListRolePoliciesOutput, error) +} + +var _ ListRolePoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRolePolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoleTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoleTags.go index 3d8030908b..e24e37ebd6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoleTags.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoleTags.go @@ -12,9 +12,10 @@ import ( ) // Lists the tags that are attached to the specified role. The returned list of -// tags is sorted by tag key. For more information about tagging, see Tagging IAM -// resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) in the -// IAM User Guide. +// tags is sorted by tag key. For more information about tagging, see [Tagging IAM resources]in the IAM +// User Guide. +// +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) ListRoleTags(ctx context.Context, params *ListRoleTagsInput, optFns ...func(*Options)) (*ListRoleTagsOutput, error) { if params == nil { params = &ListRoleTagsInput{} @@ -32,11 +33,13 @@ func (c *Client) ListRoleTags(ctx context.Context, params *ListRoleTagsInput, op type ListRoleTagsInput struct { - // The name of the IAM role for which you want to see the list of tags. This - // parameter accepts (through its regex pattern (http://wikipedia.org/wiki/regex) ) - // a string of characters that consist of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // The name of the IAM role for which you want to see the list of tags. + // + // This parameter accepts (through its [regex pattern]) a string of characters that consist of + // upper and lowercase alphanumeric characters with no spaces. You can also include + // any of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -49,11 +52,13 @@ type ListRoleTagsInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 noSmithyDocumentSerde @@ -141,6 +146,12 @@ func (c *Client) addOperationListRoleTagsMiddlewares(stack *middleware.Stack, op 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 = addOpListRoleTagsValidationMiddleware(stack); err != nil { return err } @@ -165,22 +176,17 @@ func (c *Client) addOperationListRoleTagsMiddlewares(stack *middleware.Stack, op return nil } -// ListRoleTagsAPIClient is a client that implements the ListRoleTags operation. -type ListRoleTagsAPIClient interface { - ListRoleTags(context.Context, *ListRoleTagsInput, ...func(*Options)) (*ListRoleTagsOutput, error) -} - -var _ ListRoleTagsAPIClient = (*Client)(nil) - // ListRoleTagsPaginatorOptions is the paginator options for ListRoleTags type ListRoleTagsPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -241,6 +247,9 @@ func (p *ListRoleTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRoleTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +269,13 @@ func (p *ListRoleTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListRoleTagsAPIClient is a client that implements the ListRoleTags operation. +type ListRoleTagsAPIClient interface { + ListRoleTags(context.Context, *ListRoleTagsInput, ...func(*Options)) (*ListRoleTagsOutput, error) +} + +var _ ListRoleTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRoleTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoles.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoles.go index 3ba0132b3e..6aea245cfa 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoles.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoles.go @@ -12,16 +12,24 @@ import ( ) // Lists the IAM roles that have the specified path prefix. If there are none, the -// operation returns an empty list. For more information about roles, see IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) -// in the IAM User Guide. IAM resource-listing operations return a subset of the -// available attributes for the resource. This operation does not return the -// following attributes, even though they are an attribute of the returned object: +// operation returns an empty list. For more information about roles, see [IAM roles]in the +// IAM User Guide. +// +// IAM resource-listing operations return a subset of the available attributes for +// the resource. This operation does not return the following attributes, even +// though they are an attribute of the returned object: +// // - PermissionsBoundary +// // - RoleLastUsed +// // - Tags // -// To view all of the information for a role, see GetRole . You can paginate the -// results using the MaxItems and Marker parameters. +// To view all of the information for a role, see GetRole. +// +// You can paginate the results using the MaxItems and Marker parameters. +// +// [IAM roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html func (c *Client) ListRoles(ctx context.Context, params *ListRolesInput, optFns ...func(*Options)) (*ListRolesOutput, error) { if params == nil { params = &ListRolesInput{} @@ -47,22 +55,27 @@ type ListRolesInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 - // The path prefix for filtering the results. For example, the prefix + // The path prefix for filtering the results. For example, the prefix // /application_abc/component_xyz/ gets all roles whose path starts with - // /application_abc/component_xyz/ . This parameter is optional. If it is not - // included, it defaults to a slash (/), listing all roles. This parameter allows - // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of - // characters consisting of either a forward slash (/) by itself or a string that - // must begin and end with forward slashes. In addition, it can contain any ASCII - // character from the ! ( \u0021 ) through the DEL character ( \u007F ), including - // most punctuation characters, digits, and upper and lowercased letters. + // /application_abc/component_xyz/ . + // + // This parameter is optional. If it is not included, it defaults to a slash (/), + // listing all roles. This parameter allows (through its [regex pattern]) a string of characters + // consisting of either a forward slash (/) by itself or a string that must begin + // and end with forward slashes. In addition, it can contain any ASCII character + // from the ! ( \u0021 ) through the DEL character ( \u007F ), including most + // punctuation characters, digits, and upper and lowercased letters. + // + // [regex pattern]: http://wikipedia.org/wiki/regex PathPrefix *string noSmithyDocumentSerde @@ -149,6 +162,12 @@ func (c *Client) addOperationListRolesMiddlewares(stack *middleware.Stack, optio 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListRoles(options.Region), middleware.Before); err != nil { return err } @@ -170,22 +189,17 @@ func (c *Client) addOperationListRolesMiddlewares(stack *middleware.Stack, optio return nil } -// ListRolesAPIClient is a client that implements the ListRoles operation. -type ListRolesAPIClient interface { - ListRoles(context.Context, *ListRolesInput, ...func(*Options)) (*ListRolesOutput, error) -} - -var _ ListRolesAPIClient = (*Client)(nil) - // ListRolesPaginatorOptions is the paginator options for ListRoles type ListRolesPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -246,6 +260,9 @@ func (p *ListRolesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRoles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -265,6 +282,13 @@ func (p *ListRolesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListRolesAPIClient is a client that implements the ListRoles operation. +type ListRolesAPIClient interface { + ListRoles(context.Context, *ListRolesInput, ...func(*Options)) (*ListRolesOutput, error) +} + +var _ ListRolesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRoles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviderTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviderTags.go index 0e5294dc65..4bc8b0ded5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviderTags.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviderTags.go @@ -13,9 +13,12 @@ import ( // Lists the tags that are attached to the specified Security Assertion Markup // Language (SAML) identity provider. The returned list of tags is sorted by tag -// key. For more information, see About SAML 2.0-based federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html) -// . For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. +// key. For more information, see [About SAML 2.0-based federation]. +// +// For more information about tagging, see [Tagging IAM resources] in the IAM User Guide. +// +// [About SAML 2.0-based federation]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) ListSAMLProviderTags(ctx context.Context, params *ListSAMLProviderTagsInput, optFns ...func(*Options)) (*ListSAMLProviderTagsOutput, error) { if params == nil { params = &ListSAMLProviderTagsInput{} @@ -34,10 +37,13 @@ func (c *Client) ListSAMLProviderTags(ctx context.Context, params *ListSAMLProvi type ListSAMLProviderTagsInput struct { // The ARN of the Security Assertion Markup Language (SAML) identity provider - // whose tags you want to see. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // whose tags you want to see. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. SAMLProviderArn *string @@ -50,11 +56,13 @@ type ListSAMLProviderTagsInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 noSmithyDocumentSerde @@ -143,6 +151,12 @@ func (c *Client) addOperationListSAMLProviderTagsMiddlewares(stack *middleware.S 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 = addOpListSAMLProviderTagsValidationMiddleware(stack); err != nil { return err } @@ -167,24 +181,18 @@ func (c *Client) addOperationListSAMLProviderTagsMiddlewares(stack *middleware.S return nil } -// ListSAMLProviderTagsAPIClient is a client that implements the -// ListSAMLProviderTags operation. -type ListSAMLProviderTagsAPIClient interface { - ListSAMLProviderTags(context.Context, *ListSAMLProviderTagsInput, ...func(*Options)) (*ListSAMLProviderTagsOutput, error) -} - -var _ ListSAMLProviderTagsAPIClient = (*Client)(nil) - // ListSAMLProviderTagsPaginatorOptions is the paginator options for // ListSAMLProviderTags type ListSAMLProviderTagsPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -245,6 +253,9 @@ func (p *ListSAMLProviderTagsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSAMLProviderTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -264,6 +275,14 @@ func (p *ListSAMLProviderTagsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListSAMLProviderTagsAPIClient is a client that implements the +// ListSAMLProviderTags operation. +type ListSAMLProviderTagsAPIClient interface { + ListSAMLProviderTags(context.Context, *ListSAMLProviderTagsInput, ...func(*Options)) (*ListSAMLProviderTagsOutput, error) +} + +var _ ListSAMLProviderTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSAMLProviderTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviders.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviders.go index fa26e314e0..6fa3322abf 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviders.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviders.go @@ -15,8 +15,11 @@ import ( // resource-listing operations return a subset of the available attributes for the // resource. For example, this operation does not return tags, even though they are // an attribute of the returned object. To view all of the information for a SAML -// provider, see GetSAMLProvider . This operation requires Signature Version 4 (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html) -// . +// provider, see GetSAMLProvider. +// +// This operation requires [Signature Version 4]. +// +// [Signature Version 4]: https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html func (c *Client) ListSAMLProviders(ctx context.Context, params *ListSAMLProvidersInput, optFns ...func(*Options)) (*ListSAMLProvidersOutput, error) { if params == nil { params = &ListSAMLProvidersInput{} @@ -104,6 +107,12 @@ func (c *Client) addOperationListSAMLProvidersMiddlewares(stack *middleware.Stac 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListSAMLProviders(options.Region), middleware.Before); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSSHPublicKeys.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSSHPublicKeys.go index 80c4cced7b..5fbd400a36 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSSHPublicKeys.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSSHPublicKeys.go @@ -12,13 +12,17 @@ import ( ) // Returns information about the SSH public keys associated with the specified IAM -// user. If none exists, the operation returns an empty list. The SSH public keys -// returned by this operation are used only for authenticating the IAM user to an -// CodeCommit repository. For more information about using SSH keys to authenticate -// to an CodeCommit repository, see Set up CodeCommit for SSH connections (https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html) -// in the CodeCommit User Guide. Although each user is limited to a small number of -// keys, you can still paginate the results using the MaxItems and Marker -// parameters. +// user. If none exists, the operation returns an empty list. +// +// The SSH public keys returned by this operation are used only for authenticating +// the IAM user to an CodeCommit repository. For more information about using SSH +// keys to authenticate to an CodeCommit repository, see [Set up CodeCommit for SSH connections]in the CodeCommit User +// Guide. +// +// Although each user is limited to a small number of keys, you can still paginate +// the results using the MaxItems and Marker parameters. +// +// [Set up CodeCommit for SSH connections]: https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html func (c *Client) ListSSHPublicKeys(ctx context.Context, params *ListSSHPublicKeysInput, optFns ...func(*Options)) (*ListSSHPublicKeysOutput, error) { if params == nil { params = &ListSSHPublicKeysInput{} @@ -44,19 +48,24 @@ type ListSSHPublicKeysInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 // The name of the IAM user to list SSH public keys for. If none is specified, the // UserName field is determined implicitly based on the Amazon Web Services access - // key used to sign the request. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // key used to sign the request. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex UserName *string noSmithyDocumentSerde @@ -141,6 +150,12 @@ func (c *Client) addOperationListSSHPublicKeysMiddlewares(stack *middleware.Stac 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListSSHPublicKeys(options.Region), middleware.Before); err != nil { return err } @@ -162,23 +177,17 @@ func (c *Client) addOperationListSSHPublicKeysMiddlewares(stack *middleware.Stac return nil } -// ListSSHPublicKeysAPIClient is a client that implements the ListSSHPublicKeys -// operation. -type ListSSHPublicKeysAPIClient interface { - ListSSHPublicKeys(context.Context, *ListSSHPublicKeysInput, ...func(*Options)) (*ListSSHPublicKeysOutput, error) -} - -var _ ListSSHPublicKeysAPIClient = (*Client)(nil) - // ListSSHPublicKeysPaginatorOptions is the paginator options for ListSSHPublicKeys type ListSSHPublicKeysPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -239,6 +248,9 @@ func (p *ListSSHPublicKeysPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSSHPublicKeys(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -258,6 +270,14 @@ func (p *ListSSHPublicKeysPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListSSHPublicKeysAPIClient is a client that implements the ListSSHPublicKeys +// operation. +type ListSSHPublicKeysAPIClient interface { + ListSSHPublicKeys(context.Context, *ListSSHPublicKeysInput, ...func(*Options)) (*ListSSHPublicKeysOutput, error) +} + +var _ ListSSHPublicKeysAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSSHPublicKeys(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificateTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificateTags.go index f45e0b5314..fd09b36a87 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificateTags.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificateTags.go @@ -13,12 +13,15 @@ import ( // Lists the tags that are attached to the specified IAM server certificate. The // returned list of tags is sorted by tag key. For more information about tagging, -// see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. For certificates in a Region supported by Certificate -// Manager (ACM), we recommend that you don't use IAM server certificates. Instead, -// use ACM to provision, manage, and deploy your server certificates. For more -// information about IAM server certificates, Working with server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) -// in the IAM User Guide. +// see [Tagging IAM resources]in the IAM User Guide. +// +// For certificates in a Region supported by Certificate Manager (ACM), we +// recommend that you don't use IAM server certificates. Instead, use ACM to +// provision, manage, and deploy your server certificates. For more information +// about IAM server certificates, [Working with server certificates]in the IAM User Guide. +// +// [Working with server certificates]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) ListServerCertificateTags(ctx context.Context, params *ListServerCertificateTagsInput, optFns ...func(*Options)) (*ListServerCertificateTagsOutput, error) { if params == nil { params = &ListServerCertificateTagsInput{} @@ -36,10 +39,13 @@ func (c *Client) ListServerCertificateTags(ctx context.Context, params *ListServ type ListServerCertificateTagsInput struct { - // The name of the IAM server certificate whose tags you want to see. This - // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- + // The name of the IAM server certificate whose tags you want to see. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. ServerCertificateName *string @@ -52,11 +58,13 @@ type ListServerCertificateTagsInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 noSmithyDocumentSerde @@ -144,6 +152,12 @@ func (c *Client) addOperationListServerCertificateTagsMiddlewares(stack *middlew 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 = addOpListServerCertificateTagsValidationMiddleware(stack); err != nil { return err } @@ -168,24 +182,18 @@ func (c *Client) addOperationListServerCertificateTagsMiddlewares(stack *middlew return nil } -// ListServerCertificateTagsAPIClient is a client that implements the -// ListServerCertificateTags operation. -type ListServerCertificateTagsAPIClient interface { - ListServerCertificateTags(context.Context, *ListServerCertificateTagsInput, ...func(*Options)) (*ListServerCertificateTagsOutput, error) -} - -var _ ListServerCertificateTagsAPIClient = (*Client)(nil) - // ListServerCertificateTagsPaginatorOptions is the paginator options for // ListServerCertificateTags type ListServerCertificateTagsPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -247,6 +255,9 @@ func (p *ListServerCertificateTagsPaginator) NextPage(ctx context.Context, optFn } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServerCertificateTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +277,14 @@ func (p *ListServerCertificateTagsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListServerCertificateTagsAPIClient is a client that implements the +// ListServerCertificateTags operation. +type ListServerCertificateTagsAPIClient interface { + ListServerCertificateTags(context.Context, *ListServerCertificateTagsInput, ...func(*Options)) (*ListServerCertificateTagsOutput, error) +} + +var _ ListServerCertificateTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServerCertificateTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificates.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificates.go index f3b6f53b94..76fec0e13b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificates.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificates.go @@ -12,15 +12,20 @@ import ( ) // Lists the server certificates stored in IAM that have the specified path -// prefix. If none exist, the operation returns an empty list. You can paginate the -// results using the MaxItems and Marker parameters. For more information about -// working with server certificates, see Working with server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) -// in the IAM User Guide. This topic also includes a list of Amazon Web Services -// services that can use the server certificates that you manage with IAM. IAM -// resource-listing operations return a subset of the available attributes for the -// resource. For example, this operation does not return tags, even though they are -// an attribute of the returned object. To view all of the information for a -// servercertificate, see GetServerCertificate . +// prefix. If none exist, the operation returns an empty list. +// +// You can paginate the results using the MaxItems and Marker parameters. +// +// For more information about working with server certificates, see [Working with server certificates] in the IAM +// User Guide. This topic also includes a list of Amazon Web Services services that +// can use the server certificates that you manage with IAM. +// +// IAM resource-listing operations return a subset of the available attributes for +// the resource. For example, this operation does not return tags, even though they +// are an attribute of the returned object. To view all of the information for a +// servercertificate, see GetServerCertificate. +// +// [Working with server certificates]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html func (c *Client) ListServerCertificates(ctx context.Context, params *ListServerCertificatesInput, optFns ...func(*Options)) (*ListServerCertificatesOutput, error) { if params == nil { params = &ListServerCertificatesInput{} @@ -46,22 +51,27 @@ type ListServerCertificatesInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 - // The path prefix for filtering the results. For example: /company/servercerts + // The path prefix for filtering the results. For example: /company/servercerts // would get all server certificates for which the path starts with - // /company/servercerts . This parameter is optional. If it is not included, it - // defaults to a slash (/), listing all server certificates. This parameter allows - // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of - // characters consisting of either a forward slash (/) by itself or a string that - // must begin and end with forward slashes. In addition, it can contain any ASCII - // character from the ! ( \u0021 ) through the DEL character ( \u007F ), including - // most punctuation characters, digits, and upper and lowercased letters. + // /company/servercerts . + // + // This parameter is optional. If it is not included, it defaults to a slash (/), + // listing all server certificates. This parameter allows (through its [regex pattern]) a string + // of characters consisting of either a forward slash (/) by itself or a string + // that must begin and end with forward slashes. In addition, it can contain any + // ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), + // including most punctuation characters, digits, and upper and lowercased letters. + // + // [regex pattern]: http://wikipedia.org/wiki/regex PathPrefix *string noSmithyDocumentSerde @@ -148,6 +158,12 @@ func (c *Client) addOperationListServerCertificatesMiddlewares(stack *middleware 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListServerCertificates(options.Region), middleware.Before); err != nil { return err } @@ -169,24 +185,18 @@ func (c *Client) addOperationListServerCertificatesMiddlewares(stack *middleware return nil } -// ListServerCertificatesAPIClient is a client that implements the -// ListServerCertificates operation. -type ListServerCertificatesAPIClient interface { - ListServerCertificates(context.Context, *ListServerCertificatesInput, ...func(*Options)) (*ListServerCertificatesOutput, error) -} - -var _ ListServerCertificatesAPIClient = (*Client)(nil) - // ListServerCertificatesPaginatorOptions is the paginator options for // ListServerCertificates type ListServerCertificatesPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -247,6 +257,9 @@ func (p *ListServerCertificatesPaginator) NextPage(ctx context.Context, optFns . } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServerCertificates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +279,14 @@ func (p *ListServerCertificatesPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListServerCertificatesAPIClient is a client that implements the +// ListServerCertificates operation. +type ListServerCertificatesAPIClient interface { + ListServerCertificates(context.Context, *ListServerCertificatesInput, ...func(*Options)) (*ListServerCertificatesOutput, error) +} + +var _ ListServerCertificatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServerCertificates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServiceSpecificCredentials.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServiceSpecificCredentials.go index 9cce662df6..74d617e06b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServiceSpecificCredentials.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServiceSpecificCredentials.go @@ -16,8 +16,9 @@ import ( // service-specific credentials returned by this operation are used only for // authenticating the IAM user to a specific service. For more information about // using service-specific credentials to authenticate to an Amazon Web Services -// service, see Set up service-specific credentials (https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html) -// in the CodeCommit User Guide. +// service, see [Set up service-specific credentials]in the CodeCommit User Guide. +// +// [Set up service-specific credentials]: https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html func (c *Client) ListServiceSpecificCredentials(ctx context.Context, params *ListServiceSpecificCredentialsInput, optFns ...func(*Options)) (*ListServiceSpecificCredentialsOutput, error) { if params == nil { params = &ListServiceSpecificCredentialsInput{} @@ -42,10 +43,13 @@ type ListServiceSpecificCredentialsInput struct { // The name of the user whose service-specific credentials you want information // about. If this value is not specified, then the operation assumes the user whose - // credentials are used to call the operation. This parameter allows (through its - // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters - // consisting of upper and lowercase alphanumeric characters with no spaces. You - // can also include any of the following characters: _+=,.@- + // credentials are used to call the operation. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex UserName *string noSmithyDocumentSerde @@ -118,6 +122,12 @@ func (c *Client) addOperationListServiceSpecificCredentialsMiddlewares(stack *mi 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListServiceSpecificCredentials(options.Region), middleware.Before); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSigningCertificates.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSigningCertificates.go index c9222c3b12..b5ae2b2145 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSigningCertificates.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSigningCertificates.go @@ -13,10 +13,12 @@ import ( // Returns information about the signing certificates associated with the // specified IAM user. If none exists, the operation returns an empty list. -// Although each user is limited to a small number of signing certificates, you can -// still paginate the results using the MaxItems and Marker parameters. If the -// UserName field is not specified, the user name is determined implicitly based on -// the Amazon Web Services access key ID used to sign the request for this +// +// Although each user is limited to a small number of signing certificates, you +// can still paginate the results using the MaxItems and Marker parameters. +// +// If the UserName field is not specified, the user name is determined implicitly +// based on the Amazon Web Services access key ID used to sign the request for this // operation. This operation works for access keys under the Amazon Web Services // account. Consequently, you can use this operation to manage Amazon Web Services // account root user credentials even if the Amazon Web Services account has no @@ -46,17 +48,22 @@ type ListSigningCertificatesInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 - // The name of the IAM user whose signing certificates you want to examine. This - // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- + // The name of the IAM user whose signing certificates you want to examine. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex UserName *string noSmithyDocumentSerde @@ -143,6 +150,12 @@ func (c *Client) addOperationListSigningCertificatesMiddlewares(stack *middlewar 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListSigningCertificates(options.Region), middleware.Before); err != nil { return err } @@ -164,24 +177,18 @@ func (c *Client) addOperationListSigningCertificatesMiddlewares(stack *middlewar return nil } -// ListSigningCertificatesAPIClient is a client that implements the -// ListSigningCertificates operation. -type ListSigningCertificatesAPIClient interface { - ListSigningCertificates(context.Context, *ListSigningCertificatesInput, ...func(*Options)) (*ListSigningCertificatesOutput, error) -} - -var _ ListSigningCertificatesAPIClient = (*Client)(nil) - // ListSigningCertificatesPaginatorOptions is the paginator options for // ListSigningCertificates type ListSigningCertificatesPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -243,6 +250,9 @@ func (p *ListSigningCertificatesPaginator) NextPage(ctx context.Context, optFns } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSigningCertificates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -262,6 +272,14 @@ func (p *ListSigningCertificatesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListSigningCertificatesAPIClient is a client that implements the +// ListSigningCertificates operation. +type ListSigningCertificatesAPIClient interface { + ListSigningCertificates(context.Context, *ListSigningCertificatesInput, ...func(*Options)) (*ListSigningCertificatesOutput, error) +} + +var _ ListSigningCertificatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSigningCertificates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserPolicies.go index 8b892c656b..11b7db9b73 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserPolicies.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserPolicies.go @@ -10,13 +10,17 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists the names of the inline policies embedded in the specified IAM user. An -// IAM user can also have managed policies attached to it. To list the managed -// policies that are attached to a user, use ListAttachedUserPolicies . For more -// information about policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. You can paginate the results using the MaxItems and -// Marker parameters. If there are no inline policies embedded with the specified -// user, the operation returns an empty list. +// Lists the names of the inline policies embedded in the specified IAM user. +// +// An IAM user can also have managed policies attached to it. To list the managed +// policies that are attached to a user, use ListAttachedUserPolicies. For more information about +// policies, see [Managed policies and inline policies]in the IAM User Guide. +// +// You can paginate the results using the MaxItems and Marker parameters. If there +// are no inline policies embedded with the specified user, the operation returns +// an empty list. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) ListUserPolicies(ctx context.Context, params *ListUserPoliciesInput, optFns ...func(*Options)) (*ListUserPoliciesOutput, error) { if params == nil { params = &ListUserPoliciesInput{} @@ -34,10 +38,13 @@ func (c *Client) ListUserPolicies(ctx context.Context, params *ListUserPoliciesI type ListUserPoliciesInput struct { - // The name of the user to list policies for. This parameter allows (through its - // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters - // consisting of upper and lowercase alphanumeric characters with no spaces. You - // can also include any of the following characters: _+=,.@- + // The name of the user to list policies for. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -50,11 +57,13 @@ type ListUserPoliciesInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 noSmithyDocumentSerde @@ -141,6 +150,12 @@ func (c *Client) addOperationListUserPoliciesMiddlewares(stack *middleware.Stack 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 = addOpListUserPoliciesValidationMiddleware(stack); err != nil { return err } @@ -165,23 +180,17 @@ func (c *Client) addOperationListUserPoliciesMiddlewares(stack *middleware.Stack return nil } -// ListUserPoliciesAPIClient is a client that implements the ListUserPolicies -// operation. -type ListUserPoliciesAPIClient interface { - ListUserPolicies(context.Context, *ListUserPoliciesInput, ...func(*Options)) (*ListUserPoliciesOutput, error) -} - -var _ ListUserPoliciesAPIClient = (*Client)(nil) - // ListUserPoliciesPaginatorOptions is the paginator options for ListUserPolicies type ListUserPoliciesPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -242,6 +251,9 @@ func (p *ListUserPoliciesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUserPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +273,14 @@ func (p *ListUserPoliciesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListUserPoliciesAPIClient is a client that implements the ListUserPolicies +// operation. +type ListUserPoliciesAPIClient interface { + ListUserPolicies(context.Context, *ListUserPoliciesInput, ...func(*Options)) (*ListUserPoliciesOutput, error) +} + +var _ ListUserPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUserPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserTags.go index 37294cf062..7dc9c05e0b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserTags.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserTags.go @@ -12,9 +12,10 @@ import ( ) // Lists the tags that are attached to the specified IAM user. The returned list -// of tags is sorted by tag key. For more information about tagging, see Tagging -// IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) in -// the IAM User Guide. +// of tags is sorted by tag key. For more information about tagging, see [Tagging IAM resources]in the +// IAM User Guide. +// +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) ListUserTags(ctx context.Context, params *ListUserTagsInput, optFns ...func(*Options)) (*ListUserTagsOutput, error) { if params == nil { params = &ListUserTagsInput{} @@ -32,10 +33,13 @@ func (c *Client) ListUserTags(ctx context.Context, params *ListUserTagsInput, op type ListUserTagsInput struct { - // The name of the IAM user whose tags you want to see. This parameter allows - // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of - // characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the IAM user whose tags you want to see. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -48,11 +52,13 @@ type ListUserTagsInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 noSmithyDocumentSerde @@ -140,6 +146,12 @@ func (c *Client) addOperationListUserTagsMiddlewares(stack *middleware.Stack, op 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 = addOpListUserTagsValidationMiddleware(stack); err != nil { return err } @@ -164,22 +176,17 @@ func (c *Client) addOperationListUserTagsMiddlewares(stack *middleware.Stack, op return nil } -// ListUserTagsAPIClient is a client that implements the ListUserTags operation. -type ListUserTagsAPIClient interface { - ListUserTags(context.Context, *ListUserTagsInput, ...func(*Options)) (*ListUserTagsOutput, error) -} - -var _ ListUserTagsAPIClient = (*Client)(nil) - // ListUserTagsPaginatorOptions is the paginator options for ListUserTags type ListUserTagsPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -240,6 +247,9 @@ func (p *ListUserTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUserTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -259,6 +269,13 @@ func (p *ListUserTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListUserTagsAPIClient is a client that implements the ListUserTags operation. +type ListUserTagsAPIClient interface { + ListUserTags(context.Context, *ListUserTagsInput, ...func(*Options)) (*ListUserTagsOutput, error) +} + +var _ ListUserTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUserTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUsers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUsers.go index 488b06857c..f6366f9442 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUsers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUsers.go @@ -13,15 +13,19 @@ import ( // Lists the IAM users that have the specified path prefix. If no path prefix is // specified, the operation returns all users in the Amazon Web Services account. -// If there are none, the operation returns an empty list. IAM resource-listing -// operations return a subset of the available attributes for the resource. This -// operation does not return the following attributes, even though they are an -// attribute of the returned object: +// If there are none, the operation returns an empty list. +// +// IAM resource-listing operations return a subset of the available attributes for +// the resource. This operation does not return the following attributes, even +// though they are an attribute of the returned object: +// // - PermissionsBoundary +// // - Tags // -// To view all of the information for a user, see GetUser . You can paginate the -// results using the MaxItems and Marker parameters. +// To view all of the information for a user, see GetUser. +// +// You can paginate the results using the MaxItems and Marker parameters. func (c *Client) ListUsers(ctx context.Context, params *ListUsersInput, optFns ...func(*Options)) (*ListUsersOutput, error) { if params == nil { params = &ListUsersInput{} @@ -47,22 +51,27 @@ type ListUsersInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 - // The path prefix for filtering the results. For example: + // The path prefix for filtering the results. For example: // /division_abc/subdivision_xyz/ , which would get all user names whose path - // starts with /division_abc/subdivision_xyz/ . This parameter is optional. If it - // is not included, it defaults to a slash (/), listing all user names. This - // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) - // a string of characters consisting of either a forward slash (/) by itself or a - // string that must begin and end with forward slashes. In addition, it can contain - // any ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), - // including most punctuation characters, digits, and upper and lowercased letters. + // starts with /division_abc/subdivision_xyz/ . + // + // This parameter is optional. If it is not included, it defaults to a slash (/), + // listing all user names. This parameter allows (through its [regex pattern]) a string of + // characters consisting of either a forward slash (/) by itself or a string that + // must begin and end with forward slashes. In addition, it can contain any ASCII + // character from the ! ( \u0021 ) through the DEL character ( \u007F ), including + // most punctuation characters, digits, and upper and lowercased letters. + // + // [regex pattern]: http://wikipedia.org/wiki/regex PathPrefix *string noSmithyDocumentSerde @@ -149,6 +158,12 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListUsers(options.Region), middleware.Before); err != nil { return err } @@ -170,22 +185,17 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio return nil } -// ListUsersAPIClient is a client that implements the ListUsers operation. -type ListUsersAPIClient interface { - ListUsers(context.Context, *ListUsersInput, ...func(*Options)) (*ListUsersOutput, error) -} - -var _ ListUsersAPIClient = (*Client)(nil) - // ListUsersPaginatorOptions is the paginator options for ListUsers type ListUsersPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -246,6 +256,9 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUsers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -265,6 +278,13 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListUsersAPIClient is a client that implements the ListUsers operation. +type ListUsersAPIClient interface { + ListUsers(context.Context, *ListUsersInput, ...func(*Options)) (*ListUsersOutput, error) +} + +var _ ListUsersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUsers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListVirtualMFADevices.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListVirtualMFADevices.go index 9820577aef..299fafffa4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListVirtualMFADevices.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListVirtualMFADevices.go @@ -14,11 +14,14 @@ import ( // Lists the virtual MFA devices defined in the Amazon Web Services account by // assignment status. If you do not specify an assignment status, the operation // returns a list of all virtual MFA devices. Assignment status can be Assigned , -// Unassigned , or Any . IAM resource-listing operations return a subset of the -// available attributes for the resource. For example, this operation does not -// return tags, even though they are an attribute of the returned object. To view -// tag information for a virtual MFA device, see ListMFADeviceTags . You can -// paginate the results using the MaxItems and Marker parameters. +// Unassigned , or Any . +// +// IAM resource-listing operations return a subset of the available attributes for +// the resource. For example, this operation does not return tags, even though they +// are an attribute of the returned object. To view tag information for a virtual +// MFA device, see ListMFADeviceTags. +// +// You can paginate the results using the MaxItems and Marker parameters. func (c *Client) ListVirtualMFADevices(ctx context.Context, params *ListVirtualMFADevicesInput, optFns ...func(*Options)) (*ListVirtualMFADevicesOutput, error) { if params == nil { params = &ListVirtualMFADevicesInput{} @@ -36,7 +39,7 @@ func (c *Client) ListVirtualMFADevices(ctx context.Context, params *ListVirtualM type ListVirtualMFADevicesInput struct { - // The status ( Unassigned or Assigned ) of the devices to list. If you do not + // The status ( Unassigned or Assigned ) of the devices to list. If you do not // specify an AssignmentStatus , the operation defaults to Any , which lists both // assigned and unassigned virtual MFA devices., AssignmentStatus types.AssignmentStatusType @@ -49,11 +52,13 @@ type ListVirtualMFADevicesInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 noSmithyDocumentSerde @@ -62,7 +67,7 @@ type ListVirtualMFADevicesInput struct { // Contains the response to a successful ListVirtualMFADevices request. type ListVirtualMFADevicesOutput struct { - // The list of virtual MFA devices in the current account that match the + // The list of virtual MFA devices in the current account that match the // AssignmentStatus value that was passed in the request. // // This member is required. @@ -141,6 +146,12 @@ func (c *Client) addOperationListVirtualMFADevicesMiddlewares(stack *middleware. 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListVirtualMFADevices(options.Region), middleware.Before); err != nil { return err } @@ -162,24 +173,18 @@ func (c *Client) addOperationListVirtualMFADevicesMiddlewares(stack *middleware. return nil } -// ListVirtualMFADevicesAPIClient is a client that implements the -// ListVirtualMFADevices operation. -type ListVirtualMFADevicesAPIClient interface { - ListVirtualMFADevices(context.Context, *ListVirtualMFADevicesInput, ...func(*Options)) (*ListVirtualMFADevicesOutput, error) -} - -var _ ListVirtualMFADevicesAPIClient = (*Client)(nil) - // ListVirtualMFADevicesPaginatorOptions is the paginator options for // ListVirtualMFADevices type ListVirtualMFADevicesPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -240,6 +245,9 @@ func (p *ListVirtualMFADevicesPaginator) NextPage(ctx context.Context, optFns .. } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVirtualMFADevices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -259,6 +267,14 @@ func (p *ListVirtualMFADevicesPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListVirtualMFADevicesAPIClient is a client that implements the +// ListVirtualMFADevices operation. +type ListVirtualMFADevicesAPIClient interface { + ListVirtualMFADevices(context.Context, *ListVirtualMFADevicesInput, ...func(*Options)) (*ListVirtualMFADevicesOutput, error) +} + +var _ ListVirtualMFADevicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVirtualMFADevices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutGroupPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutGroupPolicy.go index c5c20af97b..2f1e8c598e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutGroupPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutGroupPolicy.go @@ -11,16 +11,24 @@ import ( ) // Adds or updates an inline policy document that is embedded in the specified IAM -// group. A user can also have managed policies attached to it. To attach a managed -// policy to a group, use AttachGroupPolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_AttachGroupPolicy.html) -// . To create a new managed policy, use CreatePolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicy.html) -// . For information about policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. For information about the maximum number of inline -// policies that you can embed in a group, see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM User Guide. Because policy documents can be large, you should use -// POST rather than GET when calling PutGroupPolicy . For general information about -// using the Query API with IAM, see Making query requests (https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html) -// in the IAM User Guide. +// group. +// +// A user can also have managed policies attached to it. To attach a managed +// policy to a group, use [AttachGroupPolicy]AttachGroupPolicy . To create a new managed policy, use [CreatePolicy] +// CreatePolicy . For information about policies, see [Managed policies and inline policies] in the IAM User Guide. +// +// For information about the maximum number of inline policies that you can embed +// in a group, see [IAM and STS quotas]in the IAM User Guide. +// +// Because policy documents can be large, you should use POST rather than GET when +// calling PutGroupPolicy . For general information about using the Query API with +// IAM, see [Making query requests]in the IAM User Guide. +// +// [CreatePolicy]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicy.html +// [IAM and STS quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html +// [Making query requests]: https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html +// [AttachGroupPolicy]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_AttachGroupPolicy.html +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) PutGroupPolicy(ctx context.Context, params *PutGroupPolicyInput, optFns ...func(*Options)) (*PutGroupPolicyOutput, error) { if params == nil { params = &PutGroupPolicyInput{} @@ -38,34 +46,48 @@ func (c *Client) PutGroupPolicy(ctx context.Context, params *PutGroupPolicyInput type PutGroupPolicyInput struct { - // The name of the group to associate the policy with. This parameter allows - // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of - // characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@-. + // The name of the group to associate the policy with. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@-. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. GroupName *string - // The policy document. You must provide policies in JSON format in IAM. However, - // for CloudFormation templates formatted in YAML, you can provide the policy in - // JSON or YAML format. CloudFormation always converts a YAML policy to JSON format - // before submitting it to IAM. The regex pattern (http://wikipedia.org/wiki/regex) - // used to validate this parameter is a string of characters consisting of the - // following: + // The policy document. + // + // You must provide policies in JSON format in IAM. However, for CloudFormation + // templates formatted in YAML, you can provide the policy in JSON or YAML format. + // CloudFormation always converts a YAML policy to JSON format before submitting it + // to IAM. + // + // The [regex pattern] used to validate this parameter is a string of characters consisting of + // the following: + // // - Any printable ASCII character ranging from the space character ( \u0020 ) // through the end of the ASCII character range + // // - The printable characters in the Basic Latin and Latin-1 Supplement // character set (through \u00FF ) + // // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage // return ( \u000D ) // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // This member is required. PolicyDocument *string - // The name of the policy document. This parameter allows (through its regex - // pattern (http://wikipedia.org/wiki/regex) ) a string of characters consisting of - // upper and lowercase alphanumeric characters with no spaces. You can also include - // any of the following characters: _+=,.@- + // The name of the policy document. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. PolicyName *string @@ -135,6 +157,12 @@ func (c *Client) addOperationPutGroupPolicyMiddlewares(stack *middleware.Stack, 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 = addOpPutGroupPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePermissionsBoundary.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePermissionsBoundary.go index 6bd1fdeaeb..a606557450 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePermissionsBoundary.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePermissionsBoundary.go @@ -14,12 +14,15 @@ import ( // boundary. You can use an Amazon Web Services managed policy or a customer // managed policy to set the boundary for a role. Use the boundary to control the // maximum permissions that the role can have. Setting a permissions boundary is an -// advanced feature that can affect the permissions for the role. You cannot set -// the boundary for a service-linked role. Policies used as permissions boundaries -// do not provide permissions. You must also attach a permissions policy to the -// role. To learn how the effective permissions for a role are evaluated, see IAM -// JSON policy evaluation logic (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html) -// in the IAM User Guide. +// advanced feature that can affect the permissions for the role. +// +// You cannot set the boundary for a service-linked role. +// +// Policies used as permissions boundaries do not provide permissions. You must +// also attach a permissions policy to the role. To learn how the effective +// permissions for a role are evaluated, see [IAM JSON policy evaluation logic]in the IAM User Guide. +// +// [IAM JSON policy evaluation logic]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html func (c *Client) PutRolePermissionsBoundary(ctx context.Context, params *PutRolePermissionsBoundaryInput, optFns ...func(*Options)) (*PutRolePermissionsBoundaryOutput, error) { if params == nil { params = &PutRolePermissionsBoundaryInput{} @@ -38,14 +41,18 @@ func (c *Client) PutRolePermissionsBoundary(ctx context.Context, params *PutRole type PutRolePermissionsBoundaryInput struct { // The ARN of the managed policy that is used to set the permissions boundary for - // the role. A permissions boundary policy defines the maximum permissions that + // the role. + // + // A permissions boundary policy defines the maximum permissions that // identity-based policies can grant to an entity, but does not grant permissions. // Permissions boundaries do not define the maximum permissions that a - // resource-based policy can grant to an entity. To learn more, see Permissions - // boundaries for IAM entities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. For more information about policy types, see Policy - // types (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types) - // in the IAM User Guide. + // resource-based policy can grant to an entity. To learn more, see [Permissions boundaries for IAM entities]in the IAM + // User Guide. + // + // For more information about policy types, see [Policy types] in the IAM User Guide. + // + // [Policy types]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types + // [Permissions boundaries for IAM entities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html // // This member is required. PermissionsBoundary *string @@ -121,6 +128,12 @@ func (c *Client) addOperationPutRolePermissionsBoundaryMiddlewares(stack *middle 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 = addOpPutRolePermissionsBoundaryValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePolicy.go index 1c39531bfe..7977a8f714 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePolicy.go @@ -11,21 +11,33 @@ import ( ) // Adds or updates an inline policy document that is embedded in the specified IAM -// role. When you embed an inline policy in a role, the inline policy is used as -// part of the role's access (permissions) policy. The role's trust policy is -// created at the same time as the role, using CreateRole (https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html) -// . You can update a role's trust policy using UpdateAssumeRolePolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_UpdateAssumeRolePolicy.html) -// . For more information about roles, see IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/roles-toplevel.html) -// in the IAM User Guide. A role can also have a managed policy attached to it. To -// attach a managed policy to a role, use AttachRolePolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_AttachRolePolicy.html) -// . To create a new managed policy, use CreatePolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicy.html) -// . For information about policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. For information about the maximum number of inline -// policies that you can embed with a role, see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM User Guide. Because policy documents can be large, you should use -// POST rather than GET when calling PutRolePolicy . For general information about -// using the Query API with IAM, see Making query requests (https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html) -// in the IAM User Guide. +// role. +// +// When you embed an inline policy in a role, the inline policy is used as part of +// the role's access (permissions) policy. The role's trust policy is created at +// the same time as the role, using [CreateRole]CreateRole . You can update a role's trust +// policy using [UpdateAssumeRolePolicy]UpdateAssumeRolePolicy . For more information about roles, see [IAM roles] in +// the IAM User Guide. +// +// A role can also have a managed policy attached to it. To attach a managed +// policy to a role, use [AttachRolePolicy]AttachRolePolicy . To create a new managed policy, use [CreatePolicy] +// CreatePolicy . For information about policies, see [Managed policies and inline policies] in the IAM User Guide. +// +// For information about the maximum number of inline policies that you can embed +// with a role, see [IAM and STS quotas]in the IAM User Guide. +// +// Because policy documents can be large, you should use POST rather than GET when +// calling PutRolePolicy . For general information about using the Query API with +// IAM, see [Making query requests]in the IAM User Guide. +// +// [UpdateAssumeRolePolicy]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_UpdateAssumeRolePolicy.html +// [AttachRolePolicy]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_AttachRolePolicy.html +// [CreatePolicy]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicy.html +// [IAM and STS quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html +// [Making query requests]: https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html +// [IAM roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/roles-toplevel.html +// [CreateRole]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) PutRolePolicy(ctx context.Context, params *PutRolePolicyInput, optFns ...func(*Options)) (*PutRolePolicyOutput, error) { if params == nil { params = &PutRolePolicyInput{} @@ -43,34 +55,48 @@ func (c *Client) PutRolePolicy(ctx context.Context, params *PutRolePolicyInput, type PutRolePolicyInput struct { - // The policy document. You must provide policies in JSON format in IAM. However, - // for CloudFormation templates formatted in YAML, you can provide the policy in - // JSON or YAML format. CloudFormation always converts a YAML policy to JSON format - // before submitting it to IAM. The regex pattern (http://wikipedia.org/wiki/regex) - // used to validate this parameter is a string of characters consisting of the - // following: + // The policy document. + // + // You must provide policies in JSON format in IAM. However, for CloudFormation + // templates formatted in YAML, you can provide the policy in JSON or YAML format. + // CloudFormation always converts a YAML policy to JSON format before submitting it + // to IAM. + // + // The [regex pattern] used to validate this parameter is a string of characters consisting of + // the following: + // // - Any printable ASCII character ranging from the space character ( \u0020 ) // through the end of the ASCII character range + // // - The printable characters in the Basic Latin and Latin-1 Supplement // character set (through \u00FF ) + // // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage // return ( \u000D ) // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // This member is required. PolicyDocument *string - // The name of the policy document. This parameter allows (through its regex - // pattern (http://wikipedia.org/wiki/regex) ) a string of characters consisting of - // upper and lowercase alphanumeric characters with no spaces. You can also include - // any of the following characters: _+=,.@- + // The name of the policy document. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. PolicyName *string - // The name of the role to associate the policy with. This parameter allows - // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of - // characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the role to associate the policy with. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -140,6 +166,12 @@ func (c *Client) addOperationPutRolePolicyMiddlewares(stack *middleware.Stack, o 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 = addOpPutRolePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPermissionsBoundary.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPermissionsBoundary.go index cc203e1220..b076030bcd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPermissionsBoundary.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPermissionsBoundary.go @@ -14,11 +14,13 @@ import ( // boundary. You can use an Amazon Web Services managed policy or a customer // managed policy to set the boundary for a user. Use the boundary to control the // maximum permissions that the user can have. Setting a permissions boundary is an -// advanced feature that can affect the permissions for the user. Policies that are -// used as permissions boundaries do not provide permissions. You must also attach -// a permissions policy to the user. To learn how the effective permissions for a -// user are evaluated, see IAM JSON policy evaluation logic (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html) -// in the IAM User Guide. +// advanced feature that can affect the permissions for the user. +// +// Policies that are used as permissions boundaries do not provide permissions. +// You must also attach a permissions policy to the user. To learn how the +// effective permissions for a user are evaluated, see [IAM JSON policy evaluation logic]in the IAM User Guide. +// +// [IAM JSON policy evaluation logic]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html func (c *Client) PutUserPermissionsBoundary(ctx context.Context, params *PutUserPermissionsBoundaryInput, optFns ...func(*Options)) (*PutUserPermissionsBoundaryOutput, error) { if params == nil { params = &PutUserPermissionsBoundaryInput{} @@ -37,14 +39,18 @@ func (c *Client) PutUserPermissionsBoundary(ctx context.Context, params *PutUser type PutUserPermissionsBoundaryInput struct { // The ARN of the managed policy that is used to set the permissions boundary for - // the user. A permissions boundary policy defines the maximum permissions that + // the user. + // + // A permissions boundary policy defines the maximum permissions that // identity-based policies can grant to an entity, but does not grant permissions. // Permissions boundaries do not define the maximum permissions that a - // resource-based policy can grant to an entity. To learn more, see Permissions - // boundaries for IAM entities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. For more information about policy types, see Policy - // types (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types) - // in the IAM User Guide. + // resource-based policy can grant to an entity. To learn more, see [Permissions boundaries for IAM entities]in the IAM + // User Guide. + // + // For more information about policy types, see [Policy types] in the IAM User Guide. + // + // [Policy types]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types + // [Permissions boundaries for IAM entities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html // // This member is required. PermissionsBoundary *string @@ -120,6 +126,12 @@ func (c *Client) addOperationPutUserPermissionsBoundaryMiddlewares(stack *middle 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 = addOpPutUserPermissionsBoundaryValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPolicy.go index dd522e273b..eb2e1376ca 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPolicy.go @@ -11,16 +11,24 @@ import ( ) // Adds or updates an inline policy document that is embedded in the specified IAM -// user. An IAM user can also have a managed policy attached to it. To attach a -// managed policy to a user, use AttachUserPolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_AttachUserPolicy.html) -// . To create a new managed policy, use CreatePolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicy.html) -// . For information about policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. For information about the maximum number of inline -// policies that you can embed in a user, see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM User Guide. Because policy documents can be large, you should use -// POST rather than GET when calling PutUserPolicy . For general information about -// using the Query API with IAM, see Making query requests (https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html) -// in the IAM User Guide. +// user. +// +// An IAM user can also have a managed policy attached to it. To attach a managed +// policy to a user, use [AttachUserPolicy]AttachUserPolicy . To create a new managed policy, use [CreatePolicy] +// CreatePolicy . For information about policies, see [Managed policies and inline policies] in the IAM User Guide. +// +// For information about the maximum number of inline policies that you can embed +// in a user, see [IAM and STS quotas]in the IAM User Guide. +// +// Because policy documents can be large, you should use POST rather than GET when +// calling PutUserPolicy . For general information about using the Query API with +// IAM, see [Making query requests]in the IAM User Guide. +// +// [CreatePolicy]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicy.html +// [IAM and STS quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html +// [Making query requests]: https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html +// [AttachUserPolicy]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_AttachUserPolicy.html +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) PutUserPolicy(ctx context.Context, params *PutUserPolicyInput, optFns ...func(*Options)) (*PutUserPolicyOutput, error) { if params == nil { params = &PutUserPolicyInput{} @@ -38,34 +46,48 @@ func (c *Client) PutUserPolicy(ctx context.Context, params *PutUserPolicyInput, type PutUserPolicyInput struct { - // The policy document. You must provide policies in JSON format in IAM. However, - // for CloudFormation templates formatted in YAML, you can provide the policy in - // JSON or YAML format. CloudFormation always converts a YAML policy to JSON format - // before submitting it to IAM. The regex pattern (http://wikipedia.org/wiki/regex) - // used to validate this parameter is a string of characters consisting of the - // following: + // The policy document. + // + // You must provide policies in JSON format in IAM. However, for CloudFormation + // templates formatted in YAML, you can provide the policy in JSON or YAML format. + // CloudFormation always converts a YAML policy to JSON format before submitting it + // to IAM. + // + // The [regex pattern] used to validate this parameter is a string of characters consisting of + // the following: + // // - Any printable ASCII character ranging from the space character ( \u0020 ) // through the end of the ASCII character range + // // - The printable characters in the Basic Latin and Latin-1 Supplement // character set (through \u00FF ) + // // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage // return ( \u000D ) // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // This member is required. PolicyDocument *string - // The name of the policy document. This parameter allows (through its regex - // pattern (http://wikipedia.org/wiki/regex) ) a string of characters consisting of - // upper and lowercase alphanumeric characters with no spaces. You can also include - // any of the following characters: _+=,.@- + // The name of the policy document. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. PolicyName *string - // The name of the user to associate the policy with. This parameter allows - // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of - // characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the user to associate the policy with. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -135,6 +157,12 @@ func (c *Client) addOperationPutUserPolicyMiddlewares(stack *middleware.Stack, o 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 = addOpPutUserPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveClientIDFromOpenIDConnectProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveClientIDFromOpenIDConnectProvider.go index 993988b91f..71975b0a61 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveClientIDFromOpenIDConnectProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveClientIDFromOpenIDConnectProvider.go @@ -12,8 +12,10 @@ import ( // Removes the specified client ID (also known as audience) from the list of // client IDs registered for the specified IAM OpenID Connect (OIDC) provider -// resource object. This operation is idempotent; it does not fail or return an -// error if you try to remove a client ID that does not exist. +// resource object. +// +// This operation is idempotent; it does not fail or return an error if you try to +// remove a client ID that does not exist. func (c *Client) RemoveClientIDFromOpenIDConnectProvider(ctx context.Context, params *RemoveClientIDFromOpenIDConnectProviderInput, optFns ...func(*Options)) (*RemoveClientIDFromOpenIDConnectProviderOutput, error) { if params == nil { params = &RemoveClientIDFromOpenIDConnectProviderInput{} @@ -32,17 +34,18 @@ func (c *Client) RemoveClientIDFromOpenIDConnectProvider(ctx context.Context, pa type RemoveClientIDFromOpenIDConnectProviderInput struct { // The client ID (also known as audience) to remove from the IAM OIDC provider - // resource. For more information about client IDs, see CreateOpenIDConnectProvider - // . + // resource. For more information about client IDs, see CreateOpenIDConnectProvider. // // This member is required. ClientID *string // The Amazon Resource Name (ARN) of the IAM OIDC provider resource to remove the - // client ID from. You can get a list of OIDC provider ARNs by using the - // ListOpenIDConnectProviders operation. For more information about ARNs, see - // Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // client ID from. You can get a list of OIDC provider ARNs by using the ListOpenIDConnectProvidersoperation. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. OpenIDConnectProviderArn *string @@ -112,6 +115,12 @@ func (c *Client) addOperationRemoveClientIDFromOpenIDConnectProviderMiddlewares( 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 = addOpRemoveClientIDFromOpenIDConnectProviderValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveRoleFromInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveRoleFromInstanceProfile.go index ce71bb945c..02ee3aa99b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveRoleFromInstanceProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveRoleFromInstanceProfile.go @@ -11,14 +11,17 @@ import ( ) // Removes the specified IAM role from the specified Amazon EC2 instance profile. +// // Make sure that you do not have any Amazon EC2 instances running with the role // you are about to remove from the instance profile. Removing a role from an // instance profile that is associated with a running instance might break any -// applications running on the instance. For more information about roles, see IAM -// roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) in the -// IAM User Guide. For more information about instance profiles, see Using -// instance profiles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) -// in the IAM User Guide. +// applications running on the instance. +// +// For more information about roles, see [IAM roles] in the IAM User Guide. For more +// information about instance profiles, see [Using instance profiles]in the IAM User Guide. +// +// [Using instance profiles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html +// [IAM roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html func (c *Client) RemoveRoleFromInstanceProfile(ctx context.Context, params *RemoveRoleFromInstanceProfileInput, optFns ...func(*Options)) (*RemoveRoleFromInstanceProfileOutput, error) { if params == nil { params = &RemoveRoleFromInstanceProfileInput{} @@ -36,18 +39,24 @@ func (c *Client) RemoveRoleFromInstanceProfile(ctx context.Context, params *Remo type RemoveRoleFromInstanceProfileInput struct { - // The name of the instance profile to update. This parameter allows (through its - // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters - // consisting of upper and lowercase alphanumeric characters with no spaces. You - // can also include any of the following characters: _+=,.@- + // The name of the instance profile to update. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. InstanceProfileName *string - // The name of the role to remove. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // The name of the role to remove. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -117,6 +126,12 @@ func (c *Client) addOperationRemoveRoleFromInstanceProfileMiddlewares(stack *mid 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 = addOpRemoveRoleFromInstanceProfileValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveUserFromGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveUserFromGroup.go index ad6cd17388..0640669b4c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveUserFromGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveUserFromGroup.go @@ -28,18 +28,24 @@ func (c *Client) RemoveUserFromGroup(ctx context.Context, params *RemoveUserFrom type RemoveUserFromGroupInput struct { - // The name of the group to update. This parameter allows (through its regex - // pattern (http://wikipedia.org/wiki/regex) ) a string of characters consisting of - // upper and lowercase alphanumeric characters with no spaces. You can also include - // any of the following characters: _+=,.@- + // The name of the group to update. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. GroupName *string - // The name of the user to remove. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // The name of the user to remove. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -109,6 +115,12 @@ func (c *Client) addOperationRemoveUserFromGroupMiddlewares(stack *middleware.St 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 = addOpRemoveUserFromGroupValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResetServiceSpecificCredential.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResetServiceSpecificCredential.go index 006f4b4040..85f0710ef5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResetServiceSpecificCredential.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResetServiceSpecificCredential.go @@ -32,19 +32,25 @@ func (c *Client) ResetServiceSpecificCredential(ctx context.Context, params *Res type ResetServiceSpecificCredentialInput struct { - // The unique identifier of the service-specific credential. This parameter allows - // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of - // characters that can consist of any upper or lowercased letter or digit. + // The unique identifier of the service-specific credential. + // + // This parameter allows (through its [regex pattern]) a string of characters that can consist of + // any upper or lowercased letter or digit. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. ServiceSpecificCredentialId *string // The name of the IAM user associated with the service-specific credential. If // this value is not specified, then the operation assumes the user whose - // credentials are used to call the operation. This parameter allows (through its - // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters - // consisting of upper and lowercase alphanumeric characters with no spaces. You - // can also include any of the following characters: _+=,.@- + // credentials are used to call the operation. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex UserName *string noSmithyDocumentSerde @@ -53,8 +59,10 @@ type ResetServiceSpecificCredentialInput struct { type ResetServiceSpecificCredentialOutput struct { // A structure with details about the updated service-specific credential, - // including the new password. This is the only time that you can access the - // password. You cannot recover the password later, but you can reset it again. + // including the new password. + // + // This is the only time that you can access the password. You cannot recover the + // password later, but you can reset it again. ServiceSpecificCredential *types.ServiceSpecificCredential // Metadata pertaining to the operation's result. @@ -118,6 +126,12 @@ func (c *Client) addOperationResetServiceSpecificCredentialMiddlewares(stack *mi 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 = addOpResetServiceSpecificCredentialValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResyncMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResyncMFADevice.go index 030061b223..bd53a03b98 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResyncMFADevice.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResyncMFADevice.go @@ -11,9 +11,12 @@ import ( ) // Synchronizes the specified MFA device with its IAM resource object on the -// Amazon Web Services servers. For more information about creating and working -// with virtual MFA devices, see Using a virtual MFA device (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html) +// Amazon Web Services servers. +// +// For more information about creating and working with virtual MFA devices, see [Using a virtual MFA device] // in the IAM User Guide. +// +// [Using a virtual MFA device]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html func (c *Client) ResyncMFADevice(ctx context.Context, params *ResyncMFADeviceInput, optFns ...func(*Options)) (*ResyncMFADeviceOutput, error) { if params == nil { params = &ResyncMFADeviceInput{} @@ -31,30 +34,38 @@ func (c *Client) ResyncMFADevice(ctx context.Context, params *ResyncMFADeviceInp type ResyncMFADeviceInput struct { - // An authentication code emitted by the device. The format for this parameter is - // a sequence of six digits. + // An authentication code emitted by the device. + // + // The format for this parameter is a sequence of six digits. // // This member is required. AuthenticationCode1 *string - // A subsequent authentication code emitted by the device. The format for this - // parameter is a sequence of six digits. + // A subsequent authentication code emitted by the device. + // + // The format for this parameter is a sequence of six digits. // // This member is required. AuthenticationCode2 *string - // Serial number that uniquely identifies the MFA device. This parameter allows - // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of - // characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // Serial number that uniquely identifies the MFA device. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. SerialNumber *string - // The name of the user whose MFA device you want to resynchronize. This parameter - // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string - // of characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the user whose MFA device you want to resynchronize. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -124,6 +135,12 @@ func (c *Client) addOperationResyncMFADeviceMiddlewares(stack *middleware.Stack, 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 = addOpResyncMFADeviceValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetDefaultPolicyVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetDefaultPolicyVersion.go index 1a1d1ab6fd..5aa954a949 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetDefaultPolicyVersion.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetDefaultPolicyVersion.go @@ -11,11 +11,14 @@ import ( ) // Sets the specified version of the specified policy as the policy's default -// (operative) version. This operation affects all users, groups, and roles that -// the policy is attached to. To list the users, groups, and roles that the policy -// is attached to, use ListEntitiesForPolicy . For information about managed -// policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. +// (operative) version. +// +// This operation affects all users, groups, and roles that the policy is attached +// to. To list the users, groups, and roles that the policy is attached to, use ListEntitiesForPolicy. +// +// For information about managed policies, see [Managed policies and inline policies] in the IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html func (c *Client) SetDefaultPolicyVersion(ctx context.Context, params *SetDefaultPolicyVersionInput, optFns ...func(*Options)) (*SetDefaultPolicyVersionOutput, error) { if params == nil { params = &SetDefaultPolicyVersionInput{} @@ -34,15 +37,21 @@ func (c *Client) SetDefaultPolicyVersion(ctx context.Context, params *SetDefault type SetDefaultPolicyVersionInput struct { // The Amazon Resource Name (ARN) of the IAM policy whose default version you want - // to set. For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // to set. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. PolicyArn *string - // The version of the policy to set as the default (operative) version. For more - // information about managed policy versions, see Versioning for managed policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) - // in the IAM User Guide. + // The version of the policy to set as the default (operative) version. + // + // For more information about managed policy versions, see [Versioning for managed policies] in the IAM User Guide. + // + // [Versioning for managed policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html // // This member is required. VersionId *string @@ -112,6 +121,12 @@ func (c *Client) addOperationSetDefaultPolicyVersionMiddlewares(stack *middlewar 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 = addOpSetDefaultPolicyVersionValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetSecurityTokenServicePreferences.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetSecurityTokenServicePreferences.go index 50e8031412..e0ffc10ed9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetSecurityTokenServicePreferences.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetSecurityTokenServicePreferences.go @@ -12,24 +12,27 @@ import ( ) // Sets the specified version of the global endpoint token as the token version -// used for the Amazon Web Services account. By default, Security Token Service -// (STS) is available as a global service, and all STS requests go to a single -// endpoint at https://sts.amazonaws.com . Amazon Web Services recommends using -// Regional STS endpoints to reduce latency, build in redundancy, and increase -// session token availability. For information about Regional endpoints for STS, -// see Security Token Service endpoints and quotas (https://docs.aws.amazon.com/general/latest/gr/sts.html) -// in the Amazon Web Services General Reference. If you make an STS call to the -// global endpoint, the resulting session tokens might be valid in some Regions but -// not others. It depends on the version that is set in this operation. Version 1 -// tokens are valid only in Amazon Web Services Regions that are available by -// default. These tokens do not work in manually enabled Regions, such as Asia -// Pacific (Hong Kong). Version 2 tokens are valid in all Regions. However, version -// 2 tokens are longer and might affect systems where you temporarily store tokens. -// For information, see Activating and deactivating STS in an Amazon Web Services -// Region (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) -// in the IAM User Guide. To view the current session token version, see the -// GlobalEndpointTokenVersion entry in the response of the GetAccountSummary -// operation. +// used for the Amazon Web Services account. +// +// By default, Security Token Service (STS) is available as a global service, and +// all STS requests go to a single endpoint at https://sts.amazonaws.com . Amazon +// Web Services recommends using Regional STS endpoints to reduce latency, build in +// redundancy, and increase session token availability. For information about +// Regional endpoints for STS, see [Security Token Service endpoints and quotas]in the Amazon Web Services General Reference. +// +// If you make an STS call to the global endpoint, the resulting session tokens +// might be valid in some Regions but not others. It depends on the version that is +// set in this operation. Version 1 tokens are valid only in Amazon Web Services +// Regions that are available by default. These tokens do not work in manually +// enabled Regions, such as Asia Pacific (Hong Kong). Version 2 tokens are valid in +// all Regions. However, version 2 tokens are longer and might affect systems where +// you temporarily store tokens. For information, see [Activating and deactivating STS in an Amazon Web Services Region]in the IAM User Guide. +// +// To view the current session token version, see the GlobalEndpointTokenVersion +// entry in the response of the GetAccountSummaryoperation. +// +// [Activating and deactivating STS in an Amazon Web Services Region]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html +// [Security Token Service endpoints and quotas]: https://docs.aws.amazon.com/general/latest/gr/sts.html func (c *Client) SetSecurityTokenServicePreferences(ctx context.Context, params *SetSecurityTokenServicePreferencesInput, optFns ...func(*Options)) (*SetSecurityTokenServicePreferencesOutput, error) { if params == nil { params = &SetSecurityTokenServicePreferencesInput{} @@ -51,9 +54,11 @@ type SetSecurityTokenServicePreferencesInput struct { // Amazon Web Services Regions that are available by default. These tokens do not // work in manually enabled Regions, such as Asia Pacific (Hong Kong). Version 2 // tokens are valid in all Regions. However, version 2 tokens are longer and might - // affect systems where you temporarily store tokens. For information, see - // Activating and deactivating STS in an Amazon Web Services Region (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) - // in the IAM User Guide. + // affect systems where you temporarily store tokens. + // + // For information, see [Activating and deactivating STS in an Amazon Web Services Region] in the IAM User Guide. + // + // [Activating and deactivating STS in an Amazon Web Services Region]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html // // This member is required. GlobalEndpointTokenVersion types.GlobalEndpointTokenVersion @@ -123,6 +128,12 @@ func (c *Client) addOperationSetSecurityTokenServicePreferencesMiddlewares(stack 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 = addOpSetSecurityTokenServicePreferencesValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulateCustomPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulateCustomPolicy.go index 8be759b101..dc49d9b1ea 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulateCustomPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulateCustomPolicy.go @@ -13,25 +13,33 @@ import ( // Simulate how a set of IAM policies and optionally a resource-based policy works // with a list of API operations and Amazon Web Services resources to determine the -// policies' effective permissions. The policies are provided as strings. The -// simulation does not perform the API operations; it only checks the authorization -// to determine if the simulated policies allow or deny the operations. You can -// simulate resources that don't exist in your account. If you want to simulate -// existing policies that are attached to an IAM user, group, or role, use -// SimulatePrincipalPolicy instead. Context keys are variables that are maintained -// by Amazon Web Services and its services and which provide details about the -// context of an API query request. You can use the Condition element of an IAM -// policy to evaluate context keys. To get the list of context keys that the -// policies require for correct simulation, use GetContextKeysForCustomPolicy . If -// the output is long, you can use MaxItems and Marker parameters to paginate the -// results. The IAM policy simulator evaluates statements in the identity-based -// policy and the inputs that you provide during simulation. The policy simulator -// results can differ from your live Amazon Web Services environment. We recommend -// that you check your policies against your live Amazon Web Services environment -// after testing using the policy simulator to confirm that you have the desired -// results. For more information about using the policy simulator, see Testing IAM -// policies with the IAM policy simulator (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_testing-policies.html) -// in the IAM User Guide. +// policies' effective permissions. The policies are provided as strings. +// +// The simulation does not perform the API operations; it only checks the +// authorization to determine if the simulated policies allow or deny the +// operations. You can simulate resources that don't exist in your account. +// +// If you want to simulate existing policies that are attached to an IAM user, +// group, or role, use SimulatePrincipalPolicyinstead. +// +// Context keys are variables that are maintained by Amazon Web Services and its +// services and which provide details about the context of an API query request. +// You can use the Condition element of an IAM policy to evaluate context keys. To +// get the list of context keys that the policies require for correct simulation, +// use GetContextKeysForCustomPolicy. +// +// If the output is long, you can use MaxItems and Marker parameters to paginate +// the results. +// +// The IAM policy simulator evaluates statements in the identity-based policy and +// the inputs that you provide during simulation. The policy simulator results can +// differ from your live Amazon Web Services environment. We recommend that you +// check your policies against your live Amazon Web Services environment after +// testing using the policy simulator to confirm that you have the desired results. +// For more information about using the policy simulator, see [Testing IAM policies with the IAM policy simulator]in the IAM User +// Guide. +// +// [Testing IAM policies with the IAM policy simulator]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_testing-policies.html func (c *Client) SimulateCustomPolicy(ctx context.Context, params *SimulateCustomPolicyInput, optFns ...func(*Options)) (*SimulateCustomPolicyOutput, error) { if params == nil { params = &SimulateCustomPolicyInput{} @@ -61,31 +69,40 @@ type SimulateCustomPolicyInput struct { // specified as a string containing the complete, valid JSON text of an IAM policy. // Do not include any resource-based policies in this parameter. Any resource-based // policy must be submitted with the ResourcePolicy parameter. The policies cannot - // be "scope-down" policies, such as you could include in a call to - // GetFederationToken (https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetFederationToken.html) - // or one of the AssumeRole (https://docs.aws.amazon.com/IAM/latest/APIReference/API_AssumeRole.html) + // be "scope-down" policies, such as you could include in a call to [GetFederationToken]or one of the [AssumeRole] // API operations. In other words, do not use policies designed to restrict what a - // user can do while using the temporary credentials. The maximum length of the - // policy document that you can pass in this operation, including whitespace, is - // listed below. To view the maximum character counts of a managed policy with no - // whitespaces, see IAM and STS character quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length) - // . The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: + // user can do while using the temporary credentials. + // + // The maximum length of the policy document that you can pass in this operation, + // including whitespace, is listed below. To view the maximum character counts of a + // managed policy with no whitespaces, see [IAM and STS character quotas]. + // + // The [regex pattern] used to validate this parameter is a string of characters consisting of + // the following: + // // - Any printable ASCII character ranging from the space character ( \u0020 ) // through the end of the ASCII character range + // // - The printable characters in the Basic Latin and Latin-1 Supplement // character set (through \u00FF ) + // // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage // return ( \u000D ) // + // [AssumeRole]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_AssumeRole.html + // [regex pattern]: http://wikipedia.org/wiki/regex + // [IAM and STS character quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length + // [GetFederationToken]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetFederationToken.html + // // This member is required. PolicyInputList []string // The ARN of the IAM user that you want to use as the simulated caller of the API // operations. CallerArn is required if you include a ResourcePolicy so that the - // policy's Principal element has a value to use in evaluating the policy. You can - // specify only the ARN of an IAM user. You cannot specify the ARN of an assumed - // role, federated user, or a service principal. + // policy's Principal element has a value to use in evaluating the policy. + // + // You can specify only the ARN of an IAM user. You cannot specify the ARN of an + // assumed role, federated user, or a service principal. CallerArn *string // A list of context keys and corresponding values for the simulation to use. @@ -101,31 +118,41 @@ type SimulateCustomPolicyInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 // The IAM permissions boundary policy to simulate. The permissions boundary sets // the maximum permissions that an IAM entity can have. You can input only one // permissions boundary when you pass a policy to this operation. For more - // information about permissions boundaries, see Permissions boundaries for IAM - // entities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. The policy input is specified as a string that contains - // the complete, valid JSON text of a permissions boundary policy. The maximum - // length of the policy document that you can pass in this operation, including - // whitespace, is listed below. To view the maximum character counts of a managed - // policy with no whitespaces, see IAM and STS character quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length) - // . The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: + // information about permissions boundaries, see [Permissions boundaries for IAM entities]in the IAM User Guide. The policy + // input is specified as a string that contains the complete, valid JSON text of a + // permissions boundary policy. + // + // The maximum length of the policy document that you can pass in this operation, + // including whitespace, is listed below. To view the maximum character counts of a + // managed policy with no whitespaces, see [IAM and STS character quotas]. + // + // The [regex pattern] used to validate this parameter is a string of characters consisting of + // the following: + // // - Any printable ASCII character ranging from the space character ( \u0020 ) // through the end of the ASCII character range + // // - The printable characters in the Basic Latin and Latin-1 Supplement // character set (through \u00FF ) + // // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage // return ( \u000D ) + // + // [regex pattern]: http://wikipedia.org/wiki/regex + // [IAM and STS character quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length + // [Permissions boundaries for IAM entities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html PermissionsBoundaryPolicyInputList []string // A list of ARNs of Amazon Web Services resources to include in the simulation. @@ -133,15 +160,21 @@ type SimulateCustomPolicyInput struct { // resources). Each API in the ActionNames parameter is evaluated for each // resource in this list. The simulation determines the access result (allowed or // denied) of each combination and reports it in the response. You can simulate - // resources that don't exist in your account. The simulation does not - // automatically retrieve policies for the specified resources. If you want to - // include a resource policy in the simulation, then you must include the policy as - // a string in the ResourcePolicy parameter. If you include a ResourcePolicy , then - // it must be applicable to all of the resources included in the simulation or you - // receive an invalid input error. For more information about ARNs, see Amazon - // Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. Simulation of resource-based - // policies isn't supported for IAM roles. + // resources that don't exist in your account. + // + // The simulation does not automatically retrieve policies for the specified + // resources. If you want to include a resource policy in the simulation, then you + // must include the policy as a string in the ResourcePolicy parameter. + // + // If you include a ResourcePolicy , then it must be applicable to all of the + // resources included in the simulation or you receive an invalid input error. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // Simulation of resource-based policies isn't supported for IAM roles. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html ResourceArns []string // Specifies the type of simulation to run. Different API operations that support @@ -151,19 +184,31 @@ type SimulateCustomPolicyInput struct { // results. If your simulation does not match one of the following scenarios, then // you can omit this parameter. The following list shows each of the supported // scenario values and the resources that you must define to run the simulation. + // // Each of the Amazon EC2 scenarios requires that you specify instance, image, and // security group resources. If your scenario includes an EBS volume, then you must // specify that volume as a resource. If the Amazon EC2 scenario includes VPC, then // you must supply the network interface resource. If it includes an IP subnet, // then you must specify the subnet resource. For more information on the Amazon - // EC2 scenario options, see Supported platforms (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html) - // in the Amazon EC2 User Guide. - // - EC2-VPC-InstanceStore instance, image, security group, network interface - // - EC2-VPC-InstanceStore-Subnet instance, image, security group, network - // interface, subnet - // - EC2-VPC-EBS instance, image, security group, network interface, volume - // - EC2-VPC-EBS-Subnet instance, image, security group, network interface, - // subnet, volume + // EC2 scenario options, see [Supported platforms]in the Amazon EC2 User Guide. + // + // - EC2-VPC-InstanceStore + // + // instance, image, security group, network interface + // + // - EC2-VPC-InstanceStore-Subnet + // + // instance, image, security group, network interface, subnet + // + // - EC2-VPC-EBS + // + // instance, image, security group, network interface, volume + // + // - EC2-VPC-EBS-Subnet + // + // instance, image, security group, network interface, subnet, volume + // + // [Supported platforms]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html ResourceHandlingOption *string // An ARN representing the Amazon Web Services account ID that specifies the owner @@ -174,34 +219,43 @@ type SimulateCustomPolicyInput struct { // owner of the resources and the resource policy defaults to the account of the // identity provided in CallerArn . This parameter is required only if you specify // a resource-based policy and account that owns the resource is different from the - // account that owns the simulated calling user CallerArn . The ARN for an account - // uses the following syntax: arn:aws:iam::AWS-account-ID:root . For example, to - // represent the account with the 112233445566 ID, use the following ARN: - // arn:aws:iam::112233445566-ID:root . + // account that owns the simulated calling user CallerArn . + // + // The ARN for an account uses the following syntax: + // arn:aws:iam::AWS-account-ID:root . For example, to represent the account with + // the 112233445566 ID, use the following ARN: arn:aws:iam::112233445566-ID:root . ResourceOwner *string // A resource-based policy to include in the simulation provided as a string. Each // resource in the simulation is treated as if it had this policy attached. You can - // include only one resource-based policy in a simulation. The maximum length of - // the policy document that you can pass in this operation, including whitespace, - // is listed below. To view the maximum character counts of a managed policy with - // no whitespaces, see IAM and STS character quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length) - // . The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: + // include only one resource-based policy in a simulation. + // + // The maximum length of the policy document that you can pass in this operation, + // including whitespace, is listed below. To view the maximum character counts of a + // managed policy with no whitespaces, see [IAM and STS character quotas]. + // + // The [regex pattern] used to validate this parameter is a string of characters consisting of + // the following: + // // - Any printable ASCII character ranging from the space character ( \u0020 ) // through the end of the ASCII character range + // // - The printable characters in the Basic Latin and Latin-1 Supplement // character set (through \u00FF ) + // // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage // return ( \u000D ) + // // Simulation of resource-based policies isn't supported for IAM roles. + // + // [regex pattern]: http://wikipedia.org/wiki/regex + // [IAM and STS character quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length ResourcePolicy *string noSmithyDocumentSerde } -// Contains the response to a successful SimulatePrincipalPolicy or -// SimulateCustomPolicy request. +// Contains the response to a successful SimulatePrincipalPolicy or SimulateCustomPolicy request. type SimulateCustomPolicyOutput struct { // The results of the simulation. @@ -280,6 +334,12 @@ func (c *Client) addOperationSimulateCustomPolicyMiddlewares(stack *middleware.S 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 = addOpSimulateCustomPolicyValidationMiddleware(stack); err != nil { return err } @@ -304,24 +364,18 @@ func (c *Client) addOperationSimulateCustomPolicyMiddlewares(stack *middleware.S return nil } -// SimulateCustomPolicyAPIClient is a client that implements the -// SimulateCustomPolicy operation. -type SimulateCustomPolicyAPIClient interface { - SimulateCustomPolicy(context.Context, *SimulateCustomPolicyInput, ...func(*Options)) (*SimulateCustomPolicyOutput, error) -} - -var _ SimulateCustomPolicyAPIClient = (*Client)(nil) - // SimulateCustomPolicyPaginatorOptions is the paginator options for // SimulateCustomPolicy type SimulateCustomPolicyPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -382,6 +436,9 @@ func (p *SimulateCustomPolicyPaginator) NextPage(ctx context.Context, optFns ... } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SimulateCustomPolicy(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -401,6 +458,14 @@ func (p *SimulateCustomPolicyPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// SimulateCustomPolicyAPIClient is a client that implements the +// SimulateCustomPolicy operation. +type SimulateCustomPolicyAPIClient interface { + SimulateCustomPolicy(context.Context, *SimulateCustomPolicyInput, ...func(*Options)) (*SimulateCustomPolicyOutput, error) +} + +var _ SimulateCustomPolicyAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSimulateCustomPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulatePrincipalPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulatePrincipalPolicy.go index 24a765c162..af3a3fe662 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulatePrincipalPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulatePrincipalPolicy.go @@ -16,30 +16,40 @@ import ( // effective permissions. The entity can be an IAM user, group, or role. If you // specify a user, then the simulation also includes all of the policies that are // attached to groups that the user belongs to. You can simulate resources that -// don't exist in your account. You can optionally include a list of one or more -// additional policies specified as strings to include in the simulation. If you -// want to simulate only policies specified as strings, use SimulateCustomPolicy -// instead. You can also optionally include one resource-based policy to be -// evaluated with each of the resources included in the simulation for IAM users -// only. The simulation does not perform the API operations; it only checks the +// don't exist in your account. +// +// You can optionally include a list of one or more additional policies specified +// as strings to include in the simulation. If you want to simulate only policies +// specified as strings, use SimulateCustomPolicyinstead. +// +// You can also optionally include one resource-based policy to be evaluated with +// each of the resources included in the simulation for IAM users only. +// +// The simulation does not perform the API operations; it only checks the // authorization to determine if the simulated policies allow or deny the -// operations. Note: This operation discloses information about the permissions -// granted to other users. If you do not want users to see other user's -// permissions, then consider allowing them to use SimulateCustomPolicy instead. +// operations. +// +// Note: This operation discloses information about the permissions granted to +// other users. If you do not want users to see other user's permissions, then +// consider allowing them to use SimulateCustomPolicyinstead. +// // Context keys are variables maintained by Amazon Web Services and its services // that provide details about the context of an API query request. You can use the // Condition element of an IAM policy to evaluate context keys. To get the list of -// context keys that the policies require for correct simulation, use -// GetContextKeysForPrincipalPolicy . If the output is long, you can use the -// MaxItems and Marker parameters to paginate the results. The IAM policy -// simulator evaluates statements in the identity-based policy and the inputs that -// you provide during simulation. The policy simulator results can differ from your -// live Amazon Web Services environment. We recommend that you check your policies -// against your live Amazon Web Services environment after testing using the policy -// simulator to confirm that you have the desired results. For more information -// about using the policy simulator, see Testing IAM policies with the IAM policy -// simulator (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_testing-policies.html) -// in the IAM User Guide. +// context keys that the policies require for correct simulation, use GetContextKeysForPrincipalPolicy. +// +// If the output is long, you can use the MaxItems and Marker parameters to +// paginate the results. +// +// The IAM policy simulator evaluates statements in the identity-based policy and +// the inputs that you provide during simulation. The policy simulator results can +// differ from your live Amazon Web Services environment. We recommend that you +// check your policies against your live Amazon Web Services environment after +// testing using the policy simulator to confirm that you have the desired results. +// For more information about using the policy simulator, see [Testing IAM policies with the IAM policy simulator]in the IAM User +// Guide. +// +// [Testing IAM policies with the IAM policy simulator]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_testing-policies.html func (c *Client) SimulatePrincipalPolicy(ctx context.Context, params *SimulatePrincipalPolicyInput, optFns ...func(*Options)) (*SimulatePrincipalPolicyOutput, error) { if params == nil { params = &SimulatePrincipalPolicyInput{} @@ -68,12 +78,17 @@ type SimulatePrincipalPolicyInput struct { // want to include in the simulation. If you specify a user, group, or role, the // simulation includes all policies that are associated with that entity. If you // specify a user, the simulation also includes all policies that are attached to - // any groups the user belongs to. The maximum length of the policy document that - // you can pass in this operation, including whitespace, is listed below. To view - // the maximum character counts of a managed policy with no whitespaces, see IAM - // and STS character quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length) - // . For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // any groups the user belongs to. + // + // The maximum length of the policy document that you can pass in this operation, + // including whitespace, is listed below. To view the maximum character counts of a + // managed policy with no whitespaces, see [IAM and STS character quotas]. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [IAM and STS character quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. PolicySourceArn *string @@ -84,14 +99,19 @@ type SimulatePrincipalPolicyInput struct { // include both a PolicySourceArn (for example, // arn:aws:iam::123456789012:user/David ) and a CallerArn (for example, // arn:aws:iam::123456789012:user/Bob ), the result is that you simulate calling - // the API operations as Bob, as if Bob had David's policies. You can specify only - // the ARN of an IAM user. You cannot specify the ARN of an assumed role, federated - // user, or a service principal. CallerArn is required if you include a - // ResourcePolicy and the PolicySourceArn is not the ARN for an IAM user. This is - // required so that the resource-based policy's Principal element has a value to - // use in evaluating the policy. For more information about ARNs, see Amazon - // Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // the API operations as Bob, as if Bob had David's policies. + // + // You can specify only the ARN of an IAM user. You cannot specify the ARN of an + // assumed role, federated user, or a service principal. + // + // CallerArn is required if you include a ResourcePolicy and the PolicySourceArn + // is not the ARN for an IAM user. This is required so that the resource-based + // policy's Principal element has a value to use in evaluating the policy. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html CallerArn *string // A list of context keys and corresponding values for the simulation to use. @@ -107,11 +127,13 @@ type SimulatePrincipalPolicyInput struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. MaxItems *int32 // The IAM permissions boundary policy to simulate. The permissions boundary sets @@ -121,32 +143,48 @@ type SimulatePrincipalPolicyInput struct { // permissions boundary is attached to an entity and you pass in a different // permissions boundary policy using this parameter, then the new permissions // boundary policy is used for the simulation. For more information about - // permissions boundaries, see Permissions boundaries for IAM entities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. The policy input is specified as a string containing the - // complete, valid JSON text of a permissions boundary policy. The maximum length - // of the policy document that you can pass in this operation, including - // whitespace, is listed below. To view the maximum character counts of a managed - // policy with no whitespaces, see IAM and STS character quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length) - // . The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: + // permissions boundaries, see [Permissions boundaries for IAM entities]in the IAM User Guide. The policy input is + // specified as a string containing the complete, valid JSON text of a permissions + // boundary policy. + // + // The maximum length of the policy document that you can pass in this operation, + // including whitespace, is listed below. To view the maximum character counts of a + // managed policy with no whitespaces, see [IAM and STS character quotas]. + // + // The [regex pattern] used to validate this parameter is a string of characters consisting of + // the following: + // // - Any printable ASCII character ranging from the space character ( \u0020 ) // through the end of the ASCII character range + // // - The printable characters in the Basic Latin and Latin-1 Supplement // character set (through \u00FF ) + // // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage // return ( \u000D ) + // + // [regex pattern]: http://wikipedia.org/wiki/regex + // [IAM and STS character quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length + // [Permissions boundaries for IAM entities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html PermissionsBoundaryPolicyInputList []string // An optional list of additional policy documents to include in the simulation. // Each document is specified as a string containing the complete, valid JSON text - // of an IAM policy. The regex pattern (http://wikipedia.org/wiki/regex) used to - // validate this parameter is a string of characters consisting of the following: + // of an IAM policy. + // + // The [regex pattern] used to validate this parameter is a string of characters consisting of + // the following: + // // - Any printable ASCII character ranging from the space character ( \u0020 ) // through the end of the ASCII character range + // // - The printable characters in the Basic Latin and Latin-1 Supplement // character set (through \u00FF ) + // // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage // return ( \u000D ) + // + // [regex pattern]: http://wikipedia.org/wiki/regex PolicyInputList []string // A list of ARNs of Amazon Web Services resources to include in the simulation. @@ -154,13 +192,18 @@ type SimulatePrincipalPolicyInput struct { // resources). Each API in the ActionNames parameter is evaluated for each // resource in this list. The simulation determines the access result (allowed or // denied) of each combination and reports it in the response. You can simulate - // resources that don't exist in your account. The simulation does not - // automatically retrieve policies for the specified resources. If you want to - // include a resource policy in the simulation, then you must include the policy as - // a string in the ResourcePolicy parameter. For more information about ARNs, see - // Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. Simulation of resource-based - // policies isn't supported for IAM roles. + // resources that don't exist in your account. + // + // The simulation does not automatically retrieve policies for the specified + // resources. If you want to include a resource policy in the simulation, then you + // must include the policy as a string in the ResourcePolicy parameter. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // Simulation of resource-based policies isn't supported for IAM roles. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html ResourceArns []string // Specifies the type of simulation to run. Different API operations that support @@ -170,19 +213,31 @@ type SimulatePrincipalPolicyInput struct { // results. If your simulation does not match one of the following scenarios, then // you can omit this parameter. The following list shows each of the supported // scenario values and the resources that you must define to run the simulation. + // // Each of the Amazon EC2 scenarios requires that you specify instance, image, and // security group resources. If your scenario includes an EBS volume, then you must // specify that volume as a resource. If the Amazon EC2 scenario includes VPC, then // you must supply the network interface resource. If it includes an IP subnet, // then you must specify the subnet resource. For more information on the Amazon - // EC2 scenario options, see Supported platforms (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html) - // in the Amazon EC2 User Guide. - // - EC2-VPC-InstanceStore instance, image, security group, network interface - // - EC2-VPC-InstanceStore-Subnet instance, image, security group, network - // interface, subnet - // - EC2-VPC-EBS instance, image, security group, network interface, volume - // - EC2-VPC-EBS-Subnet instance, image, security group, network interface, - // subnet, volume + // EC2 scenario options, see [Supported platforms]in the Amazon EC2 User Guide. + // + // - EC2-VPC-InstanceStore + // + // instance, image, security group, network interface + // + // - EC2-VPC-InstanceStore-Subnet + // + // instance, image, security group, network interface, subnet + // + // - EC2-VPC-EBS + // + // instance, image, security group, network interface, volume + // + // - EC2-VPC-EBS-Subnet + // + // instance, image, security group, network interface, subnet, volume + // + // [Supported platforms]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html ResourceHandlingOption *string // An Amazon Web Services account ID that specifies the owner of any simulated @@ -198,26 +253,34 @@ type SimulatePrincipalPolicyInput struct { // A resource-based policy to include in the simulation provided as a string. Each // resource in the simulation is treated as if it had this policy attached. You can - // include only one resource-based policy in a simulation. The maximum length of - // the policy document that you can pass in this operation, including whitespace, - // is listed below. To view the maximum character counts of a managed policy with - // no whitespaces, see IAM and STS character quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length) - // . The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: + // include only one resource-based policy in a simulation. + // + // The maximum length of the policy document that you can pass in this operation, + // including whitespace, is listed below. To view the maximum character counts of a + // managed policy with no whitespaces, see [IAM and STS character quotas]. + // + // The [regex pattern] used to validate this parameter is a string of characters consisting of + // the following: + // // - Any printable ASCII character ranging from the space character ( \u0020 ) // through the end of the ASCII character range + // // - The printable characters in the Basic Latin and Latin-1 Supplement // character set (through \u00FF ) + // // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage // return ( \u000D ) + // // Simulation of resource-based policies isn't supported for IAM roles. + // + // [regex pattern]: http://wikipedia.org/wiki/regex + // [IAM and STS character quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length ResourcePolicy *string noSmithyDocumentSerde } -// Contains the response to a successful SimulatePrincipalPolicy or -// SimulateCustomPolicy request. +// Contains the response to a successful SimulatePrincipalPolicy or SimulateCustomPolicy request. type SimulatePrincipalPolicyOutput struct { // The results of the simulation. @@ -296,6 +359,12 @@ func (c *Client) addOperationSimulatePrincipalPolicyMiddlewares(stack *middlewar 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 = addOpSimulatePrincipalPolicyValidationMiddleware(stack); err != nil { return err } @@ -320,24 +389,18 @@ func (c *Client) addOperationSimulatePrincipalPolicyMiddlewares(stack *middlewar return nil } -// SimulatePrincipalPolicyAPIClient is a client that implements the -// SimulatePrincipalPolicy operation. -type SimulatePrincipalPolicyAPIClient interface { - SimulatePrincipalPolicy(context.Context, *SimulatePrincipalPolicyInput, ...func(*Options)) (*SimulatePrincipalPolicyOutput, error) -} - -var _ SimulatePrincipalPolicyAPIClient = (*Client)(nil) - // SimulatePrincipalPolicyPaginatorOptions is the paginator options for // SimulatePrincipalPolicy type SimulatePrincipalPolicyPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true . If you do not include this - // parameter, the number of items defaults to 100. Note that IAM might return fewer - // results, even when there are more results available. In that case, the - // IsTruncated response element returns true , and Marker contains a value to - // include in the subsequent call that tells the service where to continue from. + // specify, the IsTruncated response element is true . + // + // If you do not include this parameter, the number of items defaults to 100. Note + // that IAM might return fewer results, even when there are more results available. + // In that case, the IsTruncated response element returns true , and Marker + // contains a value to include in the subsequent call that tells the service where + // to continue from. Limit int32 // Set to true if pagination should stop if the service returns a pagination token @@ -399,6 +462,9 @@ func (p *SimulatePrincipalPolicyPaginator) NextPage(ctx context.Context, optFns } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SimulatePrincipalPolicy(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -418,6 +484,14 @@ func (p *SimulatePrincipalPolicyPaginator) NextPage(ctx context.Context, optFns return result, nil } +// SimulatePrincipalPolicyAPIClient is a client that implements the +// SimulatePrincipalPolicy operation. +type SimulatePrincipalPolicyAPIClient interface { + SimulatePrincipalPolicy(context.Context, *SimulatePrincipalPolicyInput, ...func(*Options)) (*SimulatePrincipalPolicyOutput, error) +} + +var _ SimulatePrincipalPolicyAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSimulatePrincipalPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagInstanceProfile.go index 0541e1e72a..d191802edd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagInstanceProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagInstanceProfile.go @@ -12,9 +12,10 @@ import ( ) // Adds one or more tags to an IAM instance profile. If a tag with the same key -// name already exists, then that tag is overwritten with the new value. Each tag -// consists of a key name and an associated value. By assigning tags to your -// resources, you can do the following: +// name already exists, then that tag is overwritten with the new value. +// +// Each tag consists of a key name and an associated value. By assigning tags to +// your resources, you can do the following: // // - Administrative grouping and discovery - Attach tags to resources to aid in // organization and search. For example, you could search for all resources with @@ -24,17 +25,18 @@ import ( // - Access control - Include tags in IAM user-based and resource-based // policies. You can use tags to restrict access to only an IAM instance profile // that has a specified tag attached. For examples of policies that show how to use -// tags to control access, see Control access using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) -// in the IAM User Guide. +// tags to control access, see [Control access using IAM tags]in the IAM User Guide. // // - If any one of the tags is invalid or if you exceed the allowed maximum // number of tags, then the entire request fails and the resource is not created. -// For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. +// For more information about tagging, see [Tagging IAM resources]in the IAM User Guide. // // - Amazon Web Services always interprets the tag Value as a single string. If // you need to store an array, you can store comma-separated values in the string. // However, you must interpret the value in your code. +// +// [Control access using IAM tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) TagInstanceProfile(ctx context.Context, params *TagInstanceProfileInput, optFns ...func(*Options)) (*TagInstanceProfileOutput, error) { if params == nil { params = &TagInstanceProfileInput{} @@ -52,10 +54,13 @@ func (c *Client) TagInstanceProfile(ctx context.Context, params *TagInstanceProf type TagInstanceProfileInput struct { - // The name of the IAM instance profile to which you want to add tags. This - // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- + // The name of the IAM instance profile to which you want to add tags. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. InstanceProfileName *string @@ -131,6 +136,12 @@ func (c *Client) addOperationTagInstanceProfileMiddlewares(stack *middleware.Sta 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 = addOpTagInstanceProfileValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagMFADevice.go index c75b8f1b21..9a41c6839b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagMFADevice.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagMFADevice.go @@ -13,8 +13,10 @@ import ( // Adds one or more tags to an IAM virtual multi-factor authentication (MFA) // device. If a tag with the same key name already exists, then that tag is -// overwritten with the new value. A tag consists of a key name and an associated -// value. By assigning tags to your resources, you can do the following: +// overwritten with the new value. +// +// A tag consists of a key name and an associated value. By assigning tags to your +// resources, you can do the following: // // - Administrative grouping and discovery - Attach tags to resources to aid in // organization and search. For example, you could search for all resources with @@ -24,17 +26,18 @@ import ( // - Access control - Include tags in IAM user-based and resource-based // policies. You can use tags to restrict access to only an IAM virtual MFA device // that has a specified tag attached. For examples of policies that show how to use -// tags to control access, see Control access using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) -// in the IAM User Guide. +// tags to control access, see [Control access using IAM tags]in the IAM User Guide. // // - If any one of the tags is invalid or if you exceed the allowed maximum // number of tags, then the entire request fails and the resource is not created. -// For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. +// For more information about tagging, see [Tagging IAM resources]in the IAM User Guide. // // - Amazon Web Services always interprets the tag Value as a single string. If // you need to store an array, you can store comma-separated values in the string. // However, you must interpret the value in your code. +// +// [Control access using IAM tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) TagMFADevice(ctx context.Context, params *TagMFADeviceInput, optFns ...func(*Options)) (*TagMFADeviceOutput, error) { if params == nil { params = &TagMFADeviceInput{} @@ -53,10 +56,13 @@ func (c *Client) TagMFADevice(ctx context.Context, params *TagMFADeviceInput, op type TagMFADeviceInput struct { // The unique identifier for the IAM virtual MFA device to which you want to add - // tags. For virtual MFA devices, the serial number is the same as the ARN. This - // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- + // tags. For virtual MFA devices, the serial number is the same as the ARN. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. SerialNumber *string @@ -132,6 +138,12 @@ func (c *Client) addOperationTagMFADeviceMiddlewares(stack *middleware.Stack, op 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 = addOpTagMFADeviceValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagOpenIDConnectProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagOpenIDConnectProvider.go index 34a1b177c1..6a98eaf488 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagOpenIDConnectProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagOpenIDConnectProvider.go @@ -12,10 +12,11 @@ import ( ) // Adds one or more tags to an OpenID Connect (OIDC)-compatible identity provider. -// For more information about these providers, see About web identity federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc.html) -// . If a tag with the same key name already exists, then that tag is overwritten -// with the new value. A tag consists of a key name and an associated value. By -// assigning tags to your resources, you can do the following: +// For more information about these providers, see [About web identity federation]. If a tag with the same key +// name already exists, then that tag is overwritten with the new value. +// +// A tag consists of a key name and an associated value. By assigning tags to your +// resources, you can do the following: // // - Administrative grouping and discovery - Attach tags to resources to aid in // organization and search. For example, you could search for all resources with @@ -25,17 +26,19 @@ import ( // - Access control - Include tags in IAM identity-based and resource-based // policies. You can use tags to restrict access to only an OIDC provider that has // a specified tag attached. For examples of policies that show how to use tags to -// control access, see Control access using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) -// in the IAM User Guide. +// control access, see [Control access using IAM tags]in the IAM User Guide. // // - If any one of the tags is invalid or if you exceed the allowed maximum // number of tags, then the entire request fails and the resource is not created. -// For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. +// For more information about tagging, see [Tagging IAM resources]in the IAM User Guide. // // - Amazon Web Services always interprets the tag Value as a single string. If // you need to store an array, you can store comma-separated values in the string. // However, you must interpret the value in your code. +// +// [Control access using IAM tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html +// [About web identity federation]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc.html func (c *Client) TagOpenIDConnectProvider(ctx context.Context, params *TagOpenIDConnectProviderInput, optFns ...func(*Options)) (*TagOpenIDConnectProviderOutput, error) { if params == nil { params = &TagOpenIDConnectProviderInput{} @@ -54,10 +57,12 @@ func (c *Client) TagOpenIDConnectProvider(ctx context.Context, params *TagOpenID type TagOpenIDConnectProviderInput struct { // The ARN of the OIDC identity provider in IAM to which you want to add tags. - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. OpenIDConnectProviderArn *string @@ -133,6 +138,12 @@ func (c *Client) addOperationTagOpenIDConnectProviderMiddlewares(stack *middlewa 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 = addOpTagOpenIDConnectProviderValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagPolicy.go index 7d4400a8ce..5a012efeee 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagPolicy.go @@ -12,8 +12,9 @@ import ( ) // Adds one or more tags to an IAM customer managed policy. If a tag with the same -// key name already exists, then that tag is overwritten with the new value. A tag -// consists of a key name and an associated value. By assigning tags to your +// key name already exists, then that tag is overwritten with the new value. +// +// A tag consists of a key name and an associated value. By assigning tags to your // resources, you can do the following: // // - Administrative grouping and discovery - Attach tags to resources to aid in @@ -24,17 +25,18 @@ import ( // - Access control - Include tags in IAM user-based and resource-based // policies. You can use tags to restrict access to only an IAM customer managed // policy that has a specified tag attached. For examples of policies that show how -// to use tags to control access, see Control access using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) -// in the IAM User Guide. +// to use tags to control access, see [Control access using IAM tags]in the IAM User Guide. // // - If any one of the tags is invalid or if you exceed the allowed maximum // number of tags, then the entire request fails and the resource is not created. -// For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. +// For more information about tagging, see [Tagging IAM resources]in the IAM User Guide. // // - Amazon Web Services always interprets the tag Value as a single string. If // you need to store an array, you can store comma-separated values in the string. // However, you must interpret the value in your code. +// +// [Control access using IAM tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) TagPolicy(ctx context.Context, params *TagPolicyInput, optFns ...func(*Options)) (*TagPolicyOutput, error) { if params == nil { params = &TagPolicyInput{} @@ -52,10 +54,13 @@ func (c *Client) TagPolicy(ctx context.Context, params *TagPolicyInput, optFns . type TagPolicyInput struct { - // The ARN of the IAM customer managed policy to which you want to add tags. This - // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- + // The ARN of the IAM customer managed policy to which you want to add tags. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. PolicyArn *string @@ -131,6 +136,12 @@ func (c *Client) addOperationTagPolicyMiddlewares(stack *middleware.Stack, optio 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 = addOpTagPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagRole.go index ef0da72b37..6ed2bacc42 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagRole.go @@ -13,8 +13,10 @@ import ( // Adds one or more tags to an IAM role. The role can be a regular role or a // service-linked role. If a tag with the same key name already exists, then that -// tag is overwritten with the new value. A tag consists of a key name and an -// associated value. By assigning tags to your resources, you can do the following: +// tag is overwritten with the new value. +// +// A tag consists of a key name and an associated value. By assigning tags to your +// resources, you can do the following: // // - Administrative grouping and discovery - Attach tags to resources to aid in // organization and search. For example, you could search for all resources with @@ -25,23 +27,24 @@ import ( // policies. You can use tags to restrict access to only an IAM role that has a // specified tag attached. You can also restrict access to only those resources // that have a certain tag attached. For examples of policies that show how to use -// tags to control access, see Control access using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) -// in the IAM User Guide. +// tags to control access, see [Control access using IAM tags]in the IAM User Guide. // // - Cost allocation - Use tags to help track which individuals and teams are // using which Amazon Web Services resources. // // - If any one of the tags is invalid or if you exceed the allowed maximum // number of tags, then the entire request fails and the resource is not created. -// For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. +// For more information about tagging, see [Tagging IAM resources]in the IAM User Guide. // // - Amazon Web Services always interprets the tag Value as a single string. If // you need to store an array, you can store comma-separated values in the string. // However, you must interpret the value in your code. // -// For more information about tagging, see Tagging IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. +// For more information about tagging, see [Tagging IAM identities] in the IAM User Guide. +// +// [Control access using IAM tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html +// [Tagging IAM identities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) TagRole(ctx context.Context, params *TagRoleInput, optFns ...func(*Options)) (*TagRoleOutput, error) { if params == nil { params = &TagRoleInput{} @@ -59,10 +62,13 @@ func (c *Client) TagRole(ctx context.Context, params *TagRoleInput, optFns ...fu type TagRoleInput struct { - // The name of the IAM role to which you want to add tags. This parameter accepts - // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of - // characters that consist of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the IAM role to which you want to add tags. + // + // This parameter accepts (through its [regex pattern]) a string of characters that consist of + // upper and lowercase alphanumeric characters with no spaces. You can also include + // any of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -138,6 +144,12 @@ func (c *Client) addOperationTagRoleMiddlewares(stack *middleware.Stack, options 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 = addOpTagRoleValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagSAMLProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagSAMLProvider.go index 596d9633ed..797d4af1c1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagSAMLProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagSAMLProvider.go @@ -12,11 +12,11 @@ import ( ) // Adds one or more tags to a Security Assertion Markup Language (SAML) identity -// provider. For more information about these providers, see About SAML 2.0-based -// federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html) -// . If a tag with the same key name already exists, then that tag is overwritten -// with the new value. A tag consists of a key name and an associated value. By -// assigning tags to your resources, you can do the following: +// provider. For more information about these providers, see [About SAML 2.0-based federation]. If a tag with the +// same key name already exists, then that tag is overwritten with the new value. +// +// A tag consists of a key name and an associated value. By assigning tags to your +// resources, you can do the following: // // - Administrative grouping and discovery - Attach tags to resources to aid in // organization and search. For example, you could search for all resources with @@ -26,17 +26,19 @@ import ( // - Access control - Include tags in IAM user-based and resource-based // policies. You can use tags to restrict access to only a SAML identity provider // that has a specified tag attached. For examples of policies that show how to use -// tags to control access, see Control access using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) -// in the IAM User Guide. +// tags to control access, see [Control access using IAM tags]in the IAM User Guide. // // - If any one of the tags is invalid or if you exceed the allowed maximum // number of tags, then the entire request fails and the resource is not created. -// For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. +// For more information about tagging, see [Tagging IAM resources]in the IAM User Guide. // // - Amazon Web Services always interprets the tag Value as a single string. If // you need to store an array, you can store comma-separated values in the string. // However, you must interpret the value in your code. +// +// [Control access using IAM tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html +// [About SAML 2.0-based federation]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) TagSAMLProvider(ctx context.Context, params *TagSAMLProviderInput, optFns ...func(*Options)) (*TagSAMLProviderOutput, error) { if params == nil { params = &TagSAMLProviderInput{} @@ -55,10 +57,12 @@ func (c *Client) TagSAMLProvider(ctx context.Context, params *TagSAMLProviderInp type TagSAMLProviderInput struct { // The ARN of the SAML identity provider in IAM to which you want to add tags. - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. SAMLProviderArn *string @@ -134,6 +138,12 @@ func (c *Client) addOperationTagSAMLProviderMiddlewares(stack *middleware.Stack, 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 = addOpTagSAMLProviderValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagServerCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagServerCertificate.go index dcccb44e4a..c23d2347c6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagServerCertificate.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagServerCertificate.go @@ -12,13 +12,15 @@ import ( ) // Adds one or more tags to an IAM server certificate. If a tag with the same key -// name already exists, then that tag is overwritten with the new value. For -// certificates in a Region supported by Certificate Manager (ACM), we recommend -// that you don't use IAM server certificates. Instead, use ACM to provision, -// manage, and deploy your server certificates. For more information about IAM -// server certificates, Working with server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) -// in the IAM User Guide. A tag consists of a key name and an associated value. By -// assigning tags to your resources, you can do the following: +// name already exists, then that tag is overwritten with the new value. +// +// For certificates in a Region supported by Certificate Manager (ACM), we +// recommend that you don't use IAM server certificates. Instead, use ACM to +// provision, manage, and deploy your server certificates. For more information +// about IAM server certificates, [Working with server certificates]in the IAM User Guide. +// +// A tag consists of a key name and an associated value. By assigning tags to your +// resources, you can do the following: // // - Administrative grouping and discovery - Attach tags to resources to aid in // organization and search. For example, you could search for all resources with @@ -28,20 +30,22 @@ import ( // - Access control - Include tags in IAM user-based and resource-based // policies. You can use tags to restrict access to only a server certificate that // has a specified tag attached. For examples of policies that show how to use tags -// to control access, see Control access using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) -// in the IAM User Guide. +// to control access, see [Control access using IAM tags]in the IAM User Guide. // // - Cost allocation - Use tags to help track which individuals and teams are // using which Amazon Web Services resources. // // - If any one of the tags is invalid or if you exceed the allowed maximum // number of tags, then the entire request fails and the resource is not created. -// For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. +// For more information about tagging, see [Tagging IAM resources]in the IAM User Guide. // // - Amazon Web Services always interprets the tag Value as a single string. If // you need to store an array, you can store comma-separated values in the string. // However, you must interpret the value in your code. +// +// [Control access using IAM tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html +// [Working with server certificates]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) TagServerCertificate(ctx context.Context, params *TagServerCertificateInput, optFns ...func(*Options)) (*TagServerCertificateOutput, error) { if params == nil { params = &TagServerCertificateInput{} @@ -59,10 +63,13 @@ func (c *Client) TagServerCertificate(ctx context.Context, params *TagServerCert type TagServerCertificateInput struct { - // The name of the IAM server certificate to which you want to add tags. This - // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- + // The name of the IAM server certificate to which you want to add tags. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. ServerCertificateName *string @@ -138,6 +145,12 @@ func (c *Client) addOperationTagServerCertificateMiddlewares(stack *middleware.S 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 = addOpTagServerCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagUser.go index f33d200b19..a7286044af 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagUser.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagUser.go @@ -12,9 +12,10 @@ import ( ) // Adds one or more tags to an IAM user. If a tag with the same key name already -// exists, then that tag is overwritten with the new value. A tag consists of a key -// name and an associated value. By assigning tags to your resources, you can do -// the following: +// exists, then that tag is overwritten with the new value. +// +// A tag consists of a key name and an associated value. By assigning tags to your +// resources, you can do the following: // // - Administrative grouping and discovery - Attach tags to resources to aid in // organization and search. For example, you could search for all resources with @@ -25,23 +26,24 @@ import ( // policies. You can use tags to restrict access to only an IAM requesting user // that has a specified tag attached. You can also restrict access to only those // resources that have a certain tag attached. For examples of policies that show -// how to use tags to control access, see Control access using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) -// in the IAM User Guide. +// how to use tags to control access, see [Control access using IAM tags]in the IAM User Guide. // // - Cost allocation - Use tags to help track which individuals and teams are // using which Amazon Web Services resources. // // - If any one of the tags is invalid or if you exceed the allowed maximum // number of tags, then the entire request fails and the resource is not created. -// For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. +// For more information about tagging, see [Tagging IAM resources]in the IAM User Guide. // // - Amazon Web Services always interprets the tag Value as a single string. If // you need to store an array, you can store comma-separated values in the string. // However, you must interpret the value in your code. // -// For more information about tagging, see Tagging IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. +// For more information about tagging, see [Tagging IAM identities] in the IAM User Guide. +// +// [Control access using IAM tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html +// [Tagging IAM identities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) TagUser(ctx context.Context, params *TagUserInput, optFns ...func(*Options)) (*TagUserOutput, error) { if params == nil { params = &TagUserInput{} @@ -65,10 +67,13 @@ type TagUserInput struct { // This member is required. Tags []types.Tag - // The name of the IAM user to which you want to add tags. This parameter allows - // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of - // characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the IAM user to which you want to add tags. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -138,6 +143,12 @@ func (c *Client) addOperationTagUserMiddlewares(stack *middleware.Stack, options 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 = addOpTagUserValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagInstanceProfile.go index 5413b8fe97..37e60957fc 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagInstanceProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagInstanceProfile.go @@ -11,8 +11,9 @@ import ( ) // Removes the specified tags from the IAM instance profile. For more information -// about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. +// about tagging, see [Tagging IAM resources]in the IAM User Guide. +// +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) UntagInstanceProfile(ctx context.Context, params *UntagInstanceProfileInput, optFns ...func(*Options)) (*UntagInstanceProfileOutput, error) { if params == nil { params = &UntagInstanceProfileInput{} @@ -30,10 +31,13 @@ func (c *Client) UntagInstanceProfile(ctx context.Context, params *UntagInstance type UntagInstanceProfileInput struct { - // The name of the IAM instance profile from which you want to remove tags. This - // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- + // The name of the IAM instance profile from which you want to remove tags. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. InstanceProfileName *string @@ -109,6 +113,12 @@ func (c *Client) addOperationUntagInstanceProfileMiddlewares(stack *middleware.S 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 = addOpUntagInstanceProfileValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagMFADevice.go index 4d98b397cb..1c69ae3327 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagMFADevice.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagMFADevice.go @@ -11,8 +11,9 @@ import ( ) // Removes the specified tags from the IAM virtual multi-factor authentication -// (MFA) device. For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. +// (MFA) device. For more information about tagging, see [Tagging IAM resources]in the IAM User Guide. +// +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) UntagMFADevice(ctx context.Context, params *UntagMFADeviceInput, optFns ...func(*Options)) (*UntagMFADeviceOutput, error) { if params == nil { params = &UntagMFADeviceInput{} @@ -32,10 +33,12 @@ type UntagMFADeviceInput struct { // The unique identifier for the IAM virtual MFA device from which you want to // remove tags. For virtual MFA devices, the serial number is the same as the ARN. - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. SerialNumber *string @@ -111,6 +114,12 @@ func (c *Client) addOperationUntagMFADeviceMiddlewares(stack *middleware.Stack, 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 = addOpUntagMFADeviceValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagOpenIDConnectProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagOpenIDConnectProvider.go index ed8a0fd087..4797c501db 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagOpenIDConnectProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagOpenIDConnectProvider.go @@ -11,10 +11,11 @@ import ( ) // Removes the specified tags from the specified OpenID Connect (OIDC)-compatible -// identity provider in IAM. For more information about OIDC providers, see About -// web identity federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc.html) -// . For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. +// identity provider in IAM. For more information about OIDC providers, see [About web identity federation]. For +// more information about tagging, see [Tagging IAM resources]in the IAM User Guide. +// +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html +// [About web identity federation]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc.html func (c *Client) UntagOpenIDConnectProvider(ctx context.Context, params *UntagOpenIDConnectProviderInput, optFns ...func(*Options)) (*UntagOpenIDConnectProviderOutput, error) { if params == nil { params = &UntagOpenIDConnectProviderInput{} @@ -32,10 +33,13 @@ func (c *Client) UntagOpenIDConnectProvider(ctx context.Context, params *UntagOp type UntagOpenIDConnectProviderInput struct { - // The ARN of the OIDC provider in IAM from which you want to remove tags. This - // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- + // The ARN of the OIDC provider in IAM from which you want to remove tags. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. OpenIDConnectProviderArn *string @@ -111,6 +115,12 @@ func (c *Client) addOperationUntagOpenIDConnectProviderMiddlewares(stack *middle 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 = addOpUntagOpenIDConnectProviderValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagPolicy.go index 7445de4b6f..5e2f22527e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagPolicy.go @@ -11,8 +11,9 @@ import ( ) // Removes the specified tags from the customer managed policy. For more -// information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. +// information about tagging, see [Tagging IAM resources]in the IAM User Guide. +// +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) UntagPolicy(ctx context.Context, params *UntagPolicyInput, optFns ...func(*Options)) (*UntagPolicyOutput, error) { if params == nil { params = &UntagPolicyInput{} @@ -31,10 +32,12 @@ func (c *Client) UntagPolicy(ctx context.Context, params *UntagPolicyInput, optF type UntagPolicyInput struct { // The ARN of the IAM customer managed policy from which you want to remove tags. - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. PolicyArn *string @@ -110,6 +113,12 @@ func (c *Client) addOperationUntagPolicyMiddlewares(stack *middleware.Stack, opt 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 = addOpUntagPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagRole.go index 9b3c6ec7d4..ce486e00f4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagRole.go @@ -11,8 +11,9 @@ import ( ) // Removes the specified tags from the role. For more information about tagging, -// see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. +// see [Tagging IAM resources]in the IAM User Guide. +// +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) UntagRole(ctx context.Context, params *UntagRoleInput, optFns ...func(*Options)) (*UntagRoleOutput, error) { if params == nil { params = &UntagRoleInput{} @@ -30,10 +31,13 @@ func (c *Client) UntagRole(ctx context.Context, params *UntagRoleInput, optFns . type UntagRoleInput struct { - // The name of the IAM role from which you want to remove tags. This parameter - // accepts (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string - // of characters that consist of upper and lowercase alphanumeric characters with - // no spaces. You can also include any of the following characters: _+=,.@- + // The name of the IAM role from which you want to remove tags. + // + // This parameter accepts (through its [regex pattern]) a string of characters that consist of + // upper and lowercase alphanumeric characters with no spaces. You can also include + // any of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -109,6 +113,12 @@ func (c *Client) addOperationUntagRoleMiddlewares(stack *middleware.Stack, optio 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 = addOpUntagRoleValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagSAMLProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagSAMLProvider.go index 3abe508065..bbd0d11ea4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagSAMLProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagSAMLProvider.go @@ -12,9 +12,10 @@ import ( // Removes the specified tags from the specified Security Assertion Markup // Language (SAML) identity provider in IAM. For more information about these -// providers, see About web identity federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc.html) -// . For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. +// providers, see [About web identity federation]. For more information about tagging, see [Tagging IAM resources] in the IAM User Guide. +// +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html +// [About web identity federation]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc.html func (c *Client) UntagSAMLProvider(ctx context.Context, params *UntagSAMLProviderInput, optFns ...func(*Options)) (*UntagSAMLProviderOutput, error) { if params == nil { params = &UntagSAMLProviderInput{} @@ -32,11 +33,13 @@ func (c *Client) UntagSAMLProvider(ctx context.Context, params *UntagSAMLProvide type UntagSAMLProviderInput struct { - // The ARN of the SAML identity provider in IAM from which you want to remove - // tags. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // The ARN of the SAML identity provider in IAM from which you want to remove tags. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. SAMLProviderArn *string @@ -112,6 +115,12 @@ func (c *Client) addOperationUntagSAMLProviderMiddlewares(stack *middleware.Stac 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 = addOpUntagSAMLProviderValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagServerCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagServerCertificate.go index 711e7abc46..f0b2edcfea 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagServerCertificate.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagServerCertificate.go @@ -11,12 +11,15 @@ import ( ) // Removes the specified tags from the IAM server certificate. For more -// information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. For certificates in a Region supported by Certificate -// Manager (ACM), we recommend that you don't use IAM server certificates. Instead, -// use ACM to provision, manage, and deploy your server certificates. For more -// information about IAM server certificates, Working with server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) -// in the IAM User Guide. +// information about tagging, see [Tagging IAM resources]in the IAM User Guide. +// +// For certificates in a Region supported by Certificate Manager (ACM), we +// recommend that you don't use IAM server certificates. Instead, use ACM to +// provision, manage, and deploy your server certificates. For more information +// about IAM server certificates, [Working with server certificates]in the IAM User Guide. +// +// [Working with server certificates]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) UntagServerCertificate(ctx context.Context, params *UntagServerCertificateInput, optFns ...func(*Options)) (*UntagServerCertificateOutput, error) { if params == nil { params = &UntagServerCertificateInput{} @@ -34,10 +37,13 @@ func (c *Client) UntagServerCertificate(ctx context.Context, params *UntagServer type UntagServerCertificateInput struct { - // The name of the IAM server certificate from which you want to remove tags. This - // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- + // The name of the IAM server certificate from which you want to remove tags. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. ServerCertificateName *string @@ -113,6 +119,12 @@ func (c *Client) addOperationUntagServerCertificateMiddlewares(stack *middleware 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 = addOpUntagServerCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagUser.go index 7e01dfbe65..718b9d309b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagUser.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagUser.go @@ -11,8 +11,9 @@ import ( ) // Removes the specified tags from the user. For more information about tagging, -// see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. +// see [Tagging IAM resources]in the IAM User Guide. +// +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html func (c *Client) UntagUser(ctx context.Context, params *UntagUserInput, optFns ...func(*Options)) (*UntagUserOutput, error) { if params == nil { params = &UntagUserInput{} @@ -36,10 +37,13 @@ type UntagUserInput struct { // This member is required. TagKeys []string - // The name of the IAM user from which you want to remove tags. This parameter - // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string - // of characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the IAM user from which you want to remove tags. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -109,6 +113,12 @@ func (c *Client) addOperationUntagUserMiddlewares(stack *middleware.Stack, optio 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 = addOpUntagUserValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccessKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccessKey.go index 310a25bdd4..20bab543e3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccessKey.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccessKey.go @@ -13,15 +13,19 @@ import ( // Changes the status of the specified access key from Active to Inactive, or vice // versa. This operation can be used to disable a user's key as part of a key -// rotation workflow. If the UserName is not specified, the user name is -// determined implicitly based on the Amazon Web Services access key ID used to -// sign the request. If a temporary access key is used, then UserName is required. -// If a long-term key is assigned to the user, then UserName is not required. This -// operation works for access keys under the Amazon Web Services account. -// Consequently, you can use this operation to manage Amazon Web Services account -// root user credentials even if the Amazon Web Services account has no associated -// users. For information about rotating keys, see Managing keys and certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/ManagingCredentials.html) -// in the IAM User Guide. +// rotation workflow. +// +// If the UserName is not specified, the user name is determined implicitly based +// on the Amazon Web Services access key ID used to sign the request. If a +// temporary access key is used, then UserName is required. If a long-term key is +// assigned to the user, then UserName is not required. This operation works for +// access keys under the Amazon Web Services account. Consequently, you can use +// this operation to manage Amazon Web Services account root user credentials even +// if the Amazon Web Services account has no associated users. +// +// For information about rotating keys, see [Managing keys and certificates] in the IAM User Guide. +// +// [Managing keys and certificates]: https://docs.aws.amazon.com/IAM/latest/UserGuide/ManagingCredentials.html func (c *Client) UpdateAccessKey(ctx context.Context, params *UpdateAccessKeyInput, optFns ...func(*Options)) (*UpdateAccessKeyOutput, error) { if params == nil { params = &UpdateAccessKeyInput{} @@ -39,24 +43,30 @@ func (c *Client) UpdateAccessKey(ctx context.Context, params *UpdateAccessKeyInp type UpdateAccessKeyInput struct { - // The access key ID of the secret access key you want to update. This parameter - // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string - // of characters that can consist of any upper or lowercased letter or digit. + // The access key ID of the secret access key you want to update. + // + // This parameter allows (through its [regex pattern]) a string of characters that can consist of + // any upper or lowercased letter or digit. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. AccessKeyId *string - // The status you want to assign to the secret access key. Active means that the + // The status you want to assign to the secret access key. Active means that the // key can be used for programmatic calls to Amazon Web Services, while Inactive // means that the key cannot be used. // // This member is required. Status types.StatusType - // The name of the user whose key you want to update. This parameter allows - // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of - // characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the user whose key you want to update. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex UserName *string noSmithyDocumentSerde @@ -124,6 +134,12 @@ func (c *Client) addOperationUpdateAccessKeyMiddlewares(stack *middleware.Stack, 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 = addOpUpdateAccessKeyValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccountPasswordPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccountPasswordPolicy.go index 49f14b167b..b386b6ea95 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccountPasswordPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccountPasswordPolicy.go @@ -10,15 +10,18 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Updates the password policy settings for the Amazon Web Services account. This -// operation does not support partial updates. No parameters are required, but if -// you do not specify a parameter, that parameter's value reverts to its default -// value. See the Request Parameters section for each parameter's default value. -// Also note that some parameters do not allow the default parameter to be +// Updates the password policy settings for the Amazon Web Services account. +// +// This operation does not support partial updates. No parameters are required, +// but if you do not specify a parameter, that parameter's value reverts to its +// default value. See the Request Parameters section for each parameter's default +// value. Also note that some parameters do not allow the default parameter to be // explicitly set. Instead, to invoke the default value, do not include that -// parameter when you invoke the operation. For more information about using a -// password policy, see Managing an IAM password policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingPasswordPolicies.html) -// in the IAM User Guide. +// parameter when you invoke the operation. +// +// For more information about using a password policy, see [Managing an IAM password policy] in the IAM User Guide. +// +// [Managing an IAM password policy]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingPasswordPolicies.html func (c *Client) UpdateAccountPasswordPolicy(ctx context.Context, params *UpdateAccountPasswordPolicyInput, optFns ...func(*Options)) (*UpdateAccountPasswordPolicyOutput, error) { if params == nil { params = &UpdateAccountPasswordPolicyInput{} @@ -36,22 +39,28 @@ func (c *Client) UpdateAccountPasswordPolicy(ctx context.Context, params *Update type UpdateAccountPasswordPolicyInput struct { - // Allows all IAM users in your account to use the Amazon Web Services Management - // Console to change their own passwords. For more information, see Permitting IAM - // users to change their own passwords (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_passwords_enable-user-change.html) - // in the IAM User Guide. If you do not specify a value for this parameter, then - // the operation uses the default value of false . The result is that IAM users in - // the account do not automatically have permissions to change their own password. + // Allows all IAM users in your account to use the Amazon Web Services Management + // Console to change their own passwords. For more information, see [Permitting IAM users to change their own passwords]in the IAM + // User Guide. + // + // If you do not specify a value for this parameter, then the operation uses the + // default value of false . The result is that IAM users in the account do not + // automatically have permissions to change their own password. + // + // [Permitting IAM users to change their own passwords]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_passwords_enable-user-change.html AllowUsersToChangePassword bool - // Prevents IAM users who are accessing the account via the Amazon Web Services + // Prevents IAM users who are accessing the account via the Amazon Web Services // Management Console from setting a new console password after their password has // expired. The IAM user cannot access the console until an administrator resets - // the password. If you do not specify a value for this parameter, then the - // operation uses the default value of false . The result is that IAM users can - // change their passwords after they expire and continue to sign in as the user. In - // the Amazon Web Services Management Console, the custom password policy option - // Allow users to change their own password gives IAM users permissions to + // the password. + // + // If you do not specify a value for this parameter, then the operation uses the + // default value of false . The result is that IAM users can change their passwords + // after they expire and continue to sign in as the user. + // + // In the Amazon Web Services Management Console, the custom password policy + // option Allow users to change their own password gives IAM users permissions to // iam:ChangePassword for only their user and to the iam:GetAccountPasswordPolicy // action. This option does not attach a permissions policy to each user, rather // the permissions are applied at the account-level for all users by IAM. IAM users @@ -59,45 +68,58 @@ type UpdateAccountPasswordPolicyInput struct { // expired console password using the CLI or API. HardExpiry *bool - // The number of days that an IAM user password is valid. If you do not specify a - // value for this parameter, then the operation uses the default value of 0 . The - // result is that IAM user passwords never expire. + // The number of days that an IAM user password is valid. + // + // If you do not specify a value for this parameter, then the operation uses the + // default value of 0 . The result is that IAM user passwords never expire. MaxPasswordAge *int32 - // The minimum number of characters allowed in an IAM user password. If you do not - // specify a value for this parameter, then the operation uses the default value of - // 6 . + // The minimum number of characters allowed in an IAM user password. + // + // If you do not specify a value for this parameter, then the operation uses the + // default value of 6 . MinimumPasswordLength *int32 // Specifies the number of previous passwords that IAM users are prevented from - // reusing. If you do not specify a value for this parameter, then the operation - // uses the default value of 0 . The result is that IAM users are not prevented - // from reusing previous passwords. + // reusing. + // + // If you do not specify a value for this parameter, then the operation uses the + // default value of 0 . The result is that IAM users are not prevented from reusing + // previous passwords. PasswordReusePrevention *int32 // Specifies whether IAM user passwords must contain at least one lowercase - // character from the ISO basic Latin alphabet (a to z). If you do not specify a - // value for this parameter, then the operation uses the default value of false . - // The result is that passwords do not require at least one lowercase character. + // character from the ISO basic Latin alphabet (a to z). + // + // If you do not specify a value for this parameter, then the operation uses the + // default value of false . The result is that passwords do not require at least + // one lowercase character. RequireLowercaseCharacters bool // Specifies whether IAM user passwords must contain at least one numeric - // character (0 to 9). If you do not specify a value for this parameter, then the - // operation uses the default value of false . The result is that passwords do not - // require at least one numeric character. + // character (0 to 9). + // + // If you do not specify a value for this parameter, then the operation uses the + // default value of false . The result is that passwords do not require at least + // one numeric character. RequireNumbers bool // Specifies whether IAM user passwords must contain at least one of the following - // non-alphanumeric characters: ! @ # $ % ^ & * ( ) _ + - = [ ] { } | ' If you do - // not specify a value for this parameter, then the operation uses the default - // value of false . The result is that passwords do not require at least one symbol - // character. + // non-alphanumeric characters: + // + // ! @ # $ % ^ & * ( ) _ + - = [ ] { } | ' + // + // If you do not specify a value for this parameter, then the operation uses the + // default value of false . The result is that passwords do not require at least + // one symbol character. RequireSymbols bool // Specifies whether IAM user passwords must contain at least one uppercase - // character from the ISO basic Latin alphabet (A to Z). If you do not specify a - // value for this parameter, then the operation uses the default value of false . - // The result is that passwords do not require at least one uppercase character. + // character from the ISO basic Latin alphabet (A to Z). + // + // If you do not specify a value for this parameter, then the operation uses the + // default value of false . The result is that passwords do not require at least + // one uppercase character. RequireUppercaseCharacters bool noSmithyDocumentSerde @@ -165,6 +187,12 @@ func (c *Client) addOperationUpdateAccountPasswordPolicyMiddlewares(stack *middl 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAccountPasswordPolicy(options.Region), middleware.Before); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAssumeRolePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAssumeRolePolicy.go index b1971bd0c0..d02c0d8531 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAssumeRolePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAssumeRolePolicy.go @@ -12,8 +12,9 @@ import ( // Updates the policy that grants an IAM entity permission to assume a role. This // is typically referred to as the "role trust policy". For more information about -// roles, see Using roles to delegate permissions and federate identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/roles-toplevel.html) -// . +// roles, see [Using roles to delegate permissions and federate identities]. +// +// [Using roles to delegate permissions and federate identities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/roles-toplevel.html func (c *Client) UpdateAssumeRolePolicy(ctx context.Context, params *UpdateAssumeRolePolicyInput, optFns ...func(*Options)) (*UpdateAssumeRolePolicyOutput, error) { if params == nil { params = &UpdateAssumeRolePolicyInput{} @@ -31,26 +32,37 @@ func (c *Client) UpdateAssumeRolePolicy(ctx context.Context, params *UpdateAssum type UpdateAssumeRolePolicyInput struct { - // The policy that grants an entity permission to assume the role. You must - // provide policies in JSON format in IAM. However, for CloudFormation templates - // formatted in YAML, you can provide the policy in JSON or YAML format. + // The policy that grants an entity permission to assume the role. + // + // You must provide policies in JSON format in IAM. However, for CloudFormation + // templates formatted in YAML, you can provide the policy in JSON or YAML format. // CloudFormation always converts a YAML policy to JSON format before submitting it - // to IAM. The regex pattern (http://wikipedia.org/wiki/regex) used to validate - // this parameter is a string of characters consisting of the following: + // to IAM. + // + // The [regex pattern] used to validate this parameter is a string of characters consisting of + // the following: + // // - Any printable ASCII character ranging from the space character ( \u0020 ) // through the end of the ASCII character range + // // - The printable characters in the Basic Latin and Latin-1 Supplement // character set (through \u00FF ) + // // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage // return ( \u000D ) // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // This member is required. PolicyDocument *string - // The name of the role to update with the new policy. This parameter allows - // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of - // characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the role to update with the new policy. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. RoleName *string @@ -120,6 +132,12 @@ func (c *Client) addOperationUpdateAssumeRolePolicyMiddlewares(stack *middleware 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 = addOpUpdateAssumeRolePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateGroup.go index 60421a3ca4..a5ca9f0b3e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateGroup.go @@ -10,16 +10,20 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Updates the name and/or the path of the specified IAM group. You should -// understand the implications of changing a group's path or name. For more -// information, see Renaming users and groups (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_WorkingWithGroupsAndUsers.html) -// in the IAM User Guide. The person making the request (the principal), must have -// permission to change the role group with the old name and the new name. For -// example, to change the group named Managers to MGRs , the principal must have a -// policy that allows them to update both groups. If the principal has permission -// to update the Managers group, but not the MGRs group, then the update fails. -// For more information about permissions, see Access management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// . +// Updates the name and/or the path of the specified IAM group. +// +// You should understand the implications of changing a group's path or name. For +// more information, see [Renaming users and groups]in the IAM User Guide. +// +// The person making the request (the principal), must have permission to change +// the role group with the old name and the new name. For example, to change the +// group named Managers to MGRs , the principal must have a policy that allows them +// to update both groups. If the principal has permission to update the Managers +// group, but not the MGRs group, then the update fails. For more information +// about permissions, see [Access management]. +// +// [Access management]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html +// [Renaming users and groups]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_WorkingWithGroupsAndUsers.html func (c *Client) UpdateGroup(ctx context.Context, params *UpdateGroupInput, optFns ...func(*Options)) (*UpdateGroupOutput, error) { if params == nil { params = &UpdateGroupInput{} @@ -38,26 +42,33 @@ func (c *Client) UpdateGroup(ctx context.Context, params *UpdateGroupInput, optF type UpdateGroupInput struct { // Name of the IAM group to update. If you're changing the name of the group, this - // is the original name. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // is the original name. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. GroupName *string - // New name for the IAM group. Only include this if changing the group's name. IAM - // user, group, role, and policy names must be unique within the account. Names are - // not distinguished by case. For example, you cannot create resources named both - // "MyResource" and "myresource". + // New name for the IAM group. Only include this if changing the group's name. + // + // IAM user, group, role, and policy names must be unique within the account. + // Names are not distinguished by case. For example, you cannot create resources + // named both "MyResource" and "myresource". NewGroupName *string // New path for the IAM group. Only include this if changing the group's path. - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of either a forward slash (/) by itself or a - // string that must begin and end with forward slashes. In addition, it can contain - // any ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), - // including most punctuation characters, digits, and upper and lowercased letters. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of + // either a forward slash (/) by itself or a string that must begin and end with + // forward slashes. In addition, it can contain any ASCII character from the ! ( + // \u0021 ) through the DEL character ( \u007F ), including most punctuation + // characters, digits, and upper and lowercased letters. + // + // [regex pattern]: http://wikipedia.org/wiki/regex NewPath *string noSmithyDocumentSerde @@ -125,6 +136,12 @@ func (c *Client) addOperationUpdateGroupMiddlewares(stack *middleware.Stack, opt 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 = addOpUpdateGroupValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateLoginProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateLoginProfile.go index 1ff8af348c..406fa0a4e2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateLoginProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateLoginProfile.go @@ -12,10 +12,12 @@ import ( // Changes the password for the specified IAM user. You can use the CLI, the // Amazon Web Services API, or the Users page in the IAM console to change the -// password for any IAM user. Use ChangePassword to change your own password in -// the My Security Credentials page in the Amazon Web Services Management Console. -// For more information about modifying passwords, see Managing passwords (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingLogins.html) -// in the IAM User Guide. +// password for any IAM user. Use ChangePasswordto change your own password in the My Security +// Credentials page in the Amazon Web Services Management Console. +// +// For more information about modifying passwords, see [Managing passwords] in the IAM User Guide. +// +// [Managing passwords]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingLogins.html func (c *Client) UpdateLoginProfile(ctx context.Context, params *UpdateLoginProfileInput, optFns ...func(*Options)) (*UpdateLoginProfileOutput, error) { if params == nil { params = &UpdateLoginProfileInput{} @@ -33,26 +35,36 @@ func (c *Client) UpdateLoginProfile(ctx context.Context, params *UpdateLoginProf type UpdateLoginProfileInput struct { - // The name of the user whose password you want to update. This parameter allows - // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of - // characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the user whose password you want to update. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string - // The new password for the specified IAM user. The regex pattern (http://wikipedia.org/wiki/regex) - // used to validate this parameter is a string of characters consisting of the - // following: + // The new password for the specified IAM user. + // + // The [regex pattern] used to validate this parameter is a string of characters consisting of + // the following: + // // - Any printable ASCII character ranging from the space character ( \u0020 ) // through the end of the ASCII character range + // // - The printable characters in the Basic Latin and Latin-1 Supplement // character set (through \u00FF ) + // // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage // return ( \u000D ) + // // However, the format can be further restricted by the account administrator by // setting a password policy on the Amazon Web Services account. For more - // information, see UpdateAccountPasswordPolicy . + // information, see UpdateAccountPasswordPolicy. + // + // [regex pattern]: http://wikipedia.org/wiki/regex Password *string // Allows this new password to be used only once by requiring the specified IAM @@ -124,6 +136,12 @@ func (c *Client) addOperationUpdateLoginProfileMiddlewares(stack *middleware.Sta 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 = addOpUpdateLoginProfileValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateOpenIDConnectProviderThumbprint.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateOpenIDConnectProviderThumbprint.go index 026e2d7745..d4c8aa627c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateOpenIDConnectProviderThumbprint.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateOpenIDConnectProviderThumbprint.go @@ -12,20 +12,23 @@ import ( // Replaces the existing list of server certificate thumbprints associated with an // OpenID Connect (OIDC) provider resource object with a new list of thumbprints. -// The list that you pass with this operation completely replaces the existing list -// of thumbprints. (The lists are not merged.) Typically, you need to update a -// thumbprint only when the identity provider certificate changes, which occurs -// rarely. However, if the provider's certificate does change, any attempt to -// assume an IAM role that specifies the OIDC provider as a principal fails until -// the certificate thumbprint is updated. Amazon Web Services secures communication -// with some OIDC identity providers (IdPs) through our library of trusted root -// certificate authorities (CAs) instead of using a certificate thumbprint to -// verify your IdP server certificate. In these cases, your legacy thumbprint -// remains in your configuration, but is no longer used for validation. These OIDC -// IdPs include Auth0, GitHub, GitLab, Google, and those that use an Amazon S3 -// bucket to host a JSON Web Key Set (JWKS) endpoint. Trust for the OIDC provider -// is derived from the provider certificate and is validated by the thumbprint. -// Therefore, it is best to limit access to the +// +// The list that you pass with this operation completely replaces the existing +// list of thumbprints. (The lists are not merged.) +// +// Typically, you need to update a thumbprint only when the identity provider +// certificate changes, which occurs rarely. However, if the provider's certificate +// does change, any attempt to assume an IAM role that specifies the OIDC provider +// as a principal fails until the certificate thumbprint is updated. +// +// Amazon Web Services secures communication with OIDC identity providers (IdPs) +// using our library of trusted root certificate authorities (CAs) to verify the +// JSON Web Key Set (JWKS) endpoint's TLS certificate. If your OIDC IdP relies on a +// certificate that is not signed by one of these trusted CAs, only then we secure +// communication using the thumbprints set in the IdP's configuration. +// +// Trust for the OIDC provider is derived from the provider certificate and is +// validated by the thumbprint. Therefore, it is best to limit access to the // UpdateOpenIDConnectProviderThumbprint operation to highly privileged users. func (c *Client) UpdateOpenIDConnectProviderThumbprint(ctx context.Context, params *UpdateOpenIDConnectProviderThumbprintInput, optFns ...func(*Options)) (*UpdateOpenIDConnectProviderThumbprintOutput, error) { if params == nil { @@ -46,15 +49,18 @@ type UpdateOpenIDConnectProviderThumbprintInput struct { // The Amazon Resource Name (ARN) of the IAM OIDC provider resource object for // which you want to update the thumbprint. You can get a list of OIDC provider - // ARNs by using the ListOpenIDConnectProviders operation. For more information - // about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // ARNs by using the ListOpenIDConnectProvidersoperation. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. OpenIDConnectProviderArn *string // A list of certificate thumbprints that are associated with the specified IAM - // OpenID Connect provider. For more information, see CreateOpenIDConnectProvider . + // OpenID Connect provider. For more information, see CreateOpenIDConnectProvider. // // This member is required. ThumbprintList []string @@ -124,6 +130,12 @@ func (c *Client) addOperationUpdateOpenIDConnectProviderThumbprintMiddlewares(st 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 = addOpUpdateOpenIDConnectProviderThumbprintValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRole.go index 573be1107e..ce439ad0fd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRole.go @@ -39,17 +39,22 @@ type UpdateRoleInput struct { // The maximum session duration (in seconds) that you want to set for the // specified role. If you do not specify a value for this setting, the default // value of one hour is applied. This setting can have a value from 1 hour to 12 - // hours. Anyone who assumes the role from the CLI or API can use the - // DurationSeconds API parameter or the duration-seconds CLI parameter to request - // a longer session. The MaxSessionDuration setting determines the maximum - // duration that can be requested using the DurationSeconds parameter. If users - // don't specify a value for the DurationSeconds parameter, their security - // credentials are valid for one hour by default. This applies when you use the - // AssumeRole* API operations or the assume-role* CLI operations but does not - // apply when you use those operations to create a console URL. For more - // information, see Using IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html) - // in the IAM User Guide. IAM role credentials provided by Amazon EC2 instances - // assigned to the role are not subject to the specified maximum session duration. + // hours. + // + // Anyone who assumes the role from the CLI or API can use the DurationSeconds API + // parameter or the duration-seconds CLI parameter to request a longer session. + // The MaxSessionDuration setting determines the maximum duration that can be + // requested using the DurationSeconds parameter. If users don't specify a value + // for the DurationSeconds parameter, their security credentials are valid for one + // hour by default. This applies when you use the AssumeRole* API operations or + // the assume-role* CLI operations but does not apply when you use those + // operations to create a console URL. For more information, see [Using IAM roles]in the IAM User + // Guide. + // + // IAM role credentials provided by Amazon EC2 instances assigned to the role are + // not subject to the specified maximum session duration. + // + // [Using IAM roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html MaxSessionDuration *int32 noSmithyDocumentSerde @@ -117,6 +122,12 @@ func (c *Client) addOperationUpdateRoleMiddlewares(stack *middleware.Stack, opti 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 = addOpUpdateRoleValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRoleDescription.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRoleDescription.go index 642d1b5116..afff26bb56 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRoleDescription.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRoleDescription.go @@ -11,9 +11,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Use UpdateRole instead. Modifies only the description of a role. This operation -// performs the same function as the Description parameter in the UpdateRole -// operation. +// Use UpdateRole instead. +// +// Modifies only the description of a role. This operation performs the same +// function as the Description parameter in the UpdateRole operation. func (c *Client) UpdateRoleDescription(ctx context.Context, params *UpdateRoleDescriptionInput, optFns ...func(*Options)) (*UpdateRoleDescriptionOutput, error) { if params == nil { params = &UpdateRoleDescriptionInput{} @@ -110,6 +111,12 @@ func (c *Client) addOperationUpdateRoleDescriptionMiddlewares(stack *middleware. 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 = addOpUpdateRoleDescriptionValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSAMLProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSAMLProvider.go index b725db8419..a7e713549c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSAMLProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSAMLProvider.go @@ -11,8 +11,10 @@ import ( ) // Updates the metadata document for an existing SAML provider resource object. -// This operation requires Signature Version 4 (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html) -// . +// +// This operation requires [Signature Version 4]. +// +// [Signature Version 4]: https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html func (c *Client) UpdateSAMLProvider(ctx context.Context, params *UpdateSAMLProviderInput, optFns ...func(*Options)) (*UpdateSAMLProviderOutput, error) { if params == nil { params = &UpdateSAMLProviderInput{} @@ -39,9 +41,12 @@ type UpdateSAMLProviderInput struct { // This member is required. SAMLMetadataDocument *string - // The Amazon Resource Name (ARN) of the SAML provider to update. For more - // information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // The Amazon Resource Name (ARN) of the SAML provider to update. + // + // For more information about ARNs, see [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. SAMLProviderArn *string @@ -116,6 +121,12 @@ func (c *Client) addOperationUpdateSAMLProviderMiddlewares(stack *middleware.Sta 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 = addOpUpdateSAMLProviderValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSSHPublicKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSSHPublicKey.go index 9383e877a4..eee0fd4978 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSSHPublicKey.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSSHPublicKey.go @@ -14,11 +14,14 @@ import ( // Sets the status of an IAM user's SSH public key to active or inactive. SSH // public keys that are inactive cannot be used for authentication. This operation // can be used to disable a user's SSH public key as part of a key rotation work -// flow. The SSH public key affected by this operation is used only for -// authenticating the associated IAM user to an CodeCommit repository. For more -// information about using SSH keys to authenticate to an CodeCommit repository, -// see Set up CodeCommit for SSH connections (https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html) -// in the CodeCommit User Guide. +// flow. +// +// The SSH public key affected by this operation is used only for authenticating +// the associated IAM user to an CodeCommit repository. For more information about +// using SSH keys to authenticate to an CodeCommit repository, see [Set up CodeCommit for SSH connections]in the +// CodeCommit User Guide. +// +// [Set up CodeCommit for SSH connections]: https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html func (c *Client) UpdateSSHPublicKey(ctx context.Context, params *UpdateSSHPublicKeyInput, optFns ...func(*Options)) (*UpdateSSHPublicKeyOutput, error) { if params == nil { params = &UpdateSSHPublicKeyInput{} @@ -36,9 +39,12 @@ func (c *Client) UpdateSSHPublicKey(ctx context.Context, params *UpdateSSHPublic type UpdateSSHPublicKeyInput struct { - // The unique identifier for the SSH public key. This parameter allows (through - // its regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters - // that can consist of any upper or lowercased letter or digit. + // The unique identifier for the SSH public key. + // + // This parameter allows (through its [regex pattern]) a string of characters that can consist of + // any upper or lowercased letter or digit. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. SSHPublicKeyId *string @@ -50,10 +56,13 @@ type UpdateSSHPublicKeyInput struct { // This member is required. Status types.StatusType - // The name of the IAM user associated with the SSH public key. This parameter - // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string - // of characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the IAM user associated with the SSH public key. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -123,6 +132,12 @@ func (c *Client) addOperationUpdateSSHPublicKeyMiddlewares(stack *middleware.Sta 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 = addOpUpdateSSHPublicKeyValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServerCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServerCertificate.go index 6bac42727a..587c233281 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServerCertificate.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServerCertificate.go @@ -11,20 +11,26 @@ import ( ) // Updates the name and/or the path of the specified server certificate stored in -// IAM. For more information about working with server certificates, see Working -// with server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) -// in the IAM User Guide. This topic also includes a list of Amazon Web Services -// services that can use the server certificates that you manage with IAM. You -// should understand the implications of changing a server certificate's path or -// name. For more information, see Renaming a server certificate (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs_manage.html#RenamingServerCerts) -// in the IAM User Guide. The person making the request (the principal), must have -// permission to change the server certificate with the old name and the new name. -// For example, to change the certificate named ProductionCert to ProdCert , the -// principal must have a policy that allows them to update both certificates. If -// the principal has permission to update the ProductionCert group, but not the -// ProdCert certificate, then the update fails. For more information about -// permissions, see Access management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) +// IAM. +// +// For more information about working with server certificates, see [Working with server certificates] in the IAM +// User Guide. This topic also includes a list of Amazon Web Services services that +// can use the server certificates that you manage with IAM. +// +// You should understand the implications of changing a server certificate's path +// or name. For more information, see [Renaming a server certificate]in the IAM User Guide. +// +// The person making the request (the principal), must have permission to change +// the server certificate with the old name and the new name. For example, to +// change the certificate named ProductionCert to ProdCert , the principal must +// have a policy that allows them to update both certificates. If the principal has +// permission to update the ProductionCert group, but not the ProdCert +// certificate, then the update fails. For more information about permissions, see [Access management] // in the IAM User Guide. +// +// [Renaming a server certificate]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs_manage.html#RenamingServerCerts +// [Access management]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html +// [Working with server certificates]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html func (c *Client) UpdateServerCertificate(ctx context.Context, params *UpdateServerCertificateInput, optFns ...func(*Options)) (*UpdateServerCertificateOutput, error) { if params == nil { params = &UpdateServerCertificateInput{} @@ -42,28 +48,38 @@ func (c *Client) UpdateServerCertificate(ctx context.Context, params *UpdateServ type UpdateServerCertificateInput struct { - // The name of the server certificate that you want to update. This parameter - // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string - // of characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the server certificate that you want to update. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. ServerCertificateName *string // The new path for the server certificate. Include this only if you are updating - // the server certificate's path. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of either a forward slash (/) by itself or a - // string that must begin and end with forward slashes. In addition, it can contain - // any ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), - // including most punctuation characters, digits, and upper and lowercased letters. + // the server certificate's path. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of + // either a forward slash (/) by itself or a string that must begin and end with + // forward slashes. In addition, it can contain any ASCII character from the ! ( + // \u0021 ) through the DEL character ( \u007F ), including most punctuation + // characters, digits, and upper and lowercased letters. + // + // [regex pattern]: http://wikipedia.org/wiki/regex NewPath *string // The new name for the server certificate. Include this only if you are updating // the server certificate's name. The name of the certificate cannot contain any - // spaces. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // spaces. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex NewServerCertificateName *string noSmithyDocumentSerde @@ -131,6 +147,12 @@ func (c *Client) addOperationUpdateServerCertificateMiddlewares(stack *middlewar 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 = addOpUpdateServerCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServiceSpecificCredential.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServiceSpecificCredential.go index 420188394d..251aa831c6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServiceSpecificCredential.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServiceSpecificCredential.go @@ -32,9 +32,12 @@ func (c *Client) UpdateServiceSpecificCredential(ctx context.Context, params *Up type UpdateServiceSpecificCredentialInput struct { - // The unique identifier of the service-specific credential. This parameter allows - // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of - // characters that can consist of any upper or lowercased letter or digit. + // The unique identifier of the service-specific credential. + // + // This parameter allows (through its [regex pattern]) a string of characters that can consist of + // any upper or lowercased letter or digit. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. ServiceSpecificCredentialId *string @@ -46,10 +49,13 @@ type UpdateServiceSpecificCredentialInput struct { // The name of the IAM user associated with the service-specific credential. If // you do not specify this value, then the operation assumes the user whose - // credentials are used to call the operation. This parameter allows (through its - // regex pattern (http://wikipedia.org/wiki/regex) ) a string of characters - // consisting of upper and lowercase alphanumeric characters with no spaces. You - // can also include any of the following characters: _+=,.@- + // credentials are used to call the operation. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex UserName *string noSmithyDocumentSerde @@ -117,6 +123,12 @@ func (c *Client) addOperationUpdateServiceSpecificCredentialMiddlewares(stack *m 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 = addOpUpdateServiceSpecificCredentialValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSigningCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSigningCertificate.go index 1d5415d4b4..7f670417c3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSigningCertificate.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSigningCertificate.go @@ -13,12 +13,14 @@ import ( // Changes the status of the specified user signing certificate from active to // disabled, or vice versa. This operation can be used to disable an IAM user's -// signing certificate as part of a certificate rotation work flow. If the UserName -// field is not specified, the user name is determined implicitly based on the -// Amazon Web Services access key ID used to sign the request. This operation works -// for access keys under the Amazon Web Services account. Consequently, you can use -// this operation to manage Amazon Web Services account root user credentials even -// if the Amazon Web Services account has no associated users. +// signing certificate as part of a certificate rotation work flow. +// +// If the UserName field is not specified, the user name is determined implicitly +// based on the Amazon Web Services access key ID used to sign the request. This +// operation works for access keys under the Amazon Web Services account. +// Consequently, you can use this operation to manage Amazon Web Services account +// root user credentials even if the Amazon Web Services account has no associated +// users. func (c *Client) UpdateSigningCertificate(ctx context.Context, params *UpdateSigningCertificateInput, optFns ...func(*Options)) (*UpdateSigningCertificateOutput, error) { if params == nil { params = &UpdateSigningCertificateInput{} @@ -36,24 +38,30 @@ func (c *Client) UpdateSigningCertificate(ctx context.Context, params *UpdateSig type UpdateSigningCertificateInput struct { - // The ID of the signing certificate you want to update. This parameter allows - // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of - // characters that can consist of any upper or lowercased letter or digit. + // The ID of the signing certificate you want to update. + // + // This parameter allows (through its [regex pattern]) a string of characters that can consist of + // any upper or lowercased letter or digit. + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. CertificateId *string - // The status you want to assign to the certificate. Active means that the + // The status you want to assign to the certificate. Active means that the // certificate can be used for programmatic calls to Amazon Web Services Inactive // means that the certificate cannot be used. // // This member is required. Status types.StatusType - // The name of the IAM user the signing certificate belongs to. This parameter - // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string - // of characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the IAM user the signing certificate belongs to. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex UserName *string noSmithyDocumentSerde @@ -121,6 +129,12 @@ func (c *Client) addOperationUpdateSigningCertificateMiddlewares(stack *middlewa 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 = addOpUpdateSigningCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateUser.go index 11aeb0e632..fc494f2f6e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateUser.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateUser.go @@ -10,16 +10,19 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Updates the name and/or the path of the specified IAM user. You should -// understand the implications of changing an IAM user's path or name. For more -// information, see Renaming an IAM user (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_manage.html#id_users_renaming) -// and Renaming an IAM group (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups_manage_rename.html) -// in the IAM User Guide. To change a user name, the requester must have -// appropriate permissions on both the source object and the target object. For -// example, to change Bob to Robert, the entity making the request must have -// permission on Bob and Robert, or must have permission on all (*). For more -// information about permissions, see Permissions and policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/PermissionsAndPolicies.html) -// . +// Updates the name and/or the path of the specified IAM user. +// +// You should understand the implications of changing an IAM user's path or name. +// For more information, see [Renaming an IAM user]and [Renaming an IAM group] in the IAM User Guide. +// +// To change a user name, the requester must have appropriate permissions on both +// the source object and the target object. For example, to change Bob to Robert, +// the entity making the request must have permission on Bob and Robert, or must +// have permission on all (*). For more information about permissions, see [Permissions and policies]. +// +// [Renaming an IAM user]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_manage.html#id_users_renaming +// [Renaming an IAM group]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups_manage_rename.html +// [Permissions and policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/PermissionsAndPolicies.html func (c *Client) UpdateUser(ctx context.Context, params *UpdateUserInput, optFns ...func(*Options)) (*UpdateUserOutput, error) { if params == nil { params = &UpdateUserInput{} @@ -38,26 +41,35 @@ func (c *Client) UpdateUser(ctx context.Context, params *UpdateUserInput, optFns type UpdateUserInput struct { // Name of the user to update. If you're changing the name of the user, this is - // the original user name. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of upper and lowercase alphanumeric - // characters with no spaces. You can also include any of the following characters: - // _+=,.@- + // the original user name. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string // New path for the IAM user. Include this parameter only if you're changing the - // user's path. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of either a forward slash (/) by itself or a - // string that must begin and end with forward slashes. In addition, it can contain - // any ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), - // including most punctuation characters, digits, and upper and lowercased letters. + // user's path. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of + // either a forward slash (/) by itself or a string that must begin and end with + // forward slashes. In addition, it can contain any ASCII character from the ! ( + // \u0021 ) through the DEL character ( \u007F ), including most punctuation + // characters, digits, and upper and lowercased letters. + // + // [regex pattern]: http://wikipedia.org/wiki/regex NewPath *string // New name for the user. Include this parameter only if you're changing the - // user's name. IAM user, group, role, and policy names must be unique within the - // account. Names are not distinguished by case. For example, you cannot create - // resources named both "MyResource" and "myresource". + // user's name. + // + // IAM user, group, role, and policy names must be unique within the account. + // Names are not distinguished by case. For example, you cannot create resources + // named both "MyResource" and "myresource". NewUserName *string noSmithyDocumentSerde @@ -125,6 +137,12 @@ func (c *Client) addOperationUpdateUserMiddlewares(stack *middleware.Stack, opti 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 = addOpUpdateUserValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSSHPublicKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSSHPublicKey.go index 9e6a88b675..f15c7265c6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSSHPublicKey.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSSHPublicKey.go @@ -11,12 +11,14 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Uploads an SSH public key and associates it with the specified IAM user. The -// SSH public key uploaded by this operation can be used only for authenticating -// the associated IAM user to an CodeCommit repository. For more information about -// using SSH keys to authenticate to an CodeCommit repository, see Set up -// CodeCommit for SSH connections (https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html) -// in the CodeCommit User Guide. +// Uploads an SSH public key and associates it with the specified IAM user. +// +// The SSH public key uploaded by this operation can be used only for +// authenticating the associated IAM user to an CodeCommit repository. For more +// information about using SSH keys to authenticate to an CodeCommit repository, +// see [Set up CodeCommit for SSH connections]in the CodeCommit User Guide. +// +// [Set up CodeCommit for SSH connections]: https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html func (c *Client) UploadSSHPublicKey(ctx context.Context, params *UploadSSHPublicKeyInput, optFns ...func(*Options)) (*UploadSSHPublicKeyOutput, error) { if params == nil { params = &UploadSSHPublicKeyInput{} @@ -36,23 +38,32 @@ type UploadSSHPublicKeyInput struct { // The SSH public key. The public key must be encoded in ssh-rsa format or PEM // format. The minimum bit-length of the public key is 2048 bits. For example, you - // can generate a 2048-bit key, and the resulting PEM file is 1679 bytes long. The - // regex pattern (http://wikipedia.org/wiki/regex) used to validate this parameter - // is a string of characters consisting of the following: + // can generate a 2048-bit key, and the resulting PEM file is 1679 bytes long. + // + // The [regex pattern] used to validate this parameter is a string of characters consisting of + // the following: + // // - Any printable ASCII character ranging from the space character ( \u0020 ) // through the end of the ASCII character range + // // - The printable characters in the Basic Latin and Latin-1 Supplement // character set (through \u00FF ) + // // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage // return ( \u000D ) // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // This member is required. SSHPublicKeyBody *string - // The name of the IAM user to associate the SSH public key with. This parameter - // allows (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string - // of characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the IAM user to associate the SSH public key with. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. UserName *string @@ -127,6 +138,12 @@ func (c *Client) addOperationUploadSSHPublicKeyMiddlewares(stack *middleware.Sta 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 = addOpUploadSSHPublicKeyValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadServerCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadServerCertificate.go index 65206aac76..c3a9eb090e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadServerCertificate.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadServerCertificate.go @@ -13,26 +13,34 @@ import ( // Uploads a server certificate entity for the Amazon Web Services account. The // server certificate entity includes a public key certificate, a private key, and -// an optional certificate chain, which should all be PEM-encoded. We recommend -// that you use Certificate Manager (https://docs.aws.amazon.com/acm/) to -// provision, manage, and deploy your server certificates. With ACM you can request -// a certificate, deploy it to Amazon Web Services resources, and let ACM handle -// certificate renewals for you. Certificates provided by ACM are free. For more -// information about using ACM, see the Certificate Manager User Guide (https://docs.aws.amazon.com/acm/latest/userguide/) -// . For more information about working with server certificates, see Working with -// server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) -// in the IAM User Guide. This topic includes a list of Amazon Web Services -// services that can use the server certificates that you manage with IAM. For -// information about the number of server certificates you can upload, see IAM and -// STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM User Guide. Because the body of the public key certificate, private -// key, and the certificate chain can be large, you should use POST rather than GET -// when calling UploadServerCertificate . For information about setting up -// signatures and authorization through the API, see Signing Amazon Web Services -// API requests (https://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html) -// in the Amazon Web Services General Reference. For general information about -// using the Query API with IAM, see Calling the API by making HTTP query requests (https://docs.aws.amazon.com/IAM/latest/UserGuide/programming.html) -// in the IAM User Guide. +// an optional certificate chain, which should all be PEM-encoded. +// +// We recommend that you use [Certificate Manager] to provision, manage, and deploy your server +// certificates. With ACM you can request a certificate, deploy it to Amazon Web +// Services resources, and let ACM handle certificate renewals for you. +// Certificates provided by ACM are free. For more information about using ACM, see +// the [Certificate Manager User Guide]. +// +// For more information about working with server certificates, see [Working with server certificates] in the IAM +// User Guide. This topic includes a list of Amazon Web Services services that can +// use the server certificates that you manage with IAM. +// +// For information about the number of server certificates you can upload, see [IAM and STS quotas] in +// the IAM User Guide. +// +// Because the body of the public key certificate, private key, and the +// certificate chain can be large, you should use POST rather than GET when calling +// UploadServerCertificate . For information about setting up signatures and +// authorization through the API, see [Signing Amazon Web Services API requests]in the Amazon Web Services General +// Reference. For general information about using the Query API with IAM, see [Calling the API by making HTTP query requests]in +// the IAM User Guide. +// +// [Certificate Manager]: https://docs.aws.amazon.com/acm/ +// [Certificate Manager User Guide]: https://docs.aws.amazon.com/acm/latest/userguide/ +// [IAM and STS quotas]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html +// [Working with server certificates]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html +// [Signing Amazon Web Services API requests]: https://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html +// [Calling the API by making HTTP query requests]: https://docs.aws.amazon.com/IAM/latest/UserGuide/programming.html func (c *Client) UploadServerCertificate(ctx context.Context, params *UploadServerCertificateInput, optFns ...func(*Options)) (*UploadServerCertificateOutput, error) { if params == nil { params = &UploadServerCertificateInput{} @@ -50,73 +58,101 @@ func (c *Client) UploadServerCertificate(ctx context.Context, params *UploadServ type UploadServerCertificateInput struct { - // The contents of the public key certificate in PEM-encoded format. The regex - // pattern (http://wikipedia.org/wiki/regex) used to validate this parameter is a - // string of characters consisting of the following: + // The contents of the public key certificate in PEM-encoded format. + // + // The [regex pattern] used to validate this parameter is a string of characters consisting of + // the following: + // // - Any printable ASCII character ranging from the space character ( \u0020 ) // through the end of the ASCII character range + // // - The printable characters in the Basic Latin and Latin-1 Supplement // character set (through \u00FF ) + // // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage // return ( \u000D ) // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // This member is required. CertificateBody *string - // The contents of the private key in PEM-encoded format. The regex pattern (http://wikipedia.org/wiki/regex) - // used to validate this parameter is a string of characters consisting of the - // following: + // The contents of the private key in PEM-encoded format. + // + // The [regex pattern] used to validate this parameter is a string of characters consisting of + // the following: + // // - Any printable ASCII character ranging from the space character ( \u0020 ) // through the end of the ASCII character range + // // - The printable characters in the Basic Latin and Latin-1 Supplement // character set (through \u00FF ) + // // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage // return ( \u000D ) // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // This member is required. PrivateKey *string // The name for the server certificate. Do not include the path in this value. The - // name of the certificate cannot contain any spaces. This parameter allows - // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of - // characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // name of the certificate cannot contain any spaces. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex // // This member is required. ServerCertificateName *string // The contents of the certificate chain. This is typically a concatenation of the - // PEM-encoded public key certificates of the chain. The regex pattern (http://wikipedia.org/wiki/regex) - // used to validate this parameter is a string of characters consisting of the - // following: + // PEM-encoded public key certificates of the chain. + // + // The [regex pattern] used to validate this parameter is a string of characters consisting of + // the following: + // // - Any printable ASCII character ranging from the space character ( \u0020 ) // through the end of the ASCII character range + // // - The printable characters in the Basic Latin and Latin-1 Supplement // character set (through \u00FF ) + // // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage // return ( \u000D ) + // + // [regex pattern]: http://wikipedia.org/wiki/regex CertificateChain *string - // The path for the server certificate. For more information about paths, see IAM - // identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. This parameter is optional. If it is not included, it - // defaults to a slash (/). This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex) - // ) a string of characters consisting of either a forward slash (/) by itself or a - // string that must begin and end with forward slashes. In addition, it can contain - // any ASCII character from the ! ( \u0021 ) through the DEL character ( \u007F ), - // including most punctuation characters, digits, and upper and lowercased letters. + // The path for the server certificate. For more information about paths, see [IAM identifiers] in + // the IAM User Guide. + // + // This parameter is optional. If it is not included, it defaults to a slash (/). + // This parameter allows (through its [regex pattern]) a string of characters consisting of + // either a forward slash (/) by itself or a string that must begin and end with + // forward slashes. In addition, it can contain any ASCII character from the ! ( + // \u0021 ) through the DEL character ( \u007F ), including most punctuation + // characters, digits, and upper and lowercased letters. + // // If you are uploading a server certificate specifically for use with Amazon // CloudFront distributions, you must specify a path using the path parameter. The // path must begin with /cloudfront and must include a trailing slash (for // example, /cloudfront/test/ ). + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html + // [regex pattern]: http://wikipedia.org/wiki/regex Path *string // A list of tags that you want to attach to the new IAM server certificate // resource. Each tag consists of a key name and an associated value. For more - // information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. If any one of the tags is invalid or if you exceed the - // allowed maximum number of tags, then the entire request fails and the resource - // is not created. + // information about tagging, see [Tagging IAM resources]in the IAM User Guide. + // + // If any one of the tags is invalid or if you exceed the allowed maximum number + // of tags, then the entire request fails and the resource is not created. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []types.Tag noSmithyDocumentSerde @@ -131,8 +167,9 @@ type UploadServerCertificateOutput struct { // A list of tags that are attached to the new IAM server certificate. The // returned list of tags is sorted by tag key. For more information about tagging, - // see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. + // see [Tagging IAM resources]in the IAM User Guide. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []types.Tag // Metadata pertaining to the operation's result. @@ -196,6 +233,12 @@ func (c *Client) addOperationUploadServerCertificateMiddlewares(stack *middlewar 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 = addOpUploadServerCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSigningCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSigningCertificate.go index 386f063547..db7f07b551 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSigningCertificate.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSigningCertificate.go @@ -14,21 +14,27 @@ import ( // Uploads an X.509 signing certificate and associates it with the specified IAM // user. Some Amazon Web Services services require you to use certificates to // validate requests that are signed with a corresponding private key. When you -// upload the certificate, its default status is Active . For information about -// when you would use an X.509 signing certificate, see Managing server -// certificates in IAM (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) -// in the IAM User Guide. If the UserName is not specified, the IAM user name is -// determined implicitly based on the Amazon Web Services access key ID used to -// sign the request. This operation works for access keys under the Amazon Web -// Services account. Consequently, you can use this operation to manage Amazon Web -// Services account root user credentials even if the Amazon Web Services account -// has no associated users. Because the body of an X.509 certificate can be large, -// you should use POST rather than GET when calling UploadSigningCertificate . For -// information about setting up signatures and authorization through the API, see -// Signing Amazon Web Services API requests (https://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html) -// in the Amazon Web Services General Reference. For general information about -// using the Query API with IAM, see Making query requests (https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html) -// in the IAM User Guide. +// upload the certificate, its default status is Active . +// +// For information about when you would use an X.509 signing certificate, see [Managing server certificates in IAM] in +// the IAM User Guide. +// +// If the UserName is not specified, the IAM user name is determined implicitly +// based on the Amazon Web Services access key ID used to sign the request. This +// operation works for access keys under the Amazon Web Services account. +// Consequently, you can use this operation to manage Amazon Web Services account +// root user credentials even if the Amazon Web Services account has no associated +// users. +// +// Because the body of an X.509 certificate can be large, you should use POST +// rather than GET when calling UploadSigningCertificate . For information about +// setting up signatures and authorization through the API, see [Signing Amazon Web Services API requests]in the Amazon Web +// Services General Reference. For general information about using the Query API +// with IAM, see [Making query requests]in the IAM User Guide. +// +// [Managing server certificates in IAM]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html +// [Making query requests]: https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html +// [Signing Amazon Web Services API requests]: https://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html func (c *Client) UploadSigningCertificate(ctx context.Context, params *UploadSigningCertificateInput, optFns ...func(*Options)) (*UploadSigningCertificateOutput, error) { if params == nil { params = &UploadSigningCertificateInput{} @@ -46,23 +52,32 @@ func (c *Client) UploadSigningCertificate(ctx context.Context, params *UploadSig type UploadSigningCertificateInput struct { - // The contents of the signing certificate. The regex pattern (http://wikipedia.org/wiki/regex) - // used to validate this parameter is a string of characters consisting of the - // following: + // The contents of the signing certificate. + // + // The [regex pattern] used to validate this parameter is a string of characters consisting of + // the following: + // // - Any printable ASCII character ranging from the space character ( \u0020 ) // through the end of the ASCII character range + // // - The printable characters in the Basic Latin and Latin-1 Supplement // character set (through \u00FF ) + // // - The special characters tab ( \u0009 ), line feed ( \u000A ), and carriage // return ( \u000D ) // + // [regex pattern]: http://wikipedia.org/wiki/regex + // // This member is required. CertificateBody *string - // The name of the user the signing certificate is for. This parameter allows - // (through its regex pattern (http://wikipedia.org/wiki/regex) ) a string of - // characters consisting of upper and lowercase alphanumeric characters with no - // spaces. You can also include any of the following characters: _+=,.@- + // The name of the user the signing certificate is for. + // + // This parameter allows (through its [regex pattern]) a string of characters consisting of upper + // and lowercase alphanumeric characters with no spaces. You can also include any + // of the following characters: _+=,.@- + // + // [regex pattern]: http://wikipedia.org/wiki/regex UserName *string noSmithyDocumentSerde @@ -137,6 +152,12 @@ func (c *Client) addOperationUploadSigningCertificateMiddlewares(stack *middlewa 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 = addOpUploadSigningCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/auth.go index f7f5917156..27aaba128b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/auth.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -func bindAuthParamsRegion(params *AuthResolverParameters, _ interface{}, options Options) { +func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) { params.Region = options.Region } @@ -90,12 +90,12 @@ type AuthResolverParameters struct { Region string } -func bindAuthResolverParams(operation string, input interface{}, options Options) *AuthResolverParameters { +func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters { params := &AuthResolverParameters{ Operation: operation, } - bindAuthParamsRegion(params, input, options) + bindAuthParamsRegion(ctx, params, input, options) return params } @@ -145,7 +145,7 @@ func (*resolveAuthSchemeMiddleware) ID() string { func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { - params := bindAuthResolverParams(m.operation, getOperationInput(ctx), m.options) + 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) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/deserializers.go index dc98aba516..4f310b772c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/deserializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/deserializers.go @@ -22,8 +22,17 @@ import ( "io/ioutil" "strconv" "strings" + "time" ) +func deserializeS3Expires(v string) (*time.Time, error) { + t, err := smithytime.ParseHTTPDate(v) + if err != nil { + return nil, nil + } + return &t, nil +} + type awsAwsquery_deserializeOpAddClientIDToOpenIDConnectProvider struct { } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/doc.go index c849c3b7d9..68383bba09 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/doc.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/doc.go @@ -3,12 +3,14 @@ // Package iam provides the API client, operations, and parameter types for AWS // Identity and Access Management. // -// Identity and Access Management Identity and Access Management (IAM) is a web -// service for securely controlling access to Amazon Web Services services. With -// IAM, you can centrally manage users, security credentials such as access keys, -// and permissions that control which Amazon Web Services resources users and -// applications can access. For more information about IAM, see Identity and -// Access Management (IAM) (http://aws.amazon.com/iam/) and the Identity and -// Access Management User Guide (https://docs.aws.amazon.com/IAM/latest/UserGuide/) -// . +// # Identity and Access Management +// +// Identity and Access Management (IAM) is a web service for securely controlling +// access to Amazon Web Services services. With IAM, you can centrally manage +// users, security credentials such as access keys, and permissions that control +// which Amazon Web Services resources users and applications can access. For more +// information about IAM, see [Identity and Access Management (IAM)]and the [Identity and Access Management User Guide]. +// +// [Identity and Access Management User Guide]: https://docs.aws.amazon.com/IAM/latest/UserGuide/ +// [Identity and Access Management (IAM)]: http://aws.amazon.com/iam/ package iam diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/endpoints.go index 384be232a0..2d76d5422f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/endpoints.go @@ -289,6 +289,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { 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, @@ -753,7 +764,7 @@ type endpointParamsBinder interface { bindEndpointParams(*EndpointParameters) } -func bindEndpointParams(input interface{}, options Options) *EndpointParameters { +func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters { params := &EndpointParameters{} params.Region = bindRegion(options.Region) @@ -792,7 +803,7 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") } - params := bindEndpointParams(getOperationInput(ctx), m.options) + params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) endpt, err := m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) if err != nil { return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/go_module_metadata.go index 413a0e53f6..0ca47b9ac2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/go_module_metadata.go @@ -3,4 +3,4 @@ package iam // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.32.0" +const goModuleVersion = "1.35.3" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/internal/endpoints/endpoints.go index 88ab704b2d..73d5e4e0ac 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/internal/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/internal/endpoints/endpoints.go @@ -94,7 +94,7 @@ var partitionRegexp = struct { AwsUsGov *regexp.Regexp }{ - Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$"), + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"), AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/options.go index 9dc917618c..c56ef6fed6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/options.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/options.go @@ -50,8 +50,10 @@ type Options struct { // 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. + // 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 @@ -70,17 +72,20 @@ type Options struct { // 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. + // 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. + // 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 @@ -97,8 +102,9 @@ type Options struct { // 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. + // 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 @@ -143,6 +149,7 @@ func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { // 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) { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/enums.go index 0100b4f3d8..cc0dc2e008 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/enums.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/enums.go @@ -12,8 +12,9 @@ const ( // Values returns all known values for AccessAdvisorUsageGranularityType. 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. +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. func (AccessAdvisorUsageGranularityType) Values() []AccessAdvisorUsageGranularityType { return []AccessAdvisorUsageGranularityType{ "SERVICE_LEVEL", @@ -31,8 +32,9 @@ const ( ) // Values returns all known values for AssignmentStatusType. 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. +// 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 (AssignmentStatusType) Values() []AssignmentStatusType { return []AssignmentStatusType{ "Assigned", @@ -60,8 +62,9 @@ const ( ) // Values returns all known values for ContextKeyTypeEnum. 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. +// 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 (ContextKeyTypeEnum) Values() []ContextKeyTypeEnum { return []ContextKeyTypeEnum{ "string", @@ -90,8 +93,9 @@ const ( ) // Values returns all known values for DeletionTaskStatusType. 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. +// 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 (DeletionTaskStatusType) Values() []DeletionTaskStatusType { return []DeletionTaskStatusType{ "SUCCEEDED", @@ -110,8 +114,9 @@ const ( ) // Values returns all known values for EncodingType. 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. +// 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 (EncodingType) Values() []EncodingType { return []EncodingType{ "SSH", @@ -131,8 +136,9 @@ const ( ) // Values returns all known values for EntityType. 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. +// 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 (EntityType) Values() []EntityType { return []EntityType{ "User", @@ -153,6 +159,7 @@ const ( // Values returns all known values for GlobalEndpointTokenVersion. 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 (GlobalEndpointTokenVersion) Values() []GlobalEndpointTokenVersion { return []GlobalEndpointTokenVersion{ @@ -171,8 +178,9 @@ const ( ) // Values returns all known values for JobStatusType. 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. +// 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 (JobStatusType) Values() []JobStatusType { return []JobStatusType{ "IN_PROGRESS", @@ -190,8 +198,9 @@ const ( // Values returns all known values for PermissionsBoundaryAttachmentType. 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. +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. func (PermissionsBoundaryAttachmentType) Values() []PermissionsBoundaryAttachmentType { return []PermissionsBoundaryAttachmentType{ "PermissionsBoundaryPolicy", @@ -209,8 +218,9 @@ const ( // Values returns all known values for PolicyEvaluationDecisionType. 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. +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. func (PolicyEvaluationDecisionType) Values() []PolicyEvaluationDecisionType { return []PolicyEvaluationDecisionType{ "allowed", @@ -229,8 +239,9 @@ const ( ) // Values returns all known values for PolicyOwnerEntityType. 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. +// 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 (PolicyOwnerEntityType) Values() []PolicyOwnerEntityType { return []PolicyOwnerEntityType{ "USER", @@ -249,8 +260,9 @@ const ( ) // Values returns all known values for PolicyScopeType. 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. +// 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 (PolicyScopeType) Values() []PolicyScopeType { return []PolicyScopeType{ "All", @@ -273,8 +285,9 @@ const ( ) // Values returns all known values for PolicySourceType. 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. +// 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 (PolicySourceType) Values() []PolicySourceType { return []PolicySourceType{ "user", @@ -296,8 +309,9 @@ const ( ) // Values returns all known values for PolicyType. 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. +// 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 (PolicyType) Values() []PolicyType { return []PolicyType{ "INLINE", @@ -314,8 +328,9 @@ const ( ) // Values returns all known values for PolicyUsageType. 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. +// 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 (PolicyUsageType) Values() []PolicyUsageType { return []PolicyUsageType{ "PermissionsPolicy", @@ -331,8 +346,9 @@ const ( ) // Values returns all known values for ReportFormatType. 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. +// 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 (ReportFormatType) Values() []ReportFormatType { return []ReportFormatType{ "text/csv", @@ -349,8 +365,9 @@ const ( ) // Values returns all known values for ReportStateType. 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. +// 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 (ReportStateType) Values() []ReportStateType { return []ReportStateType{ "STARTED", @@ -370,8 +387,9 @@ const ( ) // Values returns all known values for SortKeyType. 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. +// 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 (SortKeyType) Values() []SortKeyType { return []SortKeyType{ "SERVICE_NAMESPACE_ASCENDING", @@ -390,8 +408,9 @@ const ( ) // Values returns all known values for StatusType. 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. +// 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 (StatusType) Values() []StatusType { return []StatusType{ "Active", @@ -432,8 +451,9 @@ const ( ) // Values returns all known values for SummaryKeyType. 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. +// 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 (SummaryKeyType) Values() []SummaryKeyType { return []SummaryKeyType{ "Users", diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/errors.go index 6435f645a6..1fc1d63b94 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/errors.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/errors.go @@ -35,9 +35,10 @@ func (e *ConcurrentModificationException) ErrorCode() string { func (e *ConcurrentModificationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request was rejected because the most recent credential report has expired. -// To generate a new credential report, use GenerateCredentialReport . For more -// information about credential report expiration, see Getting credential reports (https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html) -// in the IAM User Guide. +// To generate a new credential report, use GenerateCredentialReport. For more information about +// credential report expiration, see [Getting credential reports]in the IAM User Guide. +// +// [Getting credential reports]: https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html type CredentialReportExpiredException struct { Message *string @@ -64,7 +65,7 @@ func (e *CredentialReportExpiredException) ErrorCode() string { func (e *CredentialReportExpiredException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request was rejected because the credential report does not exist. To -// generate a credential report, use GenerateCredentialReport . +// generate a credential report, use GenerateCredentialReport. type CredentialReportNotPresentException struct { Message *string diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/types.go index 5de4fb1019..e3798d8857 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/types.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/types.go @@ -10,8 +10,9 @@ import ( // An object that contains details about when a principal in the reported // Organizations entity last attempted to access an Amazon Web Services service. A // principal can be an IAM user, an IAM role, or the Amazon Web Services account -// root user within the reported Organizations entity. This data type is a response -// element in the GetOrganizationsAccessReport operation. +// root user within the reported Organizations entity. +// +// This data type is a response element in the GetOrganizationsAccessReport operation. type AccessDetail struct { // The name of the service in which access was attempted. @@ -19,38 +20,47 @@ type AccessDetail struct { // This member is required. ServiceName *string - // The namespace of the service in which access was attempted. To learn the - // service namespace of a service, see Actions, resources, and condition keys for - // Amazon Web Services services (https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html) - // in the Service Authorization Reference. Choose the name of the service to view - // details for that service. In the first paragraph, find the service prefix. For - // example, (service prefix: a4b) . For more information about service namespaces, - // see Amazon Web Services service namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. + // The namespace of the service in which access was attempted. + // + // To learn the service namespace of a service, see [Actions, resources, and condition keys for Amazon Web Services services] in the Service Authorization + // Reference. Choose the name of the service to view details for that service. In + // the first paragraph, find the service prefix. For example, (service prefix: a4b) + // . For more information about service namespaces, see [Amazon Web Services service namespaces]in the Amazon Web Services + // General Reference. + // + // [Amazon Web Services service namespaces]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces + // [Actions, resources, and condition keys for Amazon Web Services services]: https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html // // This member is required. ServiceNamespace *string // The path of the Organizations entity (root, organizational unit, or account) // from which an authenticated principal last attempted to access the service. - // Amazon Web Services does not report unauthenticated requests. This field is null - // if no principals (IAM users, IAM roles, or root user) in the reported - // Organizations entity attempted to access the service within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) - // . + // Amazon Web Services does not report unauthenticated requests. + // + // This field is null if no principals (IAM users, IAM roles, or root user) in the + // reported Organizations entity attempted to access the service within the [tracking period]. + // + // [tracking period]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period EntityPath *string - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // , when an authenticated principal most recently attempted to access the service. - // Amazon Web Services does not report unauthenticated requests. This field is null - // if no principals in the reported Organizations entity attempted to access the - // service within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) - // . + // The date and time, in [ISO 8601 date-time format], when an authenticated principal most recently attempted + // to access the service. Amazon Web Services does not report unauthenticated + // requests. + // + // This field is null if no principals in the reported Organizations entity + // attempted to access the service within the [tracking period]. + // + // [tracking period]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 LastAuthenticatedTime *time.Time - // The Region where the last service access attempt occurred. This field is null - // if no principals in the reported Organizations entity attempted to access the - // service within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) - // . + // The Region where the last service access attempt occurred. + // + // This field is null if no principals in the reported Organizations entity + // attempted to access the service within the [tracking period]. + // + // [tracking period]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period Region *string // The number of accounts with authenticated principals (root user, IAM users, and @@ -60,12 +70,14 @@ type AccessDetail struct { noSmithyDocumentSerde } -// Contains information about an Amazon Web Services access key. This data type is -// used as a response element in the CreateAccessKey and ListAccessKeys -// operations. The SecretAccessKey value is returned only in response to -// CreateAccessKey . You can get a secret access key only when you first create an -// access key; you cannot recover the secret access key later. If you lose a secret -// access key, you must create a new access key. +// Contains information about an Amazon Web Services access key. +// +// This data type is used as a response element in the CreateAccessKey and ListAccessKeys operations. +// +// The SecretAccessKey value is returned only in response to CreateAccessKey. You can get a +// secret access key only when you first create an access key; you cannot recover +// the secret access key later. If you lose a secret access key, you must create a +// new access key. type AccessKey struct { // The ID for this access key. @@ -96,50 +108,62 @@ type AccessKey struct { } // Contains information about the last time an Amazon Web Services access key was -// used since IAM began tracking this information on April 22, 2015. This data type -// is used as a response element in the GetAccessKeyLastUsed operation. +// used since IAM began tracking this information on April 22, 2015. +// +// This data type is used as a response element in the GetAccessKeyLastUsed operation. type AccessKeyLastUsed struct { - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // , when the access key was most recently used. This field is null in the - // following situations: - // - The user does not have an access key. - // - An access key exists but has not been used since IAM began tracking this - // information. - // - There is no sign-in data associated with the user. - // - // This member is required. - LastUsedDate *time.Time - // The Amazon Web Services Region where this access key was most recently used. // The value for this field is "N/A" in the following situations: + // // - The user does not have an access key. + // // - An access key exists but has not been used since IAM began tracking this // information. + // // - There is no sign-in data associated with the user. - // For more information about Amazon Web Services Regions, see Regions and - // endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html) in the - // Amazon Web Services General Reference. + // + // For more information about Amazon Web Services Regions, see [Regions and endpoints] in the Amazon Web + // Services General Reference. + // + // [Regions and endpoints]: https://docs.aws.amazon.com/general/latest/gr/rande.html // // This member is required. Region *string // The name of the Amazon Web Services service with which this access key was most // recently used. The value of this field is "N/A" in the following situations: + // // - The user does not have an access key. + // // - An access key exists but has not been used since IAM started tracking this // information. + // // - There is no sign-in data associated with the user. // // This member is required. ServiceName *string + // The date and time, in [ISO 8601 date-time format], when the access key was most recently used. This field + // is null in the following situations: + // + // - The user does not have an access key. + // + // - An access key exists but has not been used since IAM began tracking this + // information. + // + // - There is no sign-in data associated with the user. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 + LastUsedDate *time.Time + noSmithyDocumentSerde } // Contains information about an Amazon Web Services access key, without its -// secret key. This data type is used as a response element in the ListAccessKeys -// operation. +// secret key. +// +// This data type is used as a response element in the ListAccessKeys operation. type AccessKeyMetadata struct { // The ID for this access key. @@ -158,37 +182,46 @@ type AccessKeyMetadata struct { noSmithyDocumentSerde } -// Contains information about an attached permissions boundary. An attached -// permissions boundary is a managed policy that has been attached to a user or -// role to set the permissions boundary. For more information about permissions -// boundaries, see Permissions boundaries for IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) -// in the IAM User Guide. +// Contains information about an attached permissions boundary. +// +// An attached permissions boundary is a managed policy that has been attached to +// a user or role to set the permissions boundary. +// +// For more information about permissions boundaries, see [Permissions boundaries for IAM identities] in the IAM User Guide. +// +// [Permissions boundaries for IAM identities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html type AttachedPermissionsBoundary struct { - // The ARN of the policy used to set the permissions boundary for the user or role. + // The ARN of the policy used to set the permissions boundary for the user or + // role. PermissionsBoundaryArn *string - // The permissions boundary usage type that indicates what type of IAM resource is - // used as the permissions boundary for an entity. This data type can only have a - // value of Policy . + // The permissions boundary usage type that indicates what type of IAM resource + // is used as the permissions boundary for an entity. This data type can only have + // a value of Policy . PermissionsBoundaryType PermissionsBoundaryAttachmentType noSmithyDocumentSerde } -// Contains information about an attached policy. An attached policy is a managed -// policy that has been attached to a user, group, or role. This data type is used -// as a response element in the ListAttachedGroupPolicies , -// ListAttachedRolePolicies , ListAttachedUserPolicies , and -// GetAccountAuthorizationDetails operations. For more information about managed -// policies, refer to Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. +// Contains information about an attached policy. +// +// An attached policy is a managed policy that has been attached to a user, group, +// or role. This data type is used as a response element in the ListAttachedGroupPolicies, ListAttachedRolePolicies, ListAttachedUserPolicies, and GetAccountAuthorizationDetails +// operations. +// +// For more information about managed policies, refer to [Managed policies and inline policies] in the IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html type AttachedPolicy struct { // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web - // Services resources. For more information about ARNs, go to Amazon Resource - // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // Services resources. + // + // For more information about ARNs, go to [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html PolicyArn *string // The friendly name of the attached policy. @@ -200,8 +233,9 @@ type AttachedPolicy struct { // Contains information about a condition context key. It includes the name of the // key and specifies the value (or values, if the context key supports multiple // values) to use in the simulation. This information is used when evaluating the -// Condition elements of the input policies. This data type is used as an input -// parameter to SimulateCustomPolicy and SimulatePrincipalPolicy . +// Condition elements of the input policies. +// +// This data type is used as an input parameter to SimulateCustomPolicy and SimulatePrincipalPolicy. type ContextEntry struct { // The full name of a condition context key, including the service prefix. For @@ -220,8 +254,9 @@ type ContextEntry struct { noSmithyDocumentSerde } -// The reason that the service-linked role deletion failed. This data type is used -// as a response element in the GetServiceLinkedRoleDeletionStatus operation. +// The reason that the service-linked role deletion failed. +// +// This data type is used as a response element in the GetServiceLinkedRoleDeletionStatus operation. type DeletionTaskFailureReasonType struct { // A short description of the reason that the service-linked role deletion failed. @@ -240,8 +275,9 @@ type DeletionTaskFailureReasonType struct { // An object that contains details about when the IAM entities (users or roles) // were last used in an attempt to access the specified Amazon Web Services -// service. This data type is a response element in the -// GetServiceLastAccessedDetailsWithEntities operation. +// service. +// +// This data type is a response element in the GetServiceLastAccessedDetailsWithEntities operation. type EntityDetails struct { // The EntityInfo object that contains details about the entity (user or role). @@ -249,24 +285,32 @@ type EntityDetails struct { // This member is required. EntityInfo *EntityInfo - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // , when the authenticated entity last attempted to access Amazon Web Services. - // Amazon Web Services does not report unauthenticated requests. This field is null - // if no IAM entities attempted to access the service within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) - // . + // The date and time, in [ISO 8601 date-time format], when the authenticated entity last attempted to access + // Amazon Web Services. Amazon Web Services does not report unauthenticated + // requests. + // + // This field is null if no IAM entities attempted to access the service within + // the [tracking period]. + // + // [tracking period]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 LastAuthenticated *time.Time noSmithyDocumentSerde } -// Contains details about the specified entity (user or role). This data type is -// an element of the EntityDetails object. +// Contains details about the specified entity (user or role). +// +// This data type is an element of the EntityDetails object. type EntityInfo struct { // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web - // Services resources. For more information about ARNs, go to Amazon Resource - // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // Services resources. + // + // For more information about ARNs, go to [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // // This member is required. Arn *string @@ -286,18 +330,18 @@ type EntityInfo struct { // This member is required. Type PolicyOwnerEntityType - // The path to the entity (user or role). For more information about paths, see - // IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // The path to the entity (user or role). For more information about paths, see [IAM identifiers] // in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html Path *string noSmithyDocumentSerde } -// Contains information about the reason that the operation failed. This data type -// is used as a response element in the GetOrganizationsAccessReport , -// GetServiceLastAccessedDetails , and GetServiceLastAccessedDetailsWithEntities -// operations. +// Contains information about the reason that the operation failed. +// +// This data type is used as a response element in the GetOrganizationsAccessReport, GetServiceLastAccessedDetails, and GetServiceLastAccessedDetailsWithEntities operations. type ErrorDetails struct { // The error code associated with the operation failure. @@ -313,8 +357,9 @@ type ErrorDetails struct { noSmithyDocumentSerde } -// Contains the results of a simulation. This data type is used by the return -// parameter of SimulateCustomPolicy and SimulatePrincipalPolicy . +// Contains the results of a simulation. +// +// This data type is used by the return parameter of SimulateCustomPolicy and SimulatePrincipalPolicy. type EvaluationResult struct { // The name of the API operation tested on the indicated resource. @@ -330,17 +375,23 @@ type EvaluationResult struct { // Additional details about the results of the cross-account evaluation decision. // This parameter is populated for only cross-account simulations. It contains a // brief summary of how each policy type contributes to the final evaluation - // decision. If the simulation evaluates policies within the same account and - // includes a resource ARN, then the parameter is present but the response is - // empty. If the simulation evaluates policies within the same account and - // specifies all resources ( * ), then the parameter is not returned. When you make - // a cross-account request, Amazon Web Services evaluates the request in the - // trusting account and the trusted account. The request is allowed only if both - // evaluations return true . For more information about how policies are evaluated, - // see Evaluating policies within a single account (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics) - // . If an Organizations SCP included in the evaluation denies access, the + // decision. + // + // If the simulation evaluates policies within the same account and includes a + // resource ARN, then the parameter is present but the response is empty. If the + // simulation evaluates policies within the same account and specifies all + // resources ( * ), then the parameter is not returned. + // + // When you make a cross-account request, Amazon Web Services evaluates the + // request in the trusting account and the trusted account. The request is allowed + // only if both evaluations return true . For more information about how policies + // are evaluated, see [Evaluating policies within a single account]. + // + // If an Organizations SCP included in the evaluation denies access, the // simulation ends. In this case, policy evaluation does not proceed any further // and this parameter is not returned. + // + // [Evaluating policies within a single account]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics EvalDecisionDetails map[string]PolicyEvaluationDecisionType // The ARN of the resource that the indicated API operation was tested on. @@ -358,8 +409,7 @@ type EvaluationResult struct { // the resource in a simulation is "*", either explicitly, or when the ResourceArns // parameter blank. If you include a list of resources, then any missing context // values are instead included under the ResourceSpecificResults section. To - // discover the context keys used by a set of policies, you can call - // GetContextKeysForCustomPolicy or GetContextKeysForPrincipalPolicy . + // discover the context keys used by a set of policies, you can call GetContextKeysForCustomPolicyor GetContextKeysForPrincipalPolicy. MissingContextValues []string // A structure that details how Organizations and its service control policies @@ -378,29 +428,36 @@ type EvaluationResult struct { noSmithyDocumentSerde } -// Contains information about an IAM group entity. This data type is used as a -// response element in the following operations: -// - CreateGroup -// - GetGroup -// - ListGroups +// Contains information about an IAM group entity. +// +// This data type is used as a response element in the following operations: +// +// # CreateGroup +// +// # GetGroup +// +// ListGroups type Group struct { - // The Amazon Resource Name (ARN) specifying the group. For more information about - // ARNs and how to use them in policies, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. + // The Amazon Resource Name (ARN) specifying the group. For more information + // about ARNs and how to use them in policies, see [IAM identifiers]in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html // // This member is required. Arn *string - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // , when the group was created. + // The date and time, in [ISO 8601 date-time format], when the group was created. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 // // This member is required. CreateDate *time.Time - // The stable and unique string identifying the group. For more information about - // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. + // The stable and unique string identifying the group. For more information about + // IDs, see [IAM identifiers]in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html // // This member is required. GroupId *string @@ -410,8 +467,10 @@ type Group struct { // This member is required. GroupName *string - // The path to the group. For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. + // The path to the group. For more information about paths, see [IAM identifiers] in the IAM User + // Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html // // This member is required. Path *string @@ -420,26 +479,31 @@ type Group struct { } // Contains information about an IAM group, including all of the group's policies. -// This data type is used as a response element in the -// GetAccountAuthorizationDetails operation. +// +// This data type is used as a response element in the GetAccountAuthorizationDetails operation. type GroupDetail struct { // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web - // Services resources. For more information about ARNs, go to Amazon Resource - // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // Services resources. + // + // For more information about ARNs, go to [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Arn *string // A list of the managed policies attached to the group. AttachedManagedPolicies []AttachedPolicy - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // , when the group was created. + // The date and time, in [ISO 8601 date-time format], when the group was created. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 CreateDate *time.Time // The stable and unique string identifying the group. For more information about - // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. + // IDs, see [IAM identifiers]in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html GroupId *string // The friendly name that identifies the group. @@ -448,24 +512,33 @@ type GroupDetail struct { // A list of the inline policies embedded in the group. GroupPolicyList []PolicyDetail - // The path to the group. For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. + // The path to the group. For more information about paths, see [IAM identifiers] in the IAM User + // Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html Path *string noSmithyDocumentSerde } -// Contains information about an instance profile. This data type is used as a -// response element in the following operations: -// - CreateInstanceProfile -// - GetInstanceProfile -// - ListInstanceProfiles -// - ListInstanceProfilesForRole +// Contains information about an instance profile. +// +// This data type is used as a response element in the following operations: +// +// # CreateInstanceProfile +// +// # GetInstanceProfile +// +// # ListInstanceProfiles +// +// ListInstanceProfilesForRole type InstanceProfile struct { - // The Amazon Resource Name (ARN) specifying the instance profile. For more - // information about ARNs and how to use them in policies, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. + // The Amazon Resource Name (ARN) specifying the instance profile. For more + // information about ARNs and how to use them in policies, see [IAM identifiers]in the IAM User + // Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html // // This member is required. Arn *string @@ -475,9 +548,10 @@ type InstanceProfile struct { // This member is required. CreateDate *time.Time - // The stable and unique string identifying the instance profile. For more - // information about IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. + // The stable and unique string identifying the instance profile. For more + // information about IDs, see [IAM identifiers]in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html // // This member is required. InstanceProfileId *string @@ -487,9 +561,10 @@ type InstanceProfile struct { // This member is required. InstanceProfileName *string - // The path to the instance profile. For more information about paths, see IAM - // identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. + // The path to the instance profile. For more information about paths, see [IAM identifiers] in + // the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html // // This member is required. Path *string @@ -500,37 +575,41 @@ type InstanceProfile struct { Roles []Role // A list of tags that are attached to the instance profile. For more information - // about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. + // about tagging, see [Tagging IAM resources]in the IAM User Guide. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []Tag noSmithyDocumentSerde } // Contains details about the permissions policies that are attached to the -// specified identity (user, group, or role). This data type is used as a response -// element in the ListPoliciesGrantingServiceAccess operation. +// specified identity (user, group, or role). +// +// This data type is used as a response element in the ListPoliciesGrantingServiceAccess operation. type ListPoliciesGrantingServiceAccessEntry struct { // The PoliciesGrantingServiceAccess object that contains details about the policy. Policies []PolicyGrantingServiceAccess - // The namespace of the service that was accessed. To learn the service namespace - // of a service, see Actions, resources, and condition keys for Amazon Web - // Services services (https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html) - // in the Service Authorization Reference. Choose the name of the service to view - // details for that service. In the first paragraph, find the service prefix. For - // example, (service prefix: a4b) . For more information about service namespaces, - // see Amazon Web Services service namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. + // The namespace of the service that was accessed. + // + // To learn the service namespace of a service, see [Actions, resources, and condition keys for Amazon Web Services services] in the Service Authorization + // Reference. Choose the name of the service to view details for that service. In + // the first paragraph, find the service prefix. For example, (service prefix: a4b) + // . For more information about service namespaces, see [Amazon Web Services service namespaces]in the Amazon Web Services + // General Reference. + // + // [Amazon Web Services service namespaces]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces + // [Actions, resources, and condition keys for Amazon Web Services services]: https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html ServiceNamespace *string noSmithyDocumentSerde } -// Contains the user name and password create date for a user. This data type is -// used as a response element in the CreateLoginProfile and GetLoginProfile -// operations. +// Contains the user name and password create date for a user. +// +// This data type is used as a response element in the CreateLoginProfile and GetLoginProfile operations. type LoginProfile struct { // The date when the password for the user was created. @@ -552,30 +631,39 @@ type LoginProfile struct { // Contains information about a managed policy, including the policy's ARN, // versions, and the number of principal entities (users, groups, and roles) that -// the policy is attached to. This data type is used as a response element in the -// GetAccountAuthorizationDetails operation. For more information about managed -// policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. +// the policy is attached to. +// +// This data type is used as a response element in the GetAccountAuthorizationDetails operation. +// +// For more information about managed policies, see [Managed policies and inline policies] in the IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html type ManagedPolicyDetail struct { // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web - // Services resources. For more information about ARNs, go to Amazon Resource - // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // Services resources. + // + // For more information about ARNs, go to [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Arn *string // The number of principal entities (users, groups, and roles) that the policy is // attached to. AttachmentCount *int32 - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // , when the policy was created. + // The date and time, in [ISO 8601 date-time format], when the policy was created. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 CreateDate *time.Time // The identifier for the version of the policy that is set as the default - // (operative) version. For more information about policy versions, see Versioning - // for managed policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) - // in the IAM User Guide. + // (operative) version. + // + // For more information about policy versions, see [Versioning for managed policies] in the IAM User Guide. + // + // [Versioning for managed policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html DefaultVersionId *string // A friendly description of the policy. @@ -584,19 +672,26 @@ type ManagedPolicyDetail struct { // Specifies whether the policy can be attached to an IAM user, group, or role. IsAttachable bool - // The path to the policy. For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. + // The path to the policy. + // + // For more information about paths, see [IAM identifiers] in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html Path *string // The number of entities (users and roles) for which the policy is used as the - // permissions boundary. For more information about permissions boundaries, see - // Permissions boundaries for IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. + // permissions boundary. + // + // For more information about permissions boundaries, see [Permissions boundaries for IAM identities] in the IAM User Guide. + // + // [Permissions boundaries for IAM identities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html PermissionsBoundaryUsageCount *int32 - // The stable and unique string identifying the policy. For more information about - // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. + // The stable and unique string identifying the policy. + // + // For more information about IDs, see [IAM identifiers] in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html PolicyId *string // The friendly name (not ARN) identifying the policy. @@ -605,18 +700,21 @@ type ManagedPolicyDetail struct { // A list containing information about the versions of the policy. PolicyVersionList []PolicyVersion - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // , when the policy was last updated. When a policy has only one version, this - // field contains the date and time when the policy was created. When a policy has - // more than one version, this field contains the date and time when the most - // recent policy version was created. + // The date and time, in [ISO 8601 date-time format], when the policy was last updated. + // + // When a policy has only one version, this field contains the date and time when + // the policy was created. When a policy has more than one version, this field + // contains the date and time when the most recent policy version was created. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 UpdateDate *time.Time noSmithyDocumentSerde } -// Contains information about an MFA device. This data type is used as a response -// element in the ListMFADevices operation. +// Contains information about an MFA device. +// +// This data type is used as a response element in the ListMFADevices operation. type MFADevice struct { // The date when the MFA device was enabled for the user. @@ -642,9 +740,12 @@ type MFADevice struct { type OpenIDConnectProviderListEntry struct { // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web - // Services resources. For more information about ARNs, go to Amazon Resource - // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // Services resources. + // + // For more information about ARNs, go to [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Arn *string noSmithyDocumentSerde @@ -661,8 +762,9 @@ type OrganizationsDecisionDetail struct { noSmithyDocumentSerde } -// Contains information about the account password policy. This data type is used -// as a response element in the GetAccountPasswordPolicy operation. +// Contains information about the account password policy. +// +// This data type is used as a response element in the GetAccountPasswordPolicy operation. type PasswordPolicy struct { // Specifies whether IAM users are allowed to change their own password. Gives IAM @@ -703,7 +805,9 @@ type PasswordPolicy struct { RequireNumbers bool // Specifies whether IAM user passwords must contain at least one of the following - // symbols: ! @ # $ % ^ & * ( ) _ + - = [ ] { } | ' + // symbols: + // + // ! @ # $ % ^ & * ( ) _ + - = [ ] { } | ' RequireSymbols bool // Specifies whether IAM user passwords must contain at least one uppercase @@ -730,74 +834,91 @@ type PermissionsBoundaryDecisionDetail struct { noSmithyDocumentSerde } -// Contains information about a managed policy. This data type is used as a -// response element in the CreatePolicy , GetPolicy , and ListPolicies operations. -// For more information about managed policies, refer to Managed policies and -// inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. +// Contains information about a managed policy. +// +// This data type is used as a response element in the CreatePolicy, GetPolicy, and ListPolicies operations. +// +// For more information about managed policies, refer to [Managed policies and inline policies] in the IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html type Policy struct { // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web - // Services resources. For more information about ARNs, go to Amazon Resource - // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // Services resources. + // + // For more information about ARNs, go to [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Arn *string // The number of entities (users, groups, and roles) that the policy is attached // to. AttachmentCount *int32 - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // , when the policy was created. + // The date and time, in [ISO 8601 date-time format], when the policy was created. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 CreateDate *time.Time // The identifier for the version of the policy that is set as the default version. DefaultVersionId *string - // A friendly description of the policy. This element is included in the response - // to the GetPolicy operation. It is not included in the response to the - // ListPolicies operation. + // A friendly description of the policy. + // + // This element is included in the response to the GetPolicy operation. It is not included + // in the response to the ListPoliciesoperation. Description *string // Specifies whether the policy can be attached to an IAM user, group, or role. IsAttachable bool - // The path to the policy. For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. + // The path to the policy. + // + // For more information about paths, see [IAM identifiers] in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html Path *string // The number of entities (users and roles) for which the policy is used to set - // the permissions boundary. For more information about permissions boundaries, see - // Permissions boundaries for IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. + // the permissions boundary. + // + // For more information about permissions boundaries, see [Permissions boundaries for IAM identities] in the IAM User Guide. + // + // [Permissions boundaries for IAM identities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html PermissionsBoundaryUsageCount *int32 - // The stable and unique string identifying the policy. For more information about - // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. + // The stable and unique string identifying the policy. + // + // For more information about IDs, see [IAM identifiers] in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html PolicyId *string // The friendly name (not ARN) identifying the policy. PolicyName *string // A list of tags that are attached to the instance profile. For more information - // about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. + // about tagging, see [Tagging IAM resources]in the IAM User Guide. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []Tag - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // , when the policy was last updated. When a policy has only one version, this - // field contains the date and time when the policy was created. When a policy has - // more than one version, this field contains the date and time when the most - // recent policy version was created. + // The date and time, in [ISO 8601 date-time format], when the policy was last updated. + // + // When a policy has only one version, this field contains the date and time when + // the policy was created. When a policy has more than one version, this field + // contains the date and time when the most recent policy version was created. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 UpdateDate *time.Time noSmithyDocumentSerde } -// Contains information about an IAM policy, including the policy document. This -// data type is used as a response element in the GetAccountAuthorizationDetails -// operation. +// Contains information about an IAM policy, including the policy document. +// +// This data type is used as a response element in the GetAccountAuthorizationDetails operation. type PolicyDetail struct { // The policy document. @@ -810,8 +931,9 @@ type PolicyDetail struct { } // Contains details about the permissions policies that are attached to the -// specified identity (user, group, or role). This data type is an element of the -// ListPoliciesGrantingServiceAccessEntry object. +// specified identity (user, group, or role). +// +// This data type is an element of the ListPoliciesGrantingServiceAccessEntry object. type PolicyGrantingServiceAccess struct { // The policy name. @@ -819,45 +941,56 @@ type PolicyGrantingServiceAccess struct { // This member is required. PolicyName *string - // The policy type. For more information about these policy types, see Managed - // policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html) - // in the IAM User Guide. + // The policy type. For more information about these policy types, see [Managed policies and inline policies] in the IAM + // User Guide. + // + // [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html // // This member is required. PolicyType PolicyType // The name of the entity (user or role) to which the inline policy is attached. - // This field is null for managed policies. For more information about these policy - // types, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html) - // in the IAM User Guide. + // + // This field is null for managed policies. For more information about these + // policy types, see [Managed policies and inline policies]in the IAM User Guide. + // + // [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html EntityName *string // The type of entity (user or role) that used the policy to access the service to - // which the inline policy is attached. This field is null for managed policies. - // For more information about these policy types, see Managed policies and inline - // policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html) - // in the IAM User Guide. + // which the inline policy is attached. + // + // This field is null for managed policies. For more information about these + // policy types, see [Managed policies and inline policies]in the IAM User Guide. + // + // [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html EntityType PolicyOwnerEntityType // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web - // Services resources. For more information about ARNs, go to Amazon Resource - // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // Services resources. + // + // For more information about ARNs, go to [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html PolicyArn *string noSmithyDocumentSerde } -// Contains information about a group that a managed policy is attached to. This -// data type is used as a response element in the ListEntitiesForPolicy operation. -// For more information about managed policies, refer to Managed policies and -// inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. +// Contains information about a group that a managed policy is attached to. +// +// This data type is used as a response element in the ListEntitiesForPolicy operation. +// +// For more information about managed policies, refer to [Managed policies and inline policies] in the IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html type PolicyGroup struct { // The stable and unique string identifying the group. For more information about - // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) - // in the IAM User Guide. + // IDs, see [IAM identifiers]in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html GroupId *string // The name (friendly name, not ARN) identifying the group. @@ -866,16 +999,19 @@ type PolicyGroup struct { noSmithyDocumentSerde } -// Contains information about a role that a managed policy is attached to. This -// data type is used as a response element in the ListEntitiesForPolicy operation. -// For more information about managed policies, refer to Managed policies and -// inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. +// Contains information about a role that a managed policy is attached to. +// +// This data type is used as a response element in the ListEntitiesForPolicy operation. +// +// For more information about managed policies, refer to [Managed policies and inline policies] in the IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html type PolicyRole struct { // The stable and unique string identifying the role. For more information about - // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) - // in the IAM User Guide. + // IDs, see [IAM identifiers]in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html RoleId *string // The name (friendly name, not ARN) identifying the role. @@ -884,16 +1020,19 @@ type PolicyRole struct { noSmithyDocumentSerde } -// Contains information about a user that a managed policy is attached to. This -// data type is used as a response element in the ListEntitiesForPolicy operation. -// For more information about managed policies, refer to Managed policies and -// inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. +// Contains information about a user that a managed policy is attached to. +// +// This data type is used as a response element in the ListEntitiesForPolicy operation. +// +// For more information about managed policies, refer to [Managed policies and inline policies] in the IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html type PolicyUser struct { // The stable and unique string identifying the user. For more information about - // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) - // in the IAM User Guide. + // IDs, see [IAM identifiers]in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html UserId *string // The name (friendly name, not ARN) identifying the user. @@ -902,42 +1041,50 @@ type PolicyUser struct { noSmithyDocumentSerde } -// Contains information about a version of a managed policy. This data type is -// used as a response element in the CreatePolicyVersion , GetPolicyVersion , -// ListPolicyVersions , and GetAccountAuthorizationDetails operations. For more -// information about managed policies, refer to Managed policies and inline -// policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. +// Contains information about a version of a managed policy. +// +// This data type is used as a response element in the CreatePolicyVersion, GetPolicyVersion, ListPolicyVersions, and GetAccountAuthorizationDetails operations. +// +// For more information about managed policies, refer to [Managed policies and inline policies] in the IAM User Guide. +// +// [Managed policies and inline policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html type PolicyVersion struct { - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // , when the policy version was created. + // The date and time, in [ISO 8601 date-time format], when the policy version was created. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 CreateDate *time.Time - // The policy document. The policy document is returned in the response to the - // GetPolicyVersion and GetAccountAuthorizationDetails operations. It is not - // returned in the response to the CreatePolicyVersion or ListPolicyVersions - // operations. The policy document returned in this structure is URL-encoded - // compliant with RFC 3986 (https://tools.ietf.org/html/rfc3986) . You can use a - // URL decoding method to convert the policy back to plain JSON text. For example, - // if you use Java, you can use the decode method of the java.net.URLDecoder - // utility class in the Java SDK. Other languages and SDKs provide similar - // functionality. + // The policy document. + // + // The policy document is returned in the response to the GetPolicyVersion and GetAccountAuthorizationDetails operations. It is + // not returned in the response to the CreatePolicyVersionor ListPolicyVersions operations. + // + // The policy document returned in this structure is URL-encoded compliant with [RFC 3986]. + // You can use a URL decoding method to convert the policy back to plain JSON text. + // For example, if you use Java, you can use the decode method of the + // java.net.URLDecoder utility class in the Java SDK. Other languages and SDKs + // provide similar functionality. + // + // [RFC 3986]: https://tools.ietf.org/html/rfc3986 Document *string // Specifies whether the policy version is set as the policy's default version. IsDefaultVersion bool - // The identifier for the policy version. Policy version identifiers always begin - // with v (always lowercase). When a policy is created, the first policy version - // is v1 . + // The identifier for the policy version. + // + // Policy version identifiers always begin with v (always lowercase). When a + // policy is created, the first policy version is v1 . VersionId *string noSmithyDocumentSerde } // Contains the row and column of a location of a Statement element in a policy -// document. This data type is used as a member of the Statement type. +// document. +// +// This data type is used as a member of the Statement type. type Position struct { // The column in the line containing the specified position in the document. @@ -950,8 +1097,9 @@ type Position struct { } // Contains the result of the simulation of a single API operation call on a -// single resource. This data type is used by a member of the EvaluationResult -// data type. +// single resource. +// +// This data type is used by a member of the EvaluationResult data type. type ResourceSpecificResult struct { // The result of the simulation of the simulated API operation on the resource @@ -984,8 +1132,7 @@ type ResourceSpecificResult struct { // do not specify individual resources, by setting ResourceArns to "*" or by not // including the ResourceArns parameter, then any missing context values are // instead included under the EvaluationResults section. To discover the context - // keys used by a set of policies, you can call GetContextKeysForCustomPolicy or - // GetContextKeysForPrincipalPolicy . + // keys used by a set of policies, you can call GetContextKeysForCustomPolicyor GetContextKeysForPrincipalPolicy. MissingContextValues []string // Contains information about the effect that a permissions boundary has on a @@ -999,28 +1146,33 @@ type ResourceSpecificResult struct { // response element in several API operations that interact with roles. type Role struct { - // The Amazon Resource Name (ARN) specifying the role. For more information about - // ARNs and how to use them in policies, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide guide. + // The Amazon Resource Name (ARN) specifying the role. For more information about + // ARNs and how to use them in policies, see [IAM identifiers]in the IAM User Guide guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html // // This member is required. Arn *string - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // , when the role was created. + // The date and time, in [ISO 8601 date-time format], when the role was created. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 // // This member is required. CreateDate *time.Time - // The path to the role. For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. + // The path to the role. For more information about paths, see [IAM identifiers] in the IAM User + // Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html // // This member is required. Path *string - // The stable and unique string identifying the role. For more information about - // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. + // The stable and unique string identifying the role. For more information about + // IDs, see [IAM identifiers]in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html // // This member is required. RoleId *string @@ -1041,38 +1193,44 @@ type Role struct { // optional DurationSeconds API parameter or duration-seconds CLI parameter. MaxSessionDuration *int32 - // The ARN of the policy used to set the permissions boundary for the role. For - // more information about permissions boundaries, see Permissions boundaries for - // IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. + // The ARN of the policy used to set the permissions boundary for the role. + // + // For more information about permissions boundaries, see [Permissions boundaries for IAM identities] in the IAM User Guide. + // + // [Permissions boundaries for IAM identities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html PermissionsBoundary *AttachedPermissionsBoundary // Contains information about the last time that an IAM role was used. This // includes the date and time and the Region in which the role was last used. // Activity is only reported for the trailing 400 days. This period can be shorter // if your Region began supporting these features within the last year. The role - // might have been used more than 400 days ago. For more information, see Regions - // where data is tracked (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period) - // in the IAM user Guide. + // might have been used more than 400 days ago. For more information, see [Regions where data is tracked]in the + // IAM user Guide. + // + // [Regions where data is tracked]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period RoleLastUsed *RoleLastUsed // A list of tags that are attached to the role. For more information about - // tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. + // tagging, see [Tagging IAM resources]in the IAM User Guide. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []Tag noSmithyDocumentSerde } // Contains information about an IAM role, including all of the role's policies. -// This data type is used as a response element in the -// GetAccountAuthorizationDetails operation. +// +// This data type is used as a response element in the GetAccountAuthorizationDetails operation. type RoleDetail struct { // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web - // Services resources. For more information about ARNs, go to Amazon Resource - // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // Services resources. + // + // For more information about ARNs, go to [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Arn *string // The trust policy that grants permission to assume the role. @@ -1082,35 +1240,41 @@ type RoleDetail struct { // access (permissions) policies. AttachedManagedPolicies []AttachedPolicy - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // , when the role was created. + // The date and time, in [ISO 8601 date-time format], when the role was created. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 CreateDate *time.Time // A list of instance profiles that contain this role. InstanceProfileList []InstanceProfile - // The path to the role. For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. + // The path to the role. For more information about paths, see [IAM identifiers] in the IAM User + // Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html Path *string - // The ARN of the policy used to set the permissions boundary for the role. For - // more information about permissions boundaries, see Permissions boundaries for - // IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. + // The ARN of the policy used to set the permissions boundary for the role. + // + // For more information about permissions boundaries, see [Permissions boundaries for IAM identities] in the IAM User Guide. + // + // [Permissions boundaries for IAM identities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html PermissionsBoundary *AttachedPermissionsBoundary // The stable and unique string identifying the role. For more information about - // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. + // IDs, see [IAM identifiers]in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html RoleId *string // Contains information about the last time that an IAM role was used. This // includes the date and time and the Region in which the role was last used. // Activity is only reported for the trailing 400 days. This period can be shorter // if your Region began supporting these features within the last year. The role - // might have been used more than 400 days ago. For more information, see Regions - // where data is tracked (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period) - // in the IAM User Guide. + // might have been used more than 400 days ago. For more information, see [Regions where data is tracked]in the + // IAM User Guide. + // + // [Regions where data is tracked]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period RoleLastUsed *RoleLastUsed // The friendly name that identifies the role. @@ -1121,8 +1285,9 @@ type RoleDetail struct { RolePolicyList []PolicyDetail // A list of tags that are attached to the role. For more information about - // tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. + // tagging, see [Tagging IAM resources]in the IAM User Guide. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []Tag noSmithyDocumentSerde @@ -1132,17 +1297,22 @@ type RoleDetail struct { // includes the date and time and the Region in which the role was last used. // Activity is only reported for the trailing 400 days. This period can be shorter // if your Region began supporting these features within the last year. The role -// might have been used more than 400 days ago. For more information, see Regions -// where data is tracked (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period) -// in the IAM user Guide. This data type is returned as a response element in the -// GetRole and GetAccountAuthorizationDetails operations. +// might have been used more than 400 days ago. For more information, see [Regions where data is tracked]in the +// IAM user Guide. +// +// This data type is returned as a response element in the GetRole and GetAccountAuthorizationDetails operations. +// +// [Regions where data is tracked]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period type RoleLastUsed struct { - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // that the role was last used. This field is null if the role has not been used - // within the IAM tracking period. For more information about the tracking period, - // see Regions where data is tracked (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period) - // in the IAM User Guide. + // The date and time, in [ISO 8601 date-time format] that the role was last used. + // + // This field is null if the role has not been used within the IAM tracking + // period. For more information about the tracking period, see [Regions where data is tracked]in the IAM User + // Guide. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 + // [Regions where data is tracked]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period LastUsedDate *time.Time // The name of the Amazon Web Services Region in which the role was last used. @@ -1152,8 +1322,9 @@ type RoleLastUsed struct { } // An object that contains details about how a service-linked role is used, if -// that information is returned by the service. This data type is used as a -// response element in the GetServiceLinkedRoleDeletionStatus operation. +// that information is returned by the service. +// +// This data type is used as a response element in the GetServiceLinkedRoleDeletionStatus operation. type RoleUsageType struct { // The name of the Region where the service-linked role is being used. @@ -1180,8 +1351,9 @@ type SAMLProviderListEntry struct { noSmithyDocumentSerde } -// Contains information about a server certificate. This data type is used as a -// response element in the GetServerCertificate operation. +// Contains information about a server certificate. +// +// This data type is used as a response element in the GetServerCertificate operation. type ServerCertificate struct { // The contents of the public key certificate. @@ -1199,35 +1371,41 @@ type ServerCertificate struct { CertificateChain *string // A list of tags that are attached to the server certificate. For more - // information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. + // information about tagging, see [Tagging IAM resources]in the IAM User Guide. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []Tag noSmithyDocumentSerde } // Contains information about a server certificate without its certificate body, -// certificate chain, and private key. This data type is used as a response element -// in the UploadServerCertificate and ListServerCertificates operations. +// certificate chain, and private key. +// +// This data type is used as a response element in the UploadServerCertificate and ListServerCertificates operations. type ServerCertificateMetadata struct { - // The Amazon Resource Name (ARN) specifying the server certificate. For more - // information about ARNs and how to use them in policies, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. + // The Amazon Resource Name (ARN) specifying the server certificate. For more + // information about ARNs and how to use them in policies, see [IAM identifiers]in the IAM User + // Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html // // This member is required. Arn *string - // The path to the server certificate. For more information about paths, see IAM - // identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. + // The path to the server certificate. For more information about paths, see [IAM identifiers] in + // the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html // // This member is required. Path *string - // The stable and unique string identifying the server certificate. For more - // information about IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. + // The stable and unique string identifying the server certificate. For more + // information about IDs, see [IAM identifiers]in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html // // This member is required. ServerCertificateId *string @@ -1246,9 +1424,9 @@ type ServerCertificateMetadata struct { noSmithyDocumentSerde } -// Contains details about the most recent attempt to access the service. This data -// type is used as a response element in the GetServiceLastAccessedDetails -// operation. +// Contains details about the most recent attempt to access the service. +// +// This data type is used as a response element in the GetServiceLastAccessedDetails operation. type ServiceLastAccessed struct { // The name of the service in which access was attempted. @@ -1256,52 +1434,68 @@ type ServiceLastAccessed struct { // This member is required. ServiceName *string - // The namespace of the service in which access was attempted. To learn the - // service namespace of a service, see Actions, resources, and condition keys for - // Amazon Web Services services (https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html) - // in the Service Authorization Reference. Choose the name of the service to view - // details for that service. In the first paragraph, find the service prefix. For - // example, (service prefix: a4b) . For more information about service namespaces, - // see Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. + // The namespace of the service in which access was attempted. + // + // To learn the service namespace of a service, see [Actions, resources, and condition keys for Amazon Web Services services] in the Service Authorization + // Reference. Choose the name of the service to view details for that service. In + // the first paragraph, find the service prefix. For example, (service prefix: a4b) + // . For more information about service namespaces, see [Amazon Web Services Service Namespaces]in the Amazon Web Services + // General Reference. + // + // [Amazon Web Services Service Namespaces]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces + // [Actions, resources, and condition keys for Amazon Web Services services]: https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html // // This member is required. ServiceNamespace *string - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // , when an authenticated entity most recently attempted to access the service. - // Amazon Web Services does not report unauthenticated requests. This field is null - // if no IAM entities attempted to access the service within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) - // . + // The date and time, in [ISO 8601 date-time format], when an authenticated entity most recently attempted to + // access the service. Amazon Web Services does not report unauthenticated + // requests. + // + // This field is null if no IAM entities attempted to access the service within + // the [tracking period]. + // + // [tracking period]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 LastAuthenticated *time.Time // The ARN of the authenticated entity (user or role) that last attempted to // access the service. Amazon Web Services does not report unauthenticated - // requests. This field is null if no IAM entities attempted to access the service - // within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) - // . + // requests. + // + // This field is null if no IAM entities attempted to access the service within + // the [tracking period]. + // + // [tracking period]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period LastAuthenticatedEntity *string // The Region from which the authenticated entity (user or role) last attempted to // access the service. Amazon Web Services does not report unauthenticated - // requests. This field is null if no IAM entities attempted to access the service - // within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) - // . + // requests. + // + // This field is null if no IAM entities attempted to access the service within + // the [tracking period]. + // + // [tracking period]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period LastAuthenticatedRegion *string // The total number of authenticated principals (root user, IAM users, or IAM - // roles) that have attempted to access the service. This field is null if no - // principals attempted to access the service within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) - // . + // roles) that have attempted to access the service. + // + // This field is null if no principals attempted to access the service within the [tracking period]. + // + // [tracking period]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period TotalAuthenticatedEntities *int32 // An object that contains details about the most recent attempt to access a - // tracked action within the service. This field is null if there no tracked - // actions or if the principal did not use the tracked actions within the tracking - // period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) - // . This field is also null if the report was generated at the service level and - // not the action level. For more information, see the Granularity field in - // GenerateServiceLastAccessedDetails . + // tracked action within the service. + // + // This field is null if there no tracked actions or if the principal did not use + // the tracked actions within the [tracking period]. This field is also null if the report was + // generated at the service level and not the action level. For more information, + // see the Granularity field in GenerateServiceLastAccessedDetails. + // + // [tracking period]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period TrackedActionsLastAccessed []TrackedActionLastAccessed noSmithyDocumentSerde @@ -1310,8 +1504,9 @@ type ServiceLastAccessed struct { // Contains the details of a service-specific credential. type ServiceSpecificCredential struct { - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // , when the service-specific credential were created. + // The date and time, in [ISO 8601 date-time format], when the service-specific credential were created. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 // // This member is required. CreateDate *time.Time @@ -1356,8 +1551,9 @@ type ServiceSpecificCredential struct { // Contains additional details about a service-specific credential. type ServiceSpecificCredentialMetadata struct { - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // , when the service-specific credential were created. + // The date and time, in [ISO 8601 date-time format], when the service-specific credential were created. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 // // This member is required. CreateDate *time.Time @@ -1391,9 +1587,9 @@ type ServiceSpecificCredentialMetadata struct { noSmithyDocumentSerde } -// Contains information about an X.509 signing certificate. This data type is used -// as a response element in the UploadSigningCertificate and -// ListSigningCertificates operations. +// Contains information about an X.509 signing certificate. +// +// This data type is used as a response element in the UploadSigningCertificate and ListSigningCertificates operations. type SigningCertificate struct { // The contents of the signing certificate. @@ -1423,8 +1619,9 @@ type SigningCertificate struct { noSmithyDocumentSerde } -// Contains information about an SSH public key. This data type is used as a -// response element in the GetSSHPublicKey and UploadSSHPublicKey operations. +// Contains information about an SSH public key. +// +// This data type is used as a response element in the GetSSHPublicKey and UploadSSHPublicKey operations. type SSHPublicKey struct { // The MD5 message digest of the SSH public key. @@ -1454,16 +1651,18 @@ type SSHPublicKey struct { // This member is required. UserName *string - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // , when the SSH public key was uploaded. + // The date and time, in [ISO 8601 date-time format], when the SSH public key was uploaded. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 UploadDate *time.Time noSmithyDocumentSerde } // Contains information about an SSH public key, without the key's body or -// fingerprint. This data type is used as a response element in the -// ListSSHPublicKeys operation. +// fingerprint. +// +// This data type is used as a response element in the ListSSHPublicKeys operation. type SSHPublicKeyMetadata struct { // The unique identifier for the SSH public key. @@ -1478,8 +1677,9 @@ type SSHPublicKeyMetadata struct { // This member is required. Status StatusType - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // , when the SSH public key was uploaded. + // The date and time, in [ISO 8601 date-time format], when the SSH public key was uploaded. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 // // This member is required. UploadDate *time.Time @@ -1493,8 +1693,9 @@ type SSHPublicKeyMetadata struct { } // Contains a reference to a Statement element in a policy document that -// determines the result of the simulation. This data type is used by the -// MatchedStatements member of the EvaluationResult type. +// determines the result of the simulation. +// +// This data type is used by the MatchedStatements member of the EvaluationResult type. type Statement struct { // The row and column of the end of a Statement in an IAM policy. @@ -1513,8 +1714,9 @@ type Statement struct { } // A structure that represents user-provided metadata that can be associated with -// an IAM resource. For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. +// an IAM resource. For more information about tagging, see [Tagging IAM resources]in the IAM User Guide. +// +// [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html type Tag struct { // The key name that can be used to look up or retrieve the associated value. For @@ -1528,6 +1730,7 @@ type Tag struct { // . Tags with a key name of Cost Center might have values that consist of the // number associated with the different cost centers in your company. Typically, // many resources have tags with the same key name but with different values. + // // Amazon Web Services always interprets the tag Value as a single string. If you // need to store an array, you can store comma-separated values in the string. // However, you must interpret the value in your code. @@ -1539,8 +1742,9 @@ type Tag struct { } // Contains details about the most recent attempt to access an action within the -// service. This data type is used as a response element in the -// GetServiceLastAccessedDetails operation. +// service. +// +// This data type is used as a response element in the GetServiceLastAccessedDetails operation. type TrackedActionLastAccessed struct { // The name of the tracked action to which access was attempted. Tracked actions @@ -1548,59 +1752,78 @@ type TrackedActionLastAccessed struct { ActionName *string // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web - // Services resources. For more information about ARNs, go to Amazon Resource - // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // Services resources. + // + // For more information about ARNs, go to [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html LastAccessedEntity *string // The Region from which the authenticated entity (user or role) last attempted to // access the tracked action. Amazon Web Services does not report unauthenticated - // requests. This field is null if no IAM entities attempted to access the service - // within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) - // . + // requests. + // + // This field is null if no IAM entities attempted to access the service within + // the [tracking period]. + // + // [tracking period]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period LastAccessedRegion *string - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // , when an authenticated entity most recently attempted to access the tracked - // service. Amazon Web Services does not report unauthenticated requests. This - // field is null if no IAM entities attempted to access the service within the - // tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period) - // . + // The date and time, in [ISO 8601 date-time format], when an authenticated entity most recently attempted to + // access the tracked service. Amazon Web Services does not report unauthenticated + // requests. + // + // This field is null if no IAM entities attempted to access the service within + // the [tracking period]. + // + // [tracking period]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 LastAccessedTime *time.Time noSmithyDocumentSerde } -// Contains information about an IAM user entity. This data type is used as a -// response element in the following operations: -// - CreateUser -// - GetUser -// - ListUsers +// Contains information about an IAM user entity. +// +// This data type is used as a response element in the following operations: +// +// # CreateUser +// +// # GetUser +// +// ListUsers type User struct { // The Amazon Resource Name (ARN) that identifies the user. For more information - // about ARNs and how to use ARNs in policies, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. + // about ARNs and how to use ARNs in policies, see [IAM Identifiers]in the IAM User Guide. + // + // [IAM Identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html // // This member is required. Arn *string - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // , when the user was created. + // The date and time, in [ISO 8601 date-time format], when the user was created. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 // // This member is required. CreateDate *time.Time - // The path to the user. For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. The ARN of the policy used to set the permissions - // boundary for the user. + // The path to the user. For more information about paths, see [IAM identifiers] in the IAM User + // Guide. + // + // The ARN of the policy used to set the permissions boundary for the user. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html // // This member is required. Path *string // The stable and unique string identifying the user. For more information about - // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. + // IDs, see [IAM identifiers]in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html // // This member is required. UserId *string @@ -1610,75 +1833,91 @@ type User struct { // This member is required. UserName *string - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // , when the user's password was last used to sign in to an Amazon Web Services - // website. For a list of Amazon Web Services websites that capture a user's last - // sign-in time, see the Credential reports (https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html) - // topic in the IAM User Guide. If a password is used more than once in a - // five-minute span, only the first use is returned in this field. If the field is - // null (no value), then it indicates that they never signed in with a password. - // This can be because: + // The date and time, in [ISO 8601 date-time format], when the user's password was last used to sign in to an + // Amazon Web Services website. For a list of Amazon Web Services websites that + // capture a user's last sign-in time, see the [Credential reports]topic in the IAM User Guide. If a + // password is used more than once in a five-minute span, only the first use is + // returned in this field. If the field is null (no value), then it indicates that + // they never signed in with a password. This can be because: + // // - The user never had a password. + // // - A password exists but has not been used since IAM started tracking this // information on October 20, 2014. + // // A null value does not mean that the user never had a password. Also, if the // user does not currently have a password but had one in the past, then this field - // contains the date and time the most recent password was used. This value is - // returned only in the GetUser and ListUsers operations. + // contains the date and time the most recent password was used. + // + // This value is returned only in the GetUser and ListUsers operations. + // + // [Credential reports]: https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 PasswordLastUsed *time.Time - // For more information about permissions boundaries, see Permissions boundaries - // for IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. + // For more information about permissions boundaries, see [Permissions boundaries for IAM identities] in the IAM User Guide. + // + // [Permissions boundaries for IAM identities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html PermissionsBoundary *AttachedPermissionsBoundary // A list of tags that are associated with the user. For more information about - // tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. + // tagging, see [Tagging IAM resources]in the IAM User Guide. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []Tag noSmithyDocumentSerde } // Contains information about an IAM user, including all the user's policies and -// all the IAM groups the user is in. This data type is used as a response element -// in the GetAccountAuthorizationDetails operation. +// all the IAM groups the user is in. +// +// This data type is used as a response element in the GetAccountAuthorizationDetails operation. type UserDetail struct { // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web - // Services resources. For more information about ARNs, go to Amazon Resource - // Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. + // Services resources. + // + // For more information about ARNs, go to [Amazon Resource Names (ARNs)] in the Amazon Web Services General + // Reference. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Arn *string // A list of the managed policies attached to the user. AttachedManagedPolicies []AttachedPolicy - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // , when the user was created. + // The date and time, in [ISO 8601 date-time format], when the user was created. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 CreateDate *time.Time // A list of IAM groups that the user is in. GroupList []string - // The path to the user. For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. + // The path to the user. For more information about paths, see [IAM identifiers] in the IAM User + // Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html Path *string - // The ARN of the policy used to set the permissions boundary for the user. For - // more information about permissions boundaries, see Permissions boundaries for - // IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. + // The ARN of the policy used to set the permissions boundary for the user. + // + // For more information about permissions boundaries, see [Permissions boundaries for IAM identities] in the IAM User Guide. + // + // [Permissions boundaries for IAM identities]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html PermissionsBoundary *AttachedPermissionsBoundary // A list of tags that are associated with the user. For more information about - // tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. + // tagging, see [Tagging IAM resources]in the IAM User Guide. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []Tag // The stable and unique string identifying the user. For more information about - // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. + // IDs, see [IAM identifiers]in the IAM User Guide. + // + // [IAM identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html UserId *string // The friendly name identifying the user. @@ -1698,14 +1937,16 @@ type VirtualMFADevice struct { // This member is required. SerialNumber *string - // The base32 seed defined as specified in RFC3548 (https://tools.ietf.org/html/rfc3548.txt) - // . The Base32StringSeed is base32-encoded. + // The base32 seed defined as specified in [RFC3548]. The Base32StringSeed is + // base32-encoded. + // + // [RFC3548]: https://tools.ietf.org/html/rfc3548.txt Base32StringSeed []byte // The date and time on which the virtual MFA device was enabled. EnableDate *time.Time - // A QR code PNG image that encodes + // A QR code PNG image that encodes // otpauth://totp/$virtualMFADeviceName@$AccountName?secret=$Base32String where // $virtualMFADeviceName is one of the create call arguments. AccountName is the // user name if set (otherwise, the account ID otherwise), and Base32String is the @@ -1713,8 +1954,9 @@ type VirtualMFADevice struct { QRCodePNG []byte // A list of tags that are attached to the virtual MFA device. For more - // information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. + // information about tagging, see [Tagging IAM resources]in the IAM User Guide. + // + // [Tagging IAM resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html Tags []Tag // The IAM user associated with this virtual MFA device. diff --git a/vendor/github.com/aws/aws-sdk-go/aws/arn/arn.go b/vendor/github.com/aws/aws-sdk-go/aws/arn/arn.go deleted file mode 100644 index 1c49674290..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/aws/arn/arn.go +++ /dev/null @@ -1,93 +0,0 @@ -// Package arn provides a parser for interacting with Amazon Resource Names. -package arn - -import ( - "errors" - "strings" -) - -const ( - arnDelimiter = ":" - arnSections = 6 - arnPrefix = "arn:" - - // zero-indexed - sectionPartition = 1 - sectionService = 2 - sectionRegion = 3 - sectionAccountID = 4 - sectionResource = 5 - - // errors - invalidPrefix = "arn: invalid prefix" - invalidSections = "arn: not enough sections" -) - -// ARN captures the individual fields of an Amazon Resource Name. -// See http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html for more information. -type ARN struct { - // The partition that the resource is in. For standard AWS regions, the partition is "aws". If you have resources in - // other partitions, the partition is "aws-partitionname". For example, the partition for resources in the China - // (Beijing) region is "aws-cn". - Partition string - - // The service namespace that identifies the AWS product (for example, Amazon S3, IAM, or Amazon RDS). For a list of - // namespaces, see - // http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces. - Service string - - // The region the resource resides in. Note that the ARNs for some resources do not require a region, so this - // component might be omitted. - Region string - - // The ID of the AWS account that owns the resource, without the hyphens. For example, 123456789012. Note that the - // ARNs for some resources don't require an account number, so this component might be omitted. - AccountID string - - // The content of this part of the ARN varies by service. It often includes an indicator of the type of resource — - // for example, an IAM user or Amazon RDS database - followed by a slash (/) or a colon (:), followed by the - // resource name itself. Some services allows paths for resource names, as described in - // http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arns-paths. - Resource string -} - -// Parse parses an ARN into its constituent parts. -// -// Some example ARNs: -// arn:aws:elasticbeanstalk:us-east-1:123456789012:environment/My App/MyEnvironment -// arn:aws:iam::123456789012:user/David -// arn:aws:rds:eu-west-1:123456789012:db:mysql-db -// arn:aws:s3:::my_corporate_bucket/exampleobject.png -func Parse(arn string) (ARN, error) { - if !strings.HasPrefix(arn, arnPrefix) { - return ARN{}, errors.New(invalidPrefix) - } - sections := strings.SplitN(arn, arnDelimiter, arnSections) - if len(sections) != arnSections { - return ARN{}, errors.New(invalidSections) - } - return ARN{ - Partition: sections[sectionPartition], - Service: sections[sectionService], - Region: sections[sectionRegion], - AccountID: sections[sectionAccountID], - Resource: sections[sectionResource], - }, nil -} - -// IsARN returns whether the given string is an ARN by looking for -// whether the string starts with "arn:" and contains the correct number -// of sections delimited by colons(:). -func IsARN(arn string) bool { - return strings.HasPrefix(arn, arnPrefix) && strings.Count(arn, ":") >= arnSections-1 -} - -// String returns the canonical representation of the ARN -func (arn ARN) String() string { - return arnPrefix + - arn.Partition + arnDelimiter + - arn.Service + arnDelimiter + - arn.Region + arnDelimiter + - arn.AccountID + arnDelimiter + - arn.Resource -} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/accesspoint_arn.go b/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/accesspoint_arn.go deleted file mode 100644 index bf18031a38..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/accesspoint_arn.go +++ /dev/null @@ -1,50 +0,0 @@ -package arn - -import ( - "strings" - - "github.com/aws/aws-sdk-go/aws/arn" -) - -// AccessPointARN provides representation -type AccessPointARN struct { - arn.ARN - AccessPointName string -} - -// GetARN returns the base ARN for the Access Point resource -func (a AccessPointARN) GetARN() arn.ARN { - return a.ARN -} - -// ParseAccessPointResource attempts to parse the ARN's resource as an -// AccessPoint resource. -// -// Supported Access point resource format: -// - Access point format: arn:{partition}:s3:{region}:{accountId}:accesspoint/{accesspointName} -// - example: arn.aws.s3.us-west-2.012345678901:accesspoint/myaccesspoint -// -func ParseAccessPointResource(a arn.ARN, resParts []string) (AccessPointARN, error) { - if len(a.Region) == 0 { - return AccessPointARN{}, InvalidARNError{ARN: a, Reason: "region not set"} - } - if len(a.AccountID) == 0 { - return AccessPointARN{}, InvalidARNError{ARN: a, Reason: "account-id not set"} - } - if len(resParts) == 0 { - return AccessPointARN{}, InvalidARNError{ARN: a, Reason: "resource-id not set"} - } - if len(resParts) > 1 { - return AccessPointARN{}, InvalidARNError{ARN: a, Reason: "sub resource not supported"} - } - - resID := resParts[0] - if len(strings.TrimSpace(resID)) == 0 { - return AccessPointARN{}, InvalidARNError{ARN: a, Reason: "resource-id not set"} - } - - return AccessPointARN{ - ARN: a, - AccessPointName: resID, - }, nil -} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/arn.go b/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/arn.go deleted file mode 100644 index 216c4baabf..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/arn.go +++ /dev/null @@ -1,94 +0,0 @@ -package arn - -import ( - "fmt" - "strings" - - "github.com/aws/aws-sdk-go/aws/arn" -) - -var supportedServiceARN = []string{ - "s3", - "s3-outposts", - "s3-object-lambda", -} - -func isSupportedServiceARN(service string) bool { - for _, name := range supportedServiceARN { - if name == service { - return true - } - } - return false -} - -// Resource provides the interfaces abstracting ARNs of specific resource -// types. -type Resource interface { - GetARN() arn.ARN - String() string -} - -// ResourceParser provides the function for parsing an ARN's resource -// component into a typed resource. -type ResourceParser func(arn.ARN) (Resource, error) - -// ParseResource parses an AWS ARN into a typed resource for the S3 API. -func ParseResource(s string, resParser ResourceParser) (resARN Resource, err error) { - a, err := arn.Parse(s) - if err != nil { - return nil, err - } - - if len(a.Partition) == 0 { - return nil, InvalidARNError{ARN: a, Reason: "partition not set"} - } - - if !isSupportedServiceARN(a.Service) { - return nil, InvalidARNError{ARN: a, Reason: "service is not supported"} - } - - if strings.HasPrefix(a.Region, "fips-") || strings.HasSuffix(a.Region, "-fips") { - return nil, InvalidARNError{ARN: a, Reason: "FIPS region not allowed in ARN"} - } - - if len(a.Resource) == 0 { - return nil, InvalidARNError{ARN: a, Reason: "resource not set"} - } - - return resParser(a) -} - -// SplitResource splits the resource components by the ARN resource delimiters. -func SplitResource(v string) []string { - var parts []string - var offset int - - for offset <= len(v) { - idx := strings.IndexAny(v[offset:], "/:") - if idx < 0 { - parts = append(parts, v[offset:]) - break - } - parts = append(parts, v[offset:idx+offset]) - offset += idx + 1 - } - - return parts -} - -// IsARN returns whether the given string is an ARN -func IsARN(s string) bool { - return arn.IsARN(s) -} - -// InvalidARNError provides the error for an invalid ARN error. -type InvalidARNError struct { - ARN arn.ARN - Reason string -} - -// Error returns a string denoting the occurred InvalidARNError -func (e InvalidARNError) Error() string { - return fmt.Sprintf("invalid Amazon %s ARN, %s, %s", e.ARN.Service, e.Reason, e.ARN.String()) -} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/outpost_arn.go b/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/outpost_arn.go deleted file mode 100644 index 1e10f8de00..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/outpost_arn.go +++ /dev/null @@ -1,126 +0,0 @@ -package arn - -import ( - "strings" - - "github.com/aws/aws-sdk-go/aws/arn" -) - -// OutpostARN interface that should be satisfied by outpost ARNs -type OutpostARN interface { - Resource - GetOutpostID() string -} - -// ParseOutpostARNResource will parse a provided ARNs resource using the appropriate ARN format -// and return a specific OutpostARN type -// -// Currently supported outpost ARN formats: -// * Outpost AccessPoint ARN format: -// - ARN format: arn:{partition}:s3-outposts:{region}:{accountId}:outpost/{outpostId}/accesspoint/{accesspointName} -// - example: arn:aws:s3-outposts:us-west-2:012345678901:outpost/op-1234567890123456/accesspoint/myaccesspoint -// -// * Outpost Bucket ARN format: -// - ARN format: arn:{partition}:s3-outposts:{region}:{accountId}:outpost/{outpostId}/bucket/{bucketName} -// - example: arn:aws:s3-outposts:us-west-2:012345678901:outpost/op-1234567890123456/bucket/mybucket -// -// Other outpost ARN formats may be supported and added in the future. -// -func ParseOutpostARNResource(a arn.ARN, resParts []string) (OutpostARN, error) { - if len(a.Region) == 0 { - return nil, InvalidARNError{ARN: a, Reason: "region not set"} - } - - if len(a.AccountID) == 0 { - return nil, InvalidARNError{ARN: a, Reason: "account-id not set"} - } - - // verify if outpost id is present and valid - if len(resParts) == 0 || len(strings.TrimSpace(resParts[0])) == 0 { - return nil, InvalidARNError{ARN: a, Reason: "outpost resource-id not set"} - } - - // verify possible resource type exists - if len(resParts) < 3 { - return nil, InvalidARNError{ - ARN: a, Reason: "incomplete outpost resource type. Expected bucket or access-point resource to be present", - } - } - - // Since we know this is a OutpostARN fetch outpostID - outpostID := strings.TrimSpace(resParts[0]) - - switch resParts[1] { - case "accesspoint": - accesspointARN, err := ParseAccessPointResource(a, resParts[2:]) - if err != nil { - return OutpostAccessPointARN{}, err - } - return OutpostAccessPointARN{ - AccessPointARN: accesspointARN, - OutpostID: outpostID, - }, nil - - case "bucket": - bucketName, err := parseBucketResource(a, resParts[2:]) - if err != nil { - return nil, err - } - return OutpostBucketARN{ - ARN: a, - BucketName: bucketName, - OutpostID: outpostID, - }, nil - - default: - return nil, InvalidARNError{ARN: a, Reason: "unknown resource set for outpost ARN"} - } -} - -// OutpostAccessPointARN represents outpost access point ARN. -type OutpostAccessPointARN struct { - AccessPointARN - OutpostID string -} - -// GetOutpostID returns the outpost id of outpost access point arn -func (o OutpostAccessPointARN) GetOutpostID() string { - return o.OutpostID -} - -// OutpostBucketARN represents the outpost bucket ARN. -type OutpostBucketARN struct { - arn.ARN - BucketName string - OutpostID string -} - -// GetOutpostID returns the outpost id of outpost bucket arn -func (o OutpostBucketARN) GetOutpostID() string { - return o.OutpostID -} - -// GetARN retrives the base ARN from outpost bucket ARN resource -func (o OutpostBucketARN) GetARN() arn.ARN { - return o.ARN -} - -// parseBucketResource attempts to parse the ARN's bucket resource and retrieve the -// bucket resource id. -// -// parseBucketResource only parses the bucket resource id. -// -func parseBucketResource(a arn.ARN, resParts []string) (bucketName string, err error) { - if len(resParts) == 0 { - return bucketName, InvalidARNError{ARN: a, Reason: "bucket resource-id not set"} - } - if len(resParts) > 1 { - return bucketName, InvalidARNError{ARN: a, Reason: "sub resource not supported"} - } - - bucketName = strings.TrimSpace(resParts[0]) - if len(bucketName) == 0 { - return bucketName, InvalidARNError{ARN: a, Reason: "bucket resource-id not set"} - } - return bucketName, err -} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/s3_object_lambda_arn.go b/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/s3_object_lambda_arn.go deleted file mode 100644 index 513154cc0e..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/s3_object_lambda_arn.go +++ /dev/null @@ -1,15 +0,0 @@ -package arn - -// S3ObjectLambdaARN represents an ARN for the s3-object-lambda service -type S3ObjectLambdaARN interface { - Resource - - isS3ObjectLambdasARN() -} - -// S3ObjectLambdaAccessPointARN is an S3ObjectLambdaARN for the Access Point resource type -type S3ObjectLambdaAccessPointARN struct { - AccessPointARN -} - -func (s S3ObjectLambdaAccessPointARN) isS3ObjectLambdasARN() {} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/endpoint_errors.go b/vendor/github.com/aws/aws-sdk-go/internal/s3shared/endpoint_errors.go deleted file mode 100644 index 4290ff6760..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/endpoint_errors.go +++ /dev/null @@ -1,202 +0,0 @@ -package s3shared - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/internal/s3shared/arn" -) - -const ( - invalidARNErrorErrCode = "InvalidARNError" - configurationErrorErrCode = "ConfigurationError" -) - -// InvalidARNError denotes the error for Invalid ARN -type InvalidARNError struct { - message string - resource arn.Resource - origErr error -} - -// Error returns the InvalidARNError -func (e InvalidARNError) Error() string { - var extra string - if e.resource != nil { - extra = "ARN: " + e.resource.String() - } - return awserr.SprintError(e.Code(), e.Message(), extra, e.origErr) -} - -// Code returns the invalid ARN error code -func (e InvalidARNError) Code() string { - return invalidARNErrorErrCode -} - -// Message returns the message for Invalid ARN error -func (e InvalidARNError) Message() string { - return e.message -} - -// OrigErr is the original error wrapped by Invalid ARN Error -func (e InvalidARNError) OrigErr() error { - return e.origErr -} - -// NewInvalidARNError denotes invalid arn error -func NewInvalidARNError(resource arn.Resource, err error) InvalidARNError { - return InvalidARNError{ - message: "invalid ARN", - origErr: err, - resource: resource, - } -} - -// NewInvalidARNWithCustomEndpointError ARN not supported for custom clients endpoints -func NewInvalidARNWithCustomEndpointError(resource arn.Resource, err error) InvalidARNError { - return InvalidARNError{ - message: "resource ARN not supported with custom client endpoints", - origErr: err, - resource: resource, - } -} - -// NewInvalidARNWithUnsupportedPartitionError ARN not supported for the target partition -func NewInvalidARNWithUnsupportedPartitionError(resource arn.Resource, err error) InvalidARNError { - return InvalidARNError{ - message: "resource ARN not supported for the target ARN partition", - origErr: err, - resource: resource, - } -} - -// NewInvalidARNWithFIPSError ARN not supported for FIPS region -// -// Deprecated: FIPS will not appear in the ARN region component. -func NewInvalidARNWithFIPSError(resource arn.Resource, err error) InvalidARNError { - return InvalidARNError{ - message: "resource ARN not supported for FIPS region", - resource: resource, - origErr: err, - } -} - -// ConfigurationError is used to denote a client configuration error -type ConfigurationError struct { - message string - resource arn.Resource - clientPartitionID string - clientRegion string - origErr error -} - -// Error returns the Configuration error string -func (e ConfigurationError) Error() string { - extra := fmt.Sprintf("ARN: %s, client partition: %s, client region: %s", - e.resource, e.clientPartitionID, e.clientRegion) - - return awserr.SprintError(e.Code(), e.Message(), extra, e.origErr) -} - -// Code returns configuration error's error-code -func (e ConfigurationError) Code() string { - return configurationErrorErrCode -} - -// Message returns the configuration error message -func (e ConfigurationError) Message() string { - return e.message -} - -// OrigErr is the original error wrapped by Configuration Error -func (e ConfigurationError) OrigErr() error { - return e.origErr -} - -// NewClientPartitionMismatchError stub -func NewClientPartitionMismatchError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError { - return ConfigurationError{ - message: "client partition does not match provided ARN partition", - origErr: err, - resource: resource, - clientPartitionID: clientPartitionID, - clientRegion: clientRegion, - } -} - -// NewClientRegionMismatchError denotes cross region access error -func NewClientRegionMismatchError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError { - return ConfigurationError{ - message: "client region does not match provided ARN region", - origErr: err, - resource: resource, - clientPartitionID: clientPartitionID, - clientRegion: clientRegion, - } -} - -// NewFailedToResolveEndpointError denotes endpoint resolving error -func NewFailedToResolveEndpointError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError { - return ConfigurationError{ - message: "endpoint resolver failed to find an endpoint for the provided ARN region", - origErr: err, - resource: resource, - clientPartitionID: clientPartitionID, - clientRegion: clientRegion, - } -} - -// NewClientConfiguredForFIPSError denotes client config error for unsupported cross region FIPS access -func NewClientConfiguredForFIPSError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError { - return ConfigurationError{ - message: "client configured for fips but cross-region resource ARN provided", - origErr: err, - resource: resource, - clientPartitionID: clientPartitionID, - clientRegion: clientRegion, - } -} - -// NewFIPSConfigurationError denotes a configuration error when a client or request is configured for FIPS -func NewFIPSConfigurationError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError { - return ConfigurationError{ - message: "use of ARN is not supported when client or request is configured for FIPS", - origErr: err, - resource: resource, - clientPartitionID: clientPartitionID, - clientRegion: clientRegion, - } -} - -// NewClientConfiguredForAccelerateError denotes client config error for unsupported S3 accelerate -func NewClientConfiguredForAccelerateError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError { - return ConfigurationError{ - message: "client configured for S3 Accelerate but is not supported with resource ARN", - origErr: err, - resource: resource, - clientPartitionID: clientPartitionID, - clientRegion: clientRegion, - } -} - -// NewClientConfiguredForCrossRegionFIPSError denotes client config error for unsupported cross region FIPS request -func NewClientConfiguredForCrossRegionFIPSError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError { - return ConfigurationError{ - message: "client configured for FIPS with cross-region enabled but is supported with cross-region resource ARN", - origErr: err, - resource: resource, - clientPartitionID: clientPartitionID, - clientRegion: clientRegion, - } -} - -// NewClientConfiguredForDualStackError denotes client config error for unsupported S3 Dual-stack -func NewClientConfiguredForDualStackError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError { - return ConfigurationError{ - message: "client configured for S3 Dual-stack but is not supported with resource ARN", - origErr: err, - resource: resource, - clientPartitionID: clientPartitionID, - clientRegion: clientRegion, - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/resource_request.go b/vendor/github.com/aws/aws-sdk-go/internal/s3shared/resource_request.go deleted file mode 100644 index ef43d6c589..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/resource_request.go +++ /dev/null @@ -1,45 +0,0 @@ -package s3shared - -import ( - "github.com/aws/aws-sdk-go/aws" - awsarn "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/internal/s3shared/arn" -) - -// ResourceRequest represents the request and arn resource -type ResourceRequest struct { - Resource arn.Resource - Request *request.Request -} - -// ARN returns the resource ARN -func (r ResourceRequest) ARN() awsarn.ARN { - return r.Resource.GetARN() -} - -// AllowCrossRegion returns a bool value to denote if S3UseARNRegion flag is set -func (r ResourceRequest) AllowCrossRegion() bool { - return aws.BoolValue(r.Request.Config.S3UseARNRegion) -} - -// IsCrossPartition returns true if client is configured for another partition, than -// the partition that resource ARN region resolves to. -func (r ResourceRequest) IsCrossPartition() bool { - return r.Request.ClientInfo.PartitionID != r.Resource.GetARN().Partition -} - -// IsCrossRegion returns true if ARN region is different than client configured region -func (r ResourceRequest) IsCrossRegion() bool { - return IsCrossRegion(r.Request, r.Resource.GetARN().Region) -} - -// HasCustomEndpoint returns true if custom client endpoint is provided -func (r ResourceRequest) HasCustomEndpoint() bool { - return len(aws.StringValue(r.Request.Config.Endpoint)) > 0 -} - -// IsCrossRegion returns true if request signing region is not same as configured region -func IsCrossRegion(req *request.Request, otherRegion string) bool { - return req.ClientInfo.SigningRegion != otherRegion -} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/s3err/error.go b/vendor/github.com/aws/aws-sdk-go/internal/s3shared/s3err/error.go deleted file mode 100644 index 0b9b0dfce0..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/s3err/error.go +++ /dev/null @@ -1,57 +0,0 @@ -package s3err - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/request" -) - -// RequestFailure provides additional S3 specific metadata for the request -// failure. -type RequestFailure struct { - awserr.RequestFailure - - hostID string -} - -// NewRequestFailure returns a request failure error decordated with S3 -// specific metadata. -func NewRequestFailure(err awserr.RequestFailure, hostID string) *RequestFailure { - return &RequestFailure{RequestFailure: err, hostID: hostID} -} - -func (r RequestFailure) Error() string { - extra := fmt.Sprintf("status code: %d, request id: %s, host id: %s", - r.StatusCode(), r.RequestID(), r.hostID) - return awserr.SprintError(r.Code(), r.Message(), extra, r.OrigErr()) -} -func (r RequestFailure) String() string { - return r.Error() -} - -// HostID returns the HostID request response value. -func (r RequestFailure) HostID() string { - return r.hostID -} - -// RequestFailureWrapperHandler returns a handler to rap an -// awserr.RequestFailure with the S3 request ID 2 from the response. -func RequestFailureWrapperHandler() request.NamedHandler { - return request.NamedHandler{ - Name: "awssdk.s3.errorHandler", - Fn: func(req *request.Request) { - reqErr, ok := req.Error.(awserr.RequestFailure) - if !ok || reqErr == nil { - return - } - - hostID := req.HTTPResponse.Header.Get("X-Amz-Id-2") - if req.Error == nil { - return - } - - req.Error = NewRequestFailure(reqErr, hostID) - }, - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/checksum/content_md5.go b/vendor/github.com/aws/aws-sdk-go/private/checksum/content_md5.go deleted file mode 100644 index e045f38d83..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/private/checksum/content_md5.go +++ /dev/null @@ -1,53 +0,0 @@ -package checksum - -import ( - "crypto/md5" - "encoding/base64" - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/request" -) - -const contentMD5Header = "Content-Md5" - -// AddBodyContentMD5Handler computes and sets the HTTP Content-MD5 header for requests that -// require it. -func AddBodyContentMD5Handler(r *request.Request) { - // if Content-MD5 header is already present, return - if v := r.HTTPRequest.Header.Get(contentMD5Header); len(v) != 0 { - return - } - - // if S3DisableContentMD5Validation flag is set, return - if aws.BoolValue(r.Config.S3DisableContentMD5Validation) { - return - } - - // if request is presigned, return - if r.IsPresigned() { - return - } - - // if body is not seekable, return - if !aws.IsReaderSeekable(r.Body) { - if r.Config.Logger != nil { - r.Config.Logger.Log(fmt.Sprintf( - "Unable to compute Content-MD5 for unseekable body, S3.%s", - r.Operation.Name)) - } - return - } - - h := md5.New() - - if _, err := aws.CopySeekableBody(h, r.Body); err != nil { - r.Error = awserr.New("ContentMD5", "failed to compute body MD5", err) - return - } - - // encode the md5 checksum in base64 and set the request header. - v := base64.StdEncoding.EncodeToString(h.Sum(nil)) - r.HTTPRequest.Header.Set(contentMD5Header, v) -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/debug.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/debug.go deleted file mode 100644 index 151054971a..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/debug.go +++ /dev/null @@ -1,144 +0,0 @@ -package eventstream - -import ( - "bytes" - "encoding/base64" - "encoding/json" - "fmt" - "strconv" -) - -type decodedMessage struct { - rawMessage - Headers decodedHeaders `json:"headers"` -} -type jsonMessage struct { - Length json.Number `json:"total_length"` - HeadersLen json.Number `json:"headers_length"` - PreludeCRC json.Number `json:"prelude_crc"` - Headers decodedHeaders `json:"headers"` - Payload []byte `json:"payload"` - CRC json.Number `json:"message_crc"` -} - -func (d *decodedMessage) UnmarshalJSON(b []byte) (err error) { - var jsonMsg jsonMessage - if err = json.Unmarshal(b, &jsonMsg); err != nil { - return err - } - - d.Length, err = numAsUint32(jsonMsg.Length) - if err != nil { - return err - } - d.HeadersLen, err = numAsUint32(jsonMsg.HeadersLen) - if err != nil { - return err - } - d.PreludeCRC, err = numAsUint32(jsonMsg.PreludeCRC) - if err != nil { - return err - } - d.Headers = jsonMsg.Headers - d.Payload = jsonMsg.Payload - d.CRC, err = numAsUint32(jsonMsg.CRC) - if err != nil { - return err - } - - return nil -} - -func (d *decodedMessage) MarshalJSON() ([]byte, error) { - jsonMsg := jsonMessage{ - Length: json.Number(strconv.Itoa(int(d.Length))), - HeadersLen: json.Number(strconv.Itoa(int(d.HeadersLen))), - PreludeCRC: json.Number(strconv.Itoa(int(d.PreludeCRC))), - Headers: d.Headers, - Payload: d.Payload, - CRC: json.Number(strconv.Itoa(int(d.CRC))), - } - - return json.Marshal(jsonMsg) -} - -func numAsUint32(n json.Number) (uint32, error) { - v, err := n.Int64() - if err != nil { - return 0, fmt.Errorf("failed to get int64 json number, %v", err) - } - - return uint32(v), nil -} - -func (d decodedMessage) Message() Message { - return Message{ - Headers: Headers(d.Headers), - Payload: d.Payload, - } -} - -type decodedHeaders Headers - -func (hs *decodedHeaders) UnmarshalJSON(b []byte) error { - var jsonHeaders []struct { - Name string `json:"name"` - Type valueType `json:"type"` - Value interface{} `json:"value"` - } - - decoder := json.NewDecoder(bytes.NewReader(b)) - decoder.UseNumber() - if err := decoder.Decode(&jsonHeaders); err != nil { - return err - } - - var headers Headers - for _, h := range jsonHeaders { - value, err := valueFromType(h.Type, h.Value) - if err != nil { - return err - } - headers.Set(h.Name, value) - } - *hs = decodedHeaders(headers) - - return nil -} - -func valueFromType(typ valueType, val interface{}) (Value, error) { - switch typ { - case trueValueType: - return BoolValue(true), nil - case falseValueType: - return BoolValue(false), nil - case int8ValueType: - v, err := val.(json.Number).Int64() - return Int8Value(int8(v)), err - case int16ValueType: - v, err := val.(json.Number).Int64() - return Int16Value(int16(v)), err - case int32ValueType: - v, err := val.(json.Number).Int64() - return Int32Value(int32(v)), err - case int64ValueType: - v, err := val.(json.Number).Int64() - return Int64Value(v), err - case bytesValueType: - v, err := base64.StdEncoding.DecodeString(val.(string)) - return BytesValue(v), err - case stringValueType: - v, err := base64.StdEncoding.DecodeString(val.(string)) - return StringValue(string(v)), err - case timestampValueType: - v, err := val.(json.Number).Int64() - return TimestampValue(timeFromEpochMilli(v)), err - case uuidValueType: - v, err := base64.StdEncoding.DecodeString(val.(string)) - var tv UUIDValue - copy(tv[:], v) - return tv, err - default: - panic(fmt.Sprintf("unknown type, %s, %T", typ.String(), val)) - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/decode.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/decode.go deleted file mode 100644 index 4743393918..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/decode.go +++ /dev/null @@ -1,216 +0,0 @@ -package eventstream - -import ( - "bytes" - "encoding/binary" - "encoding/hex" - "encoding/json" - "fmt" - "hash" - "hash/crc32" - "io" - - "github.com/aws/aws-sdk-go/aws" -) - -// Decoder provides decoding of an Event Stream messages. -type Decoder struct { - r io.Reader - logger aws.Logger -} - -// NewDecoder initializes and returns a Decoder for decoding event -// stream messages from the reader provided. -func NewDecoder(r io.Reader, opts ...func(*Decoder)) *Decoder { - d := &Decoder{ - r: r, - } - - for _, opt := range opts { - opt(d) - } - - return d -} - -// DecodeWithLogger adds a logger to be used by the decoder when decoding -// stream events. -func DecodeWithLogger(logger aws.Logger) func(*Decoder) { - return func(d *Decoder) { - d.logger = logger - } -} - -// Decode attempts to decode a single message from the event stream reader. -// Will return the event stream message, or error if Decode fails to read -// the message from the stream. -func (d *Decoder) Decode(payloadBuf []byte) (m Message, err error) { - reader := d.r - if d.logger != nil { - debugMsgBuf := bytes.NewBuffer(nil) - reader = io.TeeReader(reader, debugMsgBuf) - defer func() { - logMessageDecode(d.logger, debugMsgBuf, m, err) - }() - } - - m, err = Decode(reader, payloadBuf) - - return m, err -} - -// Decode attempts to decode a single message from the event stream reader. -// Will return the event stream message, or error if Decode fails to read -// the message from the reader. -func Decode(reader io.Reader, payloadBuf []byte) (m Message, err error) { - crc := crc32.New(crc32IEEETable) - hashReader := io.TeeReader(reader, crc) - - prelude, err := decodePrelude(hashReader, crc) - if err != nil { - return Message{}, err - } - - if prelude.HeadersLen > 0 { - lr := io.LimitReader(hashReader, int64(prelude.HeadersLen)) - m.Headers, err = decodeHeaders(lr) - if err != nil { - return Message{}, err - } - } - - if payloadLen := prelude.PayloadLen(); payloadLen > 0 { - buf, err := decodePayload(payloadBuf, io.LimitReader(hashReader, int64(payloadLen))) - if err != nil { - return Message{}, err - } - m.Payload = buf - } - - msgCRC := crc.Sum32() - if err := validateCRC(reader, msgCRC); err != nil { - return Message{}, err - } - - return m, nil -} - -func logMessageDecode(logger aws.Logger, msgBuf *bytes.Buffer, msg Message, decodeErr error) { - w := bytes.NewBuffer(nil) - defer func() { logger.Log(w.String()) }() - - fmt.Fprintf(w, "Raw message:\n%s\n", - hex.Dump(msgBuf.Bytes())) - - if decodeErr != nil { - fmt.Fprintf(w, "Decode error: %v\n", decodeErr) - return - } - - rawMsg, err := msg.rawMessage() - if err != nil { - fmt.Fprintf(w, "failed to create raw message, %v\n", err) - return - } - - decodedMsg := decodedMessage{ - rawMessage: rawMsg, - Headers: decodedHeaders(msg.Headers), - } - - fmt.Fprintf(w, "Decoded message:\n") - encoder := json.NewEncoder(w) - if err := encoder.Encode(decodedMsg); err != nil { - fmt.Fprintf(w, "failed to generate decoded message, %v\n", err) - } -} - -func decodePrelude(r io.Reader, crc hash.Hash32) (messagePrelude, error) { - var p messagePrelude - - var err error - p.Length, err = decodeUint32(r) - if err != nil { - return messagePrelude{}, err - } - - p.HeadersLen, err = decodeUint32(r) - if err != nil { - return messagePrelude{}, err - } - - if err := p.ValidateLens(); err != nil { - return messagePrelude{}, err - } - - preludeCRC := crc.Sum32() - if err := validateCRC(r, preludeCRC); err != nil { - return messagePrelude{}, err - } - - p.PreludeCRC = preludeCRC - - return p, nil -} - -func decodePayload(buf []byte, r io.Reader) ([]byte, error) { - w := bytes.NewBuffer(buf[0:0]) - - _, err := io.Copy(w, r) - return w.Bytes(), err -} - -func decodeUint8(r io.Reader) (uint8, error) { - type byteReader interface { - ReadByte() (byte, error) - } - - if br, ok := r.(byteReader); ok { - v, err := br.ReadByte() - return uint8(v), err - } - - var b [1]byte - _, err := io.ReadFull(r, b[:]) - return uint8(b[0]), err -} -func decodeUint16(r io.Reader) (uint16, error) { - var b [2]byte - bs := b[:] - _, err := io.ReadFull(r, bs) - if err != nil { - return 0, err - } - return binary.BigEndian.Uint16(bs), nil -} -func decodeUint32(r io.Reader) (uint32, error) { - var b [4]byte - bs := b[:] - _, err := io.ReadFull(r, bs) - if err != nil { - return 0, err - } - return binary.BigEndian.Uint32(bs), nil -} -func decodeUint64(r io.Reader) (uint64, error) { - var b [8]byte - bs := b[:] - _, err := io.ReadFull(r, bs) - if err != nil { - return 0, err - } - return binary.BigEndian.Uint64(bs), nil -} - -func validateCRC(r io.Reader, expect uint32) error { - msgCRC, err := decodeUint32(r) - if err != nil { - return err - } - - if msgCRC != expect { - return ChecksumError{} - } - - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/encode.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/encode.go deleted file mode 100644 index ffade3bc0c..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/encode.go +++ /dev/null @@ -1,162 +0,0 @@ -package eventstream - -import ( - "bytes" - "encoding/binary" - "encoding/hex" - "encoding/json" - "fmt" - "hash" - "hash/crc32" - "io" - - "github.com/aws/aws-sdk-go/aws" -) - -// Encoder provides EventStream message encoding. -type Encoder struct { - w io.Writer - logger aws.Logger - - headersBuf *bytes.Buffer -} - -// NewEncoder initializes and returns an Encoder to encode Event Stream -// messages to an io.Writer. -func NewEncoder(w io.Writer, opts ...func(*Encoder)) *Encoder { - e := &Encoder{ - w: w, - headersBuf: bytes.NewBuffer(nil), - } - - for _, opt := range opts { - opt(e) - } - - return e -} - -// EncodeWithLogger adds a logger to be used by the encode when decoding -// stream events. -func EncodeWithLogger(logger aws.Logger) func(*Encoder) { - return func(d *Encoder) { - d.logger = logger - } -} - -// Encode encodes a single EventStream message to the io.Writer the Encoder -// was created with. An error is returned if writing the message fails. -func (e *Encoder) Encode(msg Message) (err error) { - e.headersBuf.Reset() - - writer := e.w - if e.logger != nil { - encodeMsgBuf := bytes.NewBuffer(nil) - writer = io.MultiWriter(writer, encodeMsgBuf) - defer func() { - logMessageEncode(e.logger, encodeMsgBuf, msg, err) - }() - } - - if err = EncodeHeaders(e.headersBuf, msg.Headers); err != nil { - return err - } - - crc := crc32.New(crc32IEEETable) - hashWriter := io.MultiWriter(writer, crc) - - headersLen := uint32(e.headersBuf.Len()) - payloadLen := uint32(len(msg.Payload)) - - if err = encodePrelude(hashWriter, crc, headersLen, payloadLen); err != nil { - return err - } - - if headersLen > 0 { - if _, err = io.Copy(hashWriter, e.headersBuf); err != nil { - return err - } - } - - if payloadLen > 0 { - if _, err = hashWriter.Write(msg.Payload); err != nil { - return err - } - } - - msgCRC := crc.Sum32() - return binary.Write(writer, binary.BigEndian, msgCRC) -} - -func logMessageEncode(logger aws.Logger, msgBuf *bytes.Buffer, msg Message, encodeErr error) { - w := bytes.NewBuffer(nil) - defer func() { logger.Log(w.String()) }() - - fmt.Fprintf(w, "Message to encode:\n") - encoder := json.NewEncoder(w) - if err := encoder.Encode(msg); err != nil { - fmt.Fprintf(w, "Failed to get encoded message, %v\n", err) - } - - if encodeErr != nil { - fmt.Fprintf(w, "Encode error: %v\n", encodeErr) - return - } - - fmt.Fprintf(w, "Raw message:\n%s\n", hex.Dump(msgBuf.Bytes())) -} - -func encodePrelude(w io.Writer, crc hash.Hash32, headersLen, payloadLen uint32) error { - p := messagePrelude{ - Length: minMsgLen + headersLen + payloadLen, - HeadersLen: headersLen, - } - if err := p.ValidateLens(); err != nil { - return err - } - - err := binaryWriteFields(w, binary.BigEndian, - p.Length, - p.HeadersLen, - ) - if err != nil { - return err - } - - p.PreludeCRC = crc.Sum32() - err = binary.Write(w, binary.BigEndian, p.PreludeCRC) - if err != nil { - return err - } - - return nil -} - -// EncodeHeaders writes the header values to the writer encoded in the event -// stream format. Returns an error if a header fails to encode. -func EncodeHeaders(w io.Writer, headers Headers) error { - for _, h := range headers { - hn := headerName{ - Len: uint8(len(h.Name)), - } - copy(hn.Name[:hn.Len], h.Name) - if err := hn.encode(w); err != nil { - return err - } - - if err := h.Value.encode(w); err != nil { - return err - } - } - - return nil -} - -func binaryWriteFields(w io.Writer, order binary.ByteOrder, vs ...interface{}) error { - for _, v := range vs { - if err := binary.Write(w, order, v); err != nil { - return err - } - } - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/error.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/error.go deleted file mode 100644 index 5481ef3079..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/error.go +++ /dev/null @@ -1,23 +0,0 @@ -package eventstream - -import "fmt" - -// LengthError provides the error for items being larger than a maximum length. -type LengthError struct { - Part string - Want int - Have int - Value interface{} -} - -func (e LengthError) Error() string { - return fmt.Sprintf("%s length invalid, %d/%d, %v", - e.Part, e.Want, e.Have, e.Value) -} - -// ChecksumError provides the error for message checksum invalidation errors. -type ChecksumError struct{} - -func (e ChecksumError) Error() string { - return "message checksum mismatch" -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/error.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/error.go deleted file mode 100644 index 0a63340e41..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/error.go +++ /dev/null @@ -1,81 +0,0 @@ -package eventstreamapi - -import ( - "fmt" - "sync" -) - -// InputWriterCloseErrorCode is used to denote an error occurred -// while closing the event stream input writer. -const InputWriterCloseErrorCode = "EventStreamInputWriterCloseError" - -type messageError struct { - code string - msg string -} - -func (e messageError) Code() string { - return e.code -} - -func (e messageError) Message() string { - return e.msg -} - -func (e messageError) Error() string { - return fmt.Sprintf("%s: %s", e.code, e.msg) -} - -func (e messageError) OrigErr() error { - return nil -} - -// OnceError wraps the behavior of recording an error -// once and signal on a channel when this has occurred. -// Signaling is done by closing of the channel. -// -// Type is safe for concurrent usage. -type OnceError struct { - mu sync.RWMutex - err error - ch chan struct{} -} - -// NewOnceError return a new OnceError -func NewOnceError() *OnceError { - return &OnceError{ - ch: make(chan struct{}, 1), - } -} - -// Err acquires a read-lock and returns an -// error if one has been set. -func (e *OnceError) Err() error { - e.mu.RLock() - err := e.err - e.mu.RUnlock() - - return err -} - -// SetError acquires a write-lock and will set -// the underlying error value if one has not been set. -func (e *OnceError) SetError(err error) { - if err == nil { - return - } - - e.mu.Lock() - if e.err == nil { - e.err = err - close(e.ch) - } - e.mu.Unlock() -} - -// ErrorSet returns a channel that will be used to signal -// that an error has been set. This channel will be closed -// when the error value has been set for OnceError. -func (e *OnceError) ErrorSet() <-chan struct{} { - return e.ch -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/reader.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/reader.go deleted file mode 100644 index 0e4aa42f3e..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/reader.go +++ /dev/null @@ -1,173 +0,0 @@ -package eventstreamapi - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/eventstream" -) - -// Unmarshaler provides the interface for unmarshaling a EventStream -// message into a SDK type. -type Unmarshaler interface { - UnmarshalEvent(protocol.PayloadUnmarshaler, eventstream.Message) error -} - -// EventReader provides reading from the EventStream of an reader. -type EventReader struct { - decoder *eventstream.Decoder - - unmarshalerForEventType func(string) (Unmarshaler, error) - payloadUnmarshaler protocol.PayloadUnmarshaler - - payloadBuf []byte -} - -// NewEventReader returns a EventReader built from the reader and unmarshaler -// provided. Use ReadStream method to start reading from the EventStream. -func NewEventReader( - decoder *eventstream.Decoder, - payloadUnmarshaler protocol.PayloadUnmarshaler, - unmarshalerForEventType func(string) (Unmarshaler, error), -) *EventReader { - return &EventReader{ - decoder: decoder, - payloadUnmarshaler: payloadUnmarshaler, - unmarshalerForEventType: unmarshalerForEventType, - payloadBuf: make([]byte, 10*1024), - } -} - -// ReadEvent attempts to read a message from the EventStream and return the -// unmarshaled event value that the message is for. -// -// For EventStream API errors check if the returned error satisfies the -// awserr.Error interface to get the error's Code and Message components. -// -// EventUnmarshalers called with EventStream messages must take copies of the -// message's Payload. The payload will is reused between events read. -func (r *EventReader) ReadEvent() (event interface{}, err error) { - msg, err := r.decoder.Decode(r.payloadBuf) - if err != nil { - return nil, err - } - defer func() { - // Reclaim payload buffer for next message read. - r.payloadBuf = msg.Payload[0:0] - }() - - typ, err := GetHeaderString(msg, MessageTypeHeader) - if err != nil { - return nil, err - } - - switch typ { - case EventMessageType: - return r.unmarshalEventMessage(msg) - case ExceptionMessageType: - return nil, r.unmarshalEventException(msg) - case ErrorMessageType: - return nil, r.unmarshalErrorMessage(msg) - default: - return nil, &UnknownMessageTypeError{ - Type: typ, Message: msg.Clone(), - } - } -} - -// UnknownMessageTypeError provides an error when a message is received from -// the stream, but the reader is unable to determine what kind of message it is. -type UnknownMessageTypeError struct { - Type string - Message eventstream.Message -} - -func (e *UnknownMessageTypeError) Error() string { - return "unknown eventstream message type, " + e.Type -} - -func (r *EventReader) unmarshalEventMessage( - msg eventstream.Message, -) (event interface{}, err error) { - eventType, err := GetHeaderString(msg, EventTypeHeader) - if err != nil { - return nil, err - } - - ev, err := r.unmarshalerForEventType(eventType) - if err != nil { - return nil, err - } - - err = ev.UnmarshalEvent(r.payloadUnmarshaler, msg) - if err != nil { - return nil, err - } - - return ev, nil -} - -func (r *EventReader) unmarshalEventException( - msg eventstream.Message, -) (err error) { - eventType, err := GetHeaderString(msg, ExceptionTypeHeader) - if err != nil { - return err - } - - ev, err := r.unmarshalerForEventType(eventType) - if err != nil { - return err - } - - err = ev.UnmarshalEvent(r.payloadUnmarshaler, msg) - if err != nil { - return err - } - - var ok bool - err, ok = ev.(error) - if !ok { - err = messageError{ - code: "SerializationError", - msg: fmt.Sprintf( - "event stream exception %s mapped to non-error %T, %v", - eventType, ev, ev, - ), - } - } - - return err -} - -func (r *EventReader) unmarshalErrorMessage(msg eventstream.Message) (err error) { - var msgErr messageError - - msgErr.code, err = GetHeaderString(msg, ErrorCodeHeader) - if err != nil { - return err - } - - msgErr.msg, err = GetHeaderString(msg, ErrorMessageHeader) - if err != nil { - return err - } - - return msgErr -} - -// GetHeaderString returns the value of the header as a string. If the header -// is not set or the value is not a string an error will be returned. -func GetHeaderString(msg eventstream.Message, headerName string) (string, error) { - headerVal := msg.Headers.Get(headerName) - if headerVal == nil { - return "", fmt.Errorf("error header %s not present", headerName) - } - - v, ok := headerVal.Get().(string) - if !ok { - return "", fmt.Errorf("error header value is not a string, %T", headerVal) - } - - return v, nil -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/shared.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/shared.go deleted file mode 100644 index e46b8acc20..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/shared.go +++ /dev/null @@ -1,23 +0,0 @@ -package eventstreamapi - -// EventStream headers with specific meaning to async API functionality. -const ( - ChunkSignatureHeader = `:chunk-signature` // chunk signature for message - DateHeader = `:date` // Date header for signature - - // Message header and values - MessageTypeHeader = `:message-type` // Identifies type of message. - EventMessageType = `event` - ErrorMessageType = `error` - ExceptionMessageType = `exception` - - // Message Events - EventTypeHeader = `:event-type` // Identifies message event type e.g. "Stats". - - // Message Error - ErrorCodeHeader = `:error-code` - ErrorMessageHeader = `:error-message` - - // Message Exception - ExceptionTypeHeader = `:exception-type` -) diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/signer.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/signer.go deleted file mode 100644 index 3a7ba5cd57..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/signer.go +++ /dev/null @@ -1,123 +0,0 @@ -package eventstreamapi - -import ( - "bytes" - "strings" - "time" - - "github.com/aws/aws-sdk-go/private/protocol/eventstream" -) - -var timeNow = time.Now - -// StreamSigner defines an interface for the implementation of signing of event stream payloads -type StreamSigner interface { - GetSignature(headers, payload []byte, date time.Time) ([]byte, error) -} - -// SignEncoder envelopes event stream messages -// into an event stream message payload with included -// signature headers using the provided signer and encoder. -type SignEncoder struct { - signer StreamSigner - encoder Encoder - bufEncoder *BufferEncoder - - closeErr error - closed bool -} - -// NewSignEncoder returns a new SignEncoder using the provided stream signer and -// event stream encoder. -func NewSignEncoder(signer StreamSigner, encoder Encoder) *SignEncoder { - // TODO: Need to pass down logging - - return &SignEncoder{ - signer: signer, - encoder: encoder, - bufEncoder: NewBufferEncoder(), - } -} - -// Close encodes a final event stream signing envelope with an empty event stream -// payload. This final end-frame is used to mark the conclusion of the stream. -func (s *SignEncoder) Close() error { - if s.closed { - return s.closeErr - } - - if err := s.encode([]byte{}); err != nil { - if strings.Contains(err.Error(), "on closed pipe") { - return nil - } - - s.closeErr = err - s.closed = true - return s.closeErr - } - - return nil -} - -// Encode takes the provided message and add envelopes the message -// with the required signature. -func (s *SignEncoder) Encode(msg eventstream.Message) error { - payload, err := s.bufEncoder.Encode(msg) - if err != nil { - return err - } - - return s.encode(payload) -} - -func (s SignEncoder) encode(payload []byte) error { - date := timeNow() - - var msg eventstream.Message - msg.Headers.Set(DateHeader, eventstream.TimestampValue(date)) - msg.Payload = payload - - var headers bytes.Buffer - if err := eventstream.EncodeHeaders(&headers, msg.Headers); err != nil { - return err - } - - sig, err := s.signer.GetSignature(headers.Bytes(), msg.Payload, date) - if err != nil { - return err - } - - msg.Headers.Set(ChunkSignatureHeader, eventstream.BytesValue(sig)) - - return s.encoder.Encode(msg) -} - -// BufferEncoder is a utility that provides a buffered -// event stream encoder -type BufferEncoder struct { - encoder Encoder - buffer *bytes.Buffer -} - -// NewBufferEncoder returns a new BufferEncoder initialized -// with a 1024 byte buffer. -func NewBufferEncoder() *BufferEncoder { - buf := bytes.NewBuffer(make([]byte, 1024)) - return &BufferEncoder{ - encoder: eventstream.NewEncoder(buf), - buffer: buf, - } -} - -// Encode returns the encoded message as a byte slice. -// The returned byte slice will be modified on the next encode call -// and should not be held onto. -func (e *BufferEncoder) Encode(msg eventstream.Message) ([]byte, error) { - e.buffer.Reset() - - if err := e.encoder.Encode(msg); err != nil { - return nil, err - } - - return e.buffer.Bytes(), nil -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/stream_writer.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/stream_writer.go deleted file mode 100644 index 433bb1630a..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/stream_writer.go +++ /dev/null @@ -1,129 +0,0 @@ -package eventstreamapi - -import ( - "fmt" - "io" - "sync" - - "github.com/aws/aws-sdk-go/aws" -) - -// StreamWriter provides concurrent safe writing to an event stream. -type StreamWriter struct { - eventWriter *EventWriter - stream chan eventWriteAsyncReport - - done chan struct{} - closeOnce sync.Once - err *OnceError - - streamCloser io.Closer -} - -// NewStreamWriter returns a StreamWriter for the event writer, and stream -// closer provided. -func NewStreamWriter(eventWriter *EventWriter, streamCloser io.Closer) *StreamWriter { - w := &StreamWriter{ - eventWriter: eventWriter, - streamCloser: streamCloser, - stream: make(chan eventWriteAsyncReport), - done: make(chan struct{}), - err: NewOnceError(), - } - go w.writeStream() - - return w -} - -// Close terminates the writers ability to write new events to the stream. Any -// future call to Send will fail with an error. -func (w *StreamWriter) Close() error { - w.closeOnce.Do(w.safeClose) - return w.Err() -} - -func (w *StreamWriter) safeClose() { - close(w.done) -} - -// ErrorSet returns a channel which will be closed -// if an error occurs. -func (w *StreamWriter) ErrorSet() <-chan struct{} { - return w.err.ErrorSet() -} - -// Err returns any error that occurred while attempting to write an event to the -// stream. -func (w *StreamWriter) Err() error { - return w.err.Err() -} - -// Send writes a single event to the stream returning an error if the write -// failed. -// -// Send may be called concurrently. Events will be written to the stream -// safely. -func (w *StreamWriter) Send(ctx aws.Context, event Marshaler) error { - if err := w.Err(); err != nil { - return err - } - - resultCh := make(chan error) - wrapped := eventWriteAsyncReport{ - Event: event, - Result: resultCh, - } - - select { - case w.stream <- wrapped: - case <-ctx.Done(): - return ctx.Err() - case <-w.done: - return fmt.Errorf("stream closed, unable to send event") - } - - select { - case err := <-resultCh: - return err - case <-ctx.Done(): - return ctx.Err() - case <-w.done: - return fmt.Errorf("stream closed, unable to send event") - } -} - -func (w *StreamWriter) writeStream() { - defer w.Close() - - for { - select { - case wrapper := <-w.stream: - err := w.eventWriter.WriteEvent(wrapper.Event) - wrapper.ReportResult(w.done, err) - if err != nil { - w.err.SetError(err) - return - } - - case <-w.done: - if err := w.streamCloser.Close(); err != nil { - w.err.SetError(err) - } - return - } - } -} - -type eventWriteAsyncReport struct { - Event Marshaler - Result chan<- error -} - -func (e eventWriteAsyncReport) ReportResult(cancel <-chan struct{}, err error) bool { - select { - case e.Result <- err: - return true - case <-cancel: - return false - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/transport.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/transport.go deleted file mode 100644 index 4bf2b27b2b..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/transport.go +++ /dev/null @@ -1,10 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -package eventstreamapi - -import "github.com/aws/aws-sdk-go/aws/request" - -// ApplyHTTPTransportFixes is a no-op for Go 1.18 and above. -func ApplyHTTPTransportFixes(r *request.Request) { -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/transport_go1.17.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/transport_go1.17.go deleted file mode 100644 index 2ee2c36fd3..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/transport_go1.17.go +++ /dev/null @@ -1,19 +0,0 @@ -//go:build !go1.18 -// +build !go1.18 - -package eventstreamapi - -import "github.com/aws/aws-sdk-go/aws/request" - -// ApplyHTTPTransportFixes applies fixes to the HTTP request for proper event -// stream functionality. Go 1.15 through 1.17 HTTP client could hang forever -// when an HTTP/2 connection failed with an non-200 status code and err. Using -// Expect 100-Continue, allows the HTTP client to gracefully handle the non-200 -// status code, and close the connection. -// -// This is a no-op for Go 1.18 and above. -func ApplyHTTPTransportFixes(r *request.Request) { - r.Handlers.Sign.PushBack(func(r *request.Request) { - r.HTTPRequest.Header.Set("Expect", "100-Continue") - }) -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/writer.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/writer.go deleted file mode 100644 index 7d7a793528..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/writer.go +++ /dev/null @@ -1,63 +0,0 @@ -package eventstreamapi - -import ( - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/eventstream" -) - -// Marshaler provides a marshaling interface for event types to event stream -// messages. -type Marshaler interface { - MarshalEvent(protocol.PayloadMarshaler) (eventstream.Message, error) -} - -// Encoder is an stream encoder that will encode an event stream message for -// the transport. -type Encoder interface { - Encode(eventstream.Message) error -} - -// EventWriter provides a wrapper around the underlying event stream encoder -// for an io.WriteCloser. -type EventWriter struct { - encoder Encoder - payloadMarshaler protocol.PayloadMarshaler - eventTypeFor func(Marshaler) (string, error) -} - -// NewEventWriter returns a new event stream writer, that will write to the -// writer provided. Use the WriteEvent method to write an event to the stream. -func NewEventWriter(encoder Encoder, pm protocol.PayloadMarshaler, eventTypeFor func(Marshaler) (string, error), -) *EventWriter { - return &EventWriter{ - encoder: encoder, - payloadMarshaler: pm, - eventTypeFor: eventTypeFor, - } -} - -// WriteEvent writes an event to the stream. Returns an error if the event -// fails to marshal into a message, or writing to the underlying writer fails. -func (w *EventWriter) WriteEvent(event Marshaler) error { - msg, err := w.marshal(event) - if err != nil { - return err - } - - return w.encoder.Encode(msg) -} - -func (w *EventWriter) marshal(event Marshaler) (eventstream.Message, error) { - eventType, err := w.eventTypeFor(event) - if err != nil { - return eventstream.Message{}, err - } - - msg, err := event.MarshalEvent(w.payloadMarshaler) - if err != nil { - return eventstream.Message{}, err - } - - msg.Headers.Set(EventTypeHeader, eventstream.StringValue(eventType)) - return msg, nil -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header.go deleted file mode 100644 index f6f8c5674e..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header.go +++ /dev/null @@ -1,175 +0,0 @@ -package eventstream - -import ( - "encoding/binary" - "fmt" - "io" -) - -// Headers are a collection of EventStream header values. -type Headers []Header - -// Header is a single EventStream Key Value header pair. -type Header struct { - Name string - Value Value -} - -// Set associates the name with a value. If the header name already exists in -// the Headers the value will be replaced with the new one. -func (hs *Headers) Set(name string, value Value) { - var i int - for ; i < len(*hs); i++ { - if (*hs)[i].Name == name { - (*hs)[i].Value = value - return - } - } - - *hs = append(*hs, Header{ - Name: name, Value: value, - }) -} - -// Get returns the Value associated with the header. Nil is returned if the -// value does not exist. -func (hs Headers) Get(name string) Value { - for i := 0; i < len(hs); i++ { - if h := hs[i]; h.Name == name { - return h.Value - } - } - return nil -} - -// Del deletes the value in the Headers if it exists. -func (hs *Headers) Del(name string) { - for i := 0; i < len(*hs); i++ { - if (*hs)[i].Name == name { - copy((*hs)[i:], (*hs)[i+1:]) - (*hs) = (*hs)[:len(*hs)-1] - } - } -} - -// Clone returns a deep copy of the headers -func (hs Headers) Clone() Headers { - o := make(Headers, 0, len(hs)) - for _, h := range hs { - o.Set(h.Name, h.Value) - } - return o -} - -func decodeHeaders(r io.Reader) (Headers, error) { - hs := Headers{} - - for { - name, err := decodeHeaderName(r) - if err != nil { - if err == io.EOF { - // EOF while getting header name means no more headers - break - } - return nil, err - } - - value, err := decodeHeaderValue(r) - if err != nil { - return nil, err - } - - hs.Set(name, value) - } - - return hs, nil -} - -func decodeHeaderName(r io.Reader) (string, error) { - var n headerName - - var err error - n.Len, err = decodeUint8(r) - if err != nil { - return "", err - } - - name := n.Name[:n.Len] - if _, err := io.ReadFull(r, name); err != nil { - return "", err - } - - return string(name), nil -} - -func decodeHeaderValue(r io.Reader) (Value, error) { - var raw rawValue - - typ, err := decodeUint8(r) - if err != nil { - return nil, err - } - raw.Type = valueType(typ) - - var v Value - - switch raw.Type { - case trueValueType: - v = BoolValue(true) - case falseValueType: - v = BoolValue(false) - case int8ValueType: - var tv Int8Value - err = tv.decode(r) - v = tv - case int16ValueType: - var tv Int16Value - err = tv.decode(r) - v = tv - case int32ValueType: - var tv Int32Value - err = tv.decode(r) - v = tv - case int64ValueType: - var tv Int64Value - err = tv.decode(r) - v = tv - case bytesValueType: - var tv BytesValue - err = tv.decode(r) - v = tv - case stringValueType: - var tv StringValue - err = tv.decode(r) - v = tv - case timestampValueType: - var tv TimestampValue - err = tv.decode(r) - v = tv - case uuidValueType: - var tv UUIDValue - err = tv.decode(r) - v = tv - default: - panic(fmt.Sprintf("unknown value type %d", raw.Type)) - } - - // Error could be EOF, let caller deal with it - return v, err -} - -const maxHeaderNameLen = 255 - -type headerName struct { - Len uint8 - Name [maxHeaderNameLen]byte -} - -func (v headerName) encode(w io.Writer) error { - if err := binary.Write(w, binary.BigEndian, v.Len); err != nil { - return err - } - - _, err := w.Write(v.Name[:v.Len]) - return err -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header_value.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header_value.go deleted file mode 100644 index 9f509d8f6d..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header_value.go +++ /dev/null @@ -1,506 +0,0 @@ -package eventstream - -import ( - "encoding/base64" - "encoding/binary" - "fmt" - "io" - "strconv" - "time" -) - -const maxHeaderValueLen = 1<<15 - 1 // 2^15-1 or 32KB - 1 - -// valueType is the EventStream header value type. -type valueType uint8 - -// Header value types -const ( - trueValueType valueType = iota - falseValueType - int8ValueType // Byte - int16ValueType // Short - int32ValueType // Integer - int64ValueType // Long - bytesValueType - stringValueType - timestampValueType - uuidValueType -) - -func (t valueType) String() string { - switch t { - case trueValueType: - return "bool" - case falseValueType: - return "bool" - case int8ValueType: - return "int8" - case int16ValueType: - return "int16" - case int32ValueType: - return "int32" - case int64ValueType: - return "int64" - case bytesValueType: - return "byte_array" - case stringValueType: - return "string" - case timestampValueType: - return "timestamp" - case uuidValueType: - return "uuid" - default: - return fmt.Sprintf("unknown value type %d", uint8(t)) - } -} - -type rawValue struct { - Type valueType - Len uint16 // Only set for variable length slices - Value []byte // byte representation of value, BigEndian encoding. -} - -func (r rawValue) encodeScalar(w io.Writer, v interface{}) error { - return binaryWriteFields(w, binary.BigEndian, - r.Type, - v, - ) -} - -func (r rawValue) encodeFixedSlice(w io.Writer, v []byte) error { - binary.Write(w, binary.BigEndian, r.Type) - - _, err := w.Write(v) - return err -} - -func (r rawValue) encodeBytes(w io.Writer, v []byte) error { - if len(v) > maxHeaderValueLen { - return LengthError{ - Part: "header value", - Want: maxHeaderValueLen, Have: len(v), - Value: v, - } - } - r.Len = uint16(len(v)) - - err := binaryWriteFields(w, binary.BigEndian, - r.Type, - r.Len, - ) - if err != nil { - return err - } - - _, err = w.Write(v) - return err -} - -func (r rawValue) encodeString(w io.Writer, v string) error { - if len(v) > maxHeaderValueLen { - return LengthError{ - Part: "header value", - Want: maxHeaderValueLen, Have: len(v), - Value: v, - } - } - r.Len = uint16(len(v)) - - type stringWriter interface { - WriteString(string) (int, error) - } - - err := binaryWriteFields(w, binary.BigEndian, - r.Type, - r.Len, - ) - if err != nil { - return err - } - - if sw, ok := w.(stringWriter); ok { - _, err = sw.WriteString(v) - } else { - _, err = w.Write([]byte(v)) - } - - return err -} - -func decodeFixedBytesValue(r io.Reader, buf []byte) error { - _, err := io.ReadFull(r, buf) - return err -} - -func decodeBytesValue(r io.Reader) ([]byte, error) { - var raw rawValue - var err error - raw.Len, err = decodeUint16(r) - if err != nil { - return nil, err - } - - buf := make([]byte, raw.Len) - _, err = io.ReadFull(r, buf) - if err != nil { - return nil, err - } - - return buf, nil -} - -func decodeStringValue(r io.Reader) (string, error) { - v, err := decodeBytesValue(r) - return string(v), err -} - -// Value represents the abstract header value. -type Value interface { - Get() interface{} - String() string - valueType() valueType - encode(io.Writer) error -} - -// An BoolValue provides eventstream encoding, and representation -// of a Go bool value. -type BoolValue bool - -// Get returns the underlying type -func (v BoolValue) Get() interface{} { - return bool(v) -} - -// valueType returns the EventStream header value type value. -func (v BoolValue) valueType() valueType { - if v { - return trueValueType - } - return falseValueType -} - -func (v BoolValue) String() string { - return strconv.FormatBool(bool(v)) -} - -// encode encodes the BoolValue into an eventstream binary value -// representation. -func (v BoolValue) encode(w io.Writer) error { - return binary.Write(w, binary.BigEndian, v.valueType()) -} - -// An Int8Value provides eventstream encoding, and representation of a Go -// int8 value. -type Int8Value int8 - -// Get returns the underlying value. -func (v Int8Value) Get() interface{} { - return int8(v) -} - -// valueType returns the EventStream header value type value. -func (Int8Value) valueType() valueType { - return int8ValueType -} - -func (v Int8Value) String() string { - return fmt.Sprintf("0x%02x", int8(v)) -} - -// encode encodes the Int8Value into an eventstream binary value -// representation. -func (v Int8Value) encode(w io.Writer) error { - raw := rawValue{ - Type: v.valueType(), - } - - return raw.encodeScalar(w, v) -} - -func (v *Int8Value) decode(r io.Reader) error { - n, err := decodeUint8(r) - if err != nil { - return err - } - - *v = Int8Value(n) - return nil -} - -// An Int16Value provides eventstream encoding, and representation of a Go -// int16 value. -type Int16Value int16 - -// Get returns the underlying value. -func (v Int16Value) Get() interface{} { - return int16(v) -} - -// valueType returns the EventStream header value type value. -func (Int16Value) valueType() valueType { - return int16ValueType -} - -func (v Int16Value) String() string { - return fmt.Sprintf("0x%04x", int16(v)) -} - -// encode encodes the Int16Value into an eventstream binary value -// representation. -func (v Int16Value) encode(w io.Writer) error { - raw := rawValue{ - Type: v.valueType(), - } - return raw.encodeScalar(w, v) -} - -func (v *Int16Value) decode(r io.Reader) error { - n, err := decodeUint16(r) - if err != nil { - return err - } - - *v = Int16Value(n) - return nil -} - -// An Int32Value provides eventstream encoding, and representation of a Go -// int32 value. -type Int32Value int32 - -// Get returns the underlying value. -func (v Int32Value) Get() interface{} { - return int32(v) -} - -// valueType returns the EventStream header value type value. -func (Int32Value) valueType() valueType { - return int32ValueType -} - -func (v Int32Value) String() string { - return fmt.Sprintf("0x%08x", int32(v)) -} - -// encode encodes the Int32Value into an eventstream binary value -// representation. -func (v Int32Value) encode(w io.Writer) error { - raw := rawValue{ - Type: v.valueType(), - } - return raw.encodeScalar(w, v) -} - -func (v *Int32Value) decode(r io.Reader) error { - n, err := decodeUint32(r) - if err != nil { - return err - } - - *v = Int32Value(n) - return nil -} - -// An Int64Value provides eventstream encoding, and representation of a Go -// int64 value. -type Int64Value int64 - -// Get returns the underlying value. -func (v Int64Value) Get() interface{} { - return int64(v) -} - -// valueType returns the EventStream header value type value. -func (Int64Value) valueType() valueType { - return int64ValueType -} - -func (v Int64Value) String() string { - return fmt.Sprintf("0x%016x", int64(v)) -} - -// encode encodes the Int64Value into an eventstream binary value -// representation. -func (v Int64Value) encode(w io.Writer) error { - raw := rawValue{ - Type: v.valueType(), - } - return raw.encodeScalar(w, v) -} - -func (v *Int64Value) decode(r io.Reader) error { - n, err := decodeUint64(r) - if err != nil { - return err - } - - *v = Int64Value(n) - return nil -} - -// An BytesValue provides eventstream encoding, and representation of a Go -// byte slice. -type BytesValue []byte - -// Get returns the underlying value. -func (v BytesValue) Get() interface{} { - return []byte(v) -} - -// valueType returns the EventStream header value type value. -func (BytesValue) valueType() valueType { - return bytesValueType -} - -func (v BytesValue) String() string { - return base64.StdEncoding.EncodeToString([]byte(v)) -} - -// encode encodes the BytesValue into an eventstream binary value -// representation. -func (v BytesValue) encode(w io.Writer) error { - raw := rawValue{ - Type: v.valueType(), - } - - return raw.encodeBytes(w, []byte(v)) -} - -func (v *BytesValue) decode(r io.Reader) error { - buf, err := decodeBytesValue(r) - if err != nil { - return err - } - - *v = BytesValue(buf) - return nil -} - -// An StringValue provides eventstream encoding, and representation of a Go -// string. -type StringValue string - -// Get returns the underlying value. -func (v StringValue) Get() interface{} { - return string(v) -} - -// valueType returns the EventStream header value type value. -func (StringValue) valueType() valueType { - return stringValueType -} - -func (v StringValue) String() string { - return string(v) -} - -// encode encodes the StringValue into an eventstream binary value -// representation. -func (v StringValue) encode(w io.Writer) error { - raw := rawValue{ - Type: v.valueType(), - } - - return raw.encodeString(w, string(v)) -} - -func (v *StringValue) decode(r io.Reader) error { - s, err := decodeStringValue(r) - if err != nil { - return err - } - - *v = StringValue(s) - return nil -} - -// An TimestampValue provides eventstream encoding, and representation of a Go -// timestamp. -type TimestampValue time.Time - -// Get returns the underlying value. -func (v TimestampValue) Get() interface{} { - return time.Time(v) -} - -// valueType returns the EventStream header value type value. -func (TimestampValue) valueType() valueType { - return timestampValueType -} - -func (v TimestampValue) epochMilli() int64 { - nano := time.Time(v).UnixNano() - msec := nano / int64(time.Millisecond) - return msec -} - -func (v TimestampValue) String() string { - msec := v.epochMilli() - return strconv.FormatInt(msec, 10) -} - -// encode encodes the TimestampValue into an eventstream binary value -// representation. -func (v TimestampValue) encode(w io.Writer) error { - raw := rawValue{ - Type: v.valueType(), - } - - msec := v.epochMilli() - return raw.encodeScalar(w, msec) -} - -func (v *TimestampValue) decode(r io.Reader) error { - n, err := decodeUint64(r) - if err != nil { - return err - } - - *v = TimestampValue(timeFromEpochMilli(int64(n))) - return nil -} - -// MarshalJSON implements the json.Marshaler interface -func (v TimestampValue) MarshalJSON() ([]byte, error) { - return []byte(v.String()), nil -} - -func timeFromEpochMilli(t int64) time.Time { - secs := t / 1e3 - msec := t % 1e3 - return time.Unix(secs, msec*int64(time.Millisecond)).UTC() -} - -// An UUIDValue provides eventstream encoding, and representation of a UUID -// value. -type UUIDValue [16]byte - -// Get returns the underlying value. -func (v UUIDValue) Get() interface{} { - return v[:] -} - -// valueType returns the EventStream header value type value. -func (UUIDValue) valueType() valueType { - return uuidValueType -} - -func (v UUIDValue) String() string { - return fmt.Sprintf(`%X-%X-%X-%X-%X`, v[0:4], v[4:6], v[6:8], v[8:10], v[10:]) -} - -// encode encodes the UUIDValue into an eventstream binary value -// representation. -func (v UUIDValue) encode(w io.Writer) error { - raw := rawValue{ - Type: v.valueType(), - } - - return raw.encodeFixedSlice(w, v[:]) -} - -func (v *UUIDValue) decode(r io.Reader) error { - tv := (*v)[:] - return decodeFixedBytesValue(r, tv) -} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/message.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/message.go deleted file mode 100644 index f7427da039..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/message.go +++ /dev/null @@ -1,117 +0,0 @@ -package eventstream - -import ( - "bytes" - "encoding/binary" - "hash/crc32" -) - -const preludeLen = 8 -const preludeCRCLen = 4 -const msgCRCLen = 4 -const minMsgLen = preludeLen + preludeCRCLen + msgCRCLen -const maxPayloadLen = 1024 * 1024 * 16 // 16MB -const maxHeadersLen = 1024 * 128 // 128KB -const maxMsgLen = minMsgLen + maxHeadersLen + maxPayloadLen - -var crc32IEEETable = crc32.MakeTable(crc32.IEEE) - -// A Message provides the eventstream message representation. -type Message struct { - Headers Headers - Payload []byte -} - -func (m *Message) rawMessage() (rawMessage, error) { - var raw rawMessage - - if len(m.Headers) > 0 { - var headers bytes.Buffer - if err := EncodeHeaders(&headers, m.Headers); err != nil { - return rawMessage{}, err - } - raw.Headers = headers.Bytes() - raw.HeadersLen = uint32(len(raw.Headers)) - } - - raw.Length = raw.HeadersLen + uint32(len(m.Payload)) + minMsgLen - - hash := crc32.New(crc32IEEETable) - binaryWriteFields(hash, binary.BigEndian, raw.Length, raw.HeadersLen) - raw.PreludeCRC = hash.Sum32() - - binaryWriteFields(hash, binary.BigEndian, raw.PreludeCRC) - - if raw.HeadersLen > 0 { - hash.Write(raw.Headers) - } - - // Read payload bytes and update hash for it as well. - if len(m.Payload) > 0 { - raw.Payload = m.Payload - hash.Write(raw.Payload) - } - - raw.CRC = hash.Sum32() - - return raw, nil -} - -// Clone returns a deep copy of the message. -func (m Message) Clone() Message { - var payload []byte - if m.Payload != nil { - payload = make([]byte, len(m.Payload)) - copy(payload, m.Payload) - } - - return Message{ - Headers: m.Headers.Clone(), - Payload: payload, - } -} - -type messagePrelude struct { - Length uint32 - HeadersLen uint32 - PreludeCRC uint32 -} - -func (p messagePrelude) PayloadLen() uint32 { - return p.Length - p.HeadersLen - minMsgLen -} - -func (p messagePrelude) ValidateLens() error { - if p.Length == 0 || p.Length > maxMsgLen { - return LengthError{ - Part: "message prelude", - Want: maxMsgLen, - Have: int(p.Length), - } - } - if p.HeadersLen > maxHeadersLen { - return LengthError{ - Part: "message headers", - Want: maxHeadersLen, - Have: int(p.HeadersLen), - } - } - if payloadLen := p.PayloadLen(); payloadLen > maxPayloadLen { - return LengthError{ - Part: "message payload", - Want: maxPayloadLen, - Have: int(payloadLen), - } - } - - return nil -} - -type rawMessage struct { - messagePrelude - - Headers []byte - Payload []byte - - CRC uint32 -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go deleted file mode 100644 index d7037d7dfe..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go +++ /dev/null @@ -1,37310 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudfront - -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/restxml" -) - -const opAssociateAlias = "AssociateAlias2020_05_31" - -// AssociateAliasRequest generates a "aws/request.Request" representing the -// client's request for the AssociateAlias 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 AssociateAlias for more information on using the AssociateAlias -// 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 AssociateAliasRequest method. -// req, resp := client.AssociateAliasRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/AssociateAlias -func (c *CloudFront) AssociateAliasRequest(input *AssociateAliasInput) (req *request.Request, output *AssociateAliasOutput) { - op := &request.Operation{ - Name: opAssociateAlias, - HTTPMethod: "PUT", - HTTPPath: "/2020-05-31/distribution/{TargetDistributionId}/associate-alias", - } - - if input == nil { - input = &AssociateAliasInput{} - } - - output = &AssociateAliasOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AssociateAlias API operation for Amazon CloudFront. -// -// Associates an alias (also known as a CNAME or an alternate domain name) with -// a CloudFront distribution. -// -// With this operation you can move an alias that's already in use on a CloudFront -// distribution to a different distribution in one step. This prevents the downtime -// that could occur if you first remove the alias from one distribution and -// then separately add the alias to another distribution. -// -// To use this operation to associate an alias with a distribution, you provide -// the alias and the ID of the target distribution for the alias. For more information, -// including how to set up the target distribution, prerequisites that you must -// complete, and other restrictions, see Moving an alternate domain name to -// a different distribution (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html#alternate-domain-names-move) -// in the Amazon CloudFront Developer 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 CloudFront's -// API operation AssociateAlias for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeNoSuchDistribution "NoSuchDistribution" -// The specified distribution does not exist. -// -// - ErrCodeTooManyDistributionCNAMEs "TooManyDistributionCNAMEs" -// Your request contains more CNAMEs than are allowed per distribution. -// -// - ErrCodeIllegalUpdate "IllegalUpdate" -// The update contains modifications that are not allowed. -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/AssociateAlias -func (c *CloudFront) AssociateAlias(input *AssociateAliasInput) (*AssociateAliasOutput, error) { - req, out := c.AssociateAliasRequest(input) - return out, req.Send() -} - -// AssociateAliasWithContext is the same as AssociateAlias with the addition of -// the ability to pass a context and additional request options. -// -// See AssociateAlias 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 *CloudFront) AssociateAliasWithContext(ctx aws.Context, input *AssociateAliasInput, opts ...request.Option) (*AssociateAliasOutput, error) { - req, out := c.AssociateAliasRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCopyDistribution = "CopyDistribution2020_05_31" - -// CopyDistributionRequest generates a "aws/request.Request" representing the -// client's request for the CopyDistribution 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 CopyDistribution for more information on using the CopyDistribution -// 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 CopyDistributionRequest method. -// req, resp := client.CopyDistributionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CopyDistribution -func (c *CloudFront) CopyDistributionRequest(input *CopyDistributionInput) (req *request.Request, output *CopyDistributionOutput) { - op := &request.Operation{ - Name: opCopyDistribution, - HTTPMethod: "POST", - HTTPPath: "/2020-05-31/distribution/{PrimaryDistributionId}/copy", - } - - if input == nil { - input = &CopyDistributionInput{} - } - - output = &CopyDistributionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CopyDistribution API operation for Amazon CloudFront. -// -// Creates a staging distribution using the configuration of the provided primary -// distribution. A staging distribution is a copy of an existing distribution -// (called the primary distribution) that you can use in a continuous deployment -// workflow. -// -// After you create a staging distribution, you can use UpdateDistribution to -// modify the staging distribution's configuration. Then you can use CreateContinuousDeploymentPolicy -// to incrementally move traffic to the staging distribution. -// -// This API operation requires the following IAM permissions: -// -// - GetDistribution (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_GetDistribution.html) -// -// - CreateDistribution (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_CreateDistribution.html) -// -// - CopyDistribution (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_CopyDistribution.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 CloudFront's -// API operation CopyDistribution for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeCNAMEAlreadyExists "CNAMEAlreadyExists" -// The CNAME specified is already defined for CloudFront. -// -// - ErrCodeDistributionAlreadyExists "DistributionAlreadyExists" -// The caller reference you attempted to create the distribution with is associated -// with another distribution. -// -// - ErrCodeInvalidOrigin "InvalidOrigin" -// The Amazon S3 origin server specified does not refer to a valid Amazon S3 -// bucket. -// -// - ErrCodeInvalidOriginAccessIdentity "InvalidOriginAccessIdentity" -// The origin access identity is not valid or doesn't exist. -// -// - ErrCodeInvalidOriginAccessControl "InvalidOriginAccessControl" -// The origin access control is not valid. -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeNoSuchDistribution "NoSuchDistribution" -// The specified distribution does not exist. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeTooManyTrustedSigners "TooManyTrustedSigners" -// Your request contains more trusted signers than are allowed per distribution. -// -// - ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist" -// One or more of your trusted signers don't exist. -// -// - ErrCodeInvalidViewerCertificate "InvalidViewerCertificate" -// A viewer certificate specified is not valid. -// -// - ErrCodeInvalidMinimumProtocolVersion "InvalidMinimumProtocolVersion" -// The minimum protocol version specified is not valid. -// -// - ErrCodeMissingBody "MissingBody" -// This operation requires a body. Ensure that the body is present and the Content-Type -// header is set. -// -// - ErrCodeTooManyDistributionCNAMEs "TooManyDistributionCNAMEs" -// Your request contains more CNAMEs than are allowed per distribution. -// -// - ErrCodeTooManyDistributions "TooManyDistributions" -// Processing your request would cause you to exceed the maximum number of distributions -// allowed. -// -// - ErrCodeInvalidDefaultRootObject "InvalidDefaultRootObject" -// The default root object file name is too big or contains an invalid character. -// -// - ErrCodeInvalidRelativePath "InvalidRelativePath" -// The relative path is too big, is not URL-encoded, or does not begin with -// a slash (/). -// -// - ErrCodeInvalidErrorCode "InvalidErrorCode" -// An invalid error code was specified. -// -// - ErrCodeInvalidResponseCode "InvalidResponseCode" -// A response code is not valid. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeInvalidRequiredProtocol "InvalidRequiredProtocol" -// This operation requires the HTTPS protocol. Ensure that you specify the HTTPS -// protocol in your request, or omit the RequiredProtocols element from your -// distribution configuration. -// -// - ErrCodeNoSuchOrigin "NoSuchOrigin" -// No origin exists with the specified Origin Id. -// -// - ErrCodeTooManyOrigins "TooManyOrigins" -// You cannot create more origins for the distribution. -// -// - ErrCodeTooManyOriginGroupsPerDistribution "TooManyOriginGroupsPerDistribution" -// Processing your request would cause you to exceed the maximum number of origin -// groups allowed. -// -// - ErrCodeTooManyCacheBehaviors "TooManyCacheBehaviors" -// You cannot create more cache behaviors for the distribution. -// -// - ErrCodeTooManyCookieNamesInWhiteList "TooManyCookieNamesInWhiteList" -// Your request contains more cookie names in the whitelist than are allowed -// per cache behavior. -// -// - ErrCodeInvalidForwardCookies "InvalidForwardCookies" -// Your request contains forward cookies option which doesn't match with the -// expectation for the whitelisted list of cookie names. Either list of cookie -// names has been specified when not allowed or list of cookie names is missing -// when expected. -// -// - ErrCodeTooManyHeadersInForwardedValues "TooManyHeadersInForwardedValues" -// Your request contains too many headers in forwarded values. -// -// - ErrCodeInvalidHeadersForS3Origin "InvalidHeadersForS3Origin" -// The headers specified are not valid for an Amazon S3 origin. -// -// - ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// - ErrCodeTooManyCertificates "TooManyCertificates" -// You cannot create anymore custom SSL/TLS certificates. -// -// - ErrCodeInvalidLocationCode "InvalidLocationCode" -// The location code specified is not valid. -// -// - ErrCodeInvalidGeoRestrictionParameter "InvalidGeoRestrictionParameter" -// The specified geo restriction parameter is not valid. -// -// - ErrCodeInvalidProtocolSettings "InvalidProtocolSettings" -// You cannot specify SSLv3 as the minimum protocol version if you only want -// to support only clients that support Server Name Indication (SNI). -// -// - ErrCodeInvalidTTLOrder "InvalidTTLOrder" -// The TTL order specified is not valid. -// -// - ErrCodeInvalidWebACLId "InvalidWebACLId" -// A web ACL ID specified is not valid. To specify a web ACL created using the -// latest version of WAF, use the ACL ARN, for example arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a. -// To specify a web ACL created using WAF Classic, use the ACL ID, for example -// 473e64fd-f30b-4765-81a0-62ad96dd167a. -// -// - ErrCodeTooManyOriginCustomHeaders "TooManyOriginCustomHeaders" -// Your request contains too many origin custom headers. -// -// - ErrCodeTooManyQueryStringParameters "TooManyQueryStringParameters" -// Your request contains too many query string parameters. -// -// - ErrCodeInvalidQueryStringParameters "InvalidQueryStringParameters" -// The query string parameters specified are not valid. -// -// - ErrCodeTooManyDistributionsWithLambdaAssociations "TooManyDistributionsWithLambdaAssociations" -// Processing your request would cause the maximum number of distributions with -// Lambda@Edge function associations per owner to be exceeded. -// -// - ErrCodeTooManyDistributionsWithSingleFunctionARN "TooManyDistributionsWithSingleFunctionARN" -// The maximum number of distributions have been associated with the specified -// Lambda@Edge function. -// -// - ErrCodeTooManyLambdaFunctionAssociations "TooManyLambdaFunctionAssociations" -// Your request contains more Lambda@Edge function associations than are allowed -// per distribution. -// -// - ErrCodeInvalidLambdaFunctionAssociation "InvalidLambdaFunctionAssociation" -// The specified Lambda@Edge function association is invalid. -// -// - ErrCodeTooManyDistributionsWithFunctionAssociations "TooManyDistributionsWithFunctionAssociations" -// You have reached the maximum number of distributions that are associated -// with a CloudFront function. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyFunctionAssociations "TooManyFunctionAssociations" -// You have reached the maximum number of CloudFront function associations for -// this distribution. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeInvalidFunctionAssociation "InvalidFunctionAssociation" -// A CloudFront function association is invalid. -// -// - ErrCodeInvalidOriginReadTimeout "InvalidOriginReadTimeout" -// The read timeout specified for the origin is not valid. -// -// - ErrCodeInvalidOriginKeepaliveTimeout "InvalidOriginKeepaliveTimeout" -// The keep alive timeout specified for the origin is not valid. -// -// - ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" -// The specified configuration for field-level encryption doesn't exist. -// -// - ErrCodeIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior" -// The specified configuration for field-level encryption can't be associated -// with the specified cache behavior. -// -// - ErrCodeTooManyDistributionsAssociatedToFieldLevelEncryptionConfig "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig" -// The maximum number of distributions have been associated with the specified -// configuration for field-level encryption. -// -// - ErrCodeNoSuchCachePolicy "NoSuchCachePolicy" -// The cache policy does not exist. -// -// - ErrCodeTooManyDistributionsAssociatedToCachePolicy "TooManyDistributionsAssociatedToCachePolicy" -// The maximum number of distributions have been associated with the specified -// cache policy. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyDistributionsAssociatedToOriginAccessControl "TooManyDistributionsAssociatedToOriginAccessControl" -// The maximum number of distributions have been associated with the specified -// origin access control. -// -// For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeNoSuchResponseHeadersPolicy "NoSuchResponseHeadersPolicy" -// The response headers policy does not exist. -// -// - ErrCodeTooManyDistributionsAssociatedToResponseHeadersPolicy "TooManyDistributionsAssociatedToResponseHeadersPolicy" -// The maximum number of distributions have been associated with the specified -// response headers policy. -// -// For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeNoSuchOriginRequestPolicy "NoSuchOriginRequestPolicy" -// The origin request policy does not exist. -// -// - ErrCodeTooManyDistributionsAssociatedToOriginRequestPolicy "TooManyDistributionsAssociatedToOriginRequestPolicy" -// The maximum number of distributions have been associated with the specified -// origin request policy. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyDistributionsAssociatedToKeyGroup "TooManyDistributionsAssociatedToKeyGroup" -// The number of distributions that reference this key group is more than the -// maximum allowed. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyKeyGroupsAssociatedToDistribution "TooManyKeyGroupsAssociatedToDistribution" -// The number of key groups referenced by this distribution is more than the -// maximum allowed. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTrustedKeyGroupDoesNotExist "TrustedKeyGroupDoesNotExist" -// The specified key group does not exist. -// -// - ErrCodeNoSuchRealtimeLogConfig "NoSuchRealtimeLogConfig" -// The real-time log configuration does not exist. -// -// - ErrCodeRealtimeLogConfigOwnerMismatch "RealtimeLogConfigOwnerMismatch" -// The specified real-time log configuration belongs to a different Amazon Web -// Services account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CopyDistribution -func (c *CloudFront) CopyDistribution(input *CopyDistributionInput) (*CopyDistributionOutput, error) { - req, out := c.CopyDistributionRequest(input) - return out, req.Send() -} - -// CopyDistributionWithContext is the same as CopyDistribution with the addition of -// the ability to pass a context and additional request options. -// -// See CopyDistribution 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 *CloudFront) CopyDistributionWithContext(ctx aws.Context, input *CopyDistributionInput, opts ...request.Option) (*CopyDistributionOutput, error) { - req, out := c.CopyDistributionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateCachePolicy = "CreateCachePolicy2020_05_31" - -// CreateCachePolicyRequest generates a "aws/request.Request" representing the -// client's request for the CreateCachePolicy 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 CreateCachePolicy for more information on using the CreateCachePolicy -// 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 CreateCachePolicyRequest method. -// req, resp := client.CreateCachePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateCachePolicy -func (c *CloudFront) CreateCachePolicyRequest(input *CreateCachePolicyInput) (req *request.Request, output *CreateCachePolicyOutput) { - op := &request.Operation{ - Name: opCreateCachePolicy, - HTTPMethod: "POST", - HTTPPath: "/2020-05-31/cache-policy", - } - - if input == nil { - input = &CreateCachePolicyInput{} - } - - output = &CreateCachePolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateCachePolicy API operation for Amazon CloudFront. -// -// Creates a cache policy. -// -// After you create a cache policy, you can attach it to one or more cache behaviors. -// When it's attached to a cache behavior, the cache policy determines the following: -// -// - The values that CloudFront includes in the cache key. These values can -// include HTTP headers, cookies, and URL query strings. CloudFront uses -// the cache key to find an object in its cache that it can return to the -// viewer. -// -// - The default, minimum, and maximum time to live (TTL) values that you -// want objects to stay in the CloudFront cache. -// -// The headers, cookies, and query strings that are included in the cache key -// are also included in requests that CloudFront sends to the origin. CloudFront -// sends a request when it can't find an object in its cache that matches the -// request's cache key. If you want to send values to the origin but not include -// them in the cache key, use OriginRequestPolicy. -// -// For more information about cache policies, see Controlling the cache key -// (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html) -// in the Amazon CloudFront Developer 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 CloudFront's -// API operation CreateCachePolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeCachePolicyAlreadyExists "CachePolicyAlreadyExists" -// A cache policy with this name already exists. You must provide a unique name. -// To modify an existing cache policy, use UpdateCachePolicy. -// -// - ErrCodeTooManyCachePolicies "TooManyCachePolicies" -// You have reached the maximum number of cache policies for this Amazon Web -// Services account. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyHeadersInCachePolicy "TooManyHeadersInCachePolicy" -// The number of headers in the cache policy exceeds the maximum. For more information, -// see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyCookiesInCachePolicy "TooManyCookiesInCachePolicy" -// The number of cookies in the cache policy exceeds the maximum. For more information, -// see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyQueryStringsInCachePolicy "TooManyQueryStringsInCachePolicy" -// The number of query strings in the cache policy exceeds the maximum. For -// more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateCachePolicy -func (c *CloudFront) CreateCachePolicy(input *CreateCachePolicyInput) (*CreateCachePolicyOutput, error) { - req, out := c.CreateCachePolicyRequest(input) - return out, req.Send() -} - -// CreateCachePolicyWithContext is the same as CreateCachePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See CreateCachePolicy 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 *CloudFront) CreateCachePolicyWithContext(ctx aws.Context, input *CreateCachePolicyInput, opts ...request.Option) (*CreateCachePolicyOutput, error) { - req, out := c.CreateCachePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateCloudFrontOriginAccessIdentity = "CreateCloudFrontOriginAccessIdentity2020_05_31" - -// CreateCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the -// client's request for the CreateCloudFrontOriginAccessIdentity 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 CreateCloudFrontOriginAccessIdentity for more information on using the CreateCloudFrontOriginAccessIdentity -// 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 CreateCloudFrontOriginAccessIdentityRequest method. -// req, resp := client.CreateCloudFrontOriginAccessIdentityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateCloudFrontOriginAccessIdentity -func (c *CloudFront) CreateCloudFrontOriginAccessIdentityRequest(input *CreateCloudFrontOriginAccessIdentityInput) (req *request.Request, output *CreateCloudFrontOriginAccessIdentityOutput) { - op := &request.Operation{ - Name: opCreateCloudFrontOriginAccessIdentity, - HTTPMethod: "POST", - HTTPPath: "/2020-05-31/origin-access-identity/cloudfront", - } - - if input == nil { - input = &CreateCloudFrontOriginAccessIdentityInput{} - } - - output = &CreateCloudFrontOriginAccessIdentityOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateCloudFrontOriginAccessIdentity API operation for Amazon CloudFront. -// -// Creates a new origin access identity. If you're using Amazon S3 for your -// origin, you can use an origin access identity to require users to access -// your content using a CloudFront URL instead of the Amazon S3 URL. For more -// information about how to use origin access identities, see Serving Private -// Content through CloudFront (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) -// in the Amazon CloudFront Developer 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 CloudFront's -// API operation CreateCloudFrontOriginAccessIdentity for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeOriginAccessIdentityAlreadyExists "CloudFrontOriginAccessIdentityAlreadyExists" -// If the CallerReference is a value you already sent in a previous request -// to create an identity but the content of the CloudFrontOriginAccessIdentityConfig -// is different from the original request, CloudFront returns a CloudFrontOriginAccessIdentityAlreadyExists -// error. -// -// - ErrCodeMissingBody "MissingBody" -// This operation requires a body. Ensure that the body is present and the Content-Type -// header is set. -// -// - ErrCodeTooManyCloudFrontOriginAccessIdentities "TooManyCloudFrontOriginAccessIdentities" -// Processing your request would cause you to exceed the maximum number of origin -// access identities allowed. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateCloudFrontOriginAccessIdentity -func (c *CloudFront) CreateCloudFrontOriginAccessIdentity(input *CreateCloudFrontOriginAccessIdentityInput) (*CreateCloudFrontOriginAccessIdentityOutput, error) { - req, out := c.CreateCloudFrontOriginAccessIdentityRequest(input) - return out, req.Send() -} - -// CreateCloudFrontOriginAccessIdentityWithContext is the same as CreateCloudFrontOriginAccessIdentity with the addition of -// the ability to pass a context and additional request options. -// -// See CreateCloudFrontOriginAccessIdentity 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 *CloudFront) CreateCloudFrontOriginAccessIdentityWithContext(ctx aws.Context, input *CreateCloudFrontOriginAccessIdentityInput, opts ...request.Option) (*CreateCloudFrontOriginAccessIdentityOutput, error) { - req, out := c.CreateCloudFrontOriginAccessIdentityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateContinuousDeploymentPolicy = "CreateContinuousDeploymentPolicy2020_05_31" - -// CreateContinuousDeploymentPolicyRequest generates a "aws/request.Request" representing the -// client's request for the CreateContinuousDeploymentPolicy 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 CreateContinuousDeploymentPolicy for more information on using the CreateContinuousDeploymentPolicy -// 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 CreateContinuousDeploymentPolicyRequest method. -// req, resp := client.CreateContinuousDeploymentPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateContinuousDeploymentPolicy -func (c *CloudFront) CreateContinuousDeploymentPolicyRequest(input *CreateContinuousDeploymentPolicyInput) (req *request.Request, output *CreateContinuousDeploymentPolicyOutput) { - op := &request.Operation{ - Name: opCreateContinuousDeploymentPolicy, - HTTPMethod: "POST", - HTTPPath: "/2020-05-31/continuous-deployment-policy", - } - - if input == nil { - input = &CreateContinuousDeploymentPolicyInput{} - } - - output = &CreateContinuousDeploymentPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateContinuousDeploymentPolicy API operation for Amazon CloudFront. -// -// Creates a continuous deployment policy that distributes traffic for a custom -// domain name to two different CloudFront distributions. -// -// To use a continuous deployment policy, first use CopyDistribution to create -// a staging distribution, then use UpdateDistribution to modify the staging -// distribution's configuration. -// -// After you create and update a staging distribution, you can use a continuous -// deployment policy to incrementally move traffic to the staging distribution. -// This workflow enables you to test changes to a distribution's configuration -// before moving all of your domain's production traffic to the new configuration. -// -// 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 CloudFront's -// API operation CreateContinuousDeploymentPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// - ErrCodeContinuousDeploymentPolicyAlreadyExists "ContinuousDeploymentPolicyAlreadyExists" -// A continuous deployment policy with this configuration already exists. -// -// - ErrCodeTooManyContinuousDeploymentPolicies "TooManyContinuousDeploymentPolicies" -// You have reached the maximum number of continuous deployment policies for -// this Amazon Web Services account. -// -// - ErrCodeStagingDistributionInUse "StagingDistributionInUse" -// A continuous deployment policy for this staging distribution already exists. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateContinuousDeploymentPolicy -func (c *CloudFront) CreateContinuousDeploymentPolicy(input *CreateContinuousDeploymentPolicyInput) (*CreateContinuousDeploymentPolicyOutput, error) { - req, out := c.CreateContinuousDeploymentPolicyRequest(input) - return out, req.Send() -} - -// CreateContinuousDeploymentPolicyWithContext is the same as CreateContinuousDeploymentPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See CreateContinuousDeploymentPolicy 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 *CloudFront) CreateContinuousDeploymentPolicyWithContext(ctx aws.Context, input *CreateContinuousDeploymentPolicyInput, opts ...request.Option) (*CreateContinuousDeploymentPolicyOutput, error) { - req, out := c.CreateContinuousDeploymentPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDistribution = "CreateDistribution2020_05_31" - -// CreateDistributionRequest generates a "aws/request.Request" representing the -// client's request for the CreateDistribution 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 CreateDistribution for more information on using the CreateDistribution -// 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 CreateDistributionRequest method. -// req, resp := client.CreateDistributionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateDistribution -func (c *CloudFront) CreateDistributionRequest(input *CreateDistributionInput) (req *request.Request, output *CreateDistributionOutput) { - op := &request.Operation{ - Name: opCreateDistribution, - HTTPMethod: "POST", - HTTPPath: "/2020-05-31/distribution", - } - - if input == nil { - input = &CreateDistributionInput{} - } - - output = &CreateDistributionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDistribution API operation for Amazon CloudFront. -// -// Creates a CloudFront distribution. -// -// 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 CloudFront's -// API operation CreateDistribution for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeCNAMEAlreadyExists "CNAMEAlreadyExists" -// The CNAME specified is already defined for CloudFront. -// -// - ErrCodeDistributionAlreadyExists "DistributionAlreadyExists" -// The caller reference you attempted to create the distribution with is associated -// with another distribution. -// -// - ErrCodeInvalidOrigin "InvalidOrigin" -// The Amazon S3 origin server specified does not refer to a valid Amazon S3 -// bucket. -// -// - ErrCodeInvalidOriginAccessIdentity "InvalidOriginAccessIdentity" -// The origin access identity is not valid or doesn't exist. -// -// - ErrCodeInvalidOriginAccessControl "InvalidOriginAccessControl" -// The origin access control is not valid. -// -// - ErrCodeIllegalOriginAccessConfiguration "IllegalOriginAccessConfiguration" -// An origin cannot contain both an origin access control (OAC) and an origin -// access identity (OAI). -// -// - ErrCodeTooManyDistributionsAssociatedToOriginAccessControl "TooManyDistributionsAssociatedToOriginAccessControl" -// The maximum number of distributions have been associated with the specified -// origin access control. -// -// For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeTooManyTrustedSigners "TooManyTrustedSigners" -// Your request contains more trusted signers than are allowed per distribution. -// -// - ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist" -// One or more of your trusted signers don't exist. -// -// - ErrCodeInvalidViewerCertificate "InvalidViewerCertificate" -// A viewer certificate specified is not valid. -// -// - ErrCodeInvalidMinimumProtocolVersion "InvalidMinimumProtocolVersion" -// The minimum protocol version specified is not valid. -// -// - ErrCodeMissingBody "MissingBody" -// This operation requires a body. Ensure that the body is present and the Content-Type -// header is set. -// -// - ErrCodeTooManyDistributionCNAMEs "TooManyDistributionCNAMEs" -// Your request contains more CNAMEs than are allowed per distribution. -// -// - ErrCodeTooManyDistributions "TooManyDistributions" -// Processing your request would cause you to exceed the maximum number of distributions -// allowed. -// -// - ErrCodeInvalidDefaultRootObject "InvalidDefaultRootObject" -// The default root object file name is too big or contains an invalid character. -// -// - ErrCodeInvalidRelativePath "InvalidRelativePath" -// The relative path is too big, is not URL-encoded, or does not begin with -// a slash (/). -// -// - ErrCodeInvalidErrorCode "InvalidErrorCode" -// An invalid error code was specified. -// -// - ErrCodeInvalidResponseCode "InvalidResponseCode" -// A response code is not valid. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeInvalidRequiredProtocol "InvalidRequiredProtocol" -// This operation requires the HTTPS protocol. Ensure that you specify the HTTPS -// protocol in your request, or omit the RequiredProtocols element from your -// distribution configuration. -// -// - ErrCodeNoSuchOrigin "NoSuchOrigin" -// No origin exists with the specified Origin Id. -// -// - ErrCodeTooManyOrigins "TooManyOrigins" -// You cannot create more origins for the distribution. -// -// - ErrCodeTooManyOriginGroupsPerDistribution "TooManyOriginGroupsPerDistribution" -// Processing your request would cause you to exceed the maximum number of origin -// groups allowed. -// -// - ErrCodeTooManyCacheBehaviors "TooManyCacheBehaviors" -// You cannot create more cache behaviors for the distribution. -// -// - ErrCodeTooManyCookieNamesInWhiteList "TooManyCookieNamesInWhiteList" -// Your request contains more cookie names in the whitelist than are allowed -// per cache behavior. -// -// - ErrCodeInvalidForwardCookies "InvalidForwardCookies" -// Your request contains forward cookies option which doesn't match with the -// expectation for the whitelisted list of cookie names. Either list of cookie -// names has been specified when not allowed or list of cookie names is missing -// when expected. -// -// - ErrCodeTooManyHeadersInForwardedValues "TooManyHeadersInForwardedValues" -// Your request contains too many headers in forwarded values. -// -// - ErrCodeInvalidHeadersForS3Origin "InvalidHeadersForS3Origin" -// The headers specified are not valid for an Amazon S3 origin. -// -// - ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// - ErrCodeTooManyCertificates "TooManyCertificates" -// You cannot create anymore custom SSL/TLS certificates. -// -// - ErrCodeInvalidLocationCode "InvalidLocationCode" -// The location code specified is not valid. -// -// - ErrCodeInvalidGeoRestrictionParameter "InvalidGeoRestrictionParameter" -// The specified geo restriction parameter is not valid. -// -// - ErrCodeInvalidProtocolSettings "InvalidProtocolSettings" -// You cannot specify SSLv3 as the minimum protocol version if you only want -// to support only clients that support Server Name Indication (SNI). -// -// - ErrCodeInvalidTTLOrder "InvalidTTLOrder" -// The TTL order specified is not valid. -// -// - ErrCodeInvalidWebACLId "InvalidWebACLId" -// A web ACL ID specified is not valid. To specify a web ACL created using the -// latest version of WAF, use the ACL ARN, for example arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a. -// To specify a web ACL created using WAF Classic, use the ACL ID, for example -// 473e64fd-f30b-4765-81a0-62ad96dd167a. -// -// - ErrCodeTooManyOriginCustomHeaders "TooManyOriginCustomHeaders" -// Your request contains too many origin custom headers. -// -// - ErrCodeTooManyQueryStringParameters "TooManyQueryStringParameters" -// Your request contains too many query string parameters. -// -// - ErrCodeInvalidQueryStringParameters "InvalidQueryStringParameters" -// The query string parameters specified are not valid. -// -// - ErrCodeTooManyDistributionsWithLambdaAssociations "TooManyDistributionsWithLambdaAssociations" -// Processing your request would cause the maximum number of distributions with -// Lambda@Edge function associations per owner to be exceeded. -// -// - ErrCodeTooManyDistributionsWithSingleFunctionARN "TooManyDistributionsWithSingleFunctionARN" -// The maximum number of distributions have been associated with the specified -// Lambda@Edge function. -// -// - ErrCodeTooManyLambdaFunctionAssociations "TooManyLambdaFunctionAssociations" -// Your request contains more Lambda@Edge function associations than are allowed -// per distribution. -// -// - ErrCodeInvalidLambdaFunctionAssociation "InvalidLambdaFunctionAssociation" -// The specified Lambda@Edge function association is invalid. -// -// - ErrCodeTooManyDistributionsWithFunctionAssociations "TooManyDistributionsWithFunctionAssociations" -// You have reached the maximum number of distributions that are associated -// with a CloudFront function. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyFunctionAssociations "TooManyFunctionAssociations" -// You have reached the maximum number of CloudFront function associations for -// this distribution. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeInvalidFunctionAssociation "InvalidFunctionAssociation" -// A CloudFront function association is invalid. -// -// - ErrCodeInvalidOriginReadTimeout "InvalidOriginReadTimeout" -// The read timeout specified for the origin is not valid. -// -// - ErrCodeInvalidOriginKeepaliveTimeout "InvalidOriginKeepaliveTimeout" -// The keep alive timeout specified for the origin is not valid. -// -// - ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" -// The specified configuration for field-level encryption doesn't exist. -// -// - ErrCodeIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior" -// The specified configuration for field-level encryption can't be associated -// with the specified cache behavior. -// -// - ErrCodeTooManyDistributionsAssociatedToFieldLevelEncryptionConfig "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig" -// The maximum number of distributions have been associated with the specified -// configuration for field-level encryption. -// -// - ErrCodeNoSuchCachePolicy "NoSuchCachePolicy" -// The cache policy does not exist. -// -// - ErrCodeTooManyDistributionsAssociatedToCachePolicy "TooManyDistributionsAssociatedToCachePolicy" -// The maximum number of distributions have been associated with the specified -// cache policy. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeNoSuchResponseHeadersPolicy "NoSuchResponseHeadersPolicy" -// The response headers policy does not exist. -// -// - ErrCodeTooManyDistributionsAssociatedToResponseHeadersPolicy "TooManyDistributionsAssociatedToResponseHeadersPolicy" -// The maximum number of distributions have been associated with the specified -// response headers policy. -// -// For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeNoSuchOriginRequestPolicy "NoSuchOriginRequestPolicy" -// The origin request policy does not exist. -// -// - ErrCodeTooManyDistributionsAssociatedToOriginRequestPolicy "TooManyDistributionsAssociatedToOriginRequestPolicy" -// The maximum number of distributions have been associated with the specified -// origin request policy. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyDistributionsAssociatedToKeyGroup "TooManyDistributionsAssociatedToKeyGroup" -// The number of distributions that reference this key group is more than the -// maximum allowed. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyKeyGroupsAssociatedToDistribution "TooManyKeyGroupsAssociatedToDistribution" -// The number of key groups referenced by this distribution is more than the -// maximum allowed. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTrustedKeyGroupDoesNotExist "TrustedKeyGroupDoesNotExist" -// The specified key group does not exist. -// -// - ErrCodeNoSuchRealtimeLogConfig "NoSuchRealtimeLogConfig" -// The real-time log configuration does not exist. -// -// - ErrCodeRealtimeLogConfigOwnerMismatch "RealtimeLogConfigOwnerMismatch" -// The specified real-time log configuration belongs to a different Amazon Web -// Services account. -// -// - ErrCodeContinuousDeploymentPolicyInUse "ContinuousDeploymentPolicyInUse" -// You cannot delete a continuous deployment policy that is associated with -// a primary distribution. -// -// - ErrCodeNoSuchContinuousDeploymentPolicy "NoSuchContinuousDeploymentPolicy" -// The continuous deployment policy doesn't exist. -// -// - ErrCodeInvalidDomainNameForOriginAccessControl "InvalidDomainNameForOriginAccessControl" -// An origin access control is associated with an origin whose domain name is -// not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateDistribution -func (c *CloudFront) CreateDistribution(input *CreateDistributionInput) (*CreateDistributionOutput, error) { - req, out := c.CreateDistributionRequest(input) - return out, req.Send() -} - -// CreateDistributionWithContext is the same as CreateDistribution with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDistribution 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 *CloudFront) CreateDistributionWithContext(ctx aws.Context, input *CreateDistributionInput, opts ...request.Option) (*CreateDistributionOutput, error) { - req, out := c.CreateDistributionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateDistributionWithTags = "CreateDistributionWithTags2020_05_31" - -// CreateDistributionWithTagsRequest generates a "aws/request.Request" representing the -// client's request for the CreateDistributionWithTags 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 CreateDistributionWithTags for more information on using the CreateDistributionWithTags -// 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 CreateDistributionWithTagsRequest method. -// req, resp := client.CreateDistributionWithTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateDistributionWithTags -func (c *CloudFront) CreateDistributionWithTagsRequest(input *CreateDistributionWithTagsInput) (req *request.Request, output *CreateDistributionWithTagsOutput) { - op := &request.Operation{ - Name: opCreateDistributionWithTags, - HTTPMethod: "POST", - HTTPPath: "/2020-05-31/distribution?WithTags", - } - - if input == nil { - input = &CreateDistributionWithTagsInput{} - } - - output = &CreateDistributionWithTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateDistributionWithTags API operation for Amazon CloudFront. -// -// Create a new distribution with tags. This API operation requires the following -// IAM permissions: -// -// - CreateDistribution (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_CreateDistribution.html) -// -// - TagResource (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_TagResource.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 CloudFront's -// API operation CreateDistributionWithTags for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeCNAMEAlreadyExists "CNAMEAlreadyExists" -// The CNAME specified is already defined for CloudFront. -// -// - ErrCodeDistributionAlreadyExists "DistributionAlreadyExists" -// The caller reference you attempted to create the distribution with is associated -// with another distribution. -// -// - ErrCodeInvalidOrigin "InvalidOrigin" -// The Amazon S3 origin server specified does not refer to a valid Amazon S3 -// bucket. -// -// - ErrCodeInvalidOriginAccessIdentity "InvalidOriginAccessIdentity" -// The origin access identity is not valid or doesn't exist. -// -// - ErrCodeInvalidOriginAccessControl "InvalidOriginAccessControl" -// The origin access control is not valid. -// -// - ErrCodeIllegalOriginAccessConfiguration "IllegalOriginAccessConfiguration" -// An origin cannot contain both an origin access control (OAC) and an origin -// access identity (OAI). -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeTooManyTrustedSigners "TooManyTrustedSigners" -// Your request contains more trusted signers than are allowed per distribution. -// -// - ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist" -// One or more of your trusted signers don't exist. -// -// - ErrCodeInvalidViewerCertificate "InvalidViewerCertificate" -// A viewer certificate specified is not valid. -// -// - ErrCodeInvalidMinimumProtocolVersion "InvalidMinimumProtocolVersion" -// The minimum protocol version specified is not valid. -// -// - ErrCodeMissingBody "MissingBody" -// This operation requires a body. Ensure that the body is present and the Content-Type -// header is set. -// -// - ErrCodeTooManyDistributionCNAMEs "TooManyDistributionCNAMEs" -// Your request contains more CNAMEs than are allowed per distribution. -// -// - ErrCodeTooManyDistributions "TooManyDistributions" -// Processing your request would cause you to exceed the maximum number of distributions -// allowed. -// -// - ErrCodeInvalidDefaultRootObject "InvalidDefaultRootObject" -// The default root object file name is too big or contains an invalid character. -// -// - ErrCodeInvalidRelativePath "InvalidRelativePath" -// The relative path is too big, is not URL-encoded, or does not begin with -// a slash (/). -// -// - ErrCodeInvalidErrorCode "InvalidErrorCode" -// An invalid error code was specified. -// -// - ErrCodeInvalidResponseCode "InvalidResponseCode" -// A response code is not valid. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeInvalidRequiredProtocol "InvalidRequiredProtocol" -// This operation requires the HTTPS protocol. Ensure that you specify the HTTPS -// protocol in your request, or omit the RequiredProtocols element from your -// distribution configuration. -// -// - ErrCodeNoSuchOrigin "NoSuchOrigin" -// No origin exists with the specified Origin Id. -// -// - ErrCodeTooManyOrigins "TooManyOrigins" -// You cannot create more origins for the distribution. -// -// - ErrCodeTooManyOriginGroupsPerDistribution "TooManyOriginGroupsPerDistribution" -// Processing your request would cause you to exceed the maximum number of origin -// groups allowed. -// -// - ErrCodeTooManyCacheBehaviors "TooManyCacheBehaviors" -// You cannot create more cache behaviors for the distribution. -// -// - ErrCodeTooManyCookieNamesInWhiteList "TooManyCookieNamesInWhiteList" -// Your request contains more cookie names in the whitelist than are allowed -// per cache behavior. -// -// - ErrCodeInvalidForwardCookies "InvalidForwardCookies" -// Your request contains forward cookies option which doesn't match with the -// expectation for the whitelisted list of cookie names. Either list of cookie -// names has been specified when not allowed or list of cookie names is missing -// when expected. -// -// - ErrCodeTooManyHeadersInForwardedValues "TooManyHeadersInForwardedValues" -// Your request contains too many headers in forwarded values. -// -// - ErrCodeInvalidHeadersForS3Origin "InvalidHeadersForS3Origin" -// The headers specified are not valid for an Amazon S3 origin. -// -// - ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// - ErrCodeTooManyCertificates "TooManyCertificates" -// You cannot create anymore custom SSL/TLS certificates. -// -// - ErrCodeInvalidLocationCode "InvalidLocationCode" -// The location code specified is not valid. -// -// - ErrCodeInvalidGeoRestrictionParameter "InvalidGeoRestrictionParameter" -// The specified geo restriction parameter is not valid. -// -// - ErrCodeInvalidProtocolSettings "InvalidProtocolSettings" -// You cannot specify SSLv3 as the minimum protocol version if you only want -// to support only clients that support Server Name Indication (SNI). -// -// - ErrCodeInvalidTTLOrder "InvalidTTLOrder" -// The TTL order specified is not valid. -// -// - ErrCodeInvalidWebACLId "InvalidWebACLId" -// A web ACL ID specified is not valid. To specify a web ACL created using the -// latest version of WAF, use the ACL ARN, for example arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a. -// To specify a web ACL created using WAF Classic, use the ACL ID, for example -// 473e64fd-f30b-4765-81a0-62ad96dd167a. -// -// - ErrCodeTooManyOriginCustomHeaders "TooManyOriginCustomHeaders" -// Your request contains too many origin custom headers. -// -// - ErrCodeInvalidTagging "InvalidTagging" -// The tagging specified is not valid. -// -// - ErrCodeTooManyQueryStringParameters "TooManyQueryStringParameters" -// Your request contains too many query string parameters. -// -// - ErrCodeInvalidQueryStringParameters "InvalidQueryStringParameters" -// The query string parameters specified are not valid. -// -// - ErrCodeTooManyDistributionsWithLambdaAssociations "TooManyDistributionsWithLambdaAssociations" -// Processing your request would cause the maximum number of distributions with -// Lambda@Edge function associations per owner to be exceeded. -// -// - ErrCodeTooManyDistributionsWithSingleFunctionARN "TooManyDistributionsWithSingleFunctionARN" -// The maximum number of distributions have been associated with the specified -// Lambda@Edge function. -// -// - ErrCodeTooManyLambdaFunctionAssociations "TooManyLambdaFunctionAssociations" -// Your request contains more Lambda@Edge function associations than are allowed -// per distribution. -// -// - ErrCodeInvalidLambdaFunctionAssociation "InvalidLambdaFunctionAssociation" -// The specified Lambda@Edge function association is invalid. -// -// - ErrCodeTooManyDistributionsWithFunctionAssociations "TooManyDistributionsWithFunctionAssociations" -// You have reached the maximum number of distributions that are associated -// with a CloudFront function. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyFunctionAssociations "TooManyFunctionAssociations" -// You have reached the maximum number of CloudFront function associations for -// this distribution. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeInvalidFunctionAssociation "InvalidFunctionAssociation" -// A CloudFront function association is invalid. -// -// - ErrCodeInvalidOriginReadTimeout "InvalidOriginReadTimeout" -// The read timeout specified for the origin is not valid. -// -// - ErrCodeInvalidOriginKeepaliveTimeout "InvalidOriginKeepaliveTimeout" -// The keep alive timeout specified for the origin is not valid. -// -// - ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" -// The specified configuration for field-level encryption doesn't exist. -// -// - ErrCodeIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior" -// The specified configuration for field-level encryption can't be associated -// with the specified cache behavior. -// -// - ErrCodeTooManyDistributionsAssociatedToFieldLevelEncryptionConfig "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig" -// The maximum number of distributions have been associated with the specified -// configuration for field-level encryption. -// -// - ErrCodeNoSuchCachePolicy "NoSuchCachePolicy" -// The cache policy does not exist. -// -// - ErrCodeTooManyDistributionsAssociatedToCachePolicy "TooManyDistributionsAssociatedToCachePolicy" -// The maximum number of distributions have been associated with the specified -// cache policy. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyDistributionsAssociatedToOriginAccessControl "TooManyDistributionsAssociatedToOriginAccessControl" -// The maximum number of distributions have been associated with the specified -// origin access control. -// -// For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeNoSuchResponseHeadersPolicy "NoSuchResponseHeadersPolicy" -// The response headers policy does not exist. -// -// - ErrCodeTooManyDistributionsAssociatedToResponseHeadersPolicy "TooManyDistributionsAssociatedToResponseHeadersPolicy" -// The maximum number of distributions have been associated with the specified -// response headers policy. -// -// For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeNoSuchOriginRequestPolicy "NoSuchOriginRequestPolicy" -// The origin request policy does not exist. -// -// - ErrCodeTooManyDistributionsAssociatedToOriginRequestPolicy "TooManyDistributionsAssociatedToOriginRequestPolicy" -// The maximum number of distributions have been associated with the specified -// origin request policy. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyDistributionsAssociatedToKeyGroup "TooManyDistributionsAssociatedToKeyGroup" -// The number of distributions that reference this key group is more than the -// maximum allowed. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyKeyGroupsAssociatedToDistribution "TooManyKeyGroupsAssociatedToDistribution" -// The number of key groups referenced by this distribution is more than the -// maximum allowed. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTrustedKeyGroupDoesNotExist "TrustedKeyGroupDoesNotExist" -// The specified key group does not exist. -// -// - ErrCodeNoSuchRealtimeLogConfig "NoSuchRealtimeLogConfig" -// The real-time log configuration does not exist. -// -// - ErrCodeRealtimeLogConfigOwnerMismatch "RealtimeLogConfigOwnerMismatch" -// The specified real-time log configuration belongs to a different Amazon Web -// Services account. -// -// - ErrCodeContinuousDeploymentPolicyInUse "ContinuousDeploymentPolicyInUse" -// You cannot delete a continuous deployment policy that is associated with -// a primary distribution. -// -// - ErrCodeNoSuchContinuousDeploymentPolicy "NoSuchContinuousDeploymentPolicy" -// The continuous deployment policy doesn't exist. -// -// - ErrCodeInvalidDomainNameForOriginAccessControl "InvalidDomainNameForOriginAccessControl" -// An origin access control is associated with an origin whose domain name is -// not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateDistributionWithTags -func (c *CloudFront) CreateDistributionWithTags(input *CreateDistributionWithTagsInput) (*CreateDistributionWithTagsOutput, error) { - req, out := c.CreateDistributionWithTagsRequest(input) - return out, req.Send() -} - -// CreateDistributionWithTagsWithContext is the same as CreateDistributionWithTags with the addition of -// the ability to pass a context and additional request options. -// -// See CreateDistributionWithTags 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 *CloudFront) CreateDistributionWithTagsWithContext(ctx aws.Context, input *CreateDistributionWithTagsInput, opts ...request.Option) (*CreateDistributionWithTagsOutput, error) { - req, out := c.CreateDistributionWithTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateFieldLevelEncryptionConfig = "CreateFieldLevelEncryptionConfig2020_05_31" - -// CreateFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the -// client's request for the CreateFieldLevelEncryptionConfig 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 CreateFieldLevelEncryptionConfig for more information on using the CreateFieldLevelEncryptionConfig -// 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 CreateFieldLevelEncryptionConfigRequest method. -// req, resp := client.CreateFieldLevelEncryptionConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateFieldLevelEncryptionConfig -func (c *CloudFront) CreateFieldLevelEncryptionConfigRequest(input *CreateFieldLevelEncryptionConfigInput) (req *request.Request, output *CreateFieldLevelEncryptionConfigOutput) { - op := &request.Operation{ - Name: opCreateFieldLevelEncryptionConfig, - HTTPMethod: "POST", - HTTPPath: "/2020-05-31/field-level-encryption", - } - - if input == nil { - input = &CreateFieldLevelEncryptionConfigInput{} - } - - output = &CreateFieldLevelEncryptionConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateFieldLevelEncryptionConfig API operation for Amazon CloudFront. -// -// Create a new field-level encryption configuration. -// -// 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 CloudFront's -// API operation CreateFieldLevelEncryptionConfig for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile" -// The specified profile for field-level encryption doesn't exist. -// -// - ErrCodeFieldLevelEncryptionConfigAlreadyExists "FieldLevelEncryptionConfigAlreadyExists" -// The specified configuration for field-level encryption already exists. -// -// - ErrCodeTooManyFieldLevelEncryptionConfigs "TooManyFieldLevelEncryptionConfigs" -// The maximum number of configurations for field-level encryption have been -// created. -// -// - ErrCodeTooManyFieldLevelEncryptionQueryArgProfiles "TooManyFieldLevelEncryptionQueryArgProfiles" -// The maximum number of query arg profiles for field-level encryption have -// been created. -// -// - ErrCodeTooManyFieldLevelEncryptionContentTypeProfiles "TooManyFieldLevelEncryptionContentTypeProfiles" -// The maximum number of content type profiles for field-level encryption have -// been created. -// -// - ErrCodeQueryArgProfileEmpty "QueryArgProfileEmpty" -// No profile specified for the field-level encryption query argument. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateFieldLevelEncryptionConfig -func (c *CloudFront) CreateFieldLevelEncryptionConfig(input *CreateFieldLevelEncryptionConfigInput) (*CreateFieldLevelEncryptionConfigOutput, error) { - req, out := c.CreateFieldLevelEncryptionConfigRequest(input) - return out, req.Send() -} - -// CreateFieldLevelEncryptionConfigWithContext is the same as CreateFieldLevelEncryptionConfig with the addition of -// the ability to pass a context and additional request options. -// -// See CreateFieldLevelEncryptionConfig 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 *CloudFront) CreateFieldLevelEncryptionConfigWithContext(ctx aws.Context, input *CreateFieldLevelEncryptionConfigInput, opts ...request.Option) (*CreateFieldLevelEncryptionConfigOutput, error) { - req, out := c.CreateFieldLevelEncryptionConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateFieldLevelEncryptionProfile = "CreateFieldLevelEncryptionProfile2020_05_31" - -// CreateFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the -// client's request for the CreateFieldLevelEncryptionProfile 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 CreateFieldLevelEncryptionProfile for more information on using the CreateFieldLevelEncryptionProfile -// 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 CreateFieldLevelEncryptionProfileRequest method. -// req, resp := client.CreateFieldLevelEncryptionProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateFieldLevelEncryptionProfile -func (c *CloudFront) CreateFieldLevelEncryptionProfileRequest(input *CreateFieldLevelEncryptionProfileInput) (req *request.Request, output *CreateFieldLevelEncryptionProfileOutput) { - op := &request.Operation{ - Name: opCreateFieldLevelEncryptionProfile, - HTTPMethod: "POST", - HTTPPath: "/2020-05-31/field-level-encryption-profile", - } - - if input == nil { - input = &CreateFieldLevelEncryptionProfileInput{} - } - - output = &CreateFieldLevelEncryptionProfileOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateFieldLevelEncryptionProfile API operation for Amazon CloudFront. -// -// Create a field-level encryption profile. -// -// 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 CloudFront's -// API operation CreateFieldLevelEncryptionProfile for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeNoSuchPublicKey "NoSuchPublicKey" -// The specified public key doesn't exist. -// -// - ErrCodeFieldLevelEncryptionProfileAlreadyExists "FieldLevelEncryptionProfileAlreadyExists" -// The specified profile for field-level encryption already exists. -// -// - ErrCodeFieldLevelEncryptionProfileSizeExceeded "FieldLevelEncryptionProfileSizeExceeded" -// The maximum size of a profile for field-level encryption was exceeded. -// -// - ErrCodeTooManyFieldLevelEncryptionProfiles "TooManyFieldLevelEncryptionProfiles" -// The maximum number of profiles for field-level encryption have been created. -// -// - ErrCodeTooManyFieldLevelEncryptionEncryptionEntities "TooManyFieldLevelEncryptionEncryptionEntities" -// The maximum number of encryption entities for field-level encryption have -// been created. -// -// - ErrCodeTooManyFieldLevelEncryptionFieldPatterns "TooManyFieldLevelEncryptionFieldPatterns" -// The maximum number of field patterns for field-level encryption have been -// created. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateFieldLevelEncryptionProfile -func (c *CloudFront) CreateFieldLevelEncryptionProfile(input *CreateFieldLevelEncryptionProfileInput) (*CreateFieldLevelEncryptionProfileOutput, error) { - req, out := c.CreateFieldLevelEncryptionProfileRequest(input) - return out, req.Send() -} - -// CreateFieldLevelEncryptionProfileWithContext is the same as CreateFieldLevelEncryptionProfile with the addition of -// the ability to pass a context and additional request options. -// -// See CreateFieldLevelEncryptionProfile 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 *CloudFront) CreateFieldLevelEncryptionProfileWithContext(ctx aws.Context, input *CreateFieldLevelEncryptionProfileInput, opts ...request.Option) (*CreateFieldLevelEncryptionProfileOutput, error) { - req, out := c.CreateFieldLevelEncryptionProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateFunction = "CreateFunction2020_05_31" - -// CreateFunctionRequest generates a "aws/request.Request" representing the -// client's request for the CreateFunction 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 CreateFunction for more information on using the CreateFunction -// 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 CreateFunctionRequest method. -// req, resp := client.CreateFunctionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateFunction -func (c *CloudFront) CreateFunctionRequest(input *CreateFunctionInput) (req *request.Request, output *CreateFunctionOutput) { - op := &request.Operation{ - Name: opCreateFunction, - HTTPMethod: "POST", - HTTPPath: "/2020-05-31/function", - } - - if input == nil { - input = &CreateFunctionInput{} - } - - output = &CreateFunctionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateFunction API operation for Amazon CloudFront. -// -// Creates a CloudFront function. -// -// To create a function, you provide the function code and some configuration -// information about the function. The response contains an Amazon Resource -// Name (ARN) that uniquely identifies the function. -// -// When you create a function, it's in the DEVELOPMENT stage. In this stage, -// you can test the function with TestFunction, and update it with UpdateFunction. -// -// When you're ready to use your function with a CloudFront distribution, use -// PublishFunction to copy the function from the DEVELOPMENT stage to LIVE. -// When it's live, you can attach the function to a distribution's cache behavior, -// using the function's ARN. -// -// 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 CloudFront's -// API operation CreateFunction for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeTooManyFunctions "TooManyFunctions" -// You have reached the maximum number of CloudFront functions for this Amazon -// Web Services account. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeFunctionAlreadyExists "FunctionAlreadyExists" -// A function with the same name already exists in this Amazon Web Services -// account. To create a function, you must provide a unique name. To update -// an existing function, use UpdateFunction. -// -// - ErrCodeFunctionSizeLimitExceeded "FunctionSizeLimitExceeded" -// The function is too large. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeUnsupportedOperation "UnsupportedOperation" -// This operation is not supported in this region. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateFunction -func (c *CloudFront) CreateFunction(input *CreateFunctionInput) (*CreateFunctionOutput, error) { - req, out := c.CreateFunctionRequest(input) - return out, req.Send() -} - -// CreateFunctionWithContext is the same as CreateFunction with the addition of -// the ability to pass a context and additional request options. -// -// See CreateFunction 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 *CloudFront) CreateFunctionWithContext(ctx aws.Context, input *CreateFunctionInput, opts ...request.Option) (*CreateFunctionOutput, error) { - req, out := c.CreateFunctionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateInvalidation = "CreateInvalidation2020_05_31" - -// CreateInvalidationRequest generates a "aws/request.Request" representing the -// client's request for the CreateInvalidation 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 CreateInvalidation for more information on using the CreateInvalidation -// 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 CreateInvalidationRequest method. -// req, resp := client.CreateInvalidationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateInvalidation -func (c *CloudFront) CreateInvalidationRequest(input *CreateInvalidationInput) (req *request.Request, output *CreateInvalidationOutput) { - op := &request.Operation{ - Name: opCreateInvalidation, - HTTPMethod: "POST", - HTTPPath: "/2020-05-31/distribution/{DistributionId}/invalidation", - } - - if input == nil { - input = &CreateInvalidationInput{} - } - - output = &CreateInvalidationOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateInvalidation API operation for Amazon CloudFront. -// -// Create a new invalidation. For more information, see Invalidating files (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html) -// in the Amazon CloudFront Developer 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 CloudFront's -// API operation CreateInvalidation for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeMissingBody "MissingBody" -// This operation requires a body. Ensure that the body is present and the Content-Type -// header is set. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeNoSuchDistribution "NoSuchDistribution" -// The specified distribution does not exist. -// -// - ErrCodeBatchTooLarge "BatchTooLarge" -// Invalidation batch specified is too large. -// -// - ErrCodeTooManyInvalidationsInProgress "TooManyInvalidationsInProgress" -// You have exceeded the maximum number of allowable InProgress invalidation -// batch requests, or invalidation objects. -// -// - ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateInvalidation -func (c *CloudFront) CreateInvalidation(input *CreateInvalidationInput) (*CreateInvalidationOutput, error) { - req, out := c.CreateInvalidationRequest(input) - return out, req.Send() -} - -// CreateInvalidationWithContext is the same as CreateInvalidation with the addition of -// the ability to pass a context and additional request options. -// -// See CreateInvalidation 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 *CloudFront) CreateInvalidationWithContext(ctx aws.Context, input *CreateInvalidationInput, opts ...request.Option) (*CreateInvalidationOutput, error) { - req, out := c.CreateInvalidationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateKeyGroup = "CreateKeyGroup2020_05_31" - -// CreateKeyGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateKeyGroup 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 CreateKeyGroup for more information on using the CreateKeyGroup -// 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 CreateKeyGroupRequest method. -// req, resp := client.CreateKeyGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateKeyGroup -func (c *CloudFront) CreateKeyGroupRequest(input *CreateKeyGroupInput) (req *request.Request, output *CreateKeyGroupOutput) { - op := &request.Operation{ - Name: opCreateKeyGroup, - HTTPMethod: "POST", - HTTPPath: "/2020-05-31/key-group", - } - - if input == nil { - input = &CreateKeyGroupInput{} - } - - output = &CreateKeyGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateKeyGroup API operation for Amazon CloudFront. -// -// Creates a key group that you can use with CloudFront signed URLs and signed -// cookies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html). -// -// To create a key group, you must specify at least one public key for the key -// group. After you create a key group, you can reference it from one or more -// cache behaviors. When you reference a key group in a cache behavior, CloudFront -// requires signed URLs or signed cookies for all requests that match the cache -// behavior. The URLs or cookies must be signed with a private key whose corresponding -// public key is in the key group. The signed URL or cookie contains information -// about which public key CloudFront should use to verify the signature. For -// more information, see Serving private content (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) -// in the Amazon CloudFront Developer 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 CloudFront's -// API operation CreateKeyGroup for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeKeyGroupAlreadyExists "KeyGroupAlreadyExists" -// A key group with this name already exists. You must provide a unique name. -// To modify an existing key group, use UpdateKeyGroup. -// -// - ErrCodeTooManyKeyGroups "TooManyKeyGroups" -// You have reached the maximum number of key groups for this Amazon Web Services -// account. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyPublicKeysInKeyGroup "TooManyPublicKeysInKeyGroup" -// The number of public keys in this key group is more than the maximum allowed. -// For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateKeyGroup -func (c *CloudFront) CreateKeyGroup(input *CreateKeyGroupInput) (*CreateKeyGroupOutput, error) { - req, out := c.CreateKeyGroupRequest(input) - return out, req.Send() -} - -// CreateKeyGroupWithContext is the same as CreateKeyGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateKeyGroup 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 *CloudFront) CreateKeyGroupWithContext(ctx aws.Context, input *CreateKeyGroupInput, opts ...request.Option) (*CreateKeyGroupOutput, error) { - req, out := c.CreateKeyGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateKeyValueStore = "CreateKeyValueStore2020_05_31" - -// CreateKeyValueStoreRequest generates a "aws/request.Request" representing the -// client's request for the CreateKeyValueStore 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 CreateKeyValueStore for more information on using the CreateKeyValueStore -// 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 CreateKeyValueStoreRequest method. -// req, resp := client.CreateKeyValueStoreRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateKeyValueStore -func (c *CloudFront) CreateKeyValueStoreRequest(input *CreateKeyValueStoreInput) (req *request.Request, output *CreateKeyValueStoreOutput) { - op := &request.Operation{ - Name: opCreateKeyValueStore, - HTTPMethod: "POST", - HTTPPath: "/2020-05-31/key-value-store/", - } - - if input == nil { - input = &CreateKeyValueStoreInput{} - } - - output = &CreateKeyValueStoreOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateKeyValueStore API operation for Amazon CloudFront. -// -// Specifies the key value store resource to add to your account. In your account, -// the key value store names must be unique. You can also import key value store -// data in JSON format from an S3 bucket by providing a valid ImportSource that -// you own. -// -// 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 CloudFront's -// API operation CreateKeyValueStore for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeEntityLimitExceeded "EntityLimitExceeded" -// The key value store entity limit has been exceeded. -// -// - ErrCodeEntityAlreadyExists "EntityAlreadyExists" -// The key value store entity already exists. You must provide a unique key -// value store entity. -// -// - ErrCodeEntitySizeLimitExceeded "EntitySizeLimitExceeded" -// The key value store entity size limit was exceeded. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeUnsupportedOperation "UnsupportedOperation" -// This operation is not supported in this region. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateKeyValueStore -func (c *CloudFront) CreateKeyValueStore(input *CreateKeyValueStoreInput) (*CreateKeyValueStoreOutput, error) { - req, out := c.CreateKeyValueStoreRequest(input) - return out, req.Send() -} - -// CreateKeyValueStoreWithContext is the same as CreateKeyValueStore with the addition of -// the ability to pass a context and additional request options. -// -// See CreateKeyValueStore 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 *CloudFront) CreateKeyValueStoreWithContext(ctx aws.Context, input *CreateKeyValueStoreInput, opts ...request.Option) (*CreateKeyValueStoreOutput, error) { - req, out := c.CreateKeyValueStoreRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateMonitoringSubscription = "CreateMonitoringSubscription2020_05_31" - -// CreateMonitoringSubscriptionRequest generates a "aws/request.Request" representing the -// client's request for the CreateMonitoringSubscription 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 CreateMonitoringSubscription for more information on using the CreateMonitoringSubscription -// 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 CreateMonitoringSubscriptionRequest method. -// req, resp := client.CreateMonitoringSubscriptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateMonitoringSubscription -func (c *CloudFront) CreateMonitoringSubscriptionRequest(input *CreateMonitoringSubscriptionInput) (req *request.Request, output *CreateMonitoringSubscriptionOutput) { - op := &request.Operation{ - Name: opCreateMonitoringSubscription, - HTTPMethod: "POST", - HTTPPath: "/2020-05-31/distributions/{DistributionId}/monitoring-subscription/", - } - - if input == nil { - input = &CreateMonitoringSubscriptionInput{} - } - - output = &CreateMonitoringSubscriptionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateMonitoringSubscription API operation for Amazon CloudFront. -// -// Enables additional CloudWatch metrics for the specified CloudFront distribution. -// The additional metrics incur an additional cost. -// -// For more information, see Viewing additional CloudFront distribution metrics -// (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/viewing-cloudfront-metrics.html#monitoring-console.distributions-additional) -// in the Amazon CloudFront Developer 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 CloudFront's -// API operation CreateMonitoringSubscription for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeNoSuchDistribution "NoSuchDistribution" -// The specified distribution does not exist. -// -// - ErrCodeMonitoringSubscriptionAlreadyExists "MonitoringSubscriptionAlreadyExists" -// A monitoring subscription already exists for the specified distribution. -// -// - ErrCodeUnsupportedOperation "UnsupportedOperation" -// This operation is not supported in this region. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateMonitoringSubscription -func (c *CloudFront) CreateMonitoringSubscription(input *CreateMonitoringSubscriptionInput) (*CreateMonitoringSubscriptionOutput, error) { - req, out := c.CreateMonitoringSubscriptionRequest(input) - return out, req.Send() -} - -// CreateMonitoringSubscriptionWithContext is the same as CreateMonitoringSubscription with the addition of -// the ability to pass a context and additional request options. -// -// See CreateMonitoringSubscription 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 *CloudFront) CreateMonitoringSubscriptionWithContext(ctx aws.Context, input *CreateMonitoringSubscriptionInput, opts ...request.Option) (*CreateMonitoringSubscriptionOutput, error) { - req, out := c.CreateMonitoringSubscriptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateOriginAccessControl = "CreateOriginAccessControl2020_05_31" - -// CreateOriginAccessControlRequest generates a "aws/request.Request" representing the -// client's request for the CreateOriginAccessControl 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 CreateOriginAccessControl for more information on using the CreateOriginAccessControl -// 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 CreateOriginAccessControlRequest method. -// req, resp := client.CreateOriginAccessControlRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateOriginAccessControl -func (c *CloudFront) CreateOriginAccessControlRequest(input *CreateOriginAccessControlInput) (req *request.Request, output *CreateOriginAccessControlOutput) { - op := &request.Operation{ - Name: opCreateOriginAccessControl, - HTTPMethod: "POST", - HTTPPath: "/2020-05-31/origin-access-control", - } - - if input == nil { - input = &CreateOriginAccessControlInput{} - } - - output = &CreateOriginAccessControlOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateOriginAccessControl API operation for Amazon CloudFront. -// -// Creates a new origin access control in CloudFront. After you create an origin -// access control, you can add it to an origin in a CloudFront distribution -// so that CloudFront sends authenticated (signed) requests to the origin. -// -// This makes it possible to block public access to the origin, allowing viewers -// (users) to access the origin's content only through CloudFront. -// -// For more information about using a CloudFront origin access control, see -// Restricting access to an Amazon Web Services origin (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-origin.html) -// in the Amazon CloudFront Developer 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 CloudFront's -// API operation CreateOriginAccessControl for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeOriginAccessControlAlreadyExists "OriginAccessControlAlreadyExists" -// An origin access control with the specified parameters already exists. -// -// - ErrCodeTooManyOriginAccessControls "TooManyOriginAccessControls" -// The number of origin access controls in your Amazon Web Services account -// exceeds the maximum allowed. -// -// For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateOriginAccessControl -func (c *CloudFront) CreateOriginAccessControl(input *CreateOriginAccessControlInput) (*CreateOriginAccessControlOutput, error) { - req, out := c.CreateOriginAccessControlRequest(input) - return out, req.Send() -} - -// CreateOriginAccessControlWithContext is the same as CreateOriginAccessControl with the addition of -// the ability to pass a context and additional request options. -// -// See CreateOriginAccessControl 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 *CloudFront) CreateOriginAccessControlWithContext(ctx aws.Context, input *CreateOriginAccessControlInput, opts ...request.Option) (*CreateOriginAccessControlOutput, error) { - req, out := c.CreateOriginAccessControlRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateOriginRequestPolicy = "CreateOriginRequestPolicy2020_05_31" - -// CreateOriginRequestPolicyRequest generates a "aws/request.Request" representing the -// client's request for the CreateOriginRequestPolicy 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 CreateOriginRequestPolicy for more information on using the CreateOriginRequestPolicy -// 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 CreateOriginRequestPolicyRequest method. -// req, resp := client.CreateOriginRequestPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateOriginRequestPolicy -func (c *CloudFront) CreateOriginRequestPolicyRequest(input *CreateOriginRequestPolicyInput) (req *request.Request, output *CreateOriginRequestPolicyOutput) { - op := &request.Operation{ - Name: opCreateOriginRequestPolicy, - HTTPMethod: "POST", - HTTPPath: "/2020-05-31/origin-request-policy", - } - - if input == nil { - input = &CreateOriginRequestPolicyInput{} - } - - output = &CreateOriginRequestPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateOriginRequestPolicy API operation for Amazon CloudFront. -// -// Creates an origin request policy. -// -// After you create an origin request policy, you can attach it to one or more -// cache behaviors. When it's attached to a cache behavior, the origin request -// policy determines the values that CloudFront includes in requests that it -// sends to the origin. Each request that CloudFront sends to the origin includes -// the following: -// -// - The request body and the URL path (without the domain name) from the -// viewer request. -// -// - The headers that CloudFront automatically includes in every origin request, -// including Host, User-Agent, and X-Amz-Cf-Id. -// -// - All HTTP headers, cookies, and URL query strings that are specified -// in the cache policy or the origin request policy. These can include items -// from the viewer request and, in the case of headers, additional ones that -// are added by CloudFront. -// -// CloudFront sends a request when it can't find a valid object in its cache -// that matches the request. If you want to send values to the origin and also -// include them in the cache key, use CachePolicy. -// -// For more information about origin request policies, see Controlling origin -// requests (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html) -// in the Amazon CloudFront Developer 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 CloudFront's -// API operation CreateOriginRequestPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeOriginRequestPolicyAlreadyExists "OriginRequestPolicyAlreadyExists" -// An origin request policy with this name already exists. You must provide -// a unique name. To modify an existing origin request policy, use UpdateOriginRequestPolicy. -// -// - ErrCodeTooManyOriginRequestPolicies "TooManyOriginRequestPolicies" -// You have reached the maximum number of origin request policies for this Amazon -// Web Services account. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyHeadersInOriginRequestPolicy "TooManyHeadersInOriginRequestPolicy" -// The number of headers in the origin request policy exceeds the maximum. For -// more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyCookiesInOriginRequestPolicy "TooManyCookiesInOriginRequestPolicy" -// The number of cookies in the origin request policy exceeds the maximum. For -// more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyQueryStringsInOriginRequestPolicy "TooManyQueryStringsInOriginRequestPolicy" -// The number of query strings in the origin request policy exceeds the maximum. -// For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateOriginRequestPolicy -func (c *CloudFront) CreateOriginRequestPolicy(input *CreateOriginRequestPolicyInput) (*CreateOriginRequestPolicyOutput, error) { - req, out := c.CreateOriginRequestPolicyRequest(input) - return out, req.Send() -} - -// CreateOriginRequestPolicyWithContext is the same as CreateOriginRequestPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See CreateOriginRequestPolicy 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 *CloudFront) CreateOriginRequestPolicyWithContext(ctx aws.Context, input *CreateOriginRequestPolicyInput, opts ...request.Option) (*CreateOriginRequestPolicyOutput, error) { - req, out := c.CreateOriginRequestPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreatePublicKey = "CreatePublicKey2020_05_31" - -// CreatePublicKeyRequest generates a "aws/request.Request" representing the -// client's request for the CreatePublicKey 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 CreatePublicKey for more information on using the CreatePublicKey -// 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 CreatePublicKeyRequest method. -// req, resp := client.CreatePublicKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreatePublicKey -func (c *CloudFront) CreatePublicKeyRequest(input *CreatePublicKeyInput) (req *request.Request, output *CreatePublicKeyOutput) { - op := &request.Operation{ - Name: opCreatePublicKey, - HTTPMethod: "POST", - HTTPPath: "/2020-05-31/public-key", - } - - if input == nil { - input = &CreatePublicKeyInput{} - } - - output = &CreatePublicKeyOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreatePublicKey API operation for Amazon CloudFront. -// -// Uploads a public key to CloudFront that you can use with signed URLs and -// signed cookies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html), -// or with field-level encryption (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/field-level-encryption.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 CloudFront's -// API operation CreatePublicKey for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodePublicKeyAlreadyExists "PublicKeyAlreadyExists" -// The specified public key already exists. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeTooManyPublicKeys "TooManyPublicKeys" -// The maximum number of public keys for field-level encryption have been created. -// To create a new public key, delete one of the existing keys. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreatePublicKey -func (c *CloudFront) CreatePublicKey(input *CreatePublicKeyInput) (*CreatePublicKeyOutput, error) { - req, out := c.CreatePublicKeyRequest(input) - return out, req.Send() -} - -// CreatePublicKeyWithContext is the same as CreatePublicKey with the addition of -// the ability to pass a context and additional request options. -// -// See CreatePublicKey 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 *CloudFront) CreatePublicKeyWithContext(ctx aws.Context, input *CreatePublicKeyInput, opts ...request.Option) (*CreatePublicKeyOutput, error) { - req, out := c.CreatePublicKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateRealtimeLogConfig = "CreateRealtimeLogConfig2020_05_31" - -// CreateRealtimeLogConfigRequest generates a "aws/request.Request" representing the -// client's request for the CreateRealtimeLogConfig 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 CreateRealtimeLogConfig for more information on using the CreateRealtimeLogConfig -// 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 CreateRealtimeLogConfigRequest method. -// req, resp := client.CreateRealtimeLogConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateRealtimeLogConfig -func (c *CloudFront) CreateRealtimeLogConfigRequest(input *CreateRealtimeLogConfigInput) (req *request.Request, output *CreateRealtimeLogConfigOutput) { - op := &request.Operation{ - Name: opCreateRealtimeLogConfig, - HTTPMethod: "POST", - HTTPPath: "/2020-05-31/realtime-log-config", - } - - if input == nil { - input = &CreateRealtimeLogConfigInput{} - } - - output = &CreateRealtimeLogConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateRealtimeLogConfig API operation for Amazon CloudFront. -// -// Creates a real-time log configuration. -// -// After you create a real-time log configuration, you can attach it to one -// or more cache behaviors to send real-time log data to the specified Amazon -// Kinesis data stream. -// -// For more information about real-time log configurations, see Real-time logs -// (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html) -// in the Amazon CloudFront Developer 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 CloudFront's -// API operation CreateRealtimeLogConfig for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeRealtimeLogConfigAlreadyExists "RealtimeLogConfigAlreadyExists" -// A real-time log configuration with this name already exists. You must provide -// a unique name. To modify an existing real-time log configuration, use UpdateRealtimeLogConfig. -// -// - ErrCodeTooManyRealtimeLogConfigs "TooManyRealtimeLogConfigs" -// You have reached the maximum number of real-time log configurations for this -// Amazon Web Services account. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateRealtimeLogConfig -func (c *CloudFront) CreateRealtimeLogConfig(input *CreateRealtimeLogConfigInput) (*CreateRealtimeLogConfigOutput, error) { - req, out := c.CreateRealtimeLogConfigRequest(input) - return out, req.Send() -} - -// CreateRealtimeLogConfigWithContext is the same as CreateRealtimeLogConfig with the addition of -// the ability to pass a context and additional request options. -// -// See CreateRealtimeLogConfig 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 *CloudFront) CreateRealtimeLogConfigWithContext(ctx aws.Context, input *CreateRealtimeLogConfigInput, opts ...request.Option) (*CreateRealtimeLogConfigOutput, error) { - req, out := c.CreateRealtimeLogConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateResponseHeadersPolicy = "CreateResponseHeadersPolicy2020_05_31" - -// CreateResponseHeadersPolicyRequest generates a "aws/request.Request" representing the -// client's request for the CreateResponseHeadersPolicy 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 CreateResponseHeadersPolicy for more information on using the CreateResponseHeadersPolicy -// 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 CreateResponseHeadersPolicyRequest method. -// req, resp := client.CreateResponseHeadersPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateResponseHeadersPolicy -func (c *CloudFront) CreateResponseHeadersPolicyRequest(input *CreateResponseHeadersPolicyInput) (req *request.Request, output *CreateResponseHeadersPolicyOutput) { - op := &request.Operation{ - Name: opCreateResponseHeadersPolicy, - HTTPMethod: "POST", - HTTPPath: "/2020-05-31/response-headers-policy", - } - - if input == nil { - input = &CreateResponseHeadersPolicyInput{} - } - - output = &CreateResponseHeadersPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateResponseHeadersPolicy API operation for Amazon CloudFront. -// -// Creates a response headers policy. -// -// A response headers policy contains information about a set of HTTP headers. -// To create a response headers policy, you provide some metadata about the -// policy and a set of configurations that specify the headers. -// -// After you create a response headers policy, you can use its ID to attach -// it to one or more cache behaviors in a CloudFront distribution. When it's -// attached to a cache behavior, the response headers policy affects the HTTP -// headers that CloudFront includes in HTTP responses to requests that match -// the cache behavior. CloudFront adds or removes response headers according -// to the configuration of the response headers policy. -// -// For more information, see Adding or removing HTTP headers in CloudFront responses -// (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/modifying-response-headers.html) -// in the Amazon CloudFront Developer 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 CloudFront's -// API operation CreateResponseHeadersPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeResponseHeadersPolicyAlreadyExists "ResponseHeadersPolicyAlreadyExists" -// A response headers policy with this name already exists. You must provide -// a unique name. To modify an existing response headers policy, use UpdateResponseHeadersPolicy. -// -// - ErrCodeTooManyResponseHeadersPolicies "TooManyResponseHeadersPolicies" -// You have reached the maximum number of response headers policies for this -// Amazon Web Services account. -// -// For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyCustomHeadersInResponseHeadersPolicy "TooManyCustomHeadersInResponseHeadersPolicy" -// The number of custom headers in the response headers policy exceeds the maximum. -// -// For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooLongCSPInResponseHeadersPolicy "TooLongCSPInResponseHeadersPolicy" -// The length of the Content-Security-Policy header value in the response headers -// policy exceeds the maximum. -// -// For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyRemoveHeadersInResponseHeadersPolicy "TooManyRemoveHeadersInResponseHeadersPolicy" -// The number of headers in RemoveHeadersConfig in the response headers policy -// exceeds the maximum. -// -// For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateResponseHeadersPolicy -func (c *CloudFront) CreateResponseHeadersPolicy(input *CreateResponseHeadersPolicyInput) (*CreateResponseHeadersPolicyOutput, error) { - req, out := c.CreateResponseHeadersPolicyRequest(input) - return out, req.Send() -} - -// CreateResponseHeadersPolicyWithContext is the same as CreateResponseHeadersPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See CreateResponseHeadersPolicy 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 *CloudFront) CreateResponseHeadersPolicyWithContext(ctx aws.Context, input *CreateResponseHeadersPolicyInput, opts ...request.Option) (*CreateResponseHeadersPolicyOutput, error) { - req, out := c.CreateResponseHeadersPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateStreamingDistribution = "CreateStreamingDistribution2020_05_31" - -// CreateStreamingDistributionRequest generates a "aws/request.Request" representing the -// client's request for the CreateStreamingDistribution 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 CreateStreamingDistribution for more information on using the CreateStreamingDistribution -// 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 CreateStreamingDistributionRequest method. -// req, resp := client.CreateStreamingDistributionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateStreamingDistribution -func (c *CloudFront) CreateStreamingDistributionRequest(input *CreateStreamingDistributionInput) (req *request.Request, output *CreateStreamingDistributionOutput) { - op := &request.Operation{ - Name: opCreateStreamingDistribution, - HTTPMethod: "POST", - HTTPPath: "/2020-05-31/streaming-distribution", - } - - if input == nil { - input = &CreateStreamingDistributionInput{} - } - - output = &CreateStreamingDistributionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateStreamingDistribution API operation for Amazon CloudFront. -// -// This API is deprecated. Amazon CloudFront is deprecating real-time messaging -// protocol (RTMP) distributions on December 31, 2020. For more information, -// read the announcement (http://forums.aws.amazon.com/ann.jspa?annID=7356) -// on the Amazon CloudFront discussion forum. -// -// 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 CloudFront's -// API operation CreateStreamingDistribution for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeCNAMEAlreadyExists "CNAMEAlreadyExists" -// The CNAME specified is already defined for CloudFront. -// -// - ErrCodeStreamingDistributionAlreadyExists "StreamingDistributionAlreadyExists" -// The caller reference you attempted to create the streaming distribution with -// is associated with another distribution -// -// - ErrCodeInvalidOrigin "InvalidOrigin" -// The Amazon S3 origin server specified does not refer to a valid Amazon S3 -// bucket. -// -// - ErrCodeInvalidOriginAccessIdentity "InvalidOriginAccessIdentity" -// The origin access identity is not valid or doesn't exist. -// -// - ErrCodeInvalidOriginAccessControl "InvalidOriginAccessControl" -// The origin access control is not valid. -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeTooManyTrustedSigners "TooManyTrustedSigners" -// Your request contains more trusted signers than are allowed per distribution. -// -// - ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist" -// One or more of your trusted signers don't exist. -// -// - ErrCodeMissingBody "MissingBody" -// This operation requires a body. Ensure that the body is present and the Content-Type -// header is set. -// -// - ErrCodeTooManyStreamingDistributionCNAMEs "TooManyStreamingDistributionCNAMEs" -// Your request contains more CNAMEs than are allowed per distribution. -// -// - ErrCodeTooManyStreamingDistributions "TooManyStreamingDistributions" -// Processing your request would cause you to exceed the maximum number of streaming -// distributions allowed. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateStreamingDistribution -func (c *CloudFront) CreateStreamingDistribution(input *CreateStreamingDistributionInput) (*CreateStreamingDistributionOutput, error) { - req, out := c.CreateStreamingDistributionRequest(input) - return out, req.Send() -} - -// CreateStreamingDistributionWithContext is the same as CreateStreamingDistribution with the addition of -// the ability to pass a context and additional request options. -// -// See CreateStreamingDistribution 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 *CloudFront) CreateStreamingDistributionWithContext(ctx aws.Context, input *CreateStreamingDistributionInput, opts ...request.Option) (*CreateStreamingDistributionOutput, error) { - req, out := c.CreateStreamingDistributionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateStreamingDistributionWithTags = "CreateStreamingDistributionWithTags2020_05_31" - -// CreateStreamingDistributionWithTagsRequest generates a "aws/request.Request" representing the -// client's request for the CreateStreamingDistributionWithTags 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 CreateStreamingDistributionWithTags for more information on using the CreateStreamingDistributionWithTags -// 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 CreateStreamingDistributionWithTagsRequest method. -// req, resp := client.CreateStreamingDistributionWithTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateStreamingDistributionWithTags -func (c *CloudFront) CreateStreamingDistributionWithTagsRequest(input *CreateStreamingDistributionWithTagsInput) (req *request.Request, output *CreateStreamingDistributionWithTagsOutput) { - op := &request.Operation{ - Name: opCreateStreamingDistributionWithTags, - HTTPMethod: "POST", - HTTPPath: "/2020-05-31/streaming-distribution?WithTags", - } - - if input == nil { - input = &CreateStreamingDistributionWithTagsInput{} - } - - output = &CreateStreamingDistributionWithTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateStreamingDistributionWithTags API operation for Amazon CloudFront. -// -// This API is deprecated. Amazon CloudFront is deprecating real-time messaging -// protocol (RTMP) distributions on December 31, 2020. For more information, -// read the announcement (http://forums.aws.amazon.com/ann.jspa?annID=7356) -// on the Amazon CloudFront discussion forum. -// -// 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 CloudFront's -// API operation CreateStreamingDistributionWithTags for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeCNAMEAlreadyExists "CNAMEAlreadyExists" -// The CNAME specified is already defined for CloudFront. -// -// - ErrCodeStreamingDistributionAlreadyExists "StreamingDistributionAlreadyExists" -// The caller reference you attempted to create the streaming distribution with -// is associated with another distribution -// -// - ErrCodeInvalidOrigin "InvalidOrigin" -// The Amazon S3 origin server specified does not refer to a valid Amazon S3 -// bucket. -// -// - ErrCodeInvalidOriginAccessIdentity "InvalidOriginAccessIdentity" -// The origin access identity is not valid or doesn't exist. -// -// - ErrCodeInvalidOriginAccessControl "InvalidOriginAccessControl" -// The origin access control is not valid. -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeTooManyTrustedSigners "TooManyTrustedSigners" -// Your request contains more trusted signers than are allowed per distribution. -// -// - ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist" -// One or more of your trusted signers don't exist. -// -// - ErrCodeMissingBody "MissingBody" -// This operation requires a body. Ensure that the body is present and the Content-Type -// header is set. -// -// - ErrCodeTooManyStreamingDistributionCNAMEs "TooManyStreamingDistributionCNAMEs" -// Your request contains more CNAMEs than are allowed per distribution. -// -// - ErrCodeTooManyStreamingDistributions "TooManyStreamingDistributions" -// Processing your request would cause you to exceed the maximum number of streaming -// distributions allowed. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// - ErrCodeInvalidTagging "InvalidTagging" -// The tagging specified is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CreateStreamingDistributionWithTags -func (c *CloudFront) CreateStreamingDistributionWithTags(input *CreateStreamingDistributionWithTagsInput) (*CreateStreamingDistributionWithTagsOutput, error) { - req, out := c.CreateStreamingDistributionWithTagsRequest(input) - return out, req.Send() -} - -// CreateStreamingDistributionWithTagsWithContext is the same as CreateStreamingDistributionWithTags with the addition of -// the ability to pass a context and additional request options. -// -// See CreateStreamingDistributionWithTags 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 *CloudFront) CreateStreamingDistributionWithTagsWithContext(ctx aws.Context, input *CreateStreamingDistributionWithTagsInput, opts ...request.Option) (*CreateStreamingDistributionWithTagsOutput, error) { - req, out := c.CreateStreamingDistributionWithTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteCachePolicy = "DeleteCachePolicy2020_05_31" - -// DeleteCachePolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteCachePolicy 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 DeleteCachePolicy for more information on using the DeleteCachePolicy -// 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 DeleteCachePolicyRequest method. -// req, resp := client.DeleteCachePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteCachePolicy -func (c *CloudFront) DeleteCachePolicyRequest(input *DeleteCachePolicyInput) (req *request.Request, output *DeleteCachePolicyOutput) { - op := &request.Operation{ - Name: opDeleteCachePolicy, - HTTPMethod: "DELETE", - HTTPPath: "/2020-05-31/cache-policy/{Id}", - } - - if input == nil { - input = &DeleteCachePolicyInput{} - } - - output = &DeleteCachePolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteCachePolicy API operation for Amazon CloudFront. -// -// Deletes a cache policy. -// -// You cannot delete a cache policy if it's attached to a cache behavior. First -// update your distributions to remove the cache policy from all cache behaviors, -// then delete the cache policy. -// -// To delete a cache policy, you must provide the policy's identifier and version. -// To get these values, you can use ListCachePolicies or GetCachePolicy. -// -// 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 CloudFront's -// API operation DeleteCachePolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeNoSuchCachePolicy "NoSuchCachePolicy" -// The cache policy does not exist. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// - ErrCodeIllegalDelete "IllegalDelete" -// You cannot delete a managed policy. -// -// - ErrCodeCachePolicyInUse "CachePolicyInUse" -// Cannot delete the cache policy because it is attached to one or more cache -// behaviors. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteCachePolicy -func (c *CloudFront) DeleteCachePolicy(input *DeleteCachePolicyInput) (*DeleteCachePolicyOutput, error) { - req, out := c.DeleteCachePolicyRequest(input) - return out, req.Send() -} - -// DeleteCachePolicyWithContext is the same as DeleteCachePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteCachePolicy 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 *CloudFront) DeleteCachePolicyWithContext(ctx aws.Context, input *DeleteCachePolicyInput, opts ...request.Option) (*DeleteCachePolicyOutput, error) { - req, out := c.DeleteCachePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteCloudFrontOriginAccessIdentity = "DeleteCloudFrontOriginAccessIdentity2020_05_31" - -// DeleteCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the -// client's request for the DeleteCloudFrontOriginAccessIdentity 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 DeleteCloudFrontOriginAccessIdentity for more information on using the DeleteCloudFrontOriginAccessIdentity -// 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 DeleteCloudFrontOriginAccessIdentityRequest method. -// req, resp := client.DeleteCloudFrontOriginAccessIdentityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteCloudFrontOriginAccessIdentity -func (c *CloudFront) DeleteCloudFrontOriginAccessIdentityRequest(input *DeleteCloudFrontOriginAccessIdentityInput) (req *request.Request, output *DeleteCloudFrontOriginAccessIdentityOutput) { - op := &request.Operation{ - Name: opDeleteCloudFrontOriginAccessIdentity, - HTTPMethod: "DELETE", - HTTPPath: "/2020-05-31/origin-access-identity/cloudfront/{Id}", - } - - if input == nil { - input = &DeleteCloudFrontOriginAccessIdentityInput{} - } - - output = &DeleteCloudFrontOriginAccessIdentityOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteCloudFrontOriginAccessIdentity API operation for Amazon CloudFront. -// -// Delete an origin access identity. -// -// 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 CloudFront's -// API operation DeleteCloudFrontOriginAccessIdentity for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeNoSuchCloudFrontOriginAccessIdentity "NoSuchCloudFrontOriginAccessIdentity" -// The specified origin access identity does not exist. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// - ErrCodeOriginAccessIdentityInUse "CloudFrontOriginAccessIdentityInUse" -// The Origin Access Identity specified is already in use. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteCloudFrontOriginAccessIdentity -func (c *CloudFront) DeleteCloudFrontOriginAccessIdentity(input *DeleteCloudFrontOriginAccessIdentityInput) (*DeleteCloudFrontOriginAccessIdentityOutput, error) { - req, out := c.DeleteCloudFrontOriginAccessIdentityRequest(input) - return out, req.Send() -} - -// DeleteCloudFrontOriginAccessIdentityWithContext is the same as DeleteCloudFrontOriginAccessIdentity with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteCloudFrontOriginAccessIdentity 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 *CloudFront) DeleteCloudFrontOriginAccessIdentityWithContext(ctx aws.Context, input *DeleteCloudFrontOriginAccessIdentityInput, opts ...request.Option) (*DeleteCloudFrontOriginAccessIdentityOutput, error) { - req, out := c.DeleteCloudFrontOriginAccessIdentityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteContinuousDeploymentPolicy = "DeleteContinuousDeploymentPolicy2020_05_31" - -// DeleteContinuousDeploymentPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteContinuousDeploymentPolicy 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 DeleteContinuousDeploymentPolicy for more information on using the DeleteContinuousDeploymentPolicy -// 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 DeleteContinuousDeploymentPolicyRequest method. -// req, resp := client.DeleteContinuousDeploymentPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteContinuousDeploymentPolicy -func (c *CloudFront) DeleteContinuousDeploymentPolicyRequest(input *DeleteContinuousDeploymentPolicyInput) (req *request.Request, output *DeleteContinuousDeploymentPolicyOutput) { - op := &request.Operation{ - Name: opDeleteContinuousDeploymentPolicy, - HTTPMethod: "DELETE", - HTTPPath: "/2020-05-31/continuous-deployment-policy/{Id}", - } - - if input == nil { - input = &DeleteContinuousDeploymentPolicyInput{} - } - - output = &DeleteContinuousDeploymentPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteContinuousDeploymentPolicy API operation for Amazon CloudFront. -// -// Deletes a continuous deployment policy. -// -// You cannot delete a continuous deployment policy that's attached to a primary -// distribution. First update your distribution to remove the continuous deployment -// policy, then you can delete 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 Amazon CloudFront's -// API operation DeleteContinuousDeploymentPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// - ErrCodeContinuousDeploymentPolicyInUse "ContinuousDeploymentPolicyInUse" -// You cannot delete a continuous deployment policy that is associated with -// a primary distribution. -// -// - ErrCodeNoSuchContinuousDeploymentPolicy "NoSuchContinuousDeploymentPolicy" -// The continuous deployment policy doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteContinuousDeploymentPolicy -func (c *CloudFront) DeleteContinuousDeploymentPolicy(input *DeleteContinuousDeploymentPolicyInput) (*DeleteContinuousDeploymentPolicyOutput, error) { - req, out := c.DeleteContinuousDeploymentPolicyRequest(input) - return out, req.Send() -} - -// DeleteContinuousDeploymentPolicyWithContext is the same as DeleteContinuousDeploymentPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteContinuousDeploymentPolicy 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 *CloudFront) DeleteContinuousDeploymentPolicyWithContext(ctx aws.Context, input *DeleteContinuousDeploymentPolicyInput, opts ...request.Option) (*DeleteContinuousDeploymentPolicyOutput, error) { - req, out := c.DeleteContinuousDeploymentPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteDistribution = "DeleteDistribution2020_05_31" - -// DeleteDistributionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDistribution 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 DeleteDistribution for more information on using the DeleteDistribution -// 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 DeleteDistributionRequest method. -// req, resp := client.DeleteDistributionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteDistribution -func (c *CloudFront) DeleteDistributionRequest(input *DeleteDistributionInput) (req *request.Request, output *DeleteDistributionOutput) { - op := &request.Operation{ - Name: opDeleteDistribution, - HTTPMethod: "DELETE", - HTTPPath: "/2020-05-31/distribution/{Id}", - } - - if input == nil { - input = &DeleteDistributionInput{} - } - - output = &DeleteDistributionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteDistribution API operation for Amazon CloudFront. -// -// Delete a distribution. -// -// 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 CloudFront's -// API operation DeleteDistribution for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeDistributionNotDisabled "DistributionNotDisabled" -// The specified CloudFront distribution is not disabled. You must disable the -// distribution before you can delete it. -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeNoSuchDistribution "NoSuchDistribution" -// The specified distribution does not exist. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteDistribution -func (c *CloudFront) DeleteDistribution(input *DeleteDistributionInput) (*DeleteDistributionOutput, error) { - req, out := c.DeleteDistributionRequest(input) - return out, req.Send() -} - -// DeleteDistributionWithContext is the same as DeleteDistribution with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteDistribution 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 *CloudFront) DeleteDistributionWithContext(ctx aws.Context, input *DeleteDistributionInput, opts ...request.Option) (*DeleteDistributionOutput, error) { - req, out := c.DeleteDistributionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteFieldLevelEncryptionConfig = "DeleteFieldLevelEncryptionConfig2020_05_31" - -// DeleteFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the -// client's request for the DeleteFieldLevelEncryptionConfig 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 DeleteFieldLevelEncryptionConfig for more information on using the DeleteFieldLevelEncryptionConfig -// 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 DeleteFieldLevelEncryptionConfigRequest method. -// req, resp := client.DeleteFieldLevelEncryptionConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteFieldLevelEncryptionConfig -func (c *CloudFront) DeleteFieldLevelEncryptionConfigRequest(input *DeleteFieldLevelEncryptionConfigInput) (req *request.Request, output *DeleteFieldLevelEncryptionConfigOutput) { - op := &request.Operation{ - Name: opDeleteFieldLevelEncryptionConfig, - HTTPMethod: "DELETE", - HTTPPath: "/2020-05-31/field-level-encryption/{Id}", - } - - if input == nil { - input = &DeleteFieldLevelEncryptionConfigInput{} - } - - output = &DeleteFieldLevelEncryptionConfigOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteFieldLevelEncryptionConfig API operation for Amazon CloudFront. -// -// Remove a field-level encryption configuration. -// -// 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 CloudFront's -// API operation DeleteFieldLevelEncryptionConfig for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" -// The specified configuration for field-level encryption doesn't exist. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// - ErrCodeFieldLevelEncryptionConfigInUse "FieldLevelEncryptionConfigInUse" -// The specified configuration for field-level encryption is in use. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteFieldLevelEncryptionConfig -func (c *CloudFront) DeleteFieldLevelEncryptionConfig(input *DeleteFieldLevelEncryptionConfigInput) (*DeleteFieldLevelEncryptionConfigOutput, error) { - req, out := c.DeleteFieldLevelEncryptionConfigRequest(input) - return out, req.Send() -} - -// DeleteFieldLevelEncryptionConfigWithContext is the same as DeleteFieldLevelEncryptionConfig with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteFieldLevelEncryptionConfig 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 *CloudFront) DeleteFieldLevelEncryptionConfigWithContext(ctx aws.Context, input *DeleteFieldLevelEncryptionConfigInput, opts ...request.Option) (*DeleteFieldLevelEncryptionConfigOutput, error) { - req, out := c.DeleteFieldLevelEncryptionConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteFieldLevelEncryptionProfile = "DeleteFieldLevelEncryptionProfile2020_05_31" - -// DeleteFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the -// client's request for the DeleteFieldLevelEncryptionProfile 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 DeleteFieldLevelEncryptionProfile for more information on using the DeleteFieldLevelEncryptionProfile -// 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 DeleteFieldLevelEncryptionProfileRequest method. -// req, resp := client.DeleteFieldLevelEncryptionProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteFieldLevelEncryptionProfile -func (c *CloudFront) DeleteFieldLevelEncryptionProfileRequest(input *DeleteFieldLevelEncryptionProfileInput) (req *request.Request, output *DeleteFieldLevelEncryptionProfileOutput) { - op := &request.Operation{ - Name: opDeleteFieldLevelEncryptionProfile, - HTTPMethod: "DELETE", - HTTPPath: "/2020-05-31/field-level-encryption-profile/{Id}", - } - - if input == nil { - input = &DeleteFieldLevelEncryptionProfileInput{} - } - - output = &DeleteFieldLevelEncryptionProfileOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteFieldLevelEncryptionProfile API operation for Amazon CloudFront. -// -// Remove a field-level encryption profile. -// -// 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 CloudFront's -// API operation DeleteFieldLevelEncryptionProfile for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile" -// The specified profile for field-level encryption doesn't exist. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// - ErrCodeFieldLevelEncryptionProfileInUse "FieldLevelEncryptionProfileInUse" -// The specified profile for field-level encryption is in use. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteFieldLevelEncryptionProfile -func (c *CloudFront) DeleteFieldLevelEncryptionProfile(input *DeleteFieldLevelEncryptionProfileInput) (*DeleteFieldLevelEncryptionProfileOutput, error) { - req, out := c.DeleteFieldLevelEncryptionProfileRequest(input) - return out, req.Send() -} - -// DeleteFieldLevelEncryptionProfileWithContext is the same as DeleteFieldLevelEncryptionProfile with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteFieldLevelEncryptionProfile 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 *CloudFront) DeleteFieldLevelEncryptionProfileWithContext(ctx aws.Context, input *DeleteFieldLevelEncryptionProfileInput, opts ...request.Option) (*DeleteFieldLevelEncryptionProfileOutput, error) { - req, out := c.DeleteFieldLevelEncryptionProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteFunction = "DeleteFunction2020_05_31" - -// DeleteFunctionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteFunction 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 DeleteFunction for more information on using the DeleteFunction -// 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 DeleteFunctionRequest method. -// req, resp := client.DeleteFunctionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteFunction -func (c *CloudFront) DeleteFunctionRequest(input *DeleteFunctionInput) (req *request.Request, output *DeleteFunctionOutput) { - op := &request.Operation{ - Name: opDeleteFunction, - HTTPMethod: "DELETE", - HTTPPath: "/2020-05-31/function/{Name}", - } - - if input == nil { - input = &DeleteFunctionInput{} - } - - output = &DeleteFunctionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteFunction API operation for Amazon CloudFront. -// -// Deletes a CloudFront function. -// -// You cannot delete a function if it's associated with a cache behavior. First, -// update your distributions to remove the function association from all cache -// behaviors, then delete the function. -// -// To delete a function, you must provide the function's name and version (ETag -// value). To get these values, you can use ListFunctions and DescribeFunction. -// -// 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 CloudFront's -// API operation DeleteFunction for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeNoSuchFunctionExists "NoSuchFunctionExists" -// The function does not exist. -// -// - ErrCodeFunctionInUse "FunctionInUse" -// Cannot delete the function because it's attached to one or more cache behaviors. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// - ErrCodeUnsupportedOperation "UnsupportedOperation" -// This operation is not supported in this region. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteFunction -func (c *CloudFront) DeleteFunction(input *DeleteFunctionInput) (*DeleteFunctionOutput, error) { - req, out := c.DeleteFunctionRequest(input) - return out, req.Send() -} - -// DeleteFunctionWithContext is the same as DeleteFunction with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteFunction 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 *CloudFront) DeleteFunctionWithContext(ctx aws.Context, input *DeleteFunctionInput, opts ...request.Option) (*DeleteFunctionOutput, error) { - req, out := c.DeleteFunctionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteKeyGroup = "DeleteKeyGroup2020_05_31" - -// DeleteKeyGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteKeyGroup 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 DeleteKeyGroup for more information on using the DeleteKeyGroup -// 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 DeleteKeyGroupRequest method. -// req, resp := client.DeleteKeyGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteKeyGroup -func (c *CloudFront) DeleteKeyGroupRequest(input *DeleteKeyGroupInput) (req *request.Request, output *DeleteKeyGroupOutput) { - op := &request.Operation{ - Name: opDeleteKeyGroup, - HTTPMethod: "DELETE", - HTTPPath: "/2020-05-31/key-group/{Id}", - } - - if input == nil { - input = &DeleteKeyGroupInput{} - } - - output = &DeleteKeyGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteKeyGroup API operation for Amazon CloudFront. -// -// Deletes a key group. -// -// You cannot delete a key group that is referenced in a cache behavior. First -// update your distributions to remove the key group from all cache behaviors, -// then delete the key group. -// -// To delete a key group, you must provide the key group's identifier and version. -// To get these values, use ListKeyGroups followed by GetKeyGroup or GetKeyGroupConfig. -// -// 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 CloudFront's -// API operation DeleteKeyGroup for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeNoSuchResource "NoSuchResource" -// A resource that was specified is not valid. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// - ErrCodeResourceInUse "ResourceInUse" -// Cannot delete this resource because it is in use. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteKeyGroup -func (c *CloudFront) DeleteKeyGroup(input *DeleteKeyGroupInput) (*DeleteKeyGroupOutput, error) { - req, out := c.DeleteKeyGroupRequest(input) - return out, req.Send() -} - -// DeleteKeyGroupWithContext is the same as DeleteKeyGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteKeyGroup 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 *CloudFront) DeleteKeyGroupWithContext(ctx aws.Context, input *DeleteKeyGroupInput, opts ...request.Option) (*DeleteKeyGroupOutput, error) { - req, out := c.DeleteKeyGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteKeyValueStore = "DeleteKeyValueStore2020_05_31" - -// DeleteKeyValueStoreRequest generates a "aws/request.Request" representing the -// client's request for the DeleteKeyValueStore 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 DeleteKeyValueStore for more information on using the DeleteKeyValueStore -// 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 DeleteKeyValueStoreRequest method. -// req, resp := client.DeleteKeyValueStoreRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteKeyValueStore -func (c *CloudFront) DeleteKeyValueStoreRequest(input *DeleteKeyValueStoreInput) (req *request.Request, output *DeleteKeyValueStoreOutput) { - op := &request.Operation{ - Name: opDeleteKeyValueStore, - HTTPMethod: "DELETE", - HTTPPath: "/2020-05-31/key-value-store/{Name}", - } - - if input == nil { - input = &DeleteKeyValueStoreInput{} - } - - output = &DeleteKeyValueStoreOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteKeyValueStore API operation for Amazon CloudFront. -// -// Specifies the key value store to delete. -// -// 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 CloudFront's -// API operation DeleteKeyValueStore for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeEntityNotFound "EntityNotFound" -// The key value store entity was not found. -// -// - ErrCodeCannotDeleteEntityWhileInUse "CannotDeleteEntityWhileInUse" -// The key value store entity cannot be deleted while it is in use. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// - ErrCodeUnsupportedOperation "UnsupportedOperation" -// This operation is not supported in this region. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteKeyValueStore -func (c *CloudFront) DeleteKeyValueStore(input *DeleteKeyValueStoreInput) (*DeleteKeyValueStoreOutput, error) { - req, out := c.DeleteKeyValueStoreRequest(input) - return out, req.Send() -} - -// DeleteKeyValueStoreWithContext is the same as DeleteKeyValueStore with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteKeyValueStore 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 *CloudFront) DeleteKeyValueStoreWithContext(ctx aws.Context, input *DeleteKeyValueStoreInput, opts ...request.Option) (*DeleteKeyValueStoreOutput, error) { - req, out := c.DeleteKeyValueStoreRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteMonitoringSubscription = "DeleteMonitoringSubscription2020_05_31" - -// DeleteMonitoringSubscriptionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteMonitoringSubscription 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 DeleteMonitoringSubscription for more information on using the DeleteMonitoringSubscription -// 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 DeleteMonitoringSubscriptionRequest method. -// req, resp := client.DeleteMonitoringSubscriptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteMonitoringSubscription -func (c *CloudFront) DeleteMonitoringSubscriptionRequest(input *DeleteMonitoringSubscriptionInput) (req *request.Request, output *DeleteMonitoringSubscriptionOutput) { - op := &request.Operation{ - Name: opDeleteMonitoringSubscription, - HTTPMethod: "DELETE", - HTTPPath: "/2020-05-31/distributions/{DistributionId}/monitoring-subscription/", - } - - if input == nil { - input = &DeleteMonitoringSubscriptionInput{} - } - - output = &DeleteMonitoringSubscriptionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteMonitoringSubscription API operation for Amazon CloudFront. -// -// Disables additional CloudWatch metrics for the specified CloudFront distribution. -// -// 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 CloudFront's -// API operation DeleteMonitoringSubscription for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeNoSuchDistribution "NoSuchDistribution" -// The specified distribution does not exist. -// -// - ErrCodeNoSuchMonitoringSubscription "NoSuchMonitoringSubscription" -// A monitoring subscription does not exist for the specified distribution. -// -// - ErrCodeUnsupportedOperation "UnsupportedOperation" -// This operation is not supported in this region. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteMonitoringSubscription -func (c *CloudFront) DeleteMonitoringSubscription(input *DeleteMonitoringSubscriptionInput) (*DeleteMonitoringSubscriptionOutput, error) { - req, out := c.DeleteMonitoringSubscriptionRequest(input) - return out, req.Send() -} - -// DeleteMonitoringSubscriptionWithContext is the same as DeleteMonitoringSubscription with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteMonitoringSubscription 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 *CloudFront) DeleteMonitoringSubscriptionWithContext(ctx aws.Context, input *DeleteMonitoringSubscriptionInput, opts ...request.Option) (*DeleteMonitoringSubscriptionOutput, error) { - req, out := c.DeleteMonitoringSubscriptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteOriginAccessControl = "DeleteOriginAccessControl2020_05_31" - -// DeleteOriginAccessControlRequest generates a "aws/request.Request" representing the -// client's request for the DeleteOriginAccessControl 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 DeleteOriginAccessControl for more information on using the DeleteOriginAccessControl -// 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 DeleteOriginAccessControlRequest method. -// req, resp := client.DeleteOriginAccessControlRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteOriginAccessControl -func (c *CloudFront) DeleteOriginAccessControlRequest(input *DeleteOriginAccessControlInput) (req *request.Request, output *DeleteOriginAccessControlOutput) { - op := &request.Operation{ - Name: opDeleteOriginAccessControl, - HTTPMethod: "DELETE", - HTTPPath: "/2020-05-31/origin-access-control/{Id}", - } - - if input == nil { - input = &DeleteOriginAccessControlInput{} - } - - output = &DeleteOriginAccessControlOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteOriginAccessControl API operation for Amazon CloudFront. -// -// Deletes a CloudFront origin access control. -// -// You cannot delete an origin access control if it's in use. First, update -// all distributions to remove the origin access control from all origins, then -// delete the origin access control. -// -// 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 CloudFront's -// API operation DeleteOriginAccessControl for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeNoSuchOriginAccessControl "NoSuchOriginAccessControl" -// The origin access control does not exist. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// - ErrCodeOriginAccessControlInUse "OriginAccessControlInUse" -// Cannot delete the origin access control because it's in use by one or more -// distributions. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteOriginAccessControl -func (c *CloudFront) DeleteOriginAccessControl(input *DeleteOriginAccessControlInput) (*DeleteOriginAccessControlOutput, error) { - req, out := c.DeleteOriginAccessControlRequest(input) - return out, req.Send() -} - -// DeleteOriginAccessControlWithContext is the same as DeleteOriginAccessControl with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteOriginAccessControl 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 *CloudFront) DeleteOriginAccessControlWithContext(ctx aws.Context, input *DeleteOriginAccessControlInput, opts ...request.Option) (*DeleteOriginAccessControlOutput, error) { - req, out := c.DeleteOriginAccessControlRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteOriginRequestPolicy = "DeleteOriginRequestPolicy2020_05_31" - -// DeleteOriginRequestPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteOriginRequestPolicy 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 DeleteOriginRequestPolicy for more information on using the DeleteOriginRequestPolicy -// 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 DeleteOriginRequestPolicyRequest method. -// req, resp := client.DeleteOriginRequestPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteOriginRequestPolicy -func (c *CloudFront) DeleteOriginRequestPolicyRequest(input *DeleteOriginRequestPolicyInput) (req *request.Request, output *DeleteOriginRequestPolicyOutput) { - op := &request.Operation{ - Name: opDeleteOriginRequestPolicy, - HTTPMethod: "DELETE", - HTTPPath: "/2020-05-31/origin-request-policy/{Id}", - } - - if input == nil { - input = &DeleteOriginRequestPolicyInput{} - } - - output = &DeleteOriginRequestPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteOriginRequestPolicy API operation for Amazon CloudFront. -// -// Deletes an origin request policy. -// -// You cannot delete an origin request policy if it's attached to any cache -// behaviors. First update your distributions to remove the origin request policy -// from all cache behaviors, then delete the origin request policy. -// -// To delete an origin request policy, you must provide the policy's identifier -// and version. To get the identifier, you can use ListOriginRequestPolicies -// or GetOriginRequestPolicy. -// -// 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 CloudFront's -// API operation DeleteOriginRequestPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeNoSuchOriginRequestPolicy "NoSuchOriginRequestPolicy" -// The origin request policy does not exist. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// - ErrCodeIllegalDelete "IllegalDelete" -// You cannot delete a managed policy. -// -// - ErrCodeOriginRequestPolicyInUse "OriginRequestPolicyInUse" -// Cannot delete the origin request policy because it is attached to one or -// more cache behaviors. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteOriginRequestPolicy -func (c *CloudFront) DeleteOriginRequestPolicy(input *DeleteOriginRequestPolicyInput) (*DeleteOriginRequestPolicyOutput, error) { - req, out := c.DeleteOriginRequestPolicyRequest(input) - return out, req.Send() -} - -// DeleteOriginRequestPolicyWithContext is the same as DeleteOriginRequestPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteOriginRequestPolicy 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 *CloudFront) DeleteOriginRequestPolicyWithContext(ctx aws.Context, input *DeleteOriginRequestPolicyInput, opts ...request.Option) (*DeleteOriginRequestPolicyOutput, error) { - req, out := c.DeleteOriginRequestPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeletePublicKey = "DeletePublicKey2020_05_31" - -// DeletePublicKeyRequest generates a "aws/request.Request" representing the -// client's request for the DeletePublicKey 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 DeletePublicKey for more information on using the DeletePublicKey -// 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 DeletePublicKeyRequest method. -// req, resp := client.DeletePublicKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeletePublicKey -func (c *CloudFront) DeletePublicKeyRequest(input *DeletePublicKeyInput) (req *request.Request, output *DeletePublicKeyOutput) { - op := &request.Operation{ - Name: opDeletePublicKey, - HTTPMethod: "DELETE", - HTTPPath: "/2020-05-31/public-key/{Id}", - } - - if input == nil { - input = &DeletePublicKeyInput{} - } - - output = &DeletePublicKeyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeletePublicKey API operation for Amazon CloudFront. -// -// Remove a public key you previously added to CloudFront. -// -// 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 CloudFront's -// API operation DeletePublicKey for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodePublicKeyInUse "PublicKeyInUse" -// The specified public key is in use. -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeNoSuchPublicKey "NoSuchPublicKey" -// The specified public key doesn't exist. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeletePublicKey -func (c *CloudFront) DeletePublicKey(input *DeletePublicKeyInput) (*DeletePublicKeyOutput, error) { - req, out := c.DeletePublicKeyRequest(input) - return out, req.Send() -} - -// DeletePublicKeyWithContext is the same as DeletePublicKey with the addition of -// the ability to pass a context and additional request options. -// -// See DeletePublicKey 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 *CloudFront) DeletePublicKeyWithContext(ctx aws.Context, input *DeletePublicKeyInput, opts ...request.Option) (*DeletePublicKeyOutput, error) { - req, out := c.DeletePublicKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRealtimeLogConfig = "DeleteRealtimeLogConfig2020_05_31" - -// DeleteRealtimeLogConfigRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRealtimeLogConfig 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 DeleteRealtimeLogConfig for more information on using the DeleteRealtimeLogConfig -// 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 DeleteRealtimeLogConfigRequest method. -// req, resp := client.DeleteRealtimeLogConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteRealtimeLogConfig -func (c *CloudFront) DeleteRealtimeLogConfigRequest(input *DeleteRealtimeLogConfigInput) (req *request.Request, output *DeleteRealtimeLogConfigOutput) { - op := &request.Operation{ - Name: opDeleteRealtimeLogConfig, - HTTPMethod: "POST", - HTTPPath: "/2020-05-31/delete-realtime-log-config/", - } - - if input == nil { - input = &DeleteRealtimeLogConfigInput{} - } - - output = &DeleteRealtimeLogConfigOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteRealtimeLogConfig API operation for Amazon CloudFront. -// -// Deletes a real-time log configuration. -// -// You cannot delete a real-time log configuration if it's attached to a cache -// behavior. First update your distributions to remove the real-time log configuration -// from all cache behaviors, then delete the real-time log configuration. -// -// To delete a real-time log configuration, you can provide the configuration's -// name or its Amazon Resource Name (ARN). You must provide at least one. If -// you provide both, CloudFront uses the name to identify the real-time log -// configuration to delete. -// -// 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 CloudFront's -// API operation DeleteRealtimeLogConfig for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchRealtimeLogConfig "NoSuchRealtimeLogConfig" -// The real-time log configuration does not exist. -// -// - ErrCodeRealtimeLogConfigInUse "RealtimeLogConfigInUse" -// Cannot delete the real-time log configuration because it is attached to one -// or more cache behaviors. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteRealtimeLogConfig -func (c *CloudFront) DeleteRealtimeLogConfig(input *DeleteRealtimeLogConfigInput) (*DeleteRealtimeLogConfigOutput, error) { - req, out := c.DeleteRealtimeLogConfigRequest(input) - return out, req.Send() -} - -// DeleteRealtimeLogConfigWithContext is the same as DeleteRealtimeLogConfig with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRealtimeLogConfig 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 *CloudFront) DeleteRealtimeLogConfigWithContext(ctx aws.Context, input *DeleteRealtimeLogConfigInput, opts ...request.Option) (*DeleteRealtimeLogConfigOutput, error) { - req, out := c.DeleteRealtimeLogConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteResponseHeadersPolicy = "DeleteResponseHeadersPolicy2020_05_31" - -// DeleteResponseHeadersPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteResponseHeadersPolicy 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 DeleteResponseHeadersPolicy for more information on using the DeleteResponseHeadersPolicy -// 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 DeleteResponseHeadersPolicyRequest method. -// req, resp := client.DeleteResponseHeadersPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteResponseHeadersPolicy -func (c *CloudFront) DeleteResponseHeadersPolicyRequest(input *DeleteResponseHeadersPolicyInput) (req *request.Request, output *DeleteResponseHeadersPolicyOutput) { - op := &request.Operation{ - Name: opDeleteResponseHeadersPolicy, - HTTPMethod: "DELETE", - HTTPPath: "/2020-05-31/response-headers-policy/{Id}", - } - - if input == nil { - input = &DeleteResponseHeadersPolicyInput{} - } - - output = &DeleteResponseHeadersPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteResponseHeadersPolicy API operation for Amazon CloudFront. -// -// Deletes a response headers policy. -// -// You cannot delete a response headers policy if it's attached to a cache behavior. -// First update your distributions to remove the response headers policy from -// all cache behaviors, then delete the response headers policy. -// -// To delete a response headers policy, you must provide the policy's identifier -// and version. To get these values, you can use ListResponseHeadersPolicies -// or GetResponseHeadersPolicy. -// -// 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 CloudFront's -// API operation DeleteResponseHeadersPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeNoSuchResponseHeadersPolicy "NoSuchResponseHeadersPolicy" -// The response headers policy does not exist. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// - ErrCodeIllegalDelete "IllegalDelete" -// You cannot delete a managed policy. -// -// - ErrCodeResponseHeadersPolicyInUse "ResponseHeadersPolicyInUse" -// Cannot delete the response headers policy because it is attached to one or -// more cache behaviors in a CloudFront distribution. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteResponseHeadersPolicy -func (c *CloudFront) DeleteResponseHeadersPolicy(input *DeleteResponseHeadersPolicyInput) (*DeleteResponseHeadersPolicyOutput, error) { - req, out := c.DeleteResponseHeadersPolicyRequest(input) - return out, req.Send() -} - -// DeleteResponseHeadersPolicyWithContext is the same as DeleteResponseHeadersPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteResponseHeadersPolicy 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 *CloudFront) DeleteResponseHeadersPolicyWithContext(ctx aws.Context, input *DeleteResponseHeadersPolicyInput, opts ...request.Option) (*DeleteResponseHeadersPolicyOutput, error) { - req, out := c.DeleteResponseHeadersPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteStreamingDistribution = "DeleteStreamingDistribution2020_05_31" - -// DeleteStreamingDistributionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteStreamingDistribution 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 DeleteStreamingDistribution for more information on using the DeleteStreamingDistribution -// 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 DeleteStreamingDistributionRequest method. -// req, resp := client.DeleteStreamingDistributionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteStreamingDistribution -func (c *CloudFront) DeleteStreamingDistributionRequest(input *DeleteStreamingDistributionInput) (req *request.Request, output *DeleteStreamingDistributionOutput) { - op := &request.Operation{ - Name: opDeleteStreamingDistribution, - HTTPMethod: "DELETE", - HTTPPath: "/2020-05-31/streaming-distribution/{Id}", - } - - if input == nil { - input = &DeleteStreamingDistributionInput{} - } - - output = &DeleteStreamingDistributionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteStreamingDistribution API operation for Amazon CloudFront. -// -// Delete a streaming distribution. To delete an RTMP distribution using the -// CloudFront API, perform the following steps. -// -// To delete an RTMP distribution using the CloudFront API: -// -// Disable the RTMP distribution. -// -// Submit a GET Streaming Distribution Config request to get the current configuration -// and the Etag header for the distribution. -// -// Update the XML document that was returned in the response to your GET Streaming -// Distribution Config request to change the value of Enabled to false. -// -// Submit a PUT Streaming Distribution Config request to update the configuration -// for your distribution. In the request body, include the XML document that -// you updated in Step 3. Then set the value of the HTTP If-Match header to -// the value of the ETag header that CloudFront returned when you submitted -// the GET Streaming Distribution Config request in Step 2. -// -// Review the response to the PUT Streaming Distribution Config request to confirm -// that the distribution was successfully disabled. -// -// Submit a GET Streaming Distribution Config request to confirm that your changes -// have propagated. When propagation is complete, the value of Status is Deployed. -// -// Submit a DELETE Streaming Distribution request. Set the value of the HTTP -// If-Match header to the value of the ETag header that CloudFront returned -// when you submitted the GET Streaming Distribution Config request in Step -// 2. -// -// Review the response to your DELETE Streaming Distribution request to confirm -// that the distribution was successfully deleted. -// -// For information about deleting a distribution using the CloudFront console, -// see Deleting a Distribution (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/HowToDeleteDistribution.html) -// in the Amazon CloudFront Developer 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 CloudFront's -// API operation DeleteStreamingDistribution for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeStreamingDistributionNotDisabled "StreamingDistributionNotDisabled" -// The specified CloudFront distribution is not disabled. You must disable the -// distribution before you can delete it. -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeNoSuchStreamingDistribution "NoSuchStreamingDistribution" -// The specified streaming distribution does not exist. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DeleteStreamingDistribution -func (c *CloudFront) DeleteStreamingDistribution(input *DeleteStreamingDistributionInput) (*DeleteStreamingDistributionOutput, error) { - req, out := c.DeleteStreamingDistributionRequest(input) - return out, req.Send() -} - -// DeleteStreamingDistributionWithContext is the same as DeleteStreamingDistribution with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteStreamingDistribution 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 *CloudFront) DeleteStreamingDistributionWithContext(ctx aws.Context, input *DeleteStreamingDistributionInput, opts ...request.Option) (*DeleteStreamingDistributionOutput, error) { - req, out := c.DeleteStreamingDistributionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeFunction = "DescribeFunction2020_05_31" - -// DescribeFunctionRequest generates a "aws/request.Request" representing the -// client's request for the DescribeFunction 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 DescribeFunction for more information on using the DescribeFunction -// 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 DescribeFunctionRequest method. -// req, resp := client.DescribeFunctionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DescribeFunction -func (c *CloudFront) DescribeFunctionRequest(input *DescribeFunctionInput) (req *request.Request, output *DescribeFunctionOutput) { - op := &request.Operation{ - Name: opDescribeFunction, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/function/{Name}/describe", - } - - if input == nil { - input = &DescribeFunctionInput{} - } - - output = &DescribeFunctionOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeFunction API operation for Amazon CloudFront. -// -// Gets configuration information and metadata about a CloudFront function, -// but not the function's code. To get a function's code, use GetFunction. -// -// To get configuration information and metadata about a function, you must -// provide the function's name and stage. To get these values, you can use ListFunctions. -// -// 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 CloudFront's -// API operation DescribeFunction for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchFunctionExists "NoSuchFunctionExists" -// The function does not exist. -// -// - ErrCodeUnsupportedOperation "UnsupportedOperation" -// This operation is not supported in this region. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DescribeFunction -func (c *CloudFront) DescribeFunction(input *DescribeFunctionInput) (*DescribeFunctionOutput, error) { - req, out := c.DescribeFunctionRequest(input) - return out, req.Send() -} - -// DescribeFunctionWithContext is the same as DescribeFunction with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeFunction 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 *CloudFront) DescribeFunctionWithContext(ctx aws.Context, input *DescribeFunctionInput, opts ...request.Option) (*DescribeFunctionOutput, error) { - req, out := c.DescribeFunctionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeKeyValueStore = "DescribeKeyValueStore2020_05_31" - -// DescribeKeyValueStoreRequest generates a "aws/request.Request" representing the -// client's request for the DescribeKeyValueStore 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 DescribeKeyValueStore for more information on using the DescribeKeyValueStore -// 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 DescribeKeyValueStoreRequest method. -// req, resp := client.DescribeKeyValueStoreRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DescribeKeyValueStore -func (c *CloudFront) DescribeKeyValueStoreRequest(input *DescribeKeyValueStoreInput) (req *request.Request, output *DescribeKeyValueStoreOutput) { - op := &request.Operation{ - Name: opDescribeKeyValueStore, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/key-value-store/{Name}", - } - - if input == nil { - input = &DescribeKeyValueStoreInput{} - } - - output = &DescribeKeyValueStoreOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeKeyValueStore API operation for Amazon CloudFront. -// -// Specifies the key value store and its configuration. -// -// 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 CloudFront's -// API operation DescribeKeyValueStore for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeEntityNotFound "EntityNotFound" -// The key value store entity was not found. -// -// - ErrCodeUnsupportedOperation "UnsupportedOperation" -// This operation is not supported in this region. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/DescribeKeyValueStore -func (c *CloudFront) DescribeKeyValueStore(input *DescribeKeyValueStoreInput) (*DescribeKeyValueStoreOutput, error) { - req, out := c.DescribeKeyValueStoreRequest(input) - return out, req.Send() -} - -// DescribeKeyValueStoreWithContext is the same as DescribeKeyValueStore with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeKeyValueStore 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 *CloudFront) DescribeKeyValueStoreWithContext(ctx aws.Context, input *DescribeKeyValueStoreInput, opts ...request.Option) (*DescribeKeyValueStoreOutput, error) { - req, out := c.DescribeKeyValueStoreRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetCachePolicy = "GetCachePolicy2020_05_31" - -// GetCachePolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetCachePolicy 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 GetCachePolicy for more information on using the GetCachePolicy -// 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 GetCachePolicyRequest method. -// req, resp := client.GetCachePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetCachePolicy -func (c *CloudFront) GetCachePolicyRequest(input *GetCachePolicyInput) (req *request.Request, output *GetCachePolicyOutput) { - op := &request.Operation{ - Name: opGetCachePolicy, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/cache-policy/{Id}", - } - - if input == nil { - input = &GetCachePolicyInput{} - } - - output = &GetCachePolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCachePolicy API operation for Amazon CloudFront. -// -// Gets a cache policy, including the following metadata: -// -// - The policy's identifier. -// -// - The date and time when the policy was last modified. -// -// To get a cache policy, you must provide the policy's identifier. If the cache -// policy is attached to a distribution's cache behavior, you can get the policy's -// identifier using ListDistributions or GetDistribution. If the cache policy -// is not attached to a cache behavior, you can get the identifier using ListCachePolicies. -// -// 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 CloudFront's -// API operation GetCachePolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeNoSuchCachePolicy "NoSuchCachePolicy" -// The cache policy does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetCachePolicy -func (c *CloudFront) GetCachePolicy(input *GetCachePolicyInput) (*GetCachePolicyOutput, error) { - req, out := c.GetCachePolicyRequest(input) - return out, req.Send() -} - -// GetCachePolicyWithContext is the same as GetCachePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetCachePolicy 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 *CloudFront) GetCachePolicyWithContext(ctx aws.Context, input *GetCachePolicyInput, opts ...request.Option) (*GetCachePolicyOutput, error) { - req, out := c.GetCachePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetCachePolicyConfig = "GetCachePolicyConfig2020_05_31" - -// GetCachePolicyConfigRequest generates a "aws/request.Request" representing the -// client's request for the GetCachePolicyConfig 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 GetCachePolicyConfig for more information on using the GetCachePolicyConfig -// 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 GetCachePolicyConfigRequest method. -// req, resp := client.GetCachePolicyConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetCachePolicyConfig -func (c *CloudFront) GetCachePolicyConfigRequest(input *GetCachePolicyConfigInput) (req *request.Request, output *GetCachePolicyConfigOutput) { - op := &request.Operation{ - Name: opGetCachePolicyConfig, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/cache-policy/{Id}/config", - } - - if input == nil { - input = &GetCachePolicyConfigInput{} - } - - output = &GetCachePolicyConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCachePolicyConfig API operation for Amazon CloudFront. -// -// Gets a cache policy configuration. -// -// To get a cache policy configuration, you must provide the policy's identifier. -// If the cache policy is attached to a distribution's cache behavior, you can -// get the policy's identifier using ListDistributions or GetDistribution. If -// the cache policy is not attached to a cache behavior, you can get the identifier -// using ListCachePolicies. -// -// 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 CloudFront's -// API operation GetCachePolicyConfig for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeNoSuchCachePolicy "NoSuchCachePolicy" -// The cache policy does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetCachePolicyConfig -func (c *CloudFront) GetCachePolicyConfig(input *GetCachePolicyConfigInput) (*GetCachePolicyConfigOutput, error) { - req, out := c.GetCachePolicyConfigRequest(input) - return out, req.Send() -} - -// GetCachePolicyConfigWithContext is the same as GetCachePolicyConfig with the addition of -// the ability to pass a context and additional request options. -// -// See GetCachePolicyConfig 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 *CloudFront) GetCachePolicyConfigWithContext(ctx aws.Context, input *GetCachePolicyConfigInput, opts ...request.Option) (*GetCachePolicyConfigOutput, error) { - req, out := c.GetCachePolicyConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetCloudFrontOriginAccessIdentity = "GetCloudFrontOriginAccessIdentity2020_05_31" - -// GetCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the -// client's request for the GetCloudFrontOriginAccessIdentity 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 GetCloudFrontOriginAccessIdentity for more information on using the GetCloudFrontOriginAccessIdentity -// 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 GetCloudFrontOriginAccessIdentityRequest method. -// req, resp := client.GetCloudFrontOriginAccessIdentityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetCloudFrontOriginAccessIdentity -func (c *CloudFront) GetCloudFrontOriginAccessIdentityRequest(input *GetCloudFrontOriginAccessIdentityInput) (req *request.Request, output *GetCloudFrontOriginAccessIdentityOutput) { - op := &request.Operation{ - Name: opGetCloudFrontOriginAccessIdentity, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/origin-access-identity/cloudfront/{Id}", - } - - if input == nil { - input = &GetCloudFrontOriginAccessIdentityInput{} - } - - output = &GetCloudFrontOriginAccessIdentityOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCloudFrontOriginAccessIdentity API operation for Amazon CloudFront. -// -// Get the information about an origin access identity. -// -// 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 CloudFront's -// API operation GetCloudFrontOriginAccessIdentity for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchCloudFrontOriginAccessIdentity "NoSuchCloudFrontOriginAccessIdentity" -// The specified origin access identity does not exist. -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetCloudFrontOriginAccessIdentity -func (c *CloudFront) GetCloudFrontOriginAccessIdentity(input *GetCloudFrontOriginAccessIdentityInput) (*GetCloudFrontOriginAccessIdentityOutput, error) { - req, out := c.GetCloudFrontOriginAccessIdentityRequest(input) - return out, req.Send() -} - -// GetCloudFrontOriginAccessIdentityWithContext is the same as GetCloudFrontOriginAccessIdentity with the addition of -// the ability to pass a context and additional request options. -// -// See GetCloudFrontOriginAccessIdentity 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 *CloudFront) GetCloudFrontOriginAccessIdentityWithContext(ctx aws.Context, input *GetCloudFrontOriginAccessIdentityInput, opts ...request.Option) (*GetCloudFrontOriginAccessIdentityOutput, error) { - req, out := c.GetCloudFrontOriginAccessIdentityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetCloudFrontOriginAccessIdentityConfig = "GetCloudFrontOriginAccessIdentityConfig2020_05_31" - -// GetCloudFrontOriginAccessIdentityConfigRequest generates a "aws/request.Request" representing the -// client's request for the GetCloudFrontOriginAccessIdentityConfig 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 GetCloudFrontOriginAccessIdentityConfig for more information on using the GetCloudFrontOriginAccessIdentityConfig -// 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 GetCloudFrontOriginAccessIdentityConfigRequest method. -// req, resp := client.GetCloudFrontOriginAccessIdentityConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetCloudFrontOriginAccessIdentityConfig -func (c *CloudFront) GetCloudFrontOriginAccessIdentityConfigRequest(input *GetCloudFrontOriginAccessIdentityConfigInput) (req *request.Request, output *GetCloudFrontOriginAccessIdentityConfigOutput) { - op := &request.Operation{ - Name: opGetCloudFrontOriginAccessIdentityConfig, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/origin-access-identity/cloudfront/{Id}/config", - } - - if input == nil { - input = &GetCloudFrontOriginAccessIdentityConfigInput{} - } - - output = &GetCloudFrontOriginAccessIdentityConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCloudFrontOriginAccessIdentityConfig API operation for Amazon CloudFront. -// -// Get the configuration information about an origin access identity. -// -// 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 CloudFront's -// API operation GetCloudFrontOriginAccessIdentityConfig for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchCloudFrontOriginAccessIdentity "NoSuchCloudFrontOriginAccessIdentity" -// The specified origin access identity does not exist. -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetCloudFrontOriginAccessIdentityConfig -func (c *CloudFront) GetCloudFrontOriginAccessIdentityConfig(input *GetCloudFrontOriginAccessIdentityConfigInput) (*GetCloudFrontOriginAccessIdentityConfigOutput, error) { - req, out := c.GetCloudFrontOriginAccessIdentityConfigRequest(input) - return out, req.Send() -} - -// GetCloudFrontOriginAccessIdentityConfigWithContext is the same as GetCloudFrontOriginAccessIdentityConfig with the addition of -// the ability to pass a context and additional request options. -// -// See GetCloudFrontOriginAccessIdentityConfig 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 *CloudFront) GetCloudFrontOriginAccessIdentityConfigWithContext(ctx aws.Context, input *GetCloudFrontOriginAccessIdentityConfigInput, opts ...request.Option) (*GetCloudFrontOriginAccessIdentityConfigOutput, error) { - req, out := c.GetCloudFrontOriginAccessIdentityConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetContinuousDeploymentPolicy = "GetContinuousDeploymentPolicy2020_05_31" - -// GetContinuousDeploymentPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetContinuousDeploymentPolicy 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 GetContinuousDeploymentPolicy for more information on using the GetContinuousDeploymentPolicy -// 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 GetContinuousDeploymentPolicyRequest method. -// req, resp := client.GetContinuousDeploymentPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetContinuousDeploymentPolicy -func (c *CloudFront) GetContinuousDeploymentPolicyRequest(input *GetContinuousDeploymentPolicyInput) (req *request.Request, output *GetContinuousDeploymentPolicyOutput) { - op := &request.Operation{ - Name: opGetContinuousDeploymentPolicy, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/continuous-deployment-policy/{Id}", - } - - if input == nil { - input = &GetContinuousDeploymentPolicyInput{} - } - - output = &GetContinuousDeploymentPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetContinuousDeploymentPolicy API operation for Amazon CloudFront. -// -// Gets a continuous deployment policy, including metadata (the policy's identifier -// and the date and time when the policy was last modified). -// -// 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 CloudFront's -// API operation GetContinuousDeploymentPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeNoSuchContinuousDeploymentPolicy "NoSuchContinuousDeploymentPolicy" -// The continuous deployment policy doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetContinuousDeploymentPolicy -func (c *CloudFront) GetContinuousDeploymentPolicy(input *GetContinuousDeploymentPolicyInput) (*GetContinuousDeploymentPolicyOutput, error) { - req, out := c.GetContinuousDeploymentPolicyRequest(input) - return out, req.Send() -} - -// GetContinuousDeploymentPolicyWithContext is the same as GetContinuousDeploymentPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetContinuousDeploymentPolicy 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 *CloudFront) GetContinuousDeploymentPolicyWithContext(ctx aws.Context, input *GetContinuousDeploymentPolicyInput, opts ...request.Option) (*GetContinuousDeploymentPolicyOutput, error) { - req, out := c.GetContinuousDeploymentPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetContinuousDeploymentPolicyConfig = "GetContinuousDeploymentPolicyConfig2020_05_31" - -// GetContinuousDeploymentPolicyConfigRequest generates a "aws/request.Request" representing the -// client's request for the GetContinuousDeploymentPolicyConfig 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 GetContinuousDeploymentPolicyConfig for more information on using the GetContinuousDeploymentPolicyConfig -// 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 GetContinuousDeploymentPolicyConfigRequest method. -// req, resp := client.GetContinuousDeploymentPolicyConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetContinuousDeploymentPolicyConfig -func (c *CloudFront) GetContinuousDeploymentPolicyConfigRequest(input *GetContinuousDeploymentPolicyConfigInput) (req *request.Request, output *GetContinuousDeploymentPolicyConfigOutput) { - op := &request.Operation{ - Name: opGetContinuousDeploymentPolicyConfig, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/continuous-deployment-policy/{Id}/config", - } - - if input == nil { - input = &GetContinuousDeploymentPolicyConfigInput{} - } - - output = &GetContinuousDeploymentPolicyConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetContinuousDeploymentPolicyConfig API operation for Amazon CloudFront. -// -// Gets configuration information about a continuous deployment 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 Amazon CloudFront's -// API operation GetContinuousDeploymentPolicyConfig for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeNoSuchContinuousDeploymentPolicy "NoSuchContinuousDeploymentPolicy" -// The continuous deployment policy doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetContinuousDeploymentPolicyConfig -func (c *CloudFront) GetContinuousDeploymentPolicyConfig(input *GetContinuousDeploymentPolicyConfigInput) (*GetContinuousDeploymentPolicyConfigOutput, error) { - req, out := c.GetContinuousDeploymentPolicyConfigRequest(input) - return out, req.Send() -} - -// GetContinuousDeploymentPolicyConfigWithContext is the same as GetContinuousDeploymentPolicyConfig with the addition of -// the ability to pass a context and additional request options. -// -// See GetContinuousDeploymentPolicyConfig 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 *CloudFront) GetContinuousDeploymentPolicyConfigWithContext(ctx aws.Context, input *GetContinuousDeploymentPolicyConfigInput, opts ...request.Option) (*GetContinuousDeploymentPolicyConfigOutput, error) { - req, out := c.GetContinuousDeploymentPolicyConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDistribution = "GetDistribution2020_05_31" - -// GetDistributionRequest generates a "aws/request.Request" representing the -// client's request for the GetDistribution 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 GetDistribution for more information on using the GetDistribution -// 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 GetDistributionRequest method. -// req, resp := client.GetDistributionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetDistribution -func (c *CloudFront) GetDistributionRequest(input *GetDistributionInput) (req *request.Request, output *GetDistributionOutput) { - op := &request.Operation{ - Name: opGetDistribution, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/distribution/{Id}", - } - - if input == nil { - input = &GetDistributionInput{} - } - - output = &GetDistributionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDistribution API operation for Amazon CloudFront. -// -// Get the information about a distribution. -// -// 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 CloudFront's -// API operation GetDistribution for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchDistribution "NoSuchDistribution" -// The specified distribution does not exist. -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetDistribution -func (c *CloudFront) GetDistribution(input *GetDistributionInput) (*GetDistributionOutput, error) { - req, out := c.GetDistributionRequest(input) - return out, req.Send() -} - -// GetDistributionWithContext is the same as GetDistribution with the addition of -// the ability to pass a context and additional request options. -// -// See GetDistribution 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 *CloudFront) GetDistributionWithContext(ctx aws.Context, input *GetDistributionInput, opts ...request.Option) (*GetDistributionOutput, error) { - req, out := c.GetDistributionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetDistributionConfig = "GetDistributionConfig2020_05_31" - -// GetDistributionConfigRequest generates a "aws/request.Request" representing the -// client's request for the GetDistributionConfig 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 GetDistributionConfig for more information on using the GetDistributionConfig -// 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 GetDistributionConfigRequest method. -// req, resp := client.GetDistributionConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetDistributionConfig -func (c *CloudFront) GetDistributionConfigRequest(input *GetDistributionConfigInput) (req *request.Request, output *GetDistributionConfigOutput) { - op := &request.Operation{ - Name: opGetDistributionConfig, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/distribution/{Id}/config", - } - - if input == nil { - input = &GetDistributionConfigInput{} - } - - output = &GetDistributionConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetDistributionConfig API operation for Amazon CloudFront. -// -// Get the configuration information about a distribution. -// -// 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 CloudFront's -// API operation GetDistributionConfig for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchDistribution "NoSuchDistribution" -// The specified distribution does not exist. -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetDistributionConfig -func (c *CloudFront) GetDistributionConfig(input *GetDistributionConfigInput) (*GetDistributionConfigOutput, error) { - req, out := c.GetDistributionConfigRequest(input) - return out, req.Send() -} - -// GetDistributionConfigWithContext is the same as GetDistributionConfig with the addition of -// the ability to pass a context and additional request options. -// -// See GetDistributionConfig 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 *CloudFront) GetDistributionConfigWithContext(ctx aws.Context, input *GetDistributionConfigInput, opts ...request.Option) (*GetDistributionConfigOutput, error) { - req, out := c.GetDistributionConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetFieldLevelEncryption = "GetFieldLevelEncryption2020_05_31" - -// GetFieldLevelEncryptionRequest generates a "aws/request.Request" representing the -// client's request for the GetFieldLevelEncryption 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 GetFieldLevelEncryption for more information on using the GetFieldLevelEncryption -// 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 GetFieldLevelEncryptionRequest method. -// req, resp := client.GetFieldLevelEncryptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetFieldLevelEncryption -func (c *CloudFront) GetFieldLevelEncryptionRequest(input *GetFieldLevelEncryptionInput) (req *request.Request, output *GetFieldLevelEncryptionOutput) { - op := &request.Operation{ - Name: opGetFieldLevelEncryption, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/field-level-encryption/{Id}", - } - - if input == nil { - input = &GetFieldLevelEncryptionInput{} - } - - output = &GetFieldLevelEncryptionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetFieldLevelEncryption API operation for Amazon CloudFront. -// -// Get the field-level encryption configuration information. -// -// 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 CloudFront's -// API operation GetFieldLevelEncryption for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" -// The specified configuration for field-level encryption doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetFieldLevelEncryption -func (c *CloudFront) GetFieldLevelEncryption(input *GetFieldLevelEncryptionInput) (*GetFieldLevelEncryptionOutput, error) { - req, out := c.GetFieldLevelEncryptionRequest(input) - return out, req.Send() -} - -// GetFieldLevelEncryptionWithContext is the same as GetFieldLevelEncryption with the addition of -// the ability to pass a context and additional request options. -// -// See GetFieldLevelEncryption 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 *CloudFront) GetFieldLevelEncryptionWithContext(ctx aws.Context, input *GetFieldLevelEncryptionInput, opts ...request.Option) (*GetFieldLevelEncryptionOutput, error) { - req, out := c.GetFieldLevelEncryptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetFieldLevelEncryptionConfig = "GetFieldLevelEncryptionConfig2020_05_31" - -// GetFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the -// client's request for the GetFieldLevelEncryptionConfig 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 GetFieldLevelEncryptionConfig for more information on using the GetFieldLevelEncryptionConfig -// 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 GetFieldLevelEncryptionConfigRequest method. -// req, resp := client.GetFieldLevelEncryptionConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetFieldLevelEncryptionConfig -func (c *CloudFront) GetFieldLevelEncryptionConfigRequest(input *GetFieldLevelEncryptionConfigInput) (req *request.Request, output *GetFieldLevelEncryptionConfigOutput) { - op := &request.Operation{ - Name: opGetFieldLevelEncryptionConfig, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/field-level-encryption/{Id}/config", - } - - if input == nil { - input = &GetFieldLevelEncryptionConfigInput{} - } - - output = &GetFieldLevelEncryptionConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetFieldLevelEncryptionConfig API operation for Amazon CloudFront. -// -// Get the field-level encryption configuration information. -// -// 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 CloudFront's -// API operation GetFieldLevelEncryptionConfig for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" -// The specified configuration for field-level encryption doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetFieldLevelEncryptionConfig -func (c *CloudFront) GetFieldLevelEncryptionConfig(input *GetFieldLevelEncryptionConfigInput) (*GetFieldLevelEncryptionConfigOutput, error) { - req, out := c.GetFieldLevelEncryptionConfigRequest(input) - return out, req.Send() -} - -// GetFieldLevelEncryptionConfigWithContext is the same as GetFieldLevelEncryptionConfig with the addition of -// the ability to pass a context and additional request options. -// -// See GetFieldLevelEncryptionConfig 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 *CloudFront) GetFieldLevelEncryptionConfigWithContext(ctx aws.Context, input *GetFieldLevelEncryptionConfigInput, opts ...request.Option) (*GetFieldLevelEncryptionConfigOutput, error) { - req, out := c.GetFieldLevelEncryptionConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetFieldLevelEncryptionProfile = "GetFieldLevelEncryptionProfile2020_05_31" - -// GetFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the -// client's request for the GetFieldLevelEncryptionProfile 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 GetFieldLevelEncryptionProfile for more information on using the GetFieldLevelEncryptionProfile -// 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 GetFieldLevelEncryptionProfileRequest method. -// req, resp := client.GetFieldLevelEncryptionProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetFieldLevelEncryptionProfile -func (c *CloudFront) GetFieldLevelEncryptionProfileRequest(input *GetFieldLevelEncryptionProfileInput) (req *request.Request, output *GetFieldLevelEncryptionProfileOutput) { - op := &request.Operation{ - Name: opGetFieldLevelEncryptionProfile, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/field-level-encryption-profile/{Id}", - } - - if input == nil { - input = &GetFieldLevelEncryptionProfileInput{} - } - - output = &GetFieldLevelEncryptionProfileOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetFieldLevelEncryptionProfile API operation for Amazon CloudFront. -// -// Get the field-level encryption profile information. -// -// 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 CloudFront's -// API operation GetFieldLevelEncryptionProfile for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile" -// The specified profile for field-level encryption doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetFieldLevelEncryptionProfile -func (c *CloudFront) GetFieldLevelEncryptionProfile(input *GetFieldLevelEncryptionProfileInput) (*GetFieldLevelEncryptionProfileOutput, error) { - req, out := c.GetFieldLevelEncryptionProfileRequest(input) - return out, req.Send() -} - -// GetFieldLevelEncryptionProfileWithContext is the same as GetFieldLevelEncryptionProfile with the addition of -// the ability to pass a context and additional request options. -// -// See GetFieldLevelEncryptionProfile 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 *CloudFront) GetFieldLevelEncryptionProfileWithContext(ctx aws.Context, input *GetFieldLevelEncryptionProfileInput, opts ...request.Option) (*GetFieldLevelEncryptionProfileOutput, error) { - req, out := c.GetFieldLevelEncryptionProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetFieldLevelEncryptionProfileConfig = "GetFieldLevelEncryptionProfileConfig2020_05_31" - -// GetFieldLevelEncryptionProfileConfigRequest generates a "aws/request.Request" representing the -// client's request for the GetFieldLevelEncryptionProfileConfig 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 GetFieldLevelEncryptionProfileConfig for more information on using the GetFieldLevelEncryptionProfileConfig -// 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 GetFieldLevelEncryptionProfileConfigRequest method. -// req, resp := client.GetFieldLevelEncryptionProfileConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetFieldLevelEncryptionProfileConfig -func (c *CloudFront) GetFieldLevelEncryptionProfileConfigRequest(input *GetFieldLevelEncryptionProfileConfigInput) (req *request.Request, output *GetFieldLevelEncryptionProfileConfigOutput) { - op := &request.Operation{ - Name: opGetFieldLevelEncryptionProfileConfig, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/field-level-encryption-profile/{Id}/config", - } - - if input == nil { - input = &GetFieldLevelEncryptionProfileConfigInput{} - } - - output = &GetFieldLevelEncryptionProfileConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetFieldLevelEncryptionProfileConfig API operation for Amazon CloudFront. -// -// Get the field-level encryption profile configuration information. -// -// 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 CloudFront's -// API operation GetFieldLevelEncryptionProfileConfig for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile" -// The specified profile for field-level encryption doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetFieldLevelEncryptionProfileConfig -func (c *CloudFront) GetFieldLevelEncryptionProfileConfig(input *GetFieldLevelEncryptionProfileConfigInput) (*GetFieldLevelEncryptionProfileConfigOutput, error) { - req, out := c.GetFieldLevelEncryptionProfileConfigRequest(input) - return out, req.Send() -} - -// GetFieldLevelEncryptionProfileConfigWithContext is the same as GetFieldLevelEncryptionProfileConfig with the addition of -// the ability to pass a context and additional request options. -// -// See GetFieldLevelEncryptionProfileConfig 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 *CloudFront) GetFieldLevelEncryptionProfileConfigWithContext(ctx aws.Context, input *GetFieldLevelEncryptionProfileConfigInput, opts ...request.Option) (*GetFieldLevelEncryptionProfileConfigOutput, error) { - req, out := c.GetFieldLevelEncryptionProfileConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetFunction = "GetFunction2020_05_31" - -// GetFunctionRequest generates a "aws/request.Request" representing the -// client's request for the GetFunction 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 GetFunction for more information on using the GetFunction -// 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 GetFunctionRequest method. -// req, resp := client.GetFunctionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetFunction -func (c *CloudFront) GetFunctionRequest(input *GetFunctionInput) (req *request.Request, output *GetFunctionOutput) { - op := &request.Operation{ - Name: opGetFunction, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/function/{Name}", - } - - if input == nil { - input = &GetFunctionInput{} - } - - output = &GetFunctionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetFunction API operation for Amazon CloudFront. -// -// Gets the code of a CloudFront function. To get configuration information -// and metadata about a function, use DescribeFunction. -// -// To get a function's code, you must provide the function's name and stage. -// To get these values, you can use ListFunctions. -// -// 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 CloudFront's -// API operation GetFunction for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchFunctionExists "NoSuchFunctionExists" -// The function does not exist. -// -// - ErrCodeUnsupportedOperation "UnsupportedOperation" -// This operation is not supported in this region. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetFunction -func (c *CloudFront) GetFunction(input *GetFunctionInput) (*GetFunctionOutput, error) { - req, out := c.GetFunctionRequest(input) - return out, req.Send() -} - -// GetFunctionWithContext is the same as GetFunction with the addition of -// the ability to pass a context and additional request options. -// -// See GetFunction 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 *CloudFront) GetFunctionWithContext(ctx aws.Context, input *GetFunctionInput, opts ...request.Option) (*GetFunctionOutput, error) { - req, out := c.GetFunctionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetInvalidation = "GetInvalidation2020_05_31" - -// GetInvalidationRequest generates a "aws/request.Request" representing the -// client's request for the GetInvalidation 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 GetInvalidation for more information on using the GetInvalidation -// 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 GetInvalidationRequest method. -// req, resp := client.GetInvalidationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetInvalidation -func (c *CloudFront) GetInvalidationRequest(input *GetInvalidationInput) (req *request.Request, output *GetInvalidationOutput) { - op := &request.Operation{ - Name: opGetInvalidation, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/distribution/{DistributionId}/invalidation/{Id}", - } - - if input == nil { - input = &GetInvalidationInput{} - } - - output = &GetInvalidationOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetInvalidation API operation for Amazon CloudFront. -// -// Get the information about an invalidation. -// -// 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 CloudFront's -// API operation GetInvalidation for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchInvalidation "NoSuchInvalidation" -// The specified invalidation does not exist. -// -// - ErrCodeNoSuchDistribution "NoSuchDistribution" -// The specified distribution does not exist. -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetInvalidation -func (c *CloudFront) GetInvalidation(input *GetInvalidationInput) (*GetInvalidationOutput, error) { - req, out := c.GetInvalidationRequest(input) - return out, req.Send() -} - -// GetInvalidationWithContext is the same as GetInvalidation with the addition of -// the ability to pass a context and additional request options. -// -// See GetInvalidation 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 *CloudFront) GetInvalidationWithContext(ctx aws.Context, input *GetInvalidationInput, opts ...request.Option) (*GetInvalidationOutput, error) { - req, out := c.GetInvalidationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetKeyGroup = "GetKeyGroup2020_05_31" - -// GetKeyGroupRequest generates a "aws/request.Request" representing the -// client's request for the GetKeyGroup 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 GetKeyGroup for more information on using the GetKeyGroup -// 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 GetKeyGroupRequest method. -// req, resp := client.GetKeyGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetKeyGroup -func (c *CloudFront) GetKeyGroupRequest(input *GetKeyGroupInput) (req *request.Request, output *GetKeyGroupOutput) { - op := &request.Operation{ - Name: opGetKeyGroup, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/key-group/{Id}", - } - - if input == nil { - input = &GetKeyGroupInput{} - } - - output = &GetKeyGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetKeyGroup API operation for Amazon CloudFront. -// -// Gets a key group, including the date and time when the key group was last -// modified. -// -// To get a key group, you must provide the key group's identifier. If the key -// group is referenced in a distribution's cache behavior, you can get the key -// group's identifier using ListDistributions or GetDistribution. If the key -// group is not referenced in a cache behavior, you can get the identifier using -// ListKeyGroups. -// -// 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 CloudFront's -// API operation GetKeyGroup for usage and error information. -// -// Returned Error Codes: -// - ErrCodeNoSuchResource "NoSuchResource" -// A resource that was specified is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetKeyGroup -func (c *CloudFront) GetKeyGroup(input *GetKeyGroupInput) (*GetKeyGroupOutput, error) { - req, out := c.GetKeyGroupRequest(input) - return out, req.Send() -} - -// GetKeyGroupWithContext is the same as GetKeyGroup with the addition of -// the ability to pass a context and additional request options. -// -// See GetKeyGroup 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 *CloudFront) GetKeyGroupWithContext(ctx aws.Context, input *GetKeyGroupInput, opts ...request.Option) (*GetKeyGroupOutput, error) { - req, out := c.GetKeyGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetKeyGroupConfig = "GetKeyGroupConfig2020_05_31" - -// GetKeyGroupConfigRequest generates a "aws/request.Request" representing the -// client's request for the GetKeyGroupConfig 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 GetKeyGroupConfig for more information on using the GetKeyGroupConfig -// 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 GetKeyGroupConfigRequest method. -// req, resp := client.GetKeyGroupConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetKeyGroupConfig -func (c *CloudFront) GetKeyGroupConfigRequest(input *GetKeyGroupConfigInput) (req *request.Request, output *GetKeyGroupConfigOutput) { - op := &request.Operation{ - Name: opGetKeyGroupConfig, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/key-group/{Id}/config", - } - - if input == nil { - input = &GetKeyGroupConfigInput{} - } - - output = &GetKeyGroupConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetKeyGroupConfig API operation for Amazon CloudFront. -// -// Gets a key group configuration. -// -// To get a key group configuration, you must provide the key group's identifier. -// If the key group is referenced in a distribution's cache behavior, you can -// get the key group's identifier using ListDistributions or GetDistribution. -// If the key group is not referenced in a cache behavior, you can get the identifier -// using ListKeyGroups. -// -// 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 CloudFront's -// API operation GetKeyGroupConfig for usage and error information. -// -// Returned Error Codes: -// - ErrCodeNoSuchResource "NoSuchResource" -// A resource that was specified is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetKeyGroupConfig -func (c *CloudFront) GetKeyGroupConfig(input *GetKeyGroupConfigInput) (*GetKeyGroupConfigOutput, error) { - req, out := c.GetKeyGroupConfigRequest(input) - return out, req.Send() -} - -// GetKeyGroupConfigWithContext is the same as GetKeyGroupConfig with the addition of -// the ability to pass a context and additional request options. -// -// See GetKeyGroupConfig 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 *CloudFront) GetKeyGroupConfigWithContext(ctx aws.Context, input *GetKeyGroupConfigInput, opts ...request.Option) (*GetKeyGroupConfigOutput, error) { - req, out := c.GetKeyGroupConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetMonitoringSubscription = "GetMonitoringSubscription2020_05_31" - -// GetMonitoringSubscriptionRequest generates a "aws/request.Request" representing the -// client's request for the GetMonitoringSubscription 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 GetMonitoringSubscription for more information on using the GetMonitoringSubscription -// 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 GetMonitoringSubscriptionRequest method. -// req, resp := client.GetMonitoringSubscriptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetMonitoringSubscription -func (c *CloudFront) GetMonitoringSubscriptionRequest(input *GetMonitoringSubscriptionInput) (req *request.Request, output *GetMonitoringSubscriptionOutput) { - op := &request.Operation{ - Name: opGetMonitoringSubscription, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/distributions/{DistributionId}/monitoring-subscription/", - } - - if input == nil { - input = &GetMonitoringSubscriptionInput{} - } - - output = &GetMonitoringSubscriptionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetMonitoringSubscription API operation for Amazon CloudFront. -// -// Gets information about whether additional CloudWatch metrics are enabled -// for the specified CloudFront distribution. -// -// 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 CloudFront's -// API operation GetMonitoringSubscription for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeNoSuchDistribution "NoSuchDistribution" -// The specified distribution does not exist. -// -// - ErrCodeNoSuchMonitoringSubscription "NoSuchMonitoringSubscription" -// A monitoring subscription does not exist for the specified distribution. -// -// - ErrCodeUnsupportedOperation "UnsupportedOperation" -// This operation is not supported in this region. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetMonitoringSubscription -func (c *CloudFront) GetMonitoringSubscription(input *GetMonitoringSubscriptionInput) (*GetMonitoringSubscriptionOutput, error) { - req, out := c.GetMonitoringSubscriptionRequest(input) - return out, req.Send() -} - -// GetMonitoringSubscriptionWithContext is the same as GetMonitoringSubscription with the addition of -// the ability to pass a context and additional request options. -// -// See GetMonitoringSubscription 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 *CloudFront) GetMonitoringSubscriptionWithContext(ctx aws.Context, input *GetMonitoringSubscriptionInput, opts ...request.Option) (*GetMonitoringSubscriptionOutput, error) { - req, out := c.GetMonitoringSubscriptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetOriginAccessControl = "GetOriginAccessControl2020_05_31" - -// GetOriginAccessControlRequest generates a "aws/request.Request" representing the -// client's request for the GetOriginAccessControl 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 GetOriginAccessControl for more information on using the GetOriginAccessControl -// 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 GetOriginAccessControlRequest method. -// req, resp := client.GetOriginAccessControlRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetOriginAccessControl -func (c *CloudFront) GetOriginAccessControlRequest(input *GetOriginAccessControlInput) (req *request.Request, output *GetOriginAccessControlOutput) { - op := &request.Operation{ - Name: opGetOriginAccessControl, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/origin-access-control/{Id}", - } - - if input == nil { - input = &GetOriginAccessControlInput{} - } - - output = &GetOriginAccessControlOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetOriginAccessControl API operation for Amazon CloudFront. -// -// Gets a CloudFront origin access control, including its unique identifier. -// -// 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 CloudFront's -// API operation GetOriginAccessControl for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchOriginAccessControl "NoSuchOriginAccessControl" -// The origin access control does not exist. -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetOriginAccessControl -func (c *CloudFront) GetOriginAccessControl(input *GetOriginAccessControlInput) (*GetOriginAccessControlOutput, error) { - req, out := c.GetOriginAccessControlRequest(input) - return out, req.Send() -} - -// GetOriginAccessControlWithContext is the same as GetOriginAccessControl with the addition of -// the ability to pass a context and additional request options. -// -// See GetOriginAccessControl 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 *CloudFront) GetOriginAccessControlWithContext(ctx aws.Context, input *GetOriginAccessControlInput, opts ...request.Option) (*GetOriginAccessControlOutput, error) { - req, out := c.GetOriginAccessControlRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetOriginAccessControlConfig = "GetOriginAccessControlConfig2020_05_31" - -// GetOriginAccessControlConfigRequest generates a "aws/request.Request" representing the -// client's request for the GetOriginAccessControlConfig 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 GetOriginAccessControlConfig for more information on using the GetOriginAccessControlConfig -// 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 GetOriginAccessControlConfigRequest method. -// req, resp := client.GetOriginAccessControlConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetOriginAccessControlConfig -func (c *CloudFront) GetOriginAccessControlConfigRequest(input *GetOriginAccessControlConfigInput) (req *request.Request, output *GetOriginAccessControlConfigOutput) { - op := &request.Operation{ - Name: opGetOriginAccessControlConfig, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/origin-access-control/{Id}/config", - } - - if input == nil { - input = &GetOriginAccessControlConfigInput{} - } - - output = &GetOriginAccessControlConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetOriginAccessControlConfig API operation for Amazon CloudFront. -// -// Gets a CloudFront origin access control configuration. -// -// 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 CloudFront's -// API operation GetOriginAccessControlConfig for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchOriginAccessControl "NoSuchOriginAccessControl" -// The origin access control does not exist. -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetOriginAccessControlConfig -func (c *CloudFront) GetOriginAccessControlConfig(input *GetOriginAccessControlConfigInput) (*GetOriginAccessControlConfigOutput, error) { - req, out := c.GetOriginAccessControlConfigRequest(input) - return out, req.Send() -} - -// GetOriginAccessControlConfigWithContext is the same as GetOriginAccessControlConfig with the addition of -// the ability to pass a context and additional request options. -// -// See GetOriginAccessControlConfig 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 *CloudFront) GetOriginAccessControlConfigWithContext(ctx aws.Context, input *GetOriginAccessControlConfigInput, opts ...request.Option) (*GetOriginAccessControlConfigOutput, error) { - req, out := c.GetOriginAccessControlConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetOriginRequestPolicy = "GetOriginRequestPolicy2020_05_31" - -// GetOriginRequestPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetOriginRequestPolicy 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 GetOriginRequestPolicy for more information on using the GetOriginRequestPolicy -// 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 GetOriginRequestPolicyRequest method. -// req, resp := client.GetOriginRequestPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetOriginRequestPolicy -func (c *CloudFront) GetOriginRequestPolicyRequest(input *GetOriginRequestPolicyInput) (req *request.Request, output *GetOriginRequestPolicyOutput) { - op := &request.Operation{ - Name: opGetOriginRequestPolicy, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/origin-request-policy/{Id}", - } - - if input == nil { - input = &GetOriginRequestPolicyInput{} - } - - output = &GetOriginRequestPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetOriginRequestPolicy API operation for Amazon CloudFront. -// -// Gets an origin request policy, including the following metadata: -// -// - The policy's identifier. -// -// - The date and time when the policy was last modified. -// -// To get an origin request policy, you must provide the policy's identifier. -// If the origin request policy is attached to a distribution's cache behavior, -// you can get the policy's identifier using ListDistributions or GetDistribution. -// If the origin request policy is not attached to a cache behavior, you can -// get the identifier using ListOriginRequestPolicies. -// -// 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 CloudFront's -// API operation GetOriginRequestPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeNoSuchOriginRequestPolicy "NoSuchOriginRequestPolicy" -// The origin request policy does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetOriginRequestPolicy -func (c *CloudFront) GetOriginRequestPolicy(input *GetOriginRequestPolicyInput) (*GetOriginRequestPolicyOutput, error) { - req, out := c.GetOriginRequestPolicyRequest(input) - return out, req.Send() -} - -// GetOriginRequestPolicyWithContext is the same as GetOriginRequestPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetOriginRequestPolicy 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 *CloudFront) GetOriginRequestPolicyWithContext(ctx aws.Context, input *GetOriginRequestPolicyInput, opts ...request.Option) (*GetOriginRequestPolicyOutput, error) { - req, out := c.GetOriginRequestPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetOriginRequestPolicyConfig = "GetOriginRequestPolicyConfig2020_05_31" - -// GetOriginRequestPolicyConfigRequest generates a "aws/request.Request" representing the -// client's request for the GetOriginRequestPolicyConfig 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 GetOriginRequestPolicyConfig for more information on using the GetOriginRequestPolicyConfig -// 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 GetOriginRequestPolicyConfigRequest method. -// req, resp := client.GetOriginRequestPolicyConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetOriginRequestPolicyConfig -func (c *CloudFront) GetOriginRequestPolicyConfigRequest(input *GetOriginRequestPolicyConfigInput) (req *request.Request, output *GetOriginRequestPolicyConfigOutput) { - op := &request.Operation{ - Name: opGetOriginRequestPolicyConfig, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/origin-request-policy/{Id}/config", - } - - if input == nil { - input = &GetOriginRequestPolicyConfigInput{} - } - - output = &GetOriginRequestPolicyConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetOriginRequestPolicyConfig API operation for Amazon CloudFront. -// -// Gets an origin request policy configuration. -// -// To get an origin request policy configuration, you must provide the policy's -// identifier. If the origin request policy is attached to a distribution's -// cache behavior, you can get the policy's identifier using ListDistributions -// or GetDistribution. If the origin request policy is not attached to a cache -// behavior, you can get the identifier using ListOriginRequestPolicies. -// -// 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 CloudFront's -// API operation GetOriginRequestPolicyConfig for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeNoSuchOriginRequestPolicy "NoSuchOriginRequestPolicy" -// The origin request policy does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetOriginRequestPolicyConfig -func (c *CloudFront) GetOriginRequestPolicyConfig(input *GetOriginRequestPolicyConfigInput) (*GetOriginRequestPolicyConfigOutput, error) { - req, out := c.GetOriginRequestPolicyConfigRequest(input) - return out, req.Send() -} - -// GetOriginRequestPolicyConfigWithContext is the same as GetOriginRequestPolicyConfig with the addition of -// the ability to pass a context and additional request options. -// -// See GetOriginRequestPolicyConfig 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 *CloudFront) GetOriginRequestPolicyConfigWithContext(ctx aws.Context, input *GetOriginRequestPolicyConfigInput, opts ...request.Option) (*GetOriginRequestPolicyConfigOutput, error) { - req, out := c.GetOriginRequestPolicyConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetPublicKey = "GetPublicKey2020_05_31" - -// GetPublicKeyRequest generates a "aws/request.Request" representing the -// client's request for the GetPublicKey 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 GetPublicKey for more information on using the GetPublicKey -// 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 GetPublicKeyRequest method. -// req, resp := client.GetPublicKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetPublicKey -func (c *CloudFront) GetPublicKeyRequest(input *GetPublicKeyInput) (req *request.Request, output *GetPublicKeyOutput) { - op := &request.Operation{ - Name: opGetPublicKey, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/public-key/{Id}", - } - - if input == nil { - input = &GetPublicKeyInput{} - } - - output = &GetPublicKeyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetPublicKey API operation for Amazon CloudFront. -// -// Gets a public key. -// -// 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 CloudFront's -// API operation GetPublicKey for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeNoSuchPublicKey "NoSuchPublicKey" -// The specified public key doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetPublicKey -func (c *CloudFront) GetPublicKey(input *GetPublicKeyInput) (*GetPublicKeyOutput, error) { - req, out := c.GetPublicKeyRequest(input) - return out, req.Send() -} - -// GetPublicKeyWithContext is the same as GetPublicKey with the addition of -// the ability to pass a context and additional request options. -// -// See GetPublicKey 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 *CloudFront) GetPublicKeyWithContext(ctx aws.Context, input *GetPublicKeyInput, opts ...request.Option) (*GetPublicKeyOutput, error) { - req, out := c.GetPublicKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetPublicKeyConfig = "GetPublicKeyConfig2020_05_31" - -// GetPublicKeyConfigRequest generates a "aws/request.Request" representing the -// client's request for the GetPublicKeyConfig 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 GetPublicKeyConfig for more information on using the GetPublicKeyConfig -// 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 GetPublicKeyConfigRequest method. -// req, resp := client.GetPublicKeyConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetPublicKeyConfig -func (c *CloudFront) GetPublicKeyConfigRequest(input *GetPublicKeyConfigInput) (req *request.Request, output *GetPublicKeyConfigOutput) { - op := &request.Operation{ - Name: opGetPublicKeyConfig, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/public-key/{Id}/config", - } - - if input == nil { - input = &GetPublicKeyConfigInput{} - } - - output = &GetPublicKeyConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetPublicKeyConfig API operation for Amazon CloudFront. -// -// Gets a public key configuration. -// -// 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 CloudFront's -// API operation GetPublicKeyConfig for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeNoSuchPublicKey "NoSuchPublicKey" -// The specified public key doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetPublicKeyConfig -func (c *CloudFront) GetPublicKeyConfig(input *GetPublicKeyConfigInput) (*GetPublicKeyConfigOutput, error) { - req, out := c.GetPublicKeyConfigRequest(input) - return out, req.Send() -} - -// GetPublicKeyConfigWithContext is the same as GetPublicKeyConfig with the addition of -// the ability to pass a context and additional request options. -// -// See GetPublicKeyConfig 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 *CloudFront) GetPublicKeyConfigWithContext(ctx aws.Context, input *GetPublicKeyConfigInput, opts ...request.Option) (*GetPublicKeyConfigOutput, error) { - req, out := c.GetPublicKeyConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRealtimeLogConfig = "GetRealtimeLogConfig2020_05_31" - -// GetRealtimeLogConfigRequest generates a "aws/request.Request" representing the -// client's request for the GetRealtimeLogConfig 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 GetRealtimeLogConfig for more information on using the GetRealtimeLogConfig -// 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 GetRealtimeLogConfigRequest method. -// req, resp := client.GetRealtimeLogConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetRealtimeLogConfig -func (c *CloudFront) GetRealtimeLogConfigRequest(input *GetRealtimeLogConfigInput) (req *request.Request, output *GetRealtimeLogConfigOutput) { - op := &request.Operation{ - Name: opGetRealtimeLogConfig, - HTTPMethod: "POST", - HTTPPath: "/2020-05-31/get-realtime-log-config/", - } - - if input == nil { - input = &GetRealtimeLogConfigInput{} - } - - output = &GetRealtimeLogConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRealtimeLogConfig API operation for Amazon CloudFront. -// -// Gets a real-time log configuration. -// -// To get a real-time log configuration, you can provide the configuration's -// name or its Amazon Resource Name (ARN). You must provide at least one. If -// you provide both, CloudFront uses the name to identify the real-time log -// configuration to get. -// -// 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 CloudFront's -// API operation GetRealtimeLogConfig for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchRealtimeLogConfig "NoSuchRealtimeLogConfig" -// The real-time log configuration does not exist. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetRealtimeLogConfig -func (c *CloudFront) GetRealtimeLogConfig(input *GetRealtimeLogConfigInput) (*GetRealtimeLogConfigOutput, error) { - req, out := c.GetRealtimeLogConfigRequest(input) - return out, req.Send() -} - -// GetRealtimeLogConfigWithContext is the same as GetRealtimeLogConfig with the addition of -// the ability to pass a context and additional request options. -// -// See GetRealtimeLogConfig 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 *CloudFront) GetRealtimeLogConfigWithContext(ctx aws.Context, input *GetRealtimeLogConfigInput, opts ...request.Option) (*GetRealtimeLogConfigOutput, error) { - req, out := c.GetRealtimeLogConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetResponseHeadersPolicy = "GetResponseHeadersPolicy2020_05_31" - -// GetResponseHeadersPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetResponseHeadersPolicy 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 GetResponseHeadersPolicy for more information on using the GetResponseHeadersPolicy -// 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 GetResponseHeadersPolicyRequest method. -// req, resp := client.GetResponseHeadersPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetResponseHeadersPolicy -func (c *CloudFront) GetResponseHeadersPolicyRequest(input *GetResponseHeadersPolicyInput) (req *request.Request, output *GetResponseHeadersPolicyOutput) { - op := &request.Operation{ - Name: opGetResponseHeadersPolicy, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/response-headers-policy/{Id}", - } - - if input == nil { - input = &GetResponseHeadersPolicyInput{} - } - - output = &GetResponseHeadersPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetResponseHeadersPolicy API operation for Amazon CloudFront. -// -// Gets a response headers policy, including metadata (the policy's identifier -// and the date and time when the policy was last modified). -// -// To get a response headers policy, you must provide the policy's identifier. -// If the response headers policy is attached to a distribution's cache behavior, -// you can get the policy's identifier using ListDistributions or GetDistribution. -// If the response headers policy is not attached to a cache behavior, you can -// get the identifier using ListResponseHeadersPolicies. -// -// 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 CloudFront's -// API operation GetResponseHeadersPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeNoSuchResponseHeadersPolicy "NoSuchResponseHeadersPolicy" -// The response headers policy does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetResponseHeadersPolicy -func (c *CloudFront) GetResponseHeadersPolicy(input *GetResponseHeadersPolicyInput) (*GetResponseHeadersPolicyOutput, error) { - req, out := c.GetResponseHeadersPolicyRequest(input) - return out, req.Send() -} - -// GetResponseHeadersPolicyWithContext is the same as GetResponseHeadersPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetResponseHeadersPolicy 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 *CloudFront) GetResponseHeadersPolicyWithContext(ctx aws.Context, input *GetResponseHeadersPolicyInput, opts ...request.Option) (*GetResponseHeadersPolicyOutput, error) { - req, out := c.GetResponseHeadersPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetResponseHeadersPolicyConfig = "GetResponseHeadersPolicyConfig2020_05_31" - -// GetResponseHeadersPolicyConfigRequest generates a "aws/request.Request" representing the -// client's request for the GetResponseHeadersPolicyConfig 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 GetResponseHeadersPolicyConfig for more information on using the GetResponseHeadersPolicyConfig -// 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 GetResponseHeadersPolicyConfigRequest method. -// req, resp := client.GetResponseHeadersPolicyConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetResponseHeadersPolicyConfig -func (c *CloudFront) GetResponseHeadersPolicyConfigRequest(input *GetResponseHeadersPolicyConfigInput) (req *request.Request, output *GetResponseHeadersPolicyConfigOutput) { - op := &request.Operation{ - Name: opGetResponseHeadersPolicyConfig, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/response-headers-policy/{Id}/config", - } - - if input == nil { - input = &GetResponseHeadersPolicyConfigInput{} - } - - output = &GetResponseHeadersPolicyConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetResponseHeadersPolicyConfig API operation for Amazon CloudFront. -// -// Gets a response headers policy configuration. -// -// To get a response headers policy configuration, you must provide the policy's -// identifier. If the response headers policy is attached to a distribution's -// cache behavior, you can get the policy's identifier using ListDistributions -// or GetDistribution. If the response headers policy is not attached to a cache -// behavior, you can get the identifier using ListResponseHeadersPolicies. -// -// 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 CloudFront's -// API operation GetResponseHeadersPolicyConfig for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeNoSuchResponseHeadersPolicy "NoSuchResponseHeadersPolicy" -// The response headers policy does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetResponseHeadersPolicyConfig -func (c *CloudFront) GetResponseHeadersPolicyConfig(input *GetResponseHeadersPolicyConfigInput) (*GetResponseHeadersPolicyConfigOutput, error) { - req, out := c.GetResponseHeadersPolicyConfigRequest(input) - return out, req.Send() -} - -// GetResponseHeadersPolicyConfigWithContext is the same as GetResponseHeadersPolicyConfig with the addition of -// the ability to pass a context and additional request options. -// -// See GetResponseHeadersPolicyConfig 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 *CloudFront) GetResponseHeadersPolicyConfigWithContext(ctx aws.Context, input *GetResponseHeadersPolicyConfigInput, opts ...request.Option) (*GetResponseHeadersPolicyConfigOutput, error) { - req, out := c.GetResponseHeadersPolicyConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetStreamingDistribution = "GetStreamingDistribution2020_05_31" - -// GetStreamingDistributionRequest generates a "aws/request.Request" representing the -// client's request for the GetStreamingDistribution 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 GetStreamingDistribution for more information on using the GetStreamingDistribution -// 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 GetStreamingDistributionRequest method. -// req, resp := client.GetStreamingDistributionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetStreamingDistribution -func (c *CloudFront) GetStreamingDistributionRequest(input *GetStreamingDistributionInput) (req *request.Request, output *GetStreamingDistributionOutput) { - op := &request.Operation{ - Name: opGetStreamingDistribution, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/streaming-distribution/{Id}", - } - - if input == nil { - input = &GetStreamingDistributionInput{} - } - - output = &GetStreamingDistributionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetStreamingDistribution API operation for Amazon CloudFront. -// -// Gets information about a specified RTMP distribution, including the distribution -// configuration. -// -// 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 CloudFront's -// API operation GetStreamingDistribution for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchStreamingDistribution "NoSuchStreamingDistribution" -// The specified streaming distribution does not exist. -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetStreamingDistribution -func (c *CloudFront) GetStreamingDistribution(input *GetStreamingDistributionInput) (*GetStreamingDistributionOutput, error) { - req, out := c.GetStreamingDistributionRequest(input) - return out, req.Send() -} - -// GetStreamingDistributionWithContext is the same as GetStreamingDistribution with the addition of -// the ability to pass a context and additional request options. -// -// See GetStreamingDistribution 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 *CloudFront) GetStreamingDistributionWithContext(ctx aws.Context, input *GetStreamingDistributionInput, opts ...request.Option) (*GetStreamingDistributionOutput, error) { - req, out := c.GetStreamingDistributionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetStreamingDistributionConfig = "GetStreamingDistributionConfig2020_05_31" - -// GetStreamingDistributionConfigRequest generates a "aws/request.Request" representing the -// client's request for the GetStreamingDistributionConfig 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 GetStreamingDistributionConfig for more information on using the GetStreamingDistributionConfig -// 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 GetStreamingDistributionConfigRequest method. -// req, resp := client.GetStreamingDistributionConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetStreamingDistributionConfig -func (c *CloudFront) GetStreamingDistributionConfigRequest(input *GetStreamingDistributionConfigInput) (req *request.Request, output *GetStreamingDistributionConfigOutput) { - op := &request.Operation{ - Name: opGetStreamingDistributionConfig, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/streaming-distribution/{Id}/config", - } - - if input == nil { - input = &GetStreamingDistributionConfigInput{} - } - - output = &GetStreamingDistributionConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetStreamingDistributionConfig API operation for Amazon CloudFront. -// -// Get the configuration information about a streaming distribution. -// -// 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 CloudFront's -// API operation GetStreamingDistributionConfig for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchStreamingDistribution "NoSuchStreamingDistribution" -// The specified streaming distribution does not exist. -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/GetStreamingDistributionConfig -func (c *CloudFront) GetStreamingDistributionConfig(input *GetStreamingDistributionConfigInput) (*GetStreamingDistributionConfigOutput, error) { - req, out := c.GetStreamingDistributionConfigRequest(input) - return out, req.Send() -} - -// GetStreamingDistributionConfigWithContext is the same as GetStreamingDistributionConfig with the addition of -// the ability to pass a context and additional request options. -// -// See GetStreamingDistributionConfig 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 *CloudFront) GetStreamingDistributionConfigWithContext(ctx aws.Context, input *GetStreamingDistributionConfigInput, opts ...request.Option) (*GetStreamingDistributionConfigOutput, error) { - req, out := c.GetStreamingDistributionConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListCachePolicies = "ListCachePolicies2020_05_31" - -// ListCachePoliciesRequest generates a "aws/request.Request" representing the -// client's request for the ListCachePolicies 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 ListCachePolicies for more information on using the ListCachePolicies -// 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 ListCachePoliciesRequest method. -// req, resp := client.ListCachePoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListCachePolicies -func (c *CloudFront) ListCachePoliciesRequest(input *ListCachePoliciesInput) (req *request.Request, output *ListCachePoliciesOutput) { - op := &request.Operation{ - Name: opListCachePolicies, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/cache-policy", - } - - if input == nil { - input = &ListCachePoliciesInput{} - } - - output = &ListCachePoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListCachePolicies API operation for Amazon CloudFront. -// -// Gets a list of cache policies. -// -// You can optionally apply a filter to return only the managed policies created -// by Amazon Web Services, or only the custom policies created in your Amazon -// Web Services account. -// -// You can optionally specify the maximum number of items to receive in the -// response. If the total number of items in the list exceeds the maximum that -// you specify, or the default maximum, the response is paginated. To get the -// next page of items, send a subsequent request that specifies the NextMarker -// value from the current response as the Marker value in the subsequent request. -// -// 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 CloudFront's -// API operation ListCachePolicies for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeNoSuchCachePolicy "NoSuchCachePolicy" -// The cache policy does not exist. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListCachePolicies -func (c *CloudFront) ListCachePolicies(input *ListCachePoliciesInput) (*ListCachePoliciesOutput, error) { - req, out := c.ListCachePoliciesRequest(input) - return out, req.Send() -} - -// ListCachePoliciesWithContext is the same as ListCachePolicies with the addition of -// the ability to pass a context and additional request options. -// -// See ListCachePolicies 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 *CloudFront) ListCachePoliciesWithContext(ctx aws.Context, input *ListCachePoliciesInput, opts ...request.Option) (*ListCachePoliciesOutput, error) { - req, out := c.ListCachePoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListCloudFrontOriginAccessIdentities = "ListCloudFrontOriginAccessIdentities2020_05_31" - -// ListCloudFrontOriginAccessIdentitiesRequest generates a "aws/request.Request" representing the -// client's request for the ListCloudFrontOriginAccessIdentities 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 ListCloudFrontOriginAccessIdentities for more information on using the ListCloudFrontOriginAccessIdentities -// 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 ListCloudFrontOriginAccessIdentitiesRequest method. -// req, resp := client.ListCloudFrontOriginAccessIdentitiesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListCloudFrontOriginAccessIdentities -func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesRequest(input *ListCloudFrontOriginAccessIdentitiesInput) (req *request.Request, output *ListCloudFrontOriginAccessIdentitiesOutput) { - op := &request.Operation{ - Name: opListCloudFrontOriginAccessIdentities, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/origin-access-identity/cloudfront", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"CloudFrontOriginAccessIdentityList.NextMarker"}, - LimitToken: "MaxItems", - TruncationToken: "CloudFrontOriginAccessIdentityList.IsTruncated", - }, - } - - if input == nil { - input = &ListCloudFrontOriginAccessIdentitiesInput{} - } - - output = &ListCloudFrontOriginAccessIdentitiesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListCloudFrontOriginAccessIdentities API operation for Amazon CloudFront. -// -// Lists origin access identities. -// -// 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 CloudFront's -// API operation ListCloudFrontOriginAccessIdentities for usage and error information. -// -// Returned Error Codes: -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListCloudFrontOriginAccessIdentities -func (c *CloudFront) ListCloudFrontOriginAccessIdentities(input *ListCloudFrontOriginAccessIdentitiesInput) (*ListCloudFrontOriginAccessIdentitiesOutput, error) { - req, out := c.ListCloudFrontOriginAccessIdentitiesRequest(input) - return out, req.Send() -} - -// ListCloudFrontOriginAccessIdentitiesWithContext is the same as ListCloudFrontOriginAccessIdentities with the addition of -// the ability to pass a context and additional request options. -// -// See ListCloudFrontOriginAccessIdentities 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 *CloudFront) ListCloudFrontOriginAccessIdentitiesWithContext(ctx aws.Context, input *ListCloudFrontOriginAccessIdentitiesInput, opts ...request.Option) (*ListCloudFrontOriginAccessIdentitiesOutput, error) { - req, out := c.ListCloudFrontOriginAccessIdentitiesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListCloudFrontOriginAccessIdentitiesPages iterates over the pages of a ListCloudFrontOriginAccessIdentities operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListCloudFrontOriginAccessIdentities 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 ListCloudFrontOriginAccessIdentities operation. -// pageNum := 0 -// err := client.ListCloudFrontOriginAccessIdentitiesPages(params, -// func(page *cloudfront.ListCloudFrontOriginAccessIdentitiesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesPages(input *ListCloudFrontOriginAccessIdentitiesInput, fn func(*ListCloudFrontOriginAccessIdentitiesOutput, bool) bool) error { - return c.ListCloudFrontOriginAccessIdentitiesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListCloudFrontOriginAccessIdentitiesPagesWithContext same as ListCloudFrontOriginAccessIdentitiesPages 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 *CloudFront) ListCloudFrontOriginAccessIdentitiesPagesWithContext(ctx aws.Context, input *ListCloudFrontOriginAccessIdentitiesInput, fn func(*ListCloudFrontOriginAccessIdentitiesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListCloudFrontOriginAccessIdentitiesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListCloudFrontOriginAccessIdentitiesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListCloudFrontOriginAccessIdentitiesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListConflictingAliases = "ListConflictingAliases2020_05_31" - -// ListConflictingAliasesRequest generates a "aws/request.Request" representing the -// client's request for the ListConflictingAliases 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 ListConflictingAliases for more information on using the ListConflictingAliases -// 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 ListConflictingAliasesRequest method. -// req, resp := client.ListConflictingAliasesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListConflictingAliases -func (c *CloudFront) ListConflictingAliasesRequest(input *ListConflictingAliasesInput) (req *request.Request, output *ListConflictingAliasesOutput) { - op := &request.Operation{ - Name: opListConflictingAliases, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/conflicting-alias", - } - - if input == nil { - input = &ListConflictingAliasesInput{} - } - - output = &ListConflictingAliasesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListConflictingAliases API operation for Amazon CloudFront. -// -// Gets a list of aliases (also called CNAMEs or alternate domain names) that -// conflict or overlap with the provided alias, and the associated CloudFront -// distributions and Amazon Web Services accounts for each conflicting alias. -// In the returned list, the distribution and account IDs are partially hidden, -// which allows you to identify the distributions and accounts that you own, -// but helps to protect the information of ones that you don't own. -// -// Use this operation to find aliases that are in use in CloudFront that conflict -// or overlap with the provided alias. For example, if you provide www.example.com -// as input, the returned list can include www.example.com and the overlapping -// wildcard alternate domain name (*.example.com), if they exist. If you provide -// *.example.com as input, the returned list can include *.example.com and any -// alternate domain names covered by that wildcard (for example, www.example.com, -// test.example.com, dev.example.com, and so on), if they exist. -// -// To list conflicting aliases, you provide the alias to search and the ID of -// a distribution in your account that has an attached SSL/TLS certificate that -// includes the provided alias. For more information, including how to set up -// the distribution and certificate, see Moving an alternate domain name to -// a different distribution (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html#alternate-domain-names-move) -// in the Amazon CloudFront Developer Guide. -// -// You can optionally specify the maximum number of items to receive in the -// response. If the total number of items in the list exceeds the maximum that -// you specify, or the default maximum, the response is paginated. To get the -// next page of items, send a subsequent request that specifies the NextMarker -// value from the current response as the Marker value in the subsequent request. -// -// 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 CloudFront's -// API operation ListConflictingAliases for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeNoSuchDistribution "NoSuchDistribution" -// The specified distribution does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListConflictingAliases -func (c *CloudFront) ListConflictingAliases(input *ListConflictingAliasesInput) (*ListConflictingAliasesOutput, error) { - req, out := c.ListConflictingAliasesRequest(input) - return out, req.Send() -} - -// ListConflictingAliasesWithContext is the same as ListConflictingAliases with the addition of -// the ability to pass a context and additional request options. -// -// See ListConflictingAliases 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 *CloudFront) ListConflictingAliasesWithContext(ctx aws.Context, input *ListConflictingAliasesInput, opts ...request.Option) (*ListConflictingAliasesOutput, error) { - req, out := c.ListConflictingAliasesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListContinuousDeploymentPolicies = "ListContinuousDeploymentPolicies2020_05_31" - -// ListContinuousDeploymentPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the ListContinuousDeploymentPolicies 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 ListContinuousDeploymentPolicies for more information on using the ListContinuousDeploymentPolicies -// 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 ListContinuousDeploymentPoliciesRequest method. -// req, resp := client.ListContinuousDeploymentPoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListContinuousDeploymentPolicies -func (c *CloudFront) ListContinuousDeploymentPoliciesRequest(input *ListContinuousDeploymentPoliciesInput) (req *request.Request, output *ListContinuousDeploymentPoliciesOutput) { - op := &request.Operation{ - Name: opListContinuousDeploymentPolicies, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/continuous-deployment-policy", - } - - if input == nil { - input = &ListContinuousDeploymentPoliciesInput{} - } - - output = &ListContinuousDeploymentPoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListContinuousDeploymentPolicies API operation for Amazon CloudFront. -// -// Gets a list of the continuous deployment policies in your Amazon Web Services -// account. -// -// You can optionally specify the maximum number of items to receive in the -// response. If the total number of items in the list exceeds the maximum that -// you specify, or the default maximum, the response is paginated. To get the -// next page of items, send a subsequent request that specifies the NextMarker -// value from the current response as the Marker value in the subsequent request. -// -// 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 CloudFront's -// API operation ListContinuousDeploymentPolicies for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeNoSuchContinuousDeploymentPolicy "NoSuchContinuousDeploymentPolicy" -// The continuous deployment policy doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListContinuousDeploymentPolicies -func (c *CloudFront) ListContinuousDeploymentPolicies(input *ListContinuousDeploymentPoliciesInput) (*ListContinuousDeploymentPoliciesOutput, error) { - req, out := c.ListContinuousDeploymentPoliciesRequest(input) - return out, req.Send() -} - -// ListContinuousDeploymentPoliciesWithContext is the same as ListContinuousDeploymentPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See ListContinuousDeploymentPolicies 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 *CloudFront) ListContinuousDeploymentPoliciesWithContext(ctx aws.Context, input *ListContinuousDeploymentPoliciesInput, opts ...request.Option) (*ListContinuousDeploymentPoliciesOutput, error) { - req, out := c.ListContinuousDeploymentPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListDistributions = "ListDistributions2020_05_31" - -// ListDistributionsRequest generates a "aws/request.Request" representing the -// client's request for the ListDistributions 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 ListDistributions for more information on using the ListDistributions -// 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 ListDistributionsRequest method. -// req, resp := client.ListDistributionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListDistributions -func (c *CloudFront) ListDistributionsRequest(input *ListDistributionsInput) (req *request.Request, output *ListDistributionsOutput) { - op := &request.Operation{ - Name: opListDistributions, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/distribution", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"DistributionList.NextMarker"}, - LimitToken: "MaxItems", - TruncationToken: "DistributionList.IsTruncated", - }, - } - - if input == nil { - input = &ListDistributionsInput{} - } - - output = &ListDistributionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDistributions API operation for Amazon CloudFront. -// -// List CloudFront distributions. -// -// 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 CloudFront's -// API operation ListDistributions for usage and error information. -// -// Returned Error Codes: -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListDistributions -func (c *CloudFront) ListDistributions(input *ListDistributionsInput) (*ListDistributionsOutput, error) { - req, out := c.ListDistributionsRequest(input) - return out, req.Send() -} - -// ListDistributionsWithContext is the same as ListDistributions with the addition of -// the ability to pass a context and additional request options. -// -// See ListDistributions 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 *CloudFront) ListDistributionsWithContext(ctx aws.Context, input *ListDistributionsInput, opts ...request.Option) (*ListDistributionsOutput, error) { - req, out := c.ListDistributionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListDistributionsPages iterates over the pages of a ListDistributions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListDistributions 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 ListDistributions operation. -// pageNum := 0 -// err := client.ListDistributionsPages(params, -// func(page *cloudfront.ListDistributionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *CloudFront) ListDistributionsPages(input *ListDistributionsInput, fn func(*ListDistributionsOutput, bool) bool) error { - return c.ListDistributionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListDistributionsPagesWithContext same as ListDistributionsPages 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 *CloudFront) ListDistributionsPagesWithContext(ctx aws.Context, input *ListDistributionsInput, fn func(*ListDistributionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListDistributionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListDistributionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListDistributionsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListDistributionsByCachePolicyId = "ListDistributionsByCachePolicyId2020_05_31" - -// ListDistributionsByCachePolicyIdRequest generates a "aws/request.Request" representing the -// client's request for the ListDistributionsByCachePolicyId 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 ListDistributionsByCachePolicyId for more information on using the ListDistributionsByCachePolicyId -// 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 ListDistributionsByCachePolicyIdRequest method. -// req, resp := client.ListDistributionsByCachePolicyIdRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListDistributionsByCachePolicyId -func (c *CloudFront) ListDistributionsByCachePolicyIdRequest(input *ListDistributionsByCachePolicyIdInput) (req *request.Request, output *ListDistributionsByCachePolicyIdOutput) { - op := &request.Operation{ - Name: opListDistributionsByCachePolicyId, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/distributionsByCachePolicyId/{CachePolicyId}", - } - - if input == nil { - input = &ListDistributionsByCachePolicyIdInput{} - } - - output = &ListDistributionsByCachePolicyIdOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDistributionsByCachePolicyId API operation for Amazon CloudFront. -// -// Gets a list of distribution IDs for distributions that have a cache behavior -// that's associated with the specified cache policy. -// -// You can optionally specify the maximum number of items to receive in the -// response. If the total number of items in the list exceeds the maximum that -// you specify, or the default maximum, the response is paginated. To get the -// next page of items, send a subsequent request that specifies the NextMarker -// value from the current response as the Marker value in the subsequent request. -// -// 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 CloudFront's -// API operation ListDistributionsByCachePolicyId for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchCachePolicy "NoSuchCachePolicy" -// The cache policy does not exist. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListDistributionsByCachePolicyId -func (c *CloudFront) ListDistributionsByCachePolicyId(input *ListDistributionsByCachePolicyIdInput) (*ListDistributionsByCachePolicyIdOutput, error) { - req, out := c.ListDistributionsByCachePolicyIdRequest(input) - return out, req.Send() -} - -// ListDistributionsByCachePolicyIdWithContext is the same as ListDistributionsByCachePolicyId with the addition of -// the ability to pass a context and additional request options. -// -// See ListDistributionsByCachePolicyId 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 *CloudFront) ListDistributionsByCachePolicyIdWithContext(ctx aws.Context, input *ListDistributionsByCachePolicyIdInput, opts ...request.Option) (*ListDistributionsByCachePolicyIdOutput, error) { - req, out := c.ListDistributionsByCachePolicyIdRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListDistributionsByKeyGroup = "ListDistributionsByKeyGroup2020_05_31" - -// ListDistributionsByKeyGroupRequest generates a "aws/request.Request" representing the -// client's request for the ListDistributionsByKeyGroup 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 ListDistributionsByKeyGroup for more information on using the ListDistributionsByKeyGroup -// 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 ListDistributionsByKeyGroupRequest method. -// req, resp := client.ListDistributionsByKeyGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListDistributionsByKeyGroup -func (c *CloudFront) ListDistributionsByKeyGroupRequest(input *ListDistributionsByKeyGroupInput) (req *request.Request, output *ListDistributionsByKeyGroupOutput) { - op := &request.Operation{ - Name: opListDistributionsByKeyGroup, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/distributionsByKeyGroupId/{KeyGroupId}", - } - - if input == nil { - input = &ListDistributionsByKeyGroupInput{} - } - - output = &ListDistributionsByKeyGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDistributionsByKeyGroup API operation for Amazon CloudFront. -// -// Gets a list of distribution IDs for distributions that have a cache behavior -// that references the specified key group. -// -// You can optionally specify the maximum number of items to receive in the -// response. If the total number of items in the list exceeds the maximum that -// you specify, or the default maximum, the response is paginated. To get the -// next page of items, send a subsequent request that specifies the NextMarker -// value from the current response as the Marker value in the subsequent request. -// -// 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 CloudFront's -// API operation ListDistributionsByKeyGroup for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchResource "NoSuchResource" -// A resource that was specified is not valid. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListDistributionsByKeyGroup -func (c *CloudFront) ListDistributionsByKeyGroup(input *ListDistributionsByKeyGroupInput) (*ListDistributionsByKeyGroupOutput, error) { - req, out := c.ListDistributionsByKeyGroupRequest(input) - return out, req.Send() -} - -// ListDistributionsByKeyGroupWithContext is the same as ListDistributionsByKeyGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ListDistributionsByKeyGroup 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 *CloudFront) ListDistributionsByKeyGroupWithContext(ctx aws.Context, input *ListDistributionsByKeyGroupInput, opts ...request.Option) (*ListDistributionsByKeyGroupOutput, error) { - req, out := c.ListDistributionsByKeyGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListDistributionsByOriginRequestPolicyId = "ListDistributionsByOriginRequestPolicyId2020_05_31" - -// ListDistributionsByOriginRequestPolicyIdRequest generates a "aws/request.Request" representing the -// client's request for the ListDistributionsByOriginRequestPolicyId 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 ListDistributionsByOriginRequestPolicyId for more information on using the ListDistributionsByOriginRequestPolicyId -// 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 ListDistributionsByOriginRequestPolicyIdRequest method. -// req, resp := client.ListDistributionsByOriginRequestPolicyIdRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListDistributionsByOriginRequestPolicyId -func (c *CloudFront) ListDistributionsByOriginRequestPolicyIdRequest(input *ListDistributionsByOriginRequestPolicyIdInput) (req *request.Request, output *ListDistributionsByOriginRequestPolicyIdOutput) { - op := &request.Operation{ - Name: opListDistributionsByOriginRequestPolicyId, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/distributionsByOriginRequestPolicyId/{OriginRequestPolicyId}", - } - - if input == nil { - input = &ListDistributionsByOriginRequestPolicyIdInput{} - } - - output = &ListDistributionsByOriginRequestPolicyIdOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDistributionsByOriginRequestPolicyId API operation for Amazon CloudFront. -// -// Gets a list of distribution IDs for distributions that have a cache behavior -// that's associated with the specified origin request policy. -// -// You can optionally specify the maximum number of items to receive in the -// response. If the total number of items in the list exceeds the maximum that -// you specify, or the default maximum, the response is paginated. To get the -// next page of items, send a subsequent request that specifies the NextMarker -// value from the current response as the Marker value in the subsequent request. -// -// 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 CloudFront's -// API operation ListDistributionsByOriginRequestPolicyId for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchOriginRequestPolicy "NoSuchOriginRequestPolicy" -// The origin request policy does not exist. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListDistributionsByOriginRequestPolicyId -func (c *CloudFront) ListDistributionsByOriginRequestPolicyId(input *ListDistributionsByOriginRequestPolicyIdInput) (*ListDistributionsByOriginRequestPolicyIdOutput, error) { - req, out := c.ListDistributionsByOriginRequestPolicyIdRequest(input) - return out, req.Send() -} - -// ListDistributionsByOriginRequestPolicyIdWithContext is the same as ListDistributionsByOriginRequestPolicyId with the addition of -// the ability to pass a context and additional request options. -// -// See ListDistributionsByOriginRequestPolicyId 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 *CloudFront) ListDistributionsByOriginRequestPolicyIdWithContext(ctx aws.Context, input *ListDistributionsByOriginRequestPolicyIdInput, opts ...request.Option) (*ListDistributionsByOriginRequestPolicyIdOutput, error) { - req, out := c.ListDistributionsByOriginRequestPolicyIdRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListDistributionsByRealtimeLogConfig = "ListDistributionsByRealtimeLogConfig2020_05_31" - -// ListDistributionsByRealtimeLogConfigRequest generates a "aws/request.Request" representing the -// client's request for the ListDistributionsByRealtimeLogConfig 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 ListDistributionsByRealtimeLogConfig for more information on using the ListDistributionsByRealtimeLogConfig -// 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 ListDistributionsByRealtimeLogConfigRequest method. -// req, resp := client.ListDistributionsByRealtimeLogConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListDistributionsByRealtimeLogConfig -func (c *CloudFront) ListDistributionsByRealtimeLogConfigRequest(input *ListDistributionsByRealtimeLogConfigInput) (req *request.Request, output *ListDistributionsByRealtimeLogConfigOutput) { - op := &request.Operation{ - Name: opListDistributionsByRealtimeLogConfig, - HTTPMethod: "POST", - HTTPPath: "/2020-05-31/distributionsByRealtimeLogConfig/", - } - - if input == nil { - input = &ListDistributionsByRealtimeLogConfigInput{} - } - - output = &ListDistributionsByRealtimeLogConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDistributionsByRealtimeLogConfig API operation for Amazon CloudFront. -// -// Gets a list of distributions that have a cache behavior that's associated -// with the specified real-time log configuration. -// -// You can specify the real-time log configuration by its name or its Amazon -// Resource Name (ARN). You must provide at least one. If you provide both, -// CloudFront uses the name to identify the real-time log configuration to list -// distributions for. -// -// You can optionally specify the maximum number of items to receive in the -// response. If the total number of items in the list exceeds the maximum that -// you specify, or the default maximum, the response is paginated. To get the -// next page of items, send a subsequent request that specifies the NextMarker -// value from the current response as the Marker value in the subsequent request. -// -// 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 CloudFront's -// API operation ListDistributionsByRealtimeLogConfig for usage and error information. -// -// Returned Error Codes: -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListDistributionsByRealtimeLogConfig -func (c *CloudFront) ListDistributionsByRealtimeLogConfig(input *ListDistributionsByRealtimeLogConfigInput) (*ListDistributionsByRealtimeLogConfigOutput, error) { - req, out := c.ListDistributionsByRealtimeLogConfigRequest(input) - return out, req.Send() -} - -// ListDistributionsByRealtimeLogConfigWithContext is the same as ListDistributionsByRealtimeLogConfig with the addition of -// the ability to pass a context and additional request options. -// -// See ListDistributionsByRealtimeLogConfig 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 *CloudFront) ListDistributionsByRealtimeLogConfigWithContext(ctx aws.Context, input *ListDistributionsByRealtimeLogConfigInput, opts ...request.Option) (*ListDistributionsByRealtimeLogConfigOutput, error) { - req, out := c.ListDistributionsByRealtimeLogConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListDistributionsByResponseHeadersPolicyId = "ListDistributionsByResponseHeadersPolicyId2020_05_31" - -// ListDistributionsByResponseHeadersPolicyIdRequest generates a "aws/request.Request" representing the -// client's request for the ListDistributionsByResponseHeadersPolicyId 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 ListDistributionsByResponseHeadersPolicyId for more information on using the ListDistributionsByResponseHeadersPolicyId -// 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 ListDistributionsByResponseHeadersPolicyIdRequest method. -// req, resp := client.ListDistributionsByResponseHeadersPolicyIdRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListDistributionsByResponseHeadersPolicyId -func (c *CloudFront) ListDistributionsByResponseHeadersPolicyIdRequest(input *ListDistributionsByResponseHeadersPolicyIdInput) (req *request.Request, output *ListDistributionsByResponseHeadersPolicyIdOutput) { - op := &request.Operation{ - Name: opListDistributionsByResponseHeadersPolicyId, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/distributionsByResponseHeadersPolicyId/{ResponseHeadersPolicyId}", - } - - if input == nil { - input = &ListDistributionsByResponseHeadersPolicyIdInput{} - } - - output = &ListDistributionsByResponseHeadersPolicyIdOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDistributionsByResponseHeadersPolicyId API operation for Amazon CloudFront. -// -// Gets a list of distribution IDs for distributions that have a cache behavior -// that's associated with the specified response headers policy. -// -// You can optionally specify the maximum number of items to receive in the -// response. If the total number of items in the list exceeds the maximum that -// you specify, or the default maximum, the response is paginated. To get the -// next page of items, send a subsequent request that specifies the NextMarker -// value from the current response as the Marker value in the subsequent request. -// -// 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 CloudFront's -// API operation ListDistributionsByResponseHeadersPolicyId for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchResponseHeadersPolicy "NoSuchResponseHeadersPolicy" -// The response headers policy does not exist. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListDistributionsByResponseHeadersPolicyId -func (c *CloudFront) ListDistributionsByResponseHeadersPolicyId(input *ListDistributionsByResponseHeadersPolicyIdInput) (*ListDistributionsByResponseHeadersPolicyIdOutput, error) { - req, out := c.ListDistributionsByResponseHeadersPolicyIdRequest(input) - return out, req.Send() -} - -// ListDistributionsByResponseHeadersPolicyIdWithContext is the same as ListDistributionsByResponseHeadersPolicyId with the addition of -// the ability to pass a context and additional request options. -// -// See ListDistributionsByResponseHeadersPolicyId 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 *CloudFront) ListDistributionsByResponseHeadersPolicyIdWithContext(ctx aws.Context, input *ListDistributionsByResponseHeadersPolicyIdInput, opts ...request.Option) (*ListDistributionsByResponseHeadersPolicyIdOutput, error) { - req, out := c.ListDistributionsByResponseHeadersPolicyIdRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListDistributionsByWebACLId = "ListDistributionsByWebACLId2020_05_31" - -// ListDistributionsByWebACLIdRequest generates a "aws/request.Request" representing the -// client's request for the ListDistributionsByWebACLId 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 ListDistributionsByWebACLId for more information on using the ListDistributionsByWebACLId -// 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 ListDistributionsByWebACLIdRequest method. -// req, resp := client.ListDistributionsByWebACLIdRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListDistributionsByWebACLId -func (c *CloudFront) ListDistributionsByWebACLIdRequest(input *ListDistributionsByWebACLIdInput) (req *request.Request, output *ListDistributionsByWebACLIdOutput) { - op := &request.Operation{ - Name: opListDistributionsByWebACLId, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/distributionsByWebACLId/{WebACLId}", - } - - if input == nil { - input = &ListDistributionsByWebACLIdInput{} - } - - output = &ListDistributionsByWebACLIdOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDistributionsByWebACLId API operation for Amazon CloudFront. -// -// List the distributions that are associated with a specified WAF web ACL. -// -// 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 CloudFront's -// API operation ListDistributionsByWebACLId for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeInvalidWebACLId "InvalidWebACLId" -// A web ACL ID specified is not valid. To specify a web ACL created using the -// latest version of WAF, use the ACL ARN, for example arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a. -// To specify a web ACL created using WAF Classic, use the ACL ID, for example -// 473e64fd-f30b-4765-81a0-62ad96dd167a. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListDistributionsByWebACLId -func (c *CloudFront) ListDistributionsByWebACLId(input *ListDistributionsByWebACLIdInput) (*ListDistributionsByWebACLIdOutput, error) { - req, out := c.ListDistributionsByWebACLIdRequest(input) - return out, req.Send() -} - -// ListDistributionsByWebACLIdWithContext is the same as ListDistributionsByWebACLId with the addition of -// the ability to pass a context and additional request options. -// -// See ListDistributionsByWebACLId 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 *CloudFront) ListDistributionsByWebACLIdWithContext(ctx aws.Context, input *ListDistributionsByWebACLIdInput, opts ...request.Option) (*ListDistributionsByWebACLIdOutput, error) { - req, out := c.ListDistributionsByWebACLIdRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListFieldLevelEncryptionConfigs = "ListFieldLevelEncryptionConfigs2020_05_31" - -// ListFieldLevelEncryptionConfigsRequest generates a "aws/request.Request" representing the -// client's request for the ListFieldLevelEncryptionConfigs 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 ListFieldLevelEncryptionConfigs for more information on using the ListFieldLevelEncryptionConfigs -// 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 ListFieldLevelEncryptionConfigsRequest method. -// req, resp := client.ListFieldLevelEncryptionConfigsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListFieldLevelEncryptionConfigs -func (c *CloudFront) ListFieldLevelEncryptionConfigsRequest(input *ListFieldLevelEncryptionConfigsInput) (req *request.Request, output *ListFieldLevelEncryptionConfigsOutput) { - op := &request.Operation{ - Name: opListFieldLevelEncryptionConfigs, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/field-level-encryption", - } - - if input == nil { - input = &ListFieldLevelEncryptionConfigsInput{} - } - - output = &ListFieldLevelEncryptionConfigsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListFieldLevelEncryptionConfigs API operation for Amazon CloudFront. -// -// List all field-level encryption configurations that have been created in -// CloudFront for this 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 Amazon CloudFront's -// API operation ListFieldLevelEncryptionConfigs for usage and error information. -// -// Returned Error Codes: -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListFieldLevelEncryptionConfigs -func (c *CloudFront) ListFieldLevelEncryptionConfigs(input *ListFieldLevelEncryptionConfigsInput) (*ListFieldLevelEncryptionConfigsOutput, error) { - req, out := c.ListFieldLevelEncryptionConfigsRequest(input) - return out, req.Send() -} - -// ListFieldLevelEncryptionConfigsWithContext is the same as ListFieldLevelEncryptionConfigs with the addition of -// the ability to pass a context and additional request options. -// -// See ListFieldLevelEncryptionConfigs 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 *CloudFront) ListFieldLevelEncryptionConfigsWithContext(ctx aws.Context, input *ListFieldLevelEncryptionConfigsInput, opts ...request.Option) (*ListFieldLevelEncryptionConfigsOutput, error) { - req, out := c.ListFieldLevelEncryptionConfigsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListFieldLevelEncryptionProfiles = "ListFieldLevelEncryptionProfiles2020_05_31" - -// ListFieldLevelEncryptionProfilesRequest generates a "aws/request.Request" representing the -// client's request for the ListFieldLevelEncryptionProfiles 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 ListFieldLevelEncryptionProfiles for more information on using the ListFieldLevelEncryptionProfiles -// 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 ListFieldLevelEncryptionProfilesRequest method. -// req, resp := client.ListFieldLevelEncryptionProfilesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListFieldLevelEncryptionProfiles -func (c *CloudFront) ListFieldLevelEncryptionProfilesRequest(input *ListFieldLevelEncryptionProfilesInput) (req *request.Request, output *ListFieldLevelEncryptionProfilesOutput) { - op := &request.Operation{ - Name: opListFieldLevelEncryptionProfiles, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/field-level-encryption-profile", - } - - if input == nil { - input = &ListFieldLevelEncryptionProfilesInput{} - } - - output = &ListFieldLevelEncryptionProfilesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListFieldLevelEncryptionProfiles API operation for Amazon CloudFront. -// -// Request a list of field-level encryption profiles that have been created -// in CloudFront for this 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 Amazon CloudFront's -// API operation ListFieldLevelEncryptionProfiles for usage and error information. -// -// Returned Error Codes: -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListFieldLevelEncryptionProfiles -func (c *CloudFront) ListFieldLevelEncryptionProfiles(input *ListFieldLevelEncryptionProfilesInput) (*ListFieldLevelEncryptionProfilesOutput, error) { - req, out := c.ListFieldLevelEncryptionProfilesRequest(input) - return out, req.Send() -} - -// ListFieldLevelEncryptionProfilesWithContext is the same as ListFieldLevelEncryptionProfiles with the addition of -// the ability to pass a context and additional request options. -// -// See ListFieldLevelEncryptionProfiles 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 *CloudFront) ListFieldLevelEncryptionProfilesWithContext(ctx aws.Context, input *ListFieldLevelEncryptionProfilesInput, opts ...request.Option) (*ListFieldLevelEncryptionProfilesOutput, error) { - req, out := c.ListFieldLevelEncryptionProfilesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListFunctions = "ListFunctions2020_05_31" - -// ListFunctionsRequest generates a "aws/request.Request" representing the -// client's request for the ListFunctions 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 ListFunctions for more information on using the ListFunctions -// 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 ListFunctionsRequest method. -// req, resp := client.ListFunctionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListFunctions -func (c *CloudFront) ListFunctionsRequest(input *ListFunctionsInput) (req *request.Request, output *ListFunctionsOutput) { - op := &request.Operation{ - Name: opListFunctions, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/function", - } - - if input == nil { - input = &ListFunctionsInput{} - } - - output = &ListFunctionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListFunctions API operation for Amazon CloudFront. -// -// Gets a list of all CloudFront functions in your Amazon Web Services account. -// -// You can optionally apply a filter to return only the functions that are in -// the specified stage, either DEVELOPMENT or LIVE. -// -// You can optionally specify the maximum number of items to receive in the -// response. If the total number of items in the list exceeds the maximum that -// you specify, or the default maximum, the response is paginated. To get the -// next page of items, send a subsequent request that specifies the NextMarker -// value from the current response as the Marker value in the subsequent request. -// -// 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 CloudFront's -// API operation ListFunctions for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeUnsupportedOperation "UnsupportedOperation" -// This operation is not supported in this region. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListFunctions -func (c *CloudFront) ListFunctions(input *ListFunctionsInput) (*ListFunctionsOutput, error) { - req, out := c.ListFunctionsRequest(input) - return out, req.Send() -} - -// ListFunctionsWithContext is the same as ListFunctions with the addition of -// the ability to pass a context and additional request options. -// -// See ListFunctions 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 *CloudFront) ListFunctionsWithContext(ctx aws.Context, input *ListFunctionsInput, opts ...request.Option) (*ListFunctionsOutput, error) { - req, out := c.ListFunctionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListInvalidations = "ListInvalidations2020_05_31" - -// ListInvalidationsRequest generates a "aws/request.Request" representing the -// client's request for the ListInvalidations 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 ListInvalidations for more information on using the ListInvalidations -// 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 ListInvalidationsRequest method. -// req, resp := client.ListInvalidationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListInvalidations -func (c *CloudFront) ListInvalidationsRequest(input *ListInvalidationsInput) (req *request.Request, output *ListInvalidationsOutput) { - op := &request.Operation{ - Name: opListInvalidations, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/distribution/{DistributionId}/invalidation", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"InvalidationList.NextMarker"}, - LimitToken: "MaxItems", - TruncationToken: "InvalidationList.IsTruncated", - }, - } - - if input == nil { - input = &ListInvalidationsInput{} - } - - output = &ListInvalidationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListInvalidations API operation for Amazon CloudFront. -// -// Lists invalidation batches. -// -// 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 CloudFront's -// API operation ListInvalidations for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeNoSuchDistribution "NoSuchDistribution" -// The specified distribution does not exist. -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListInvalidations -func (c *CloudFront) ListInvalidations(input *ListInvalidationsInput) (*ListInvalidationsOutput, error) { - req, out := c.ListInvalidationsRequest(input) - return out, req.Send() -} - -// ListInvalidationsWithContext is the same as ListInvalidations with the addition of -// the ability to pass a context and additional request options. -// -// See ListInvalidations 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 *CloudFront) ListInvalidationsWithContext(ctx aws.Context, input *ListInvalidationsInput, opts ...request.Option) (*ListInvalidationsOutput, error) { - req, out := c.ListInvalidationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListInvalidationsPages iterates over the pages of a ListInvalidations operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListInvalidations 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 ListInvalidations operation. -// pageNum := 0 -// err := client.ListInvalidationsPages(params, -// func(page *cloudfront.ListInvalidationsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *CloudFront) ListInvalidationsPages(input *ListInvalidationsInput, fn func(*ListInvalidationsOutput, bool) bool) error { - return c.ListInvalidationsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListInvalidationsPagesWithContext same as ListInvalidationsPages 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 *CloudFront) ListInvalidationsPagesWithContext(ctx aws.Context, input *ListInvalidationsInput, fn func(*ListInvalidationsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListInvalidationsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListInvalidationsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListInvalidationsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListKeyGroups = "ListKeyGroups2020_05_31" - -// ListKeyGroupsRequest generates a "aws/request.Request" representing the -// client's request for the ListKeyGroups 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 ListKeyGroups for more information on using the ListKeyGroups -// 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 ListKeyGroupsRequest method. -// req, resp := client.ListKeyGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListKeyGroups -func (c *CloudFront) ListKeyGroupsRequest(input *ListKeyGroupsInput) (req *request.Request, output *ListKeyGroupsOutput) { - op := &request.Operation{ - Name: opListKeyGroups, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/key-group", - } - - if input == nil { - input = &ListKeyGroupsInput{} - } - - output = &ListKeyGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListKeyGroups API operation for Amazon CloudFront. -// -// Gets a list of key groups. -// -// You can optionally specify the maximum number of items to receive in the -// response. If the total number of items in the list exceeds the maximum that -// you specify, or the default maximum, the response is paginated. To get the -// next page of items, send a subsequent request that specifies the NextMarker -// value from the current response as the Marker value in the subsequent request. -// -// 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 CloudFront's -// API operation ListKeyGroups for usage and error information. -// -// Returned Error Codes: -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListKeyGroups -func (c *CloudFront) ListKeyGroups(input *ListKeyGroupsInput) (*ListKeyGroupsOutput, error) { - req, out := c.ListKeyGroupsRequest(input) - return out, req.Send() -} - -// ListKeyGroupsWithContext is the same as ListKeyGroups with the addition of -// the ability to pass a context and additional request options. -// -// See ListKeyGroups 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 *CloudFront) ListKeyGroupsWithContext(ctx aws.Context, input *ListKeyGroupsInput, opts ...request.Option) (*ListKeyGroupsOutput, error) { - req, out := c.ListKeyGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListKeyValueStores = "ListKeyValueStores2020_05_31" - -// ListKeyValueStoresRequest generates a "aws/request.Request" representing the -// client's request for the ListKeyValueStores 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 ListKeyValueStores for more information on using the ListKeyValueStores -// 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 ListKeyValueStoresRequest method. -// req, resp := client.ListKeyValueStoresRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListKeyValueStores -func (c *CloudFront) ListKeyValueStoresRequest(input *ListKeyValueStoresInput) (req *request.Request, output *ListKeyValueStoresOutput) { - op := &request.Operation{ - Name: opListKeyValueStores, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/key-value-store", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"KeyValueStoreList.NextMarker"}, - LimitToken: "MaxItems", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListKeyValueStoresInput{} - } - - output = &ListKeyValueStoresOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListKeyValueStores API operation for Amazon CloudFront. -// -// Specifies the key value stores to list. -// -// 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 CloudFront's -// API operation ListKeyValueStores for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeUnsupportedOperation "UnsupportedOperation" -// This operation is not supported in this region. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListKeyValueStores -func (c *CloudFront) ListKeyValueStores(input *ListKeyValueStoresInput) (*ListKeyValueStoresOutput, error) { - req, out := c.ListKeyValueStoresRequest(input) - return out, req.Send() -} - -// ListKeyValueStoresWithContext is the same as ListKeyValueStores with the addition of -// the ability to pass a context and additional request options. -// -// See ListKeyValueStores 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 *CloudFront) ListKeyValueStoresWithContext(ctx aws.Context, input *ListKeyValueStoresInput, opts ...request.Option) (*ListKeyValueStoresOutput, error) { - req, out := c.ListKeyValueStoresRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListKeyValueStoresPages iterates over the pages of a ListKeyValueStores operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListKeyValueStores 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 ListKeyValueStores operation. -// pageNum := 0 -// err := client.ListKeyValueStoresPages(params, -// func(page *cloudfront.ListKeyValueStoresOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *CloudFront) ListKeyValueStoresPages(input *ListKeyValueStoresInput, fn func(*ListKeyValueStoresOutput, bool) bool) error { - return c.ListKeyValueStoresPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListKeyValueStoresPagesWithContext same as ListKeyValueStoresPages 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 *CloudFront) ListKeyValueStoresPagesWithContext(ctx aws.Context, input *ListKeyValueStoresInput, fn func(*ListKeyValueStoresOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListKeyValueStoresInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListKeyValueStoresRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListKeyValueStoresOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListOriginAccessControls = "ListOriginAccessControls2020_05_31" - -// ListOriginAccessControlsRequest generates a "aws/request.Request" representing the -// client's request for the ListOriginAccessControls 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 ListOriginAccessControls for more information on using the ListOriginAccessControls -// 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 ListOriginAccessControlsRequest method. -// req, resp := client.ListOriginAccessControlsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListOriginAccessControls -func (c *CloudFront) ListOriginAccessControlsRequest(input *ListOriginAccessControlsInput) (req *request.Request, output *ListOriginAccessControlsOutput) { - op := &request.Operation{ - Name: opListOriginAccessControls, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/origin-access-control", - } - - if input == nil { - input = &ListOriginAccessControlsInput{} - } - - output = &ListOriginAccessControlsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListOriginAccessControls API operation for Amazon CloudFront. -// -// Gets the list of CloudFront origin access controls in this Amazon Web Services -// account. -// -// You can optionally specify the maximum number of items to receive in the -// response. If the total number of items in the list exceeds the maximum that -// you specify, or the default maximum, the response is paginated. To get the -// next page of items, send another request that specifies the NextMarker value -// from the current response as the Marker value in the next request. -// -// 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 CloudFront's -// API operation ListOriginAccessControls for usage and error information. -// -// Returned Error Codes: -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListOriginAccessControls -func (c *CloudFront) ListOriginAccessControls(input *ListOriginAccessControlsInput) (*ListOriginAccessControlsOutput, error) { - req, out := c.ListOriginAccessControlsRequest(input) - return out, req.Send() -} - -// ListOriginAccessControlsWithContext is the same as ListOriginAccessControls with the addition of -// the ability to pass a context and additional request options. -// -// See ListOriginAccessControls 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 *CloudFront) ListOriginAccessControlsWithContext(ctx aws.Context, input *ListOriginAccessControlsInput, opts ...request.Option) (*ListOriginAccessControlsOutput, error) { - req, out := c.ListOriginAccessControlsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListOriginRequestPolicies = "ListOriginRequestPolicies2020_05_31" - -// ListOriginRequestPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the ListOriginRequestPolicies 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 ListOriginRequestPolicies for more information on using the ListOriginRequestPolicies -// 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 ListOriginRequestPoliciesRequest method. -// req, resp := client.ListOriginRequestPoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListOriginRequestPolicies -func (c *CloudFront) ListOriginRequestPoliciesRequest(input *ListOriginRequestPoliciesInput) (req *request.Request, output *ListOriginRequestPoliciesOutput) { - op := &request.Operation{ - Name: opListOriginRequestPolicies, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/origin-request-policy", - } - - if input == nil { - input = &ListOriginRequestPoliciesInput{} - } - - output = &ListOriginRequestPoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListOriginRequestPolicies API operation for Amazon CloudFront. -// -// Gets a list of origin request policies. -// -// You can optionally apply a filter to return only the managed policies created -// by Amazon Web Services, or only the custom policies created in your Amazon -// Web Services account. -// -// You can optionally specify the maximum number of items to receive in the -// response. If the total number of items in the list exceeds the maximum that -// you specify, or the default maximum, the response is paginated. To get the -// next page of items, send a subsequent request that specifies the NextMarker -// value from the current response as the Marker value in the subsequent request. -// -// 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 CloudFront's -// API operation ListOriginRequestPolicies for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeNoSuchOriginRequestPolicy "NoSuchOriginRequestPolicy" -// The origin request policy does not exist. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListOriginRequestPolicies -func (c *CloudFront) ListOriginRequestPolicies(input *ListOriginRequestPoliciesInput) (*ListOriginRequestPoliciesOutput, error) { - req, out := c.ListOriginRequestPoliciesRequest(input) - return out, req.Send() -} - -// ListOriginRequestPoliciesWithContext is the same as ListOriginRequestPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See ListOriginRequestPolicies 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 *CloudFront) ListOriginRequestPoliciesWithContext(ctx aws.Context, input *ListOriginRequestPoliciesInput, opts ...request.Option) (*ListOriginRequestPoliciesOutput, error) { - req, out := c.ListOriginRequestPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListPublicKeys = "ListPublicKeys2020_05_31" - -// ListPublicKeysRequest generates a "aws/request.Request" representing the -// client's request for the ListPublicKeys 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 ListPublicKeys for more information on using the ListPublicKeys -// 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 ListPublicKeysRequest method. -// req, resp := client.ListPublicKeysRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListPublicKeys -func (c *CloudFront) ListPublicKeysRequest(input *ListPublicKeysInput) (req *request.Request, output *ListPublicKeysOutput) { - op := &request.Operation{ - Name: opListPublicKeys, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/public-key", - } - - if input == nil { - input = &ListPublicKeysInput{} - } - - output = &ListPublicKeysOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPublicKeys API operation for Amazon CloudFront. -// -// List all public keys that have been added to CloudFront for this 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 Amazon CloudFront's -// API operation ListPublicKeys for usage and error information. -// -// Returned Error Codes: -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListPublicKeys -func (c *CloudFront) ListPublicKeys(input *ListPublicKeysInput) (*ListPublicKeysOutput, error) { - req, out := c.ListPublicKeysRequest(input) - return out, req.Send() -} - -// ListPublicKeysWithContext is the same as ListPublicKeys with the addition of -// the ability to pass a context and additional request options. -// -// See ListPublicKeys 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 *CloudFront) ListPublicKeysWithContext(ctx aws.Context, input *ListPublicKeysInput, opts ...request.Option) (*ListPublicKeysOutput, error) { - req, out := c.ListPublicKeysRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListRealtimeLogConfigs = "ListRealtimeLogConfigs2020_05_31" - -// ListRealtimeLogConfigsRequest generates a "aws/request.Request" representing the -// client's request for the ListRealtimeLogConfigs 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 ListRealtimeLogConfigs for more information on using the ListRealtimeLogConfigs -// 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 ListRealtimeLogConfigsRequest method. -// req, resp := client.ListRealtimeLogConfigsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListRealtimeLogConfigs -func (c *CloudFront) ListRealtimeLogConfigsRequest(input *ListRealtimeLogConfigsInput) (req *request.Request, output *ListRealtimeLogConfigsOutput) { - op := &request.Operation{ - Name: opListRealtimeLogConfigs, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/realtime-log-config", - } - - if input == nil { - input = &ListRealtimeLogConfigsInput{} - } - - output = &ListRealtimeLogConfigsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListRealtimeLogConfigs API operation for Amazon CloudFront. -// -// Gets a list of real-time log configurations. -// -// You can optionally specify the maximum number of items to receive in the -// response. If the total number of items in the list exceeds the maximum that -// you specify, or the default maximum, the response is paginated. To get the -// next page of items, send a subsequent request that specifies the NextMarker -// value from the current response as the Marker value in the subsequent request. -// -// 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 CloudFront's -// API operation ListRealtimeLogConfigs for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeNoSuchRealtimeLogConfig "NoSuchRealtimeLogConfig" -// The real-time log configuration does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListRealtimeLogConfigs -func (c *CloudFront) ListRealtimeLogConfigs(input *ListRealtimeLogConfigsInput) (*ListRealtimeLogConfigsOutput, error) { - req, out := c.ListRealtimeLogConfigsRequest(input) - return out, req.Send() -} - -// ListRealtimeLogConfigsWithContext is the same as ListRealtimeLogConfigs with the addition of -// the ability to pass a context and additional request options. -// -// See ListRealtimeLogConfigs 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 *CloudFront) ListRealtimeLogConfigsWithContext(ctx aws.Context, input *ListRealtimeLogConfigsInput, opts ...request.Option) (*ListRealtimeLogConfigsOutput, error) { - req, out := c.ListRealtimeLogConfigsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListResponseHeadersPolicies = "ListResponseHeadersPolicies2020_05_31" - -// ListResponseHeadersPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the ListResponseHeadersPolicies 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 ListResponseHeadersPolicies for more information on using the ListResponseHeadersPolicies -// 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 ListResponseHeadersPoliciesRequest method. -// req, resp := client.ListResponseHeadersPoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListResponseHeadersPolicies -func (c *CloudFront) ListResponseHeadersPoliciesRequest(input *ListResponseHeadersPoliciesInput) (req *request.Request, output *ListResponseHeadersPoliciesOutput) { - op := &request.Operation{ - Name: opListResponseHeadersPolicies, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/response-headers-policy", - } - - if input == nil { - input = &ListResponseHeadersPoliciesInput{} - } - - output = &ListResponseHeadersPoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListResponseHeadersPolicies API operation for Amazon CloudFront. -// -// Gets a list of response headers policies. -// -// You can optionally apply a filter to get only the managed policies created -// by Amazon Web Services, or only the custom policies created in your Amazon -// Web Services account. -// -// You can optionally specify the maximum number of items to receive in the -// response. If the total number of items in the list exceeds the maximum that -// you specify, or the default maximum, the response is paginated. To get the -// next page of items, send a subsequent request that specifies the NextMarker -// value from the current response as the Marker value in the subsequent request. -// -// 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 CloudFront's -// API operation ListResponseHeadersPolicies for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeNoSuchResponseHeadersPolicy "NoSuchResponseHeadersPolicy" -// The response headers policy does not exist. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListResponseHeadersPolicies -func (c *CloudFront) ListResponseHeadersPolicies(input *ListResponseHeadersPoliciesInput) (*ListResponseHeadersPoliciesOutput, error) { - req, out := c.ListResponseHeadersPoliciesRequest(input) - return out, req.Send() -} - -// ListResponseHeadersPoliciesWithContext is the same as ListResponseHeadersPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See ListResponseHeadersPolicies 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 *CloudFront) ListResponseHeadersPoliciesWithContext(ctx aws.Context, input *ListResponseHeadersPoliciesInput, opts ...request.Option) (*ListResponseHeadersPoliciesOutput, error) { - req, out := c.ListResponseHeadersPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListStreamingDistributions = "ListStreamingDistributions2020_05_31" - -// ListStreamingDistributionsRequest generates a "aws/request.Request" representing the -// client's request for the ListStreamingDistributions 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 ListStreamingDistributions for more information on using the ListStreamingDistributions -// 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 ListStreamingDistributionsRequest method. -// req, resp := client.ListStreamingDistributionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListStreamingDistributions -func (c *CloudFront) ListStreamingDistributionsRequest(input *ListStreamingDistributionsInput) (req *request.Request, output *ListStreamingDistributionsOutput) { - op := &request.Operation{ - Name: opListStreamingDistributions, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/streaming-distribution", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"StreamingDistributionList.NextMarker"}, - LimitToken: "MaxItems", - TruncationToken: "StreamingDistributionList.IsTruncated", - }, - } - - if input == nil { - input = &ListStreamingDistributionsInput{} - } - - output = &ListStreamingDistributionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListStreamingDistributions API operation for Amazon CloudFront. -// -// List streaming distributions. -// -// 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 CloudFront's -// API operation ListStreamingDistributions for usage and error information. -// -// Returned Error Codes: -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListStreamingDistributions -func (c *CloudFront) ListStreamingDistributions(input *ListStreamingDistributionsInput) (*ListStreamingDistributionsOutput, error) { - req, out := c.ListStreamingDistributionsRequest(input) - return out, req.Send() -} - -// ListStreamingDistributionsWithContext is the same as ListStreamingDistributions with the addition of -// the ability to pass a context and additional request options. -// -// See ListStreamingDistributions 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 *CloudFront) ListStreamingDistributionsWithContext(ctx aws.Context, input *ListStreamingDistributionsInput, opts ...request.Option) (*ListStreamingDistributionsOutput, error) { - req, out := c.ListStreamingDistributionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListStreamingDistributionsPages iterates over the pages of a ListStreamingDistributions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListStreamingDistributions 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 ListStreamingDistributions operation. -// pageNum := 0 -// err := client.ListStreamingDistributionsPages(params, -// func(page *cloudfront.ListStreamingDistributionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *CloudFront) ListStreamingDistributionsPages(input *ListStreamingDistributionsInput, fn func(*ListStreamingDistributionsOutput, bool) bool) error { - return c.ListStreamingDistributionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListStreamingDistributionsPagesWithContext same as ListStreamingDistributionsPages 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 *CloudFront) ListStreamingDistributionsPagesWithContext(ctx aws.Context, input *ListStreamingDistributionsInput, fn func(*ListStreamingDistributionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListStreamingDistributionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListStreamingDistributionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListStreamingDistributionsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListTagsForResource = "ListTagsForResource2020_05_31" - -// 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/cloudfront-2020-05-31/ListTagsForResource -func (c *CloudFront) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { - op := &request.Operation{ - Name: opListTagsForResource, - HTTPMethod: "GET", - HTTPPath: "/2020-05-31/tagging", - } - - if input == nil { - input = &ListTagsForResourceInput{} - } - - output = &ListTagsForResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsForResource API operation for Amazon CloudFront. -// -// List tags for a CloudFront resource. For more information, see Tagging a -// distribution (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/tagging.html) -// in the Amazon CloudFront Developer 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 CloudFront's -// API operation ListTagsForResource for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeInvalidTagging "InvalidTagging" -// The tagging specified is not valid. -// -// - ErrCodeNoSuchResource "NoSuchResource" -// A resource that was specified is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/ListTagsForResource -func (c *CloudFront) 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 *CloudFront) 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() -} - -const opPublishFunction = "PublishFunction2020_05_31" - -// PublishFunctionRequest generates a "aws/request.Request" representing the -// client's request for the PublishFunction 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 PublishFunction for more information on using the PublishFunction -// 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 PublishFunctionRequest method. -// req, resp := client.PublishFunctionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/PublishFunction -func (c *CloudFront) PublishFunctionRequest(input *PublishFunctionInput) (req *request.Request, output *PublishFunctionOutput) { - op := &request.Operation{ - Name: opPublishFunction, - HTTPMethod: "POST", - HTTPPath: "/2020-05-31/function/{Name}/publish", - } - - if input == nil { - input = &PublishFunctionInput{} - } - - output = &PublishFunctionOutput{} - req = c.newRequest(op, input, output) - return -} - -// PublishFunction API operation for Amazon CloudFront. -// -// Publishes a CloudFront function by copying the function code from the DEVELOPMENT -// stage to LIVE. This automatically updates all cache behaviors that are using -// this function to use the newly published copy in the LIVE stage. -// -// When a function is published to the LIVE stage, you can attach the function -// to a distribution's cache behavior, using the function's Amazon Resource -// Name (ARN). -// -// To publish a function, you must provide the function's name and version (ETag -// value). To get these values, you can use ListFunctions and DescribeFunction. -// -// 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 CloudFront's -// API operation PublishFunction for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeNoSuchFunctionExists "NoSuchFunctionExists" -// The function does not exist. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// - ErrCodeUnsupportedOperation "UnsupportedOperation" -// This operation is not supported in this region. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/PublishFunction -func (c *CloudFront) PublishFunction(input *PublishFunctionInput) (*PublishFunctionOutput, error) { - req, out := c.PublishFunctionRequest(input) - return out, req.Send() -} - -// PublishFunctionWithContext is the same as PublishFunction with the addition of -// the ability to pass a context and additional request options. -// -// See PublishFunction 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 *CloudFront) PublishFunctionWithContext(ctx aws.Context, input *PublishFunctionInput, opts ...request.Option) (*PublishFunctionOutput, error) { - req, out := c.PublishFunctionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTagResource = "TagResource2020_05_31" - -// 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/cloudfront-2020-05-31/TagResource -func (c *CloudFront) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { - op := &request.Operation{ - Name: opTagResource, - HTTPMethod: "POST", - HTTPPath: "/2020-05-31/tagging?Operation=Tag", - } - - if input == nil { - input = &TagResourceInput{} - } - - output = &TagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagResource API operation for Amazon CloudFront. -// -// Add tags to a CloudFront resource. For more information, see Tagging a distribution -// (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/tagging.html) -// in the Amazon CloudFront Developer 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 CloudFront's -// API operation TagResource for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeInvalidTagging "InvalidTagging" -// The tagging specified is not valid. -// -// - ErrCodeNoSuchResource "NoSuchResource" -// A resource that was specified is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/TagResource -func (c *CloudFront) 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 *CloudFront) 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 opTestFunction = "TestFunction2020_05_31" - -// TestFunctionRequest generates a "aws/request.Request" representing the -// client's request for the TestFunction 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 TestFunction for more information on using the TestFunction -// 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 TestFunctionRequest method. -// req, resp := client.TestFunctionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/TestFunction -func (c *CloudFront) TestFunctionRequest(input *TestFunctionInput) (req *request.Request, output *TestFunctionOutput) { - op := &request.Operation{ - Name: opTestFunction, - HTTPMethod: "POST", - HTTPPath: "/2020-05-31/function/{Name}/test", - } - - if input == nil { - input = &TestFunctionInput{} - } - - output = &TestFunctionOutput{} - req = c.newRequest(op, input, output) - return -} - -// TestFunction API operation for Amazon CloudFront. -// -// Tests a CloudFront function. -// -// To test a function, you provide an event object that represents an HTTP request -// or response that your CloudFront distribution could receive in production. -// CloudFront runs the function, passing it the event object that you provided, -// and returns the function's result (the modified event object) in the response. -// The response also contains function logs and error messages, if any exist. -// For more information about testing functions, see Testing functions (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/managing-functions.html#test-function) -// in the Amazon CloudFront Developer Guide. -// -// To test a function, you provide the function's name and version (ETag value) -// along with the event object. To get the function's name and version, you -// can use ListFunctions and DescribeFunction. -// -// 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 CloudFront's -// API operation TestFunction for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeNoSuchFunctionExists "NoSuchFunctionExists" -// The function does not exist. -// -// - ErrCodeTestFunctionFailed "TestFunctionFailed" -// The CloudFront function failed. -// -// - ErrCodeUnsupportedOperation "UnsupportedOperation" -// This operation is not supported in this region. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/TestFunction -func (c *CloudFront) TestFunction(input *TestFunctionInput) (*TestFunctionOutput, error) { - req, out := c.TestFunctionRequest(input) - return out, req.Send() -} - -// TestFunctionWithContext is the same as TestFunction with the addition of -// the ability to pass a context and additional request options. -// -// See TestFunction 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 *CloudFront) TestFunctionWithContext(ctx aws.Context, input *TestFunctionInput, opts ...request.Option) (*TestFunctionOutput, error) { - req, out := c.TestFunctionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUntagResource = "UntagResource2020_05_31" - -// 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/cloudfront-2020-05-31/UntagResource -func (c *CloudFront) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { - op := &request.Operation{ - Name: opUntagResource, - HTTPMethod: "POST", - HTTPPath: "/2020-05-31/tagging?Operation=Untag", - } - - if input == nil { - input = &UntagResourceInput{} - } - - output = &UntagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagResource API operation for Amazon CloudFront. -// -// Remove tags from a CloudFront resource. For more information, see Tagging -// a distribution (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/tagging.html) -// in the Amazon CloudFront Developer 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 CloudFront's -// API operation UntagResource for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeInvalidTagging "InvalidTagging" -// The tagging specified is not valid. -// -// - ErrCodeNoSuchResource "NoSuchResource" -// A resource that was specified is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UntagResource -func (c *CloudFront) 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 *CloudFront) 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 opUpdateCachePolicy = "UpdateCachePolicy2020_05_31" - -// UpdateCachePolicyRequest generates a "aws/request.Request" representing the -// client's request for the UpdateCachePolicy 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 UpdateCachePolicy for more information on using the UpdateCachePolicy -// 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 UpdateCachePolicyRequest method. -// req, resp := client.UpdateCachePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateCachePolicy -func (c *CloudFront) UpdateCachePolicyRequest(input *UpdateCachePolicyInput) (req *request.Request, output *UpdateCachePolicyOutput) { - op := &request.Operation{ - Name: opUpdateCachePolicy, - HTTPMethod: "PUT", - HTTPPath: "/2020-05-31/cache-policy/{Id}", - } - - if input == nil { - input = &UpdateCachePolicyInput{} - } - - output = &UpdateCachePolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateCachePolicy API operation for Amazon CloudFront. -// -// Updates a cache policy configuration. -// -// When you update a cache policy configuration, all the fields are updated -// with the values provided in the request. You cannot update some fields independent -// of others. To update a cache policy configuration: -// -// Use GetCachePolicyConfig to get the current configuration. -// -// Locally modify the fields in the cache policy configuration that you want -// to update. -// -// Call UpdateCachePolicy by providing the entire cache policy configuration, -// including the fields that you modified and those that you didn't. -// -// 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 CloudFront's -// API operation UpdateCachePolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeIllegalUpdate "IllegalUpdate" -// The update contains modifications that are not allowed. -// -// - ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeNoSuchCachePolicy "NoSuchCachePolicy" -// The cache policy does not exist. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// - ErrCodeCachePolicyAlreadyExists "CachePolicyAlreadyExists" -// A cache policy with this name already exists. You must provide a unique name. -// To modify an existing cache policy, use UpdateCachePolicy. -// -// - ErrCodeTooManyHeadersInCachePolicy "TooManyHeadersInCachePolicy" -// The number of headers in the cache policy exceeds the maximum. For more information, -// see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyCookiesInCachePolicy "TooManyCookiesInCachePolicy" -// The number of cookies in the cache policy exceeds the maximum. For more information, -// see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyQueryStringsInCachePolicy "TooManyQueryStringsInCachePolicy" -// The number of query strings in the cache policy exceeds the maximum. For -// more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateCachePolicy -func (c *CloudFront) UpdateCachePolicy(input *UpdateCachePolicyInput) (*UpdateCachePolicyOutput, error) { - req, out := c.UpdateCachePolicyRequest(input) - return out, req.Send() -} - -// UpdateCachePolicyWithContext is the same as UpdateCachePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateCachePolicy 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 *CloudFront) UpdateCachePolicyWithContext(ctx aws.Context, input *UpdateCachePolicyInput, opts ...request.Option) (*UpdateCachePolicyOutput, error) { - req, out := c.UpdateCachePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateCloudFrontOriginAccessIdentity = "UpdateCloudFrontOriginAccessIdentity2020_05_31" - -// UpdateCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the -// client's request for the UpdateCloudFrontOriginAccessIdentity 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 UpdateCloudFrontOriginAccessIdentity for more information on using the UpdateCloudFrontOriginAccessIdentity -// 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 UpdateCloudFrontOriginAccessIdentityRequest method. -// req, resp := client.UpdateCloudFrontOriginAccessIdentityRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateCloudFrontOriginAccessIdentity -func (c *CloudFront) UpdateCloudFrontOriginAccessIdentityRequest(input *UpdateCloudFrontOriginAccessIdentityInput) (req *request.Request, output *UpdateCloudFrontOriginAccessIdentityOutput) { - op := &request.Operation{ - Name: opUpdateCloudFrontOriginAccessIdentity, - HTTPMethod: "PUT", - HTTPPath: "/2020-05-31/origin-access-identity/cloudfront/{Id}/config", - } - - if input == nil { - input = &UpdateCloudFrontOriginAccessIdentityInput{} - } - - output = &UpdateCloudFrontOriginAccessIdentityOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateCloudFrontOriginAccessIdentity API operation for Amazon CloudFront. -// -// Update an origin access identity. -// -// 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 CloudFront's -// API operation UpdateCloudFrontOriginAccessIdentity for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeIllegalUpdate "IllegalUpdate" -// The update contains modifications that are not allowed. -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeMissingBody "MissingBody" -// This operation requires a body. Ensure that the body is present and the Content-Type -// header is set. -// -// - ErrCodeNoSuchCloudFrontOriginAccessIdentity "NoSuchCloudFrontOriginAccessIdentity" -// The specified origin access identity does not exist. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateCloudFrontOriginAccessIdentity -func (c *CloudFront) UpdateCloudFrontOriginAccessIdentity(input *UpdateCloudFrontOriginAccessIdentityInput) (*UpdateCloudFrontOriginAccessIdentityOutput, error) { - req, out := c.UpdateCloudFrontOriginAccessIdentityRequest(input) - return out, req.Send() -} - -// UpdateCloudFrontOriginAccessIdentityWithContext is the same as UpdateCloudFrontOriginAccessIdentity with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateCloudFrontOriginAccessIdentity 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 *CloudFront) UpdateCloudFrontOriginAccessIdentityWithContext(ctx aws.Context, input *UpdateCloudFrontOriginAccessIdentityInput, opts ...request.Option) (*UpdateCloudFrontOriginAccessIdentityOutput, error) { - req, out := c.UpdateCloudFrontOriginAccessIdentityRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateContinuousDeploymentPolicy = "UpdateContinuousDeploymentPolicy2020_05_31" - -// UpdateContinuousDeploymentPolicyRequest generates a "aws/request.Request" representing the -// client's request for the UpdateContinuousDeploymentPolicy 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 UpdateContinuousDeploymentPolicy for more information on using the UpdateContinuousDeploymentPolicy -// 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 UpdateContinuousDeploymentPolicyRequest method. -// req, resp := client.UpdateContinuousDeploymentPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateContinuousDeploymentPolicy -func (c *CloudFront) UpdateContinuousDeploymentPolicyRequest(input *UpdateContinuousDeploymentPolicyInput) (req *request.Request, output *UpdateContinuousDeploymentPolicyOutput) { - op := &request.Operation{ - Name: opUpdateContinuousDeploymentPolicy, - HTTPMethod: "PUT", - HTTPPath: "/2020-05-31/continuous-deployment-policy/{Id}", - } - - if input == nil { - input = &UpdateContinuousDeploymentPolicyInput{} - } - - output = &UpdateContinuousDeploymentPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateContinuousDeploymentPolicy API operation for Amazon CloudFront. -// -// Updates a continuous deployment policy. You can update a continuous deployment -// policy to enable or disable it, to change the percentage of traffic that -// it sends to the staging distribution, or to change the staging distribution -// that it sends traffic to. -// -// When you update a continuous deployment policy configuration, all the fields -// are updated with the values that are provided in the request. You cannot -// update some fields independent of others. To update a continuous deployment -// policy configuration: -// -// Use GetContinuousDeploymentPolicyConfig to get the current configuration. -// -// Locally modify the fields in the continuous deployment policy configuration -// that you want to update. -// -// Use UpdateContinuousDeploymentPolicy, providing the entire continuous deployment -// policy configuration, including the fields that you modified and those that -// you didn't. -// -// 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 CloudFront's -// API operation UpdateContinuousDeploymentPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// - ErrCodeStagingDistributionInUse "StagingDistributionInUse" -// A continuous deployment policy for this staging distribution already exists. -// -// - ErrCodeNoSuchContinuousDeploymentPolicy "NoSuchContinuousDeploymentPolicy" -// The continuous deployment policy doesn't exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateContinuousDeploymentPolicy -func (c *CloudFront) UpdateContinuousDeploymentPolicy(input *UpdateContinuousDeploymentPolicyInput) (*UpdateContinuousDeploymentPolicyOutput, error) { - req, out := c.UpdateContinuousDeploymentPolicyRequest(input) - return out, req.Send() -} - -// UpdateContinuousDeploymentPolicyWithContext is the same as UpdateContinuousDeploymentPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateContinuousDeploymentPolicy 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 *CloudFront) UpdateContinuousDeploymentPolicyWithContext(ctx aws.Context, input *UpdateContinuousDeploymentPolicyInput, opts ...request.Option) (*UpdateContinuousDeploymentPolicyOutput, error) { - req, out := c.UpdateContinuousDeploymentPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateDistribution = "UpdateDistribution2020_05_31" - -// UpdateDistributionRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDistribution 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 UpdateDistribution for more information on using the UpdateDistribution -// 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 UpdateDistributionRequest method. -// req, resp := client.UpdateDistributionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateDistribution -func (c *CloudFront) UpdateDistributionRequest(input *UpdateDistributionInput) (req *request.Request, output *UpdateDistributionOutput) { - op := &request.Operation{ - Name: opUpdateDistribution, - HTTPMethod: "PUT", - HTTPPath: "/2020-05-31/distribution/{Id}/config", - } - - if input == nil { - input = &UpdateDistributionInput{} - } - - output = &UpdateDistributionOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateDistribution API operation for Amazon CloudFront. -// -// Updates the configuration for a CloudFront distribution. -// -// The update process includes getting the current distribution configuration, -// updating it to make your changes, and then submitting an UpdateDistribution -// request to make the updates. -// -// # To update a web distribution using the CloudFront API -// -// Use GetDistributionConfig to get the current configuration, including the -// version identifier (ETag). -// -// Update the distribution configuration that was returned in the response. -// Note the following important requirements and restrictions: -// -// - You must rename the ETag field to IfMatch, leaving the value unchanged. -// (Set the value of IfMatch to the value of ETag, then remove the ETag field.) -// -// - You can't change the value of CallerReference. -// -// Submit an UpdateDistribution request, providing the distribution configuration. -// The new configuration replaces the existing configuration. The values that -// you specify in an UpdateDistribution request are not merged into your existing -// configuration. Make sure to include all fields: the ones that you modified -// and also the ones that you didn't. -// -// 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 CloudFront's -// API operation UpdateDistribution for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeCNAMEAlreadyExists "CNAMEAlreadyExists" -// The CNAME specified is already defined for CloudFront. -// -// - ErrCodeIllegalUpdate "IllegalUpdate" -// The update contains modifications that are not allowed. -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeMissingBody "MissingBody" -// This operation requires a body. Ensure that the body is present and the Content-Type -// header is set. -// -// - ErrCodeNoSuchDistribution "NoSuchDistribution" -// The specified distribution does not exist. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// - ErrCodeTooManyDistributionCNAMEs "TooManyDistributionCNAMEs" -// Your request contains more CNAMEs than are allowed per distribution. -// -// - ErrCodeInvalidDefaultRootObject "InvalidDefaultRootObject" -// The default root object file name is too big or contains an invalid character. -// -// - ErrCodeInvalidRelativePath "InvalidRelativePath" -// The relative path is too big, is not URL-encoded, or does not begin with -// a slash (/). -// -// - ErrCodeInvalidErrorCode "InvalidErrorCode" -// An invalid error code was specified. -// -// - ErrCodeInvalidResponseCode "InvalidResponseCode" -// A response code is not valid. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeInvalidOriginAccessIdentity "InvalidOriginAccessIdentity" -// The origin access identity is not valid or doesn't exist. -// -// - ErrCodeInvalidOriginAccessControl "InvalidOriginAccessControl" -// The origin access control is not valid. -// -// - ErrCodeTooManyTrustedSigners "TooManyTrustedSigners" -// Your request contains more trusted signers than are allowed per distribution. -// -// - ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist" -// One or more of your trusted signers don't exist. -// -// - ErrCodeInvalidViewerCertificate "InvalidViewerCertificate" -// A viewer certificate specified is not valid. -// -// - ErrCodeInvalidMinimumProtocolVersion "InvalidMinimumProtocolVersion" -// The minimum protocol version specified is not valid. -// -// - ErrCodeInvalidRequiredProtocol "InvalidRequiredProtocol" -// This operation requires the HTTPS protocol. Ensure that you specify the HTTPS -// protocol in your request, or omit the RequiredProtocols element from your -// distribution configuration. -// -// - ErrCodeNoSuchOrigin "NoSuchOrigin" -// No origin exists with the specified Origin Id. -// -// - ErrCodeTooManyOrigins "TooManyOrigins" -// You cannot create more origins for the distribution. -// -// - ErrCodeTooManyOriginGroupsPerDistribution "TooManyOriginGroupsPerDistribution" -// Processing your request would cause you to exceed the maximum number of origin -// groups allowed. -// -// - ErrCodeTooManyCacheBehaviors "TooManyCacheBehaviors" -// You cannot create more cache behaviors for the distribution. -// -// - ErrCodeTooManyCookieNamesInWhiteList "TooManyCookieNamesInWhiteList" -// Your request contains more cookie names in the whitelist than are allowed -// per cache behavior. -// -// - ErrCodeInvalidForwardCookies "InvalidForwardCookies" -// Your request contains forward cookies option which doesn't match with the -// expectation for the whitelisted list of cookie names. Either list of cookie -// names has been specified when not allowed or list of cookie names is missing -// when expected. -// -// - ErrCodeTooManyHeadersInForwardedValues "TooManyHeadersInForwardedValues" -// Your request contains too many headers in forwarded values. -// -// - ErrCodeInvalidHeadersForS3Origin "InvalidHeadersForS3Origin" -// The headers specified are not valid for an Amazon S3 origin. -// -// - ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// - ErrCodeTooManyCertificates "TooManyCertificates" -// You cannot create anymore custom SSL/TLS certificates. -// -// - ErrCodeInvalidLocationCode "InvalidLocationCode" -// The location code specified is not valid. -// -// - ErrCodeInvalidGeoRestrictionParameter "InvalidGeoRestrictionParameter" -// The specified geo restriction parameter is not valid. -// -// - ErrCodeInvalidTTLOrder "InvalidTTLOrder" -// The TTL order specified is not valid. -// -// - ErrCodeInvalidWebACLId "InvalidWebACLId" -// A web ACL ID specified is not valid. To specify a web ACL created using the -// latest version of WAF, use the ACL ARN, for example arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a. -// To specify a web ACL created using WAF Classic, use the ACL ID, for example -// 473e64fd-f30b-4765-81a0-62ad96dd167a. -// -// - ErrCodeTooManyOriginCustomHeaders "TooManyOriginCustomHeaders" -// Your request contains too many origin custom headers. -// -// - ErrCodeTooManyQueryStringParameters "TooManyQueryStringParameters" -// Your request contains too many query string parameters. -// -// - ErrCodeInvalidQueryStringParameters "InvalidQueryStringParameters" -// The query string parameters specified are not valid. -// -// - ErrCodeTooManyDistributionsWithLambdaAssociations "TooManyDistributionsWithLambdaAssociations" -// Processing your request would cause the maximum number of distributions with -// Lambda@Edge function associations per owner to be exceeded. -// -// - ErrCodeTooManyDistributionsWithSingleFunctionARN "TooManyDistributionsWithSingleFunctionARN" -// The maximum number of distributions have been associated with the specified -// Lambda@Edge function. -// -// - ErrCodeTooManyLambdaFunctionAssociations "TooManyLambdaFunctionAssociations" -// Your request contains more Lambda@Edge function associations than are allowed -// per distribution. -// -// - ErrCodeInvalidLambdaFunctionAssociation "InvalidLambdaFunctionAssociation" -// The specified Lambda@Edge function association is invalid. -// -// - ErrCodeTooManyDistributionsWithFunctionAssociations "TooManyDistributionsWithFunctionAssociations" -// You have reached the maximum number of distributions that are associated -// with a CloudFront function. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyFunctionAssociations "TooManyFunctionAssociations" -// You have reached the maximum number of CloudFront function associations for -// this distribution. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeInvalidFunctionAssociation "InvalidFunctionAssociation" -// A CloudFront function association is invalid. -// -// - ErrCodeInvalidOriginReadTimeout "InvalidOriginReadTimeout" -// The read timeout specified for the origin is not valid. -// -// - ErrCodeInvalidOriginKeepaliveTimeout "InvalidOriginKeepaliveTimeout" -// The keep alive timeout specified for the origin is not valid. -// -// - ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" -// The specified configuration for field-level encryption doesn't exist. -// -// - ErrCodeIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior" -// The specified configuration for field-level encryption can't be associated -// with the specified cache behavior. -// -// - ErrCodeTooManyDistributionsAssociatedToFieldLevelEncryptionConfig "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig" -// The maximum number of distributions have been associated with the specified -// configuration for field-level encryption. -// -// - ErrCodeNoSuchCachePolicy "NoSuchCachePolicy" -// The cache policy does not exist. -// -// - ErrCodeTooManyDistributionsAssociatedToCachePolicy "TooManyDistributionsAssociatedToCachePolicy" -// The maximum number of distributions have been associated with the specified -// cache policy. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyDistributionsAssociatedToOriginAccessControl "TooManyDistributionsAssociatedToOriginAccessControl" -// The maximum number of distributions have been associated with the specified -// origin access control. -// -// For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeNoSuchResponseHeadersPolicy "NoSuchResponseHeadersPolicy" -// The response headers policy does not exist. -// -// - ErrCodeTooManyDistributionsAssociatedToResponseHeadersPolicy "TooManyDistributionsAssociatedToResponseHeadersPolicy" -// The maximum number of distributions have been associated with the specified -// response headers policy. -// -// For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeNoSuchOriginRequestPolicy "NoSuchOriginRequestPolicy" -// The origin request policy does not exist. -// -// - ErrCodeTooManyDistributionsAssociatedToOriginRequestPolicy "TooManyDistributionsAssociatedToOriginRequestPolicy" -// The maximum number of distributions have been associated with the specified -// origin request policy. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyDistributionsAssociatedToKeyGroup "TooManyDistributionsAssociatedToKeyGroup" -// The number of distributions that reference this key group is more than the -// maximum allowed. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyKeyGroupsAssociatedToDistribution "TooManyKeyGroupsAssociatedToDistribution" -// The number of key groups referenced by this distribution is more than the -// maximum allowed. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTrustedKeyGroupDoesNotExist "TrustedKeyGroupDoesNotExist" -// The specified key group does not exist. -// -// - ErrCodeNoSuchRealtimeLogConfig "NoSuchRealtimeLogConfig" -// The real-time log configuration does not exist. -// -// - ErrCodeRealtimeLogConfigOwnerMismatch "RealtimeLogConfigOwnerMismatch" -// The specified real-time log configuration belongs to a different Amazon Web -// Services account. -// -// - ErrCodeContinuousDeploymentPolicyInUse "ContinuousDeploymentPolicyInUse" -// You cannot delete a continuous deployment policy that is associated with -// a primary distribution. -// -// - ErrCodeNoSuchContinuousDeploymentPolicy "NoSuchContinuousDeploymentPolicy" -// The continuous deployment policy doesn't exist. -// -// - ErrCodeStagingDistributionInUse "StagingDistributionInUse" -// A continuous deployment policy for this staging distribution already exists. -// -// - ErrCodeIllegalOriginAccessConfiguration "IllegalOriginAccessConfiguration" -// An origin cannot contain both an origin access control (OAC) and an origin -// access identity (OAI). -// -// - ErrCodeInvalidDomainNameForOriginAccessControl "InvalidDomainNameForOriginAccessControl" -// An origin access control is associated with an origin whose domain name is -// not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateDistribution -func (c *CloudFront) UpdateDistribution(input *UpdateDistributionInput) (*UpdateDistributionOutput, error) { - req, out := c.UpdateDistributionRequest(input) - return out, req.Send() -} - -// UpdateDistributionWithContext is the same as UpdateDistribution with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateDistribution 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 *CloudFront) UpdateDistributionWithContext(ctx aws.Context, input *UpdateDistributionInput, opts ...request.Option) (*UpdateDistributionOutput, error) { - req, out := c.UpdateDistributionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateDistributionWithStagingConfig = "UpdateDistributionWithStagingConfig2020_05_31" - -// UpdateDistributionWithStagingConfigRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDistributionWithStagingConfig 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 UpdateDistributionWithStagingConfig for more information on using the UpdateDistributionWithStagingConfig -// 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 UpdateDistributionWithStagingConfigRequest method. -// req, resp := client.UpdateDistributionWithStagingConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateDistributionWithStagingConfig -func (c *CloudFront) UpdateDistributionWithStagingConfigRequest(input *UpdateDistributionWithStagingConfigInput) (req *request.Request, output *UpdateDistributionWithStagingConfigOutput) { - op := &request.Operation{ - Name: opUpdateDistributionWithStagingConfig, - HTTPMethod: "PUT", - HTTPPath: "/2020-05-31/distribution/{Id}/promote-staging-config", - } - - if input == nil { - input = &UpdateDistributionWithStagingConfigInput{} - } - - output = &UpdateDistributionWithStagingConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateDistributionWithStagingConfig API operation for Amazon CloudFront. -// -// Copies the staging distribution's configuration to its corresponding primary -// distribution. The primary distribution retains its Aliases (also known as -// alternate domain names or CNAMEs) and ContinuousDeploymentPolicyId value, -// but otherwise its configuration is overwritten to match the staging distribution. -// -// You can use this operation in a continuous deployment workflow after you -// have tested configuration changes on the staging distribution. After using -// a continuous deployment policy to move a portion of your domain name's traffic -// to the staging distribution and verifying that it works as intended, you -// can use this operation to copy the staging distribution's configuration to -// the primary distribution. This action will disable the continuous deployment -// policy and move your domain's traffic back to the primary distribution. -// -// This API operation requires the following IAM permissions: -// -// - GetDistribution (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_GetDistribution.html) -// -// - UpdateDistribution (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_UpdateDistribution.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 CloudFront's -// API operation UpdateDistributionWithStagingConfig for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeCNAMEAlreadyExists "CNAMEAlreadyExists" -// The CNAME specified is already defined for CloudFront. -// -// - ErrCodeIllegalUpdate "IllegalUpdate" -// The update contains modifications that are not allowed. -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeMissingBody "MissingBody" -// This operation requires a body. Ensure that the body is present and the Content-Type -// header is set. -// -// - ErrCodeNoSuchDistribution "NoSuchDistribution" -// The specified distribution does not exist. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// - ErrCodeTooManyDistributionCNAMEs "TooManyDistributionCNAMEs" -// Your request contains more CNAMEs than are allowed per distribution. -// -// - ErrCodeInvalidDefaultRootObject "InvalidDefaultRootObject" -// The default root object file name is too big or contains an invalid character. -// -// - ErrCodeInvalidRelativePath "InvalidRelativePath" -// The relative path is too big, is not URL-encoded, or does not begin with -// a slash (/). -// -// - ErrCodeInvalidErrorCode "InvalidErrorCode" -// An invalid error code was specified. -// -// - ErrCodeInvalidResponseCode "InvalidResponseCode" -// A response code is not valid. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeInvalidOriginAccessIdentity "InvalidOriginAccessIdentity" -// The origin access identity is not valid or doesn't exist. -// -// - ErrCodeInvalidOriginAccessControl "InvalidOriginAccessControl" -// The origin access control is not valid. -// -// - ErrCodeTooManyTrustedSigners "TooManyTrustedSigners" -// Your request contains more trusted signers than are allowed per distribution. -// -// - ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist" -// One or more of your trusted signers don't exist. -// -// - ErrCodeInvalidViewerCertificate "InvalidViewerCertificate" -// A viewer certificate specified is not valid. -// -// - ErrCodeInvalidMinimumProtocolVersion "InvalidMinimumProtocolVersion" -// The minimum protocol version specified is not valid. -// -// - ErrCodeInvalidRequiredProtocol "InvalidRequiredProtocol" -// This operation requires the HTTPS protocol. Ensure that you specify the HTTPS -// protocol in your request, or omit the RequiredProtocols element from your -// distribution configuration. -// -// - ErrCodeNoSuchOrigin "NoSuchOrigin" -// No origin exists with the specified Origin Id. -// -// - ErrCodeTooManyOrigins "TooManyOrigins" -// You cannot create more origins for the distribution. -// -// - ErrCodeTooManyOriginGroupsPerDistribution "TooManyOriginGroupsPerDistribution" -// Processing your request would cause you to exceed the maximum number of origin -// groups allowed. -// -// - ErrCodeTooManyCacheBehaviors "TooManyCacheBehaviors" -// You cannot create more cache behaviors for the distribution. -// -// - ErrCodeTooManyCookieNamesInWhiteList "TooManyCookieNamesInWhiteList" -// Your request contains more cookie names in the whitelist than are allowed -// per cache behavior. -// -// - ErrCodeInvalidForwardCookies "InvalidForwardCookies" -// Your request contains forward cookies option which doesn't match with the -// expectation for the whitelisted list of cookie names. Either list of cookie -// names has been specified when not allowed or list of cookie names is missing -// when expected. -// -// - ErrCodeTooManyHeadersInForwardedValues "TooManyHeadersInForwardedValues" -// Your request contains too many headers in forwarded values. -// -// - ErrCodeInvalidHeadersForS3Origin "InvalidHeadersForS3Origin" -// The headers specified are not valid for an Amazon S3 origin. -// -// - ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// - ErrCodeTooManyCertificates "TooManyCertificates" -// You cannot create anymore custom SSL/TLS certificates. -// -// - ErrCodeInvalidLocationCode "InvalidLocationCode" -// The location code specified is not valid. -// -// - ErrCodeInvalidGeoRestrictionParameter "InvalidGeoRestrictionParameter" -// The specified geo restriction parameter is not valid. -// -// - ErrCodeInvalidTTLOrder "InvalidTTLOrder" -// The TTL order specified is not valid. -// -// - ErrCodeInvalidWebACLId "InvalidWebACLId" -// A web ACL ID specified is not valid. To specify a web ACL created using the -// latest version of WAF, use the ACL ARN, for example arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a. -// To specify a web ACL created using WAF Classic, use the ACL ID, for example -// 473e64fd-f30b-4765-81a0-62ad96dd167a. -// -// - ErrCodeTooManyOriginCustomHeaders "TooManyOriginCustomHeaders" -// Your request contains too many origin custom headers. -// -// - ErrCodeTooManyQueryStringParameters "TooManyQueryStringParameters" -// Your request contains too many query string parameters. -// -// - ErrCodeInvalidQueryStringParameters "InvalidQueryStringParameters" -// The query string parameters specified are not valid. -// -// - ErrCodeTooManyDistributionsWithLambdaAssociations "TooManyDistributionsWithLambdaAssociations" -// Processing your request would cause the maximum number of distributions with -// Lambda@Edge function associations per owner to be exceeded. -// -// - ErrCodeTooManyDistributionsWithSingleFunctionARN "TooManyDistributionsWithSingleFunctionARN" -// The maximum number of distributions have been associated with the specified -// Lambda@Edge function. -// -// - ErrCodeTooManyLambdaFunctionAssociations "TooManyLambdaFunctionAssociations" -// Your request contains more Lambda@Edge function associations than are allowed -// per distribution. -// -// - ErrCodeInvalidLambdaFunctionAssociation "InvalidLambdaFunctionAssociation" -// The specified Lambda@Edge function association is invalid. -// -// - ErrCodeTooManyDistributionsWithFunctionAssociations "TooManyDistributionsWithFunctionAssociations" -// You have reached the maximum number of distributions that are associated -// with a CloudFront function. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyFunctionAssociations "TooManyFunctionAssociations" -// You have reached the maximum number of CloudFront function associations for -// this distribution. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeInvalidFunctionAssociation "InvalidFunctionAssociation" -// A CloudFront function association is invalid. -// -// - ErrCodeInvalidOriginReadTimeout "InvalidOriginReadTimeout" -// The read timeout specified for the origin is not valid. -// -// - ErrCodeInvalidOriginKeepaliveTimeout "InvalidOriginKeepaliveTimeout" -// The keep alive timeout specified for the origin is not valid. -// -// - ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" -// The specified configuration for field-level encryption doesn't exist. -// -// - ErrCodeIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior" -// The specified configuration for field-level encryption can't be associated -// with the specified cache behavior. -// -// - ErrCodeTooManyDistributionsAssociatedToFieldLevelEncryptionConfig "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig" -// The maximum number of distributions have been associated with the specified -// configuration for field-level encryption. -// -// - ErrCodeNoSuchCachePolicy "NoSuchCachePolicy" -// The cache policy does not exist. -// -// - ErrCodeTooManyDistributionsAssociatedToCachePolicy "TooManyDistributionsAssociatedToCachePolicy" -// The maximum number of distributions have been associated with the specified -// cache policy. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyDistributionsAssociatedToOriginAccessControl "TooManyDistributionsAssociatedToOriginAccessControl" -// The maximum number of distributions have been associated with the specified -// origin access control. -// -// For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeNoSuchResponseHeadersPolicy "NoSuchResponseHeadersPolicy" -// The response headers policy does not exist. -// -// - ErrCodeTooManyDistributionsAssociatedToResponseHeadersPolicy "TooManyDistributionsAssociatedToResponseHeadersPolicy" -// The maximum number of distributions have been associated with the specified -// response headers policy. -// -// For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeNoSuchOriginRequestPolicy "NoSuchOriginRequestPolicy" -// The origin request policy does not exist. -// -// - ErrCodeTooManyDistributionsAssociatedToOriginRequestPolicy "TooManyDistributionsAssociatedToOriginRequestPolicy" -// The maximum number of distributions have been associated with the specified -// origin request policy. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyDistributionsAssociatedToKeyGroup "TooManyDistributionsAssociatedToKeyGroup" -// The number of distributions that reference this key group is more than the -// maximum allowed. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyKeyGroupsAssociatedToDistribution "TooManyKeyGroupsAssociatedToDistribution" -// The number of key groups referenced by this distribution is more than the -// maximum allowed. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTrustedKeyGroupDoesNotExist "TrustedKeyGroupDoesNotExist" -// The specified key group does not exist. -// -// - ErrCodeNoSuchRealtimeLogConfig "NoSuchRealtimeLogConfig" -// The real-time log configuration does not exist. -// -// - ErrCodeRealtimeLogConfigOwnerMismatch "RealtimeLogConfigOwnerMismatch" -// The specified real-time log configuration belongs to a different Amazon Web -// Services account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateDistributionWithStagingConfig -func (c *CloudFront) UpdateDistributionWithStagingConfig(input *UpdateDistributionWithStagingConfigInput) (*UpdateDistributionWithStagingConfigOutput, error) { - req, out := c.UpdateDistributionWithStagingConfigRequest(input) - return out, req.Send() -} - -// UpdateDistributionWithStagingConfigWithContext is the same as UpdateDistributionWithStagingConfig with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateDistributionWithStagingConfig 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 *CloudFront) UpdateDistributionWithStagingConfigWithContext(ctx aws.Context, input *UpdateDistributionWithStagingConfigInput, opts ...request.Option) (*UpdateDistributionWithStagingConfigOutput, error) { - req, out := c.UpdateDistributionWithStagingConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateFieldLevelEncryptionConfig = "UpdateFieldLevelEncryptionConfig2020_05_31" - -// UpdateFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the -// client's request for the UpdateFieldLevelEncryptionConfig 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 UpdateFieldLevelEncryptionConfig for more information on using the UpdateFieldLevelEncryptionConfig -// 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 UpdateFieldLevelEncryptionConfigRequest method. -// req, resp := client.UpdateFieldLevelEncryptionConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateFieldLevelEncryptionConfig -func (c *CloudFront) UpdateFieldLevelEncryptionConfigRequest(input *UpdateFieldLevelEncryptionConfigInput) (req *request.Request, output *UpdateFieldLevelEncryptionConfigOutput) { - op := &request.Operation{ - Name: opUpdateFieldLevelEncryptionConfig, - HTTPMethod: "PUT", - HTTPPath: "/2020-05-31/field-level-encryption/{Id}/config", - } - - if input == nil { - input = &UpdateFieldLevelEncryptionConfigInput{} - } - - output = &UpdateFieldLevelEncryptionConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateFieldLevelEncryptionConfig API operation for Amazon CloudFront. -// -// Update a field-level encryption configuration. -// -// 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 CloudFront's -// API operation UpdateFieldLevelEncryptionConfig for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeIllegalUpdate "IllegalUpdate" -// The update contains modifications that are not allowed. -// -// - ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile" -// The specified profile for field-level encryption doesn't exist. -// -// - ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" -// The specified configuration for field-level encryption doesn't exist. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// - ErrCodeTooManyFieldLevelEncryptionQueryArgProfiles "TooManyFieldLevelEncryptionQueryArgProfiles" -// The maximum number of query arg profiles for field-level encryption have -// been created. -// -// - ErrCodeTooManyFieldLevelEncryptionContentTypeProfiles "TooManyFieldLevelEncryptionContentTypeProfiles" -// The maximum number of content type profiles for field-level encryption have -// been created. -// -// - ErrCodeQueryArgProfileEmpty "QueryArgProfileEmpty" -// No profile specified for the field-level encryption query argument. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateFieldLevelEncryptionConfig -func (c *CloudFront) UpdateFieldLevelEncryptionConfig(input *UpdateFieldLevelEncryptionConfigInput) (*UpdateFieldLevelEncryptionConfigOutput, error) { - req, out := c.UpdateFieldLevelEncryptionConfigRequest(input) - return out, req.Send() -} - -// UpdateFieldLevelEncryptionConfigWithContext is the same as UpdateFieldLevelEncryptionConfig with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateFieldLevelEncryptionConfig 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 *CloudFront) UpdateFieldLevelEncryptionConfigWithContext(ctx aws.Context, input *UpdateFieldLevelEncryptionConfigInput, opts ...request.Option) (*UpdateFieldLevelEncryptionConfigOutput, error) { - req, out := c.UpdateFieldLevelEncryptionConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateFieldLevelEncryptionProfile = "UpdateFieldLevelEncryptionProfile2020_05_31" - -// UpdateFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the -// client's request for the UpdateFieldLevelEncryptionProfile 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 UpdateFieldLevelEncryptionProfile for more information on using the UpdateFieldLevelEncryptionProfile -// 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 UpdateFieldLevelEncryptionProfileRequest method. -// req, resp := client.UpdateFieldLevelEncryptionProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateFieldLevelEncryptionProfile -func (c *CloudFront) UpdateFieldLevelEncryptionProfileRequest(input *UpdateFieldLevelEncryptionProfileInput) (req *request.Request, output *UpdateFieldLevelEncryptionProfileOutput) { - op := &request.Operation{ - Name: opUpdateFieldLevelEncryptionProfile, - HTTPMethod: "PUT", - HTTPPath: "/2020-05-31/field-level-encryption-profile/{Id}/config", - } - - if input == nil { - input = &UpdateFieldLevelEncryptionProfileInput{} - } - - output = &UpdateFieldLevelEncryptionProfileOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateFieldLevelEncryptionProfile API operation for Amazon CloudFront. -// -// Update a field-level encryption profile. -// -// 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 CloudFront's -// API operation UpdateFieldLevelEncryptionProfile for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeFieldLevelEncryptionProfileAlreadyExists "FieldLevelEncryptionProfileAlreadyExists" -// The specified profile for field-level encryption already exists. -// -// - ErrCodeIllegalUpdate "IllegalUpdate" -// The update contains modifications that are not allowed. -// -// - ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeNoSuchPublicKey "NoSuchPublicKey" -// The specified public key doesn't exist. -// -// - ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile" -// The specified profile for field-level encryption doesn't exist. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// - ErrCodeFieldLevelEncryptionProfileSizeExceeded "FieldLevelEncryptionProfileSizeExceeded" -// The maximum size of a profile for field-level encryption was exceeded. -// -// - ErrCodeTooManyFieldLevelEncryptionEncryptionEntities "TooManyFieldLevelEncryptionEncryptionEntities" -// The maximum number of encryption entities for field-level encryption have -// been created. -// -// - ErrCodeTooManyFieldLevelEncryptionFieldPatterns "TooManyFieldLevelEncryptionFieldPatterns" -// The maximum number of field patterns for field-level encryption have been -// created. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateFieldLevelEncryptionProfile -func (c *CloudFront) UpdateFieldLevelEncryptionProfile(input *UpdateFieldLevelEncryptionProfileInput) (*UpdateFieldLevelEncryptionProfileOutput, error) { - req, out := c.UpdateFieldLevelEncryptionProfileRequest(input) - return out, req.Send() -} - -// UpdateFieldLevelEncryptionProfileWithContext is the same as UpdateFieldLevelEncryptionProfile with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateFieldLevelEncryptionProfile 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 *CloudFront) UpdateFieldLevelEncryptionProfileWithContext(ctx aws.Context, input *UpdateFieldLevelEncryptionProfileInput, opts ...request.Option) (*UpdateFieldLevelEncryptionProfileOutput, error) { - req, out := c.UpdateFieldLevelEncryptionProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateFunction = "UpdateFunction2020_05_31" - -// UpdateFunctionRequest generates a "aws/request.Request" representing the -// client's request for the UpdateFunction 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 UpdateFunction for more information on using the UpdateFunction -// 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 UpdateFunctionRequest method. -// req, resp := client.UpdateFunctionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateFunction -func (c *CloudFront) UpdateFunctionRequest(input *UpdateFunctionInput) (req *request.Request, output *UpdateFunctionOutput) { - op := &request.Operation{ - Name: opUpdateFunction, - HTTPMethod: "PUT", - HTTPPath: "/2020-05-31/function/{Name}", - } - - if input == nil { - input = &UpdateFunctionInput{} - } - - output = &UpdateFunctionOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateFunction API operation for Amazon CloudFront. -// -// Updates a CloudFront function. -// -// You can update a function's code or the comment that describes the function. -// You cannot update a function's name. -// -// To update a function, you provide the function's name and version (ETag value) -// along with the updated function code. To get the name and version, you can -// use ListFunctions and DescribeFunction. -// -// 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 CloudFront's -// API operation UpdateFunction for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeNoSuchFunctionExists "NoSuchFunctionExists" -// The function does not exist. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// - ErrCodeFunctionSizeLimitExceeded "FunctionSizeLimitExceeded" -// The function is too large. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeUnsupportedOperation "UnsupportedOperation" -// This operation is not supported in this region. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateFunction -func (c *CloudFront) UpdateFunction(input *UpdateFunctionInput) (*UpdateFunctionOutput, error) { - req, out := c.UpdateFunctionRequest(input) - return out, req.Send() -} - -// UpdateFunctionWithContext is the same as UpdateFunction with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateFunction 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 *CloudFront) UpdateFunctionWithContext(ctx aws.Context, input *UpdateFunctionInput, opts ...request.Option) (*UpdateFunctionOutput, error) { - req, out := c.UpdateFunctionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateKeyGroup = "UpdateKeyGroup2020_05_31" - -// UpdateKeyGroupRequest generates a "aws/request.Request" representing the -// client's request for the UpdateKeyGroup 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 UpdateKeyGroup for more information on using the UpdateKeyGroup -// 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 UpdateKeyGroupRequest method. -// req, resp := client.UpdateKeyGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateKeyGroup -func (c *CloudFront) UpdateKeyGroupRequest(input *UpdateKeyGroupInput) (req *request.Request, output *UpdateKeyGroupOutput) { - op := &request.Operation{ - Name: opUpdateKeyGroup, - HTTPMethod: "PUT", - HTTPPath: "/2020-05-31/key-group/{Id}", - } - - if input == nil { - input = &UpdateKeyGroupInput{} - } - - output = &UpdateKeyGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateKeyGroup API operation for Amazon CloudFront. -// -// Updates a key group. -// -// When you update a key group, all the fields are updated with the values provided -// in the request. You cannot update some fields independent of others. To update -// a key group: -// -// Get the current key group with GetKeyGroup or GetKeyGroupConfig. -// -// Locally modify the fields in the key group that you want to update. For example, -// add or remove public key IDs. -// -// Call UpdateKeyGroup with the entire key group object, including the fields -// that you modified and those that you didn't. -// -// 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 CloudFront's -// API operation UpdateKeyGroup for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeNoSuchResource "NoSuchResource" -// A resource that was specified is not valid. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// - ErrCodeKeyGroupAlreadyExists "KeyGroupAlreadyExists" -// A key group with this name already exists. You must provide a unique name. -// To modify an existing key group, use UpdateKeyGroup. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeTooManyPublicKeysInKeyGroup "TooManyPublicKeysInKeyGroup" -// The number of public keys in this key group is more than the maximum allowed. -// For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateKeyGroup -func (c *CloudFront) UpdateKeyGroup(input *UpdateKeyGroupInput) (*UpdateKeyGroupOutput, error) { - req, out := c.UpdateKeyGroupRequest(input) - return out, req.Send() -} - -// UpdateKeyGroupWithContext is the same as UpdateKeyGroup with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateKeyGroup 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 *CloudFront) UpdateKeyGroupWithContext(ctx aws.Context, input *UpdateKeyGroupInput, opts ...request.Option) (*UpdateKeyGroupOutput, error) { - req, out := c.UpdateKeyGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateKeyValueStore = "UpdateKeyValueStore2020_05_31" - -// UpdateKeyValueStoreRequest generates a "aws/request.Request" representing the -// client's request for the UpdateKeyValueStore 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 UpdateKeyValueStore for more information on using the UpdateKeyValueStore -// 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 UpdateKeyValueStoreRequest method. -// req, resp := client.UpdateKeyValueStoreRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateKeyValueStore -func (c *CloudFront) UpdateKeyValueStoreRequest(input *UpdateKeyValueStoreInput) (req *request.Request, output *UpdateKeyValueStoreOutput) { - op := &request.Operation{ - Name: opUpdateKeyValueStore, - HTTPMethod: "PUT", - HTTPPath: "/2020-05-31/key-value-store/{Name}", - } - - if input == nil { - input = &UpdateKeyValueStoreInput{} - } - - output = &UpdateKeyValueStoreOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateKeyValueStore API operation for Amazon CloudFront. -// -// Specifies the key value store to update. -// -// 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 CloudFront's -// API operation UpdateKeyValueStore for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeEntityNotFound "EntityNotFound" -// The key value store entity was not found. -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// - ErrCodeUnsupportedOperation "UnsupportedOperation" -// This operation is not supported in this region. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateKeyValueStore -func (c *CloudFront) UpdateKeyValueStore(input *UpdateKeyValueStoreInput) (*UpdateKeyValueStoreOutput, error) { - req, out := c.UpdateKeyValueStoreRequest(input) - return out, req.Send() -} - -// UpdateKeyValueStoreWithContext is the same as UpdateKeyValueStore with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateKeyValueStore 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 *CloudFront) UpdateKeyValueStoreWithContext(ctx aws.Context, input *UpdateKeyValueStoreInput, opts ...request.Option) (*UpdateKeyValueStoreOutput, error) { - req, out := c.UpdateKeyValueStoreRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateOriginAccessControl = "UpdateOriginAccessControl2020_05_31" - -// UpdateOriginAccessControlRequest generates a "aws/request.Request" representing the -// client's request for the UpdateOriginAccessControl 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 UpdateOriginAccessControl for more information on using the UpdateOriginAccessControl -// 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 UpdateOriginAccessControlRequest method. -// req, resp := client.UpdateOriginAccessControlRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateOriginAccessControl -func (c *CloudFront) UpdateOriginAccessControlRequest(input *UpdateOriginAccessControlInput) (req *request.Request, output *UpdateOriginAccessControlOutput) { - op := &request.Operation{ - Name: opUpdateOriginAccessControl, - HTTPMethod: "PUT", - HTTPPath: "/2020-05-31/origin-access-control/{Id}/config", - } - - if input == nil { - input = &UpdateOriginAccessControlInput{} - } - - output = &UpdateOriginAccessControlOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateOriginAccessControl API operation for Amazon CloudFront. -// -// Updates a CloudFront origin access control. -// -// 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 CloudFront's -// API operation UpdateOriginAccessControl for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeIllegalUpdate "IllegalUpdate" -// The update contains modifications that are not allowed. -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeOriginAccessControlAlreadyExists "OriginAccessControlAlreadyExists" -// An origin access control with the specified parameters already exists. -// -// - ErrCodeNoSuchOriginAccessControl "NoSuchOriginAccessControl" -// The origin access control does not exist. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateOriginAccessControl -func (c *CloudFront) UpdateOriginAccessControl(input *UpdateOriginAccessControlInput) (*UpdateOriginAccessControlOutput, error) { - req, out := c.UpdateOriginAccessControlRequest(input) - return out, req.Send() -} - -// UpdateOriginAccessControlWithContext is the same as UpdateOriginAccessControl with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateOriginAccessControl 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 *CloudFront) UpdateOriginAccessControlWithContext(ctx aws.Context, input *UpdateOriginAccessControlInput, opts ...request.Option) (*UpdateOriginAccessControlOutput, error) { - req, out := c.UpdateOriginAccessControlRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateOriginRequestPolicy = "UpdateOriginRequestPolicy2020_05_31" - -// UpdateOriginRequestPolicyRequest generates a "aws/request.Request" representing the -// client's request for the UpdateOriginRequestPolicy 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 UpdateOriginRequestPolicy for more information on using the UpdateOriginRequestPolicy -// 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 UpdateOriginRequestPolicyRequest method. -// req, resp := client.UpdateOriginRequestPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateOriginRequestPolicy -func (c *CloudFront) UpdateOriginRequestPolicyRequest(input *UpdateOriginRequestPolicyInput) (req *request.Request, output *UpdateOriginRequestPolicyOutput) { - op := &request.Operation{ - Name: opUpdateOriginRequestPolicy, - HTTPMethod: "PUT", - HTTPPath: "/2020-05-31/origin-request-policy/{Id}", - } - - if input == nil { - input = &UpdateOriginRequestPolicyInput{} - } - - output = &UpdateOriginRequestPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateOriginRequestPolicy API operation for Amazon CloudFront. -// -// Updates an origin request policy configuration. -// -// When you update an origin request policy configuration, all the fields are -// updated with the values provided in the request. You cannot update some fields -// independent of others. To update an origin request policy configuration: -// -// Use GetOriginRequestPolicyConfig to get the current configuration. -// -// Locally modify the fields in the origin request policy configuration that -// you want to update. -// -// Call UpdateOriginRequestPolicy by providing the entire origin request policy -// configuration, including the fields that you modified and those that you -// didn't. -// -// 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 CloudFront's -// API operation UpdateOriginRequestPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeIllegalUpdate "IllegalUpdate" -// The update contains modifications that are not allowed. -// -// - ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeNoSuchOriginRequestPolicy "NoSuchOriginRequestPolicy" -// The origin request policy does not exist. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// - ErrCodeOriginRequestPolicyAlreadyExists "OriginRequestPolicyAlreadyExists" -// An origin request policy with this name already exists. You must provide -// a unique name. To modify an existing origin request policy, use UpdateOriginRequestPolicy. -// -// - ErrCodeTooManyHeadersInOriginRequestPolicy "TooManyHeadersInOriginRequestPolicy" -// The number of headers in the origin request policy exceeds the maximum. For -// more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyCookiesInOriginRequestPolicy "TooManyCookiesInOriginRequestPolicy" -// The number of cookies in the origin request policy exceeds the maximum. For -// more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyQueryStringsInOriginRequestPolicy "TooManyQueryStringsInOriginRequestPolicy" -// The number of query strings in the origin request policy exceeds the maximum. -// For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateOriginRequestPolicy -func (c *CloudFront) UpdateOriginRequestPolicy(input *UpdateOriginRequestPolicyInput) (*UpdateOriginRequestPolicyOutput, error) { - req, out := c.UpdateOriginRequestPolicyRequest(input) - return out, req.Send() -} - -// UpdateOriginRequestPolicyWithContext is the same as UpdateOriginRequestPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateOriginRequestPolicy 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 *CloudFront) UpdateOriginRequestPolicyWithContext(ctx aws.Context, input *UpdateOriginRequestPolicyInput, opts ...request.Option) (*UpdateOriginRequestPolicyOutput, error) { - req, out := c.UpdateOriginRequestPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdatePublicKey = "UpdatePublicKey2020_05_31" - -// UpdatePublicKeyRequest generates a "aws/request.Request" representing the -// client's request for the UpdatePublicKey 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 UpdatePublicKey for more information on using the UpdatePublicKey -// 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 UpdatePublicKeyRequest method. -// req, resp := client.UpdatePublicKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdatePublicKey -func (c *CloudFront) UpdatePublicKeyRequest(input *UpdatePublicKeyInput) (req *request.Request, output *UpdatePublicKeyOutput) { - op := &request.Operation{ - Name: opUpdatePublicKey, - HTTPMethod: "PUT", - HTTPPath: "/2020-05-31/public-key/{Id}/config", - } - - if input == nil { - input = &UpdatePublicKeyInput{} - } - - output = &UpdatePublicKeyOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdatePublicKey API operation for Amazon CloudFront. -// -// Update public key information. Note that the only value you can change is -// the comment. -// -// 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 CloudFront's -// API operation UpdatePublicKey for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeCannotChangeImmutablePublicKeyFields "CannotChangeImmutablePublicKeyFields" -// You can't change the value of a public key. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeIllegalUpdate "IllegalUpdate" -// The update contains modifications that are not allowed. -// -// - ErrCodeNoSuchPublicKey "NoSuchPublicKey" -// The specified public key doesn't exist. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdatePublicKey -func (c *CloudFront) UpdatePublicKey(input *UpdatePublicKeyInput) (*UpdatePublicKeyOutput, error) { - req, out := c.UpdatePublicKeyRequest(input) - return out, req.Send() -} - -// UpdatePublicKeyWithContext is the same as UpdatePublicKey with the addition of -// the ability to pass a context and additional request options. -// -// See UpdatePublicKey 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 *CloudFront) UpdatePublicKeyWithContext(ctx aws.Context, input *UpdatePublicKeyInput, opts ...request.Option) (*UpdatePublicKeyOutput, error) { - req, out := c.UpdatePublicKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateRealtimeLogConfig = "UpdateRealtimeLogConfig2020_05_31" - -// UpdateRealtimeLogConfigRequest generates a "aws/request.Request" representing the -// client's request for the UpdateRealtimeLogConfig 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 UpdateRealtimeLogConfig for more information on using the UpdateRealtimeLogConfig -// 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 UpdateRealtimeLogConfigRequest method. -// req, resp := client.UpdateRealtimeLogConfigRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateRealtimeLogConfig -func (c *CloudFront) UpdateRealtimeLogConfigRequest(input *UpdateRealtimeLogConfigInput) (req *request.Request, output *UpdateRealtimeLogConfigOutput) { - op := &request.Operation{ - Name: opUpdateRealtimeLogConfig, - HTTPMethod: "PUT", - HTTPPath: "/2020-05-31/realtime-log-config/", - } - - if input == nil { - input = &UpdateRealtimeLogConfigInput{} - } - - output = &UpdateRealtimeLogConfigOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateRealtimeLogConfig API operation for Amazon CloudFront. -// -// Updates a real-time log configuration. -// -// When you update a real-time log configuration, all the parameters are updated -// with the values provided in the request. You cannot update some parameters -// independent of others. To update a real-time log configuration: -// -// Call GetRealtimeLogConfig to get the current real-time log configuration. -// -// Locally modify the parameters in the real-time log configuration that you -// want to update. -// -// Call this API (UpdateRealtimeLogConfig) by providing the entire real-time -// log configuration, including the parameters that you modified and those that -// you didn't. -// -// You cannot update a real-time log configuration's Name or ARN. -// -// 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 CloudFront's -// API operation UpdateRealtimeLogConfig for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchRealtimeLogConfig "NoSuchRealtimeLogConfig" -// The real-time log configuration does not exist. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateRealtimeLogConfig -func (c *CloudFront) UpdateRealtimeLogConfig(input *UpdateRealtimeLogConfigInput) (*UpdateRealtimeLogConfigOutput, error) { - req, out := c.UpdateRealtimeLogConfigRequest(input) - return out, req.Send() -} - -// UpdateRealtimeLogConfigWithContext is the same as UpdateRealtimeLogConfig with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateRealtimeLogConfig 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 *CloudFront) UpdateRealtimeLogConfigWithContext(ctx aws.Context, input *UpdateRealtimeLogConfigInput, opts ...request.Option) (*UpdateRealtimeLogConfigOutput, error) { - req, out := c.UpdateRealtimeLogConfigRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateResponseHeadersPolicy = "UpdateResponseHeadersPolicy2020_05_31" - -// UpdateResponseHeadersPolicyRequest generates a "aws/request.Request" representing the -// client's request for the UpdateResponseHeadersPolicy 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 UpdateResponseHeadersPolicy for more information on using the UpdateResponseHeadersPolicy -// 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 UpdateResponseHeadersPolicyRequest method. -// req, resp := client.UpdateResponseHeadersPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateResponseHeadersPolicy -func (c *CloudFront) UpdateResponseHeadersPolicyRequest(input *UpdateResponseHeadersPolicyInput) (req *request.Request, output *UpdateResponseHeadersPolicyOutput) { - op := &request.Operation{ - Name: opUpdateResponseHeadersPolicy, - HTTPMethod: "PUT", - HTTPPath: "/2020-05-31/response-headers-policy/{Id}", - } - - if input == nil { - input = &UpdateResponseHeadersPolicyInput{} - } - - output = &UpdateResponseHeadersPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateResponseHeadersPolicy API operation for Amazon CloudFront. -// -// Updates a response headers policy. -// -// When you update a response headers policy, the entire policy is replaced. -// You cannot update some policy fields independent of others. To update a response -// headers policy configuration: -// -// Use GetResponseHeadersPolicyConfig to get the current policy's configuration. -// -// Modify the fields in the response headers policy configuration that you want -// to update. -// -// Call UpdateResponseHeadersPolicy, providing the entire response headers policy -// configuration, including the fields that you modified and those that you -// didn't. -// -// 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 CloudFront's -// API operation UpdateResponseHeadersPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeIllegalUpdate "IllegalUpdate" -// The update contains modifications that are not allowed. -// -// - ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeNoSuchResponseHeadersPolicy "NoSuchResponseHeadersPolicy" -// The response headers policy does not exist. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// - ErrCodeResponseHeadersPolicyAlreadyExists "ResponseHeadersPolicyAlreadyExists" -// A response headers policy with this name already exists. You must provide -// a unique name. To modify an existing response headers policy, use UpdateResponseHeadersPolicy. -// -// - ErrCodeTooManyCustomHeadersInResponseHeadersPolicy "TooManyCustomHeadersInResponseHeadersPolicy" -// The number of custom headers in the response headers policy exceeds the maximum. -// -// For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooLongCSPInResponseHeadersPolicy "TooLongCSPInResponseHeadersPolicy" -// The length of the Content-Security-Policy header value in the response headers -// policy exceeds the maximum. -// -// For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// - ErrCodeTooManyRemoveHeadersInResponseHeadersPolicy "TooManyRemoveHeadersInResponseHeadersPolicy" -// The number of headers in RemoveHeadersConfig in the response headers policy -// exceeds the maximum. -// -// For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// (formerly known as limits) in the Amazon CloudFront Developer Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateResponseHeadersPolicy -func (c *CloudFront) UpdateResponseHeadersPolicy(input *UpdateResponseHeadersPolicyInput) (*UpdateResponseHeadersPolicyOutput, error) { - req, out := c.UpdateResponseHeadersPolicyRequest(input) - return out, req.Send() -} - -// UpdateResponseHeadersPolicyWithContext is the same as UpdateResponseHeadersPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateResponseHeadersPolicy 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 *CloudFront) UpdateResponseHeadersPolicyWithContext(ctx aws.Context, input *UpdateResponseHeadersPolicyInput, opts ...request.Option) (*UpdateResponseHeadersPolicyOutput, error) { - req, out := c.UpdateResponseHeadersPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateStreamingDistribution = "UpdateStreamingDistribution2020_05_31" - -// UpdateStreamingDistributionRequest generates a "aws/request.Request" representing the -// client's request for the UpdateStreamingDistribution 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 UpdateStreamingDistribution for more information on using the UpdateStreamingDistribution -// 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 UpdateStreamingDistributionRequest method. -// req, resp := client.UpdateStreamingDistributionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateStreamingDistribution -func (c *CloudFront) UpdateStreamingDistributionRequest(input *UpdateStreamingDistributionInput) (req *request.Request, output *UpdateStreamingDistributionOutput) { - op := &request.Operation{ - Name: opUpdateStreamingDistribution, - HTTPMethod: "PUT", - HTTPPath: "/2020-05-31/streaming-distribution/{Id}/config", - } - - if input == nil { - input = &UpdateStreamingDistributionInput{} - } - - output = &UpdateStreamingDistributionOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateStreamingDistribution API operation for Amazon CloudFront. -// -// Update a streaming distribution. -// -// 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 CloudFront's -// API operation UpdateStreamingDistribution for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessDenied "AccessDenied" -// Access denied. -// -// - ErrCodeCNAMEAlreadyExists "CNAMEAlreadyExists" -// The CNAME specified is already defined for CloudFront. -// -// - ErrCodeIllegalUpdate "IllegalUpdate" -// The update contains modifications that are not allowed. -// -// - ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion" -// The If-Match version is missing or not valid. -// -// - ErrCodeMissingBody "MissingBody" -// This operation requires a body. Ensure that the body is present and the Content-Type -// header is set. -// -// - ErrCodeNoSuchStreamingDistribution "NoSuchStreamingDistribution" -// The specified streaming distribution does not exist. -// -// - ErrCodePreconditionFailed "PreconditionFailed" -// The precondition in one or more of the request fields evaluated to false. -// -// - ErrCodeTooManyStreamingDistributionCNAMEs "TooManyStreamingDistributionCNAMEs" -// Your request contains more CNAMEs than are allowed per distribution. -// -// - ErrCodeInvalidArgument "InvalidArgument" -// An argument is invalid. -// -// - ErrCodeInvalidOriginAccessIdentity "InvalidOriginAccessIdentity" -// The origin access identity is not valid or doesn't exist. -// -// - ErrCodeInvalidOriginAccessControl "InvalidOriginAccessControl" -// The origin access control is not valid. -// -// - ErrCodeTooManyTrustedSigners "TooManyTrustedSigners" -// Your request contains more trusted signers than are allowed per distribution. -// -// - ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist" -// One or more of your trusted signers don't exist. -// -// - ErrCodeInconsistentQuantities "InconsistentQuantities" -// The value of Quantity and the size of Items don't match. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/UpdateStreamingDistribution -func (c *CloudFront) UpdateStreamingDistribution(input *UpdateStreamingDistributionInput) (*UpdateStreamingDistributionOutput, error) { - req, out := c.UpdateStreamingDistributionRequest(input) - return out, req.Send() -} - -// UpdateStreamingDistributionWithContext is the same as UpdateStreamingDistribution with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateStreamingDistribution 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 *CloudFront) UpdateStreamingDistributionWithContext(ctx aws.Context, input *UpdateStreamingDistributionInput, opts ...request.Option) (*UpdateStreamingDistributionOutput, error) { - req, out := c.UpdateStreamingDistributionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// A list of key groups, and the public keys in each key group, that CloudFront -// can use to verify the signatures of signed URLs and signed cookies. -type ActiveTrustedKeyGroups struct { - _ struct{} `type:"structure"` - - // This field is true if any of the key groups have public keys that CloudFront - // can use to verify the signatures of signed URLs and signed cookies. If not, - // this field is false. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` - - // A list of key groups, including the identifiers of the public keys in each - // key group that CloudFront can use to verify the signatures of signed URLs - // and signed cookies. - Items []*KGKeyPairIds `locationNameList:"KeyGroup" type:"list"` - - // The number of key groups in the list. - // - // Quantity is a required field - Quantity *int64 `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 ActiveTrustedKeyGroups) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ActiveTrustedKeyGroups) GoString() string { - return s.String() -} - -// SetEnabled sets the Enabled field's value. -func (s *ActiveTrustedKeyGroups) SetEnabled(v bool) *ActiveTrustedKeyGroups { - s.Enabled = &v - return s -} - -// SetItems sets the Items field's value. -func (s *ActiveTrustedKeyGroups) SetItems(v []*KGKeyPairIds) *ActiveTrustedKeyGroups { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *ActiveTrustedKeyGroups) SetQuantity(v int64) *ActiveTrustedKeyGroups { - s.Quantity = &v - return s -} - -// A list of Amazon Web Services accounts and the active CloudFront key pairs -// in each account that CloudFront can use to verify the signatures of signed -// URLs and signed cookies. -type ActiveTrustedSigners struct { - _ struct{} `type:"structure"` - - // This field is true if any of the Amazon Web Services accounts in the list - // are configured as trusted signers. If not, this field is false. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` - - // A list of Amazon Web Services accounts and the identifiers of active CloudFront - // key pairs in each account that CloudFront can use to verify the signatures - // of signed URLs and signed cookies. - Items []*Signer `locationNameList:"Signer" type:"list"` - - // The number of Amazon Web Services accounts in the list. - // - // Quantity is a required field - Quantity *int64 `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 ActiveTrustedSigners) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ActiveTrustedSigners) GoString() string { - return s.String() -} - -// SetEnabled sets the Enabled field's value. -func (s *ActiveTrustedSigners) SetEnabled(v bool) *ActiveTrustedSigners { - s.Enabled = &v - return s -} - -// SetItems sets the Items field's value. -func (s *ActiveTrustedSigners) SetItems(v []*Signer) *ActiveTrustedSigners { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *ActiveTrustedSigners) SetQuantity(v int64) *ActiveTrustedSigners { - s.Quantity = &v - return s -} - -// Amazon Web Services services in China customers must file for an Internet -// Content Provider (ICP) recordal if they want to serve content publicly on -// an alternate domain name, also known as a CNAME, that they've added to CloudFront. -// AliasICPRecordal provides the ICP recordal status for CNAMEs associated with -// distributions. The status is returned in the CloudFront response; you can't -// configure it yourself. -// -// For more information about ICP recordals, see Signup, Accounts, and Credentials -// (https://docs.amazonaws.cn/en_us/aws/latest/userguide/accounts-and-credentials.html) -// in Getting Started with Amazon Web Services services in China. -type AliasICPRecordal struct { - _ struct{} `type:"structure"` - - // A domain name associated with a distribution. - CNAME *string `type:"string"` - - // The Internet Content Provider (ICP) recordal status for a CNAME. The ICPRecordalStatus - // is set to APPROVED for all CNAMEs (aliases) in regions outside of China. - // - // The status values returned are the following: - // - // * APPROVED indicates that the associated CNAME has a valid ICP recordal - // number. Multiple CNAMEs can be associated with a distribution, and CNAMEs - // can correspond to different ICP recordals. To be marked as APPROVED, that - // is, valid to use with China region, a CNAME must have one ICP recordal - // number associated with it. - // - // * SUSPENDED indicates that the associated CNAME does not have a valid - // ICP recordal number. - // - // * PENDING indicates that CloudFront can't determine the ICP recordal status - // of the CNAME associated with the distribution because there was an error - // in trying to determine the status. You can try again to see if the error - // is resolved in which case CloudFront returns an APPROVED or SUSPENDED - // status. - ICPRecordalStatus *string `type:"string" enum:"ICPRecordalStatus"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AliasICPRecordal) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AliasICPRecordal) GoString() string { - return s.String() -} - -// SetCNAME sets the CNAME field's value. -func (s *AliasICPRecordal) SetCNAME(v string) *AliasICPRecordal { - s.CNAME = &v - return s -} - -// SetICPRecordalStatus sets the ICPRecordalStatus field's value. -func (s *AliasICPRecordal) SetICPRecordalStatus(v string) *AliasICPRecordal { - s.ICPRecordalStatus = &v - return s -} - -// A complex type that contains information about CNAMEs (alternate domain names), -// if any, for this distribution. -type Aliases struct { - _ struct{} `type:"structure"` - - // A complex type that contains the CNAME aliases, if any, that you want to - // associate with this distribution. - Items []*string `locationNameList:"CNAME" type:"list"` - - // The number of CNAME aliases, if any, that you want to associate with this - // distribution. - // - // Quantity is a required field - Quantity *int64 `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 Aliases) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Aliases) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Aliases) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Aliases"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *Aliases) SetItems(v []*string) *Aliases { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *Aliases) SetQuantity(v int64) *Aliases { - s.Quantity = &v - return s -} - -// A complex type that controls which HTTP methods CloudFront processes and -// forwards to your Amazon S3 bucket or your custom origin. There are three -// choices: -// -// - CloudFront forwards only GET and HEAD requests. -// -// - CloudFront forwards only GET, HEAD, and OPTIONS requests. -// -// - CloudFront forwards GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE -// requests. -// -// If you pick the third choice, you may need to restrict access to your Amazon -// S3 bucket or to your custom origin so users can't perform operations that -// you don't want them to. For example, you might not want users to have permissions -// to delete objects from your origin. -type AllowedMethods struct { - _ struct{} `type:"structure"` - - // A complex type that controls whether CloudFront caches the response to requests - // using the specified HTTP methods. There are two choices: - // - // * CloudFront caches responses to GET and HEAD requests. - // - // * CloudFront caches responses to GET, HEAD, and OPTIONS requests. - // - // If you pick the second choice for your Amazon S3 Origin, you may need to - // forward Access-Control-Request-Method, Access-Control-Request-Headers, and - // Origin headers for the responses to be cached correctly. - CachedMethods *CachedMethods `type:"structure"` - - // A complex type that contains the HTTP methods that you want CloudFront to - // process and forward to your origin. - // - // Items is a required field - Items []*string `locationNameList:"Method" type:"list" required:"true" enum:"Method"` - - // The number of HTTP methods that you want CloudFront to forward to your origin. - // Valid values are 2 (for GET and HEAD requests), 3 (for GET, HEAD, and OPTIONS - // requests) and 7 (for GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE requests). - // - // Quantity is a required field - Quantity *int64 `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 AllowedMethods) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AllowedMethods) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AllowedMethods) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AllowedMethods"} - if s.Items == nil { - invalidParams.Add(request.NewErrParamRequired("Items")) - } - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.CachedMethods != nil { - if err := s.CachedMethods.Validate(); err != nil { - invalidParams.AddNested("CachedMethods", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCachedMethods sets the CachedMethods field's value. -func (s *AllowedMethods) SetCachedMethods(v *CachedMethods) *AllowedMethods { - s.CachedMethods = v - return s -} - -// SetItems sets the Items field's value. -func (s *AllowedMethods) SetItems(v []*string) *AllowedMethods { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *AllowedMethods) SetQuantity(v int64) *AllowedMethods { - s.Quantity = &v - return s -} - -type AssociateAliasInput struct { - _ struct{} `locationName:"AssociateAliasRequest" type:"structure"` - - // The alias (also known as a CNAME) to add to the target distribution. - // - // Alias is a required field - Alias *string `location:"querystring" locationName:"Alias" type:"string" required:"true"` - - // The ID of the distribution that you're associating the alias with. - // - // TargetDistributionId is a required field - TargetDistributionId *string `location:"uri" locationName:"TargetDistributionId" 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 AssociateAliasInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AssociateAliasInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AssociateAliasInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AssociateAliasInput"} - if s.Alias == nil { - invalidParams.Add(request.NewErrParamRequired("Alias")) - } - if s.TargetDistributionId == nil { - invalidParams.Add(request.NewErrParamRequired("TargetDistributionId")) - } - if s.TargetDistributionId != nil && len(*s.TargetDistributionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TargetDistributionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlias sets the Alias field's value. -func (s *AssociateAliasInput) SetAlias(v string) *AssociateAliasInput { - s.Alias = &v - return s -} - -// SetTargetDistributionId sets the TargetDistributionId field's value. -func (s *AssociateAliasInput) SetTargetDistributionId(v string) *AssociateAliasInput { - s.TargetDistributionId = &v - return s -} - -type AssociateAliasOutput 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 AssociateAliasOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AssociateAliasOutput) GoString() string { - return s.String() -} - -// A complex type that describes how CloudFront processes requests. -// -// You must create at least as many cache behaviors (including the default cache -// behavior) as you have origins if you want CloudFront to serve objects from -// all of the origins. Each cache behavior specifies the one origin from which -// you want CloudFront to get objects. If you have two origins and only the -// default cache behavior, the default cache behavior will cause CloudFront -// to get objects from one of the origins, but the other origin is never used. -// -// For the current quota (formerly known as limit) on the number of cache behaviors -// that you can add to a distribution, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) -// in the Amazon CloudFront Developer Guide. -// -// If you don't want to specify any cache behaviors, include only an empty CacheBehaviors -// element. Don't specify an empty individual CacheBehavior element, because -// this is invalid. For more information, see CacheBehaviors (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_CacheBehaviors.html). -// -// To delete all cache behaviors in an existing distribution, update the distribution -// configuration and include only an empty CacheBehaviors element. -// -// To add, change, or remove one or more cache behaviors, update the distribution -// configuration and specify all of the cache behaviors that you want to include -// in the updated distribution. -// -// For more information about cache behaviors, see Cache Behavior Settings (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesCacheBehavior) -// in the Amazon CloudFront Developer Guide. -type CacheBehavior struct { - _ struct{} `type:"structure"` - - // A complex type that controls which HTTP methods CloudFront processes and - // forwards to your Amazon S3 bucket or your custom origin. There are three - // choices: - // - // * CloudFront forwards only GET and HEAD requests. - // - // * CloudFront forwards only GET, HEAD, and OPTIONS requests. - // - // * CloudFront forwards GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE - // requests. - // - // If you pick the third choice, you may need to restrict access to your Amazon - // S3 bucket or to your custom origin so users can't perform operations that - // you don't want them to. For example, you might not want users to have permissions - // to delete objects from your origin. - AllowedMethods *AllowedMethods `type:"structure"` - - // The unique identifier of the cache policy that is attached to this cache - // behavior. For more information, see Creating cache policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) - // or Using the managed cache policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) - // in the Amazon CloudFront Developer Guide. - // - // A CacheBehavior must include either a CachePolicyId or ForwardedValues. We - // recommend that you use a CachePolicyId. - CachePolicyId *string `type:"string"` - - // Whether you want CloudFront to automatically compress certain files for this - // cache behavior. If so, specify true; if not, specify false. For more information, - // see Serving Compressed Files (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html) - // in the Amazon CloudFront Developer Guide. - Compress *bool `type:"boolean"` - - // This field is deprecated. We recommend that you use the DefaultTTL field - // in a cache policy instead of this field. For more information, see Creating - // cache policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) - // or Using the managed cache policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) - // in the Amazon CloudFront Developer Guide. - // - // The default amount of time that you want objects to stay in CloudFront caches - // before CloudFront forwards another request to your origin to determine whether - // the object has been updated. The value that you specify applies only when - // your origin does not add HTTP headers such as Cache-Control max-age, Cache-Control - // s-maxage, and Expires to objects. For more information, see Managing How - // Long Content Stays in an Edge Cache (Expiration) (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) - // in the Amazon CloudFront Developer Guide. - // - // Deprecated: DefaultTTL has been deprecated - DefaultTTL *int64 `deprecated:"true" type:"long"` - - // The value of ID for the field-level encryption configuration that you want - // CloudFront to use for encrypting specific fields of data for this cache behavior. - FieldLevelEncryptionId *string `type:"string"` - - // This field is deprecated. We recommend that you use a cache policy or an - // origin request policy instead of this field. For more information, see Working - // with policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/working-with-policies.html) - // in the Amazon CloudFront Developer Guide. - // - // If you want to include values in the cache key, use a cache policy. For more - // information, see Creating cache policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) - // or Using the managed cache policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) - // in the Amazon CloudFront Developer Guide. - // - // If you want to send values to the origin but not include them in the cache - // key, use an origin request policy. For more information, see Creating origin - // request policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) - // or Using the managed origin request policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-origin-request-policies.html) - // in the Amazon CloudFront Developer Guide. - // - // A CacheBehavior must include either a CachePolicyId or ForwardedValues. We - // recommend that you use a CachePolicyId. - // - // A complex type that specifies how CloudFront handles query strings, cookies, - // and HTTP headers. - // - // Deprecated: ForwardedValues has been deprecated - ForwardedValues *ForwardedValues `deprecated:"true" type:"structure"` - - // A list of CloudFront functions that are associated with this cache behavior. - // CloudFront functions must be published to the LIVE stage to associate them - // with a cache behavior. - FunctionAssociations *FunctionAssociations `type:"structure"` - - // A complex type that contains zero or more Lambda@Edge function associations - // for a cache behavior. - LambdaFunctionAssociations *LambdaFunctionAssociations `type:"structure"` - - // This field is deprecated. We recommend that you use the MaxTTL field in a - // cache policy instead of this field. For more information, see Creating cache - // policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) - // or Using the managed cache policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) - // in the Amazon CloudFront Developer Guide. - // - // The maximum amount of time that you want objects to stay in CloudFront caches - // before CloudFront forwards another request to your origin to determine whether - // the object has been updated. The value that you specify applies only when - // your origin adds HTTP headers such as Cache-Control max-age, Cache-Control - // s-maxage, and Expires to objects. For more information, see Managing How - // Long Content Stays in an Edge Cache (Expiration) (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) - // in the Amazon CloudFront Developer Guide. - // - // Deprecated: MaxTTL has been deprecated - MaxTTL *int64 `deprecated:"true" type:"long"` - - // This field is deprecated. We recommend that you use the MinTTL field in a - // cache policy instead of this field. For more information, see Creating cache - // policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) - // or Using the managed cache policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) - // in the Amazon CloudFront Developer Guide. - // - // The minimum amount of time that you want objects to stay in CloudFront caches - // before CloudFront forwards another request to your origin to determine whether - // the object has been updated. For more information, see Managing How Long - // Content Stays in an Edge Cache (Expiration) (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) - // in the Amazon CloudFront Developer Guide. - // - // You must specify 0 for MinTTL if you configure CloudFront to forward all - // headers to your origin (under Headers, if you specify 1 for Quantity and - // * for Name). - // - // Deprecated: MinTTL has been deprecated - MinTTL *int64 `deprecated:"true" type:"long"` - - // The unique identifier of the origin request policy that is attached to this - // cache behavior. For more information, see Creating origin request policies - // (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) - // or Using the managed origin request policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-origin-request-policies.html) - // in the Amazon CloudFront Developer Guide. - OriginRequestPolicyId *string `type:"string"` - - // The pattern (for example, images/*.jpg) that specifies which requests to - // apply the behavior to. When CloudFront receives a viewer request, the requested - // path is compared with path patterns in the order in which cache behaviors - // are listed in the distribution. - // - // You can optionally include a slash (/) at the beginning of the path pattern. - // For example, /images/*.jpg. CloudFront behavior is the same with or without - // the leading /. - // - // The path pattern for the default cache behavior is * and cannot be changed. - // If the request for an object does not match the path pattern for any cache - // behaviors, CloudFront applies the behavior in the default cache behavior. - // - // For more information, see Path Pattern (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesPathPattern) - // in the Amazon CloudFront Developer Guide. - // - // PathPattern is a required field - PathPattern *string `type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the real-time log configuration that is - // attached to this cache behavior. For more information, see Real-time logs - // (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html) - // in the Amazon CloudFront Developer Guide. - RealtimeLogConfigArn *string `type:"string"` - - // The identifier for a response headers policy. - ResponseHeadersPolicyId *string `type:"string"` - - // Indicates whether you want to distribute media files in the Microsoft Smooth - // Streaming format using the origin that is associated with this cache behavior. - // If so, specify true; if not, specify false. If you specify true for SmoothStreaming, - // you can still distribute other content using this cache behavior if the content - // matches the value of PathPattern. - SmoothStreaming *bool `type:"boolean"` - - // The value of ID for the origin that you want CloudFront to route requests - // to when they match this cache behavior. - // - // TargetOriginId is a required field - TargetOriginId *string `type:"string" required:"true"` - - // A list of key groups that CloudFront can use to validate signed URLs or signed - // cookies. - // - // When a cache behavior contains trusted key groups, CloudFront requires signed - // URLs or signed cookies for all requests that match the cache behavior. The - // URLs or cookies must be signed with a private key whose corresponding public - // key is in the key group. The signed URL or cookie contains information about - // which public key CloudFront should use to verify the signature. For more - // information, see Serving private content (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) - // in the Amazon CloudFront Developer Guide. - TrustedKeyGroups *TrustedKeyGroups `type:"structure"` - - // - // We recommend using TrustedKeyGroups instead of TrustedSigners. - // - // A list of Amazon Web Services account IDs whose public keys CloudFront can - // use to validate signed URLs or signed cookies. - // - // When a cache behavior contains trusted signers, CloudFront requires signed - // URLs or signed cookies for all requests that match the cache behavior. The - // URLs or cookies must be signed with the private key of a CloudFront key pair - // in the trusted signer's Amazon Web Services account. The signed URL or cookie - // contains information about which public key CloudFront should use to verify - // the signature. For more information, see Serving private content (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) - // in the Amazon CloudFront Developer Guide. - TrustedSigners *TrustedSigners `type:"structure"` - - // The protocol that viewers can use to access the files in the origin specified - // by TargetOriginId when a request matches the path pattern in PathPattern. - // You can specify the following options: - // - // * allow-all: Viewers can use HTTP or HTTPS. - // - // * redirect-to-https: If a viewer submits an HTTP request, CloudFront returns - // an HTTP status code of 301 (Moved Permanently) to the viewer along with - // the HTTPS URL. The viewer then resubmits the request using the new URL. - // - // * https-only: If a viewer sends an HTTP request, CloudFront returns an - // HTTP status code of 403 (Forbidden). - // - // For more information about requiring the HTTPS protocol, see Requiring HTTPS - // Between Viewers and CloudFront (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-https-viewers-to-cloudfront.html) - // in the Amazon CloudFront Developer Guide. - // - // The only way to guarantee that viewers retrieve an object that was fetched - // from the origin using HTTPS is never to use any other protocol to fetch the - // object. If you have recently changed from HTTP to HTTPS, we recommend that - // you clear your objects' cache because cached objects are protocol agnostic. - // That means that an edge location will return an object from the cache regardless - // of whether the current request protocol matches the protocol used previously. - // For more information, see Managing Cache Expiration (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) - // in the Amazon CloudFront Developer Guide. - // - // ViewerProtocolPolicy is a required field - ViewerProtocolPolicy *string `type:"string" required:"true" enum:"ViewerProtocolPolicy"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CacheBehavior) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CacheBehavior) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CacheBehavior) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CacheBehavior"} - if s.PathPattern == nil { - invalidParams.Add(request.NewErrParamRequired("PathPattern")) - } - if s.TargetOriginId == nil { - invalidParams.Add(request.NewErrParamRequired("TargetOriginId")) - } - if s.ViewerProtocolPolicy == nil { - invalidParams.Add(request.NewErrParamRequired("ViewerProtocolPolicy")) - } - if s.AllowedMethods != nil { - if err := s.AllowedMethods.Validate(); err != nil { - invalidParams.AddNested("AllowedMethods", err.(request.ErrInvalidParams)) - } - } - if s.ForwardedValues != nil { - if err := s.ForwardedValues.Validate(); err != nil { - invalidParams.AddNested("ForwardedValues", err.(request.ErrInvalidParams)) - } - } - if s.FunctionAssociations != nil { - if err := s.FunctionAssociations.Validate(); err != nil { - invalidParams.AddNested("FunctionAssociations", err.(request.ErrInvalidParams)) - } - } - if s.LambdaFunctionAssociations != nil { - if err := s.LambdaFunctionAssociations.Validate(); err != nil { - invalidParams.AddNested("LambdaFunctionAssociations", err.(request.ErrInvalidParams)) - } - } - if s.TrustedKeyGroups != nil { - if err := s.TrustedKeyGroups.Validate(); err != nil { - invalidParams.AddNested("TrustedKeyGroups", err.(request.ErrInvalidParams)) - } - } - if s.TrustedSigners != nil { - if err := s.TrustedSigners.Validate(); err != nil { - invalidParams.AddNested("TrustedSigners", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllowedMethods sets the AllowedMethods field's value. -func (s *CacheBehavior) SetAllowedMethods(v *AllowedMethods) *CacheBehavior { - s.AllowedMethods = v - return s -} - -// SetCachePolicyId sets the CachePolicyId field's value. -func (s *CacheBehavior) SetCachePolicyId(v string) *CacheBehavior { - s.CachePolicyId = &v - return s -} - -// SetCompress sets the Compress field's value. -func (s *CacheBehavior) SetCompress(v bool) *CacheBehavior { - s.Compress = &v - return s -} - -// SetDefaultTTL sets the DefaultTTL field's value. -func (s *CacheBehavior) SetDefaultTTL(v int64) *CacheBehavior { - s.DefaultTTL = &v - return s -} - -// SetFieldLevelEncryptionId sets the FieldLevelEncryptionId field's value. -func (s *CacheBehavior) SetFieldLevelEncryptionId(v string) *CacheBehavior { - s.FieldLevelEncryptionId = &v - return s -} - -// SetForwardedValues sets the ForwardedValues field's value. -func (s *CacheBehavior) SetForwardedValues(v *ForwardedValues) *CacheBehavior { - s.ForwardedValues = v - return s -} - -// SetFunctionAssociations sets the FunctionAssociations field's value. -func (s *CacheBehavior) SetFunctionAssociations(v *FunctionAssociations) *CacheBehavior { - s.FunctionAssociations = v - return s -} - -// SetLambdaFunctionAssociations sets the LambdaFunctionAssociations field's value. -func (s *CacheBehavior) SetLambdaFunctionAssociations(v *LambdaFunctionAssociations) *CacheBehavior { - s.LambdaFunctionAssociations = v - return s -} - -// SetMaxTTL sets the MaxTTL field's value. -func (s *CacheBehavior) SetMaxTTL(v int64) *CacheBehavior { - s.MaxTTL = &v - return s -} - -// SetMinTTL sets the MinTTL field's value. -func (s *CacheBehavior) SetMinTTL(v int64) *CacheBehavior { - s.MinTTL = &v - return s -} - -// SetOriginRequestPolicyId sets the OriginRequestPolicyId field's value. -func (s *CacheBehavior) SetOriginRequestPolicyId(v string) *CacheBehavior { - s.OriginRequestPolicyId = &v - return s -} - -// SetPathPattern sets the PathPattern field's value. -func (s *CacheBehavior) SetPathPattern(v string) *CacheBehavior { - s.PathPattern = &v - return s -} - -// SetRealtimeLogConfigArn sets the RealtimeLogConfigArn field's value. -func (s *CacheBehavior) SetRealtimeLogConfigArn(v string) *CacheBehavior { - s.RealtimeLogConfigArn = &v - return s -} - -// SetResponseHeadersPolicyId sets the ResponseHeadersPolicyId field's value. -func (s *CacheBehavior) SetResponseHeadersPolicyId(v string) *CacheBehavior { - s.ResponseHeadersPolicyId = &v - return s -} - -// SetSmoothStreaming sets the SmoothStreaming field's value. -func (s *CacheBehavior) SetSmoothStreaming(v bool) *CacheBehavior { - s.SmoothStreaming = &v - return s -} - -// SetTargetOriginId sets the TargetOriginId field's value. -func (s *CacheBehavior) SetTargetOriginId(v string) *CacheBehavior { - s.TargetOriginId = &v - return s -} - -// SetTrustedKeyGroups sets the TrustedKeyGroups field's value. -func (s *CacheBehavior) SetTrustedKeyGroups(v *TrustedKeyGroups) *CacheBehavior { - s.TrustedKeyGroups = v - return s -} - -// SetTrustedSigners sets the TrustedSigners field's value. -func (s *CacheBehavior) SetTrustedSigners(v *TrustedSigners) *CacheBehavior { - s.TrustedSigners = v - return s -} - -// SetViewerProtocolPolicy sets the ViewerProtocolPolicy field's value. -func (s *CacheBehavior) SetViewerProtocolPolicy(v string) *CacheBehavior { - s.ViewerProtocolPolicy = &v - return s -} - -// A complex type that contains zero or more CacheBehavior elements. -type CacheBehaviors struct { - _ struct{} `type:"structure"` - - // Optional: A complex type that contains cache behaviors for this distribution. - // If Quantity is 0, you can omit Items. - Items []*CacheBehavior `locationNameList:"CacheBehavior" type:"list"` - - // The number of cache behaviors for this distribution. - // - // Quantity is a required field - Quantity *int64 `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 CacheBehaviors) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CacheBehaviors) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CacheBehaviors) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CacheBehaviors"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *CacheBehaviors) SetItems(v []*CacheBehavior) *CacheBehaviors { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *CacheBehaviors) SetQuantity(v int64) *CacheBehaviors { - s.Quantity = &v - return s -} - -// A cache policy. -// -// When it's attached to a cache behavior, the cache policy determines the following: -// -// - The values that CloudFront includes in the cache key. These values can -// include HTTP headers, cookies, and URL query strings. CloudFront uses -// the cache key to find an object in its cache that it can return to the -// viewer. -// -// - The default, minimum, and maximum time to live (TTL) values that you -// want objects to stay in the CloudFront cache. -// -// The headers, cookies, and query strings that are included in the cache key -// are also included in requests that CloudFront sends to the origin. CloudFront -// sends a request when it can't find a valid object in its cache that matches -// the request's cache key. If you want to send values to the origin but not -// include them in the cache key, use OriginRequestPolicy. -type CachePolicy struct { - _ struct{} `type:"structure"` - - // The cache policy configuration. - // - // CachePolicyConfig is a required field - CachePolicyConfig *CachePolicyConfig `type:"structure" required:"true"` - - // The unique identifier for the cache policy. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The date and time when the cache policy was last modified. - // - // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" 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 CachePolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CachePolicy) GoString() string { - return s.String() -} - -// SetCachePolicyConfig sets the CachePolicyConfig field's value. -func (s *CachePolicy) SetCachePolicyConfig(v *CachePolicyConfig) *CachePolicy { - s.CachePolicyConfig = v - return s -} - -// SetId sets the Id field's value. -func (s *CachePolicy) SetId(v string) *CachePolicy { - s.Id = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *CachePolicy) SetLastModifiedTime(v time.Time) *CachePolicy { - s.LastModifiedTime = &v - return s -} - -// A cache policy configuration. -// -// This configuration determines the following: -// -// - The values that CloudFront includes in the cache key. These values can -// include HTTP headers, cookies, and URL query strings. CloudFront uses -// the cache key to find an object in its cache that it can return to the -// viewer. -// -// - The default, minimum, and maximum time to live (TTL) values that you -// want objects to stay in the CloudFront cache. -// -// The headers, cookies, and query strings that are included in the cache key -// are also included in requests that CloudFront sends to the origin. CloudFront -// sends a request when it can't find a valid object in its cache that matches -// the request's cache key. If you want to send values to the origin but not -// include them in the cache key, use OriginRequestPolicy. -type CachePolicyConfig struct { - _ struct{} `type:"structure"` - - // A comment to describe the cache policy. The comment cannot be longer than - // 128 characters. - Comment *string `type:"string"` - - // The default amount of time, in seconds, that you want objects to stay in - // the CloudFront cache before CloudFront sends another request to the origin - // to see if the object has been updated. CloudFront uses this value as the - // object's time to live (TTL) only when the origin does not send Cache-Control - // or Expires headers with the object. For more information, see Managing How - // Long Content Stays in an Edge Cache (Expiration) (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) - // in the Amazon CloudFront Developer Guide. - // - // The default value for this field is 86400 seconds (one day). If the value - // of MinTTL is more than 86400 seconds, then the default value for this field - // is the same as the value of MinTTL. - DefaultTTL *int64 `type:"long"` - - // The maximum amount of time, in seconds, that objects stay in the CloudFront - // cache before CloudFront sends another request to the origin to see if the - // object has been updated. CloudFront uses this value only when the origin - // sends Cache-Control or Expires headers with the object. For more information, - // see Managing How Long Content Stays in an Edge Cache (Expiration) (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) - // in the Amazon CloudFront Developer Guide. - // - // The default value for this field is 31536000 seconds (one year). If the value - // of MinTTL or DefaultTTL is more than 31536000 seconds, then the default value - // for this field is the same as the value of DefaultTTL. - MaxTTL *int64 `type:"long"` - - // The minimum amount of time, in seconds, that you want objects to stay in - // the CloudFront cache before CloudFront sends another request to the origin - // to see if the object has been updated. For more information, see Managing - // How Long Content Stays in an Edge Cache (Expiration) (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) - // in the Amazon CloudFront Developer Guide. - // - // MinTTL is a required field - MinTTL *int64 `type:"long" required:"true"` - - // A unique name to identify the cache policy. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The HTTP headers, cookies, and URL query strings to include in the cache - // key. The values included in the cache key are also included in requests that - // CloudFront sends to the origin. - ParametersInCacheKeyAndForwardedToOrigin *ParametersInCacheKeyAndForwardedToOrigin `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 CachePolicyConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CachePolicyConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CachePolicyConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CachePolicyConfig"} - if s.MinTTL == nil { - invalidParams.Add(request.NewErrParamRequired("MinTTL")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.ParametersInCacheKeyAndForwardedToOrigin != nil { - if err := s.ParametersInCacheKeyAndForwardedToOrigin.Validate(); err != nil { - invalidParams.AddNested("ParametersInCacheKeyAndForwardedToOrigin", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComment sets the Comment field's value. -func (s *CachePolicyConfig) SetComment(v string) *CachePolicyConfig { - s.Comment = &v - return s -} - -// SetDefaultTTL sets the DefaultTTL field's value. -func (s *CachePolicyConfig) SetDefaultTTL(v int64) *CachePolicyConfig { - s.DefaultTTL = &v - return s -} - -// SetMaxTTL sets the MaxTTL field's value. -func (s *CachePolicyConfig) SetMaxTTL(v int64) *CachePolicyConfig { - s.MaxTTL = &v - return s -} - -// SetMinTTL sets the MinTTL field's value. -func (s *CachePolicyConfig) SetMinTTL(v int64) *CachePolicyConfig { - s.MinTTL = &v - return s -} - -// SetName sets the Name field's value. -func (s *CachePolicyConfig) SetName(v string) *CachePolicyConfig { - s.Name = &v - return s -} - -// SetParametersInCacheKeyAndForwardedToOrigin sets the ParametersInCacheKeyAndForwardedToOrigin field's value. -func (s *CachePolicyConfig) SetParametersInCacheKeyAndForwardedToOrigin(v *ParametersInCacheKeyAndForwardedToOrigin) *CachePolicyConfig { - s.ParametersInCacheKeyAndForwardedToOrigin = v - return s -} - -// An object that determines whether any cookies in viewer requests (and if -// so, which cookies) are included in the cache key and in requests that CloudFront -// sends to the origin. -type CachePolicyCookiesConfig struct { - _ struct{} `type:"structure"` - - // Determines whether any cookies in viewer requests are included in the cache - // key and in requests that CloudFront sends to the origin. Valid values are: - // - // * none – No cookies in viewer requests are included in the cache key - // or in requests that CloudFront sends to the origin. Even when this field - // is set to none, any cookies that are listed in an OriginRequestPolicy - // are included in origin requests. - // - // * whitelist – Only the cookies in viewer requests that are listed in - // the CookieNames type are included in the cache key and in requests that - // CloudFront sends to the origin. - // - // * allExcept – All cookies in viewer requests are included in the cache - // key and in requests that CloudFront sends to the origin, except for those - // that are listed in the CookieNames type, which are not included. - // - // * all – All cookies in viewer requests are included in the cache key - // and in requests that CloudFront sends to the origin. - // - // CookieBehavior is a required field - CookieBehavior *string `type:"string" required:"true" enum:"CachePolicyCookieBehavior"` - - // Contains a list of cookie names. - Cookies *CookieNames `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 CachePolicyCookiesConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CachePolicyCookiesConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CachePolicyCookiesConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CachePolicyCookiesConfig"} - if s.CookieBehavior == nil { - invalidParams.Add(request.NewErrParamRequired("CookieBehavior")) - } - if s.Cookies != nil { - if err := s.Cookies.Validate(); err != nil { - invalidParams.AddNested("Cookies", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCookieBehavior sets the CookieBehavior field's value. -func (s *CachePolicyCookiesConfig) SetCookieBehavior(v string) *CachePolicyCookiesConfig { - s.CookieBehavior = &v - return s -} - -// SetCookies sets the Cookies field's value. -func (s *CachePolicyCookiesConfig) SetCookies(v *CookieNames) *CachePolicyCookiesConfig { - s.Cookies = v - return s -} - -// An object that determines whether any HTTP headers (and if so, which headers) -// are included in the cache key and in requests that CloudFront sends to the -// origin. -type CachePolicyHeadersConfig struct { - _ struct{} `type:"structure"` - - // Determines whether any HTTP headers are included in the cache key and in - // requests that CloudFront sends to the origin. Valid values are: - // - // * none – No HTTP headers are included in the cache key or in requests - // that CloudFront sends to the origin. Even when this field is set to none, - // any headers that are listed in an OriginRequestPolicy are included in - // origin requests. - // - // * whitelist – Only the HTTP headers that are listed in the Headers type - // are included in the cache key and in requests that CloudFront sends to - // the origin. - // - // HeaderBehavior is a required field - HeaderBehavior *string `type:"string" required:"true" enum:"CachePolicyHeaderBehavior"` - - // Contains a list of HTTP header names. - Headers *Headers `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 CachePolicyHeadersConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CachePolicyHeadersConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CachePolicyHeadersConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CachePolicyHeadersConfig"} - if s.HeaderBehavior == nil { - invalidParams.Add(request.NewErrParamRequired("HeaderBehavior")) - } - if s.Headers != nil { - if err := s.Headers.Validate(); err != nil { - invalidParams.AddNested("Headers", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHeaderBehavior sets the HeaderBehavior field's value. -func (s *CachePolicyHeadersConfig) SetHeaderBehavior(v string) *CachePolicyHeadersConfig { - s.HeaderBehavior = &v - return s -} - -// SetHeaders sets the Headers field's value. -func (s *CachePolicyHeadersConfig) SetHeaders(v *Headers) *CachePolicyHeadersConfig { - s.Headers = v - return s -} - -// A list of cache policies. -type CachePolicyList struct { - _ struct{} `type:"structure"` - - // Contains the cache policies in the list. - Items []*CachePolicySummary `locationNameList:"CachePolicySummary" type:"list"` - - // The maximum number of cache policies requested. - // - // MaxItems is a required field - MaxItems *int64 `type:"integer" required:"true"` - - // If there are more items in the list than are in this response, this element - // is present. It contains the value that you should use in the Marker field - // of a subsequent request to continue listing cache policies where you left - // off. - NextMarker *string `type:"string"` - - // The total number of cache policies returned in the response. - // - // Quantity is a required field - Quantity *int64 `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 CachePolicyList) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CachePolicyList) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *CachePolicyList) SetItems(v []*CachePolicySummary) *CachePolicyList { - s.Items = v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *CachePolicyList) SetMaxItems(v int64) *CachePolicyList { - s.MaxItems = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *CachePolicyList) SetNextMarker(v string) *CachePolicyList { - s.NextMarker = &v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *CachePolicyList) SetQuantity(v int64) *CachePolicyList { - s.Quantity = &v - return s -} - -// An object that determines whether any URL query strings in viewer requests -// (and if so, which query strings) are included in the cache key and in requests -// that CloudFront sends to the origin. -type CachePolicyQueryStringsConfig struct { - _ struct{} `type:"structure"` - - // Determines whether any URL query strings in viewer requests are included - // in the cache key and in requests that CloudFront sends to the origin. Valid - // values are: - // - // * none – No query strings in viewer requests are included in the cache - // key or in requests that CloudFront sends to the origin. Even when this - // field is set to none, any query strings that are listed in an OriginRequestPolicy - // are included in origin requests. - // - // * whitelist – Only the query strings in viewer requests that are listed - // in the QueryStringNames type are included in the cache key and in requests - // that CloudFront sends to the origin. - // - // * allExcept – All query strings in viewer requests are included in the - // cache key and in requests that CloudFront sends to the origin, except - // those that are listed in the QueryStringNames type, which are not included. - // - // * all – All query strings in viewer requests are included in the cache - // key and in requests that CloudFront sends to the origin. - // - // QueryStringBehavior is a required field - QueryStringBehavior *string `type:"string" required:"true" enum:"CachePolicyQueryStringBehavior"` - - // Contains the specific query strings in viewer requests that either are or - // are not included in the cache key and in requests that CloudFront sends to - // the origin. The behavior depends on whether the QueryStringBehavior field - // in the CachePolicyQueryStringsConfig type is set to whitelist (the listed - // query strings are included) or allExcept (the listed query strings are not - // included, but all other query strings are). - QueryStrings *QueryStringNames `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 CachePolicyQueryStringsConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CachePolicyQueryStringsConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CachePolicyQueryStringsConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CachePolicyQueryStringsConfig"} - if s.QueryStringBehavior == nil { - invalidParams.Add(request.NewErrParamRequired("QueryStringBehavior")) - } - if s.QueryStrings != nil { - if err := s.QueryStrings.Validate(); err != nil { - invalidParams.AddNested("QueryStrings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetQueryStringBehavior sets the QueryStringBehavior field's value. -func (s *CachePolicyQueryStringsConfig) SetQueryStringBehavior(v string) *CachePolicyQueryStringsConfig { - s.QueryStringBehavior = &v - return s -} - -// SetQueryStrings sets the QueryStrings field's value. -func (s *CachePolicyQueryStringsConfig) SetQueryStrings(v *QueryStringNames) *CachePolicyQueryStringsConfig { - s.QueryStrings = v - return s -} - -// Contains a cache policy. -type CachePolicySummary struct { - _ struct{} `type:"structure"` - - // The cache policy. - // - // CachePolicy is a required field - CachePolicy *CachePolicy `type:"structure" required:"true"` - - // The type of cache policy, either managed (created by Amazon Web Services) - // or custom (created in this Amazon Web Services account). - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"CachePolicyType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CachePolicySummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CachePolicySummary) GoString() string { - return s.String() -} - -// SetCachePolicy sets the CachePolicy field's value. -func (s *CachePolicySummary) SetCachePolicy(v *CachePolicy) *CachePolicySummary { - s.CachePolicy = v - return s -} - -// SetType sets the Type field's value. -func (s *CachePolicySummary) SetType(v string) *CachePolicySummary { - s.Type = &v - return s -} - -// A complex type that controls whether CloudFront caches the response to requests -// using the specified HTTP methods. There are two choices: -// -// - CloudFront caches responses to GET and HEAD requests. -// -// - CloudFront caches responses to GET, HEAD, and OPTIONS requests. -// -// If you pick the second choice for your Amazon S3 Origin, you may need to -// forward Access-Control-Request-Method, Access-Control-Request-Headers, and -// Origin headers for the responses to be cached correctly. -type CachedMethods struct { - _ struct{} `type:"structure"` - - // A complex type that contains the HTTP methods that you want CloudFront to - // cache responses to. Valid values for CachedMethods include GET, HEAD, and - // OPTIONS, depending on which caching option you choose. For more information, - // see the preceding section. - // - // Items is a required field - Items []*string `locationNameList:"Method" type:"list" required:"true" enum:"Method"` - - // The number of HTTP methods for which you want CloudFront to cache responses. - // Valid values are 2 (for caching responses to GET and HEAD requests) and 3 - // (for caching responses to GET, HEAD, and OPTIONS requests). - // - // Quantity is a required field - Quantity *int64 `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 CachedMethods) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CachedMethods) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CachedMethods) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CachedMethods"} - if s.Items == nil { - invalidParams.Add(request.NewErrParamRequired("Items")) - } - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *CachedMethods) SetItems(v []*string) *CachedMethods { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *CachedMethods) SetQuantity(v int64) *CachedMethods { - s.Quantity = &v - return s -} - -// An alias (also called a CNAME) and the CloudFront distribution and Amazon -// Web Services account ID that it's associated with. The distribution and account -// IDs are partially hidden, which allows you to identify the distributions -// and accounts that you own, but helps to protect the information of ones that -// you don't own. -type ConflictingAlias struct { - _ struct{} `type:"structure"` - - // The (partially hidden) ID of the Amazon Web Services account that owns the - // distribution that's associated with the alias. - AccountId *string `type:"string"` - - // An alias (also called a CNAME). - Alias *string `type:"string"` - - // The (partially hidden) ID of the CloudFront distribution associated with - // the alias. - DistributionId *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 ConflictingAlias) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ConflictingAlias) GoString() string { - return s.String() -} - -// SetAccountId sets the AccountId field's value. -func (s *ConflictingAlias) SetAccountId(v string) *ConflictingAlias { - s.AccountId = &v - return s -} - -// SetAlias sets the Alias field's value. -func (s *ConflictingAlias) SetAlias(v string) *ConflictingAlias { - s.Alias = &v - return s -} - -// SetDistributionId sets the DistributionId field's value. -func (s *ConflictingAlias) SetDistributionId(v string) *ConflictingAlias { - s.DistributionId = &v - return s -} - -// A list of aliases (also called CNAMEs) and the CloudFront distributions and -// Amazon Web Services accounts that they are associated with. In the list, -// the distribution and account IDs are partially hidden, which allows you to -// identify the distributions and accounts that you own, but helps to protect -// the information of ones that you don't own. -type ConflictingAliasesList struct { - _ struct{} `type:"structure"` - - // Contains the conflicting aliases in the list. - Items []*ConflictingAlias `locationNameList:"ConflictingAlias" type:"list"` - - // The maximum number of conflicting aliases requested. - MaxItems *int64 `type:"integer"` - - // If there are more items in the list than are in this response, this element - // is present. It contains the value that you should use in the Marker field - // of a subsequent request to continue listing conflicting aliases where you - // left off. - NextMarker *string `type:"string"` - - // The number of conflicting aliases returned in the response. - Quantity *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 ConflictingAliasesList) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ConflictingAliasesList) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *ConflictingAliasesList) SetItems(v []*ConflictingAlias) *ConflictingAliasesList { - s.Items = v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ConflictingAliasesList) SetMaxItems(v int64) *ConflictingAliasesList { - s.MaxItems = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ConflictingAliasesList) SetNextMarker(v string) *ConflictingAliasesList { - s.NextMarker = &v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *ConflictingAliasesList) SetQuantity(v int64) *ConflictingAliasesList { - s.Quantity = &v - return s -} - -// A field-level encryption content type profile. -type ContentTypeProfile struct { - _ struct{} `type:"structure"` - - // The content type for a field-level encryption content type-profile mapping. - // - // ContentType is a required field - ContentType *string `type:"string" required:"true"` - - // The format for a field-level encryption content type-profile mapping. - // - // Format is a required field - Format *string `type:"string" required:"true" enum:"Format"` - - // The profile ID for a field-level encryption content type-profile mapping. - ProfileId *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 ContentTypeProfile) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ContentTypeProfile) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ContentTypeProfile) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ContentTypeProfile"} - if s.ContentType == nil { - invalidParams.Add(request.NewErrParamRequired("ContentType")) - } - if s.Format == nil { - invalidParams.Add(request.NewErrParamRequired("Format")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContentType sets the ContentType field's value. -func (s *ContentTypeProfile) SetContentType(v string) *ContentTypeProfile { - s.ContentType = &v - return s -} - -// SetFormat sets the Format field's value. -func (s *ContentTypeProfile) SetFormat(v string) *ContentTypeProfile { - s.Format = &v - return s -} - -// SetProfileId sets the ProfileId field's value. -func (s *ContentTypeProfile) SetProfileId(v string) *ContentTypeProfile { - s.ProfileId = &v - return s -} - -// The configuration for a field-level encryption content type-profile mapping. -type ContentTypeProfileConfig struct { - _ struct{} `type:"structure"` - - // The configuration for a field-level encryption content type-profile. - ContentTypeProfiles *ContentTypeProfiles `type:"structure"` - - // The setting in a field-level encryption content type-profile mapping that - // specifies what to do when an unknown content type is provided for the profile. - // If true, content is forwarded without being encrypted when the content type - // is unknown. If false (the default), an error is returned when the content - // type is unknown. - // - // ForwardWhenContentTypeIsUnknown is a required field - ForwardWhenContentTypeIsUnknown *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 ContentTypeProfileConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ContentTypeProfileConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ContentTypeProfileConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ContentTypeProfileConfig"} - if s.ForwardWhenContentTypeIsUnknown == nil { - invalidParams.Add(request.NewErrParamRequired("ForwardWhenContentTypeIsUnknown")) - } - if s.ContentTypeProfiles != nil { - if err := s.ContentTypeProfiles.Validate(); err != nil { - invalidParams.AddNested("ContentTypeProfiles", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContentTypeProfiles sets the ContentTypeProfiles field's value. -func (s *ContentTypeProfileConfig) SetContentTypeProfiles(v *ContentTypeProfiles) *ContentTypeProfileConfig { - s.ContentTypeProfiles = v - return s -} - -// SetForwardWhenContentTypeIsUnknown sets the ForwardWhenContentTypeIsUnknown field's value. -func (s *ContentTypeProfileConfig) SetForwardWhenContentTypeIsUnknown(v bool) *ContentTypeProfileConfig { - s.ForwardWhenContentTypeIsUnknown = &v - return s -} - -// Field-level encryption content type-profile. -type ContentTypeProfiles struct { - _ struct{} `type:"structure"` - - // Items in a field-level encryption content type-profile mapping. - Items []*ContentTypeProfile `locationNameList:"ContentTypeProfile" type:"list"` - - // The number of field-level encryption content type-profile mappings. - // - // Quantity is a required field - Quantity *int64 `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 ContentTypeProfiles) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ContentTypeProfiles) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ContentTypeProfiles) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ContentTypeProfiles"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *ContentTypeProfiles) SetItems(v []*ContentTypeProfile) *ContentTypeProfiles { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *ContentTypeProfiles) SetQuantity(v int64) *ContentTypeProfiles { - s.Quantity = &v - return s -} - -// A continuous deployment policy. -type ContinuousDeploymentPolicy struct { - _ struct{} `type:"structure"` - - // Contains the configuration for a continuous deployment policy. - // - // ContinuousDeploymentPolicyConfig is a required field - ContinuousDeploymentPolicyConfig *ContinuousDeploymentPolicyConfig `type:"structure" required:"true"` - - // The identifier of the continuous deployment policy. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The date and time the continuous deployment policy was last modified. - // - // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" 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 ContinuousDeploymentPolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ContinuousDeploymentPolicy) GoString() string { - return s.String() -} - -// SetContinuousDeploymentPolicyConfig sets the ContinuousDeploymentPolicyConfig field's value. -func (s *ContinuousDeploymentPolicy) SetContinuousDeploymentPolicyConfig(v *ContinuousDeploymentPolicyConfig) *ContinuousDeploymentPolicy { - s.ContinuousDeploymentPolicyConfig = v - return s -} - -// SetId sets the Id field's value. -func (s *ContinuousDeploymentPolicy) SetId(v string) *ContinuousDeploymentPolicy { - s.Id = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *ContinuousDeploymentPolicy) SetLastModifiedTime(v time.Time) *ContinuousDeploymentPolicy { - s.LastModifiedTime = &v - return s -} - -// Contains the configuration for a continuous deployment policy. -type ContinuousDeploymentPolicyConfig struct { - _ struct{} `type:"structure"` - - // A Boolean that indicates whether this continuous deployment policy is enabled - // (in effect). When this value is true, this policy is enabled and in effect. - // When this value is false, this policy is not enabled and has no effect. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` - - // The CloudFront domain name of the staging distribution. For example: d111111abcdef8.cloudfront.net. - // - // StagingDistributionDnsNames is a required field - StagingDistributionDnsNames *StagingDistributionDnsNames `type:"structure" required:"true"` - - // Contains the parameters for routing production traffic from your primary - // to staging distributions. - TrafficConfig *TrafficConfig `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 ContinuousDeploymentPolicyConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ContinuousDeploymentPolicyConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ContinuousDeploymentPolicyConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ContinuousDeploymentPolicyConfig"} - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - if s.StagingDistributionDnsNames == nil { - invalidParams.Add(request.NewErrParamRequired("StagingDistributionDnsNames")) - } - if s.StagingDistributionDnsNames != nil { - if err := s.StagingDistributionDnsNames.Validate(); err != nil { - invalidParams.AddNested("StagingDistributionDnsNames", err.(request.ErrInvalidParams)) - } - } - if s.TrafficConfig != nil { - if err := s.TrafficConfig.Validate(); err != nil { - invalidParams.AddNested("TrafficConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnabled sets the Enabled field's value. -func (s *ContinuousDeploymentPolicyConfig) SetEnabled(v bool) *ContinuousDeploymentPolicyConfig { - s.Enabled = &v - return s -} - -// SetStagingDistributionDnsNames sets the StagingDistributionDnsNames field's value. -func (s *ContinuousDeploymentPolicyConfig) SetStagingDistributionDnsNames(v *StagingDistributionDnsNames) *ContinuousDeploymentPolicyConfig { - s.StagingDistributionDnsNames = v - return s -} - -// SetTrafficConfig sets the TrafficConfig field's value. -func (s *ContinuousDeploymentPolicyConfig) SetTrafficConfig(v *TrafficConfig) *ContinuousDeploymentPolicyConfig { - s.TrafficConfig = v - return s -} - -// Contains a list of continuous deployment policies. -type ContinuousDeploymentPolicyList struct { - _ struct{} `type:"structure"` - - // A list of continuous deployment policy items. - Items []*ContinuousDeploymentPolicySummary `locationNameList:"ContinuousDeploymentPolicySummary" type:"list"` - - // The maximum number of continuous deployment policies that were specified - // in your request. - // - // MaxItems is a required field - MaxItems *int64 `type:"integer" required:"true"` - - // Indicates the next page of continuous deployment policies. To get the next - // page of the list, use this value in the Marker field of your request. - NextMarker *string `type:"string"` - - // The total number of continuous deployment policies in your Amazon Web Services - // account, regardless of the MaxItems value. - // - // Quantity is a required field - Quantity *int64 `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 ContinuousDeploymentPolicyList) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ContinuousDeploymentPolicyList) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *ContinuousDeploymentPolicyList) SetItems(v []*ContinuousDeploymentPolicySummary) *ContinuousDeploymentPolicyList { - s.Items = v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ContinuousDeploymentPolicyList) SetMaxItems(v int64) *ContinuousDeploymentPolicyList { - s.MaxItems = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ContinuousDeploymentPolicyList) SetNextMarker(v string) *ContinuousDeploymentPolicyList { - s.NextMarker = &v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *ContinuousDeploymentPolicyList) SetQuantity(v int64) *ContinuousDeploymentPolicyList { - s.Quantity = &v - return s -} - -// A summary of the information about your continuous deployment policies. -type ContinuousDeploymentPolicySummary struct { - _ struct{} `type:"structure"` - - // The continuous deployment policy. - // - // ContinuousDeploymentPolicy is a required field - ContinuousDeploymentPolicy *ContinuousDeploymentPolicy `type:"structure" 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 ContinuousDeploymentPolicySummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ContinuousDeploymentPolicySummary) GoString() string { - return s.String() -} - -// SetContinuousDeploymentPolicy sets the ContinuousDeploymentPolicy field's value. -func (s *ContinuousDeploymentPolicySummary) SetContinuousDeploymentPolicy(v *ContinuousDeploymentPolicy) *ContinuousDeploymentPolicySummary { - s.ContinuousDeploymentPolicy = v - return s -} - -// This configuration determines which HTTP requests are sent to the staging -// distribution. If the HTTP request contains a header and value that matches -// what you specify here, the request is sent to the staging distribution. Otherwise -// the request is sent to the primary distribution. -type ContinuousDeploymentSingleHeaderConfig struct { - _ struct{} `type:"structure"` - - // The request header name that you want CloudFront to send to your staging - // distribution. The header must contain the prefix aws-cf-cd-. - // - // Header is a required field - Header *string `type:"string" required:"true"` - - // The request header value. - // - // 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 ContinuousDeploymentSingleHeaderConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ContinuousDeploymentSingleHeaderConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ContinuousDeploymentSingleHeaderConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ContinuousDeploymentSingleHeaderConfig"} - if s.Header == nil { - invalidParams.Add(request.NewErrParamRequired("Header")) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHeader sets the Header field's value. -func (s *ContinuousDeploymentSingleHeaderConfig) SetHeader(v string) *ContinuousDeploymentSingleHeaderConfig { - s.Header = &v - return s -} - -// SetValue sets the Value field's value. -func (s *ContinuousDeploymentSingleHeaderConfig) SetValue(v string) *ContinuousDeploymentSingleHeaderConfig { - s.Value = &v - return s -} - -// Contains the percentage of traffic to send to a staging distribution. -type ContinuousDeploymentSingleWeightConfig struct { - _ struct{} `type:"structure"` - - // Session stickiness provides the ability to define multiple requests from - // a single viewer as a single session. This prevents the potentially inconsistent - // experience of sending some of a given user's requests to your staging distribution, - // while others are sent to your primary distribution. Define the session duration - // using TTL values. - SessionStickinessConfig *SessionStickinessConfig `type:"structure"` - - // The percentage of traffic to send to a staging distribution, expressed as - // a decimal number between 0 and 0.15. For example, a value of 0.10 means 10% - // of traffic is sent to the staging distribution. - // - // Weight is a required field - Weight *float64 `type:"float" 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 ContinuousDeploymentSingleWeightConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ContinuousDeploymentSingleWeightConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ContinuousDeploymentSingleWeightConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ContinuousDeploymentSingleWeightConfig"} - if s.Weight == nil { - invalidParams.Add(request.NewErrParamRequired("Weight")) - } - if s.SessionStickinessConfig != nil { - if err := s.SessionStickinessConfig.Validate(); err != nil { - invalidParams.AddNested("SessionStickinessConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSessionStickinessConfig sets the SessionStickinessConfig field's value. -func (s *ContinuousDeploymentSingleWeightConfig) SetSessionStickinessConfig(v *SessionStickinessConfig) *ContinuousDeploymentSingleWeightConfig { - s.SessionStickinessConfig = v - return s -} - -// SetWeight sets the Weight field's value. -func (s *ContinuousDeploymentSingleWeightConfig) SetWeight(v float64) *ContinuousDeploymentSingleWeightConfig { - s.Weight = &v - return s -} - -// Contains a list of cookie names. -type CookieNames struct { - _ struct{} `type:"structure"` - - // A list of cookie names. - Items []*string `locationNameList:"Name" type:"list"` - - // The number of cookie names in the Items list. - // - // Quantity is a required field - Quantity *int64 `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 CookieNames) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CookieNames) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CookieNames) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CookieNames"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *CookieNames) SetItems(v []*string) *CookieNames { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *CookieNames) SetQuantity(v int64) *CookieNames { - s.Quantity = &v - return s -} - -// This field is deprecated. We recommend that you use a cache policy or an -// origin request policy instead of this field. -// -// If you want to include cookies in the cache key, use CookiesConfig in a cache -// policy. See CachePolicy. -// -// If you want to send cookies to the origin but not include them in the cache -// key, use CookiesConfig in an origin request policy. See OriginRequestPolicy. -// -// A complex type that specifies whether you want CloudFront to forward cookies -// to the origin and, if so, which ones. For more information about forwarding -// cookies to the origin, see Caching Content Based on Cookies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Cookies.html) -// in the Amazon CloudFront Developer Guide. -type CookiePreference struct { - _ struct{} `type:"structure"` - - // This field is deprecated. We recommend that you use a cache policy or an - // origin request policy instead of this field. - // - // If you want to include cookies in the cache key, use a cache policy. For - // more information, see Creating cache policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) - // in the Amazon CloudFront Developer Guide. - // - // If you want to send cookies to the origin but not include them in the cache - // key, use origin request policy. For more information, see Creating origin - // request policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) - // in the Amazon CloudFront Developer Guide. - // - // Specifies which cookies to forward to the origin for this cache behavior: - // all, none, or the list of cookies specified in the WhitelistedNames complex - // type. - // - // Amazon S3 doesn't process cookies. When the cache behavior is forwarding - // requests to an Amazon S3 origin, specify none for the Forward element. - // - // Forward is a required field - Forward *string `type:"string" required:"true" enum:"ItemSelection"` - - // This field is deprecated. We recommend that you use a cache policy or an - // origin request policy instead of this field. - // - // If you want to include cookies in the cache key, use a cache policy. For - // more information, see Creating cache policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) - // in the Amazon CloudFront Developer Guide. - // - // If you want to send cookies to the origin but not include them in the cache - // key, use an origin request policy. For more information, see Creating origin - // request policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) - // in the Amazon CloudFront Developer Guide. - // - // Required if you specify whitelist for the value of Forward. A complex type - // that specifies how many different cookies you want CloudFront to forward - // to the origin for this cache behavior and, if you want to forward selected - // cookies, the names of those cookies. - // - // If you specify all or none for the value of Forward, omit WhitelistedNames. - // If you change the value of Forward from whitelist to all or none and you - // don't delete the WhitelistedNames element and its child elements, CloudFront - // deletes them automatically. - // - // For the current limit on the number of cookie names that you can whitelist - // for each cache behavior, see CloudFront Limits (https://docs.aws.amazon.com/general/latest/gr/xrefaws_service_limits.html#limits_cloudfront) - // in the Amazon Web Services General Reference. - WhitelistedNames *CookieNames `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 CookiePreference) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CookiePreference) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CookiePreference) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CookiePreference"} - if s.Forward == nil { - invalidParams.Add(request.NewErrParamRequired("Forward")) - } - if s.WhitelistedNames != nil { - if err := s.WhitelistedNames.Validate(); err != nil { - invalidParams.AddNested("WhitelistedNames", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetForward sets the Forward field's value. -func (s *CookiePreference) SetForward(v string) *CookiePreference { - s.Forward = &v - return s -} - -// SetWhitelistedNames sets the WhitelistedNames field's value. -func (s *CookiePreference) SetWhitelistedNames(v *CookieNames) *CookiePreference { - s.WhitelistedNames = v - return s -} - -type CopyDistributionInput struct { - _ struct{} `locationName:"CopyDistributionRequest" type:"structure" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` - - // A value that uniquely identifies a request to create a resource. This helps - // to prevent CloudFront from creating a duplicate resource if you accidentally - // resubmit an identical request. - // - // CallerReference is a required field - CallerReference *string `type:"string" required:"true"` - - // A Boolean flag to specify the state of the staging distribution when it's - // created. When you set this value to True, the staging distribution is enabled. - // When you set this value to False, the staging distribution is disabled. - // - // If you omit this field, the default value is True. - Enabled *bool `type:"boolean"` - - // The version identifier of the primary distribution whose configuration you - // are copying. This is the ETag value returned in the response to GetDistribution - // and GetDistributionConfig. - IfMatch *string `location:"header" locationName:"If-Match" type:"string"` - - // The identifier of the primary distribution whose configuration you are copying. - // To get a distribution ID, use ListDistributions. - // - // PrimaryDistributionId is a required field - PrimaryDistributionId *string `location:"uri" locationName:"PrimaryDistributionId" type:"string" required:"true"` - - // The type of distribution that your primary distribution will be copied to. - // The only valid value is True, indicating that you are copying to a staging - // distribution. - Staging *bool `location:"header" locationName:"Staging" 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 CopyDistributionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CopyDistributionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CopyDistributionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CopyDistributionInput"} - if s.CallerReference == nil { - invalidParams.Add(request.NewErrParamRequired("CallerReference")) - } - if s.PrimaryDistributionId == nil { - invalidParams.Add(request.NewErrParamRequired("PrimaryDistributionId")) - } - if s.PrimaryDistributionId != nil && len(*s.PrimaryDistributionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PrimaryDistributionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCallerReference sets the CallerReference field's value. -func (s *CopyDistributionInput) SetCallerReference(v string) *CopyDistributionInput { - s.CallerReference = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *CopyDistributionInput) SetEnabled(v bool) *CopyDistributionInput { - s.Enabled = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *CopyDistributionInput) SetIfMatch(v string) *CopyDistributionInput { - s.IfMatch = &v - return s -} - -// SetPrimaryDistributionId sets the PrimaryDistributionId field's value. -func (s *CopyDistributionInput) SetPrimaryDistributionId(v string) *CopyDistributionInput { - s.PrimaryDistributionId = &v - return s -} - -// SetStaging sets the Staging field's value. -func (s *CopyDistributionInput) SetStaging(v bool) *CopyDistributionInput { - s.Staging = &v - return s -} - -type CopyDistributionOutput struct { - _ struct{} `type:"structure" payload:"Distribution"` - - // A distribution tells CloudFront where you want content to be delivered from, - // and the details about how to track and manage content delivery. - Distribution *Distribution `type:"structure"` - - // The version identifier for the current version of the staging distribution. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The URL of the staging distribution. - Location *string `location:"header" locationName:"Location" 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 CopyDistributionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CopyDistributionOutput) GoString() string { - return s.String() -} - -// SetDistribution sets the Distribution field's value. -func (s *CopyDistributionOutput) SetDistribution(v *Distribution) *CopyDistributionOutput { - s.Distribution = v - return s -} - -// SetETag sets the ETag field's value. -func (s *CopyDistributionOutput) SetETag(v string) *CopyDistributionOutput { - s.ETag = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *CopyDistributionOutput) SetLocation(v string) *CopyDistributionOutput { - s.Location = &v - return s -} - -type CreateCachePolicyInput struct { - _ struct{} `locationName:"CreateCachePolicyRequest" type:"structure" payload:"CachePolicyConfig"` - - // A cache policy configuration. - // - // CachePolicyConfig is a required field - CachePolicyConfig *CachePolicyConfig `locationName:"CachePolicyConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateCachePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateCachePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateCachePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateCachePolicyInput"} - if s.CachePolicyConfig == nil { - invalidParams.Add(request.NewErrParamRequired("CachePolicyConfig")) - } - if s.CachePolicyConfig != nil { - if err := s.CachePolicyConfig.Validate(); err != nil { - invalidParams.AddNested("CachePolicyConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCachePolicyConfig sets the CachePolicyConfig field's value. -func (s *CreateCachePolicyInput) SetCachePolicyConfig(v *CachePolicyConfig) *CreateCachePolicyInput { - s.CachePolicyConfig = v - return s -} - -type CreateCachePolicyOutput struct { - _ struct{} `type:"structure" payload:"CachePolicy"` - - // A cache policy. - CachePolicy *CachePolicy `type:"structure"` - - // The current version of the cache policy. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The fully qualified URI of the cache policy just created. - Location *string `location:"header" locationName:"Location" 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 CreateCachePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateCachePolicyOutput) GoString() string { - return s.String() -} - -// SetCachePolicy sets the CachePolicy field's value. -func (s *CreateCachePolicyOutput) SetCachePolicy(v *CachePolicy) *CreateCachePolicyOutput { - s.CachePolicy = v - return s -} - -// SetETag sets the ETag field's value. -func (s *CreateCachePolicyOutput) SetETag(v string) *CreateCachePolicyOutput { - s.ETag = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateCachePolicyOutput) SetLocation(v string) *CreateCachePolicyOutput { - s.Location = &v - return s -} - -// The request to create a new origin access identity (OAI). An origin access -// identity is a special CloudFront user that you can associate with Amazon -// S3 origins, so that you can secure all or just some of your Amazon S3 content. -// For more information, see Restricting Access to Amazon S3 Content by Using -// an Origin Access Identity (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html) -// in the Amazon CloudFront Developer Guide. -type CreateCloudFrontOriginAccessIdentityInput struct { - _ struct{} `locationName:"CreateCloudFrontOriginAccessIdentityRequest" type:"structure" payload:"CloudFrontOriginAccessIdentityConfig"` - - // The current configuration information for the identity. - // - // CloudFrontOriginAccessIdentityConfig is a required field - CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `locationName:"CloudFrontOriginAccessIdentityConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateCloudFrontOriginAccessIdentityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateCloudFrontOriginAccessIdentityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateCloudFrontOriginAccessIdentityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateCloudFrontOriginAccessIdentityInput"} - if s.CloudFrontOriginAccessIdentityConfig == nil { - invalidParams.Add(request.NewErrParamRequired("CloudFrontOriginAccessIdentityConfig")) - } - if s.CloudFrontOriginAccessIdentityConfig != nil { - if err := s.CloudFrontOriginAccessIdentityConfig.Validate(); err != nil { - invalidParams.AddNested("CloudFrontOriginAccessIdentityConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCloudFrontOriginAccessIdentityConfig sets the CloudFrontOriginAccessIdentityConfig field's value. -func (s *CreateCloudFrontOriginAccessIdentityInput) SetCloudFrontOriginAccessIdentityConfig(v *OriginAccessIdentityConfig) *CreateCloudFrontOriginAccessIdentityInput { - s.CloudFrontOriginAccessIdentityConfig = v - return s -} - -// The returned result of the corresponding request. -type CreateCloudFrontOriginAccessIdentityOutput struct { - _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentity"` - - // The origin access identity's information. - CloudFrontOriginAccessIdentity *OriginAccessIdentity `type:"structure"` - - // The current version of the origin access identity created. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The fully qualified URI of the new origin access identity just created. - Location *string `location:"header" locationName:"Location" 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 CreateCloudFrontOriginAccessIdentityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateCloudFrontOriginAccessIdentityOutput) GoString() string { - return s.String() -} - -// SetCloudFrontOriginAccessIdentity sets the CloudFrontOriginAccessIdentity field's value. -func (s *CreateCloudFrontOriginAccessIdentityOutput) SetCloudFrontOriginAccessIdentity(v *OriginAccessIdentity) *CreateCloudFrontOriginAccessIdentityOutput { - s.CloudFrontOriginAccessIdentity = v - return s -} - -// SetETag sets the ETag field's value. -func (s *CreateCloudFrontOriginAccessIdentityOutput) SetETag(v string) *CreateCloudFrontOriginAccessIdentityOutput { - s.ETag = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateCloudFrontOriginAccessIdentityOutput) SetLocation(v string) *CreateCloudFrontOriginAccessIdentityOutput { - s.Location = &v - return s -} - -type CreateContinuousDeploymentPolicyInput struct { - _ struct{} `locationName:"CreateContinuousDeploymentPolicyRequest" type:"structure" payload:"ContinuousDeploymentPolicyConfig"` - - // Contains the configuration for a continuous deployment policy. - // - // ContinuousDeploymentPolicyConfig is a required field - ContinuousDeploymentPolicyConfig *ContinuousDeploymentPolicyConfig `locationName:"ContinuousDeploymentPolicyConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateContinuousDeploymentPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateContinuousDeploymentPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateContinuousDeploymentPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateContinuousDeploymentPolicyInput"} - if s.ContinuousDeploymentPolicyConfig == nil { - invalidParams.Add(request.NewErrParamRequired("ContinuousDeploymentPolicyConfig")) - } - if s.ContinuousDeploymentPolicyConfig != nil { - if err := s.ContinuousDeploymentPolicyConfig.Validate(); err != nil { - invalidParams.AddNested("ContinuousDeploymentPolicyConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContinuousDeploymentPolicyConfig sets the ContinuousDeploymentPolicyConfig field's value. -func (s *CreateContinuousDeploymentPolicyInput) SetContinuousDeploymentPolicyConfig(v *ContinuousDeploymentPolicyConfig) *CreateContinuousDeploymentPolicyInput { - s.ContinuousDeploymentPolicyConfig = v - return s -} - -type CreateContinuousDeploymentPolicyOutput struct { - _ struct{} `type:"structure" payload:"ContinuousDeploymentPolicy"` - - // A continuous deployment policy. - ContinuousDeploymentPolicy *ContinuousDeploymentPolicy `type:"structure"` - - // The version identifier for the current version of the continuous deployment - // policy. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The location of the continuous deployment policy. - Location *string `location:"header" locationName:"Location" 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 CreateContinuousDeploymentPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateContinuousDeploymentPolicyOutput) GoString() string { - return s.String() -} - -// SetContinuousDeploymentPolicy sets the ContinuousDeploymentPolicy field's value. -func (s *CreateContinuousDeploymentPolicyOutput) SetContinuousDeploymentPolicy(v *ContinuousDeploymentPolicy) *CreateContinuousDeploymentPolicyOutput { - s.ContinuousDeploymentPolicy = v - return s -} - -// SetETag sets the ETag field's value. -func (s *CreateContinuousDeploymentPolicyOutput) SetETag(v string) *CreateContinuousDeploymentPolicyOutput { - s.ETag = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateContinuousDeploymentPolicyOutput) SetLocation(v string) *CreateContinuousDeploymentPolicyOutput { - s.Location = &v - return s -} - -// The request to create a new distribution. -type CreateDistributionInput struct { - _ struct{} `locationName:"CreateDistributionRequest" type:"structure" payload:"DistributionConfig"` - - // The distribution's configuration information. - // - // DistributionConfig is a required field - DistributionConfig *DistributionConfig `locationName:"DistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateDistributionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateDistributionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDistributionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDistributionInput"} - if s.DistributionConfig == nil { - invalidParams.Add(request.NewErrParamRequired("DistributionConfig")) - } - if s.DistributionConfig != nil { - if err := s.DistributionConfig.Validate(); err != nil { - invalidParams.AddNested("DistributionConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDistributionConfig sets the DistributionConfig field's value. -func (s *CreateDistributionInput) SetDistributionConfig(v *DistributionConfig) *CreateDistributionInput { - s.DistributionConfig = v - return s -} - -// The returned result of the corresponding request. -type CreateDistributionOutput struct { - _ struct{} `type:"structure" payload:"Distribution"` - - // The distribution's information. - Distribution *Distribution `type:"structure"` - - // The current version of the distribution created. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The fully qualified URI of the new distribution resource just created. - Location *string `location:"header" locationName:"Location" 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 CreateDistributionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateDistributionOutput) GoString() string { - return s.String() -} - -// SetDistribution sets the Distribution field's value. -func (s *CreateDistributionOutput) SetDistribution(v *Distribution) *CreateDistributionOutput { - s.Distribution = v - return s -} - -// SetETag sets the ETag field's value. -func (s *CreateDistributionOutput) SetETag(v string) *CreateDistributionOutput { - s.ETag = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateDistributionOutput) SetLocation(v string) *CreateDistributionOutput { - s.Location = &v - return s -} - -// The request to create a new distribution with tags. -type CreateDistributionWithTagsInput struct { - _ struct{} `locationName:"CreateDistributionWithTagsRequest" type:"structure" payload:"DistributionConfigWithTags"` - - // The distribution's configuration information. - // - // DistributionConfigWithTags is a required field - DistributionConfigWithTags *DistributionConfigWithTags `locationName:"DistributionConfigWithTags" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateDistributionWithTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateDistributionWithTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDistributionWithTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDistributionWithTagsInput"} - if s.DistributionConfigWithTags == nil { - invalidParams.Add(request.NewErrParamRequired("DistributionConfigWithTags")) - } - if s.DistributionConfigWithTags != nil { - if err := s.DistributionConfigWithTags.Validate(); err != nil { - invalidParams.AddNested("DistributionConfigWithTags", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDistributionConfigWithTags sets the DistributionConfigWithTags field's value. -func (s *CreateDistributionWithTagsInput) SetDistributionConfigWithTags(v *DistributionConfigWithTags) *CreateDistributionWithTagsInput { - s.DistributionConfigWithTags = v - return s -} - -// The returned result of the corresponding request. -type CreateDistributionWithTagsOutput struct { - _ struct{} `type:"structure" payload:"Distribution"` - - // The distribution's information. - Distribution *Distribution `type:"structure"` - - // The current version of the distribution created. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The fully qualified URI of the new distribution resource just created. - Location *string `location:"header" locationName:"Location" 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 CreateDistributionWithTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateDistributionWithTagsOutput) GoString() string { - return s.String() -} - -// SetDistribution sets the Distribution field's value. -func (s *CreateDistributionWithTagsOutput) SetDistribution(v *Distribution) *CreateDistributionWithTagsOutput { - s.Distribution = v - return s -} - -// SetETag sets the ETag field's value. -func (s *CreateDistributionWithTagsOutput) SetETag(v string) *CreateDistributionWithTagsOutput { - s.ETag = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateDistributionWithTagsOutput) SetLocation(v string) *CreateDistributionWithTagsOutput { - s.Location = &v - return s -} - -type CreateFieldLevelEncryptionConfigInput struct { - _ struct{} `locationName:"CreateFieldLevelEncryptionConfigRequest" type:"structure" payload:"FieldLevelEncryptionConfig"` - - // The request to create a new field-level encryption configuration. - // - // FieldLevelEncryptionConfig is a required field - FieldLevelEncryptionConfig *FieldLevelEncryptionConfig `locationName:"FieldLevelEncryptionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateFieldLevelEncryptionConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateFieldLevelEncryptionConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateFieldLevelEncryptionConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateFieldLevelEncryptionConfigInput"} - if s.FieldLevelEncryptionConfig == nil { - invalidParams.Add(request.NewErrParamRequired("FieldLevelEncryptionConfig")) - } - if s.FieldLevelEncryptionConfig != nil { - if err := s.FieldLevelEncryptionConfig.Validate(); err != nil { - invalidParams.AddNested("FieldLevelEncryptionConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFieldLevelEncryptionConfig sets the FieldLevelEncryptionConfig field's value. -func (s *CreateFieldLevelEncryptionConfigInput) SetFieldLevelEncryptionConfig(v *FieldLevelEncryptionConfig) *CreateFieldLevelEncryptionConfigInput { - s.FieldLevelEncryptionConfig = v - return s -} - -type CreateFieldLevelEncryptionConfigOutput struct { - _ struct{} `type:"structure" payload:"FieldLevelEncryption"` - - // The current version of the field level encryption configuration. For example: - // E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // Returned when you create a new field-level encryption configuration. - FieldLevelEncryption *FieldLevelEncryption `type:"structure"` - - // The fully qualified URI of the new configuration resource just created. - Location *string `location:"header" locationName:"Location" 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 CreateFieldLevelEncryptionConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateFieldLevelEncryptionConfigOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *CreateFieldLevelEncryptionConfigOutput) SetETag(v string) *CreateFieldLevelEncryptionConfigOutput { - s.ETag = &v - return s -} - -// SetFieldLevelEncryption sets the FieldLevelEncryption field's value. -func (s *CreateFieldLevelEncryptionConfigOutput) SetFieldLevelEncryption(v *FieldLevelEncryption) *CreateFieldLevelEncryptionConfigOutput { - s.FieldLevelEncryption = v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateFieldLevelEncryptionConfigOutput) SetLocation(v string) *CreateFieldLevelEncryptionConfigOutput { - s.Location = &v - return s -} - -type CreateFieldLevelEncryptionProfileInput struct { - _ struct{} `locationName:"CreateFieldLevelEncryptionProfileRequest" type:"structure" payload:"FieldLevelEncryptionProfileConfig"` - - // The request to create a field-level encryption profile. - // - // FieldLevelEncryptionProfileConfig is a required field - FieldLevelEncryptionProfileConfig *FieldLevelEncryptionProfileConfig `locationName:"FieldLevelEncryptionProfileConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateFieldLevelEncryptionProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateFieldLevelEncryptionProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateFieldLevelEncryptionProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateFieldLevelEncryptionProfileInput"} - if s.FieldLevelEncryptionProfileConfig == nil { - invalidParams.Add(request.NewErrParamRequired("FieldLevelEncryptionProfileConfig")) - } - if s.FieldLevelEncryptionProfileConfig != nil { - if err := s.FieldLevelEncryptionProfileConfig.Validate(); err != nil { - invalidParams.AddNested("FieldLevelEncryptionProfileConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFieldLevelEncryptionProfileConfig sets the FieldLevelEncryptionProfileConfig field's value. -func (s *CreateFieldLevelEncryptionProfileInput) SetFieldLevelEncryptionProfileConfig(v *FieldLevelEncryptionProfileConfig) *CreateFieldLevelEncryptionProfileInput { - s.FieldLevelEncryptionProfileConfig = v - return s -} - -type CreateFieldLevelEncryptionProfileOutput struct { - _ struct{} `type:"structure" payload:"FieldLevelEncryptionProfile"` - - // The current version of the field level encryption profile. For example: E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // Returned when you create a new field-level encryption profile. - FieldLevelEncryptionProfile *FieldLevelEncryptionProfile `type:"structure"` - - // The fully qualified URI of the new profile resource just created. - Location *string `location:"header" locationName:"Location" 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 CreateFieldLevelEncryptionProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateFieldLevelEncryptionProfileOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *CreateFieldLevelEncryptionProfileOutput) SetETag(v string) *CreateFieldLevelEncryptionProfileOutput { - s.ETag = &v - return s -} - -// SetFieldLevelEncryptionProfile sets the FieldLevelEncryptionProfile field's value. -func (s *CreateFieldLevelEncryptionProfileOutput) SetFieldLevelEncryptionProfile(v *FieldLevelEncryptionProfile) *CreateFieldLevelEncryptionProfileOutput { - s.FieldLevelEncryptionProfile = v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateFieldLevelEncryptionProfileOutput) SetLocation(v string) *CreateFieldLevelEncryptionProfileOutput { - s.Location = &v - return s -} - -type CreateFunctionInput struct { - _ struct{} `locationName:"CreateFunctionRequest" type:"structure" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` - - // The function code. For more information about writing a CloudFront function, - // see Writing function code for CloudFront Functions (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/writing-function-code.html) - // in the Amazon CloudFront Developer Guide. - // - // FunctionCode is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by CreateFunctionInput's - // String and GoString methods. - // - // FunctionCode is automatically base64 encoded/decoded by the SDK. - // - // FunctionCode is a required field - FunctionCode []byte `min:"1" type:"blob" required:"true" sensitive:"true"` - - // Configuration information about the function, including an optional comment - // and the function's runtime. - // - // FunctionConfig is a required field - FunctionConfig *FunctionConfig `type:"structure" required:"true"` - - // A name to identify the function. - // - // Name is a required field - Name *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 CreateFunctionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateFunctionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateFunctionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateFunctionInput"} - if s.FunctionCode == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionCode")) - } - if s.FunctionCode != nil && len(s.FunctionCode) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionCode", 1)) - } - if s.FunctionConfig == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionConfig")) - } - 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.FunctionConfig != nil { - if err := s.FunctionConfig.Validate(); err != nil { - invalidParams.AddNested("FunctionConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFunctionCode sets the FunctionCode field's value. -func (s *CreateFunctionInput) SetFunctionCode(v []byte) *CreateFunctionInput { - s.FunctionCode = v - return s -} - -// SetFunctionConfig sets the FunctionConfig field's value. -func (s *CreateFunctionInput) SetFunctionConfig(v *FunctionConfig) *CreateFunctionInput { - s.FunctionConfig = v - return s -} - -// SetName sets the Name field's value. -func (s *CreateFunctionInput) SetName(v string) *CreateFunctionInput { - s.Name = &v - return s -} - -type CreateFunctionOutput struct { - _ struct{} `type:"structure" payload:"FunctionSummary"` - - // The version identifier for the current version of the CloudFront function. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // Contains configuration information and metadata about a CloudFront function. - FunctionSummary *FunctionSummary `type:"structure"` - - // The URL of the CloudFront function. Use the URL to manage the function with - // the CloudFront API. - Location *string `location:"header" locationName:"Location" 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 CreateFunctionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateFunctionOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *CreateFunctionOutput) SetETag(v string) *CreateFunctionOutput { - s.ETag = &v - return s -} - -// SetFunctionSummary sets the FunctionSummary field's value. -func (s *CreateFunctionOutput) SetFunctionSummary(v *FunctionSummary) *CreateFunctionOutput { - s.FunctionSummary = v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateFunctionOutput) SetLocation(v string) *CreateFunctionOutput { - s.Location = &v - return s -} - -// The request to create an invalidation. -type CreateInvalidationInput struct { - _ struct{} `locationName:"CreateInvalidationRequest" type:"structure" payload:"InvalidationBatch"` - - // The distribution's id. - // - // DistributionId is a required field - DistributionId *string `location:"uri" locationName:"DistributionId" type:"string" required:"true"` - - // The batch information for the invalidation. - // - // InvalidationBatch is a required field - InvalidationBatch *InvalidationBatch `locationName:"InvalidationBatch" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateInvalidationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateInvalidationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateInvalidationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateInvalidationInput"} - if s.DistributionId == nil { - invalidParams.Add(request.NewErrParamRequired("DistributionId")) - } - if s.DistributionId != nil && len(*s.DistributionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DistributionId", 1)) - } - if s.InvalidationBatch == nil { - invalidParams.Add(request.NewErrParamRequired("InvalidationBatch")) - } - if s.InvalidationBatch != nil { - if err := s.InvalidationBatch.Validate(); err != nil { - invalidParams.AddNested("InvalidationBatch", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDistributionId sets the DistributionId field's value. -func (s *CreateInvalidationInput) SetDistributionId(v string) *CreateInvalidationInput { - s.DistributionId = &v - return s -} - -// SetInvalidationBatch sets the InvalidationBatch field's value. -func (s *CreateInvalidationInput) SetInvalidationBatch(v *InvalidationBatch) *CreateInvalidationInput { - s.InvalidationBatch = v - return s -} - -// The returned result of the corresponding request. -type CreateInvalidationOutput struct { - _ struct{} `type:"structure" payload:"Invalidation"` - - // The invalidation's information. - Invalidation *Invalidation `type:"structure"` - - // The fully qualified URI of the distribution and invalidation batch request, - // including the Invalidation ID. - Location *string `location:"header" locationName:"Location" 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 CreateInvalidationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateInvalidationOutput) GoString() string { - return s.String() -} - -// SetInvalidation sets the Invalidation field's value. -func (s *CreateInvalidationOutput) SetInvalidation(v *Invalidation) *CreateInvalidationOutput { - s.Invalidation = v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateInvalidationOutput) SetLocation(v string) *CreateInvalidationOutput { - s.Location = &v - return s -} - -type CreateKeyGroupInput struct { - _ struct{} `locationName:"CreateKeyGroupRequest" type:"structure" payload:"KeyGroupConfig"` - - // A key group configuration. - // - // KeyGroupConfig is a required field - KeyGroupConfig *KeyGroupConfig `locationName:"KeyGroupConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateKeyGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateKeyGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateKeyGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateKeyGroupInput"} - if s.KeyGroupConfig == nil { - invalidParams.Add(request.NewErrParamRequired("KeyGroupConfig")) - } - if s.KeyGroupConfig != nil { - if err := s.KeyGroupConfig.Validate(); err != nil { - invalidParams.AddNested("KeyGroupConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyGroupConfig sets the KeyGroupConfig field's value. -func (s *CreateKeyGroupInput) SetKeyGroupConfig(v *KeyGroupConfig) *CreateKeyGroupInput { - s.KeyGroupConfig = v - return s -} - -type CreateKeyGroupOutput struct { - _ struct{} `type:"structure" payload:"KeyGroup"` - - // The identifier for this version of the key group. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The key group that was just created. - KeyGroup *KeyGroup `type:"structure"` - - // The URL of the key group. - Location *string `location:"header" locationName:"Location" 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 CreateKeyGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateKeyGroupOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *CreateKeyGroupOutput) SetETag(v string) *CreateKeyGroupOutput { - s.ETag = &v - return s -} - -// SetKeyGroup sets the KeyGroup field's value. -func (s *CreateKeyGroupOutput) SetKeyGroup(v *KeyGroup) *CreateKeyGroupOutput { - s.KeyGroup = v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateKeyGroupOutput) SetLocation(v string) *CreateKeyGroupOutput { - s.Location = &v - return s -} - -type CreateKeyValueStoreInput struct { - _ struct{} `locationName:"CreateKeyValueStoreRequest" type:"structure" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` - - // The comment of the key value store. - Comment *string `type:"string"` - - // The S3 bucket that provides the source for the import. The source must be - // in a valid JSON format. - ImportSource *ImportSource `type:"structure"` - - // The name of the key value store. The minimum length is 1 character and the - // maximum length is 64 characters. - // - // Name is a required field - Name *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 CreateKeyValueStoreInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateKeyValueStoreInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateKeyValueStoreInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateKeyValueStoreInput"} - 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.ImportSource != nil { - if err := s.ImportSource.Validate(); err != nil { - invalidParams.AddNested("ImportSource", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComment sets the Comment field's value. -func (s *CreateKeyValueStoreInput) SetComment(v string) *CreateKeyValueStoreInput { - s.Comment = &v - return s -} - -// SetImportSource sets the ImportSource field's value. -func (s *CreateKeyValueStoreInput) SetImportSource(v *ImportSource) *CreateKeyValueStoreInput { - s.ImportSource = v - return s -} - -// SetName sets the Name field's value. -func (s *CreateKeyValueStoreInput) SetName(v string) *CreateKeyValueStoreInput { - s.Name = &v - return s -} - -type CreateKeyValueStoreOutput struct { - _ struct{} `type:"structure" payload:"KeyValueStore"` - - // The ETag in the resulting key value store. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The resulting key value store. - KeyValueStore *KeyValueStore `type:"structure"` - - // The location of the resulting key value store. - Location *string `location:"header" locationName:"Location" 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 CreateKeyValueStoreOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateKeyValueStoreOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *CreateKeyValueStoreOutput) SetETag(v string) *CreateKeyValueStoreOutput { - s.ETag = &v - return s -} - -// SetKeyValueStore sets the KeyValueStore field's value. -func (s *CreateKeyValueStoreOutput) SetKeyValueStore(v *KeyValueStore) *CreateKeyValueStoreOutput { - s.KeyValueStore = v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateKeyValueStoreOutput) SetLocation(v string) *CreateKeyValueStoreOutput { - s.Location = &v - return s -} - -type CreateMonitoringSubscriptionInput struct { - _ struct{} `locationName:"CreateMonitoringSubscriptionRequest" type:"structure" payload:"MonitoringSubscription"` - - // The ID of the distribution that you are enabling metrics for. - // - // DistributionId is a required field - DistributionId *string `location:"uri" locationName:"DistributionId" type:"string" required:"true"` - - // A monitoring subscription. This structure contains information about whether - // additional CloudWatch metrics are enabled for a given CloudFront distribution. - // - // MonitoringSubscription is a required field - MonitoringSubscription *MonitoringSubscription `locationName:"MonitoringSubscription" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateMonitoringSubscriptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateMonitoringSubscriptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateMonitoringSubscriptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateMonitoringSubscriptionInput"} - if s.DistributionId == nil { - invalidParams.Add(request.NewErrParamRequired("DistributionId")) - } - if s.DistributionId != nil && len(*s.DistributionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DistributionId", 1)) - } - if s.MonitoringSubscription == nil { - invalidParams.Add(request.NewErrParamRequired("MonitoringSubscription")) - } - if s.MonitoringSubscription != nil { - if err := s.MonitoringSubscription.Validate(); err != nil { - invalidParams.AddNested("MonitoringSubscription", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDistributionId sets the DistributionId field's value. -func (s *CreateMonitoringSubscriptionInput) SetDistributionId(v string) *CreateMonitoringSubscriptionInput { - s.DistributionId = &v - return s -} - -// SetMonitoringSubscription sets the MonitoringSubscription field's value. -func (s *CreateMonitoringSubscriptionInput) SetMonitoringSubscription(v *MonitoringSubscription) *CreateMonitoringSubscriptionInput { - s.MonitoringSubscription = v - return s -} - -type CreateMonitoringSubscriptionOutput struct { - _ struct{} `type:"structure" payload:"MonitoringSubscription"` - - // A monitoring subscription. This structure contains information about whether - // additional CloudWatch metrics are enabled for a given CloudFront distribution. - MonitoringSubscription *MonitoringSubscription `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 CreateMonitoringSubscriptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateMonitoringSubscriptionOutput) GoString() string { - return s.String() -} - -// SetMonitoringSubscription sets the MonitoringSubscription field's value. -func (s *CreateMonitoringSubscriptionOutput) SetMonitoringSubscription(v *MonitoringSubscription) *CreateMonitoringSubscriptionOutput { - s.MonitoringSubscription = v - return s -} - -type CreateOriginAccessControlInput struct { - _ struct{} `locationName:"CreateOriginAccessControlRequest" type:"structure" payload:"OriginAccessControlConfig"` - - // Contains the origin access control. - // - // OriginAccessControlConfig is a required field - OriginAccessControlConfig *OriginAccessControlConfig `locationName:"OriginAccessControlConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateOriginAccessControlInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateOriginAccessControlInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateOriginAccessControlInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateOriginAccessControlInput"} - if s.OriginAccessControlConfig == nil { - invalidParams.Add(request.NewErrParamRequired("OriginAccessControlConfig")) - } - if s.OriginAccessControlConfig != nil { - if err := s.OriginAccessControlConfig.Validate(); err != nil { - invalidParams.AddNested("OriginAccessControlConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOriginAccessControlConfig sets the OriginAccessControlConfig field's value. -func (s *CreateOriginAccessControlInput) SetOriginAccessControlConfig(v *OriginAccessControlConfig) *CreateOriginAccessControlInput { - s.OriginAccessControlConfig = v - return s -} - -type CreateOriginAccessControlOutput struct { - _ struct{} `type:"structure" payload:"OriginAccessControl"` - - // The version identifier for the current version of the origin access control. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The URL of the origin access control. - Location *string `location:"header" locationName:"Location" type:"string"` - - // Contains an origin access control. - OriginAccessControl *OriginAccessControl `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 CreateOriginAccessControlOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateOriginAccessControlOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *CreateOriginAccessControlOutput) SetETag(v string) *CreateOriginAccessControlOutput { - s.ETag = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateOriginAccessControlOutput) SetLocation(v string) *CreateOriginAccessControlOutput { - s.Location = &v - return s -} - -// SetOriginAccessControl sets the OriginAccessControl field's value. -func (s *CreateOriginAccessControlOutput) SetOriginAccessControl(v *OriginAccessControl) *CreateOriginAccessControlOutput { - s.OriginAccessControl = v - return s -} - -type CreateOriginRequestPolicyInput struct { - _ struct{} `locationName:"CreateOriginRequestPolicyRequest" type:"structure" payload:"OriginRequestPolicyConfig"` - - // An origin request policy configuration. - // - // OriginRequestPolicyConfig is a required field - OriginRequestPolicyConfig *OriginRequestPolicyConfig `locationName:"OriginRequestPolicyConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateOriginRequestPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateOriginRequestPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateOriginRequestPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateOriginRequestPolicyInput"} - if s.OriginRequestPolicyConfig == nil { - invalidParams.Add(request.NewErrParamRequired("OriginRequestPolicyConfig")) - } - if s.OriginRequestPolicyConfig != nil { - if err := s.OriginRequestPolicyConfig.Validate(); err != nil { - invalidParams.AddNested("OriginRequestPolicyConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOriginRequestPolicyConfig sets the OriginRequestPolicyConfig field's value. -func (s *CreateOriginRequestPolicyInput) SetOriginRequestPolicyConfig(v *OriginRequestPolicyConfig) *CreateOriginRequestPolicyInput { - s.OriginRequestPolicyConfig = v - return s -} - -type CreateOriginRequestPolicyOutput struct { - _ struct{} `type:"structure" payload:"OriginRequestPolicy"` - - // The current version of the origin request policy. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The fully qualified URI of the origin request policy just created. - Location *string `location:"header" locationName:"Location" type:"string"` - - // An origin request policy. - OriginRequestPolicy *OriginRequestPolicy `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 CreateOriginRequestPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateOriginRequestPolicyOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *CreateOriginRequestPolicyOutput) SetETag(v string) *CreateOriginRequestPolicyOutput { - s.ETag = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateOriginRequestPolicyOutput) SetLocation(v string) *CreateOriginRequestPolicyOutput { - s.Location = &v - return s -} - -// SetOriginRequestPolicy sets the OriginRequestPolicy field's value. -func (s *CreateOriginRequestPolicyOutput) SetOriginRequestPolicy(v *OriginRequestPolicy) *CreateOriginRequestPolicyOutput { - s.OriginRequestPolicy = v - return s -} - -type CreatePublicKeyInput struct { - _ struct{} `locationName:"CreatePublicKeyRequest" type:"structure" payload:"PublicKeyConfig"` - - // A CloudFront public key configuration. - // - // PublicKeyConfig is a required field - PublicKeyConfig *PublicKeyConfig `locationName:"PublicKeyConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreatePublicKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreatePublicKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePublicKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePublicKeyInput"} - if s.PublicKeyConfig == nil { - invalidParams.Add(request.NewErrParamRequired("PublicKeyConfig")) - } - if s.PublicKeyConfig != nil { - if err := s.PublicKeyConfig.Validate(); err != nil { - invalidParams.AddNested("PublicKeyConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPublicKeyConfig sets the PublicKeyConfig field's value. -func (s *CreatePublicKeyInput) SetPublicKeyConfig(v *PublicKeyConfig) *CreatePublicKeyInput { - s.PublicKeyConfig = v - return s -} - -type CreatePublicKeyOutput struct { - _ struct{} `type:"structure" payload:"PublicKey"` - - // The identifier for this version of the public key. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The URL of the public key. - Location *string `location:"header" locationName:"Location" type:"string"` - - // The public key. - PublicKey *PublicKey `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 CreatePublicKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreatePublicKeyOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *CreatePublicKeyOutput) SetETag(v string) *CreatePublicKeyOutput { - s.ETag = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreatePublicKeyOutput) SetLocation(v string) *CreatePublicKeyOutput { - s.Location = &v - return s -} - -// SetPublicKey sets the PublicKey field's value. -func (s *CreatePublicKeyOutput) SetPublicKey(v *PublicKey) *CreatePublicKeyOutput { - s.PublicKey = v - return s -} - -type CreateRealtimeLogConfigInput struct { - _ struct{} `locationName:"CreateRealtimeLogConfigRequest" type:"structure" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` - - // Contains information about the Amazon Kinesis data stream where you are sending - // real-time log data. - // - // EndPoints is a required field - EndPoints []*EndPoint `type:"list" required:"true"` - - // A list of fields to include in each real-time log record. - // - // For more information about fields, see Real-time log configuration fields - // (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html#understand-real-time-log-config-fields) - // in the Amazon CloudFront Developer Guide. - // - // Fields is a required field - Fields []*string `locationNameList:"Field" type:"list" required:"true"` - - // A unique name to identify this real-time log configuration. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The sampling rate for this real-time log configuration. You can specify a - // whole number between 1 and 100 (inclusive) to determine the percentage of - // viewer requests that are represented in the real-time log data. - // - // SamplingRate is a required field - SamplingRate *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 CreateRealtimeLogConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateRealtimeLogConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateRealtimeLogConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateRealtimeLogConfigInput"} - if s.EndPoints == nil { - invalidParams.Add(request.NewErrParamRequired("EndPoints")) - } - if s.Fields == nil { - invalidParams.Add(request.NewErrParamRequired("Fields")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.SamplingRate == nil { - invalidParams.Add(request.NewErrParamRequired("SamplingRate")) - } - if s.EndPoints != nil { - for i, v := range s.EndPoints { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "EndPoints", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEndPoints sets the EndPoints field's value. -func (s *CreateRealtimeLogConfigInput) SetEndPoints(v []*EndPoint) *CreateRealtimeLogConfigInput { - s.EndPoints = v - return s -} - -// SetFields sets the Fields field's value. -func (s *CreateRealtimeLogConfigInput) SetFields(v []*string) *CreateRealtimeLogConfigInput { - s.Fields = v - return s -} - -// SetName sets the Name field's value. -func (s *CreateRealtimeLogConfigInput) SetName(v string) *CreateRealtimeLogConfigInput { - s.Name = &v - return s -} - -// SetSamplingRate sets the SamplingRate field's value. -func (s *CreateRealtimeLogConfigInput) SetSamplingRate(v int64) *CreateRealtimeLogConfigInput { - s.SamplingRate = &v - return s -} - -type CreateRealtimeLogConfigOutput struct { - _ struct{} `type:"structure"` - - // A real-time log configuration. - RealtimeLogConfig *RealtimeLogConfig `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 CreateRealtimeLogConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateRealtimeLogConfigOutput) GoString() string { - return s.String() -} - -// SetRealtimeLogConfig sets the RealtimeLogConfig field's value. -func (s *CreateRealtimeLogConfigOutput) SetRealtimeLogConfig(v *RealtimeLogConfig) *CreateRealtimeLogConfigOutput { - s.RealtimeLogConfig = v - return s -} - -type CreateResponseHeadersPolicyInput struct { - _ struct{} `locationName:"CreateResponseHeadersPolicyRequest" type:"structure" payload:"ResponseHeadersPolicyConfig"` - - // Contains metadata about the response headers policy, and a set of configurations - // that specify the HTTP headers. - // - // ResponseHeadersPolicyConfig is a required field - ResponseHeadersPolicyConfig *ResponseHeadersPolicyConfig `locationName:"ResponseHeadersPolicyConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateResponseHeadersPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateResponseHeadersPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateResponseHeadersPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateResponseHeadersPolicyInput"} - if s.ResponseHeadersPolicyConfig == nil { - invalidParams.Add(request.NewErrParamRequired("ResponseHeadersPolicyConfig")) - } - if s.ResponseHeadersPolicyConfig != nil { - if err := s.ResponseHeadersPolicyConfig.Validate(); err != nil { - invalidParams.AddNested("ResponseHeadersPolicyConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResponseHeadersPolicyConfig sets the ResponseHeadersPolicyConfig field's value. -func (s *CreateResponseHeadersPolicyInput) SetResponseHeadersPolicyConfig(v *ResponseHeadersPolicyConfig) *CreateResponseHeadersPolicyInput { - s.ResponseHeadersPolicyConfig = v - return s -} - -type CreateResponseHeadersPolicyOutput struct { - _ struct{} `type:"structure" payload:"ResponseHeadersPolicy"` - - // The version identifier for the current version of the response headers policy. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The URL of the response headers policy. - Location *string `location:"header" locationName:"Location" type:"string"` - - // Contains a response headers policy. - ResponseHeadersPolicy *ResponseHeadersPolicy `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 CreateResponseHeadersPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateResponseHeadersPolicyOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *CreateResponseHeadersPolicyOutput) SetETag(v string) *CreateResponseHeadersPolicyOutput { - s.ETag = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateResponseHeadersPolicyOutput) SetLocation(v string) *CreateResponseHeadersPolicyOutput { - s.Location = &v - return s -} - -// SetResponseHeadersPolicy sets the ResponseHeadersPolicy field's value. -func (s *CreateResponseHeadersPolicyOutput) SetResponseHeadersPolicy(v *ResponseHeadersPolicy) *CreateResponseHeadersPolicyOutput { - s.ResponseHeadersPolicy = v - return s -} - -// The request to create a new streaming distribution. -type CreateStreamingDistributionInput struct { - _ struct{} `locationName:"CreateStreamingDistributionRequest" type:"structure" payload:"StreamingDistributionConfig"` - - // The streaming distribution's configuration information. - // - // StreamingDistributionConfig is a required field - StreamingDistributionConfig *StreamingDistributionConfig `locationName:"StreamingDistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateStreamingDistributionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateStreamingDistributionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateStreamingDistributionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateStreamingDistributionInput"} - if s.StreamingDistributionConfig == nil { - invalidParams.Add(request.NewErrParamRequired("StreamingDistributionConfig")) - } - if s.StreamingDistributionConfig != nil { - if err := s.StreamingDistributionConfig.Validate(); err != nil { - invalidParams.AddNested("StreamingDistributionConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStreamingDistributionConfig sets the StreamingDistributionConfig field's value. -func (s *CreateStreamingDistributionInput) SetStreamingDistributionConfig(v *StreamingDistributionConfig) *CreateStreamingDistributionInput { - s.StreamingDistributionConfig = v - return s -} - -// The returned result of the corresponding request. -type CreateStreamingDistributionOutput struct { - _ struct{} `type:"structure" payload:"StreamingDistribution"` - - // The current version of the streaming distribution created. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The fully qualified URI of the new streaming distribution resource just created. - Location *string `location:"header" locationName:"Location" type:"string"` - - // The streaming distribution's information. - StreamingDistribution *StreamingDistribution `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 CreateStreamingDistributionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateStreamingDistributionOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *CreateStreamingDistributionOutput) SetETag(v string) *CreateStreamingDistributionOutput { - s.ETag = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateStreamingDistributionOutput) SetLocation(v string) *CreateStreamingDistributionOutput { - s.Location = &v - return s -} - -// SetStreamingDistribution sets the StreamingDistribution field's value. -func (s *CreateStreamingDistributionOutput) SetStreamingDistribution(v *StreamingDistribution) *CreateStreamingDistributionOutput { - s.StreamingDistribution = v - return s -} - -// The request to create a new streaming distribution with tags. -type CreateStreamingDistributionWithTagsInput struct { - _ struct{} `locationName:"CreateStreamingDistributionWithTagsRequest" type:"structure" payload:"StreamingDistributionConfigWithTags"` - - // The streaming distribution's configuration information. - // - // StreamingDistributionConfigWithTags is a required field - StreamingDistributionConfigWithTags *StreamingDistributionConfigWithTags `locationName:"StreamingDistributionConfigWithTags" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateStreamingDistributionWithTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateStreamingDistributionWithTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateStreamingDistributionWithTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateStreamingDistributionWithTagsInput"} - if s.StreamingDistributionConfigWithTags == nil { - invalidParams.Add(request.NewErrParamRequired("StreamingDistributionConfigWithTags")) - } - if s.StreamingDistributionConfigWithTags != nil { - if err := s.StreamingDistributionConfigWithTags.Validate(); err != nil { - invalidParams.AddNested("StreamingDistributionConfigWithTags", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStreamingDistributionConfigWithTags sets the StreamingDistributionConfigWithTags field's value. -func (s *CreateStreamingDistributionWithTagsInput) SetStreamingDistributionConfigWithTags(v *StreamingDistributionConfigWithTags) *CreateStreamingDistributionWithTagsInput { - s.StreamingDistributionConfigWithTags = v - return s -} - -// The returned result of the corresponding request. -type CreateStreamingDistributionWithTagsOutput struct { - _ struct{} `type:"structure" payload:"StreamingDistribution"` - - // The current version of the distribution created. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The fully qualified URI of the new streaming distribution resource just created. - Location *string `location:"header" locationName:"Location" type:"string"` - - // The streaming distribution's information. - StreamingDistribution *StreamingDistribution `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 CreateStreamingDistributionWithTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateStreamingDistributionWithTagsOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *CreateStreamingDistributionWithTagsOutput) SetETag(v string) *CreateStreamingDistributionWithTagsOutput { - s.ETag = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *CreateStreamingDistributionWithTagsOutput) SetLocation(v string) *CreateStreamingDistributionWithTagsOutput { - s.Location = &v - return s -} - -// SetStreamingDistribution sets the StreamingDistribution field's value. -func (s *CreateStreamingDistributionWithTagsOutput) SetStreamingDistribution(v *StreamingDistribution) *CreateStreamingDistributionWithTagsOutput { - s.StreamingDistribution = v - return s -} - -// A complex type that controls: -// -// - Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range -// with custom error messages before returning the response to the viewer. -// -// - How long CloudFront caches HTTP status codes in the 4xx and 5xx range. -// -// For more information about custom error pages, see Customizing Error Responses -// (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html) -// in the Amazon CloudFront Developer Guide. -type CustomErrorResponse struct { - _ struct{} `type:"structure"` - - // The minimum amount of time, in seconds, that you want CloudFront to cache - // the HTTP status code specified in ErrorCode. When this time period has elapsed, - // CloudFront queries your origin to see whether the problem that caused the - // error has been resolved and the requested object is now available. - // - // For more information, see Customizing Error Responses (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html) - // in the Amazon CloudFront Developer Guide. - ErrorCachingMinTTL *int64 `type:"long"` - - // The HTTP status code for which you want to specify a custom error page and/or - // a caching duration. - // - // ErrorCode is a required field - ErrorCode *int64 `type:"integer" required:"true"` - - // The HTTP status code that you want CloudFront to return to the viewer along - // with the custom error page. There are a variety of reasons that you might - // want CloudFront to return a status code different from the status code that - // your origin returned to CloudFront, for example: - // - // * Some Internet devices (some firewalls and corporate proxies, for example) - // intercept HTTP 4xx and 5xx and prevent the response from being returned - // to the viewer. If you substitute 200, the response typically won't be - // intercepted. - // - // * If you don't care about distinguishing among different client errors - // or server errors, you can specify 400 or 500 as the ResponseCode for all - // 4xx or 5xx errors. - // - // * You might want to return a 200 status code (OK) and static website so - // your customers don't know that your website is down. - // - // If you specify a value for ResponseCode, you must also specify a value for - // ResponsePagePath. - ResponseCode *string `type:"string"` - - // The path to the custom error page that you want CloudFront to return to a - // viewer when your origin returns the HTTP status code specified by ErrorCode, - // for example, /4xx-errors/403-forbidden.html. If you want to store your objects - // and your custom error pages in different locations, your distribution must - // include a cache behavior for which the following is true: - // - // * The value of PathPattern matches the path to your custom error messages. - // For example, suppose you saved custom error pages for 4xx errors in an - // Amazon S3 bucket in a directory named /4xx-errors. Your distribution must - // include a cache behavior for which the path pattern routes requests for - // your custom error pages to that location, for example, /4xx-errors/*. - // - // * The value of TargetOriginId specifies the value of the ID element for - // the origin that contains your custom error pages. - // - // If you specify a value for ResponsePagePath, you must also specify a value - // for ResponseCode. - // - // We recommend that you store custom error pages in an Amazon S3 bucket. If - // you store custom error pages on an HTTP server and the server starts to return - // 5xx errors, CloudFront can't get the files that you want to return to viewers - // because the origin server is unavailable. - ResponsePagePath *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 CustomErrorResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CustomErrorResponse) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CustomErrorResponse) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CustomErrorResponse"} - if s.ErrorCode == nil { - invalidParams.Add(request.NewErrParamRequired("ErrorCode")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetErrorCachingMinTTL sets the ErrorCachingMinTTL field's value. -func (s *CustomErrorResponse) SetErrorCachingMinTTL(v int64) *CustomErrorResponse { - s.ErrorCachingMinTTL = &v - return s -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *CustomErrorResponse) SetErrorCode(v int64) *CustomErrorResponse { - s.ErrorCode = &v - return s -} - -// SetResponseCode sets the ResponseCode field's value. -func (s *CustomErrorResponse) SetResponseCode(v string) *CustomErrorResponse { - s.ResponseCode = &v - return s -} - -// SetResponsePagePath sets the ResponsePagePath field's value. -func (s *CustomErrorResponse) SetResponsePagePath(v string) *CustomErrorResponse { - s.ResponsePagePath = &v - return s -} - -// A complex type that controls: -// -// - Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range -// with custom error messages before returning the response to the viewer. -// -// - How long CloudFront caches HTTP status codes in the 4xx and 5xx range. -// -// For more information about custom error pages, see Customizing Error Responses -// (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html) -// in the Amazon CloudFront Developer Guide. -type CustomErrorResponses struct { - _ struct{} `type:"structure"` - - // A complex type that contains a CustomErrorResponse element for each HTTP - // status code for which you want to specify a custom error page and/or a caching - // duration. - Items []*CustomErrorResponse `locationNameList:"CustomErrorResponse" type:"list"` - - // The number of HTTP status codes for which you want to specify a custom error - // page and/or a caching duration. If Quantity is 0, you can omit Items. - // - // Quantity is a required field - Quantity *int64 `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 CustomErrorResponses) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CustomErrorResponses) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CustomErrorResponses) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CustomErrorResponses"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *CustomErrorResponses) SetItems(v []*CustomErrorResponse) *CustomErrorResponses { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *CustomErrorResponses) SetQuantity(v int64) *CustomErrorResponses { - s.Quantity = &v - return s -} - -// A complex type that contains the list of Custom Headers for each origin. -type CustomHeaders struct { - _ struct{} `type:"structure"` - - // Optional: A list that contains one OriginCustomHeader element for each custom - // header that you want CloudFront to forward to the origin. If Quantity is - // 0, omit Items. - Items []*OriginCustomHeader `locationNameList:"OriginCustomHeader" type:"list"` - - // The number of custom headers, if any, for this distribution. - // - // Quantity is a required field - Quantity *int64 `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 CustomHeaders) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CustomHeaders) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CustomHeaders) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CustomHeaders"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *CustomHeaders) SetItems(v []*OriginCustomHeader) *CustomHeaders { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *CustomHeaders) SetQuantity(v int64) *CustomHeaders { - s.Quantity = &v - return s -} - -// A custom origin. A custom origin is any origin that is not an Amazon S3 bucket, -// with one exception. An Amazon S3 bucket that is configured with static website -// hosting (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html) -// is a custom origin. -type CustomOriginConfig struct { - _ struct{} `type:"structure"` - - // The HTTP port that CloudFront uses to connect to the origin. Specify the - // HTTP port that the origin listens on. - // - // HTTPPort is a required field - HTTPPort *int64 `type:"integer" required:"true"` - - // The HTTPS port that CloudFront uses to connect to the origin. Specify the - // HTTPS port that the origin listens on. - // - // HTTPSPort is a required field - HTTPSPort *int64 `type:"integer" required:"true"` - - // Specifies how long, in seconds, CloudFront persists its connection to the - // origin. The minimum timeout is 1 second, the maximum is 60 seconds, and the - // default (if you don't specify otherwise) is 5 seconds. - // - // For more information, see Origin Keep-alive Timeout (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginKeepaliveTimeout) - // in the Amazon CloudFront Developer Guide. - OriginKeepaliveTimeout *int64 `type:"integer"` - - // Specifies the protocol (HTTP or HTTPS) that CloudFront uses to connect to - // the origin. Valid values are: - // - // * http-only – CloudFront always uses HTTP to connect to the origin. - // - // * match-viewer – CloudFront connects to the origin using the same protocol - // that the viewer used to connect to CloudFront. - // - // * https-only – CloudFront always uses HTTPS to connect to the origin. - // - // OriginProtocolPolicy is a required field - OriginProtocolPolicy *string `type:"string" required:"true" enum:"OriginProtocolPolicy"` - - // Specifies how long, in seconds, CloudFront waits for a response from the - // origin. This is also known as the origin response timeout. The minimum timeout - // is 1 second, the maximum is 60 seconds, and the default (if you don't specify - // otherwise) is 30 seconds. - // - // For more information, see Origin Response Timeout (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginResponseTimeout) - // in the Amazon CloudFront Developer Guide. - OriginReadTimeout *int64 `type:"integer"` - - // Specifies the minimum SSL/TLS protocol that CloudFront uses when connecting - // to your origin over HTTPS. Valid values include SSLv3, TLSv1, TLSv1.1, and - // TLSv1.2. - // - // For more information, see Minimum Origin SSL Protocol (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginSSLProtocols) - // in the Amazon CloudFront Developer Guide. - OriginSslProtocols *OriginSslProtocols `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 CustomOriginConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CustomOriginConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CustomOriginConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CustomOriginConfig"} - if s.HTTPPort == nil { - invalidParams.Add(request.NewErrParamRequired("HTTPPort")) - } - if s.HTTPSPort == nil { - invalidParams.Add(request.NewErrParamRequired("HTTPSPort")) - } - if s.OriginProtocolPolicy == nil { - invalidParams.Add(request.NewErrParamRequired("OriginProtocolPolicy")) - } - if s.OriginSslProtocols != nil { - if err := s.OriginSslProtocols.Validate(); err != nil { - invalidParams.AddNested("OriginSslProtocols", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHTTPPort sets the HTTPPort field's value. -func (s *CustomOriginConfig) SetHTTPPort(v int64) *CustomOriginConfig { - s.HTTPPort = &v - return s -} - -// SetHTTPSPort sets the HTTPSPort field's value. -func (s *CustomOriginConfig) SetHTTPSPort(v int64) *CustomOriginConfig { - s.HTTPSPort = &v - return s -} - -// SetOriginKeepaliveTimeout sets the OriginKeepaliveTimeout field's value. -func (s *CustomOriginConfig) SetOriginKeepaliveTimeout(v int64) *CustomOriginConfig { - s.OriginKeepaliveTimeout = &v - return s -} - -// SetOriginProtocolPolicy sets the OriginProtocolPolicy field's value. -func (s *CustomOriginConfig) SetOriginProtocolPolicy(v string) *CustomOriginConfig { - s.OriginProtocolPolicy = &v - return s -} - -// SetOriginReadTimeout sets the OriginReadTimeout field's value. -func (s *CustomOriginConfig) SetOriginReadTimeout(v int64) *CustomOriginConfig { - s.OriginReadTimeout = &v - return s -} - -// SetOriginSslProtocols sets the OriginSslProtocols field's value. -func (s *CustomOriginConfig) SetOriginSslProtocols(v *OriginSslProtocols) *CustomOriginConfig { - s.OriginSslProtocols = v - return s -} - -// A complex type that describes the default cache behavior if you don't specify -// a CacheBehavior element or if request URLs don't match any of the values -// of PathPattern in CacheBehavior elements. You must create exactly one default -// cache behavior. -type DefaultCacheBehavior struct { - _ struct{} `type:"structure"` - - // A complex type that controls which HTTP methods CloudFront processes and - // forwards to your Amazon S3 bucket or your custom origin. There are three - // choices: - // - // * CloudFront forwards only GET and HEAD requests. - // - // * CloudFront forwards only GET, HEAD, and OPTIONS requests. - // - // * CloudFront forwards GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE - // requests. - // - // If you pick the third choice, you may need to restrict access to your Amazon - // S3 bucket or to your custom origin so users can't perform operations that - // you don't want them to. For example, you might not want users to have permissions - // to delete objects from your origin. - AllowedMethods *AllowedMethods `type:"structure"` - - // The unique identifier of the cache policy that is attached to the default - // cache behavior. For more information, see Creating cache policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) - // or Using the managed cache policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) - // in the Amazon CloudFront Developer Guide. - // - // A DefaultCacheBehavior must include either a CachePolicyId or ForwardedValues. - // We recommend that you use a CachePolicyId. - CachePolicyId *string `type:"string"` - - // Whether you want CloudFront to automatically compress certain files for this - // cache behavior. If so, specify true; if not, specify false. For more information, - // see Serving Compressed Files (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html) - // in the Amazon CloudFront Developer Guide. - Compress *bool `type:"boolean"` - - // This field is deprecated. We recommend that you use the DefaultTTL field - // in a cache policy instead of this field. For more information, see Creating - // cache policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) - // or Using the managed cache policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) - // in the Amazon CloudFront Developer Guide. - // - // The default amount of time that you want objects to stay in CloudFront caches - // before CloudFront forwards another request to your origin to determine whether - // the object has been updated. The value that you specify applies only when - // your origin does not add HTTP headers such as Cache-Control max-age, Cache-Control - // s-maxage, and Expires to objects. For more information, see Managing How - // Long Content Stays in an Edge Cache (Expiration) (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) - // in the Amazon CloudFront Developer Guide. - // - // Deprecated: DefaultTTL has been deprecated - DefaultTTL *int64 `deprecated:"true" type:"long"` - - // The value of ID for the field-level encryption configuration that you want - // CloudFront to use for encrypting specific fields of data for the default - // cache behavior. - FieldLevelEncryptionId *string `type:"string"` - - // This field is deprecated. We recommend that you use a cache policy or an - // origin request policy instead of this field. For more information, see Working - // with policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/working-with-policies.html) - // in the Amazon CloudFront Developer Guide. - // - // If you want to include values in the cache key, use a cache policy. For more - // information, see Creating cache policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) - // or Using the managed cache policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) - // in the Amazon CloudFront Developer Guide. - // - // If you want to send values to the origin but not include them in the cache - // key, use an origin request policy. For more information, see Creating origin - // request policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) - // or Using the managed origin request policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-origin-request-policies.html) - // in the Amazon CloudFront Developer Guide. - // - // A DefaultCacheBehavior must include either a CachePolicyId or ForwardedValues. - // We recommend that you use a CachePolicyId. - // - // A complex type that specifies how CloudFront handles query strings, cookies, - // and HTTP headers. - // - // Deprecated: ForwardedValues has been deprecated - ForwardedValues *ForwardedValues `deprecated:"true" type:"structure"` - - // A list of CloudFront functions that are associated with this cache behavior. - // Your functions must be published to the LIVE stage to associate them with - // a cache behavior. - FunctionAssociations *FunctionAssociations `type:"structure"` - - // A complex type that contains zero or more Lambda@Edge function associations - // for a cache behavior. - LambdaFunctionAssociations *LambdaFunctionAssociations `type:"structure"` - - // This field is deprecated. We recommend that you use the MaxTTL field in a - // cache policy instead of this field. For more information, see Creating cache - // policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) - // or Using the managed cache policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) - // in the Amazon CloudFront Developer Guide. - // - // The maximum amount of time that you want objects to stay in CloudFront caches - // before CloudFront forwards another request to your origin to determine whether - // the object has been updated. The value that you specify applies only when - // your origin adds HTTP headers such as Cache-Control max-age, Cache-Control - // s-maxage, and Expires to objects. For more information, see Managing How - // Long Content Stays in an Edge Cache (Expiration) (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) - // in the Amazon CloudFront Developer Guide. - // - // Deprecated: MaxTTL has been deprecated - MaxTTL *int64 `deprecated:"true" type:"long"` - - // This field is deprecated. We recommend that you use the MinTTL field in a - // cache policy instead of this field. For more information, see Creating cache - // policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) - // or Using the managed cache policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) - // in the Amazon CloudFront Developer Guide. - // - // The minimum amount of time that you want objects to stay in CloudFront caches - // before CloudFront forwards another request to your origin to determine whether - // the object has been updated. For more information, see Managing How Long - // Content Stays in an Edge Cache (Expiration) (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) - // in the Amazon CloudFront Developer Guide. - // - // You must specify 0 for MinTTL if you configure CloudFront to forward all - // headers to your origin (under Headers, if you specify 1 for Quantity and - // * for Name). - // - // Deprecated: MinTTL has been deprecated - MinTTL *int64 `deprecated:"true" type:"long"` - - // The unique identifier of the origin request policy that is attached to the - // default cache behavior. For more information, see Creating origin request - // policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) - // or Using the managed origin request policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-origin-request-policies.html) - // in the Amazon CloudFront Developer Guide. - OriginRequestPolicyId *string `type:"string"` - - // The Amazon Resource Name (ARN) of the real-time log configuration that is - // attached to this cache behavior. For more information, see Real-time logs - // (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html) - // in the Amazon CloudFront Developer Guide. - RealtimeLogConfigArn *string `type:"string"` - - // The identifier for a response headers policy. - ResponseHeadersPolicyId *string `type:"string"` - - // Indicates whether you want to distribute media files in the Microsoft Smooth - // Streaming format using the origin that is associated with this cache behavior. - // If so, specify true; if not, specify false. If you specify true for SmoothStreaming, - // you can still distribute other content using this cache behavior if the content - // matches the value of PathPattern. - SmoothStreaming *bool `type:"boolean"` - - // The value of ID for the origin that you want CloudFront to route requests - // to when they use the default cache behavior. - // - // TargetOriginId is a required field - TargetOriginId *string `type:"string" required:"true"` - - // A list of key groups that CloudFront can use to validate signed URLs or signed - // cookies. - // - // When a cache behavior contains trusted key groups, CloudFront requires signed - // URLs or signed cookies for all requests that match the cache behavior. The - // URLs or cookies must be signed with a private key whose corresponding public - // key is in the key group. The signed URL or cookie contains information about - // which public key CloudFront should use to verify the signature. For more - // information, see Serving private content (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) - // in the Amazon CloudFront Developer Guide. - TrustedKeyGroups *TrustedKeyGroups `type:"structure"` - - // - // We recommend using TrustedKeyGroups instead of TrustedSigners. - // - // A list of Amazon Web Services account IDs whose public keys CloudFront can - // use to validate signed URLs or signed cookies. - // - // When a cache behavior contains trusted signers, CloudFront requires signed - // URLs or signed cookies for all requests that match the cache behavior. The - // URLs or cookies must be signed with the private key of a CloudFront key pair - // in a trusted signer's Amazon Web Services account. The signed URL or cookie - // contains information about which public key CloudFront should use to verify - // the signature. For more information, see Serving private content (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) - // in the Amazon CloudFront Developer Guide. - TrustedSigners *TrustedSigners `type:"structure"` - - // The protocol that viewers can use to access the files in the origin specified - // by TargetOriginId when a request matches the path pattern in PathPattern. - // You can specify the following options: - // - // * allow-all: Viewers can use HTTP or HTTPS. - // - // * redirect-to-https: If a viewer submits an HTTP request, CloudFront returns - // an HTTP status code of 301 (Moved Permanently) to the viewer along with - // the HTTPS URL. The viewer then resubmits the request using the new URL. - // - // * https-only: If a viewer sends an HTTP request, CloudFront returns an - // HTTP status code of 403 (Forbidden). - // - // For more information about requiring the HTTPS protocol, see Requiring HTTPS - // Between Viewers and CloudFront (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-https-viewers-to-cloudfront.html) - // in the Amazon CloudFront Developer Guide. - // - // The only way to guarantee that viewers retrieve an object that was fetched - // from the origin using HTTPS is never to use any other protocol to fetch the - // object. If you have recently changed from HTTP to HTTPS, we recommend that - // you clear your objects' cache because cached objects are protocol agnostic. - // That means that an edge location will return an object from the cache regardless - // of whether the current request protocol matches the protocol used previously. - // For more information, see Managing Cache Expiration (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) - // in the Amazon CloudFront Developer Guide. - // - // ViewerProtocolPolicy is a required field - ViewerProtocolPolicy *string `type:"string" required:"true" enum:"ViewerProtocolPolicy"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DefaultCacheBehavior) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DefaultCacheBehavior) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DefaultCacheBehavior) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DefaultCacheBehavior"} - if s.TargetOriginId == nil { - invalidParams.Add(request.NewErrParamRequired("TargetOriginId")) - } - if s.ViewerProtocolPolicy == nil { - invalidParams.Add(request.NewErrParamRequired("ViewerProtocolPolicy")) - } - if s.AllowedMethods != nil { - if err := s.AllowedMethods.Validate(); err != nil { - invalidParams.AddNested("AllowedMethods", err.(request.ErrInvalidParams)) - } - } - if s.ForwardedValues != nil { - if err := s.ForwardedValues.Validate(); err != nil { - invalidParams.AddNested("ForwardedValues", err.(request.ErrInvalidParams)) - } - } - if s.FunctionAssociations != nil { - if err := s.FunctionAssociations.Validate(); err != nil { - invalidParams.AddNested("FunctionAssociations", err.(request.ErrInvalidParams)) - } - } - if s.LambdaFunctionAssociations != nil { - if err := s.LambdaFunctionAssociations.Validate(); err != nil { - invalidParams.AddNested("LambdaFunctionAssociations", err.(request.ErrInvalidParams)) - } - } - if s.TrustedKeyGroups != nil { - if err := s.TrustedKeyGroups.Validate(); err != nil { - invalidParams.AddNested("TrustedKeyGroups", err.(request.ErrInvalidParams)) - } - } - if s.TrustedSigners != nil { - if err := s.TrustedSigners.Validate(); err != nil { - invalidParams.AddNested("TrustedSigners", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllowedMethods sets the AllowedMethods field's value. -func (s *DefaultCacheBehavior) SetAllowedMethods(v *AllowedMethods) *DefaultCacheBehavior { - s.AllowedMethods = v - return s -} - -// SetCachePolicyId sets the CachePolicyId field's value. -func (s *DefaultCacheBehavior) SetCachePolicyId(v string) *DefaultCacheBehavior { - s.CachePolicyId = &v - return s -} - -// SetCompress sets the Compress field's value. -func (s *DefaultCacheBehavior) SetCompress(v bool) *DefaultCacheBehavior { - s.Compress = &v - return s -} - -// SetDefaultTTL sets the DefaultTTL field's value. -func (s *DefaultCacheBehavior) SetDefaultTTL(v int64) *DefaultCacheBehavior { - s.DefaultTTL = &v - return s -} - -// SetFieldLevelEncryptionId sets the FieldLevelEncryptionId field's value. -func (s *DefaultCacheBehavior) SetFieldLevelEncryptionId(v string) *DefaultCacheBehavior { - s.FieldLevelEncryptionId = &v - return s -} - -// SetForwardedValues sets the ForwardedValues field's value. -func (s *DefaultCacheBehavior) SetForwardedValues(v *ForwardedValues) *DefaultCacheBehavior { - s.ForwardedValues = v - return s -} - -// SetFunctionAssociations sets the FunctionAssociations field's value. -func (s *DefaultCacheBehavior) SetFunctionAssociations(v *FunctionAssociations) *DefaultCacheBehavior { - s.FunctionAssociations = v - return s -} - -// SetLambdaFunctionAssociations sets the LambdaFunctionAssociations field's value. -func (s *DefaultCacheBehavior) SetLambdaFunctionAssociations(v *LambdaFunctionAssociations) *DefaultCacheBehavior { - s.LambdaFunctionAssociations = v - return s -} - -// SetMaxTTL sets the MaxTTL field's value. -func (s *DefaultCacheBehavior) SetMaxTTL(v int64) *DefaultCacheBehavior { - s.MaxTTL = &v - return s -} - -// SetMinTTL sets the MinTTL field's value. -func (s *DefaultCacheBehavior) SetMinTTL(v int64) *DefaultCacheBehavior { - s.MinTTL = &v - return s -} - -// SetOriginRequestPolicyId sets the OriginRequestPolicyId field's value. -func (s *DefaultCacheBehavior) SetOriginRequestPolicyId(v string) *DefaultCacheBehavior { - s.OriginRequestPolicyId = &v - return s -} - -// SetRealtimeLogConfigArn sets the RealtimeLogConfigArn field's value. -func (s *DefaultCacheBehavior) SetRealtimeLogConfigArn(v string) *DefaultCacheBehavior { - s.RealtimeLogConfigArn = &v - return s -} - -// SetResponseHeadersPolicyId sets the ResponseHeadersPolicyId field's value. -func (s *DefaultCacheBehavior) SetResponseHeadersPolicyId(v string) *DefaultCacheBehavior { - s.ResponseHeadersPolicyId = &v - return s -} - -// SetSmoothStreaming sets the SmoothStreaming field's value. -func (s *DefaultCacheBehavior) SetSmoothStreaming(v bool) *DefaultCacheBehavior { - s.SmoothStreaming = &v - return s -} - -// SetTargetOriginId sets the TargetOriginId field's value. -func (s *DefaultCacheBehavior) SetTargetOriginId(v string) *DefaultCacheBehavior { - s.TargetOriginId = &v - return s -} - -// SetTrustedKeyGroups sets the TrustedKeyGroups field's value. -func (s *DefaultCacheBehavior) SetTrustedKeyGroups(v *TrustedKeyGroups) *DefaultCacheBehavior { - s.TrustedKeyGroups = v - return s -} - -// SetTrustedSigners sets the TrustedSigners field's value. -func (s *DefaultCacheBehavior) SetTrustedSigners(v *TrustedSigners) *DefaultCacheBehavior { - s.TrustedSigners = v - return s -} - -// SetViewerProtocolPolicy sets the ViewerProtocolPolicy field's value. -func (s *DefaultCacheBehavior) SetViewerProtocolPolicy(v string) *DefaultCacheBehavior { - s.ViewerProtocolPolicy = &v - return s -} - -type DeleteCachePolicyInput struct { - _ struct{} `locationName:"DeleteCachePolicyRequest" type:"structure"` - - // The unique identifier for the cache policy that you are deleting. To get - // the identifier, you can use ListCachePolicies. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The version of the cache policy that you are deleting. The version is the - // cache policy's ETag value, which you can get using ListCachePolicies, GetCachePolicy, - // or GetCachePolicyConfig. - IfMatch *string `location:"header" locationName:"If-Match" 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 DeleteCachePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteCachePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteCachePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteCachePolicyInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeleteCachePolicyInput) SetId(v string) *DeleteCachePolicyInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *DeleteCachePolicyInput) SetIfMatch(v string) *DeleteCachePolicyInput { - s.IfMatch = &v - return s -} - -type DeleteCachePolicyOutput 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 DeleteCachePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteCachePolicyOutput) GoString() string { - return s.String() -} - -// Deletes a origin access identity. -type DeleteCloudFrontOriginAccessIdentityInput struct { - _ struct{} `locationName:"DeleteCloudFrontOriginAccessIdentityRequest" type:"structure"` - - // The origin access identity's ID. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The value of the ETag header you received from a previous GET or PUT request. - // For example: E2QWRUHAPOMQZL. - IfMatch *string `location:"header" locationName:"If-Match" 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 DeleteCloudFrontOriginAccessIdentityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteCloudFrontOriginAccessIdentityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteCloudFrontOriginAccessIdentityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteCloudFrontOriginAccessIdentityInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeleteCloudFrontOriginAccessIdentityInput) SetId(v string) *DeleteCloudFrontOriginAccessIdentityInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *DeleteCloudFrontOriginAccessIdentityInput) SetIfMatch(v string) *DeleteCloudFrontOriginAccessIdentityInput { - s.IfMatch = &v - return s -} - -type DeleteCloudFrontOriginAccessIdentityOutput 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 DeleteCloudFrontOriginAccessIdentityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteCloudFrontOriginAccessIdentityOutput) GoString() string { - return s.String() -} - -type DeleteContinuousDeploymentPolicyInput struct { - _ struct{} `locationName:"DeleteContinuousDeploymentPolicyRequest" type:"structure"` - - // The identifier of the continuous deployment policy that you are deleting. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The current version (ETag value) of the continuous deployment policy that - // you are deleting. - IfMatch *string `location:"header" locationName:"If-Match" 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 DeleteContinuousDeploymentPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteContinuousDeploymentPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteContinuousDeploymentPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteContinuousDeploymentPolicyInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeleteContinuousDeploymentPolicyInput) SetId(v string) *DeleteContinuousDeploymentPolicyInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *DeleteContinuousDeploymentPolicyInput) SetIfMatch(v string) *DeleteContinuousDeploymentPolicyInput { - s.IfMatch = &v - return s -} - -type DeleteContinuousDeploymentPolicyOutput 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 DeleteContinuousDeploymentPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteContinuousDeploymentPolicyOutput) GoString() string { - return s.String() -} - -// This action deletes a web distribution. To delete a web distribution using -// the CloudFront API, perform the following steps. -// -// To delete a web distribution using the CloudFront API: -// -// # Disable the web distribution -// -// Submit a GET Distribution Config request to get the current configuration -// and the Etag header for the distribution. -// -// Update the XML document that was returned in the response to your GET Distribution -// Config request to change the value of Enabled to false. -// -// Submit a PUT Distribution Config request to update the configuration for -// your distribution. In the request body, include the XML document that you -// updated in Step 3. Set the value of the HTTP If-Match header to the value -// of the ETag header that CloudFront returned when you submitted the GET Distribution -// Config request in Step 2. -// -// Review the response to the PUT Distribution Config request to confirm that -// the distribution was successfully disabled. -// -// Submit a GET Distribution request to confirm that your changes have propagated. -// When propagation is complete, the value of Status is Deployed. -// -// Submit a DELETE Distribution request. Set the value of the HTTP If-Match -// header to the value of the ETag header that CloudFront returned when you -// submitted the GET Distribution Config request in Step 6. -// -// Review the response to your DELETE Distribution request to confirm that the -// distribution was successfully deleted. -// -// For information about deleting a distribution using the CloudFront console, -// see Deleting a Distribution (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/HowToDeleteDistribution.html) -// in the Amazon CloudFront Developer Guide. -type DeleteDistributionInput struct { - _ struct{} `locationName:"DeleteDistributionRequest" type:"structure"` - - // The distribution ID. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The value of the ETag header that you received when you disabled the distribution. - // For example: E2QWRUHAPOMQZL. - IfMatch *string `location:"header" locationName:"If-Match" 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 DeleteDistributionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteDistributionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDistributionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDistributionInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeleteDistributionInput) SetId(v string) *DeleteDistributionInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *DeleteDistributionInput) SetIfMatch(v string) *DeleteDistributionInput { - s.IfMatch = &v - return s -} - -type DeleteDistributionOutput 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 DeleteDistributionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteDistributionOutput) GoString() string { - return s.String() -} - -type DeleteFieldLevelEncryptionConfigInput struct { - _ struct{} `locationName:"DeleteFieldLevelEncryptionConfigRequest" type:"structure"` - - // The ID of the configuration you want to delete from CloudFront. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The value of the ETag header that you received when retrieving the configuration - // identity to delete. For example: E2QWRUHAPOMQZL. - IfMatch *string `location:"header" locationName:"If-Match" 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 DeleteFieldLevelEncryptionConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteFieldLevelEncryptionConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteFieldLevelEncryptionConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteFieldLevelEncryptionConfigInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeleteFieldLevelEncryptionConfigInput) SetId(v string) *DeleteFieldLevelEncryptionConfigInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *DeleteFieldLevelEncryptionConfigInput) SetIfMatch(v string) *DeleteFieldLevelEncryptionConfigInput { - s.IfMatch = &v - return s -} - -type DeleteFieldLevelEncryptionConfigOutput 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 DeleteFieldLevelEncryptionConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteFieldLevelEncryptionConfigOutput) GoString() string { - return s.String() -} - -type DeleteFieldLevelEncryptionProfileInput struct { - _ struct{} `locationName:"DeleteFieldLevelEncryptionProfileRequest" type:"structure"` - - // Request the ID of the profile you want to delete from CloudFront. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The value of the ETag header that you received when retrieving the profile - // to delete. For example: E2QWRUHAPOMQZL. - IfMatch *string `location:"header" locationName:"If-Match" 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 DeleteFieldLevelEncryptionProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteFieldLevelEncryptionProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteFieldLevelEncryptionProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteFieldLevelEncryptionProfileInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeleteFieldLevelEncryptionProfileInput) SetId(v string) *DeleteFieldLevelEncryptionProfileInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *DeleteFieldLevelEncryptionProfileInput) SetIfMatch(v string) *DeleteFieldLevelEncryptionProfileInput { - s.IfMatch = &v - return s -} - -type DeleteFieldLevelEncryptionProfileOutput 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 DeleteFieldLevelEncryptionProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteFieldLevelEncryptionProfileOutput) GoString() string { - return s.String() -} - -type DeleteFunctionInput struct { - _ struct{} `locationName:"DeleteFunctionRequest" type:"structure"` - - // The current version (ETag value) of the function that you are deleting, which - // you can get using DescribeFunction. - // - // IfMatch is a required field - IfMatch *string `location:"header" locationName:"If-Match" type:"string" required:"true"` - - // The name of the function that you are deleting. - // - // Name is a required field - Name *string `location:"uri" locationName:"Name" 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 DeleteFunctionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteFunctionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteFunctionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteFunctionInput"} - if s.IfMatch == nil { - invalidParams.Add(request.NewErrParamRequired("IfMatch")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIfMatch sets the IfMatch field's value. -func (s *DeleteFunctionInput) SetIfMatch(v string) *DeleteFunctionInput { - s.IfMatch = &v - return s -} - -// SetName sets the Name field's value. -func (s *DeleteFunctionInput) SetName(v string) *DeleteFunctionInput { - s.Name = &v - return s -} - -type DeleteFunctionOutput 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 DeleteFunctionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteFunctionOutput) GoString() string { - return s.String() -} - -type DeleteKeyGroupInput struct { - _ struct{} `locationName:"DeleteKeyGroupRequest" type:"structure"` - - // The identifier of the key group that you are deleting. To get the identifier, - // use ListKeyGroups. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The version of the key group that you are deleting. The version is the key - // group's ETag value. To get the ETag, use GetKeyGroup or GetKeyGroupConfig. - IfMatch *string `location:"header" locationName:"If-Match" 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 DeleteKeyGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteKeyGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteKeyGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteKeyGroupInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeleteKeyGroupInput) SetId(v string) *DeleteKeyGroupInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *DeleteKeyGroupInput) SetIfMatch(v string) *DeleteKeyGroupInput { - s.IfMatch = &v - return s -} - -type DeleteKeyGroupOutput 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 DeleteKeyGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteKeyGroupOutput) GoString() string { - return s.String() -} - -type DeleteKeyValueStoreInput struct { - _ struct{} `locationName:"DeleteKeyValueStoreRequest" type:"structure"` - - // The key value store to delete, if a match occurs. - // - // IfMatch is a required field - IfMatch *string `location:"header" locationName:"If-Match" type:"string" required:"true"` - - // The name of the key value store. - // - // Name is a required field - Name *string `location:"uri" locationName:"Name" 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 DeleteKeyValueStoreInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteKeyValueStoreInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteKeyValueStoreInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteKeyValueStoreInput"} - if s.IfMatch == nil { - invalidParams.Add(request.NewErrParamRequired("IfMatch")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIfMatch sets the IfMatch field's value. -func (s *DeleteKeyValueStoreInput) SetIfMatch(v string) *DeleteKeyValueStoreInput { - s.IfMatch = &v - return s -} - -// SetName sets the Name field's value. -func (s *DeleteKeyValueStoreInput) SetName(v string) *DeleteKeyValueStoreInput { - s.Name = &v - return s -} - -type DeleteKeyValueStoreOutput 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 DeleteKeyValueStoreOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteKeyValueStoreOutput) GoString() string { - return s.String() -} - -type DeleteMonitoringSubscriptionInput struct { - _ struct{} `locationName:"DeleteMonitoringSubscriptionRequest" type:"structure"` - - // The ID of the distribution that you are disabling metrics for. - // - // DistributionId is a required field - DistributionId *string `location:"uri" locationName:"DistributionId" 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 DeleteMonitoringSubscriptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteMonitoringSubscriptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteMonitoringSubscriptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteMonitoringSubscriptionInput"} - if s.DistributionId == nil { - invalidParams.Add(request.NewErrParamRequired("DistributionId")) - } - if s.DistributionId != nil && len(*s.DistributionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DistributionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDistributionId sets the DistributionId field's value. -func (s *DeleteMonitoringSubscriptionInput) SetDistributionId(v string) *DeleteMonitoringSubscriptionInput { - s.DistributionId = &v - return s -} - -type DeleteMonitoringSubscriptionOutput 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 DeleteMonitoringSubscriptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteMonitoringSubscriptionOutput) GoString() string { - return s.String() -} - -type DeleteOriginAccessControlInput struct { - _ struct{} `locationName:"DeleteOriginAccessControlRequest" type:"structure"` - - // The unique identifier of the origin access control that you are deleting. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The current version (ETag value) of the origin access control that you are - // deleting. - IfMatch *string `location:"header" locationName:"If-Match" 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 DeleteOriginAccessControlInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteOriginAccessControlInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteOriginAccessControlInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteOriginAccessControlInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeleteOriginAccessControlInput) SetId(v string) *DeleteOriginAccessControlInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *DeleteOriginAccessControlInput) SetIfMatch(v string) *DeleteOriginAccessControlInput { - s.IfMatch = &v - return s -} - -type DeleteOriginAccessControlOutput 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 DeleteOriginAccessControlOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteOriginAccessControlOutput) GoString() string { - return s.String() -} - -type DeleteOriginRequestPolicyInput struct { - _ struct{} `locationName:"DeleteOriginRequestPolicyRequest" type:"structure"` - - // The unique identifier for the origin request policy that you are deleting. - // To get the identifier, you can use ListOriginRequestPolicies. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The version of the origin request policy that you are deleting. The version - // is the origin request policy's ETag value, which you can get using ListOriginRequestPolicies, - // GetOriginRequestPolicy, or GetOriginRequestPolicyConfig. - IfMatch *string `location:"header" locationName:"If-Match" 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 DeleteOriginRequestPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteOriginRequestPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteOriginRequestPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteOriginRequestPolicyInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeleteOriginRequestPolicyInput) SetId(v string) *DeleteOriginRequestPolicyInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *DeleteOriginRequestPolicyInput) SetIfMatch(v string) *DeleteOriginRequestPolicyInput { - s.IfMatch = &v - return s -} - -type DeleteOriginRequestPolicyOutput 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 DeleteOriginRequestPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteOriginRequestPolicyOutput) GoString() string { - return s.String() -} - -type DeletePublicKeyInput struct { - _ struct{} `locationName:"DeletePublicKeyRequest" type:"structure"` - - // The ID of the public key you want to remove from CloudFront. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The value of the ETag header that you received when retrieving the public - // key identity to delete. For example: E2QWRUHAPOMQZL. - IfMatch *string `location:"header" locationName:"If-Match" 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 DeletePublicKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeletePublicKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeletePublicKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeletePublicKeyInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeletePublicKeyInput) SetId(v string) *DeletePublicKeyInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *DeletePublicKeyInput) SetIfMatch(v string) *DeletePublicKeyInput { - s.IfMatch = &v - return s -} - -type DeletePublicKeyOutput 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 DeletePublicKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeletePublicKeyOutput) GoString() string { - return s.String() -} - -type DeleteRealtimeLogConfigInput struct { - _ struct{} `locationName:"DeleteRealtimeLogConfigRequest" type:"structure" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` - - // The Amazon Resource Name (ARN) of the real-time log configuration to delete. - ARN *string `type:"string"` - - // The name of the real-time log configuration to delete. - 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 DeleteRealtimeLogConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteRealtimeLogConfigInput) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *DeleteRealtimeLogConfigInput) SetARN(v string) *DeleteRealtimeLogConfigInput { - s.ARN = &v - return s -} - -// SetName sets the Name field's value. -func (s *DeleteRealtimeLogConfigInput) SetName(v string) *DeleteRealtimeLogConfigInput { - s.Name = &v - return s -} - -type DeleteRealtimeLogConfigOutput 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 DeleteRealtimeLogConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteRealtimeLogConfigOutput) GoString() string { - return s.String() -} - -type DeleteResponseHeadersPolicyInput struct { - _ struct{} `locationName:"DeleteResponseHeadersPolicyRequest" type:"structure"` - - // The identifier for the response headers policy that you are deleting. - // - // To get the identifier, you can use ListResponseHeadersPolicies. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The version of the response headers policy that you are deleting. - // - // The version is the response headers policy's ETag value, which you can get - // using ListResponseHeadersPolicies, GetResponseHeadersPolicy, or GetResponseHeadersPolicyConfig. - IfMatch *string `location:"header" locationName:"If-Match" 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 DeleteResponseHeadersPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteResponseHeadersPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteResponseHeadersPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteResponseHeadersPolicyInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeleteResponseHeadersPolicyInput) SetId(v string) *DeleteResponseHeadersPolicyInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *DeleteResponseHeadersPolicyInput) SetIfMatch(v string) *DeleteResponseHeadersPolicyInput { - s.IfMatch = &v - return s -} - -type DeleteResponseHeadersPolicyOutput 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 DeleteResponseHeadersPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteResponseHeadersPolicyOutput) GoString() string { - return s.String() -} - -// The request to delete a streaming distribution. -type DeleteStreamingDistributionInput struct { - _ struct{} `locationName:"DeleteStreamingDistributionRequest" type:"structure"` - - // The distribution ID. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The value of the ETag header that you received when you disabled the streaming - // distribution. For example: E2QWRUHAPOMQZL. - IfMatch *string `location:"header" locationName:"If-Match" 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 DeleteStreamingDistributionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteStreamingDistributionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteStreamingDistributionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteStreamingDistributionInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *DeleteStreamingDistributionInput) SetId(v string) *DeleteStreamingDistributionInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *DeleteStreamingDistributionInput) SetIfMatch(v string) *DeleteStreamingDistributionInput { - s.IfMatch = &v - return s -} - -type DeleteStreamingDistributionOutput 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 DeleteStreamingDistributionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteStreamingDistributionOutput) GoString() string { - return s.String() -} - -type DescribeFunctionInput struct { - _ struct{} `locationName:"DescribeFunctionRequest" type:"structure"` - - // The name of the function that you are getting information about. - // - // Name is a required field - Name *string `location:"uri" locationName:"Name" type:"string" required:"true"` - - // The function's stage, either DEVELOPMENT or LIVE. - Stage *string `location:"querystring" locationName:"Stage" type:"string" enum:"FunctionStage"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeFunctionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeFunctionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeFunctionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeFunctionInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DescribeFunctionInput) SetName(v string) *DescribeFunctionInput { - s.Name = &v - return s -} - -// SetStage sets the Stage field's value. -func (s *DescribeFunctionInput) SetStage(v string) *DescribeFunctionInput { - s.Stage = &v - return s -} - -type DescribeFunctionOutput struct { - _ struct{} `type:"structure" payload:"FunctionSummary"` - - // The version identifier for the current version of the CloudFront function. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // Contains configuration information and metadata about a CloudFront function. - FunctionSummary *FunctionSummary `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 DescribeFunctionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeFunctionOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *DescribeFunctionOutput) SetETag(v string) *DescribeFunctionOutput { - s.ETag = &v - return s -} - -// SetFunctionSummary sets the FunctionSummary field's value. -func (s *DescribeFunctionOutput) SetFunctionSummary(v *FunctionSummary) *DescribeFunctionOutput { - s.FunctionSummary = v - return s -} - -type DescribeKeyValueStoreInput struct { - _ struct{} `locationName:"DescribeKeyValueStoreRequest" type:"structure"` - - // The name of the key value store. - // - // Name is a required field - Name *string `location:"uri" locationName:"Name" 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 DescribeKeyValueStoreInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeKeyValueStoreInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeKeyValueStoreInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeKeyValueStoreInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *DescribeKeyValueStoreInput) SetName(v string) *DescribeKeyValueStoreInput { - s.Name = &v - return s -} - -type DescribeKeyValueStoreOutput struct { - _ struct{} `type:"structure" payload:"KeyValueStore"` - - // The ETag of the resulting key value store. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The resulting key value store. - KeyValueStore *KeyValueStore `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 DescribeKeyValueStoreOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeKeyValueStoreOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *DescribeKeyValueStoreOutput) SetETag(v string) *DescribeKeyValueStoreOutput { - s.ETag = &v - return s -} - -// SetKeyValueStore sets the KeyValueStore field's value. -func (s *DescribeKeyValueStoreOutput) SetKeyValueStore(v *KeyValueStore) *DescribeKeyValueStoreOutput { - s.KeyValueStore = v - return s -} - -// A distribution tells CloudFront where you want content to be delivered from, -// and the details about how to track and manage content delivery. -type Distribution struct { - _ struct{} `type:"structure"` - - // The distribution's Amazon Resource Name (ARN). - // - // ARN is a required field - ARN *string `type:"string" required:"true"` - - // This field contains a list of key groups and the public keys in each key - // group that CloudFront can use to verify the signatures of signed URLs or - // signed cookies. - ActiveTrustedKeyGroups *ActiveTrustedKeyGroups `type:"structure"` - - // - // We recommend using TrustedKeyGroups instead of TrustedSigners. - // - // This field contains a list of Amazon Web Services account IDs and the active - // CloudFront key pairs in each account that CloudFront can use to verify the - // signatures of signed URLs or signed cookies. - ActiveTrustedSigners *ActiveTrustedSigners `type:"structure"` - - // Amazon Web Services services in China customers must file for an Internet - // Content Provider (ICP) recordal if they want to serve content publicly on - // an alternate domain name, also known as a CNAME, that they've added to CloudFront. - // AliasICPRecordal provides the ICP recordal status for CNAMEs associated with - // distributions. - // - // For more information about ICP recordals, see Signup, Accounts, and Credentials - // (https://docs.amazonaws.cn/en_us/aws/latest/userguide/accounts-and-credentials.html) - // in Getting Started with Amazon Web Services services in China. - AliasICPRecordals []*AliasICPRecordal `locationNameList:"AliasICPRecordal" type:"list"` - - // The distribution's configuration. - // - // DistributionConfig is a required field - DistributionConfig *DistributionConfig `type:"structure" required:"true"` - - // The distribution's CloudFront domain name. For example: d111111abcdef8.cloudfront.net. - // - // DomainName is a required field - DomainName *string `type:"string" required:"true"` - - // The distribution's identifier. For example: E1U5RQF7T870K0. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The number of invalidation batches currently in progress. - // - // InProgressInvalidationBatches is a required field - InProgressInvalidationBatches *int64 `type:"integer" required:"true"` - - // The date and time when the distribution was last modified. - // - // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" required:"true"` - - // The distribution's status. When the status is Deployed, the distribution's - // information is fully propagated to all CloudFront edge locations. - // - // Status is a required field - Status *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 Distribution) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Distribution) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *Distribution) SetARN(v string) *Distribution { - s.ARN = &v - return s -} - -// SetActiveTrustedKeyGroups sets the ActiveTrustedKeyGroups field's value. -func (s *Distribution) SetActiveTrustedKeyGroups(v *ActiveTrustedKeyGroups) *Distribution { - s.ActiveTrustedKeyGroups = v - return s -} - -// SetActiveTrustedSigners sets the ActiveTrustedSigners field's value. -func (s *Distribution) SetActiveTrustedSigners(v *ActiveTrustedSigners) *Distribution { - s.ActiveTrustedSigners = v - return s -} - -// SetAliasICPRecordals sets the AliasICPRecordals field's value. -func (s *Distribution) SetAliasICPRecordals(v []*AliasICPRecordal) *Distribution { - s.AliasICPRecordals = v - return s -} - -// SetDistributionConfig sets the DistributionConfig field's value. -func (s *Distribution) SetDistributionConfig(v *DistributionConfig) *Distribution { - s.DistributionConfig = v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *Distribution) SetDomainName(v string) *Distribution { - s.DomainName = &v - return s -} - -// SetId sets the Id field's value. -func (s *Distribution) SetId(v string) *Distribution { - s.Id = &v - return s -} - -// SetInProgressInvalidationBatches sets the InProgressInvalidationBatches field's value. -func (s *Distribution) SetInProgressInvalidationBatches(v int64) *Distribution { - s.InProgressInvalidationBatches = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *Distribution) SetLastModifiedTime(v time.Time) *Distribution { - s.LastModifiedTime = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Distribution) SetStatus(v string) *Distribution { - s.Status = &v - return s -} - -// A distribution configuration. -type DistributionConfig struct { - _ struct{} `type:"structure"` - - // A complex type that contains information about CNAMEs (alternate domain names), - // if any, for this distribution. - Aliases *Aliases `type:"structure"` - - // A complex type that contains zero or more CacheBehavior elements. - CacheBehaviors *CacheBehaviors `type:"structure"` - - // A unique value (for example, a date-time stamp) that ensures that the request - // can't be replayed. - // - // If the value of CallerReference is new (regardless of the content of the - // DistributionConfig object), CloudFront creates a new distribution. - // - // If CallerReference is a value that you already sent in a previous request - // to create a distribution, CloudFront returns a DistributionAlreadyExists - // error. - // - // CallerReference is a required field - CallerReference *string `type:"string" required:"true"` - - // A comment to describe the distribution. The comment cannot be longer than - // 128 characters. - // - // Comment is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by DistributionConfig's - // String and GoString methods. - // - // Comment is a required field - Comment *string `type:"string" required:"true" sensitive:"true"` - - // The identifier of a continuous deployment policy. For more information, see - // CreateContinuousDeploymentPolicy. - ContinuousDeploymentPolicyId *string `type:"string"` - - // A complex type that controls the following: - // - // * Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range - // with custom error messages before returning the response to the viewer. - // - // * How long CloudFront caches HTTP status codes in the 4xx and 5xx range. - // - // For more information about custom error pages, see Customizing Error Responses - // (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html) - // in the Amazon CloudFront Developer Guide. - CustomErrorResponses *CustomErrorResponses `type:"structure"` - - // A complex type that describes the default cache behavior if you don't specify - // a CacheBehavior element or if files don't match any of the values of PathPattern - // in CacheBehavior elements. You must create exactly one default cache behavior. - // - // DefaultCacheBehavior is a required field - DefaultCacheBehavior *DefaultCacheBehavior `type:"structure" required:"true"` - - // The object that you want CloudFront to request from your origin (for example, - // index.html) when a viewer requests the root URL for your distribution (https://www.example.com) - // instead of an object in your distribution (https://www.example.com/product-description.html). - // Specifying a default root object avoids exposing the contents of your distribution. - // - // Specify only the object name, for example, index.html. Don't add a / before - // the object name. - // - // If you don't want to specify a default root object when you create a distribution, - // include an empty DefaultRootObject element. - // - // To delete the default root object from an existing distribution, update the - // distribution configuration and include an empty DefaultRootObject element. - // - // To replace the default root object, update the distribution configuration - // and specify the new object. - // - // For more information about the default root object, see Creating a Default - // Root Object (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/DefaultRootObject.html) - // in the Amazon CloudFront Developer Guide. - DefaultRootObject *string `type:"string"` - - // From this field, you can enable or disable the selected distribution. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` - - // (Optional) Specify the HTTP version(s) that you want viewers to use to communicate - // with CloudFront. The default value for new web distributions is http2. Viewers - // that don't support HTTP/2 automatically use an earlier HTTP version. - // - // For viewers and CloudFront to use HTTP/2, viewers must support TLSv1.2 or - // later, and must support Server Name Indication (SNI). - // - // For viewers and CloudFront to use HTTP/3, viewers must support TLSv1.3 and - // Server Name Indication (SNI). CloudFront supports HTTP/3 connection migration - // to allow the viewer to switch networks without losing connection. For more - // information about connection migration, see Connection Migration (https://www.rfc-editor.org/rfc/rfc9000.html#name-connection-migration) - // at RFC 9000. For more information about supported TLSv1.3 ciphers, see Supported - // protocols and ciphers between viewers and CloudFront (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/secure-connections-supported-viewer-protocols-ciphers.html). - HttpVersion *string `type:"string" enum:"HttpVersion"` - - // If you want CloudFront to respond to IPv6 DNS requests with an IPv6 address - // for your distribution, specify true. If you specify false, CloudFront responds - // to IPv6 DNS requests with the DNS response code NOERROR and with no IP addresses. - // This allows viewers to submit a second request, for an IPv4 address for your - // distribution. - // - // In general, you should enable IPv6 if you have users on IPv6 networks who - // want to access your content. However, if you're using signed URLs or signed - // cookies to restrict access to your content, and if you're using a custom - // policy that includes the IpAddress parameter to restrict the IP addresses - // that can access your content, don't enable IPv6. If you want to restrict - // access to some content by IP address and not restrict access to other content - // (or restrict access but not by IP address), you can create two distributions. - // For more information, see Creating a Signed URL Using a Custom Policy (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-creating-signed-url-custom-policy.html) - // in the Amazon CloudFront Developer Guide. - // - // If you're using an Route 53 Amazon Web Services Integration alias resource - // record set to route traffic to your CloudFront distribution, you need to - // create a second alias resource record set when both of the following are - // true: - // - // * You enable IPv6 for the distribution - // - // * You're using alternate domain names in the URLs for your objects - // - // For more information, see Routing Traffic to an Amazon CloudFront Web Distribution - // by Using Your Domain Name (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-cloudfront-distribution.html) - // in the Route 53 Amazon Web Services Integration Developer Guide. - // - // If you created a CNAME resource record set, either with Route 53 Amazon Web - // Services Integration or with another DNS service, you don't need to make - // any changes. A CNAME record will route traffic to your distribution regardless - // of the IP address format of the viewer request. - IsIPV6Enabled *bool `type:"boolean"` - - // A complex type that controls whether access logs are written for the distribution. - // - // For more information about logging, see Access Logs (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html) - // in the Amazon CloudFront Developer Guide. - Logging *LoggingConfig `type:"structure"` - - // A complex type that contains information about origin groups for this distribution. - OriginGroups *OriginGroups `type:"structure"` - - // A complex type that contains information about origins for this distribution. - // - // Origins is a required field - Origins *Origins `type:"structure" required:"true"` - - // The price class that corresponds with the maximum price that you want to - // pay for CloudFront service. If you specify PriceClass_All, CloudFront responds - // to requests for your objects from all CloudFront edge locations. - // - // If you specify a price class other than PriceClass_All, CloudFront serves - // your objects from the CloudFront edge location that has the lowest latency - // among the edge locations in your price class. Viewers who are in or near - // regions that are excluded from your specified price class may encounter slower - // performance. - // - // For more information about price classes, see Choosing the Price Class for - // a CloudFront Distribution (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PriceClass.html) - // in the Amazon CloudFront Developer Guide. For information about CloudFront - // pricing, including how price classes (such as Price Class 100) map to CloudFront - // regions, see Amazon CloudFront Pricing (http://aws.amazon.com/cloudfront/pricing/). - PriceClass *string `type:"string" enum:"PriceClass"` - - // A complex type that identifies ways in which you want to restrict distribution - // of your content. - Restrictions *Restrictions `type:"structure"` - - // A Boolean that indicates whether this is a staging distribution. When this - // value is true, this is a staging distribution. When this value is false, - // this is not a staging distribution. - Staging *bool `type:"boolean"` - - // A complex type that determines the distribution's SSL/TLS configuration for - // communicating with viewers. - ViewerCertificate *ViewerCertificate `type:"structure"` - - // A unique identifier that specifies the WAF web ACL, if any, to associate - // with this distribution. To specify a web ACL created using the latest version - // of WAF, use the ACL ARN, for example arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111. - // To specify a web ACL created using WAF Classic, use the ACL ID, for example - // a1b2c3d4-5678-90ab-cdef-EXAMPLE11111. - // - // WAF is a web application firewall that lets you monitor the HTTP and HTTPS - // requests that are forwarded to CloudFront, and lets you control access to - // your content. Based on conditions that you specify, such as the IP addresses - // that requests originate from or the values of query strings, CloudFront responds - // to requests either with the requested content or with an HTTP 403 status - // code (Forbidden). You can also configure CloudFront to return a custom error - // page when a request is blocked. For more information about WAF, see the WAF - // Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/what-is-aws-waf.html). - WebACLId *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 DistributionConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DistributionConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DistributionConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DistributionConfig"} - if s.CallerReference == nil { - invalidParams.Add(request.NewErrParamRequired("CallerReference")) - } - if s.Comment == nil { - invalidParams.Add(request.NewErrParamRequired("Comment")) - } - if s.DefaultCacheBehavior == nil { - invalidParams.Add(request.NewErrParamRequired("DefaultCacheBehavior")) - } - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - if s.Origins == nil { - invalidParams.Add(request.NewErrParamRequired("Origins")) - } - if s.Aliases != nil { - if err := s.Aliases.Validate(); err != nil { - invalidParams.AddNested("Aliases", err.(request.ErrInvalidParams)) - } - } - if s.CacheBehaviors != nil { - if err := s.CacheBehaviors.Validate(); err != nil { - invalidParams.AddNested("CacheBehaviors", err.(request.ErrInvalidParams)) - } - } - if s.CustomErrorResponses != nil { - if err := s.CustomErrorResponses.Validate(); err != nil { - invalidParams.AddNested("CustomErrorResponses", err.(request.ErrInvalidParams)) - } - } - if s.DefaultCacheBehavior != nil { - if err := s.DefaultCacheBehavior.Validate(); err != nil { - invalidParams.AddNested("DefaultCacheBehavior", err.(request.ErrInvalidParams)) - } - } - if s.Logging != nil { - if err := s.Logging.Validate(); err != nil { - invalidParams.AddNested("Logging", err.(request.ErrInvalidParams)) - } - } - if s.OriginGroups != nil { - if err := s.OriginGroups.Validate(); err != nil { - invalidParams.AddNested("OriginGroups", err.(request.ErrInvalidParams)) - } - } - if s.Origins != nil { - if err := s.Origins.Validate(); err != nil { - invalidParams.AddNested("Origins", err.(request.ErrInvalidParams)) - } - } - if s.Restrictions != nil { - if err := s.Restrictions.Validate(); err != nil { - invalidParams.AddNested("Restrictions", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAliases sets the Aliases field's value. -func (s *DistributionConfig) SetAliases(v *Aliases) *DistributionConfig { - s.Aliases = v - return s -} - -// SetCacheBehaviors sets the CacheBehaviors field's value. -func (s *DistributionConfig) SetCacheBehaviors(v *CacheBehaviors) *DistributionConfig { - s.CacheBehaviors = v - return s -} - -// SetCallerReference sets the CallerReference field's value. -func (s *DistributionConfig) SetCallerReference(v string) *DistributionConfig { - s.CallerReference = &v - return s -} - -// SetComment sets the Comment field's value. -func (s *DistributionConfig) SetComment(v string) *DistributionConfig { - s.Comment = &v - return s -} - -// SetContinuousDeploymentPolicyId sets the ContinuousDeploymentPolicyId field's value. -func (s *DistributionConfig) SetContinuousDeploymentPolicyId(v string) *DistributionConfig { - s.ContinuousDeploymentPolicyId = &v - return s -} - -// SetCustomErrorResponses sets the CustomErrorResponses field's value. -func (s *DistributionConfig) SetCustomErrorResponses(v *CustomErrorResponses) *DistributionConfig { - s.CustomErrorResponses = v - return s -} - -// SetDefaultCacheBehavior sets the DefaultCacheBehavior field's value. -func (s *DistributionConfig) SetDefaultCacheBehavior(v *DefaultCacheBehavior) *DistributionConfig { - s.DefaultCacheBehavior = v - return s -} - -// SetDefaultRootObject sets the DefaultRootObject field's value. -func (s *DistributionConfig) SetDefaultRootObject(v string) *DistributionConfig { - s.DefaultRootObject = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *DistributionConfig) SetEnabled(v bool) *DistributionConfig { - s.Enabled = &v - return s -} - -// SetHttpVersion sets the HttpVersion field's value. -func (s *DistributionConfig) SetHttpVersion(v string) *DistributionConfig { - s.HttpVersion = &v - return s -} - -// SetIsIPV6Enabled sets the IsIPV6Enabled field's value. -func (s *DistributionConfig) SetIsIPV6Enabled(v bool) *DistributionConfig { - s.IsIPV6Enabled = &v - return s -} - -// SetLogging sets the Logging field's value. -func (s *DistributionConfig) SetLogging(v *LoggingConfig) *DistributionConfig { - s.Logging = v - return s -} - -// SetOriginGroups sets the OriginGroups field's value. -func (s *DistributionConfig) SetOriginGroups(v *OriginGroups) *DistributionConfig { - s.OriginGroups = v - return s -} - -// SetOrigins sets the Origins field's value. -func (s *DistributionConfig) SetOrigins(v *Origins) *DistributionConfig { - s.Origins = v - return s -} - -// SetPriceClass sets the PriceClass field's value. -func (s *DistributionConfig) SetPriceClass(v string) *DistributionConfig { - s.PriceClass = &v - return s -} - -// SetRestrictions sets the Restrictions field's value. -func (s *DistributionConfig) SetRestrictions(v *Restrictions) *DistributionConfig { - s.Restrictions = v - return s -} - -// SetStaging sets the Staging field's value. -func (s *DistributionConfig) SetStaging(v bool) *DistributionConfig { - s.Staging = &v - return s -} - -// SetViewerCertificate sets the ViewerCertificate field's value. -func (s *DistributionConfig) SetViewerCertificate(v *ViewerCertificate) *DistributionConfig { - s.ViewerCertificate = v - return s -} - -// SetWebACLId sets the WebACLId field's value. -func (s *DistributionConfig) SetWebACLId(v string) *DistributionConfig { - s.WebACLId = &v - return s -} - -// A distribution Configuration and a list of tags to be associated with the -// distribution. -type DistributionConfigWithTags struct { - _ struct{} `type:"structure"` - - // A distribution configuration. - // - // DistributionConfig is a required field - DistributionConfig *DistributionConfig `type:"structure" required:"true"` - - // A complex type that contains zero or more Tag elements. - // - // Tags is a required field - Tags *Tags `type:"structure" 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 DistributionConfigWithTags) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DistributionConfigWithTags) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DistributionConfigWithTags) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DistributionConfigWithTags"} - if s.DistributionConfig == nil { - invalidParams.Add(request.NewErrParamRequired("DistributionConfig")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.DistributionConfig != nil { - if err := s.DistributionConfig.Validate(); err != nil { - invalidParams.AddNested("DistributionConfig", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - if err := s.Tags.Validate(); err != nil { - invalidParams.AddNested("Tags", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDistributionConfig sets the DistributionConfig field's value. -func (s *DistributionConfigWithTags) SetDistributionConfig(v *DistributionConfig) *DistributionConfigWithTags { - s.DistributionConfig = v - return s -} - -// SetTags sets the Tags field's value. -func (s *DistributionConfigWithTags) SetTags(v *Tags) *DistributionConfigWithTags { - s.Tags = v - return s -} - -// A list of distribution IDs. -type DistributionIdList struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether more distribution IDs remain to be listed. - // If your results were truncated, you can make a subsequent request using the - // Marker request field to retrieve more distribution IDs in the list. - // - // IsTruncated is a required field - IsTruncated *bool `type:"boolean" required:"true"` - - // Contains the distribution IDs in the list. - Items []*string `locationNameList:"DistributionId" type:"list"` - - // The value provided in the Marker request field. - // - // Marker is a required field - Marker *string `type:"string" required:"true"` - - // The maximum number of distribution IDs requested. - // - // MaxItems is a required field - MaxItems *int64 `type:"integer" required:"true"` - - // Contains the value that you should use in the Marker field of a subsequent - // request to continue listing distribution IDs where you left off. - NextMarker *string `type:"string"` - - // The total number of distribution IDs returned in the response. - // - // Quantity is a required field - Quantity *int64 `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 DistributionIdList) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DistributionIdList) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *DistributionIdList) SetIsTruncated(v bool) *DistributionIdList { - s.IsTruncated = &v - return s -} - -// SetItems sets the Items field's value. -func (s *DistributionIdList) SetItems(v []*string) *DistributionIdList { - s.Items = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DistributionIdList) SetMarker(v string) *DistributionIdList { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *DistributionIdList) SetMaxItems(v int64) *DistributionIdList { - s.MaxItems = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DistributionIdList) SetNextMarker(v string) *DistributionIdList { - s.NextMarker = &v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *DistributionIdList) SetQuantity(v int64) *DistributionIdList { - s.Quantity = &v - return s -} - -// A distribution list. -type DistributionList struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether more distributions remain to be listed. If - // your results were truncated, you can make a follow-up pagination request - // using the Marker request parameter to retrieve more distributions in the - // list. - // - // IsTruncated is a required field - IsTruncated *bool `type:"boolean" required:"true"` - - // A complex type that contains one DistributionSummary element for each distribution - // that was created by the current Amazon Web Services account. - Items []*DistributionSummary `locationNameList:"DistributionSummary" type:"list"` - - // The value you provided for the Marker request parameter. - // - // Marker is a required field - Marker *string `type:"string" required:"true"` - - // The value you provided for the MaxItems request parameter. - // - // MaxItems is a required field - MaxItems *int64 `type:"integer" required:"true"` - - // If IsTruncated is true, this element is present and contains the value you - // can use for the Marker request parameter to continue listing your distributions - // where they left off. - NextMarker *string `type:"string"` - - // The number of distributions that were created by the current Amazon Web Services - // account. - // - // Quantity is a required field - Quantity *int64 `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 DistributionList) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DistributionList) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *DistributionList) SetIsTruncated(v bool) *DistributionList { - s.IsTruncated = &v - return s -} - -// SetItems sets the Items field's value. -func (s *DistributionList) SetItems(v []*DistributionSummary) *DistributionList { - s.Items = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DistributionList) SetMarker(v string) *DistributionList { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *DistributionList) SetMaxItems(v int64) *DistributionList { - s.MaxItems = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DistributionList) SetNextMarker(v string) *DistributionList { - s.NextMarker = &v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *DistributionList) SetQuantity(v int64) *DistributionList { - s.Quantity = &v - return s -} - -// A summary of the information about a CloudFront distribution. -type DistributionSummary struct { - _ struct{} `type:"structure"` - - // The ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, - // where 123456789012 is your Amazon Web Services account ID. - // - // ARN is a required field - ARN *string `type:"string" required:"true"` - - // Amazon Web Services services in China customers must file for an Internet - // Content Provider (ICP) recordal if they want to serve content publicly on - // an alternate domain name, also known as a CNAME, that they've added to CloudFront. - // AliasICPRecordal provides the ICP recordal status for CNAMEs associated with - // distributions. - // - // For more information about ICP recordals, see Signup, Accounts, and Credentials - // (https://docs.amazonaws.cn/en_us/aws/latest/userguide/accounts-and-credentials.html) - // in Getting Started with Amazon Web Services services in China. - AliasICPRecordals []*AliasICPRecordal `locationNameList:"AliasICPRecordal" type:"list"` - - // A complex type that contains information about CNAMEs (alternate domain names), - // if any, for this distribution. - // - // Aliases is a required field - Aliases *Aliases `type:"structure" required:"true"` - - // A complex type that contains zero or more CacheBehavior elements. - // - // CacheBehaviors is a required field - CacheBehaviors *CacheBehaviors `type:"structure" required:"true"` - - // The comment originally specified when this distribution was created. - // - // Comment is a required field - Comment *string `type:"string" required:"true"` - - // A complex type that contains zero or more CustomErrorResponses elements. - // - // CustomErrorResponses is a required field - CustomErrorResponses *CustomErrorResponses `type:"structure" required:"true"` - - // A complex type that describes the default cache behavior if you don't specify - // a CacheBehavior element or if files don't match any of the values of PathPattern - // in CacheBehavior elements. You must create exactly one default cache behavior. - // - // DefaultCacheBehavior is a required field - DefaultCacheBehavior *DefaultCacheBehavior `type:"structure" required:"true"` - - // The domain name that corresponds to the distribution, for example, d111111abcdef8.cloudfront.net. - // - // DomainName is a required field - DomainName *string `type:"string" required:"true"` - - // Whether the distribution is enabled to accept user requests for content. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` - - // Specify the maximum HTTP version that you want viewers to use to communicate - // with CloudFront. The default value for new web distributions is http2. Viewers - // that don't support HTTP/2 will automatically use an earlier version. - // - // HttpVersion is a required field - HttpVersion *string `type:"string" required:"true" enum:"HttpVersion"` - - // The identifier for the distribution. For example: EDFDVBD632BHDS5. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // Whether CloudFront responds to IPv6 DNS requests with an IPv6 address for - // your distribution. - // - // IsIPV6Enabled is a required field - IsIPV6Enabled *bool `type:"boolean" required:"true"` - - // The date and time the distribution was last modified. - // - // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" required:"true"` - - // A complex type that contains information about origin groups for this distribution. - OriginGroups *OriginGroups `type:"structure"` - - // A complex type that contains information about origins for this distribution. - // - // Origins is a required field - Origins *Origins `type:"structure" required:"true"` - - // A complex type that contains information about price class for this streaming - // distribution. - // - // PriceClass is a required field - PriceClass *string `type:"string" required:"true" enum:"PriceClass"` - - // A complex type that identifies ways in which you want to restrict distribution - // of your content. - // - // Restrictions is a required field - Restrictions *Restrictions `type:"structure" required:"true"` - - // A Boolean that indicates whether this is a staging distribution. When this - // value is true, this is a staging distribution. When this value is false, - // this is not a staging distribution. - // - // Staging is a required field - Staging *bool `type:"boolean" required:"true"` - - // The current status of the distribution. When the status is Deployed, the - // distribution's information is propagated to all CloudFront edge locations. - // - // Status is a required field - Status *string `type:"string" required:"true"` - - // A complex type that determines the distribution's SSL/TLS configuration for - // communicating with viewers. - // - // ViewerCertificate is a required field - ViewerCertificate *ViewerCertificate `type:"structure" required:"true"` - - // The Web ACL Id (if any) associated with the distribution. - // - // WebACLId is a required field - WebACLId *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 DistributionSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DistributionSummary) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *DistributionSummary) SetARN(v string) *DistributionSummary { - s.ARN = &v - return s -} - -// SetAliasICPRecordals sets the AliasICPRecordals field's value. -func (s *DistributionSummary) SetAliasICPRecordals(v []*AliasICPRecordal) *DistributionSummary { - s.AliasICPRecordals = v - return s -} - -// SetAliases sets the Aliases field's value. -func (s *DistributionSummary) SetAliases(v *Aliases) *DistributionSummary { - s.Aliases = v - return s -} - -// SetCacheBehaviors sets the CacheBehaviors field's value. -func (s *DistributionSummary) SetCacheBehaviors(v *CacheBehaviors) *DistributionSummary { - s.CacheBehaviors = v - return s -} - -// SetComment sets the Comment field's value. -func (s *DistributionSummary) SetComment(v string) *DistributionSummary { - s.Comment = &v - return s -} - -// SetCustomErrorResponses sets the CustomErrorResponses field's value. -func (s *DistributionSummary) SetCustomErrorResponses(v *CustomErrorResponses) *DistributionSummary { - s.CustomErrorResponses = v - return s -} - -// SetDefaultCacheBehavior sets the DefaultCacheBehavior field's value. -func (s *DistributionSummary) SetDefaultCacheBehavior(v *DefaultCacheBehavior) *DistributionSummary { - s.DefaultCacheBehavior = v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *DistributionSummary) SetDomainName(v string) *DistributionSummary { - s.DomainName = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *DistributionSummary) SetEnabled(v bool) *DistributionSummary { - s.Enabled = &v - return s -} - -// SetHttpVersion sets the HttpVersion field's value. -func (s *DistributionSummary) SetHttpVersion(v string) *DistributionSummary { - s.HttpVersion = &v - return s -} - -// SetId sets the Id field's value. -func (s *DistributionSummary) SetId(v string) *DistributionSummary { - s.Id = &v - return s -} - -// SetIsIPV6Enabled sets the IsIPV6Enabled field's value. -func (s *DistributionSummary) SetIsIPV6Enabled(v bool) *DistributionSummary { - s.IsIPV6Enabled = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *DistributionSummary) SetLastModifiedTime(v time.Time) *DistributionSummary { - s.LastModifiedTime = &v - return s -} - -// SetOriginGroups sets the OriginGroups field's value. -func (s *DistributionSummary) SetOriginGroups(v *OriginGroups) *DistributionSummary { - s.OriginGroups = v - return s -} - -// SetOrigins sets the Origins field's value. -func (s *DistributionSummary) SetOrigins(v *Origins) *DistributionSummary { - s.Origins = v - return s -} - -// SetPriceClass sets the PriceClass field's value. -func (s *DistributionSummary) SetPriceClass(v string) *DistributionSummary { - s.PriceClass = &v - return s -} - -// SetRestrictions sets the Restrictions field's value. -func (s *DistributionSummary) SetRestrictions(v *Restrictions) *DistributionSummary { - s.Restrictions = v - return s -} - -// SetStaging sets the Staging field's value. -func (s *DistributionSummary) SetStaging(v bool) *DistributionSummary { - s.Staging = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DistributionSummary) SetStatus(v string) *DistributionSummary { - s.Status = &v - return s -} - -// SetViewerCertificate sets the ViewerCertificate field's value. -func (s *DistributionSummary) SetViewerCertificate(v *ViewerCertificate) *DistributionSummary { - s.ViewerCertificate = v - return s -} - -// SetWebACLId sets the WebACLId field's value. -func (s *DistributionSummary) SetWebACLId(v string) *DistributionSummary { - s.WebACLId = &v - return s -} - -// Complex data type for field-level encryption profiles that includes all of -// the encryption entities. -type EncryptionEntities struct { - _ struct{} `type:"structure"` - - // An array of field patterns in a field-level encryption content type-profile - // mapping. - Items []*EncryptionEntity `locationNameList:"EncryptionEntity" type:"list"` - - // Number of field pattern items in a field-level encryption content type-profile - // mapping. - // - // Quantity is a required field - Quantity *int64 `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 EncryptionEntities) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s EncryptionEntities) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EncryptionEntities) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EncryptionEntities"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *EncryptionEntities) SetItems(v []*EncryptionEntity) *EncryptionEntities { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *EncryptionEntities) SetQuantity(v int64) *EncryptionEntities { - s.Quantity = &v - return s -} - -// Complex data type for field-level encryption profiles that includes the encryption -// key and field pattern specifications. -type EncryptionEntity struct { - _ struct{} `type:"structure"` - - // Field patterns in a field-level encryption content type profile specify the - // fields that you want to be encrypted. You can provide the full field name, - // or any beginning characters followed by a wildcard (*). You can't overlap - // field patterns. For example, you can't have both ABC* and AB*. Note that - // field patterns are case-sensitive. - // - // FieldPatterns is a required field - FieldPatterns *FieldPatterns `type:"structure" required:"true"` - - // The provider associated with the public key being used for encryption. This - // value must also be provided with the private key for applications to be able - // to decrypt data. - // - // ProviderId is a required field - ProviderId *string `type:"string" required:"true"` - - // The public key associated with a set of field-level encryption patterns, - // to be used when encrypting the fields that match the patterns. - // - // PublicKeyId is a required field - PublicKeyId *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 EncryptionEntity) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s EncryptionEntity) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EncryptionEntity) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EncryptionEntity"} - if s.FieldPatterns == nil { - invalidParams.Add(request.NewErrParamRequired("FieldPatterns")) - } - if s.ProviderId == nil { - invalidParams.Add(request.NewErrParamRequired("ProviderId")) - } - if s.PublicKeyId == nil { - invalidParams.Add(request.NewErrParamRequired("PublicKeyId")) - } - if s.FieldPatterns != nil { - if err := s.FieldPatterns.Validate(); err != nil { - invalidParams.AddNested("FieldPatterns", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFieldPatterns sets the FieldPatterns field's value. -func (s *EncryptionEntity) SetFieldPatterns(v *FieldPatterns) *EncryptionEntity { - s.FieldPatterns = v - return s -} - -// SetProviderId sets the ProviderId field's value. -func (s *EncryptionEntity) SetProviderId(v string) *EncryptionEntity { - s.ProviderId = &v - return s -} - -// SetPublicKeyId sets the PublicKeyId field's value. -func (s *EncryptionEntity) SetPublicKeyId(v string) *EncryptionEntity { - s.PublicKeyId = &v - return s -} - -// Contains information about the Amazon Kinesis data stream where you are sending -// real-time log data in a real-time log configuration. -type EndPoint struct { - _ struct{} `type:"structure"` - - // Contains information about the Amazon Kinesis data stream where you are sending - // real-time log data. - KinesisStreamConfig *KinesisStreamConfig `type:"structure"` - - // The type of data stream where you are sending real-time log data. The only - // valid value is Kinesis. - // - // StreamType is a required field - StreamType *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 EndPoint) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s EndPoint) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EndPoint) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EndPoint"} - if s.StreamType == nil { - invalidParams.Add(request.NewErrParamRequired("StreamType")) - } - if s.KinesisStreamConfig != nil { - if err := s.KinesisStreamConfig.Validate(); err != nil { - invalidParams.AddNested("KinesisStreamConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKinesisStreamConfig sets the KinesisStreamConfig field's value. -func (s *EndPoint) SetKinesisStreamConfig(v *KinesisStreamConfig) *EndPoint { - s.KinesisStreamConfig = v - return s -} - -// SetStreamType sets the StreamType field's value. -func (s *EndPoint) SetStreamType(v string) *EndPoint { - s.StreamType = &v - return s -} - -// A complex data type that includes the profile configurations and other options -// specified for field-level encryption. -type FieldLevelEncryption struct { - _ struct{} `type:"structure"` - - // A complex data type that includes the profile configurations specified for - // field-level encryption. - // - // FieldLevelEncryptionConfig is a required field - FieldLevelEncryptionConfig *FieldLevelEncryptionConfig `type:"structure" required:"true"` - - // The configuration ID for a field-level encryption configuration which includes - // a set of profiles that specify certain selected data fields to be encrypted - // by specific public keys. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The last time the field-level encryption configuration was changed. - // - // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" 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 FieldLevelEncryption) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FieldLevelEncryption) GoString() string { - return s.String() -} - -// SetFieldLevelEncryptionConfig sets the FieldLevelEncryptionConfig field's value. -func (s *FieldLevelEncryption) SetFieldLevelEncryptionConfig(v *FieldLevelEncryptionConfig) *FieldLevelEncryption { - s.FieldLevelEncryptionConfig = v - return s -} - -// SetId sets the Id field's value. -func (s *FieldLevelEncryption) SetId(v string) *FieldLevelEncryption { - s.Id = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *FieldLevelEncryption) SetLastModifiedTime(v time.Time) *FieldLevelEncryption { - s.LastModifiedTime = &v - return s -} - -// A complex data type that includes the profile configurations specified for -// field-level encryption. -type FieldLevelEncryptionConfig struct { - _ struct{} `type:"structure"` - - // A unique number that ensures the request can't be replayed. - // - // CallerReference is a required field - CallerReference *string `type:"string" required:"true"` - - // An optional comment about the configuration. The comment cannot be longer - // than 128 characters. - Comment *string `type:"string"` - - // A complex data type that specifies when to forward content if a content type - // isn't recognized and profiles to use as by default in a request if a query - // argument doesn't specify a profile to use. - ContentTypeProfileConfig *ContentTypeProfileConfig `type:"structure"` - - // A complex data type that specifies when to forward content if a profile isn't - // found and the profile that can be provided as a query argument in a request. - QueryArgProfileConfig *QueryArgProfileConfig `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 FieldLevelEncryptionConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FieldLevelEncryptionConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FieldLevelEncryptionConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FieldLevelEncryptionConfig"} - if s.CallerReference == nil { - invalidParams.Add(request.NewErrParamRequired("CallerReference")) - } - if s.ContentTypeProfileConfig != nil { - if err := s.ContentTypeProfileConfig.Validate(); err != nil { - invalidParams.AddNested("ContentTypeProfileConfig", err.(request.ErrInvalidParams)) - } - } - if s.QueryArgProfileConfig != nil { - if err := s.QueryArgProfileConfig.Validate(); err != nil { - invalidParams.AddNested("QueryArgProfileConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCallerReference sets the CallerReference field's value. -func (s *FieldLevelEncryptionConfig) SetCallerReference(v string) *FieldLevelEncryptionConfig { - s.CallerReference = &v - return s -} - -// SetComment sets the Comment field's value. -func (s *FieldLevelEncryptionConfig) SetComment(v string) *FieldLevelEncryptionConfig { - s.Comment = &v - return s -} - -// SetContentTypeProfileConfig sets the ContentTypeProfileConfig field's value. -func (s *FieldLevelEncryptionConfig) SetContentTypeProfileConfig(v *ContentTypeProfileConfig) *FieldLevelEncryptionConfig { - s.ContentTypeProfileConfig = v - return s -} - -// SetQueryArgProfileConfig sets the QueryArgProfileConfig field's value. -func (s *FieldLevelEncryptionConfig) SetQueryArgProfileConfig(v *QueryArgProfileConfig) *FieldLevelEncryptionConfig { - s.QueryArgProfileConfig = v - return s -} - -// List of field-level encryption configurations. -type FieldLevelEncryptionList struct { - _ struct{} `type:"structure"` - - // An array of field-level encryption items. - Items []*FieldLevelEncryptionSummary `locationNameList:"FieldLevelEncryptionSummary" type:"list"` - - // The maximum number of elements you want in the response body. - // - // MaxItems is a required field - MaxItems *int64 `type:"integer" required:"true"` - - // If there are more elements to be listed, this element is present and contains - // the value that you can use for the Marker request parameter to continue listing - // your configurations where you left off. - NextMarker *string `type:"string"` - - // The number of field-level encryption items. - // - // Quantity is a required field - Quantity *int64 `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 FieldLevelEncryptionList) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FieldLevelEncryptionList) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *FieldLevelEncryptionList) SetItems(v []*FieldLevelEncryptionSummary) *FieldLevelEncryptionList { - s.Items = v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *FieldLevelEncryptionList) SetMaxItems(v int64) *FieldLevelEncryptionList { - s.MaxItems = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *FieldLevelEncryptionList) SetNextMarker(v string) *FieldLevelEncryptionList { - s.NextMarker = &v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *FieldLevelEncryptionList) SetQuantity(v int64) *FieldLevelEncryptionList { - s.Quantity = &v - return s -} - -// A complex data type for field-level encryption profiles. -type FieldLevelEncryptionProfile struct { - _ struct{} `type:"structure"` - - // A complex data type that includes the profile name and the encryption entities - // for the field-level encryption profile. - // - // FieldLevelEncryptionProfileConfig is a required field - FieldLevelEncryptionProfileConfig *FieldLevelEncryptionProfileConfig `type:"structure" required:"true"` - - // The ID for a field-level encryption profile configuration which includes - // a set of profiles that specify certain selected data fields to be encrypted - // by specific public keys. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The last time the field-level encryption profile was updated. - // - // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" 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 FieldLevelEncryptionProfile) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FieldLevelEncryptionProfile) GoString() string { - return s.String() -} - -// SetFieldLevelEncryptionProfileConfig sets the FieldLevelEncryptionProfileConfig field's value. -func (s *FieldLevelEncryptionProfile) SetFieldLevelEncryptionProfileConfig(v *FieldLevelEncryptionProfileConfig) *FieldLevelEncryptionProfile { - s.FieldLevelEncryptionProfileConfig = v - return s -} - -// SetId sets the Id field's value. -func (s *FieldLevelEncryptionProfile) SetId(v string) *FieldLevelEncryptionProfile { - s.Id = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *FieldLevelEncryptionProfile) SetLastModifiedTime(v time.Time) *FieldLevelEncryptionProfile { - s.LastModifiedTime = &v - return s -} - -// A complex data type of profiles for the field-level encryption. -type FieldLevelEncryptionProfileConfig struct { - _ struct{} `type:"structure"` - - // A unique number that ensures that the request can't be replayed. - // - // CallerReference is a required field - CallerReference *string `type:"string" required:"true"` - - // An optional comment for the field-level encryption profile. The comment cannot - // be longer than 128 characters. - Comment *string `type:"string"` - - // A complex data type of encryption entities for the field-level encryption - // profile that include the public key ID, provider, and field patterns for - // specifying which fields to encrypt with this key. - // - // EncryptionEntities is a required field - EncryptionEntities *EncryptionEntities `type:"structure" required:"true"` - - // Profile name for the field-level encryption profile. - // - // Name is a required field - Name *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 FieldLevelEncryptionProfileConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FieldLevelEncryptionProfileConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FieldLevelEncryptionProfileConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FieldLevelEncryptionProfileConfig"} - if s.CallerReference == nil { - invalidParams.Add(request.NewErrParamRequired("CallerReference")) - } - if s.EncryptionEntities == nil { - invalidParams.Add(request.NewErrParamRequired("EncryptionEntities")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.EncryptionEntities != nil { - if err := s.EncryptionEntities.Validate(); err != nil { - invalidParams.AddNested("EncryptionEntities", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCallerReference sets the CallerReference field's value. -func (s *FieldLevelEncryptionProfileConfig) SetCallerReference(v string) *FieldLevelEncryptionProfileConfig { - s.CallerReference = &v - return s -} - -// SetComment sets the Comment field's value. -func (s *FieldLevelEncryptionProfileConfig) SetComment(v string) *FieldLevelEncryptionProfileConfig { - s.Comment = &v - return s -} - -// SetEncryptionEntities sets the EncryptionEntities field's value. -func (s *FieldLevelEncryptionProfileConfig) SetEncryptionEntities(v *EncryptionEntities) *FieldLevelEncryptionProfileConfig { - s.EncryptionEntities = v - return s -} - -// SetName sets the Name field's value. -func (s *FieldLevelEncryptionProfileConfig) SetName(v string) *FieldLevelEncryptionProfileConfig { - s.Name = &v - return s -} - -// List of field-level encryption profiles. -type FieldLevelEncryptionProfileList struct { - _ struct{} `type:"structure"` - - // The field-level encryption profile items. - Items []*FieldLevelEncryptionProfileSummary `locationNameList:"FieldLevelEncryptionProfileSummary" type:"list"` - - // The maximum number of field-level encryption profiles you want in the response - // body. - // - // MaxItems is a required field - MaxItems *int64 `type:"integer" required:"true"` - - // If there are more elements to be listed, this element is present and contains - // the value that you can use for the Marker request parameter to continue listing - // your profiles where you left off. - NextMarker *string `type:"string"` - - // The number of field-level encryption profiles. - // - // Quantity is a required field - Quantity *int64 `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 FieldLevelEncryptionProfileList) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FieldLevelEncryptionProfileList) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *FieldLevelEncryptionProfileList) SetItems(v []*FieldLevelEncryptionProfileSummary) *FieldLevelEncryptionProfileList { - s.Items = v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *FieldLevelEncryptionProfileList) SetMaxItems(v int64) *FieldLevelEncryptionProfileList { - s.MaxItems = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *FieldLevelEncryptionProfileList) SetNextMarker(v string) *FieldLevelEncryptionProfileList { - s.NextMarker = &v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *FieldLevelEncryptionProfileList) SetQuantity(v int64) *FieldLevelEncryptionProfileList { - s.Quantity = &v - return s -} - -// The field-level encryption profile summary. -type FieldLevelEncryptionProfileSummary struct { - _ struct{} `type:"structure"` - - // An optional comment for the field-level encryption profile summary. The comment - // cannot be longer than 128 characters. - Comment *string `type:"string"` - - // A complex data type of encryption entities for the field-level encryption - // profile that include the public key ID, provider, and field patterns for - // specifying which fields to encrypt with this key. - // - // EncryptionEntities is a required field - EncryptionEntities *EncryptionEntities `type:"structure" required:"true"` - - // ID for the field-level encryption profile summary. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The time when the field-level encryption profile summary was last updated. - // - // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" required:"true"` - - // Name for the field-level encryption profile summary. - // - // Name is a required field - Name *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 FieldLevelEncryptionProfileSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FieldLevelEncryptionProfileSummary) GoString() string { - return s.String() -} - -// SetComment sets the Comment field's value. -func (s *FieldLevelEncryptionProfileSummary) SetComment(v string) *FieldLevelEncryptionProfileSummary { - s.Comment = &v - return s -} - -// SetEncryptionEntities sets the EncryptionEntities field's value. -func (s *FieldLevelEncryptionProfileSummary) SetEncryptionEntities(v *EncryptionEntities) *FieldLevelEncryptionProfileSummary { - s.EncryptionEntities = v - return s -} - -// SetId sets the Id field's value. -func (s *FieldLevelEncryptionProfileSummary) SetId(v string) *FieldLevelEncryptionProfileSummary { - s.Id = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *FieldLevelEncryptionProfileSummary) SetLastModifiedTime(v time.Time) *FieldLevelEncryptionProfileSummary { - s.LastModifiedTime = &v - return s -} - -// SetName sets the Name field's value. -func (s *FieldLevelEncryptionProfileSummary) SetName(v string) *FieldLevelEncryptionProfileSummary { - s.Name = &v - return s -} - -// A summary of a field-level encryption item. -type FieldLevelEncryptionSummary struct { - _ struct{} `type:"structure"` - - // An optional comment about the field-level encryption item. The comment cannot - // be longer than 128 characters. - Comment *string `type:"string"` - - // A summary of a content type-profile mapping. - ContentTypeProfileConfig *ContentTypeProfileConfig `type:"structure"` - - // The unique ID of a field-level encryption item. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The last time that the summary of field-level encryption items was modified. - // - // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" required:"true"` - - // A summary of a query argument-profile mapping. - QueryArgProfileConfig *QueryArgProfileConfig `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 FieldLevelEncryptionSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FieldLevelEncryptionSummary) GoString() string { - return s.String() -} - -// SetComment sets the Comment field's value. -func (s *FieldLevelEncryptionSummary) SetComment(v string) *FieldLevelEncryptionSummary { - s.Comment = &v - return s -} - -// SetContentTypeProfileConfig sets the ContentTypeProfileConfig field's value. -func (s *FieldLevelEncryptionSummary) SetContentTypeProfileConfig(v *ContentTypeProfileConfig) *FieldLevelEncryptionSummary { - s.ContentTypeProfileConfig = v - return s -} - -// SetId sets the Id field's value. -func (s *FieldLevelEncryptionSummary) SetId(v string) *FieldLevelEncryptionSummary { - s.Id = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *FieldLevelEncryptionSummary) SetLastModifiedTime(v time.Time) *FieldLevelEncryptionSummary { - s.LastModifiedTime = &v - return s -} - -// SetQueryArgProfileConfig sets the QueryArgProfileConfig field's value. -func (s *FieldLevelEncryptionSummary) SetQueryArgProfileConfig(v *QueryArgProfileConfig) *FieldLevelEncryptionSummary { - s.QueryArgProfileConfig = v - return s -} - -// A complex data type that includes the field patterns to match for field-level -// encryption. -type FieldPatterns struct { - _ struct{} `type:"structure"` - - // An array of the field-level encryption field patterns. - Items []*string `locationNameList:"FieldPattern" type:"list"` - - // The number of field-level encryption field patterns. - // - // Quantity is a required field - Quantity *int64 `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 FieldPatterns) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FieldPatterns) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FieldPatterns) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FieldPatterns"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *FieldPatterns) SetItems(v []*string) *FieldPatterns { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *FieldPatterns) SetQuantity(v int64) *FieldPatterns { - s.Quantity = &v - return s -} - -// This field is deprecated. We recommend that you use a cache policy or an -// origin request policy instead of this field. -// -// If you want to include values in the cache key, use a cache policy. For more -// information, see Creating cache policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) -// in the Amazon CloudFront Developer Guide. -// -// If you want to send values to the origin but not include them in the cache -// key, use an origin request policy. For more information, see Creating origin -// request policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) -// in the Amazon CloudFront Developer Guide. -// -// A complex type that specifies how CloudFront handles query strings, cookies, -// and HTTP headers. -type ForwardedValues struct { - _ struct{} `type:"structure"` - - // This field is deprecated. We recommend that you use a cache policy or an - // origin request policy instead of this field. - // - // If you want to include cookies in the cache key, use a cache policy. For - // more information, see Creating cache policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) - // in the Amazon CloudFront Developer Guide. - // - // If you want to send cookies to the origin but not include them in the cache - // key, use an origin request policy. For more information, see Creating origin - // request policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) - // in the Amazon CloudFront Developer Guide. - // - // A complex type that specifies whether you want CloudFront to forward cookies - // to the origin and, if so, which ones. For more information about forwarding - // cookies to the origin, see How CloudFront Forwards, Caches, and Logs Cookies - // (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Cookies.html) - // in the Amazon CloudFront Developer Guide. - // - // Cookies is a required field - Cookies *CookiePreference `type:"structure" required:"true"` - - // This field is deprecated. We recommend that you use a cache policy or an - // origin request policy instead of this field. - // - // If you want to include headers in the cache key, use a cache policy. For - // more information, see Creating cache policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) - // in the Amazon CloudFront Developer Guide. - // - // If you want to send headers to the origin but not include them in the cache - // key, use an origin request policy. For more information, see Creating origin - // request policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) - // in the Amazon CloudFront Developer Guide. - // - // A complex type that specifies the Headers, if any, that you want CloudFront - // to forward to the origin for this cache behavior (whitelisted headers). For - // the headers that you specify, CloudFront also caches separate versions of - // a specified object that is based on the header values in viewer requests. - // - // For more information, see Caching Content Based on Request Headers (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/header-caching.html) - // in the Amazon CloudFront Developer Guide. - Headers *Headers `type:"structure"` - - // This field is deprecated. We recommend that you use a cache policy or an - // origin request policy instead of this field. - // - // If you want to include query strings in the cache key, use a cache policy. - // For more information, see Creating cache policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) - // in the Amazon CloudFront Developer Guide. - // - // If you want to send query strings to the origin but not include them in the - // cache key, use an origin request policy. For more information, see Creating - // origin request policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) - // in the Amazon CloudFront Developer Guide. - // - // Indicates whether you want CloudFront to forward query strings to the origin - // that is associated with this cache behavior and cache based on the query - // string parameters. CloudFront behavior depends on the value of QueryString - // and on the values that you specify for QueryStringCacheKeys, if any: - // - // If you specify true for QueryString and you don't specify any values for - // QueryStringCacheKeys, CloudFront forwards all query string parameters to - // the origin and caches based on all query string parameters. Depending on - // how many query string parameters and values you have, this can adversely - // affect performance because CloudFront must forward more requests to the origin. - // - // If you specify true for QueryString and you specify one or more values for - // QueryStringCacheKeys, CloudFront forwards all query string parameters to - // the origin, but it only caches based on the query string parameters that - // you specify. - // - // If you specify false for QueryString, CloudFront doesn't forward any query - // string parameters to the origin, and doesn't cache based on query string - // parameters. - // - // For more information, see Configuring CloudFront to Cache Based on Query - // String Parameters (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/QueryStringParameters.html) - // in the Amazon CloudFront Developer Guide. - // - // QueryString is a required field - QueryString *bool `type:"boolean" required:"true"` - - // This field is deprecated. We recommend that you use a cache policy or an - // origin request policy instead of this field. - // - // If you want to include query strings in the cache key, use a cache policy. - // For more information, see Creating cache policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) - // in the Amazon CloudFront Developer Guide. - // - // If you want to send query strings to the origin but not include them in the - // cache key, use an origin request policy. For more information, see Creating - // origin request policies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) - // in the Amazon CloudFront Developer Guide. - // - // A complex type that contains information about the query string parameters - // that you want CloudFront to use for caching for this cache behavior. - QueryStringCacheKeys *QueryStringCacheKeys `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 ForwardedValues) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ForwardedValues) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ForwardedValues) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ForwardedValues"} - if s.Cookies == nil { - invalidParams.Add(request.NewErrParamRequired("Cookies")) - } - if s.QueryString == nil { - invalidParams.Add(request.NewErrParamRequired("QueryString")) - } - if s.Cookies != nil { - if err := s.Cookies.Validate(); err != nil { - invalidParams.AddNested("Cookies", err.(request.ErrInvalidParams)) - } - } - if s.Headers != nil { - if err := s.Headers.Validate(); err != nil { - invalidParams.AddNested("Headers", err.(request.ErrInvalidParams)) - } - } - if s.QueryStringCacheKeys != nil { - if err := s.QueryStringCacheKeys.Validate(); err != nil { - invalidParams.AddNested("QueryStringCacheKeys", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCookies sets the Cookies field's value. -func (s *ForwardedValues) SetCookies(v *CookiePreference) *ForwardedValues { - s.Cookies = v - return s -} - -// SetHeaders sets the Headers field's value. -func (s *ForwardedValues) SetHeaders(v *Headers) *ForwardedValues { - s.Headers = v - return s -} - -// SetQueryString sets the QueryString field's value. -func (s *ForwardedValues) SetQueryString(v bool) *ForwardedValues { - s.QueryString = &v - return s -} - -// SetQueryStringCacheKeys sets the QueryStringCacheKeys field's value. -func (s *ForwardedValues) SetQueryStringCacheKeys(v *QueryStringCacheKeys) *ForwardedValues { - s.QueryStringCacheKeys = v - return s -} - -// A CloudFront function that is associated with a cache behavior in a CloudFront -// distribution. -type FunctionAssociation struct { - _ struct{} `type:"structure"` - - // The event type of the function, either viewer-request or viewer-response. - // You cannot use origin-facing event types (origin-request and origin-response) - // with a CloudFront function. - // - // EventType is a required field - EventType *string `type:"string" required:"true" enum:"EventType"` - - // The Amazon Resource Name (ARN) of the function. - // - // FunctionARN is a required field - FunctionARN *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 FunctionAssociation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FunctionAssociation) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FunctionAssociation) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FunctionAssociation"} - if s.EventType == nil { - invalidParams.Add(request.NewErrParamRequired("EventType")) - } - if s.FunctionARN == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionARN")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEventType sets the EventType field's value. -func (s *FunctionAssociation) SetEventType(v string) *FunctionAssociation { - s.EventType = &v - return s -} - -// SetFunctionARN sets the FunctionARN field's value. -func (s *FunctionAssociation) SetFunctionARN(v string) *FunctionAssociation { - s.FunctionARN = &v - return s -} - -// A list of CloudFront functions that are associated with a cache behavior -// in a CloudFront distribution. Your functions must be published to the LIVE -// stage to associate them with a cache behavior. -type FunctionAssociations struct { - _ struct{} `type:"structure"` - - // The CloudFront functions that are associated with a cache behavior in a CloudFront - // distribution. Your functions must be published to the LIVE stage to associate - // them with a cache behavior. - Items []*FunctionAssociation `locationNameList:"FunctionAssociation" type:"list"` - - // The number of CloudFront functions in the list. - // - // Quantity is a required field - Quantity *int64 `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 FunctionAssociations) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FunctionAssociations) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FunctionAssociations) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FunctionAssociations"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *FunctionAssociations) SetItems(v []*FunctionAssociation) *FunctionAssociations { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *FunctionAssociations) SetQuantity(v int64) *FunctionAssociations { - s.Quantity = &v - return s -} - -// Contains configuration information about a CloudFront function. -type FunctionConfig struct { - _ struct{} `type:"structure"` - - // A comment to describe the function. - // - // Comment is a required field - Comment *string `type:"string" required:"true"` - - // The configuration for the key value store associations. - KeyValueStoreAssociations *KeyValueStoreAssociations `type:"structure"` - - // The function's runtime environment version. - // - // Runtime is a required field - Runtime *string `type:"string" required:"true" enum:"FunctionRuntime"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FunctionConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FunctionConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FunctionConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FunctionConfig"} - if s.Comment == nil { - invalidParams.Add(request.NewErrParamRequired("Comment")) - } - if s.Runtime == nil { - invalidParams.Add(request.NewErrParamRequired("Runtime")) - } - if s.KeyValueStoreAssociations != nil { - if err := s.KeyValueStoreAssociations.Validate(); err != nil { - invalidParams.AddNested("KeyValueStoreAssociations", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComment sets the Comment field's value. -func (s *FunctionConfig) SetComment(v string) *FunctionConfig { - s.Comment = &v - return s -} - -// SetKeyValueStoreAssociations sets the KeyValueStoreAssociations field's value. -func (s *FunctionConfig) SetKeyValueStoreAssociations(v *KeyValueStoreAssociations) *FunctionConfig { - s.KeyValueStoreAssociations = v - return s -} - -// SetRuntime sets the Runtime field's value. -func (s *FunctionConfig) SetRuntime(v string) *FunctionConfig { - s.Runtime = &v - return s -} - -// A list of CloudFront functions. -type FunctionList struct { - _ struct{} `type:"structure"` - - // Contains the functions in the list. - Items []*FunctionSummary `locationNameList:"FunctionSummary" type:"list"` - - // The maximum number of functions requested. - // - // MaxItems is a required field - MaxItems *int64 `type:"integer" required:"true"` - - // If there are more items in the list than are in this response, this element - // is present. It contains the value that you should use in the Marker field - // of a subsequent request to continue listing functions where you left off. - NextMarker *string `type:"string"` - - // The number of functions returned in the response. - // - // Quantity is a required field - Quantity *int64 `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 FunctionList) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FunctionList) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *FunctionList) SetItems(v []*FunctionSummary) *FunctionList { - s.Items = v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *FunctionList) SetMaxItems(v int64) *FunctionList { - s.MaxItems = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *FunctionList) SetNextMarker(v string) *FunctionList { - s.NextMarker = &v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *FunctionList) SetQuantity(v int64) *FunctionList { - s.Quantity = &v - return s -} - -// Contains metadata about a CloudFront function. -type FunctionMetadata struct { - _ struct{} `type:"structure"` - - // The date and time when the function was created. - CreatedTime *time.Time `type:"timestamp"` - - // The Amazon Resource Name (ARN) of the function. The ARN uniquely identifies - // the function. - // - // FunctionARN is a required field - FunctionARN *string `type:"string" required:"true"` - - // The date and time when the function was most recently updated. - // - // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" required:"true"` - - // The stage that the function is in, either DEVELOPMENT or LIVE. - // - // When a function is in the DEVELOPMENT stage, you can test the function with - // TestFunction, and update it with UpdateFunction. - // - // When a function is in the LIVE stage, you can attach the function to a distribution's - // cache behavior, using the function's ARN. - Stage *string `type:"string" enum:"FunctionStage"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FunctionMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FunctionMetadata) GoString() string { - return s.String() -} - -// SetCreatedTime sets the CreatedTime field's value. -func (s *FunctionMetadata) SetCreatedTime(v time.Time) *FunctionMetadata { - s.CreatedTime = &v - return s -} - -// SetFunctionARN sets the FunctionARN field's value. -func (s *FunctionMetadata) SetFunctionARN(v string) *FunctionMetadata { - s.FunctionARN = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *FunctionMetadata) SetLastModifiedTime(v time.Time) *FunctionMetadata { - s.LastModifiedTime = &v - return s -} - -// SetStage sets the Stage field's value. -func (s *FunctionMetadata) SetStage(v string) *FunctionMetadata { - s.Stage = &v - return s -} - -// Contains configuration information and metadata about a CloudFront function. -type FunctionSummary struct { - _ struct{} `type:"structure"` - - // Contains configuration information about a CloudFront function. - // - // FunctionConfig is a required field - FunctionConfig *FunctionConfig `type:"structure" required:"true"` - - // Contains metadata about a CloudFront function. - // - // FunctionMetadata is a required field - FunctionMetadata *FunctionMetadata `type:"structure" required:"true"` - - // The name of the CloudFront function. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The status of the CloudFront function. - Status *string `type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FunctionSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FunctionSummary) GoString() string { - return s.String() -} - -// SetFunctionConfig sets the FunctionConfig field's value. -func (s *FunctionSummary) SetFunctionConfig(v *FunctionConfig) *FunctionSummary { - s.FunctionConfig = v - return s -} - -// SetFunctionMetadata sets the FunctionMetadata field's value. -func (s *FunctionSummary) SetFunctionMetadata(v *FunctionMetadata) *FunctionSummary { - s.FunctionMetadata = v - return s -} - -// SetName sets the Name field's value. -func (s *FunctionSummary) SetName(v string) *FunctionSummary { - s.Name = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *FunctionSummary) SetStatus(v string) *FunctionSummary { - s.Status = &v - return s -} - -// A complex type that controls the countries in which your content is distributed. -// CloudFront determines the location of your users using MaxMind GeoIP databases. -type GeoRestriction struct { - _ struct{} `type:"structure"` - - // A complex type that contains a Location element for each country in which - // you want CloudFront either to distribute your content (whitelist) or not - // distribute your content (blacklist). - // - // The Location element is a two-letter, uppercase country code for a country - // that you want to include in your blacklist or whitelist. Include one Location - // element for each country. - // - // CloudFront and MaxMind both use ISO 3166 country codes. For the current list - // of countries and the corresponding codes, see ISO 3166-1-alpha-2 code on - // the International Organization for Standardization website. You can also - // refer to the country list on the CloudFront console, which includes both - // country names and codes. - Items []*string `locationNameList:"Location" type:"list"` - - // When geo restriction is enabled, this is the number of countries in your - // whitelist or blacklist. Otherwise, when it is not enabled, Quantity is 0, - // and you can omit Items. - // - // Quantity is a required field - Quantity *int64 `type:"integer" required:"true"` - - // The method that you want to use to restrict distribution of your content - // by country: - // - // * none: No geo restriction is enabled, meaning access to content is not - // restricted by client geo location. - // - // * blacklist: The Location elements specify the countries in which you - // don't want CloudFront to distribute your content. - // - // * whitelist: The Location elements specify the countries in which you - // want CloudFront to distribute your content. - // - // RestrictionType is a required field - RestrictionType *string `type:"string" required:"true" enum:"GeoRestrictionType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GeoRestriction) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GeoRestriction) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GeoRestriction) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GeoRestriction"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.RestrictionType == nil { - invalidParams.Add(request.NewErrParamRequired("RestrictionType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *GeoRestriction) SetItems(v []*string) *GeoRestriction { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *GeoRestriction) SetQuantity(v int64) *GeoRestriction { - s.Quantity = &v - return s -} - -// SetRestrictionType sets the RestrictionType field's value. -func (s *GeoRestriction) SetRestrictionType(v string) *GeoRestriction { - s.RestrictionType = &v - return s -} - -type GetCachePolicyConfigInput struct { - _ struct{} `locationName:"GetCachePolicyConfigRequest" type:"structure"` - - // The unique identifier for the cache policy. If the cache policy is attached - // to a distribution's cache behavior, you can get the policy's identifier using - // ListDistributions or GetDistribution. If the cache policy is not attached - // to a cache behavior, you can get the identifier using ListCachePolicies. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" 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 GetCachePolicyConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetCachePolicyConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetCachePolicyConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCachePolicyConfigInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetCachePolicyConfigInput) SetId(v string) *GetCachePolicyConfigInput { - s.Id = &v - return s -} - -type GetCachePolicyConfigOutput struct { - _ struct{} `type:"structure" payload:"CachePolicyConfig"` - - // The cache policy configuration. - CachePolicyConfig *CachePolicyConfig `type:"structure"` - - // The current version of the cache policy. - ETag *string `location:"header" locationName:"ETag" 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 GetCachePolicyConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetCachePolicyConfigOutput) GoString() string { - return s.String() -} - -// SetCachePolicyConfig sets the CachePolicyConfig field's value. -func (s *GetCachePolicyConfigOutput) SetCachePolicyConfig(v *CachePolicyConfig) *GetCachePolicyConfigOutput { - s.CachePolicyConfig = v - return s -} - -// SetETag sets the ETag field's value. -func (s *GetCachePolicyConfigOutput) SetETag(v string) *GetCachePolicyConfigOutput { - s.ETag = &v - return s -} - -type GetCachePolicyInput struct { - _ struct{} `locationName:"GetCachePolicyRequest" type:"structure"` - - // The unique identifier for the cache policy. If the cache policy is attached - // to a distribution's cache behavior, you can get the policy's identifier using - // ListDistributions or GetDistribution. If the cache policy is not attached - // to a cache behavior, you can get the identifier using ListCachePolicies. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" 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 GetCachePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetCachePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetCachePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCachePolicyInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetCachePolicyInput) SetId(v string) *GetCachePolicyInput { - s.Id = &v - return s -} - -type GetCachePolicyOutput struct { - _ struct{} `type:"structure" payload:"CachePolicy"` - - // The cache policy. - CachePolicy *CachePolicy `type:"structure"` - - // The current version of the cache policy. - ETag *string `location:"header" locationName:"ETag" 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 GetCachePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetCachePolicyOutput) GoString() string { - return s.String() -} - -// SetCachePolicy sets the CachePolicy field's value. -func (s *GetCachePolicyOutput) SetCachePolicy(v *CachePolicy) *GetCachePolicyOutput { - s.CachePolicy = v - return s -} - -// SetETag sets the ETag field's value. -func (s *GetCachePolicyOutput) SetETag(v string) *GetCachePolicyOutput { - s.ETag = &v - return s -} - -// The origin access identity's configuration information. For more information, -// see CloudFrontOriginAccessIdentityConfig (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_CloudFrontOriginAccessIdentityConfig.html). -type GetCloudFrontOriginAccessIdentityConfigInput struct { - _ struct{} `locationName:"GetCloudFrontOriginAccessIdentityConfigRequest" type:"structure"` - - // The identity's ID. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" 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 GetCloudFrontOriginAccessIdentityConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetCloudFrontOriginAccessIdentityConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetCloudFrontOriginAccessIdentityConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCloudFrontOriginAccessIdentityConfigInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetCloudFrontOriginAccessIdentityConfigInput) SetId(v string) *GetCloudFrontOriginAccessIdentityConfigInput { - s.Id = &v - return s -} - -// The returned result of the corresponding request. -type GetCloudFrontOriginAccessIdentityConfigOutput struct { - _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentityConfig"` - - // The origin access identity's configuration information. - CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `type:"structure"` - - // The current version of the configuration. For example: E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" 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 GetCloudFrontOriginAccessIdentityConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetCloudFrontOriginAccessIdentityConfigOutput) GoString() string { - return s.String() -} - -// SetCloudFrontOriginAccessIdentityConfig sets the CloudFrontOriginAccessIdentityConfig field's value. -func (s *GetCloudFrontOriginAccessIdentityConfigOutput) SetCloudFrontOriginAccessIdentityConfig(v *OriginAccessIdentityConfig) *GetCloudFrontOriginAccessIdentityConfigOutput { - s.CloudFrontOriginAccessIdentityConfig = v - return s -} - -// SetETag sets the ETag field's value. -func (s *GetCloudFrontOriginAccessIdentityConfigOutput) SetETag(v string) *GetCloudFrontOriginAccessIdentityConfigOutput { - s.ETag = &v - return s -} - -// The request to get an origin access identity's information. -type GetCloudFrontOriginAccessIdentityInput struct { - _ struct{} `locationName:"GetCloudFrontOriginAccessIdentityRequest" type:"structure"` - - // The identity's ID. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" 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 GetCloudFrontOriginAccessIdentityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetCloudFrontOriginAccessIdentityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetCloudFrontOriginAccessIdentityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCloudFrontOriginAccessIdentityInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetCloudFrontOriginAccessIdentityInput) SetId(v string) *GetCloudFrontOriginAccessIdentityInput { - s.Id = &v - return s -} - -// The returned result of the corresponding request. -type GetCloudFrontOriginAccessIdentityOutput struct { - _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentity"` - - // The origin access identity's information. - CloudFrontOriginAccessIdentity *OriginAccessIdentity `type:"structure"` - - // The current version of the origin access identity's information. For example: - // E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" 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 GetCloudFrontOriginAccessIdentityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetCloudFrontOriginAccessIdentityOutput) GoString() string { - return s.String() -} - -// SetCloudFrontOriginAccessIdentity sets the CloudFrontOriginAccessIdentity field's value. -func (s *GetCloudFrontOriginAccessIdentityOutput) SetCloudFrontOriginAccessIdentity(v *OriginAccessIdentity) *GetCloudFrontOriginAccessIdentityOutput { - s.CloudFrontOriginAccessIdentity = v - return s -} - -// SetETag sets the ETag field's value. -func (s *GetCloudFrontOriginAccessIdentityOutput) SetETag(v string) *GetCloudFrontOriginAccessIdentityOutput { - s.ETag = &v - return s -} - -type GetContinuousDeploymentPolicyConfigInput struct { - _ struct{} `locationName:"GetContinuousDeploymentPolicyConfigRequest" type:"structure"` - - // The identifier of the continuous deployment policy whose configuration you - // are getting. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" 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 GetContinuousDeploymentPolicyConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetContinuousDeploymentPolicyConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetContinuousDeploymentPolicyConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetContinuousDeploymentPolicyConfigInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetContinuousDeploymentPolicyConfigInput) SetId(v string) *GetContinuousDeploymentPolicyConfigInput { - s.Id = &v - return s -} - -type GetContinuousDeploymentPolicyConfigOutput struct { - _ struct{} `type:"structure" payload:"ContinuousDeploymentPolicyConfig"` - - // Contains the configuration for a continuous deployment policy. - ContinuousDeploymentPolicyConfig *ContinuousDeploymentPolicyConfig `type:"structure"` - - // The version identifier for the current version of the continuous deployment - // policy. - ETag *string `location:"header" locationName:"ETag" 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 GetContinuousDeploymentPolicyConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetContinuousDeploymentPolicyConfigOutput) GoString() string { - return s.String() -} - -// SetContinuousDeploymentPolicyConfig sets the ContinuousDeploymentPolicyConfig field's value. -func (s *GetContinuousDeploymentPolicyConfigOutput) SetContinuousDeploymentPolicyConfig(v *ContinuousDeploymentPolicyConfig) *GetContinuousDeploymentPolicyConfigOutput { - s.ContinuousDeploymentPolicyConfig = v - return s -} - -// SetETag sets the ETag field's value. -func (s *GetContinuousDeploymentPolicyConfigOutput) SetETag(v string) *GetContinuousDeploymentPolicyConfigOutput { - s.ETag = &v - return s -} - -type GetContinuousDeploymentPolicyInput struct { - _ struct{} `locationName:"GetContinuousDeploymentPolicyRequest" type:"structure"` - - // The identifier of the continuous deployment policy that you are getting. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" 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 GetContinuousDeploymentPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetContinuousDeploymentPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetContinuousDeploymentPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetContinuousDeploymentPolicyInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetContinuousDeploymentPolicyInput) SetId(v string) *GetContinuousDeploymentPolicyInput { - s.Id = &v - return s -} - -type GetContinuousDeploymentPolicyOutput struct { - _ struct{} `type:"structure" payload:"ContinuousDeploymentPolicy"` - - // A continuous deployment policy. - ContinuousDeploymentPolicy *ContinuousDeploymentPolicy `type:"structure"` - - // The version identifier for the current version of the continuous deployment - // policy. - ETag *string `location:"header" locationName:"ETag" 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 GetContinuousDeploymentPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetContinuousDeploymentPolicyOutput) GoString() string { - return s.String() -} - -// SetContinuousDeploymentPolicy sets the ContinuousDeploymentPolicy field's value. -func (s *GetContinuousDeploymentPolicyOutput) SetContinuousDeploymentPolicy(v *ContinuousDeploymentPolicy) *GetContinuousDeploymentPolicyOutput { - s.ContinuousDeploymentPolicy = v - return s -} - -// SetETag sets the ETag field's value. -func (s *GetContinuousDeploymentPolicyOutput) SetETag(v string) *GetContinuousDeploymentPolicyOutput { - s.ETag = &v - return s -} - -// The request to get a distribution configuration. -type GetDistributionConfigInput struct { - _ struct{} `locationName:"GetDistributionConfigRequest" type:"structure"` - - // The distribution's ID. If the ID is empty, an empty distribution configuration - // is returned. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" 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 GetDistributionConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetDistributionConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDistributionConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDistributionConfigInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetDistributionConfigInput) SetId(v string) *GetDistributionConfigInput { - s.Id = &v - return s -} - -// The returned result of the corresponding request. -type GetDistributionConfigOutput struct { - _ struct{} `type:"structure" payload:"DistributionConfig"` - - // The distribution's configuration information. - DistributionConfig *DistributionConfig `type:"structure"` - - // The current version of the configuration. For example: E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" 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 GetDistributionConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetDistributionConfigOutput) GoString() string { - return s.String() -} - -// SetDistributionConfig sets the DistributionConfig field's value. -func (s *GetDistributionConfigOutput) SetDistributionConfig(v *DistributionConfig) *GetDistributionConfigOutput { - s.DistributionConfig = v - return s -} - -// SetETag sets the ETag field's value. -func (s *GetDistributionConfigOutput) SetETag(v string) *GetDistributionConfigOutput { - s.ETag = &v - return s -} - -// The request to get a distribution's information. -type GetDistributionInput struct { - _ struct{} `locationName:"GetDistributionRequest" type:"structure"` - - // The distribution's ID. If the ID is empty, an empty distribution configuration - // is returned. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" 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 GetDistributionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetDistributionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDistributionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDistributionInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetDistributionInput) SetId(v string) *GetDistributionInput { - s.Id = &v - return s -} - -// The returned result of the corresponding request. -type GetDistributionOutput struct { - _ struct{} `type:"structure" payload:"Distribution"` - - // The distribution's information. - Distribution *Distribution `type:"structure"` - - // The current version of the distribution's information. For example: E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" 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 GetDistributionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetDistributionOutput) GoString() string { - return s.String() -} - -// SetDistribution sets the Distribution field's value. -func (s *GetDistributionOutput) SetDistribution(v *Distribution) *GetDistributionOutput { - s.Distribution = v - return s -} - -// SetETag sets the ETag field's value. -func (s *GetDistributionOutput) SetETag(v string) *GetDistributionOutput { - s.ETag = &v - return s -} - -type GetFieldLevelEncryptionConfigInput struct { - _ struct{} `locationName:"GetFieldLevelEncryptionConfigRequest" type:"structure"` - - // Request the ID for the field-level encryption configuration information. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" 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 GetFieldLevelEncryptionConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetFieldLevelEncryptionConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetFieldLevelEncryptionConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetFieldLevelEncryptionConfigInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetFieldLevelEncryptionConfigInput) SetId(v string) *GetFieldLevelEncryptionConfigInput { - s.Id = &v - return s -} - -type GetFieldLevelEncryptionConfigOutput struct { - _ struct{} `type:"structure" payload:"FieldLevelEncryptionConfig"` - - // The current version of the field level encryption configuration. For example: - // E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // Return the field-level encryption configuration information. - FieldLevelEncryptionConfig *FieldLevelEncryptionConfig `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 GetFieldLevelEncryptionConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetFieldLevelEncryptionConfigOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *GetFieldLevelEncryptionConfigOutput) SetETag(v string) *GetFieldLevelEncryptionConfigOutput { - s.ETag = &v - return s -} - -// SetFieldLevelEncryptionConfig sets the FieldLevelEncryptionConfig field's value. -func (s *GetFieldLevelEncryptionConfigOutput) SetFieldLevelEncryptionConfig(v *FieldLevelEncryptionConfig) *GetFieldLevelEncryptionConfigOutput { - s.FieldLevelEncryptionConfig = v - return s -} - -type GetFieldLevelEncryptionInput struct { - _ struct{} `locationName:"GetFieldLevelEncryptionRequest" type:"structure"` - - // Request the ID for the field-level encryption configuration information. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" 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 GetFieldLevelEncryptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetFieldLevelEncryptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetFieldLevelEncryptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetFieldLevelEncryptionInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetFieldLevelEncryptionInput) SetId(v string) *GetFieldLevelEncryptionInput { - s.Id = &v - return s -} - -type GetFieldLevelEncryptionOutput struct { - _ struct{} `type:"structure" payload:"FieldLevelEncryption"` - - // The current version of the field level encryption configuration. For example: - // E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // Return the field-level encryption configuration information. - FieldLevelEncryption *FieldLevelEncryption `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 GetFieldLevelEncryptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetFieldLevelEncryptionOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *GetFieldLevelEncryptionOutput) SetETag(v string) *GetFieldLevelEncryptionOutput { - s.ETag = &v - return s -} - -// SetFieldLevelEncryption sets the FieldLevelEncryption field's value. -func (s *GetFieldLevelEncryptionOutput) SetFieldLevelEncryption(v *FieldLevelEncryption) *GetFieldLevelEncryptionOutput { - s.FieldLevelEncryption = v - return s -} - -type GetFieldLevelEncryptionProfileConfigInput struct { - _ struct{} `locationName:"GetFieldLevelEncryptionProfileConfigRequest" type:"structure"` - - // Get the ID for the field-level encryption profile configuration information. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" 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 GetFieldLevelEncryptionProfileConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetFieldLevelEncryptionProfileConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetFieldLevelEncryptionProfileConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetFieldLevelEncryptionProfileConfigInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetFieldLevelEncryptionProfileConfigInput) SetId(v string) *GetFieldLevelEncryptionProfileConfigInput { - s.Id = &v - return s -} - -type GetFieldLevelEncryptionProfileConfigOutput struct { - _ struct{} `type:"structure" payload:"FieldLevelEncryptionProfileConfig"` - - // The current version of the field-level encryption profile configuration result. - // For example: E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // Return the field-level encryption profile configuration information. - FieldLevelEncryptionProfileConfig *FieldLevelEncryptionProfileConfig `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 GetFieldLevelEncryptionProfileConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetFieldLevelEncryptionProfileConfigOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *GetFieldLevelEncryptionProfileConfigOutput) SetETag(v string) *GetFieldLevelEncryptionProfileConfigOutput { - s.ETag = &v - return s -} - -// SetFieldLevelEncryptionProfileConfig sets the FieldLevelEncryptionProfileConfig field's value. -func (s *GetFieldLevelEncryptionProfileConfigOutput) SetFieldLevelEncryptionProfileConfig(v *FieldLevelEncryptionProfileConfig) *GetFieldLevelEncryptionProfileConfigOutput { - s.FieldLevelEncryptionProfileConfig = v - return s -} - -type GetFieldLevelEncryptionProfileInput struct { - _ struct{} `locationName:"GetFieldLevelEncryptionProfileRequest" type:"structure"` - - // Get the ID for the field-level encryption profile information. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" 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 GetFieldLevelEncryptionProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetFieldLevelEncryptionProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetFieldLevelEncryptionProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetFieldLevelEncryptionProfileInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetFieldLevelEncryptionProfileInput) SetId(v string) *GetFieldLevelEncryptionProfileInput { - s.Id = &v - return s -} - -type GetFieldLevelEncryptionProfileOutput struct { - _ struct{} `type:"structure" payload:"FieldLevelEncryptionProfile"` - - // The current version of the field level encryption profile. For example: E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // Return the field-level encryption profile information. - FieldLevelEncryptionProfile *FieldLevelEncryptionProfile `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 GetFieldLevelEncryptionProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetFieldLevelEncryptionProfileOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *GetFieldLevelEncryptionProfileOutput) SetETag(v string) *GetFieldLevelEncryptionProfileOutput { - s.ETag = &v - return s -} - -// SetFieldLevelEncryptionProfile sets the FieldLevelEncryptionProfile field's value. -func (s *GetFieldLevelEncryptionProfileOutput) SetFieldLevelEncryptionProfile(v *FieldLevelEncryptionProfile) *GetFieldLevelEncryptionProfileOutput { - s.FieldLevelEncryptionProfile = v - return s -} - -type GetFunctionInput struct { - _ struct{} `locationName:"GetFunctionRequest" type:"structure"` - - // The name of the function whose code you are getting. - // - // Name is a required field - Name *string `location:"uri" locationName:"Name" type:"string" required:"true"` - - // The function's stage, either DEVELOPMENT or LIVE. - Stage *string `location:"querystring" locationName:"Stage" type:"string" enum:"FunctionStage"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetFunctionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetFunctionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetFunctionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetFunctionInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetName sets the Name field's value. -func (s *GetFunctionInput) SetName(v string) *GetFunctionInput { - s.Name = &v - return s -} - -// SetStage sets the Stage field's value. -func (s *GetFunctionInput) SetStage(v string) *GetFunctionInput { - s.Stage = &v - return s -} - -type GetFunctionOutput struct { - _ struct{} `type:"structure" payload:"FunctionCode"` - - // The content type (media type) of the response. - ContentType *string `location:"header" locationName:"Content-Type" type:"string"` - - // The version identifier for the current version of the CloudFront function. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The function code of a CloudFront function. - // - // FunctionCode is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by GetFunctionOutput's - // String and GoString methods. - FunctionCode []byte `min:"1" type:"blob" sensitive:"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 GetFunctionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetFunctionOutput) GoString() string { - return s.String() -} - -// SetContentType sets the ContentType field's value. -func (s *GetFunctionOutput) SetContentType(v string) *GetFunctionOutput { - s.ContentType = &v - return s -} - -// SetETag sets the ETag field's value. -func (s *GetFunctionOutput) SetETag(v string) *GetFunctionOutput { - s.ETag = &v - return s -} - -// SetFunctionCode sets the FunctionCode field's value. -func (s *GetFunctionOutput) SetFunctionCode(v []byte) *GetFunctionOutput { - s.FunctionCode = v - return s -} - -// The request to get an invalidation's information. -type GetInvalidationInput struct { - _ struct{} `locationName:"GetInvalidationRequest" type:"structure"` - - // The distribution's ID. - // - // DistributionId is a required field - DistributionId *string `location:"uri" locationName:"DistributionId" type:"string" required:"true"` - - // The identifier for the invalidation request, for example, IDFDVBD632BHDS5. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" 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 GetInvalidationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetInvalidationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetInvalidationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInvalidationInput"} - if s.DistributionId == nil { - invalidParams.Add(request.NewErrParamRequired("DistributionId")) - } - if s.DistributionId != nil && len(*s.DistributionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DistributionId", 1)) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDistributionId sets the DistributionId field's value. -func (s *GetInvalidationInput) SetDistributionId(v string) *GetInvalidationInput { - s.DistributionId = &v - return s -} - -// SetId sets the Id field's value. -func (s *GetInvalidationInput) SetId(v string) *GetInvalidationInput { - s.Id = &v - return s -} - -// The returned result of the corresponding request. -type GetInvalidationOutput struct { - _ struct{} `type:"structure" payload:"Invalidation"` - - // The invalidation's information. For more information, see Invalidation Complex - // Type (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/InvalidationDatatype.html). - Invalidation *Invalidation `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 GetInvalidationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetInvalidationOutput) GoString() string { - return s.String() -} - -// SetInvalidation sets the Invalidation field's value. -func (s *GetInvalidationOutput) SetInvalidation(v *Invalidation) *GetInvalidationOutput { - s.Invalidation = v - return s -} - -type GetKeyGroupConfigInput struct { - _ struct{} `locationName:"GetKeyGroupConfigRequest" type:"structure"` - - // The identifier of the key group whose configuration you are getting. To get - // the identifier, use ListKeyGroups. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" 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 GetKeyGroupConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetKeyGroupConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetKeyGroupConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetKeyGroupConfigInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetKeyGroupConfigInput) SetId(v string) *GetKeyGroupConfigInput { - s.Id = &v - return s -} - -type GetKeyGroupConfigOutput struct { - _ struct{} `type:"structure" payload:"KeyGroupConfig"` - - // The identifier for this version of the key group. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The key group configuration. - KeyGroupConfig *KeyGroupConfig `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 GetKeyGroupConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetKeyGroupConfigOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *GetKeyGroupConfigOutput) SetETag(v string) *GetKeyGroupConfigOutput { - s.ETag = &v - return s -} - -// SetKeyGroupConfig sets the KeyGroupConfig field's value. -func (s *GetKeyGroupConfigOutput) SetKeyGroupConfig(v *KeyGroupConfig) *GetKeyGroupConfigOutput { - s.KeyGroupConfig = v - return s -} - -type GetKeyGroupInput struct { - _ struct{} `locationName:"GetKeyGroupRequest" type:"structure"` - - // The identifier of the key group that you are getting. To get the identifier, - // use ListKeyGroups. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" 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 GetKeyGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetKeyGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetKeyGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetKeyGroupInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetKeyGroupInput) SetId(v string) *GetKeyGroupInput { - s.Id = &v - return s -} - -type GetKeyGroupOutput struct { - _ struct{} `type:"structure" payload:"KeyGroup"` - - // The identifier for this version of the key group. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The key group. - KeyGroup *KeyGroup `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 GetKeyGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetKeyGroupOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *GetKeyGroupOutput) SetETag(v string) *GetKeyGroupOutput { - s.ETag = &v - return s -} - -// SetKeyGroup sets the KeyGroup field's value. -func (s *GetKeyGroupOutput) SetKeyGroup(v *KeyGroup) *GetKeyGroupOutput { - s.KeyGroup = v - return s -} - -type GetMonitoringSubscriptionInput struct { - _ struct{} `locationName:"GetMonitoringSubscriptionRequest" type:"structure"` - - // The ID of the distribution that you are getting metrics information for. - // - // DistributionId is a required field - DistributionId *string `location:"uri" locationName:"DistributionId" 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 GetMonitoringSubscriptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetMonitoringSubscriptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetMonitoringSubscriptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetMonitoringSubscriptionInput"} - if s.DistributionId == nil { - invalidParams.Add(request.NewErrParamRequired("DistributionId")) - } - if s.DistributionId != nil && len(*s.DistributionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DistributionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDistributionId sets the DistributionId field's value. -func (s *GetMonitoringSubscriptionInput) SetDistributionId(v string) *GetMonitoringSubscriptionInput { - s.DistributionId = &v - return s -} - -type GetMonitoringSubscriptionOutput struct { - _ struct{} `type:"structure" payload:"MonitoringSubscription"` - - // A monitoring subscription. This structure contains information about whether - // additional CloudWatch metrics are enabled for a given CloudFront distribution. - MonitoringSubscription *MonitoringSubscription `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 GetMonitoringSubscriptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetMonitoringSubscriptionOutput) GoString() string { - return s.String() -} - -// SetMonitoringSubscription sets the MonitoringSubscription field's value. -func (s *GetMonitoringSubscriptionOutput) SetMonitoringSubscription(v *MonitoringSubscription) *GetMonitoringSubscriptionOutput { - s.MonitoringSubscription = v - return s -} - -type GetOriginAccessControlConfigInput struct { - _ struct{} `locationName:"GetOriginAccessControlConfigRequest" type:"structure"` - - // The unique identifier of the origin access control. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" 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 GetOriginAccessControlConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetOriginAccessControlConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetOriginAccessControlConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetOriginAccessControlConfigInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetOriginAccessControlConfigInput) SetId(v string) *GetOriginAccessControlConfigInput { - s.Id = &v - return s -} - -type GetOriginAccessControlConfigOutput struct { - _ struct{} `type:"structure" payload:"OriginAccessControlConfig"` - - // The version identifier for the current version of the origin access control. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // Contains an origin access control configuration. - OriginAccessControlConfig *OriginAccessControlConfig `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 GetOriginAccessControlConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetOriginAccessControlConfigOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *GetOriginAccessControlConfigOutput) SetETag(v string) *GetOriginAccessControlConfigOutput { - s.ETag = &v - return s -} - -// SetOriginAccessControlConfig sets the OriginAccessControlConfig field's value. -func (s *GetOriginAccessControlConfigOutput) SetOriginAccessControlConfig(v *OriginAccessControlConfig) *GetOriginAccessControlConfigOutput { - s.OriginAccessControlConfig = v - return s -} - -type GetOriginAccessControlInput struct { - _ struct{} `locationName:"GetOriginAccessControlRequest" type:"structure"` - - // The unique identifier of the origin access control. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" 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 GetOriginAccessControlInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetOriginAccessControlInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetOriginAccessControlInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetOriginAccessControlInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetOriginAccessControlInput) SetId(v string) *GetOriginAccessControlInput { - s.Id = &v - return s -} - -type GetOriginAccessControlOutput struct { - _ struct{} `type:"structure" payload:"OriginAccessControl"` - - // The version identifier for the current version of the origin access control. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // Contains an origin access control, including its unique identifier. - OriginAccessControl *OriginAccessControl `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 GetOriginAccessControlOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetOriginAccessControlOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *GetOriginAccessControlOutput) SetETag(v string) *GetOriginAccessControlOutput { - s.ETag = &v - return s -} - -// SetOriginAccessControl sets the OriginAccessControl field's value. -func (s *GetOriginAccessControlOutput) SetOriginAccessControl(v *OriginAccessControl) *GetOriginAccessControlOutput { - s.OriginAccessControl = v - return s -} - -type GetOriginRequestPolicyConfigInput struct { - _ struct{} `locationName:"GetOriginRequestPolicyConfigRequest" type:"structure"` - - // The unique identifier for the origin request policy. If the origin request - // policy is attached to a distribution's cache behavior, you can get the policy's - // identifier using ListDistributions or GetDistribution. If the origin request - // policy is not attached to a cache behavior, you can get the identifier using - // ListOriginRequestPolicies. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" 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 GetOriginRequestPolicyConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetOriginRequestPolicyConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetOriginRequestPolicyConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetOriginRequestPolicyConfigInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetOriginRequestPolicyConfigInput) SetId(v string) *GetOriginRequestPolicyConfigInput { - s.Id = &v - return s -} - -type GetOriginRequestPolicyConfigOutput struct { - _ struct{} `type:"structure" payload:"OriginRequestPolicyConfig"` - - // The current version of the origin request policy. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The origin request policy configuration. - OriginRequestPolicyConfig *OriginRequestPolicyConfig `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 GetOriginRequestPolicyConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetOriginRequestPolicyConfigOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *GetOriginRequestPolicyConfigOutput) SetETag(v string) *GetOriginRequestPolicyConfigOutput { - s.ETag = &v - return s -} - -// SetOriginRequestPolicyConfig sets the OriginRequestPolicyConfig field's value. -func (s *GetOriginRequestPolicyConfigOutput) SetOriginRequestPolicyConfig(v *OriginRequestPolicyConfig) *GetOriginRequestPolicyConfigOutput { - s.OriginRequestPolicyConfig = v - return s -} - -type GetOriginRequestPolicyInput struct { - _ struct{} `locationName:"GetOriginRequestPolicyRequest" type:"structure"` - - // The unique identifier for the origin request policy. If the origin request - // policy is attached to a distribution's cache behavior, you can get the policy's - // identifier using ListDistributions or GetDistribution. If the origin request - // policy is not attached to a cache behavior, you can get the identifier using - // ListOriginRequestPolicies. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" 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 GetOriginRequestPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetOriginRequestPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetOriginRequestPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetOriginRequestPolicyInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetOriginRequestPolicyInput) SetId(v string) *GetOriginRequestPolicyInput { - s.Id = &v - return s -} - -type GetOriginRequestPolicyOutput struct { - _ struct{} `type:"structure" payload:"OriginRequestPolicy"` - - // The current version of the origin request policy. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The origin request policy. - OriginRequestPolicy *OriginRequestPolicy `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 GetOriginRequestPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetOriginRequestPolicyOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *GetOriginRequestPolicyOutput) SetETag(v string) *GetOriginRequestPolicyOutput { - s.ETag = &v - return s -} - -// SetOriginRequestPolicy sets the OriginRequestPolicy field's value. -func (s *GetOriginRequestPolicyOutput) SetOriginRequestPolicy(v *OriginRequestPolicy) *GetOriginRequestPolicyOutput { - s.OriginRequestPolicy = v - return s -} - -type GetPublicKeyConfigInput struct { - _ struct{} `locationName:"GetPublicKeyConfigRequest" type:"structure"` - - // The identifier of the public key whose configuration you are getting. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" 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 GetPublicKeyConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetPublicKeyConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetPublicKeyConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetPublicKeyConfigInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetPublicKeyConfigInput) SetId(v string) *GetPublicKeyConfigInput { - s.Id = &v - return s -} - -type GetPublicKeyConfigOutput struct { - _ struct{} `type:"structure" payload:"PublicKeyConfig"` - - // The identifier for this version of the public key configuration. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // A public key configuration. - PublicKeyConfig *PublicKeyConfig `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 GetPublicKeyConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetPublicKeyConfigOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *GetPublicKeyConfigOutput) SetETag(v string) *GetPublicKeyConfigOutput { - s.ETag = &v - return s -} - -// SetPublicKeyConfig sets the PublicKeyConfig field's value. -func (s *GetPublicKeyConfigOutput) SetPublicKeyConfig(v *PublicKeyConfig) *GetPublicKeyConfigOutput { - s.PublicKeyConfig = v - return s -} - -type GetPublicKeyInput struct { - _ struct{} `locationName:"GetPublicKeyRequest" type:"structure"` - - // The identifier of the public key you are getting. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" 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 GetPublicKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetPublicKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetPublicKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetPublicKeyInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetPublicKeyInput) SetId(v string) *GetPublicKeyInput { - s.Id = &v - return s -} - -type GetPublicKeyOutput struct { - _ struct{} `type:"structure" payload:"PublicKey"` - - // The identifier for this version of the public key. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The public key. - PublicKey *PublicKey `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 GetPublicKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetPublicKeyOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *GetPublicKeyOutput) SetETag(v string) *GetPublicKeyOutput { - s.ETag = &v - return s -} - -// SetPublicKey sets the PublicKey field's value. -func (s *GetPublicKeyOutput) SetPublicKey(v *PublicKey) *GetPublicKeyOutput { - s.PublicKey = v - return s -} - -type GetRealtimeLogConfigInput struct { - _ struct{} `locationName:"GetRealtimeLogConfigRequest" type:"structure" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` - - // The Amazon Resource Name (ARN) of the real-time log configuration to get. - ARN *string `type:"string"` - - // The name of the real-time log configuration to get. - 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 GetRealtimeLogConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetRealtimeLogConfigInput) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *GetRealtimeLogConfigInput) SetARN(v string) *GetRealtimeLogConfigInput { - s.ARN = &v - return s -} - -// SetName sets the Name field's value. -func (s *GetRealtimeLogConfigInput) SetName(v string) *GetRealtimeLogConfigInput { - s.Name = &v - return s -} - -type GetRealtimeLogConfigOutput struct { - _ struct{} `type:"structure"` - - // A real-time log configuration. - RealtimeLogConfig *RealtimeLogConfig `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 GetRealtimeLogConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetRealtimeLogConfigOutput) GoString() string { - return s.String() -} - -// SetRealtimeLogConfig sets the RealtimeLogConfig field's value. -func (s *GetRealtimeLogConfigOutput) SetRealtimeLogConfig(v *RealtimeLogConfig) *GetRealtimeLogConfigOutput { - s.RealtimeLogConfig = v - return s -} - -type GetResponseHeadersPolicyConfigInput struct { - _ struct{} `locationName:"GetResponseHeadersPolicyConfigRequest" type:"structure"` - - // The identifier for the response headers policy. - // - // If the response headers policy is attached to a distribution's cache behavior, - // you can get the policy's identifier using ListDistributions or GetDistribution. - // If the response headers policy is not attached to a cache behavior, you can - // get the identifier using ListResponseHeadersPolicies. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" 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 GetResponseHeadersPolicyConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetResponseHeadersPolicyConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetResponseHeadersPolicyConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetResponseHeadersPolicyConfigInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetResponseHeadersPolicyConfigInput) SetId(v string) *GetResponseHeadersPolicyConfigInput { - s.Id = &v - return s -} - -type GetResponseHeadersPolicyConfigOutput struct { - _ struct{} `type:"structure" payload:"ResponseHeadersPolicyConfig"` - - // The version identifier for the current version of the response headers policy. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // Contains a response headers policy. - ResponseHeadersPolicyConfig *ResponseHeadersPolicyConfig `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 GetResponseHeadersPolicyConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetResponseHeadersPolicyConfigOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *GetResponseHeadersPolicyConfigOutput) SetETag(v string) *GetResponseHeadersPolicyConfigOutput { - s.ETag = &v - return s -} - -// SetResponseHeadersPolicyConfig sets the ResponseHeadersPolicyConfig field's value. -func (s *GetResponseHeadersPolicyConfigOutput) SetResponseHeadersPolicyConfig(v *ResponseHeadersPolicyConfig) *GetResponseHeadersPolicyConfigOutput { - s.ResponseHeadersPolicyConfig = v - return s -} - -type GetResponseHeadersPolicyInput struct { - _ struct{} `locationName:"GetResponseHeadersPolicyRequest" type:"structure"` - - // The identifier for the response headers policy. - // - // If the response headers policy is attached to a distribution's cache behavior, - // you can get the policy's identifier using ListDistributions or GetDistribution. - // If the response headers policy is not attached to a cache behavior, you can - // get the identifier using ListResponseHeadersPolicies. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" 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 GetResponseHeadersPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetResponseHeadersPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetResponseHeadersPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetResponseHeadersPolicyInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetResponseHeadersPolicyInput) SetId(v string) *GetResponseHeadersPolicyInput { - s.Id = &v - return s -} - -type GetResponseHeadersPolicyOutput struct { - _ struct{} `type:"structure" payload:"ResponseHeadersPolicy"` - - // The version identifier for the current version of the response headers policy. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // Contains a response headers policy. - ResponseHeadersPolicy *ResponseHeadersPolicy `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 GetResponseHeadersPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetResponseHeadersPolicyOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *GetResponseHeadersPolicyOutput) SetETag(v string) *GetResponseHeadersPolicyOutput { - s.ETag = &v - return s -} - -// SetResponseHeadersPolicy sets the ResponseHeadersPolicy field's value. -func (s *GetResponseHeadersPolicyOutput) SetResponseHeadersPolicy(v *ResponseHeadersPolicy) *GetResponseHeadersPolicyOutput { - s.ResponseHeadersPolicy = v - return s -} - -// To request to get a streaming distribution configuration. -type GetStreamingDistributionConfigInput struct { - _ struct{} `locationName:"GetStreamingDistributionConfigRequest" type:"structure"` - - // The streaming distribution's ID. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" 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 GetStreamingDistributionConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetStreamingDistributionConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetStreamingDistributionConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetStreamingDistributionConfigInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetStreamingDistributionConfigInput) SetId(v string) *GetStreamingDistributionConfigInput { - s.Id = &v - return s -} - -// The returned result of the corresponding request. -type GetStreamingDistributionConfigOutput struct { - _ struct{} `type:"structure" payload:"StreamingDistributionConfig"` - - // The current version of the configuration. For example: E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The streaming distribution's configuration information. - StreamingDistributionConfig *StreamingDistributionConfig `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 GetStreamingDistributionConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetStreamingDistributionConfigOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *GetStreamingDistributionConfigOutput) SetETag(v string) *GetStreamingDistributionConfigOutput { - s.ETag = &v - return s -} - -// SetStreamingDistributionConfig sets the StreamingDistributionConfig field's value. -func (s *GetStreamingDistributionConfigOutput) SetStreamingDistributionConfig(v *StreamingDistributionConfig) *GetStreamingDistributionConfigOutput { - s.StreamingDistributionConfig = v - return s -} - -// The request to get a streaming distribution's information. -type GetStreamingDistributionInput struct { - _ struct{} `locationName:"GetStreamingDistributionRequest" type:"structure"` - - // The streaming distribution's ID. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" 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 GetStreamingDistributionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetStreamingDistributionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetStreamingDistributionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetStreamingDistributionInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *GetStreamingDistributionInput) SetId(v string) *GetStreamingDistributionInput { - s.Id = &v - return s -} - -// The returned result of the corresponding request. -type GetStreamingDistributionOutput struct { - _ struct{} `type:"structure" payload:"StreamingDistribution"` - - // The current version of the streaming distribution's information. For example: - // E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The streaming distribution's information. - StreamingDistribution *StreamingDistribution `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 GetStreamingDistributionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetStreamingDistributionOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *GetStreamingDistributionOutput) SetETag(v string) *GetStreamingDistributionOutput { - s.ETag = &v - return s -} - -// SetStreamingDistribution sets the StreamingDistribution field's value. -func (s *GetStreamingDistributionOutput) SetStreamingDistribution(v *StreamingDistribution) *GetStreamingDistributionOutput { - s.StreamingDistribution = v - return s -} - -// Contains a list of HTTP header names. -type Headers struct { - _ struct{} `type:"structure"` - - // A list of HTTP header names. - Items []*string `locationNameList:"Name" type:"list"` - - // The number of header names in the Items list. - // - // Quantity is a required field - Quantity *int64 `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 Headers) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Headers) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Headers) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Headers"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *Headers) SetItems(v []*string) *Headers { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *Headers) SetQuantity(v int64) *Headers { - s.Quantity = &v - return s -} - -// The import source for the key value store. -type ImportSource struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the import source for the key value store. - // - // SourceARN is a required field - SourceARN *string `type:"string" required:"true"` - - // The source type of the import source for the key value store. - // - // SourceType is a required field - SourceType *string `type:"string" required:"true" enum:"ImportSourceType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ImportSource) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ImportSource) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ImportSource) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ImportSource"} - if s.SourceARN == nil { - invalidParams.Add(request.NewErrParamRequired("SourceARN")) - } - if s.SourceType == nil { - invalidParams.Add(request.NewErrParamRequired("SourceType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSourceARN sets the SourceARN field's value. -func (s *ImportSource) SetSourceARN(v string) *ImportSource { - s.SourceARN = &v - return s -} - -// SetSourceType sets the SourceType field's value. -func (s *ImportSource) SetSourceType(v string) *ImportSource { - s.SourceType = &v - return s -} - -// An invalidation. -type Invalidation struct { - _ struct{} `type:"structure"` - - // The date and time the invalidation request was first made. - // - // CreateTime is a required field - CreateTime *time.Time `type:"timestamp" required:"true"` - - // The identifier for the invalidation request. For example: IDFDVBD632BHDS5. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The current invalidation information for the batch request. - // - // InvalidationBatch is a required field - InvalidationBatch *InvalidationBatch `type:"structure" required:"true"` - - // The status of the invalidation request. When the invalidation batch is finished, - // the status is Completed. - // - // Status is a required field - Status *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 Invalidation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Invalidation) GoString() string { - return s.String() -} - -// SetCreateTime sets the CreateTime field's value. -func (s *Invalidation) SetCreateTime(v time.Time) *Invalidation { - s.CreateTime = &v - return s -} - -// SetId sets the Id field's value. -func (s *Invalidation) SetId(v string) *Invalidation { - s.Id = &v - return s -} - -// SetInvalidationBatch sets the InvalidationBatch field's value. -func (s *Invalidation) SetInvalidationBatch(v *InvalidationBatch) *Invalidation { - s.InvalidationBatch = v - return s -} - -// SetStatus sets the Status field's value. -func (s *Invalidation) SetStatus(v string) *Invalidation { - s.Status = &v - return s -} - -// An invalidation batch. -type InvalidationBatch struct { - _ struct{} `type:"structure"` - - // A value that you specify to uniquely identify an invalidation request. CloudFront - // uses the value to prevent you from accidentally resubmitting an identical - // request. Whenever you create a new invalidation request, you must specify - // a new value for CallerReference and change other values in the request as - // applicable. One way to ensure that the value of CallerReference is unique - // is to use a timestamp, for example, 20120301090000. - // - // If you make a second invalidation request with the same value for CallerReference, - // and if the rest of the request is the same, CloudFront doesn't create a new - // invalidation request. Instead, CloudFront returns information about the invalidation - // request that you previously created with the same CallerReference. - // - // If CallerReference is a value you already sent in a previous invalidation - // batch request but the content of any Path is different from the original - // request, CloudFront returns an InvalidationBatchAlreadyExists error. - // - // CallerReference is a required field - CallerReference *string `type:"string" required:"true"` - - // A complex type that contains information about the objects that you want - // to invalidate. For more information, see Specifying the Objects to Invalidate - // (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html#invalidation-specifying-objects) - // in the Amazon CloudFront Developer Guide. - // - // Paths is a required field - Paths *Paths `type:"structure" 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 InvalidationBatch) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s InvalidationBatch) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InvalidationBatch) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InvalidationBatch"} - if s.CallerReference == nil { - invalidParams.Add(request.NewErrParamRequired("CallerReference")) - } - if s.Paths == nil { - invalidParams.Add(request.NewErrParamRequired("Paths")) - } - if s.Paths != nil { - if err := s.Paths.Validate(); err != nil { - invalidParams.AddNested("Paths", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCallerReference sets the CallerReference field's value. -func (s *InvalidationBatch) SetCallerReference(v string) *InvalidationBatch { - s.CallerReference = &v - return s -} - -// SetPaths sets the Paths field's value. -func (s *InvalidationBatch) SetPaths(v *Paths) *InvalidationBatch { - s.Paths = v - return s -} - -// The InvalidationList complex type describes the list of invalidation objects. -// For more information about invalidation, see Invalidating Objects (Web Distributions -// Only) (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html) -// in the Amazon CloudFront Developer Guide. -type InvalidationList struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether more invalidation batch requests remain to - // be listed. If your results were truncated, you can make a follow-up pagination - // request using the Marker request parameter to retrieve more invalidation - // batches in the list. - // - // IsTruncated is a required field - IsTruncated *bool `type:"boolean" required:"true"` - - // A complex type that contains one InvalidationSummary element for each invalidation - // batch created by the current Amazon Web Services account. - Items []*InvalidationSummary `locationNameList:"InvalidationSummary" type:"list"` - - // The value that you provided for the Marker request parameter. - // - // Marker is a required field - Marker *string `type:"string" required:"true"` - - // The value that you provided for the MaxItems request parameter. - // - // MaxItems is a required field - MaxItems *int64 `type:"integer" required:"true"` - - // If IsTruncated is true, this element is present and contains the value that - // you can use for the Marker request parameter to continue listing your invalidation - // batches where they left off. - NextMarker *string `type:"string"` - - // The number of invalidation batches that were created by the current Amazon - // Web Services account. - // - // Quantity is a required field - Quantity *int64 `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 InvalidationList) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s InvalidationList) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *InvalidationList) SetIsTruncated(v bool) *InvalidationList { - s.IsTruncated = &v - return s -} - -// SetItems sets the Items field's value. -func (s *InvalidationList) SetItems(v []*InvalidationSummary) *InvalidationList { - s.Items = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *InvalidationList) SetMarker(v string) *InvalidationList { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *InvalidationList) SetMaxItems(v int64) *InvalidationList { - s.MaxItems = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *InvalidationList) SetNextMarker(v string) *InvalidationList { - s.NextMarker = &v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *InvalidationList) SetQuantity(v int64) *InvalidationList { - s.Quantity = &v - return s -} - -// A summary of an invalidation request. -type InvalidationSummary struct { - _ struct{} `type:"structure"` - - // The time that an invalidation request was created. - // - // CreateTime is a required field - CreateTime *time.Time `type:"timestamp" required:"true"` - - // The unique ID for an invalidation request. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The status of an invalidation request. - // - // Status is a required field - Status *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 InvalidationSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s InvalidationSummary) GoString() string { - return s.String() -} - -// SetCreateTime sets the CreateTime field's value. -func (s *InvalidationSummary) SetCreateTime(v time.Time) *InvalidationSummary { - s.CreateTime = &v - return s -} - -// SetId sets the Id field's value. -func (s *InvalidationSummary) SetId(v string) *InvalidationSummary { - s.Id = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *InvalidationSummary) SetStatus(v string) *InvalidationSummary { - s.Status = &v - return s -} - -// A list of identifiers for the public keys that CloudFront can use to verify -// the signatures of signed URLs and signed cookies. -type KGKeyPairIds struct { - _ struct{} `type:"structure"` - - // The identifier of the key group that contains the public keys. - KeyGroupId *string `type:"string"` - - // A list of CloudFront key pair identifiers. - KeyPairIds *KeyPairIds `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 KGKeyPairIds) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s KGKeyPairIds) GoString() string { - return s.String() -} - -// SetKeyGroupId sets the KeyGroupId field's value. -func (s *KGKeyPairIds) SetKeyGroupId(v string) *KGKeyPairIds { - s.KeyGroupId = &v - return s -} - -// SetKeyPairIds sets the KeyPairIds field's value. -func (s *KGKeyPairIds) SetKeyPairIds(v *KeyPairIds) *KGKeyPairIds { - s.KeyPairIds = v - return s -} - -// A key group. -// -// A key group contains a list of public keys that you can use with CloudFront -// signed URLs and signed cookies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html). -type KeyGroup struct { - _ struct{} `type:"structure"` - - // The identifier for the key group. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The key group configuration. - // - // KeyGroupConfig is a required field - KeyGroupConfig *KeyGroupConfig `type:"structure" required:"true"` - - // The date and time when the key group was last modified. - // - // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" 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 KeyGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s KeyGroup) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *KeyGroup) SetId(v string) *KeyGroup { - s.Id = &v - return s -} - -// SetKeyGroupConfig sets the KeyGroupConfig field's value. -func (s *KeyGroup) SetKeyGroupConfig(v *KeyGroupConfig) *KeyGroup { - s.KeyGroupConfig = v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *KeyGroup) SetLastModifiedTime(v time.Time) *KeyGroup { - s.LastModifiedTime = &v - return s -} - -// A key group configuration. -// -// A key group contains a list of public keys that you can use with CloudFront -// signed URLs and signed cookies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html). -type KeyGroupConfig struct { - _ struct{} `type:"structure"` - - // A comment to describe the key group. The comment cannot be longer than 128 - // characters. - Comment *string `type:"string"` - - // A list of the identifiers of the public keys in the key group. - // - // Items is a required field - Items []*string `locationNameList:"PublicKey" type:"list" required:"true"` - - // A name to identify the key group. - // - // Name is a required field - Name *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 KeyGroupConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s KeyGroupConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *KeyGroupConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "KeyGroupConfig"} - if s.Items == nil { - invalidParams.Add(request.NewErrParamRequired("Items")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComment sets the Comment field's value. -func (s *KeyGroupConfig) SetComment(v string) *KeyGroupConfig { - s.Comment = &v - return s -} - -// SetItems sets the Items field's value. -func (s *KeyGroupConfig) SetItems(v []*string) *KeyGroupConfig { - s.Items = v - return s -} - -// SetName sets the Name field's value. -func (s *KeyGroupConfig) SetName(v string) *KeyGroupConfig { - s.Name = &v - return s -} - -// A list of key groups. -type KeyGroupList struct { - _ struct{} `type:"structure"` - - // A list of key groups. - Items []*KeyGroupSummary `locationNameList:"KeyGroupSummary" type:"list"` - - // The maximum number of key groups requested. - // - // MaxItems is a required field - MaxItems *int64 `type:"integer" required:"true"` - - // If there are more items in the list than are in this response, this element - // is present. It contains the value that you should use in the Marker field - // of a subsequent request to continue listing key groups. - NextMarker *string `type:"string"` - - // The number of key groups returned in the response. - // - // Quantity is a required field - Quantity *int64 `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 KeyGroupList) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s KeyGroupList) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *KeyGroupList) SetItems(v []*KeyGroupSummary) *KeyGroupList { - s.Items = v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *KeyGroupList) SetMaxItems(v int64) *KeyGroupList { - s.MaxItems = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *KeyGroupList) SetNextMarker(v string) *KeyGroupList { - s.NextMarker = &v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *KeyGroupList) SetQuantity(v int64) *KeyGroupList { - s.Quantity = &v - return s -} - -// Contains information about a key group. -type KeyGroupSummary struct { - _ struct{} `type:"structure"` - - // A key group. - // - // KeyGroup is a required field - KeyGroup *KeyGroup `type:"structure" 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 KeyGroupSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s KeyGroupSummary) GoString() string { - return s.String() -} - -// SetKeyGroup sets the KeyGroup field's value. -func (s *KeyGroupSummary) SetKeyGroup(v *KeyGroup) *KeyGroupSummary { - s.KeyGroup = v - return s -} - -// A list of CloudFront key pair identifiers. -type KeyPairIds struct { - _ struct{} `type:"structure"` - - // A list of CloudFront key pair identifiers. - Items []*string `locationNameList:"KeyPairId" type:"list"` - - // The number of key pair identifiers in the list. - // - // Quantity is a required field - Quantity *int64 `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 KeyPairIds) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s KeyPairIds) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *KeyPairIds) SetItems(v []*string) *KeyPairIds { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *KeyPairIds) SetQuantity(v int64) *KeyPairIds { - s.Quantity = &v - return s -} - -// The key value store. Use this to separate data from function code, allowing -// you to update data without having to publish a new version of a function. -// The key value store holds keys and their corresponding values. -type KeyValueStore struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the key value store. - // - // ARN is a required field - ARN *string `type:"string" required:"true"` - - // A comment for the key value store. - // - // Comment is a required field - Comment *string `type:"string" required:"true"` - - // The unique Id for the key value store. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The last-modified time of the key value store. - // - // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" required:"true"` - - // The name of the key value store. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The status of the key value store. - Status *string `type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s KeyValueStore) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s KeyValueStore) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *KeyValueStore) SetARN(v string) *KeyValueStore { - s.ARN = &v - return s -} - -// SetComment sets the Comment field's value. -func (s *KeyValueStore) SetComment(v string) *KeyValueStore { - s.Comment = &v - return s -} - -// SetId sets the Id field's value. -func (s *KeyValueStore) SetId(v string) *KeyValueStore { - s.Id = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *KeyValueStore) SetLastModifiedTime(v time.Time) *KeyValueStore { - s.LastModifiedTime = &v - return s -} - -// SetName sets the Name field's value. -func (s *KeyValueStore) SetName(v string) *KeyValueStore { - s.Name = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *KeyValueStore) SetStatus(v string) *KeyValueStore { - s.Status = &v - return s -} - -// The key value store association. -type KeyValueStoreAssociation struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the key value store association. - // - // KeyValueStoreARN is a required field - KeyValueStoreARN *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 KeyValueStoreAssociation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s KeyValueStoreAssociation) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *KeyValueStoreAssociation) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "KeyValueStoreAssociation"} - if s.KeyValueStoreARN == nil { - invalidParams.Add(request.NewErrParamRequired("KeyValueStoreARN")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyValueStoreARN sets the KeyValueStoreARN field's value. -func (s *KeyValueStoreAssociation) SetKeyValueStoreARN(v string) *KeyValueStoreAssociation { - s.KeyValueStoreARN = &v - return s -} - -// The key value store associations. -type KeyValueStoreAssociations struct { - _ struct{} `type:"structure"` - - // The items of the key value store association. - Items []*KeyValueStoreAssociation `locationNameList:"KeyValueStoreAssociation" type:"list"` - - // The quantity of key value store associations. - // - // Quantity is a required field - Quantity *int64 `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 KeyValueStoreAssociations) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s KeyValueStoreAssociations) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *KeyValueStoreAssociations) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "KeyValueStoreAssociations"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *KeyValueStoreAssociations) SetItems(v []*KeyValueStoreAssociation) *KeyValueStoreAssociations { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *KeyValueStoreAssociations) SetQuantity(v int64) *KeyValueStoreAssociations { - s.Quantity = &v - return s -} - -// The key value store list. -type KeyValueStoreList struct { - _ struct{} `type:"structure"` - - // The items of the key value store list. - Items []*KeyValueStore `locationNameList:"KeyValueStore" type:"list"` - - // The maximum number of items in the key value store list. - // - // MaxItems is a required field - MaxItems *int64 `type:"integer" required:"true"` - - // The next marker associated with the key value store list. - NextMarker *string `type:"string"` - - // The quantity of the key value store list. - // - // Quantity is a required field - Quantity *int64 `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 KeyValueStoreList) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s KeyValueStoreList) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *KeyValueStoreList) SetItems(v []*KeyValueStore) *KeyValueStoreList { - s.Items = v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *KeyValueStoreList) SetMaxItems(v int64) *KeyValueStoreList { - s.MaxItems = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *KeyValueStoreList) SetNextMarker(v string) *KeyValueStoreList { - s.NextMarker = &v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *KeyValueStoreList) SetQuantity(v int64) *KeyValueStoreList { - s.Quantity = &v - return s -} - -// Contains information about the Amazon Kinesis data stream where you are sending -// real-time log data. -type KinesisStreamConfig struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) - // role that CloudFront can use to send real-time log data to your Kinesis data - // stream. - // - // For more information the IAM role, see Real-time log configuration IAM role - // (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html#understand-real-time-log-config-iam-role) - // in the Amazon CloudFront Developer Guide. - // - // RoleARN is a required field - RoleARN *string `type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the Kinesis data stream where you are sending - // real-time log data. - // - // StreamARN is a required field - StreamARN *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 KinesisStreamConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s KinesisStreamConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *KinesisStreamConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "KinesisStreamConfig"} - if s.RoleARN == nil { - invalidParams.Add(request.NewErrParamRequired("RoleARN")) - } - if s.StreamARN == nil { - invalidParams.Add(request.NewErrParamRequired("StreamARN")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRoleARN sets the RoleARN field's value. -func (s *KinesisStreamConfig) SetRoleARN(v string) *KinesisStreamConfig { - s.RoleARN = &v - return s -} - -// SetStreamARN sets the StreamARN field's value. -func (s *KinesisStreamConfig) SetStreamARN(v string) *KinesisStreamConfig { - s.StreamARN = &v - return s -} - -// A complex type that contains a Lambda@Edge function association. -type LambdaFunctionAssociation struct { - _ struct{} `type:"structure"` - - // Specifies the event type that triggers a Lambda@Edge function invocation. - // You can specify the following values: - // - // * viewer-request: The function executes when CloudFront receives a request - // from a viewer and before it checks to see whether the requested object - // is in the edge cache. - // - // * origin-request: The function executes only when CloudFront sends a request - // to your origin. When the requested object is in the edge cache, the function - // doesn't execute. - // - // * origin-response: The function executes after CloudFront receives a response - // from the origin and before it caches the object in the response. When - // the requested object is in the edge cache, the function doesn't execute. - // - // * viewer-response: The function executes before CloudFront returns the - // requested object to the viewer. The function executes regardless of whether - // the object was already in the edge cache. If the origin returns an HTTP - // status code other than HTTP 200 (OK), the function doesn't execute. - // - // EventType is a required field - EventType *string `type:"string" required:"true" enum:"EventType"` - - // A flag that allows a Lambda@Edge function to have read access to the body - // content. For more information, see Accessing the Request Body by Choosing - // the Include Body Option (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-include-body-access.html) - // in the Amazon CloudFront Developer Guide. - IncludeBody *bool `type:"boolean"` - - // The ARN of the Lambda@Edge function. You must specify the ARN of a function - // version; you can't specify an alias or $LATEST. - // - // LambdaFunctionARN is a required field - LambdaFunctionARN *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 LambdaFunctionAssociation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s LambdaFunctionAssociation) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LambdaFunctionAssociation) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LambdaFunctionAssociation"} - if s.EventType == nil { - invalidParams.Add(request.NewErrParamRequired("EventType")) - } - if s.LambdaFunctionARN == nil { - invalidParams.Add(request.NewErrParamRequired("LambdaFunctionARN")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEventType sets the EventType field's value. -func (s *LambdaFunctionAssociation) SetEventType(v string) *LambdaFunctionAssociation { - s.EventType = &v - return s -} - -// SetIncludeBody sets the IncludeBody field's value. -func (s *LambdaFunctionAssociation) SetIncludeBody(v bool) *LambdaFunctionAssociation { - s.IncludeBody = &v - return s -} - -// SetLambdaFunctionARN sets the LambdaFunctionARN field's value. -func (s *LambdaFunctionAssociation) SetLambdaFunctionARN(v string) *LambdaFunctionAssociation { - s.LambdaFunctionARN = &v - return s -} - -// A complex type that specifies a list of Lambda@Edge functions associations -// for a cache behavior. -// -// If you want to invoke one or more Lambda@Edge functions triggered by requests -// that match the PathPattern of the cache behavior, specify the applicable -// values for Quantity and Items. Note that there can be up to 4 LambdaFunctionAssociation -// items in this list (one for each possible value of EventType) and each EventType -// can be associated with only one function. -// -// If you don't want to invoke any Lambda@Edge functions for the requests that -// match PathPattern, specify 0 for Quantity and omit Items. -type LambdaFunctionAssociations struct { - _ struct{} `type:"structure"` - - // Optional: A complex type that contains LambdaFunctionAssociation items for - // this cache behavior. If Quantity is 0, you can omit Items. - Items []*LambdaFunctionAssociation `locationNameList:"LambdaFunctionAssociation" type:"list"` - - // The number of Lambda@Edge function associations for this cache behavior. - // - // Quantity is a required field - Quantity *int64 `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 LambdaFunctionAssociations) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s LambdaFunctionAssociations) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LambdaFunctionAssociations) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LambdaFunctionAssociations"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *LambdaFunctionAssociations) SetItems(v []*LambdaFunctionAssociation) *LambdaFunctionAssociations { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *LambdaFunctionAssociations) SetQuantity(v int64) *LambdaFunctionAssociations { - s.Quantity = &v - return s -} - -type ListCachePoliciesInput struct { - _ struct{} `locationName:"ListCachePoliciesRequest" type:"structure"` - - // Use this field when paginating results to indicate where to begin in your - // list of cache policies. The response includes cache policies in the list - // that occur after the marker. To get the next page of the list, set this field's - // value to the value of NextMarker from the current page's response. - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of cache policies that you want in the response. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"` - - // A filter to return only the specified kinds of cache policies. Valid values - // are: - // - // * managed – Returns only the managed policies created by Amazon Web - // Services. - // - // * custom – Returns only the custom policies created in your Amazon Web - // Services account. - Type *string `location:"querystring" locationName:"Type" type:"string" enum:"CachePolicyType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListCachePoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListCachePoliciesInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListCachePoliciesInput) SetMarker(v string) *ListCachePoliciesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListCachePoliciesInput) SetMaxItems(v int64) *ListCachePoliciesInput { - s.MaxItems = &v - return s -} - -// SetType sets the Type field's value. -func (s *ListCachePoliciesInput) SetType(v string) *ListCachePoliciesInput { - s.Type = &v - return s -} - -type ListCachePoliciesOutput struct { - _ struct{} `type:"structure" payload:"CachePolicyList"` - - // A list of cache policies. - CachePolicyList *CachePolicyList `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 ListCachePoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListCachePoliciesOutput) GoString() string { - return s.String() -} - -// SetCachePolicyList sets the CachePolicyList field's value. -func (s *ListCachePoliciesOutput) SetCachePolicyList(v *CachePolicyList) *ListCachePoliciesOutput { - s.CachePolicyList = v - return s -} - -// The request to list origin access identities. -type ListCloudFrontOriginAccessIdentitiesInput struct { - _ struct{} `locationName:"ListCloudFrontOriginAccessIdentitiesRequest" type:"structure"` - - // Use this when paginating results to indicate where to begin in your list - // of origin access identities. The results include identities in the list that - // occur after the marker. To get the next page of results, set the Marker to - // the value of the NextMarker from the current page's response (which is also - // the ID of the last identity on that page). - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of origin access identities you want in the response body. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" 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 ListCloudFrontOriginAccessIdentitiesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListCloudFrontOriginAccessIdentitiesInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListCloudFrontOriginAccessIdentitiesInput) SetMarker(v string) *ListCloudFrontOriginAccessIdentitiesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListCloudFrontOriginAccessIdentitiesInput) SetMaxItems(v int64) *ListCloudFrontOriginAccessIdentitiesInput { - s.MaxItems = &v - return s -} - -// The returned result of the corresponding request. -type ListCloudFrontOriginAccessIdentitiesOutput struct { - _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentityList"` - - // The CloudFrontOriginAccessIdentityList type. - CloudFrontOriginAccessIdentityList *OriginAccessIdentityList `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 ListCloudFrontOriginAccessIdentitiesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListCloudFrontOriginAccessIdentitiesOutput) GoString() string { - return s.String() -} - -// SetCloudFrontOriginAccessIdentityList sets the CloudFrontOriginAccessIdentityList field's value. -func (s *ListCloudFrontOriginAccessIdentitiesOutput) SetCloudFrontOriginAccessIdentityList(v *OriginAccessIdentityList) *ListCloudFrontOriginAccessIdentitiesOutput { - s.CloudFrontOriginAccessIdentityList = v - return s -} - -type ListConflictingAliasesInput struct { - _ struct{} `locationName:"ListConflictingAliasesRequest" type:"structure"` - - // The alias (also called a CNAME) to search for conflicting aliases. - // - // Alias is a required field - Alias *string `location:"querystring" locationName:"Alias" type:"string" required:"true"` - - // The ID of a distribution in your account that has an attached SSL/TLS certificate - // that includes the provided alias. - // - // DistributionId is a required field - DistributionId *string `location:"querystring" locationName:"DistributionId" type:"string" required:"true"` - - // Use this field when paginating results to indicate where to begin in the - // list of conflicting aliases. The response includes conflicting aliases in - // the list that occur after the marker. To get the next page of the list, set - // this field's value to the value of NextMarker from the current page's response. - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of conflicting aliases that you want in the response. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" 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 ListConflictingAliasesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListConflictingAliasesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListConflictingAliasesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListConflictingAliasesInput"} - if s.Alias == nil { - invalidParams.Add(request.NewErrParamRequired("Alias")) - } - if s.DistributionId == nil { - invalidParams.Add(request.NewErrParamRequired("DistributionId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlias sets the Alias field's value. -func (s *ListConflictingAliasesInput) SetAlias(v string) *ListConflictingAliasesInput { - s.Alias = &v - return s -} - -// SetDistributionId sets the DistributionId field's value. -func (s *ListConflictingAliasesInput) SetDistributionId(v string) *ListConflictingAliasesInput { - s.DistributionId = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListConflictingAliasesInput) SetMarker(v string) *ListConflictingAliasesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListConflictingAliasesInput) SetMaxItems(v int64) *ListConflictingAliasesInput { - s.MaxItems = &v - return s -} - -type ListConflictingAliasesOutput struct { - _ struct{} `type:"structure" payload:"ConflictingAliasesList"` - - // A list of conflicting aliases. - ConflictingAliasesList *ConflictingAliasesList `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 ListConflictingAliasesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListConflictingAliasesOutput) GoString() string { - return s.String() -} - -// SetConflictingAliasesList sets the ConflictingAliasesList field's value. -func (s *ListConflictingAliasesOutput) SetConflictingAliasesList(v *ConflictingAliasesList) *ListConflictingAliasesOutput { - s.ConflictingAliasesList = v - return s -} - -type ListContinuousDeploymentPoliciesInput struct { - _ struct{} `locationName:"ListContinuousDeploymentPoliciesRequest" type:"structure"` - - // Use this field when paginating results to indicate where to begin in your - // list of continuous deployment policies. The response includes policies in - // the list that occur after the marker. To get the next page of the list, set - // this field's value to the value of NextMarker from the current page's response. - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of continuous deployment policies that you want returned - // in the response. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" 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 ListContinuousDeploymentPoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListContinuousDeploymentPoliciesInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListContinuousDeploymentPoliciesInput) SetMarker(v string) *ListContinuousDeploymentPoliciesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListContinuousDeploymentPoliciesInput) SetMaxItems(v int64) *ListContinuousDeploymentPoliciesInput { - s.MaxItems = &v - return s -} - -type ListContinuousDeploymentPoliciesOutput struct { - _ struct{} `type:"structure" payload:"ContinuousDeploymentPolicyList"` - - // A list of continuous deployment policies. - ContinuousDeploymentPolicyList *ContinuousDeploymentPolicyList `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 ListContinuousDeploymentPoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListContinuousDeploymentPoliciesOutput) GoString() string { - return s.String() -} - -// SetContinuousDeploymentPolicyList sets the ContinuousDeploymentPolicyList field's value. -func (s *ListContinuousDeploymentPoliciesOutput) SetContinuousDeploymentPolicyList(v *ContinuousDeploymentPolicyList) *ListContinuousDeploymentPoliciesOutput { - s.ContinuousDeploymentPolicyList = v - return s -} - -type ListDistributionsByCachePolicyIdInput struct { - _ struct{} `locationName:"ListDistributionsByCachePolicyIdRequest" type:"structure"` - - // The ID of the cache policy whose associated distribution IDs you want to - // list. - // - // CachePolicyId is a required field - CachePolicyId *string `location:"uri" locationName:"CachePolicyId" type:"string" required:"true"` - - // Use this field when paginating results to indicate where to begin in your - // list of distribution IDs. The response includes distribution IDs in the list - // that occur after the marker. To get the next page of the list, set this field's - // value to the value of NextMarker from the current page's response. - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of distribution IDs that you want in the response. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" 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 ListDistributionsByCachePolicyIdInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListDistributionsByCachePolicyIdInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListDistributionsByCachePolicyIdInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListDistributionsByCachePolicyIdInput"} - if s.CachePolicyId == nil { - invalidParams.Add(request.NewErrParamRequired("CachePolicyId")) - } - if s.CachePolicyId != nil && len(*s.CachePolicyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CachePolicyId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCachePolicyId sets the CachePolicyId field's value. -func (s *ListDistributionsByCachePolicyIdInput) SetCachePolicyId(v string) *ListDistributionsByCachePolicyIdInput { - s.CachePolicyId = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListDistributionsByCachePolicyIdInput) SetMarker(v string) *ListDistributionsByCachePolicyIdInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListDistributionsByCachePolicyIdInput) SetMaxItems(v int64) *ListDistributionsByCachePolicyIdInput { - s.MaxItems = &v - return s -} - -type ListDistributionsByCachePolicyIdOutput struct { - _ struct{} `type:"structure" payload:"DistributionIdList"` - - // A list of distribution IDs. - DistributionIdList *DistributionIdList `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 ListDistributionsByCachePolicyIdOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListDistributionsByCachePolicyIdOutput) GoString() string { - return s.String() -} - -// SetDistributionIdList sets the DistributionIdList field's value. -func (s *ListDistributionsByCachePolicyIdOutput) SetDistributionIdList(v *DistributionIdList) *ListDistributionsByCachePolicyIdOutput { - s.DistributionIdList = v - return s -} - -type ListDistributionsByKeyGroupInput struct { - _ struct{} `locationName:"ListDistributionsByKeyGroupRequest" type:"structure"` - - // The ID of the key group whose associated distribution IDs you are listing. - // - // KeyGroupId is a required field - KeyGroupId *string `location:"uri" locationName:"KeyGroupId" type:"string" required:"true"` - - // Use this field when paginating results to indicate where to begin in your - // list of distribution IDs. The response includes distribution IDs in the list - // that occur after the marker. To get the next page of the list, set this field's - // value to the value of NextMarker from the current page's response. - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of distribution IDs that you want in the response. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" 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 ListDistributionsByKeyGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListDistributionsByKeyGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListDistributionsByKeyGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListDistributionsByKeyGroupInput"} - if s.KeyGroupId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyGroupId")) - } - if s.KeyGroupId != nil && len(*s.KeyGroupId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("KeyGroupId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyGroupId sets the KeyGroupId field's value. -func (s *ListDistributionsByKeyGroupInput) SetKeyGroupId(v string) *ListDistributionsByKeyGroupInput { - s.KeyGroupId = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListDistributionsByKeyGroupInput) SetMarker(v string) *ListDistributionsByKeyGroupInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListDistributionsByKeyGroupInput) SetMaxItems(v int64) *ListDistributionsByKeyGroupInput { - s.MaxItems = &v - return s -} - -type ListDistributionsByKeyGroupOutput struct { - _ struct{} `type:"structure" payload:"DistributionIdList"` - - // A list of distribution IDs. - DistributionIdList *DistributionIdList `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 ListDistributionsByKeyGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListDistributionsByKeyGroupOutput) GoString() string { - return s.String() -} - -// SetDistributionIdList sets the DistributionIdList field's value. -func (s *ListDistributionsByKeyGroupOutput) SetDistributionIdList(v *DistributionIdList) *ListDistributionsByKeyGroupOutput { - s.DistributionIdList = v - return s -} - -type ListDistributionsByOriginRequestPolicyIdInput struct { - _ struct{} `locationName:"ListDistributionsByOriginRequestPolicyIdRequest" type:"structure"` - - // Use this field when paginating results to indicate where to begin in your - // list of distribution IDs. The response includes distribution IDs in the list - // that occur after the marker. To get the next page of the list, set this field's - // value to the value of NextMarker from the current page's response. - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of distribution IDs that you want in the response. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"` - - // The ID of the origin request policy whose associated distribution IDs you - // want to list. - // - // OriginRequestPolicyId is a required field - OriginRequestPolicyId *string `location:"uri" locationName:"OriginRequestPolicyId" 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 ListDistributionsByOriginRequestPolicyIdInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListDistributionsByOriginRequestPolicyIdInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListDistributionsByOriginRequestPolicyIdInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListDistributionsByOriginRequestPolicyIdInput"} - if s.OriginRequestPolicyId == nil { - invalidParams.Add(request.NewErrParamRequired("OriginRequestPolicyId")) - } - if s.OriginRequestPolicyId != nil && len(*s.OriginRequestPolicyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("OriginRequestPolicyId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListDistributionsByOriginRequestPolicyIdInput) SetMarker(v string) *ListDistributionsByOriginRequestPolicyIdInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListDistributionsByOriginRequestPolicyIdInput) SetMaxItems(v int64) *ListDistributionsByOriginRequestPolicyIdInput { - s.MaxItems = &v - return s -} - -// SetOriginRequestPolicyId sets the OriginRequestPolicyId field's value. -func (s *ListDistributionsByOriginRequestPolicyIdInput) SetOriginRequestPolicyId(v string) *ListDistributionsByOriginRequestPolicyIdInput { - s.OriginRequestPolicyId = &v - return s -} - -type ListDistributionsByOriginRequestPolicyIdOutput struct { - _ struct{} `type:"structure" payload:"DistributionIdList"` - - // A list of distribution IDs. - DistributionIdList *DistributionIdList `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 ListDistributionsByOriginRequestPolicyIdOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListDistributionsByOriginRequestPolicyIdOutput) GoString() string { - return s.String() -} - -// SetDistributionIdList sets the DistributionIdList field's value. -func (s *ListDistributionsByOriginRequestPolicyIdOutput) SetDistributionIdList(v *DistributionIdList) *ListDistributionsByOriginRequestPolicyIdOutput { - s.DistributionIdList = v - return s -} - -type ListDistributionsByRealtimeLogConfigInput struct { - _ struct{} `locationName:"ListDistributionsByRealtimeLogConfigRequest" type:"structure" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` - - // Use this field when paginating results to indicate where to begin in your - // list of distributions. The response includes distributions in the list that - // occur after the marker. To get the next page of the list, set this field's - // value to the value of NextMarker from the current page's response. - Marker *string `type:"string"` - - // The maximum number of distributions that you want in the response. - MaxItems *int64 `type:"integer"` - - // The Amazon Resource Name (ARN) of the real-time log configuration whose associated - // distributions you want to list. - RealtimeLogConfigArn *string `type:"string"` - - // The name of the real-time log configuration whose associated distributions - // you want to list. - RealtimeLogConfigName *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 ListDistributionsByRealtimeLogConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListDistributionsByRealtimeLogConfigInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListDistributionsByRealtimeLogConfigInput) SetMarker(v string) *ListDistributionsByRealtimeLogConfigInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListDistributionsByRealtimeLogConfigInput) SetMaxItems(v int64) *ListDistributionsByRealtimeLogConfigInput { - s.MaxItems = &v - return s -} - -// SetRealtimeLogConfigArn sets the RealtimeLogConfigArn field's value. -func (s *ListDistributionsByRealtimeLogConfigInput) SetRealtimeLogConfigArn(v string) *ListDistributionsByRealtimeLogConfigInput { - s.RealtimeLogConfigArn = &v - return s -} - -// SetRealtimeLogConfigName sets the RealtimeLogConfigName field's value. -func (s *ListDistributionsByRealtimeLogConfigInput) SetRealtimeLogConfigName(v string) *ListDistributionsByRealtimeLogConfigInput { - s.RealtimeLogConfigName = &v - return s -} - -type ListDistributionsByRealtimeLogConfigOutput struct { - _ struct{} `type:"structure" payload:"DistributionList"` - - // A distribution list. - DistributionList *DistributionList `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 ListDistributionsByRealtimeLogConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListDistributionsByRealtimeLogConfigOutput) GoString() string { - return s.String() -} - -// SetDistributionList sets the DistributionList field's value. -func (s *ListDistributionsByRealtimeLogConfigOutput) SetDistributionList(v *DistributionList) *ListDistributionsByRealtimeLogConfigOutput { - s.DistributionList = v - return s -} - -type ListDistributionsByResponseHeadersPolicyIdInput struct { - _ struct{} `locationName:"ListDistributionsByResponseHeadersPolicyIdRequest" type:"structure"` - - // Use this field when paginating results to indicate where to begin in your - // list of distribution IDs. The response includes distribution IDs in the list - // that occur after the marker. To get the next page of the list, set this field's - // value to the value of NextMarker from the current page's response. - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of distribution IDs that you want to get in the response. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"` - - // The ID of the response headers policy whose associated distribution IDs you - // want to list. - // - // ResponseHeadersPolicyId is a required field - ResponseHeadersPolicyId *string `location:"uri" locationName:"ResponseHeadersPolicyId" 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 ListDistributionsByResponseHeadersPolicyIdInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListDistributionsByResponseHeadersPolicyIdInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListDistributionsByResponseHeadersPolicyIdInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListDistributionsByResponseHeadersPolicyIdInput"} - if s.ResponseHeadersPolicyId == nil { - invalidParams.Add(request.NewErrParamRequired("ResponseHeadersPolicyId")) - } - if s.ResponseHeadersPolicyId != nil && len(*s.ResponseHeadersPolicyId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResponseHeadersPolicyId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListDistributionsByResponseHeadersPolicyIdInput) SetMarker(v string) *ListDistributionsByResponseHeadersPolicyIdInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListDistributionsByResponseHeadersPolicyIdInput) SetMaxItems(v int64) *ListDistributionsByResponseHeadersPolicyIdInput { - s.MaxItems = &v - return s -} - -// SetResponseHeadersPolicyId sets the ResponseHeadersPolicyId field's value. -func (s *ListDistributionsByResponseHeadersPolicyIdInput) SetResponseHeadersPolicyId(v string) *ListDistributionsByResponseHeadersPolicyIdInput { - s.ResponseHeadersPolicyId = &v - return s -} - -type ListDistributionsByResponseHeadersPolicyIdOutput struct { - _ struct{} `type:"structure" payload:"DistributionIdList"` - - // A list of distribution IDs. - DistributionIdList *DistributionIdList `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 ListDistributionsByResponseHeadersPolicyIdOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListDistributionsByResponseHeadersPolicyIdOutput) GoString() string { - return s.String() -} - -// SetDistributionIdList sets the DistributionIdList field's value. -func (s *ListDistributionsByResponseHeadersPolicyIdOutput) SetDistributionIdList(v *DistributionIdList) *ListDistributionsByResponseHeadersPolicyIdOutput { - s.DistributionIdList = v - return s -} - -// The request to list distributions that are associated with a specified WAF -// web ACL. -type ListDistributionsByWebACLIdInput struct { - _ struct{} `locationName:"ListDistributionsByWebACLIdRequest" type:"structure"` - - // Use Marker and MaxItems to control pagination of results. If you have more - // than MaxItems distributions that satisfy the request, the response includes - // a NextMarker element. To get the next page of results, submit another request. - // For the value of Marker, specify the value of NextMarker from the last response. - // (For the first request, omit Marker.) - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of distributions that you want CloudFront to return in - // the response body. The maximum and default values are both 100. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"` - - // The ID of the WAF web ACL that you want to list the associated distributions. - // If you specify "null" for the ID, the request returns a list of the distributions - // that aren't associated with a web ACL. - // - // For WAFV2, this is the ARN of the web ACL, such as arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111. - // - // For WAF Classic, this is the ID of the web ACL, such as a1b2c3d4-5678-90ab-cdef-EXAMPLE11111. - // - // WebACLId is a required field - WebACLId *string `location:"uri" locationName:"WebACLId" 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 ListDistributionsByWebACLIdInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListDistributionsByWebACLIdInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListDistributionsByWebACLIdInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListDistributionsByWebACLIdInput"} - if s.WebACLId == nil { - invalidParams.Add(request.NewErrParamRequired("WebACLId")) - } - if s.WebACLId != nil && len(*s.WebACLId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("WebACLId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListDistributionsByWebACLIdInput) SetMarker(v string) *ListDistributionsByWebACLIdInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListDistributionsByWebACLIdInput) SetMaxItems(v int64) *ListDistributionsByWebACLIdInput { - s.MaxItems = &v - return s -} - -// SetWebACLId sets the WebACLId field's value. -func (s *ListDistributionsByWebACLIdInput) SetWebACLId(v string) *ListDistributionsByWebACLIdInput { - s.WebACLId = &v - return s -} - -// The response to a request to list the distributions that are associated with -// a specified WAF web ACL. -type ListDistributionsByWebACLIdOutput struct { - _ struct{} `type:"structure" payload:"DistributionList"` - - // The DistributionList type. - DistributionList *DistributionList `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 ListDistributionsByWebACLIdOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListDistributionsByWebACLIdOutput) GoString() string { - return s.String() -} - -// SetDistributionList sets the DistributionList field's value. -func (s *ListDistributionsByWebACLIdOutput) SetDistributionList(v *DistributionList) *ListDistributionsByWebACLIdOutput { - s.DistributionList = v - return s -} - -// The request to list your distributions. -type ListDistributionsInput struct { - _ struct{} `locationName:"ListDistributionsRequest" type:"structure"` - - // Use this when paginating results to indicate where to begin in your list - // of distributions. The results include distributions in the list that occur - // after the marker. To get the next page of results, set the Marker to the - // value of the NextMarker from the current page's response (which is also the - // ID of the last distribution on that page). - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of distributions you want in the response body. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" 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 ListDistributionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListDistributionsInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListDistributionsInput) SetMarker(v string) *ListDistributionsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListDistributionsInput) SetMaxItems(v int64) *ListDistributionsInput { - s.MaxItems = &v - return s -} - -// The returned result of the corresponding request. -type ListDistributionsOutput struct { - _ struct{} `type:"structure" payload:"DistributionList"` - - // The DistributionList type. - DistributionList *DistributionList `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 ListDistributionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListDistributionsOutput) GoString() string { - return s.String() -} - -// SetDistributionList sets the DistributionList field's value. -func (s *ListDistributionsOutput) SetDistributionList(v *DistributionList) *ListDistributionsOutput { - s.DistributionList = v - return s -} - -type ListFieldLevelEncryptionConfigsInput struct { - _ struct{} `locationName:"ListFieldLevelEncryptionConfigsRequest" type:"structure"` - - // Use this when paginating results to indicate where to begin in your list - // of configurations. The results include configurations in the list that occur - // after the marker. To get the next page of results, set the Marker to the - // value of the NextMarker from the current page's response (which is also the - // ID of the last configuration on that page). - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of field-level encryption configurations you want in the - // response body. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" 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 ListFieldLevelEncryptionConfigsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListFieldLevelEncryptionConfigsInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListFieldLevelEncryptionConfigsInput) SetMarker(v string) *ListFieldLevelEncryptionConfigsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListFieldLevelEncryptionConfigsInput) SetMaxItems(v int64) *ListFieldLevelEncryptionConfigsInput { - s.MaxItems = &v - return s -} - -type ListFieldLevelEncryptionConfigsOutput struct { - _ struct{} `type:"structure" payload:"FieldLevelEncryptionList"` - - // Returns a list of all field-level encryption configurations that have been - // created in CloudFront for this account. - FieldLevelEncryptionList *FieldLevelEncryptionList `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 ListFieldLevelEncryptionConfigsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListFieldLevelEncryptionConfigsOutput) GoString() string { - return s.String() -} - -// SetFieldLevelEncryptionList sets the FieldLevelEncryptionList field's value. -func (s *ListFieldLevelEncryptionConfigsOutput) SetFieldLevelEncryptionList(v *FieldLevelEncryptionList) *ListFieldLevelEncryptionConfigsOutput { - s.FieldLevelEncryptionList = v - return s -} - -type ListFieldLevelEncryptionProfilesInput struct { - _ struct{} `locationName:"ListFieldLevelEncryptionProfilesRequest" type:"structure"` - - // Use this when paginating results to indicate where to begin in your list - // of profiles. The results include profiles in the list that occur after the - // marker. To get the next page of results, set the Marker to the value of the - // NextMarker from the current page's response (which is also the ID of the - // last profile on that page). - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of field-level encryption profiles you want in the response - // body. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" 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 ListFieldLevelEncryptionProfilesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListFieldLevelEncryptionProfilesInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListFieldLevelEncryptionProfilesInput) SetMarker(v string) *ListFieldLevelEncryptionProfilesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListFieldLevelEncryptionProfilesInput) SetMaxItems(v int64) *ListFieldLevelEncryptionProfilesInput { - s.MaxItems = &v - return s -} - -type ListFieldLevelEncryptionProfilesOutput struct { - _ struct{} `type:"structure" payload:"FieldLevelEncryptionProfileList"` - - // Returns a list of the field-level encryption profiles that have been created - // in CloudFront for this account. - FieldLevelEncryptionProfileList *FieldLevelEncryptionProfileList `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 ListFieldLevelEncryptionProfilesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListFieldLevelEncryptionProfilesOutput) GoString() string { - return s.String() -} - -// SetFieldLevelEncryptionProfileList sets the FieldLevelEncryptionProfileList field's value. -func (s *ListFieldLevelEncryptionProfilesOutput) SetFieldLevelEncryptionProfileList(v *FieldLevelEncryptionProfileList) *ListFieldLevelEncryptionProfilesOutput { - s.FieldLevelEncryptionProfileList = v - return s -} - -type ListFunctionsInput struct { - _ struct{} `locationName:"ListFunctionsRequest" type:"structure"` - - // Use this field when paginating results to indicate where to begin in your - // list of functions. The response includes functions in the list that occur - // after the marker. To get the next page of the list, set this field's value - // to the value of NextMarker from the current page's response. - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of functions that you want in the response. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"` - - // An optional filter to return only the functions that are in the specified - // stage, either DEVELOPMENT or LIVE. - Stage *string `location:"querystring" locationName:"Stage" type:"string" enum:"FunctionStage"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListFunctionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListFunctionsInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListFunctionsInput) SetMarker(v string) *ListFunctionsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListFunctionsInput) SetMaxItems(v int64) *ListFunctionsInput { - s.MaxItems = &v - return s -} - -// SetStage sets the Stage field's value. -func (s *ListFunctionsInput) SetStage(v string) *ListFunctionsInput { - s.Stage = &v - return s -} - -type ListFunctionsOutput struct { - _ struct{} `type:"structure" payload:"FunctionList"` - - // A list of CloudFront functions. - FunctionList *FunctionList `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 ListFunctionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListFunctionsOutput) GoString() string { - return s.String() -} - -// SetFunctionList sets the FunctionList field's value. -func (s *ListFunctionsOutput) SetFunctionList(v *FunctionList) *ListFunctionsOutput { - s.FunctionList = v - return s -} - -// The request to list invalidations. -type ListInvalidationsInput struct { - _ struct{} `locationName:"ListInvalidationsRequest" type:"structure"` - - // The distribution's ID. - // - // DistributionId is a required field - DistributionId *string `location:"uri" locationName:"DistributionId" type:"string" required:"true"` - - // Use this parameter when paginating results to indicate where to begin in - // your list of invalidation batches. Because the results are returned in decreasing - // order from most recent to oldest, the most recent results are on the first - // page, the second page will contain earlier results, and so on. To get the - // next page of results, set Marker to the value of the NextMarker from the - // current page's response. This value is the same as the ID of the last invalidation - // batch on that page. - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of invalidation batches that you want in the response - // body. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" 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 ListInvalidationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListInvalidationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListInvalidationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListInvalidationsInput"} - if s.DistributionId == nil { - invalidParams.Add(request.NewErrParamRequired("DistributionId")) - } - if s.DistributionId != nil && len(*s.DistributionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DistributionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDistributionId sets the DistributionId field's value. -func (s *ListInvalidationsInput) SetDistributionId(v string) *ListInvalidationsInput { - s.DistributionId = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListInvalidationsInput) SetMarker(v string) *ListInvalidationsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListInvalidationsInput) SetMaxItems(v int64) *ListInvalidationsInput { - s.MaxItems = &v - return s -} - -// The returned result of the corresponding request. -type ListInvalidationsOutput struct { - _ struct{} `type:"structure" payload:"InvalidationList"` - - // Information about invalidation batches. - InvalidationList *InvalidationList `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 ListInvalidationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListInvalidationsOutput) GoString() string { - return s.String() -} - -// SetInvalidationList sets the InvalidationList field's value. -func (s *ListInvalidationsOutput) SetInvalidationList(v *InvalidationList) *ListInvalidationsOutput { - s.InvalidationList = v - return s -} - -type ListKeyGroupsInput struct { - _ struct{} `locationName:"ListKeyGroupsRequest" type:"structure"` - - // Use this field when paginating results to indicate where to begin in your - // list of key groups. The response includes key groups in the list that occur - // after the marker. To get the next page of the list, set this field's value - // to the value of NextMarker from the current page's response. - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of key groups that you want in the response. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" 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 ListKeyGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListKeyGroupsInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListKeyGroupsInput) SetMarker(v string) *ListKeyGroupsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListKeyGroupsInput) SetMaxItems(v int64) *ListKeyGroupsInput { - s.MaxItems = &v - return s -} - -type ListKeyGroupsOutput struct { - _ struct{} `type:"structure" payload:"KeyGroupList"` - - // A list of key groups. - KeyGroupList *KeyGroupList `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 ListKeyGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListKeyGroupsOutput) GoString() string { - return s.String() -} - -// SetKeyGroupList sets the KeyGroupList field's value. -func (s *ListKeyGroupsOutput) SetKeyGroupList(v *KeyGroupList) *ListKeyGroupsOutput { - s.KeyGroupList = v - return s -} - -type ListKeyValueStoresInput struct { - _ struct{} `locationName:"ListKeyValueStoresRequest" type:"structure"` - - // The marker associated with the key value stores list. - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of items in the key value stores list. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"` - - // The status of the request for the key value stores list. - Status *string `location:"querystring" locationName:"Status" 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 ListKeyValueStoresInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListKeyValueStoresInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListKeyValueStoresInput) SetMarker(v string) *ListKeyValueStoresInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListKeyValueStoresInput) SetMaxItems(v int64) *ListKeyValueStoresInput { - s.MaxItems = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ListKeyValueStoresInput) SetStatus(v string) *ListKeyValueStoresInput { - s.Status = &v - return s -} - -type ListKeyValueStoresOutput struct { - _ struct{} `type:"structure" payload:"KeyValueStoreList"` - - // The resulting key value stores list. - KeyValueStoreList *KeyValueStoreList `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 ListKeyValueStoresOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListKeyValueStoresOutput) GoString() string { - return s.String() -} - -// SetKeyValueStoreList sets the KeyValueStoreList field's value. -func (s *ListKeyValueStoresOutput) SetKeyValueStoreList(v *KeyValueStoreList) *ListKeyValueStoresOutput { - s.KeyValueStoreList = v - return s -} - -type ListOriginAccessControlsInput struct { - _ struct{} `locationName:"ListOriginAccessControlsRequest" type:"structure"` - - // Use this field when paginating results to indicate where to begin in your - // list of origin access controls. The response includes the items in the list - // that occur after the marker. To get the next page of the list, set this field's - // value to the value of NextMarker from the current page's response. - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of origin access controls that you want in the response. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" 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 ListOriginAccessControlsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListOriginAccessControlsInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListOriginAccessControlsInput) SetMarker(v string) *ListOriginAccessControlsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListOriginAccessControlsInput) SetMaxItems(v int64) *ListOriginAccessControlsInput { - s.MaxItems = &v - return s -} - -type ListOriginAccessControlsOutput struct { - _ struct{} `type:"structure" payload:"OriginAccessControlList"` - - // A list of origin access controls. - OriginAccessControlList *OriginAccessControlList `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 ListOriginAccessControlsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListOriginAccessControlsOutput) GoString() string { - return s.String() -} - -// SetOriginAccessControlList sets the OriginAccessControlList field's value. -func (s *ListOriginAccessControlsOutput) SetOriginAccessControlList(v *OriginAccessControlList) *ListOriginAccessControlsOutput { - s.OriginAccessControlList = v - return s -} - -type ListOriginRequestPoliciesInput struct { - _ struct{} `locationName:"ListOriginRequestPoliciesRequest" type:"structure"` - - // Use this field when paginating results to indicate where to begin in your - // list of origin request policies. The response includes origin request policies - // in the list that occur after the marker. To get the next page of the list, - // set this field's value to the value of NextMarker from the current page's - // response. - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of origin request policies that you want in the response. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"` - - // A filter to return only the specified kinds of origin request policies. Valid - // values are: - // - // * managed – Returns only the managed policies created by Amazon Web - // Services. - // - // * custom – Returns only the custom policies created in your Amazon Web - // Services account. - Type *string `location:"querystring" locationName:"Type" type:"string" enum:"OriginRequestPolicyType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListOriginRequestPoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListOriginRequestPoliciesInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListOriginRequestPoliciesInput) SetMarker(v string) *ListOriginRequestPoliciesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListOriginRequestPoliciesInput) SetMaxItems(v int64) *ListOriginRequestPoliciesInput { - s.MaxItems = &v - return s -} - -// SetType sets the Type field's value. -func (s *ListOriginRequestPoliciesInput) SetType(v string) *ListOriginRequestPoliciesInput { - s.Type = &v - return s -} - -type ListOriginRequestPoliciesOutput struct { - _ struct{} `type:"structure" payload:"OriginRequestPolicyList"` - - // A list of origin request policies. - OriginRequestPolicyList *OriginRequestPolicyList `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 ListOriginRequestPoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListOriginRequestPoliciesOutput) GoString() string { - return s.String() -} - -// SetOriginRequestPolicyList sets the OriginRequestPolicyList field's value. -func (s *ListOriginRequestPoliciesOutput) SetOriginRequestPolicyList(v *OriginRequestPolicyList) *ListOriginRequestPoliciesOutput { - s.OriginRequestPolicyList = v - return s -} - -type ListPublicKeysInput struct { - _ struct{} `locationName:"ListPublicKeysRequest" type:"structure"` - - // Use this when paginating results to indicate where to begin in your list - // of public keys. The results include public keys in the list that occur after - // the marker. To get the next page of results, set the Marker to the value - // of the NextMarker from the current page's response (which is also the ID - // of the last public key on that page). - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of public keys you want in the response body. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" 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 ListPublicKeysInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPublicKeysInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListPublicKeysInput) SetMarker(v string) *ListPublicKeysInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListPublicKeysInput) SetMaxItems(v int64) *ListPublicKeysInput { - s.MaxItems = &v - return s -} - -type ListPublicKeysOutput struct { - _ struct{} `type:"structure" payload:"PublicKeyList"` - - // Returns a list of all public keys that have been added to CloudFront for - // this account. - PublicKeyList *PublicKeyList `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 ListPublicKeysOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPublicKeysOutput) GoString() string { - return s.String() -} - -// SetPublicKeyList sets the PublicKeyList field's value. -func (s *ListPublicKeysOutput) SetPublicKeyList(v *PublicKeyList) *ListPublicKeysOutput { - s.PublicKeyList = v - return s -} - -type ListRealtimeLogConfigsInput struct { - _ struct{} `locationName:"ListRealtimeLogConfigsRequest" type:"structure"` - - // Use this field when paginating results to indicate where to begin in your - // list of real-time log configurations. The response includes real-time log - // configurations in the list that occur after the marker. To get the next page - // of the list, set this field's value to the value of NextMarker from the current - // page's response. - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of real-time log configurations that you want in the response. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" 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 ListRealtimeLogConfigsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListRealtimeLogConfigsInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListRealtimeLogConfigsInput) SetMarker(v string) *ListRealtimeLogConfigsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListRealtimeLogConfigsInput) SetMaxItems(v int64) *ListRealtimeLogConfigsInput { - s.MaxItems = &v - return s -} - -type ListRealtimeLogConfigsOutput struct { - _ struct{} `type:"structure" payload:"RealtimeLogConfigs"` - - // A list of real-time log configurations. - RealtimeLogConfigs *RealtimeLogConfigs `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 ListRealtimeLogConfigsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListRealtimeLogConfigsOutput) GoString() string { - return s.String() -} - -// SetRealtimeLogConfigs sets the RealtimeLogConfigs field's value. -func (s *ListRealtimeLogConfigsOutput) SetRealtimeLogConfigs(v *RealtimeLogConfigs) *ListRealtimeLogConfigsOutput { - s.RealtimeLogConfigs = v - return s -} - -type ListResponseHeadersPoliciesInput struct { - _ struct{} `locationName:"ListResponseHeadersPoliciesRequest" type:"structure"` - - // Use this field when paginating results to indicate where to begin in your - // list of response headers policies. The response includes response headers - // policies in the list that occur after the marker. To get the next page of - // the list, set this field's value to the value of NextMarker from the current - // page's response. - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The maximum number of response headers policies that you want to get in the - // response. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"` - - // A filter to get only the specified kind of response headers policies. Valid - // values are: - // - // * managed – Gets only the managed policies created by Amazon Web Services. - // - // * custom – Gets only the custom policies created in your Amazon Web - // Services account. - Type *string `location:"querystring" locationName:"Type" type:"string" enum:"ResponseHeadersPolicyType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListResponseHeadersPoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListResponseHeadersPoliciesInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListResponseHeadersPoliciesInput) SetMarker(v string) *ListResponseHeadersPoliciesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListResponseHeadersPoliciesInput) SetMaxItems(v int64) *ListResponseHeadersPoliciesInput { - s.MaxItems = &v - return s -} - -// SetType sets the Type field's value. -func (s *ListResponseHeadersPoliciesInput) SetType(v string) *ListResponseHeadersPoliciesInput { - s.Type = &v - return s -} - -type ListResponseHeadersPoliciesOutput struct { - _ struct{} `type:"structure" payload:"ResponseHeadersPolicyList"` - - // A list of response headers policies. - ResponseHeadersPolicyList *ResponseHeadersPolicyList `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 ListResponseHeadersPoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListResponseHeadersPoliciesOutput) GoString() string { - return s.String() -} - -// SetResponseHeadersPolicyList sets the ResponseHeadersPolicyList field's value. -func (s *ListResponseHeadersPoliciesOutput) SetResponseHeadersPolicyList(v *ResponseHeadersPolicyList) *ListResponseHeadersPoliciesOutput { - s.ResponseHeadersPolicyList = v - return s -} - -// The request to list your streaming distributions. -type ListStreamingDistributionsInput struct { - _ struct{} `locationName:"ListStreamingDistributionsRequest" type:"structure"` - - // The value that you provided for the Marker request parameter. - Marker *string `location:"querystring" locationName:"Marker" type:"string"` - - // The value that you provided for the MaxItems request parameter. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" 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 ListStreamingDistributionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListStreamingDistributionsInput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *ListStreamingDistributionsInput) SetMarker(v string) *ListStreamingDistributionsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListStreamingDistributionsInput) SetMaxItems(v int64) *ListStreamingDistributionsInput { - s.MaxItems = &v - return s -} - -// The returned result of the corresponding request. -type ListStreamingDistributionsOutput struct { - _ struct{} `type:"structure" payload:"StreamingDistributionList"` - - // The StreamingDistributionList type. - StreamingDistributionList *StreamingDistributionList `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 ListStreamingDistributionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListStreamingDistributionsOutput) GoString() string { - return s.String() -} - -// SetStreamingDistributionList sets the StreamingDistributionList field's value. -func (s *ListStreamingDistributionsOutput) SetStreamingDistributionList(v *StreamingDistributionList) *ListStreamingDistributionsOutput { - s.StreamingDistributionList = v - return s -} - -// The request to list tags for a CloudFront resource. -type ListTagsForResourceInput struct { - _ struct{} `locationName:"ListTagsForResourceRequest" type:"structure"` - - // An ARN of a CloudFront resource. - // - // Resource is a required field - Resource *string `location:"querystring" locationName:"Resource" 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.Resource == nil { - invalidParams.Add(request.NewErrParamRequired("Resource")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResource sets the Resource field's value. -func (s *ListTagsForResourceInput) SetResource(v string) *ListTagsForResourceInput { - s.Resource = &v - return s -} - -// The returned result of the corresponding request. -type ListTagsForResourceOutput struct { - _ struct{} `type:"structure" payload:"Tags"` - - // A complex type that contains zero or more Tag elements. - // - // Tags is a required field - Tags *Tags `type:"structure" 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 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() -} - -// SetTags sets the Tags field's value. -func (s *ListTagsForResourceOutput) SetTags(v *Tags) *ListTagsForResourceOutput { - s.Tags = v - return s -} - -// A complex type that controls whether access logs are written for the distribution. -type LoggingConfig struct { - _ struct{} `type:"structure"` - - // The Amazon S3 bucket to store the access logs in, for example, myawslogbucket.s3.amazonaws.com. - // - // Bucket is a required field - Bucket *string `type:"string" required:"true"` - - // Specifies whether you want CloudFront to save access logs to an Amazon S3 - // bucket. If you don't want to enable logging when you create a distribution - // or if you want to disable logging for an existing distribution, specify false - // for Enabled, and specify empty Bucket and Prefix elements. If you specify - // false for Enabled but you specify values for Bucket, prefix, and IncludeCookies, - // the values are automatically deleted. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` - - // Specifies whether you want CloudFront to include cookies in access logs, - // specify true for IncludeCookies. If you choose to include cookies in logs, - // CloudFront logs all cookies regardless of how you configure the cache behaviors - // for this distribution. If you don't want to include cookies when you create - // a distribution or if you want to disable include cookies for an existing - // distribution, specify false for IncludeCookies. - // - // IncludeCookies is a required field - IncludeCookies *bool `type:"boolean" required:"true"` - - // An optional string that you want CloudFront to prefix to the access log filenames - // for this distribution, for example, myprefix/. If you want to enable logging, - // but you don't want to specify a prefix, you still must include an empty Prefix - // element in the Logging element. - // - // Prefix is a required field - Prefix *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 LoggingConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s LoggingConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LoggingConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LoggingConfig"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - if s.IncludeCookies == nil { - invalidParams.Add(request.NewErrParamRequired("IncludeCookies")) - } - if s.Prefix == nil { - invalidParams.Add(request.NewErrParamRequired("Prefix")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *LoggingConfig) SetBucket(v string) *LoggingConfig { - s.Bucket = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *LoggingConfig) SetEnabled(v bool) *LoggingConfig { - s.Enabled = &v - return s -} - -// SetIncludeCookies sets the IncludeCookies field's value. -func (s *LoggingConfig) SetIncludeCookies(v bool) *LoggingConfig { - s.IncludeCookies = &v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *LoggingConfig) SetPrefix(v string) *LoggingConfig { - s.Prefix = &v - return s -} - -// A monitoring subscription. This structure contains information about whether -// additional CloudWatch metrics are enabled for a given CloudFront distribution. -type MonitoringSubscription struct { - _ struct{} `type:"structure"` - - // A subscription configuration for additional CloudWatch metrics. - RealtimeMetricsSubscriptionConfig *RealtimeMetricsSubscriptionConfig `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 MonitoringSubscription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s MonitoringSubscription) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MonitoringSubscription) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MonitoringSubscription"} - if s.RealtimeMetricsSubscriptionConfig != nil { - if err := s.RealtimeMetricsSubscriptionConfig.Validate(); err != nil { - invalidParams.AddNested("RealtimeMetricsSubscriptionConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRealtimeMetricsSubscriptionConfig sets the RealtimeMetricsSubscriptionConfig field's value. -func (s *MonitoringSubscription) SetRealtimeMetricsSubscriptionConfig(v *RealtimeMetricsSubscriptionConfig) *MonitoringSubscription { - s.RealtimeMetricsSubscriptionConfig = v - return s -} - -// An origin. -// -// An origin is the location where content is stored, and from which CloudFront -// gets content to serve to viewers. To specify an origin: -// -// - Use S3OriginConfig to specify an Amazon S3 bucket that is not configured -// with static website hosting. -// -// - Use CustomOriginConfig to specify all other kinds of origins, including: -// An Amazon S3 bucket that is configured with static website hosting An -// Elastic Load Balancing load balancer An Elemental MediaPackage endpoint -// An Elemental MediaStore container Any other HTTP server, running on an -// Amazon EC2 instance or any other kind of host -// -// For the current maximum number of origins that you can specify per distribution, -// see General Quotas on Web Distributions (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html#limits-web-distributions) -// in the Amazon CloudFront Developer Guide (quotas were formerly referred to -// as limits). -type Origin struct { - _ struct{} `type:"structure"` - - // The number of times that CloudFront attempts to connect to the origin. The - // minimum number is 1, the maximum is 3, and the default (if you don't specify - // otherwise) is 3. - // - // For a custom origin (including an Amazon S3 bucket that's configured with - // static website hosting), this value also specifies the number of times that - // CloudFront attempts to get a response from the origin, in the case of an - // Origin Response Timeout (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginResponseTimeout). - // - // For more information, see Origin Connection Attempts (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#origin-connection-attempts) - // in the Amazon CloudFront Developer Guide. - ConnectionAttempts *int64 `type:"integer"` - - // The number of seconds that CloudFront waits when trying to establish a connection - // to the origin. The minimum timeout is 1 second, the maximum is 10 seconds, - // and the default (if you don't specify otherwise) is 10 seconds. - // - // For more information, see Origin Connection Timeout (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#origin-connection-timeout) - // in the Amazon CloudFront Developer Guide. - ConnectionTimeout *int64 `type:"integer"` - - // A list of HTTP header names and values that CloudFront adds to the requests - // that it sends to the origin. - // - // For more information, see Adding Custom Headers to Origin Requests (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/add-origin-custom-headers.html) - // in the Amazon CloudFront Developer Guide. - CustomHeaders *CustomHeaders `type:"structure"` - - // Use this type to specify an origin that is not an Amazon S3 bucket, with - // one exception. If the Amazon S3 bucket is configured with static website - // hosting, use this type. If the Amazon S3 bucket is not configured with static - // website hosting, use the S3OriginConfig type instead. - CustomOriginConfig *CustomOriginConfig `type:"structure"` - - // The domain name for the origin. - // - // For more information, see Origin Domain Name (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesDomainName) - // in the Amazon CloudFront Developer Guide. - // - // DomainName is a required field - DomainName *string `type:"string" required:"true"` - - // A unique identifier for the origin. This value must be unique within the - // distribution. - // - // Use this value to specify the TargetOriginId in a CacheBehavior or DefaultCacheBehavior. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The unique identifier of an origin access control for this origin. - // - // For more information, see Restricting access to an Amazon S3 origin (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html) - // in the Amazon CloudFront Developer Guide. - OriginAccessControlId *string `type:"string"` - - // An optional path that CloudFront appends to the origin domain name when CloudFront - // requests content from the origin. - // - // For more information, see Origin Path (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginPath) - // in the Amazon CloudFront Developer Guide. - OriginPath *string `type:"string"` - - // CloudFront Origin Shield. Using Origin Shield can help reduce the load on - // your origin. - // - // For more information, see Using Origin Shield (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/origin-shield.html) - // in the Amazon CloudFront Developer Guide. - OriginShield *OriginShield `type:"structure"` - - // Use this type to specify an origin that is an Amazon S3 bucket that is not - // configured with static website hosting. To specify any other type of origin, - // including an Amazon S3 bucket that is configured with static website hosting, - // use the CustomOriginConfig type instead. - S3OriginConfig *S3OriginConfig `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 Origin) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Origin) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Origin) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Origin"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.CustomHeaders != nil { - if err := s.CustomHeaders.Validate(); err != nil { - invalidParams.AddNested("CustomHeaders", err.(request.ErrInvalidParams)) - } - } - if s.CustomOriginConfig != nil { - if err := s.CustomOriginConfig.Validate(); err != nil { - invalidParams.AddNested("CustomOriginConfig", err.(request.ErrInvalidParams)) - } - } - if s.OriginShield != nil { - if err := s.OriginShield.Validate(); err != nil { - invalidParams.AddNested("OriginShield", err.(request.ErrInvalidParams)) - } - } - if s.S3OriginConfig != nil { - if err := s.S3OriginConfig.Validate(); err != nil { - invalidParams.AddNested("S3OriginConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetConnectionAttempts sets the ConnectionAttempts field's value. -func (s *Origin) SetConnectionAttempts(v int64) *Origin { - s.ConnectionAttempts = &v - return s -} - -// SetConnectionTimeout sets the ConnectionTimeout field's value. -func (s *Origin) SetConnectionTimeout(v int64) *Origin { - s.ConnectionTimeout = &v - return s -} - -// SetCustomHeaders sets the CustomHeaders field's value. -func (s *Origin) SetCustomHeaders(v *CustomHeaders) *Origin { - s.CustomHeaders = v - return s -} - -// SetCustomOriginConfig sets the CustomOriginConfig field's value. -func (s *Origin) SetCustomOriginConfig(v *CustomOriginConfig) *Origin { - s.CustomOriginConfig = v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *Origin) SetDomainName(v string) *Origin { - s.DomainName = &v - return s -} - -// SetId sets the Id field's value. -func (s *Origin) SetId(v string) *Origin { - s.Id = &v - return s -} - -// SetOriginAccessControlId sets the OriginAccessControlId field's value. -func (s *Origin) SetOriginAccessControlId(v string) *Origin { - s.OriginAccessControlId = &v - return s -} - -// SetOriginPath sets the OriginPath field's value. -func (s *Origin) SetOriginPath(v string) *Origin { - s.OriginPath = &v - return s -} - -// SetOriginShield sets the OriginShield field's value. -func (s *Origin) SetOriginShield(v *OriginShield) *Origin { - s.OriginShield = v - return s -} - -// SetS3OriginConfig sets the S3OriginConfig field's value. -func (s *Origin) SetS3OriginConfig(v *S3OriginConfig) *Origin { - s.S3OriginConfig = v - return s -} - -// A CloudFront origin access control, including its unique identifier. -type OriginAccessControl struct { - _ struct{} `type:"structure"` - - // The unique identifier of the origin access control. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The origin access control. - OriginAccessControlConfig *OriginAccessControlConfig `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 OriginAccessControl) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OriginAccessControl) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *OriginAccessControl) SetId(v string) *OriginAccessControl { - s.Id = &v - return s -} - -// SetOriginAccessControlConfig sets the OriginAccessControlConfig field's value. -func (s *OriginAccessControl) SetOriginAccessControlConfig(v *OriginAccessControlConfig) *OriginAccessControl { - s.OriginAccessControlConfig = v - return s -} - -// A CloudFront origin access control configuration. -type OriginAccessControlConfig struct { - _ struct{} `type:"structure"` - - // A description of the origin access control. - Description *string `type:"string"` - - // A name to identify the origin access control. You can specify up to 64 characters. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The type of origin that this origin access control is for. - // - // OriginAccessControlOriginType is a required field - OriginAccessControlOriginType *string `type:"string" required:"true" enum:"OriginAccessControlOriginTypes"` - - // Specifies which requests CloudFront signs (adds authentication information - // to). Specify always for the most common use case. For more information, see - // origin access control advanced settings (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html#oac-advanced-settings) - // in the Amazon CloudFront Developer Guide. - // - // This field can have one of the following values: - // - // * always – CloudFront signs all origin requests, overwriting the Authorization - // header from the viewer request if one exists. - // - // * never – CloudFront doesn't sign any origin requests. This value turns - // off origin access control for all origins in all distributions that use - // this origin access control. - // - // * no-override – If the viewer request doesn't contain the Authorization - // header, then CloudFront signs the origin request. If the viewer request - // contains the Authorization header, then CloudFront doesn't sign the origin - // request and instead passes along the Authorization header from the viewer - // request. WARNING: To pass along the Authorization header from the viewer - // request, you must add the Authorization header to a cache policy (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html) - // for all cache behaviors that use origins associated with this origin access - // control. - // - // SigningBehavior is a required field - SigningBehavior *string `type:"string" required:"true" enum:"OriginAccessControlSigningBehaviors"` - - // The signing protocol of the origin access control, which determines how CloudFront - // signs (authenticates) requests. The only valid value is sigv4. - // - // SigningProtocol is a required field - SigningProtocol *string `type:"string" required:"true" enum:"OriginAccessControlSigningProtocols"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OriginAccessControlConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OriginAccessControlConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OriginAccessControlConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OriginAccessControlConfig"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.OriginAccessControlOriginType == nil { - invalidParams.Add(request.NewErrParamRequired("OriginAccessControlOriginType")) - } - if s.SigningBehavior == nil { - invalidParams.Add(request.NewErrParamRequired("SigningBehavior")) - } - if s.SigningProtocol == nil { - invalidParams.Add(request.NewErrParamRequired("SigningProtocol")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *OriginAccessControlConfig) SetDescription(v string) *OriginAccessControlConfig { - s.Description = &v - return s -} - -// SetName sets the Name field's value. -func (s *OriginAccessControlConfig) SetName(v string) *OriginAccessControlConfig { - s.Name = &v - return s -} - -// SetOriginAccessControlOriginType sets the OriginAccessControlOriginType field's value. -func (s *OriginAccessControlConfig) SetOriginAccessControlOriginType(v string) *OriginAccessControlConfig { - s.OriginAccessControlOriginType = &v - return s -} - -// SetSigningBehavior sets the SigningBehavior field's value. -func (s *OriginAccessControlConfig) SetSigningBehavior(v string) *OriginAccessControlConfig { - s.SigningBehavior = &v - return s -} - -// SetSigningProtocol sets the SigningProtocol field's value. -func (s *OriginAccessControlConfig) SetSigningProtocol(v string) *OriginAccessControlConfig { - s.SigningProtocol = &v - return s -} - -// A list of CloudFront origin access controls. -type OriginAccessControlList struct { - _ struct{} `type:"structure"` - - // If there are more items in the list than are in this response, this value - // is true. - // - // IsTruncated is a required field - IsTruncated *bool `type:"boolean" required:"true"` - - // Contains the origin access controls in the list. - Items []*OriginAccessControlSummary `locationNameList:"OriginAccessControlSummary" type:"list"` - - // The value of the Marker field that was provided in the request. - // - // Marker is a required field - Marker *string `type:"string" required:"true"` - - // The maximum number of origin access controls requested. - // - // MaxItems is a required field - MaxItems *int64 `type:"integer" required:"true"` - - // If there are more items in the list than are in this response, this element - // is present. It contains the value to use in the Marker field of another request - // to continue listing origin access controls. - NextMarker *string `type:"string"` - - // The number of origin access controls returned in the response. - // - // Quantity is a required field - Quantity *int64 `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 OriginAccessControlList) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OriginAccessControlList) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *OriginAccessControlList) SetIsTruncated(v bool) *OriginAccessControlList { - s.IsTruncated = &v - return s -} - -// SetItems sets the Items field's value. -func (s *OriginAccessControlList) SetItems(v []*OriginAccessControlSummary) *OriginAccessControlList { - s.Items = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *OriginAccessControlList) SetMarker(v string) *OriginAccessControlList { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *OriginAccessControlList) SetMaxItems(v int64) *OriginAccessControlList { - s.MaxItems = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *OriginAccessControlList) SetNextMarker(v string) *OriginAccessControlList { - s.NextMarker = &v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *OriginAccessControlList) SetQuantity(v int64) *OriginAccessControlList { - s.Quantity = &v - return s -} - -// A CloudFront origin access control. -type OriginAccessControlSummary struct { - _ struct{} `type:"structure"` - - // A description of the origin access control. - // - // Description is a required field - Description *string `type:"string" required:"true"` - - // The unique identifier of the origin access control. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // A unique name that identifies the origin access control. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The type of origin that this origin access control is for. - // - // OriginAccessControlOriginType is a required field - OriginAccessControlOriginType *string `type:"string" required:"true" enum:"OriginAccessControlOriginTypes"` - - // A value that specifies which requests CloudFront signs (adds authentication - // information to). This field can have one of the following values: - // - // * never – CloudFront doesn't sign any origin requests. - // - // * always – CloudFront signs all origin requests, overwriting the Authorization - // header from the viewer request if necessary. - // - // * no-override – If the viewer request doesn't contain the Authorization - // header, CloudFront signs the origin request. If the viewer request contains - // the Authorization header, CloudFront doesn't sign the origin request, - // but instead passes along the Authorization header that it received in - // the viewer request. - // - // SigningBehavior is a required field - SigningBehavior *string `type:"string" required:"true" enum:"OriginAccessControlSigningBehaviors"` - - // The signing protocol of the origin access control. The signing protocol determines - // how CloudFront signs (authenticates) requests. The only valid value is sigv4. - // - // SigningProtocol is a required field - SigningProtocol *string `type:"string" required:"true" enum:"OriginAccessControlSigningProtocols"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OriginAccessControlSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OriginAccessControlSummary) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *OriginAccessControlSummary) SetDescription(v string) *OriginAccessControlSummary { - s.Description = &v - return s -} - -// SetId sets the Id field's value. -func (s *OriginAccessControlSummary) SetId(v string) *OriginAccessControlSummary { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *OriginAccessControlSummary) SetName(v string) *OriginAccessControlSummary { - s.Name = &v - return s -} - -// SetOriginAccessControlOriginType sets the OriginAccessControlOriginType field's value. -func (s *OriginAccessControlSummary) SetOriginAccessControlOriginType(v string) *OriginAccessControlSummary { - s.OriginAccessControlOriginType = &v - return s -} - -// SetSigningBehavior sets the SigningBehavior field's value. -func (s *OriginAccessControlSummary) SetSigningBehavior(v string) *OriginAccessControlSummary { - s.SigningBehavior = &v - return s -} - -// SetSigningProtocol sets the SigningProtocol field's value. -func (s *OriginAccessControlSummary) SetSigningProtocol(v string) *OriginAccessControlSummary { - s.SigningProtocol = &v - return s -} - -// CloudFront origin access identity. -type OriginAccessIdentity struct { - _ struct{} `type:"structure"` - - // The current configuration information for the identity. - CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `type:"structure"` - - // The ID for the origin access identity, for example, E74FTE3AJFJ256A. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The Amazon S3 canonical user ID for the origin access identity, used when - // giving the origin access identity read permission to an object in Amazon - // S3. - // - // S3CanonicalUserId is a required field - S3CanonicalUserId *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 OriginAccessIdentity) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OriginAccessIdentity) GoString() string { - return s.String() -} - -// SetCloudFrontOriginAccessIdentityConfig sets the CloudFrontOriginAccessIdentityConfig field's value. -func (s *OriginAccessIdentity) SetCloudFrontOriginAccessIdentityConfig(v *OriginAccessIdentityConfig) *OriginAccessIdentity { - s.CloudFrontOriginAccessIdentityConfig = v - return s -} - -// SetId sets the Id field's value. -func (s *OriginAccessIdentity) SetId(v string) *OriginAccessIdentity { - s.Id = &v - return s -} - -// SetS3CanonicalUserId sets the S3CanonicalUserId field's value. -func (s *OriginAccessIdentity) SetS3CanonicalUserId(v string) *OriginAccessIdentity { - s.S3CanonicalUserId = &v - return s -} - -// Origin access identity configuration. Send a GET request to the /CloudFront -// API version/CloudFront/identity ID/config resource. -type OriginAccessIdentityConfig struct { - _ struct{} `type:"structure"` - - // A unique value (for example, a date-time stamp) that ensures that the request - // can't be replayed. - // - // If the value of CallerReference is new (regardless of the content of the - // CloudFrontOriginAccessIdentityConfig object), a new origin access identity - // is created. - // - // If the CallerReference is a value already sent in a previous identity request, - // and the content of the CloudFrontOriginAccessIdentityConfig is identical - // to the original request (ignoring white space), the response includes the - // same information returned to the original request. - // - // If the CallerReference is a value you already sent in a previous request - // to create an identity, but the content of the CloudFrontOriginAccessIdentityConfig - // is different from the original request, CloudFront returns a CloudFrontOriginAccessIdentityAlreadyExists - // error. - // - // CallerReference is a required field - CallerReference *string `type:"string" required:"true"` - - // A comment to describe the origin access identity. The comment cannot be longer - // than 128 characters. - // - // Comment is a required field - Comment *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 OriginAccessIdentityConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OriginAccessIdentityConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OriginAccessIdentityConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OriginAccessIdentityConfig"} - if s.CallerReference == nil { - invalidParams.Add(request.NewErrParamRequired("CallerReference")) - } - if s.Comment == nil { - invalidParams.Add(request.NewErrParamRequired("Comment")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCallerReference sets the CallerReference field's value. -func (s *OriginAccessIdentityConfig) SetCallerReference(v string) *OriginAccessIdentityConfig { - s.CallerReference = &v - return s -} - -// SetComment sets the Comment field's value. -func (s *OriginAccessIdentityConfig) SetComment(v string) *OriginAccessIdentityConfig { - s.Comment = &v - return s -} - -// Lists the origin access identities for CloudFront.Send a GET request to the -// /CloudFront API version/origin-access-identity/cloudfront resource. The response -// includes a CloudFrontOriginAccessIdentityList element with zero or more CloudFrontOriginAccessIdentitySummary -// child elements. By default, your entire list of origin access identities -// is returned in one single page. If the list is long, you can paginate it -// using the MaxItems and Marker parameters. -type OriginAccessIdentityList struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether more origin access identities remain to be - // listed. If your results were truncated, you can make a follow-up pagination - // request using the Marker request parameter to retrieve more items in the - // list. - // - // IsTruncated is a required field - IsTruncated *bool `type:"boolean" required:"true"` - - // A complex type that contains one CloudFrontOriginAccessIdentitySummary element - // for each origin access identity that was created by the current Amazon Web - // Services account. - Items []*OriginAccessIdentitySummary `locationNameList:"CloudFrontOriginAccessIdentitySummary" type:"list"` - - // Use this when paginating results to indicate where to begin in your list - // of origin access identities. The results include identities in the list that - // occur after the marker. To get the next page of results, set the Marker to - // the value of the NextMarker from the current page's response (which is also - // the ID of the last identity on that page). - // - // Marker is a required field - Marker *string `type:"string" required:"true"` - - // The maximum number of origin access identities you want in the response body. - // - // MaxItems is a required field - MaxItems *int64 `type:"integer" required:"true"` - - // If IsTruncated is true, this element is present and contains the value you - // can use for the Marker request parameter to continue listing your origin - // access identities where they left off. - NextMarker *string `type:"string"` - - // The number of CloudFront origin access identities that were created by the - // current Amazon Web Services account. - // - // Quantity is a required field - Quantity *int64 `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 OriginAccessIdentityList) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OriginAccessIdentityList) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *OriginAccessIdentityList) SetIsTruncated(v bool) *OriginAccessIdentityList { - s.IsTruncated = &v - return s -} - -// SetItems sets the Items field's value. -func (s *OriginAccessIdentityList) SetItems(v []*OriginAccessIdentitySummary) *OriginAccessIdentityList { - s.Items = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *OriginAccessIdentityList) SetMarker(v string) *OriginAccessIdentityList { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *OriginAccessIdentityList) SetMaxItems(v int64) *OriginAccessIdentityList { - s.MaxItems = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *OriginAccessIdentityList) SetNextMarker(v string) *OriginAccessIdentityList { - s.NextMarker = &v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *OriginAccessIdentityList) SetQuantity(v int64) *OriginAccessIdentityList { - s.Quantity = &v - return s -} - -// Summary of the information about a CloudFront origin access identity. -type OriginAccessIdentitySummary struct { - _ struct{} `type:"structure"` - - // The comment for this origin access identity, as originally specified when - // created. - // - // Comment is a required field - Comment *string `type:"string" required:"true"` - - // The ID for the origin access identity. For example: E74FTE3AJFJ256A. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The Amazon S3 canonical user ID for the origin access identity, which you - // use when giving the origin access identity read permission to an object in - // Amazon S3. - // - // S3CanonicalUserId is a required field - S3CanonicalUserId *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 OriginAccessIdentitySummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OriginAccessIdentitySummary) GoString() string { - return s.String() -} - -// SetComment sets the Comment field's value. -func (s *OriginAccessIdentitySummary) SetComment(v string) *OriginAccessIdentitySummary { - s.Comment = &v - return s -} - -// SetId sets the Id field's value. -func (s *OriginAccessIdentitySummary) SetId(v string) *OriginAccessIdentitySummary { - s.Id = &v - return s -} - -// SetS3CanonicalUserId sets the S3CanonicalUserId field's value. -func (s *OriginAccessIdentitySummary) SetS3CanonicalUserId(v string) *OriginAccessIdentitySummary { - s.S3CanonicalUserId = &v - return s -} - -// A complex type that contains HeaderName and HeaderValue elements, if any, -// for this distribution. -type OriginCustomHeader struct { - _ struct{} `type:"structure"` - - // The name of a header that you want CloudFront to send to your origin. For - // more information, see Adding Custom Headers to Origin Requests (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/forward-custom-headers.html) - // in the Amazon CloudFront Developer Guide. - // - // HeaderName is a required field - HeaderName *string `type:"string" required:"true"` - - // The value for the header that you specified in the HeaderName field. - // - // HeaderValue is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by OriginCustomHeader's - // String and GoString methods. - // - // HeaderValue is a required field - HeaderValue *string `type:"string" required:"true" sensitive:"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 OriginCustomHeader) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OriginCustomHeader) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OriginCustomHeader) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OriginCustomHeader"} - if s.HeaderName == nil { - invalidParams.Add(request.NewErrParamRequired("HeaderName")) - } - if s.HeaderValue == nil { - invalidParams.Add(request.NewErrParamRequired("HeaderValue")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHeaderName sets the HeaderName field's value. -func (s *OriginCustomHeader) SetHeaderName(v string) *OriginCustomHeader { - s.HeaderName = &v - return s -} - -// SetHeaderValue sets the HeaderValue field's value. -func (s *OriginCustomHeader) SetHeaderValue(v string) *OriginCustomHeader { - s.HeaderValue = &v - return s -} - -// An origin group includes two origins (a primary origin and a second origin -// to failover to) and a failover criteria that you specify. You create an origin -// group to support origin failover in CloudFront. When you create or update -// a distribution, you can specify the origin group instead of a single origin, -// and CloudFront will failover from the primary origin to the second origin -// under the failover conditions that you've chosen. -type OriginGroup struct { - _ struct{} `type:"structure"` - - // A complex type that contains information about the failover criteria for - // an origin group. - // - // FailoverCriteria is a required field - FailoverCriteria *OriginGroupFailoverCriteria `type:"structure" required:"true"` - - // The origin group's ID. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // A complex type that contains information about the origins in an origin group. - // - // Members is a required field - Members *OriginGroupMembers `type:"structure" 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 OriginGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OriginGroup) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OriginGroup) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OriginGroup"} - if s.FailoverCriteria == nil { - invalidParams.Add(request.NewErrParamRequired("FailoverCriteria")) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Members == nil { - invalidParams.Add(request.NewErrParamRequired("Members")) - } - if s.FailoverCriteria != nil { - if err := s.FailoverCriteria.Validate(); err != nil { - invalidParams.AddNested("FailoverCriteria", err.(request.ErrInvalidParams)) - } - } - if s.Members != nil { - if err := s.Members.Validate(); err != nil { - invalidParams.AddNested("Members", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFailoverCriteria sets the FailoverCriteria field's value. -func (s *OriginGroup) SetFailoverCriteria(v *OriginGroupFailoverCriteria) *OriginGroup { - s.FailoverCriteria = v - return s -} - -// SetId sets the Id field's value. -func (s *OriginGroup) SetId(v string) *OriginGroup { - s.Id = &v - return s -} - -// SetMembers sets the Members field's value. -func (s *OriginGroup) SetMembers(v *OriginGroupMembers) *OriginGroup { - s.Members = v - return s -} - -// A complex data type that includes information about the failover criteria -// for an origin group, including the status codes for which CloudFront will -// failover from the primary origin to the second origin. -type OriginGroupFailoverCriteria struct { - _ struct{} `type:"structure"` - - // The status codes that, when returned from the primary origin, will trigger - // CloudFront to failover to the second origin. - // - // StatusCodes is a required field - StatusCodes *StatusCodes `type:"structure" 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 OriginGroupFailoverCriteria) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OriginGroupFailoverCriteria) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OriginGroupFailoverCriteria) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OriginGroupFailoverCriteria"} - if s.StatusCodes == nil { - invalidParams.Add(request.NewErrParamRequired("StatusCodes")) - } - if s.StatusCodes != nil { - if err := s.StatusCodes.Validate(); err != nil { - invalidParams.AddNested("StatusCodes", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStatusCodes sets the StatusCodes field's value. -func (s *OriginGroupFailoverCriteria) SetStatusCodes(v *StatusCodes) *OriginGroupFailoverCriteria { - s.StatusCodes = v - return s -} - -// An origin in an origin group. -type OriginGroupMember struct { - _ struct{} `type:"structure"` - - // The ID for an origin in an origin group. - // - // OriginId is a required field - OriginId *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 OriginGroupMember) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OriginGroupMember) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OriginGroupMember) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OriginGroupMember"} - if s.OriginId == nil { - invalidParams.Add(request.NewErrParamRequired("OriginId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOriginId sets the OriginId field's value. -func (s *OriginGroupMember) SetOriginId(v string) *OriginGroupMember { - s.OriginId = &v - return s -} - -// A complex data type for the origins included in an origin group. -type OriginGroupMembers struct { - _ struct{} `type:"structure"` - - // Items (origins) in an origin group. - // - // Items is a required field - Items []*OriginGroupMember `locationNameList:"OriginGroupMember" min:"2" type:"list" required:"true"` - - // The number of origins in an origin group. - // - // Quantity is a required field - Quantity *int64 `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 OriginGroupMembers) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OriginGroupMembers) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OriginGroupMembers) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OriginGroupMembers"} - if s.Items == nil { - invalidParams.Add(request.NewErrParamRequired("Items")) - } - if s.Items != nil && len(s.Items) < 2 { - invalidParams.Add(request.NewErrParamMinLen("Items", 2)) - } - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *OriginGroupMembers) SetItems(v []*OriginGroupMember) *OriginGroupMembers { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *OriginGroupMembers) SetQuantity(v int64) *OriginGroupMembers { - s.Quantity = &v - return s -} - -// A complex data type for the origin groups specified for a distribution. -type OriginGroups struct { - _ struct{} `type:"structure"` - - // The items (origin groups) in a distribution. - Items []*OriginGroup `locationNameList:"OriginGroup" type:"list"` - - // The number of origin groups. - // - // Quantity is a required field - Quantity *int64 `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 OriginGroups) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OriginGroups) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OriginGroups) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OriginGroups"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *OriginGroups) SetItems(v []*OriginGroup) *OriginGroups { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *OriginGroups) SetQuantity(v int64) *OriginGroups { - s.Quantity = &v - return s -} - -// An origin request policy. -// -// When it's attached to a cache behavior, the origin request policy determines -// the values that CloudFront includes in requests that it sends to the origin. -// Each request that CloudFront sends to the origin includes the following: -// -// - The request body and the URL path (without the domain name) from the -// viewer request. -// -// - The headers that CloudFront automatically includes in every origin request, -// including Host, User-Agent, and X-Amz-Cf-Id. -// -// - All HTTP headers, cookies, and URL query strings that are specified -// in the cache policy or the origin request policy. These can include items -// from the viewer request and, in the case of headers, additional ones that -// are added by CloudFront. -// -// CloudFront sends a request when it can't find an object in its cache that -// matches the request. If you want to send values to the origin and also include -// them in the cache key, use CachePolicy. -type OriginRequestPolicy struct { - _ struct{} `type:"structure"` - - // The unique identifier for the origin request policy. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The date and time when the origin request policy was last modified. - // - // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" required:"true"` - - // The origin request policy configuration. - // - // OriginRequestPolicyConfig is a required field - OriginRequestPolicyConfig *OriginRequestPolicyConfig `type:"structure" 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 OriginRequestPolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OriginRequestPolicy) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *OriginRequestPolicy) SetId(v string) *OriginRequestPolicy { - s.Id = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *OriginRequestPolicy) SetLastModifiedTime(v time.Time) *OriginRequestPolicy { - s.LastModifiedTime = &v - return s -} - -// SetOriginRequestPolicyConfig sets the OriginRequestPolicyConfig field's value. -func (s *OriginRequestPolicy) SetOriginRequestPolicyConfig(v *OriginRequestPolicyConfig) *OriginRequestPolicy { - s.OriginRequestPolicyConfig = v - return s -} - -// An origin request policy configuration. -// -// This configuration determines the values that CloudFront includes in requests -// that it sends to the origin. Each request that CloudFront sends to the origin -// includes the following: -// -// - The request body and the URL path (without the domain name) from the -// viewer request. -// -// - The headers that CloudFront automatically includes in every origin request, -// including Host, User-Agent, and X-Amz-Cf-Id. -// -// - All HTTP headers, cookies, and URL query strings that are specified -// in the cache policy or the origin request policy. These can include items -// from the viewer request and, in the case of headers, additional ones that -// are added by CloudFront. -// -// CloudFront sends a request when it can't find an object in its cache that -// matches the request. If you want to send values to the origin and also include -// them in the cache key, use CachePolicy. -type OriginRequestPolicyConfig struct { - _ struct{} `type:"structure"` - - // A comment to describe the origin request policy. The comment cannot be longer - // than 128 characters. - Comment *string `type:"string"` - - // The cookies from viewer requests to include in origin requests. - // - // CookiesConfig is a required field - CookiesConfig *OriginRequestPolicyCookiesConfig `type:"structure" required:"true"` - - // The HTTP headers to include in origin requests. These can include headers - // from viewer requests and additional headers added by CloudFront. - // - // HeadersConfig is a required field - HeadersConfig *OriginRequestPolicyHeadersConfig `type:"structure" required:"true"` - - // A unique name to identify the origin request policy. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The URL query strings from viewer requests to include in origin requests. - // - // QueryStringsConfig is a required field - QueryStringsConfig *OriginRequestPolicyQueryStringsConfig `type:"structure" 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 OriginRequestPolicyConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OriginRequestPolicyConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OriginRequestPolicyConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OriginRequestPolicyConfig"} - if s.CookiesConfig == nil { - invalidParams.Add(request.NewErrParamRequired("CookiesConfig")) - } - if s.HeadersConfig == nil { - invalidParams.Add(request.NewErrParamRequired("HeadersConfig")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.QueryStringsConfig == nil { - invalidParams.Add(request.NewErrParamRequired("QueryStringsConfig")) - } - if s.CookiesConfig != nil { - if err := s.CookiesConfig.Validate(); err != nil { - invalidParams.AddNested("CookiesConfig", err.(request.ErrInvalidParams)) - } - } - if s.HeadersConfig != nil { - if err := s.HeadersConfig.Validate(); err != nil { - invalidParams.AddNested("HeadersConfig", err.(request.ErrInvalidParams)) - } - } - if s.QueryStringsConfig != nil { - if err := s.QueryStringsConfig.Validate(); err != nil { - invalidParams.AddNested("QueryStringsConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComment sets the Comment field's value. -func (s *OriginRequestPolicyConfig) SetComment(v string) *OriginRequestPolicyConfig { - s.Comment = &v - return s -} - -// SetCookiesConfig sets the CookiesConfig field's value. -func (s *OriginRequestPolicyConfig) SetCookiesConfig(v *OriginRequestPolicyCookiesConfig) *OriginRequestPolicyConfig { - s.CookiesConfig = v - return s -} - -// SetHeadersConfig sets the HeadersConfig field's value. -func (s *OriginRequestPolicyConfig) SetHeadersConfig(v *OriginRequestPolicyHeadersConfig) *OriginRequestPolicyConfig { - s.HeadersConfig = v - return s -} - -// SetName sets the Name field's value. -func (s *OriginRequestPolicyConfig) SetName(v string) *OriginRequestPolicyConfig { - s.Name = &v - return s -} - -// SetQueryStringsConfig sets the QueryStringsConfig field's value. -func (s *OriginRequestPolicyConfig) SetQueryStringsConfig(v *OriginRequestPolicyQueryStringsConfig) *OriginRequestPolicyConfig { - s.QueryStringsConfig = v - return s -} - -// An object that determines whether any cookies in viewer requests (and if -// so, which cookies) are included in requests that CloudFront sends to the -// origin. -type OriginRequestPolicyCookiesConfig struct { - _ struct{} `type:"structure"` - - // Determines whether cookies in viewer requests are included in requests that - // CloudFront sends to the origin. Valid values are: - // - // * none – No cookies in viewer requests are included in requests that - // CloudFront sends to the origin. Even when this field is set to none, any - // cookies that are listed in a CachePolicy are included in origin requests. - // - // * whitelist – Only the cookies in viewer requests that are listed in - // the CookieNames type are included in requests that CloudFront sends to - // the origin. - // - // * all – All cookies in viewer requests are included in requests that - // CloudFront sends to the origin. - // - // * allExcept – All cookies in viewer requests are included in requests - // that CloudFront sends to the origin, except for those listed in the CookieNames - // type, which are not included. - // - // CookieBehavior is a required field - CookieBehavior *string `type:"string" required:"true" enum:"OriginRequestPolicyCookieBehavior"` - - // Contains a list of cookie names. - Cookies *CookieNames `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 OriginRequestPolicyCookiesConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OriginRequestPolicyCookiesConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OriginRequestPolicyCookiesConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OriginRequestPolicyCookiesConfig"} - if s.CookieBehavior == nil { - invalidParams.Add(request.NewErrParamRequired("CookieBehavior")) - } - if s.Cookies != nil { - if err := s.Cookies.Validate(); err != nil { - invalidParams.AddNested("Cookies", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCookieBehavior sets the CookieBehavior field's value. -func (s *OriginRequestPolicyCookiesConfig) SetCookieBehavior(v string) *OriginRequestPolicyCookiesConfig { - s.CookieBehavior = &v - return s -} - -// SetCookies sets the Cookies field's value. -func (s *OriginRequestPolicyCookiesConfig) SetCookies(v *CookieNames) *OriginRequestPolicyCookiesConfig { - s.Cookies = v - return s -} - -// An object that determines whether any HTTP headers (and if so, which headers) -// are included in requests that CloudFront sends to the origin. -type OriginRequestPolicyHeadersConfig struct { - _ struct{} `type:"structure"` - - // Determines whether any HTTP headers are included in requests that CloudFront - // sends to the origin. Valid values are: - // - // * none – No HTTP headers in viewer requests are included in requests - // that CloudFront sends to the origin. Even when this field is set to none, - // any headers that are listed in a CachePolicy are included in origin requests. - // - // * whitelist – Only the HTTP headers that are listed in the Headers type - // are included in requests that CloudFront sends to the origin. - // - // * allViewer – All HTTP headers in viewer requests are included in requests - // that CloudFront sends to the origin. - // - // * allViewerAndWhitelistCloudFront – All HTTP headers in viewer requests - // and the additional CloudFront headers that are listed in the Headers type - // are included in requests that CloudFront sends to the origin. The additional - // headers are added by CloudFront. - // - // * allExcept – All HTTP headers in viewer requests are included in requests - // that CloudFront sends to the origin, except for those listed in the Headers - // type, which are not included. - // - // HeaderBehavior is a required field - HeaderBehavior *string `type:"string" required:"true" enum:"OriginRequestPolicyHeaderBehavior"` - - // Contains a list of HTTP header names. - Headers *Headers `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 OriginRequestPolicyHeadersConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OriginRequestPolicyHeadersConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OriginRequestPolicyHeadersConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OriginRequestPolicyHeadersConfig"} - if s.HeaderBehavior == nil { - invalidParams.Add(request.NewErrParamRequired("HeaderBehavior")) - } - if s.Headers != nil { - if err := s.Headers.Validate(); err != nil { - invalidParams.AddNested("Headers", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHeaderBehavior sets the HeaderBehavior field's value. -func (s *OriginRequestPolicyHeadersConfig) SetHeaderBehavior(v string) *OriginRequestPolicyHeadersConfig { - s.HeaderBehavior = &v - return s -} - -// SetHeaders sets the Headers field's value. -func (s *OriginRequestPolicyHeadersConfig) SetHeaders(v *Headers) *OriginRequestPolicyHeadersConfig { - s.Headers = v - return s -} - -// A list of origin request policies. -type OriginRequestPolicyList struct { - _ struct{} `type:"structure"` - - // Contains the origin request policies in the list. - Items []*OriginRequestPolicySummary `locationNameList:"OriginRequestPolicySummary" type:"list"` - - // The maximum number of origin request policies requested. - // - // MaxItems is a required field - MaxItems *int64 `type:"integer" required:"true"` - - // If there are more items in the list than are in this response, this element - // is present. It contains the value that you should use in the Marker field - // of a subsequent request to continue listing origin request policies where - // you left off. - NextMarker *string `type:"string"` - - // The total number of origin request policies returned in the response. - // - // Quantity is a required field - Quantity *int64 `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 OriginRequestPolicyList) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OriginRequestPolicyList) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *OriginRequestPolicyList) SetItems(v []*OriginRequestPolicySummary) *OriginRequestPolicyList { - s.Items = v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *OriginRequestPolicyList) SetMaxItems(v int64) *OriginRequestPolicyList { - s.MaxItems = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *OriginRequestPolicyList) SetNextMarker(v string) *OriginRequestPolicyList { - s.NextMarker = &v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *OriginRequestPolicyList) SetQuantity(v int64) *OriginRequestPolicyList { - s.Quantity = &v - return s -} - -// An object that determines whether any URL query strings in viewer requests -// (and if so, which query strings) are included in requests that CloudFront -// sends to the origin. -type OriginRequestPolicyQueryStringsConfig struct { - _ struct{} `type:"structure"` - - // Determines whether any URL query strings in viewer requests are included - // in requests that CloudFront sends to the origin. Valid values are: - // - // * none – No query strings in viewer requests are included in requests - // that CloudFront sends to the origin. Even when this field is set to none, - // any query strings that are listed in a CachePolicy are included in origin - // requests. - // - // * whitelist – Only the query strings in viewer requests that are listed - // in the QueryStringNames type are included in requests that CloudFront - // sends to the origin. - // - // * all – All query strings in viewer requests are included in requests - // that CloudFront sends to the origin. - // - // * allExcept – All query strings in viewer requests are included in requests - // that CloudFront sends to the origin, except for those listed in the QueryStringNames - // type, which are not included. - // - // QueryStringBehavior is a required field - QueryStringBehavior *string `type:"string" required:"true" enum:"OriginRequestPolicyQueryStringBehavior"` - - // Contains the specific query strings in viewer requests that either are or - // are not included in requests that CloudFront sends to the origin. The behavior - // depends on whether the QueryStringBehavior field in the OriginRequestPolicyQueryStringsConfig - // type is set to whitelist (the listed query strings are included) or allExcept - // (the listed query strings are not included, but all other query strings are). - QueryStrings *QueryStringNames `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 OriginRequestPolicyQueryStringsConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OriginRequestPolicyQueryStringsConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OriginRequestPolicyQueryStringsConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OriginRequestPolicyQueryStringsConfig"} - if s.QueryStringBehavior == nil { - invalidParams.Add(request.NewErrParamRequired("QueryStringBehavior")) - } - if s.QueryStrings != nil { - if err := s.QueryStrings.Validate(); err != nil { - invalidParams.AddNested("QueryStrings", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetQueryStringBehavior sets the QueryStringBehavior field's value. -func (s *OriginRequestPolicyQueryStringsConfig) SetQueryStringBehavior(v string) *OriginRequestPolicyQueryStringsConfig { - s.QueryStringBehavior = &v - return s -} - -// SetQueryStrings sets the QueryStrings field's value. -func (s *OriginRequestPolicyQueryStringsConfig) SetQueryStrings(v *QueryStringNames) *OriginRequestPolicyQueryStringsConfig { - s.QueryStrings = v - return s -} - -// Contains an origin request policy. -type OriginRequestPolicySummary struct { - _ struct{} `type:"structure"` - - // The origin request policy. - // - // OriginRequestPolicy is a required field - OriginRequestPolicy *OriginRequestPolicy `type:"structure" required:"true"` - - // The type of origin request policy, either managed (created by Amazon Web - // Services) or custom (created in this Amazon Web Services account). - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"OriginRequestPolicyType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OriginRequestPolicySummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OriginRequestPolicySummary) GoString() string { - return s.String() -} - -// SetOriginRequestPolicy sets the OriginRequestPolicy field's value. -func (s *OriginRequestPolicySummary) SetOriginRequestPolicy(v *OriginRequestPolicy) *OriginRequestPolicySummary { - s.OriginRequestPolicy = v - return s -} - -// SetType sets the Type field's value. -func (s *OriginRequestPolicySummary) SetType(v string) *OriginRequestPolicySummary { - s.Type = &v - return s -} - -// CloudFront Origin Shield. -// -// Using Origin Shield can help reduce the load on your origin. For more information, -// see Using Origin Shield (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/origin-shield.html) -// in the Amazon CloudFront Developer Guide. -type OriginShield struct { - _ struct{} `type:"structure"` - - // A flag that specifies whether Origin Shield is enabled. - // - // When it's enabled, CloudFront routes all requests through Origin Shield, - // which can help protect your origin. When it's disabled, CloudFront might - // send requests directly to your origin from multiple edge locations or regional - // edge caches. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` - - // The Amazon Web Services Region for Origin Shield. - // - // Specify the Amazon Web Services Region that has the lowest latency to your - // origin. To specify a region, use the region code, not the region name. For - // example, specify the US East (Ohio) region as us-east-2. - // - // When you enable CloudFront Origin Shield, you must specify the Amazon Web - // Services Region for Origin Shield. For the list of Amazon Web Services Regions - // that you can specify, and for help choosing the best Region for your origin, - // see Choosing the Amazon Web Services Region for Origin Shield (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/origin-shield.html#choose-origin-shield-region) - // in the Amazon CloudFront Developer Guide. - OriginShieldRegion *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 OriginShield) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OriginShield) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OriginShield) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OriginShield"} - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - if s.OriginShieldRegion != nil && len(*s.OriginShieldRegion) < 1 { - invalidParams.Add(request.NewErrParamMinLen("OriginShieldRegion", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnabled sets the Enabled field's value. -func (s *OriginShield) SetEnabled(v bool) *OriginShield { - s.Enabled = &v - return s -} - -// SetOriginShieldRegion sets the OriginShieldRegion field's value. -func (s *OriginShield) SetOriginShieldRegion(v string) *OriginShield { - s.OriginShieldRegion = &v - return s -} - -// A complex type that contains information about the SSL/TLS protocols that -// CloudFront can use when establishing an HTTPS connection with your origin. -type OriginSslProtocols struct { - _ struct{} `type:"structure"` - - // A list that contains allowed SSL/TLS protocols for this distribution. - // - // Items is a required field - Items []*string `locationNameList:"SslProtocol" type:"list" required:"true" enum:"SslProtocol"` - - // The number of SSL/TLS protocols that you want to allow CloudFront to use - // when establishing an HTTPS connection with this origin. - // - // Quantity is a required field - Quantity *int64 `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 OriginSslProtocols) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OriginSslProtocols) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OriginSslProtocols) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OriginSslProtocols"} - if s.Items == nil { - invalidParams.Add(request.NewErrParamRequired("Items")) - } - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *OriginSslProtocols) SetItems(v []*string) *OriginSslProtocols { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *OriginSslProtocols) SetQuantity(v int64) *OriginSslProtocols { - s.Quantity = &v - return s -} - -// Contains information about the origins for this distribution. -type Origins struct { - _ struct{} `type:"structure"` - - // A list of origins. - // - // Items is a required field - Items []*Origin `locationNameList:"Origin" min:"1" type:"list" required:"true"` - - // The number of origins for this distribution. - // - // Quantity is a required field - Quantity *int64 `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 Origins) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Origins) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Origins) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Origins"} - if s.Items == nil { - invalidParams.Add(request.NewErrParamRequired("Items")) - } - if s.Items != nil && len(s.Items) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Items", 1)) - } - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *Origins) SetItems(v []*Origin) *Origins { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *Origins) SetQuantity(v int64) *Origins { - s.Quantity = &v - return s -} - -// This object determines the values that CloudFront includes in the cache key. -// These values can include HTTP headers, cookies, and URL query strings. CloudFront -// uses the cache key to find an object in its cache that it can return to the -// viewer. -// -// The headers, cookies, and query strings that are included in the cache key -// are also included in requests that CloudFront sends to the origin. CloudFront -// sends a request when it can't find an object in its cache that matches the -// request's cache key. If you want to send values to the origin but not include -// them in the cache key, use OriginRequestPolicy. -type ParametersInCacheKeyAndForwardedToOrigin struct { - _ struct{} `type:"structure"` - - // An object that determines whether any cookies in viewer requests (and if - // so, which cookies) are included in the cache key and in requests that CloudFront - // sends to the origin. - // - // CookiesConfig is a required field - CookiesConfig *CachePolicyCookiesConfig `type:"structure" required:"true"` - - // A flag that can affect whether the Accept-Encoding HTTP header is included - // in the cache key and included in requests that CloudFront sends to the origin. - // - // This field is related to the EnableAcceptEncodingGzip field. If one or both - // of these fields is true and the viewer request includes the Accept-Encoding - // header, then CloudFront does the following: - // - // * Normalizes the value of the viewer's Accept-Encoding header - // - // * Includes the normalized header in the cache key - // - // * Includes the normalized header in the request to the origin, if a request - // is necessary - // - // For more information, see Compression support (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-policy-compressed-objects) - // in the Amazon CloudFront Developer Guide. - // - // If you set this value to true, and this cache behavior also has an origin - // request policy attached, do not include the Accept-Encoding header in the - // origin request policy. CloudFront always includes the Accept-Encoding header - // in origin requests when the value of this field is true, so including this - // header in an origin request policy has no effect. - // - // If both of these fields are false, then CloudFront treats the Accept-Encoding - // header the same as any other HTTP header in the viewer request. By default, - // it's not included in the cache key and it's not included in origin requests. - // In this case, you can manually add Accept-Encoding to the headers whitelist - // like any other HTTP header. - EnableAcceptEncodingBrotli *bool `type:"boolean"` - - // A flag that can affect whether the Accept-Encoding HTTP header is included - // in the cache key and included in requests that CloudFront sends to the origin. - // - // This field is related to the EnableAcceptEncodingBrotli field. If one or - // both of these fields is true and the viewer request includes the Accept-Encoding - // header, then CloudFront does the following: - // - // * Normalizes the value of the viewer's Accept-Encoding header - // - // * Includes the normalized header in the cache key - // - // * Includes the normalized header in the request to the origin, if a request - // is necessary - // - // For more information, see Compression support (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-policy-compressed-objects) - // in the Amazon CloudFront Developer Guide. - // - // If you set this value to true, and this cache behavior also has an origin - // request policy attached, do not include the Accept-Encoding header in the - // origin request policy. CloudFront always includes the Accept-Encoding header - // in origin requests when the value of this field is true, so including this - // header in an origin request policy has no effect. - // - // If both of these fields are false, then CloudFront treats the Accept-Encoding - // header the same as any other HTTP header in the viewer request. By default, - // it's not included in the cache key and it's not included in origin requests. - // In this case, you can manually add Accept-Encoding to the headers whitelist - // like any other HTTP header. - // - // EnableAcceptEncodingGzip is a required field - EnableAcceptEncodingGzip *bool `type:"boolean" required:"true"` - - // An object that determines whether any HTTP headers (and if so, which headers) - // are included in the cache key and in requests that CloudFront sends to the - // origin. - // - // HeadersConfig is a required field - HeadersConfig *CachePolicyHeadersConfig `type:"structure" required:"true"` - - // An object that determines whether any URL query strings in viewer requests - // (and if so, which query strings) are included in the cache key and in requests - // that CloudFront sends to the origin. - // - // QueryStringsConfig is a required field - QueryStringsConfig *CachePolicyQueryStringsConfig `type:"structure" 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 ParametersInCacheKeyAndForwardedToOrigin) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ParametersInCacheKeyAndForwardedToOrigin) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ParametersInCacheKeyAndForwardedToOrigin) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ParametersInCacheKeyAndForwardedToOrigin"} - if s.CookiesConfig == nil { - invalidParams.Add(request.NewErrParamRequired("CookiesConfig")) - } - if s.EnableAcceptEncodingGzip == nil { - invalidParams.Add(request.NewErrParamRequired("EnableAcceptEncodingGzip")) - } - if s.HeadersConfig == nil { - invalidParams.Add(request.NewErrParamRequired("HeadersConfig")) - } - if s.QueryStringsConfig == nil { - invalidParams.Add(request.NewErrParamRequired("QueryStringsConfig")) - } - if s.CookiesConfig != nil { - if err := s.CookiesConfig.Validate(); err != nil { - invalidParams.AddNested("CookiesConfig", err.(request.ErrInvalidParams)) - } - } - if s.HeadersConfig != nil { - if err := s.HeadersConfig.Validate(); err != nil { - invalidParams.AddNested("HeadersConfig", err.(request.ErrInvalidParams)) - } - } - if s.QueryStringsConfig != nil { - if err := s.QueryStringsConfig.Validate(); err != nil { - invalidParams.AddNested("QueryStringsConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCookiesConfig sets the CookiesConfig field's value. -func (s *ParametersInCacheKeyAndForwardedToOrigin) SetCookiesConfig(v *CachePolicyCookiesConfig) *ParametersInCacheKeyAndForwardedToOrigin { - s.CookiesConfig = v - return s -} - -// SetEnableAcceptEncodingBrotli sets the EnableAcceptEncodingBrotli field's value. -func (s *ParametersInCacheKeyAndForwardedToOrigin) SetEnableAcceptEncodingBrotli(v bool) *ParametersInCacheKeyAndForwardedToOrigin { - s.EnableAcceptEncodingBrotli = &v - return s -} - -// SetEnableAcceptEncodingGzip sets the EnableAcceptEncodingGzip field's value. -func (s *ParametersInCacheKeyAndForwardedToOrigin) SetEnableAcceptEncodingGzip(v bool) *ParametersInCacheKeyAndForwardedToOrigin { - s.EnableAcceptEncodingGzip = &v - return s -} - -// SetHeadersConfig sets the HeadersConfig field's value. -func (s *ParametersInCacheKeyAndForwardedToOrigin) SetHeadersConfig(v *CachePolicyHeadersConfig) *ParametersInCacheKeyAndForwardedToOrigin { - s.HeadersConfig = v - return s -} - -// SetQueryStringsConfig sets the QueryStringsConfig field's value. -func (s *ParametersInCacheKeyAndForwardedToOrigin) SetQueryStringsConfig(v *CachePolicyQueryStringsConfig) *ParametersInCacheKeyAndForwardedToOrigin { - s.QueryStringsConfig = v - return s -} - -// A complex type that contains information about the objects that you want -// to invalidate. For more information, see Specifying the Objects to Invalidate -// (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html#invalidation-specifying-objects) -// in the Amazon CloudFront Developer Guide. -type Paths struct { - _ struct{} `type:"structure"` - - // A complex type that contains a list of the paths that you want to invalidate. - Items []*string `locationNameList:"Path" type:"list"` - - // The number of invalidation paths specified for the objects that you want - // to invalidate. - // - // Quantity is a required field - Quantity *int64 `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 Paths) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Paths) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Paths) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Paths"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *Paths) SetItems(v []*string) *Paths { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *Paths) SetQuantity(v int64) *Paths { - s.Quantity = &v - return s -} - -// A public key that you can use with signed URLs and signed cookies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html), -// or with field-level encryption (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/field-level-encryption.html). -type PublicKey struct { - _ struct{} `type:"structure"` - - // The date and time when the public key was uploaded. - // - // CreatedTime is a required field - CreatedTime *time.Time `type:"timestamp" required:"true"` - - // The identifier of the public key. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // Configuration information about a public key that you can use with signed - // URLs and signed cookies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html), - // or with field-level encryption (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/field-level-encryption.html). - // - // PublicKeyConfig is a required field - PublicKeyConfig *PublicKeyConfig `type:"structure" 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 PublicKey) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PublicKey) GoString() string { - return s.String() -} - -// SetCreatedTime sets the CreatedTime field's value. -func (s *PublicKey) SetCreatedTime(v time.Time) *PublicKey { - s.CreatedTime = &v - return s -} - -// SetId sets the Id field's value. -func (s *PublicKey) SetId(v string) *PublicKey { - s.Id = &v - return s -} - -// SetPublicKeyConfig sets the PublicKeyConfig field's value. -func (s *PublicKey) SetPublicKeyConfig(v *PublicKeyConfig) *PublicKey { - s.PublicKeyConfig = v - return s -} - -// Configuration information about a public key that you can use with signed -// URLs and signed cookies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html), -// or with field-level encryption (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/field-level-encryption.html). -type PublicKeyConfig struct { - _ struct{} `type:"structure"` - - // A string included in the request to help make sure that the request can't - // be replayed. - // - // CallerReference is a required field - CallerReference *string `type:"string" required:"true"` - - // A comment to describe the public key. The comment cannot be longer than 128 - // characters. - Comment *string `type:"string"` - - // The public key that you can use with signed URLs and signed cookies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html), - // or with field-level encryption (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/field-level-encryption.html). - // - // EncodedKey is a required field - EncodedKey *string `type:"string" required:"true"` - - // A name to help identify the public key. - // - // Name is a required field - Name *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 PublicKeyConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PublicKeyConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PublicKeyConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PublicKeyConfig"} - if s.CallerReference == nil { - invalidParams.Add(request.NewErrParamRequired("CallerReference")) - } - if s.EncodedKey == nil { - invalidParams.Add(request.NewErrParamRequired("EncodedKey")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCallerReference sets the CallerReference field's value. -func (s *PublicKeyConfig) SetCallerReference(v string) *PublicKeyConfig { - s.CallerReference = &v - return s -} - -// SetComment sets the Comment field's value. -func (s *PublicKeyConfig) SetComment(v string) *PublicKeyConfig { - s.Comment = &v - return s -} - -// SetEncodedKey sets the EncodedKey field's value. -func (s *PublicKeyConfig) SetEncodedKey(v string) *PublicKeyConfig { - s.EncodedKey = &v - return s -} - -// SetName sets the Name field's value. -func (s *PublicKeyConfig) SetName(v string) *PublicKeyConfig { - s.Name = &v - return s -} - -// A list of public keys that you can use with signed URLs and signed cookies -// (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html), -// or with field-level encryption (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/field-level-encryption.html). -type PublicKeyList struct { - _ struct{} `type:"structure"` - - // A list of public keys. - Items []*PublicKeySummary `locationNameList:"PublicKeySummary" type:"list"` - - // The maximum number of public keys you want in the response. - // - // MaxItems is a required field - MaxItems *int64 `type:"integer" required:"true"` - - // If there are more elements to be listed, this element is present and contains - // the value that you can use for the Marker request parameter to continue listing - // your public keys where you left off. - NextMarker *string `type:"string"` - - // The number of public keys in the list. - // - // Quantity is a required field - Quantity *int64 `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 PublicKeyList) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PublicKeyList) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *PublicKeyList) SetItems(v []*PublicKeySummary) *PublicKeyList { - s.Items = v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *PublicKeyList) SetMaxItems(v int64) *PublicKeyList { - s.MaxItems = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *PublicKeyList) SetNextMarker(v string) *PublicKeyList { - s.NextMarker = &v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *PublicKeyList) SetQuantity(v int64) *PublicKeyList { - s.Quantity = &v - return s -} - -// Contains information about a public key. -type PublicKeySummary struct { - _ struct{} `type:"structure"` - - // A comment to describe the public key. The comment cannot be longer than 128 - // characters. - Comment *string `type:"string"` - - // The date and time when the public key was uploaded. - // - // CreatedTime is a required field - CreatedTime *time.Time `type:"timestamp" required:"true"` - - // The public key. - // - // EncodedKey is a required field - EncodedKey *string `type:"string" required:"true"` - - // The identifier of the public key. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // A name to help identify the public key. - // - // Name is a required field - Name *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 PublicKeySummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PublicKeySummary) GoString() string { - return s.String() -} - -// SetComment sets the Comment field's value. -func (s *PublicKeySummary) SetComment(v string) *PublicKeySummary { - s.Comment = &v - return s -} - -// SetCreatedTime sets the CreatedTime field's value. -func (s *PublicKeySummary) SetCreatedTime(v time.Time) *PublicKeySummary { - s.CreatedTime = &v - return s -} - -// SetEncodedKey sets the EncodedKey field's value. -func (s *PublicKeySummary) SetEncodedKey(v string) *PublicKeySummary { - s.EncodedKey = &v - return s -} - -// SetId sets the Id field's value. -func (s *PublicKeySummary) SetId(v string) *PublicKeySummary { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *PublicKeySummary) SetName(v string) *PublicKeySummary { - s.Name = &v - return s -} - -type PublishFunctionInput struct { - _ struct{} `locationName:"PublishFunctionRequest" type:"structure"` - - // The current version (ETag value) of the function that you are publishing, - // which you can get using DescribeFunction. - // - // IfMatch is a required field - IfMatch *string `location:"header" locationName:"If-Match" type:"string" required:"true"` - - // The name of the function that you are publishing. - // - // Name is a required field - Name *string `location:"uri" locationName:"Name" 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 PublishFunctionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PublishFunctionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PublishFunctionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PublishFunctionInput"} - if s.IfMatch == nil { - invalidParams.Add(request.NewErrParamRequired("IfMatch")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIfMatch sets the IfMatch field's value. -func (s *PublishFunctionInput) SetIfMatch(v string) *PublishFunctionInput { - s.IfMatch = &v - return s -} - -// SetName sets the Name field's value. -func (s *PublishFunctionInput) SetName(v string) *PublishFunctionInput { - s.Name = &v - return s -} - -type PublishFunctionOutput struct { - _ struct{} `type:"structure" payload:"FunctionSummary"` - - // Contains configuration information and metadata about a CloudFront function. - FunctionSummary *FunctionSummary `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 PublishFunctionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PublishFunctionOutput) GoString() string { - return s.String() -} - -// SetFunctionSummary sets the FunctionSummary field's value. -func (s *PublishFunctionOutput) SetFunctionSummary(v *FunctionSummary) *PublishFunctionOutput { - s.FunctionSummary = v - return s -} - -// Query argument-profile mapping for field-level encryption. -type QueryArgProfile struct { - _ struct{} `type:"structure"` - - // ID of profile to use for field-level encryption query argument-profile mapping - // - // ProfileId is a required field - ProfileId *string `type:"string" required:"true"` - - // Query argument for field-level encryption query argument-profile mapping. - // - // QueryArg is a required field - QueryArg *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 QueryArgProfile) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s QueryArgProfile) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *QueryArgProfile) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "QueryArgProfile"} - if s.ProfileId == nil { - invalidParams.Add(request.NewErrParamRequired("ProfileId")) - } - if s.QueryArg == nil { - invalidParams.Add(request.NewErrParamRequired("QueryArg")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetProfileId sets the ProfileId field's value. -func (s *QueryArgProfile) SetProfileId(v string) *QueryArgProfile { - s.ProfileId = &v - return s -} - -// SetQueryArg sets the QueryArg field's value. -func (s *QueryArgProfile) SetQueryArg(v string) *QueryArgProfile { - s.QueryArg = &v - return s -} - -// Configuration for query argument-profile mapping for field-level encryption. -type QueryArgProfileConfig struct { - _ struct{} `type:"structure"` - - // Flag to set if you want a request to be forwarded to the origin even if the - // profile specified by the field-level encryption query argument, fle-profile, - // is unknown. - // - // ForwardWhenQueryArgProfileIsUnknown is a required field - ForwardWhenQueryArgProfileIsUnknown *bool `type:"boolean" required:"true"` - - // Profiles specified for query argument-profile mapping for field-level encryption. - QueryArgProfiles *QueryArgProfiles `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 QueryArgProfileConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s QueryArgProfileConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *QueryArgProfileConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "QueryArgProfileConfig"} - if s.ForwardWhenQueryArgProfileIsUnknown == nil { - invalidParams.Add(request.NewErrParamRequired("ForwardWhenQueryArgProfileIsUnknown")) - } - if s.QueryArgProfiles != nil { - if err := s.QueryArgProfiles.Validate(); err != nil { - invalidParams.AddNested("QueryArgProfiles", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetForwardWhenQueryArgProfileIsUnknown sets the ForwardWhenQueryArgProfileIsUnknown field's value. -func (s *QueryArgProfileConfig) SetForwardWhenQueryArgProfileIsUnknown(v bool) *QueryArgProfileConfig { - s.ForwardWhenQueryArgProfileIsUnknown = &v - return s -} - -// SetQueryArgProfiles sets the QueryArgProfiles field's value. -func (s *QueryArgProfileConfig) SetQueryArgProfiles(v *QueryArgProfiles) *QueryArgProfileConfig { - s.QueryArgProfiles = v - return s -} - -// Query argument-profile mapping for field-level encryption. -type QueryArgProfiles struct { - _ struct{} `type:"structure"` - - // Number of items for query argument-profile mapping for field-level encryption. - Items []*QueryArgProfile `locationNameList:"QueryArgProfile" type:"list"` - - // Number of profiles for query argument-profile mapping for field-level encryption. - // - // Quantity is a required field - Quantity *int64 `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 QueryArgProfiles) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s QueryArgProfiles) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *QueryArgProfiles) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "QueryArgProfiles"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *QueryArgProfiles) SetItems(v []*QueryArgProfile) *QueryArgProfiles { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *QueryArgProfiles) SetQuantity(v int64) *QueryArgProfiles { - s.Quantity = &v - return s -} - -// This field is deprecated. We recommend that you use a cache policy or an -// origin request policy instead of this field. -// -// If you want to include query strings in the cache key, use QueryStringsConfig -// in a cache policy. See CachePolicy. -// -// If you want to send query strings to the origin but not include them in the -// cache key, use QueryStringsConfig in an origin request policy. See OriginRequestPolicy. -// -// A complex type that contains information about the query string parameters -// that you want CloudFront to use for caching for a cache behavior. -type QueryStringCacheKeys struct { - _ struct{} `type:"structure"` - - // A list that contains the query string parameters that you want CloudFront - // to use as a basis for caching for a cache behavior. If Quantity is 0, you - // can omit Items. - Items []*string `locationNameList:"Name" type:"list"` - - // The number of whitelisted query string parameters for a cache behavior. - // - // Quantity is a required field - Quantity *int64 `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 QueryStringCacheKeys) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s QueryStringCacheKeys) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *QueryStringCacheKeys) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "QueryStringCacheKeys"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *QueryStringCacheKeys) SetItems(v []*string) *QueryStringCacheKeys { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *QueryStringCacheKeys) SetQuantity(v int64) *QueryStringCacheKeys { - s.Quantity = &v - return s -} - -// Contains a list of query string names. -type QueryStringNames struct { - _ struct{} `type:"structure"` - - // A list of query string names. - Items []*string `locationNameList:"Name" type:"list"` - - // The number of query string names in the Items list. - // - // Quantity is a required field - Quantity *int64 `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 QueryStringNames) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s QueryStringNames) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *QueryStringNames) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "QueryStringNames"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *QueryStringNames) SetItems(v []*string) *QueryStringNames { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *QueryStringNames) SetQuantity(v int64) *QueryStringNames { - s.Quantity = &v - return s -} - -// A real-time log configuration. -type RealtimeLogConfig struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of this real-time log configuration. - // - // ARN is a required field - ARN *string `type:"string" required:"true"` - - // Contains information about the Amazon Kinesis data stream where you are sending - // real-time log data for this real-time log configuration. - // - // EndPoints is a required field - EndPoints []*EndPoint `type:"list" required:"true"` - - // A list of fields that are included in each real-time log record. In an API - // response, the fields are provided in the same order in which they are sent - // to the Amazon Kinesis data stream. - // - // For more information about fields, see Real-time log configuration fields - // (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html#understand-real-time-log-config-fields) - // in the Amazon CloudFront Developer Guide. - // - // Fields is a required field - Fields []*string `locationNameList:"Field" type:"list" required:"true"` - - // The unique name of this real-time log configuration. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The sampling rate for this real-time log configuration. The sampling rate - // determines the percentage of viewer requests that are represented in the - // real-time log data. The sampling rate is an integer between 1 and 100, inclusive. - // - // SamplingRate is a required field - SamplingRate *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 RealtimeLogConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RealtimeLogConfig) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *RealtimeLogConfig) SetARN(v string) *RealtimeLogConfig { - s.ARN = &v - return s -} - -// SetEndPoints sets the EndPoints field's value. -func (s *RealtimeLogConfig) SetEndPoints(v []*EndPoint) *RealtimeLogConfig { - s.EndPoints = v - return s -} - -// SetFields sets the Fields field's value. -func (s *RealtimeLogConfig) SetFields(v []*string) *RealtimeLogConfig { - s.Fields = v - return s -} - -// SetName sets the Name field's value. -func (s *RealtimeLogConfig) SetName(v string) *RealtimeLogConfig { - s.Name = &v - return s -} - -// SetSamplingRate sets the SamplingRate field's value. -func (s *RealtimeLogConfig) SetSamplingRate(v int64) *RealtimeLogConfig { - s.SamplingRate = &v - return s -} - -// A list of real-time log configurations. -type RealtimeLogConfigs struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more real-time log configurations - // than are contained in this list. - // - // IsTruncated is a required field - IsTruncated *bool `type:"boolean" required:"true"` - - // Contains the list of real-time log configurations. - Items []*RealtimeLogConfig `type:"list"` - - // This parameter indicates where this list of real-time log configurations - // begins. This list includes real-time log configurations that occur after - // the marker. - // - // Marker is a required field - Marker *string `type:"string" required:"true"` - - // The maximum number of real-time log configurations requested. - // - // MaxItems is a required field - MaxItems *int64 `type:"integer" required:"true"` - - // If there are more items in the list than are in this response, this element - // is present. It contains the value that you should use in the Marker field - // of a subsequent request to continue listing real-time log configurations - // where you left off. - 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 RealtimeLogConfigs) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RealtimeLogConfigs) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *RealtimeLogConfigs) SetIsTruncated(v bool) *RealtimeLogConfigs { - s.IsTruncated = &v - return s -} - -// SetItems sets the Items field's value. -func (s *RealtimeLogConfigs) SetItems(v []*RealtimeLogConfig) *RealtimeLogConfigs { - s.Items = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *RealtimeLogConfigs) SetMarker(v string) *RealtimeLogConfigs { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *RealtimeLogConfigs) SetMaxItems(v int64) *RealtimeLogConfigs { - s.MaxItems = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *RealtimeLogConfigs) SetNextMarker(v string) *RealtimeLogConfigs { - s.NextMarker = &v - return s -} - -// A subscription configuration for additional CloudWatch metrics. -type RealtimeMetricsSubscriptionConfig struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether additional CloudWatch metrics are enabled for - // a given CloudFront distribution. - // - // RealtimeMetricsSubscriptionStatus is a required field - RealtimeMetricsSubscriptionStatus *string `type:"string" required:"true" enum:"RealtimeMetricsSubscriptionStatus"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RealtimeMetricsSubscriptionConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RealtimeMetricsSubscriptionConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RealtimeMetricsSubscriptionConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RealtimeMetricsSubscriptionConfig"} - if s.RealtimeMetricsSubscriptionStatus == nil { - invalidParams.Add(request.NewErrParamRequired("RealtimeMetricsSubscriptionStatus")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRealtimeMetricsSubscriptionStatus sets the RealtimeMetricsSubscriptionStatus field's value. -func (s *RealtimeMetricsSubscriptionConfig) SetRealtimeMetricsSubscriptionStatus(v string) *RealtimeMetricsSubscriptionConfig { - s.RealtimeMetricsSubscriptionStatus = &v - return s -} - -// A response headers policy. -// -// A response headers policy contains information about a set of HTTP response -// headers. -// -// After you create a response headers policy, you can use its ID to attach -// it to one or more cache behaviors in a CloudFront distribution. When it's -// attached to a cache behavior, the response headers policy affects the HTTP -// headers that CloudFront includes in HTTP responses to requests that match -// the cache behavior. CloudFront adds or removes response headers according -// to the configuration of the response headers policy. -// -// For more information, see Adding or removing HTTP headers in CloudFront responses -// (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/modifying-response-headers.html) -// in the Amazon CloudFront Developer Guide. -type ResponseHeadersPolicy struct { - _ struct{} `type:"structure"` - - // The identifier for the response headers policy. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The date and time when the response headers policy was last modified. - // - // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" required:"true"` - - // A response headers policy configuration. - // - // ResponseHeadersPolicyConfig is a required field - ResponseHeadersPolicyConfig *ResponseHeadersPolicyConfig `type:"structure" 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 ResponseHeadersPolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResponseHeadersPolicy) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *ResponseHeadersPolicy) SetId(v string) *ResponseHeadersPolicy { - s.Id = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *ResponseHeadersPolicy) SetLastModifiedTime(v time.Time) *ResponseHeadersPolicy { - s.LastModifiedTime = &v - return s -} - -// SetResponseHeadersPolicyConfig sets the ResponseHeadersPolicyConfig field's value. -func (s *ResponseHeadersPolicy) SetResponseHeadersPolicyConfig(v *ResponseHeadersPolicyConfig) *ResponseHeadersPolicy { - s.ResponseHeadersPolicyConfig = v - return s -} - -// A list of HTTP header names that CloudFront includes as values for the Access-Control-Allow-Headers -// HTTP response header. -// -// For more information about the Access-Control-Allow-Headers HTTP response -// header, see Access-Control-Allow-Headers (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Headers) -// in the MDN Web Docs. -type ResponseHeadersPolicyAccessControlAllowHeaders struct { - _ struct{} `type:"structure"` - - // The list of HTTP header names. You can specify * to allow all headers. - // - // Items is a required field - Items []*string `locationNameList:"Header" type:"list" required:"true"` - - // The number of HTTP header names in the list. - // - // Quantity is a required field - Quantity *int64 `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 ResponseHeadersPolicyAccessControlAllowHeaders) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResponseHeadersPolicyAccessControlAllowHeaders) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResponseHeadersPolicyAccessControlAllowHeaders) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResponseHeadersPolicyAccessControlAllowHeaders"} - if s.Items == nil { - invalidParams.Add(request.NewErrParamRequired("Items")) - } - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *ResponseHeadersPolicyAccessControlAllowHeaders) SetItems(v []*string) *ResponseHeadersPolicyAccessControlAllowHeaders { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *ResponseHeadersPolicyAccessControlAllowHeaders) SetQuantity(v int64) *ResponseHeadersPolicyAccessControlAllowHeaders { - s.Quantity = &v - return s -} - -// A list of HTTP methods that CloudFront includes as values for the Access-Control-Allow-Methods -// HTTP response header. -// -// For more information about the Access-Control-Allow-Methods HTTP response -// header, see Access-Control-Allow-Methods (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Methods) -// in the MDN Web Docs. -type ResponseHeadersPolicyAccessControlAllowMethods struct { - _ struct{} `type:"structure"` - - // The list of HTTP methods. Valid values are: - // - // * GET - // - // * DELETE - // - // * HEAD - // - // * OPTIONS - // - // * PATCH - // - // * POST - // - // * PUT - // - // * ALL - // - // ALL is a special value that includes all of the listed HTTP methods. - // - // Items is a required field - Items []*string `locationNameList:"Method" type:"list" required:"true" enum:"ResponseHeadersPolicyAccessControlAllowMethodsValues"` - - // The number of HTTP methods in the list. - // - // Quantity is a required field - Quantity *int64 `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 ResponseHeadersPolicyAccessControlAllowMethods) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResponseHeadersPolicyAccessControlAllowMethods) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResponseHeadersPolicyAccessControlAllowMethods) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResponseHeadersPolicyAccessControlAllowMethods"} - if s.Items == nil { - invalidParams.Add(request.NewErrParamRequired("Items")) - } - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *ResponseHeadersPolicyAccessControlAllowMethods) SetItems(v []*string) *ResponseHeadersPolicyAccessControlAllowMethods { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *ResponseHeadersPolicyAccessControlAllowMethods) SetQuantity(v int64) *ResponseHeadersPolicyAccessControlAllowMethods { - s.Quantity = &v - return s -} - -// A list of origins (domain names) that CloudFront can use as the value for -// the Access-Control-Allow-Origin HTTP response header. -// -// For more information about the Access-Control-Allow-Origin HTTP response -// header, see Access-Control-Allow-Origin (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin) -// in the MDN Web Docs. -type ResponseHeadersPolicyAccessControlAllowOrigins struct { - _ struct{} `type:"structure"` - - // The list of origins (domain names). You can specify * to allow all origins. - // - // Items is a required field - Items []*string `locationNameList:"Origin" type:"list" required:"true"` - - // The number of origins in the list. - // - // Quantity is a required field - Quantity *int64 `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 ResponseHeadersPolicyAccessControlAllowOrigins) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResponseHeadersPolicyAccessControlAllowOrigins) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResponseHeadersPolicyAccessControlAllowOrigins) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResponseHeadersPolicyAccessControlAllowOrigins"} - if s.Items == nil { - invalidParams.Add(request.NewErrParamRequired("Items")) - } - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *ResponseHeadersPolicyAccessControlAllowOrigins) SetItems(v []*string) *ResponseHeadersPolicyAccessControlAllowOrigins { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *ResponseHeadersPolicyAccessControlAllowOrigins) SetQuantity(v int64) *ResponseHeadersPolicyAccessControlAllowOrigins { - s.Quantity = &v - return s -} - -// A list of HTTP headers that CloudFront includes as values for the Access-Control-Expose-Headers -// HTTP response header. -// -// For more information about the Access-Control-Expose-Headers HTTP response -// header, see Access-Control-Expose-Headers (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Expose-Headers) -// in the MDN Web Docs. -type ResponseHeadersPolicyAccessControlExposeHeaders struct { - _ struct{} `type:"structure"` - - // The list of HTTP headers. You can specify * to expose all headers. - Items []*string `locationNameList:"Header" type:"list"` - - // The number of HTTP headers in the list. - // - // Quantity is a required field - Quantity *int64 `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 ResponseHeadersPolicyAccessControlExposeHeaders) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResponseHeadersPolicyAccessControlExposeHeaders) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResponseHeadersPolicyAccessControlExposeHeaders) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResponseHeadersPolicyAccessControlExposeHeaders"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *ResponseHeadersPolicyAccessControlExposeHeaders) SetItems(v []*string) *ResponseHeadersPolicyAccessControlExposeHeaders { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *ResponseHeadersPolicyAccessControlExposeHeaders) SetQuantity(v int64) *ResponseHeadersPolicyAccessControlExposeHeaders { - s.Quantity = &v - return s -} - -// A response headers policy configuration. -// -// A response headers policy configuration contains metadata about the response -// headers policy, and configurations for sets of HTTP response headers. -type ResponseHeadersPolicyConfig struct { - _ struct{} `type:"structure"` - - // A comment to describe the response headers policy. - // - // The comment cannot be longer than 128 characters. - Comment *string `type:"string"` - - // A configuration for a set of HTTP response headers that are used for cross-origin - // resource sharing (CORS). - CorsConfig *ResponseHeadersPolicyCorsConfig `type:"structure"` - - // A configuration for a set of custom HTTP response headers. - CustomHeadersConfig *ResponseHeadersPolicyCustomHeadersConfig `type:"structure"` - - // A name to identify the response headers policy. - // - // The name must be unique for response headers policies in this Amazon Web - // Services account. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // A configuration for a set of HTTP headers to remove from the HTTP response. - RemoveHeadersConfig *ResponseHeadersPolicyRemoveHeadersConfig `type:"structure"` - - // A configuration for a set of security-related HTTP response headers. - SecurityHeadersConfig *ResponseHeadersPolicySecurityHeadersConfig `type:"structure"` - - // A configuration for enabling the Server-Timing header in HTTP responses sent - // from CloudFront. - ServerTimingHeadersConfig *ResponseHeadersPolicyServerTimingHeadersConfig `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 ResponseHeadersPolicyConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResponseHeadersPolicyConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResponseHeadersPolicyConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResponseHeadersPolicyConfig"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.CorsConfig != nil { - if err := s.CorsConfig.Validate(); err != nil { - invalidParams.AddNested("CorsConfig", err.(request.ErrInvalidParams)) - } - } - if s.CustomHeadersConfig != nil { - if err := s.CustomHeadersConfig.Validate(); err != nil { - invalidParams.AddNested("CustomHeadersConfig", err.(request.ErrInvalidParams)) - } - } - if s.RemoveHeadersConfig != nil { - if err := s.RemoveHeadersConfig.Validate(); err != nil { - invalidParams.AddNested("RemoveHeadersConfig", err.(request.ErrInvalidParams)) - } - } - if s.SecurityHeadersConfig != nil { - if err := s.SecurityHeadersConfig.Validate(); err != nil { - invalidParams.AddNested("SecurityHeadersConfig", err.(request.ErrInvalidParams)) - } - } - if s.ServerTimingHeadersConfig != nil { - if err := s.ServerTimingHeadersConfig.Validate(); err != nil { - invalidParams.AddNested("ServerTimingHeadersConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComment sets the Comment field's value. -func (s *ResponseHeadersPolicyConfig) SetComment(v string) *ResponseHeadersPolicyConfig { - s.Comment = &v - return s -} - -// SetCorsConfig sets the CorsConfig field's value. -func (s *ResponseHeadersPolicyConfig) SetCorsConfig(v *ResponseHeadersPolicyCorsConfig) *ResponseHeadersPolicyConfig { - s.CorsConfig = v - return s -} - -// SetCustomHeadersConfig sets the CustomHeadersConfig field's value. -func (s *ResponseHeadersPolicyConfig) SetCustomHeadersConfig(v *ResponseHeadersPolicyCustomHeadersConfig) *ResponseHeadersPolicyConfig { - s.CustomHeadersConfig = v - return s -} - -// SetName sets the Name field's value. -func (s *ResponseHeadersPolicyConfig) SetName(v string) *ResponseHeadersPolicyConfig { - s.Name = &v - return s -} - -// SetRemoveHeadersConfig sets the RemoveHeadersConfig field's value. -func (s *ResponseHeadersPolicyConfig) SetRemoveHeadersConfig(v *ResponseHeadersPolicyRemoveHeadersConfig) *ResponseHeadersPolicyConfig { - s.RemoveHeadersConfig = v - return s -} - -// SetSecurityHeadersConfig sets the SecurityHeadersConfig field's value. -func (s *ResponseHeadersPolicyConfig) SetSecurityHeadersConfig(v *ResponseHeadersPolicySecurityHeadersConfig) *ResponseHeadersPolicyConfig { - s.SecurityHeadersConfig = v - return s -} - -// SetServerTimingHeadersConfig sets the ServerTimingHeadersConfig field's value. -func (s *ResponseHeadersPolicyConfig) SetServerTimingHeadersConfig(v *ResponseHeadersPolicyServerTimingHeadersConfig) *ResponseHeadersPolicyConfig { - s.ServerTimingHeadersConfig = v - return s -} - -// The policy directives and their values that CloudFront includes as values -// for the Content-Security-Policy HTTP response header. -// -// For more information about the Content-Security-Policy HTTP response header, -// see Content-Security-Policy (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy) -// in the MDN Web Docs. -type ResponseHeadersPolicyContentSecurityPolicy struct { - _ struct{} `type:"structure"` - - // The policy directives and their values that CloudFront includes as values - // for the Content-Security-Policy HTTP response header. - // - // ContentSecurityPolicy is a required field - ContentSecurityPolicy *string `type:"string" required:"true"` - - // A Boolean that determines whether CloudFront overrides the Content-Security-Policy - // HTTP response header received from the origin with the one specified in this - // response headers policy. - // - // Override is a required field - Override *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 ResponseHeadersPolicyContentSecurityPolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResponseHeadersPolicyContentSecurityPolicy) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResponseHeadersPolicyContentSecurityPolicy) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResponseHeadersPolicyContentSecurityPolicy"} - if s.ContentSecurityPolicy == nil { - invalidParams.Add(request.NewErrParamRequired("ContentSecurityPolicy")) - } - if s.Override == nil { - invalidParams.Add(request.NewErrParamRequired("Override")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContentSecurityPolicy sets the ContentSecurityPolicy field's value. -func (s *ResponseHeadersPolicyContentSecurityPolicy) SetContentSecurityPolicy(v string) *ResponseHeadersPolicyContentSecurityPolicy { - s.ContentSecurityPolicy = &v - return s -} - -// SetOverride sets the Override field's value. -func (s *ResponseHeadersPolicyContentSecurityPolicy) SetOverride(v bool) *ResponseHeadersPolicyContentSecurityPolicy { - s.Override = &v - return s -} - -// Determines whether CloudFront includes the X-Content-Type-Options HTTP response -// header with its value set to nosniff. -// -// For more information about the X-Content-Type-Options HTTP response header, -// see X-Content-Type-Options (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options) -// in the MDN Web Docs. -type ResponseHeadersPolicyContentTypeOptions struct { - _ struct{} `type:"structure"` - - // A Boolean that determines whether CloudFront overrides the X-Content-Type-Options - // HTTP response header received from the origin with the one specified in this - // response headers policy. - // - // Override is a required field - Override *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 ResponseHeadersPolicyContentTypeOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResponseHeadersPolicyContentTypeOptions) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResponseHeadersPolicyContentTypeOptions) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResponseHeadersPolicyContentTypeOptions"} - if s.Override == nil { - invalidParams.Add(request.NewErrParamRequired("Override")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOverride sets the Override field's value. -func (s *ResponseHeadersPolicyContentTypeOptions) SetOverride(v bool) *ResponseHeadersPolicyContentTypeOptions { - s.Override = &v - return s -} - -// A configuration for a set of HTTP response headers that are used for cross-origin -// resource sharing (CORS). CloudFront adds these headers to HTTP responses -// that it sends for CORS requests that match a cache behavior associated with -// this response headers policy. -// -// For more information about CORS, see Cross-Origin Resource Sharing (CORS) -// (https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) in the MDN Web Docs. -type ResponseHeadersPolicyCorsConfig struct { - _ struct{} `type:"structure"` - - // A Boolean that CloudFront uses as the value for the Access-Control-Allow-Credentials - // HTTP response header. - // - // For more information about the Access-Control-Allow-Credentials HTTP response - // header, see Access-Control-Allow-Credentials (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials) - // in the MDN Web Docs. - // - // AccessControlAllowCredentials is a required field - AccessControlAllowCredentials *bool `type:"boolean" required:"true"` - - // A list of HTTP header names that CloudFront includes as values for the Access-Control-Allow-Headers - // HTTP response header. - // - // For more information about the Access-Control-Allow-Headers HTTP response - // header, see Access-Control-Allow-Headers (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Headers) - // in the MDN Web Docs. - // - // AccessControlAllowHeaders is a required field - AccessControlAllowHeaders *ResponseHeadersPolicyAccessControlAllowHeaders `type:"structure" required:"true"` - - // A list of HTTP methods that CloudFront includes as values for the Access-Control-Allow-Methods - // HTTP response header. - // - // For more information about the Access-Control-Allow-Methods HTTP response - // header, see Access-Control-Allow-Methods (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Methods) - // in the MDN Web Docs. - // - // AccessControlAllowMethods is a required field - AccessControlAllowMethods *ResponseHeadersPolicyAccessControlAllowMethods `type:"structure" required:"true"` - - // A list of origins (domain names) that CloudFront can use as the value for - // the Access-Control-Allow-Origin HTTP response header. - // - // For more information about the Access-Control-Allow-Origin HTTP response - // header, see Access-Control-Allow-Origin (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin) - // in the MDN Web Docs. - // - // AccessControlAllowOrigins is a required field - AccessControlAllowOrigins *ResponseHeadersPolicyAccessControlAllowOrigins `type:"structure" required:"true"` - - // A list of HTTP headers that CloudFront includes as values for the Access-Control-Expose-Headers - // HTTP response header. - // - // For more information about the Access-Control-Expose-Headers HTTP response - // header, see Access-Control-Expose-Headers (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Expose-Headers) - // in the MDN Web Docs. - AccessControlExposeHeaders *ResponseHeadersPolicyAccessControlExposeHeaders `type:"structure"` - - // A number that CloudFront uses as the value for the Access-Control-Max-Age - // HTTP response header. - // - // For more information about the Access-Control-Max-Age HTTP response header, - // see Access-Control-Max-Age (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Max-Age) - // in the MDN Web Docs. - AccessControlMaxAgeSec *int64 `type:"integer"` - - // A Boolean that determines whether CloudFront overrides HTTP response headers - // received from the origin with the ones specified in this response headers - // policy. - // - // OriginOverride is a required field - OriginOverride *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 ResponseHeadersPolicyCorsConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResponseHeadersPolicyCorsConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResponseHeadersPolicyCorsConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResponseHeadersPolicyCorsConfig"} - if s.AccessControlAllowCredentials == nil { - invalidParams.Add(request.NewErrParamRequired("AccessControlAllowCredentials")) - } - if s.AccessControlAllowHeaders == nil { - invalidParams.Add(request.NewErrParamRequired("AccessControlAllowHeaders")) - } - if s.AccessControlAllowMethods == nil { - invalidParams.Add(request.NewErrParamRequired("AccessControlAllowMethods")) - } - if s.AccessControlAllowOrigins == nil { - invalidParams.Add(request.NewErrParamRequired("AccessControlAllowOrigins")) - } - if s.OriginOverride == nil { - invalidParams.Add(request.NewErrParamRequired("OriginOverride")) - } - if s.AccessControlAllowHeaders != nil { - if err := s.AccessControlAllowHeaders.Validate(); err != nil { - invalidParams.AddNested("AccessControlAllowHeaders", err.(request.ErrInvalidParams)) - } - } - if s.AccessControlAllowMethods != nil { - if err := s.AccessControlAllowMethods.Validate(); err != nil { - invalidParams.AddNested("AccessControlAllowMethods", err.(request.ErrInvalidParams)) - } - } - if s.AccessControlAllowOrigins != nil { - if err := s.AccessControlAllowOrigins.Validate(); err != nil { - invalidParams.AddNested("AccessControlAllowOrigins", err.(request.ErrInvalidParams)) - } - } - if s.AccessControlExposeHeaders != nil { - if err := s.AccessControlExposeHeaders.Validate(); err != nil { - invalidParams.AddNested("AccessControlExposeHeaders", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessControlAllowCredentials sets the AccessControlAllowCredentials field's value. -func (s *ResponseHeadersPolicyCorsConfig) SetAccessControlAllowCredentials(v bool) *ResponseHeadersPolicyCorsConfig { - s.AccessControlAllowCredentials = &v - return s -} - -// SetAccessControlAllowHeaders sets the AccessControlAllowHeaders field's value. -func (s *ResponseHeadersPolicyCorsConfig) SetAccessControlAllowHeaders(v *ResponseHeadersPolicyAccessControlAllowHeaders) *ResponseHeadersPolicyCorsConfig { - s.AccessControlAllowHeaders = v - return s -} - -// SetAccessControlAllowMethods sets the AccessControlAllowMethods field's value. -func (s *ResponseHeadersPolicyCorsConfig) SetAccessControlAllowMethods(v *ResponseHeadersPolicyAccessControlAllowMethods) *ResponseHeadersPolicyCorsConfig { - s.AccessControlAllowMethods = v - return s -} - -// SetAccessControlAllowOrigins sets the AccessControlAllowOrigins field's value. -func (s *ResponseHeadersPolicyCorsConfig) SetAccessControlAllowOrigins(v *ResponseHeadersPolicyAccessControlAllowOrigins) *ResponseHeadersPolicyCorsConfig { - s.AccessControlAllowOrigins = v - return s -} - -// SetAccessControlExposeHeaders sets the AccessControlExposeHeaders field's value. -func (s *ResponseHeadersPolicyCorsConfig) SetAccessControlExposeHeaders(v *ResponseHeadersPolicyAccessControlExposeHeaders) *ResponseHeadersPolicyCorsConfig { - s.AccessControlExposeHeaders = v - return s -} - -// SetAccessControlMaxAgeSec sets the AccessControlMaxAgeSec field's value. -func (s *ResponseHeadersPolicyCorsConfig) SetAccessControlMaxAgeSec(v int64) *ResponseHeadersPolicyCorsConfig { - s.AccessControlMaxAgeSec = &v - return s -} - -// SetOriginOverride sets the OriginOverride field's value. -func (s *ResponseHeadersPolicyCorsConfig) SetOriginOverride(v bool) *ResponseHeadersPolicyCorsConfig { - s.OriginOverride = &v - return s -} - -// An HTTP response header name and its value. CloudFront includes this header -// in HTTP responses that it sends for requests that match a cache behavior -// that's associated with this response headers policy. -type ResponseHeadersPolicyCustomHeader struct { - _ struct{} `type:"structure"` - - // The HTTP response header name. - // - // Header is a required field - Header *string `type:"string" required:"true"` - - // A Boolean that determines whether CloudFront overrides a response header - // with the same name received from the origin with the header specified here. - // - // Override is a required field - Override *bool `type:"boolean" required:"true"` - - // The value for the HTTP response header. - // - // 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 ResponseHeadersPolicyCustomHeader) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResponseHeadersPolicyCustomHeader) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResponseHeadersPolicyCustomHeader) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResponseHeadersPolicyCustomHeader"} - if s.Header == nil { - invalidParams.Add(request.NewErrParamRequired("Header")) - } - if s.Override == nil { - invalidParams.Add(request.NewErrParamRequired("Override")) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHeader sets the Header field's value. -func (s *ResponseHeadersPolicyCustomHeader) SetHeader(v string) *ResponseHeadersPolicyCustomHeader { - s.Header = &v - return s -} - -// SetOverride sets the Override field's value. -func (s *ResponseHeadersPolicyCustomHeader) SetOverride(v bool) *ResponseHeadersPolicyCustomHeader { - s.Override = &v - return s -} - -// SetValue sets the Value field's value. -func (s *ResponseHeadersPolicyCustomHeader) SetValue(v string) *ResponseHeadersPolicyCustomHeader { - s.Value = &v - return s -} - -// A list of HTTP response header names and their values. CloudFront includes -// these headers in HTTP responses that it sends for requests that match a cache -// behavior that's associated with this response headers policy. -type ResponseHeadersPolicyCustomHeadersConfig struct { - _ struct{} `type:"structure"` - - // The list of HTTP response headers and their values. - Items []*ResponseHeadersPolicyCustomHeader `locationNameList:"ResponseHeadersPolicyCustomHeader" type:"list"` - - // The number of HTTP response headers in the list. - // - // Quantity is a required field - Quantity *int64 `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 ResponseHeadersPolicyCustomHeadersConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResponseHeadersPolicyCustomHeadersConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResponseHeadersPolicyCustomHeadersConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResponseHeadersPolicyCustomHeadersConfig"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *ResponseHeadersPolicyCustomHeadersConfig) SetItems(v []*ResponseHeadersPolicyCustomHeader) *ResponseHeadersPolicyCustomHeadersConfig { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *ResponseHeadersPolicyCustomHeadersConfig) SetQuantity(v int64) *ResponseHeadersPolicyCustomHeadersConfig { - s.Quantity = &v - return s -} - -// Determines whether CloudFront includes the X-Frame-Options HTTP response -// header and the header's value. -// -// For more information about the X-Frame-Options HTTP response header, see -// X-Frame-Options (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options) -// in the MDN Web Docs. -type ResponseHeadersPolicyFrameOptions struct { - _ struct{} `type:"structure"` - - // The value of the X-Frame-Options HTTP response header. Valid values are DENY - // and SAMEORIGIN. - // - // For more information about these values, see X-Frame-Options (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options) - // in the MDN Web Docs. - // - // FrameOption is a required field - FrameOption *string `type:"string" required:"true" enum:"FrameOptionsList"` - - // A Boolean that determines whether CloudFront overrides the X-Frame-Options - // HTTP response header received from the origin with the one specified in this - // response headers policy. - // - // Override is a required field - Override *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 ResponseHeadersPolicyFrameOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResponseHeadersPolicyFrameOptions) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResponseHeadersPolicyFrameOptions) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResponseHeadersPolicyFrameOptions"} - if s.FrameOption == nil { - invalidParams.Add(request.NewErrParamRequired("FrameOption")) - } - if s.Override == nil { - invalidParams.Add(request.NewErrParamRequired("Override")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFrameOption sets the FrameOption field's value. -func (s *ResponseHeadersPolicyFrameOptions) SetFrameOption(v string) *ResponseHeadersPolicyFrameOptions { - s.FrameOption = &v - return s -} - -// SetOverride sets the Override field's value. -func (s *ResponseHeadersPolicyFrameOptions) SetOverride(v bool) *ResponseHeadersPolicyFrameOptions { - s.Override = &v - return s -} - -// A list of response headers policies. -type ResponseHeadersPolicyList struct { - _ struct{} `type:"structure"` - - // The response headers policies in the list. - Items []*ResponseHeadersPolicySummary `locationNameList:"ResponseHeadersPolicySummary" type:"list"` - - // The maximum number of response headers policies requested. - // - // MaxItems is a required field - MaxItems *int64 `type:"integer" required:"true"` - - // If there are more items in the list than are in this response, this element - // is present. It contains the value that you should use in the Marker field - // of a subsequent request to continue listing response headers policies where - // you left off. - NextMarker *string `type:"string"` - - // The number of response headers policies returned. - // - // Quantity is a required field - Quantity *int64 `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 ResponseHeadersPolicyList) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResponseHeadersPolicyList) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *ResponseHeadersPolicyList) SetItems(v []*ResponseHeadersPolicySummary) *ResponseHeadersPolicyList { - s.Items = v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ResponseHeadersPolicyList) SetMaxItems(v int64) *ResponseHeadersPolicyList { - s.MaxItems = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ResponseHeadersPolicyList) SetNextMarker(v string) *ResponseHeadersPolicyList { - s.NextMarker = &v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *ResponseHeadersPolicyList) SetQuantity(v int64) *ResponseHeadersPolicyList { - s.Quantity = &v - return s -} - -// Determines whether CloudFront includes the Referrer-Policy HTTP response -// header and the header's value. -// -// For more information about the Referrer-Policy HTTP response header, see -// Referrer-Policy (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy) -// in the MDN Web Docs. -type ResponseHeadersPolicyReferrerPolicy struct { - _ struct{} `type:"structure"` - - // A Boolean that determines whether CloudFront overrides the Referrer-Policy - // HTTP response header received from the origin with the one specified in this - // response headers policy. - // - // Override is a required field - Override *bool `type:"boolean" required:"true"` - - // The value of the Referrer-Policy HTTP response header. Valid values are: - // - // * no-referrer - // - // * no-referrer-when-downgrade - // - // * origin - // - // * origin-when-cross-origin - // - // * same-origin - // - // * strict-origin - // - // * strict-origin-when-cross-origin - // - // * unsafe-url - // - // For more information about these values, see Referrer-Policy (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy) - // in the MDN Web Docs. - // - // ReferrerPolicy is a required field - ReferrerPolicy *string `type:"string" required:"true" enum:"ReferrerPolicyList"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResponseHeadersPolicyReferrerPolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResponseHeadersPolicyReferrerPolicy) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResponseHeadersPolicyReferrerPolicy) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResponseHeadersPolicyReferrerPolicy"} - if s.Override == nil { - invalidParams.Add(request.NewErrParamRequired("Override")) - } - if s.ReferrerPolicy == nil { - invalidParams.Add(request.NewErrParamRequired("ReferrerPolicy")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOverride sets the Override field's value. -func (s *ResponseHeadersPolicyReferrerPolicy) SetOverride(v bool) *ResponseHeadersPolicyReferrerPolicy { - s.Override = &v - return s -} - -// SetReferrerPolicy sets the ReferrerPolicy field's value. -func (s *ResponseHeadersPolicyReferrerPolicy) SetReferrerPolicy(v string) *ResponseHeadersPolicyReferrerPolicy { - s.ReferrerPolicy = &v - return s -} - -// The name of an HTTP header that CloudFront removes from HTTP responses to -// requests that match the cache behavior that this response headers policy -// is attached to. -type ResponseHeadersPolicyRemoveHeader struct { - _ struct{} `type:"structure"` - - // The HTTP header name. - // - // Header is a required field - Header *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 ResponseHeadersPolicyRemoveHeader) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResponseHeadersPolicyRemoveHeader) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResponseHeadersPolicyRemoveHeader) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResponseHeadersPolicyRemoveHeader"} - if s.Header == nil { - invalidParams.Add(request.NewErrParamRequired("Header")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHeader sets the Header field's value. -func (s *ResponseHeadersPolicyRemoveHeader) SetHeader(v string) *ResponseHeadersPolicyRemoveHeader { - s.Header = &v - return s -} - -// A list of HTTP header names that CloudFront removes from HTTP responses to -// requests that match the cache behavior that this response headers policy -// is attached to. -type ResponseHeadersPolicyRemoveHeadersConfig struct { - _ struct{} `type:"structure"` - - // The list of HTTP header names. - Items []*ResponseHeadersPolicyRemoveHeader `locationNameList:"ResponseHeadersPolicyRemoveHeader" type:"list"` - - // The number of HTTP header names in the list. - // - // Quantity is a required field - Quantity *int64 `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 ResponseHeadersPolicyRemoveHeadersConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResponseHeadersPolicyRemoveHeadersConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResponseHeadersPolicyRemoveHeadersConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResponseHeadersPolicyRemoveHeadersConfig"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *ResponseHeadersPolicyRemoveHeadersConfig) SetItems(v []*ResponseHeadersPolicyRemoveHeader) *ResponseHeadersPolicyRemoveHeadersConfig { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *ResponseHeadersPolicyRemoveHeadersConfig) SetQuantity(v int64) *ResponseHeadersPolicyRemoveHeadersConfig { - s.Quantity = &v - return s -} - -// A configuration for a set of security-related HTTP response headers. CloudFront -// adds these headers to HTTP responses that it sends for requests that match -// a cache behavior associated with this response headers policy. -type ResponseHeadersPolicySecurityHeadersConfig struct { - _ struct{} `type:"structure"` - - // The policy directives and their values that CloudFront includes as values - // for the Content-Security-Policy HTTP response header. - // - // For more information about the Content-Security-Policy HTTP response header, - // see Content-Security-Policy (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy) - // in the MDN Web Docs. - ContentSecurityPolicy *ResponseHeadersPolicyContentSecurityPolicy `type:"structure"` - - // Determines whether CloudFront includes the X-Content-Type-Options HTTP response - // header with its value set to nosniff. - // - // For more information about the X-Content-Type-Options HTTP response header, - // see X-Content-Type-Options (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options) - // in the MDN Web Docs. - ContentTypeOptions *ResponseHeadersPolicyContentTypeOptions `type:"structure"` - - // Determines whether CloudFront includes the X-Frame-Options HTTP response - // header and the header's value. - // - // For more information about the X-Frame-Options HTTP response header, see - // X-Frame-Options (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options) - // in the MDN Web Docs. - FrameOptions *ResponseHeadersPolicyFrameOptions `type:"structure"` - - // Determines whether CloudFront includes the Referrer-Policy HTTP response - // header and the header's value. - // - // For more information about the Referrer-Policy HTTP response header, see - // Referrer-Policy (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy) - // in the MDN Web Docs. - ReferrerPolicy *ResponseHeadersPolicyReferrerPolicy `type:"structure"` - - // Determines whether CloudFront includes the Strict-Transport-Security HTTP - // response header and the header's value. - // - // For more information about the Strict-Transport-Security HTTP response header, - // see Security headers (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/understanding-response-headers-policies.html#understanding-response-headers-policies-security) - // in the Amazon CloudFront Developer Guide and Strict-Transport-Security (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security) - // in the MDN Web Docs. - StrictTransportSecurity *ResponseHeadersPolicyStrictTransportSecurity `type:"structure"` - - // Determines whether CloudFront includes the X-XSS-Protection HTTP response - // header and the header's value. - // - // For more information about the X-XSS-Protection HTTP response header, see - // X-XSS-Protection (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection) - // in the MDN Web Docs. - XSSProtection *ResponseHeadersPolicyXSSProtection `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 ResponseHeadersPolicySecurityHeadersConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResponseHeadersPolicySecurityHeadersConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResponseHeadersPolicySecurityHeadersConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResponseHeadersPolicySecurityHeadersConfig"} - if s.ContentSecurityPolicy != nil { - if err := s.ContentSecurityPolicy.Validate(); err != nil { - invalidParams.AddNested("ContentSecurityPolicy", err.(request.ErrInvalidParams)) - } - } - if s.ContentTypeOptions != nil { - if err := s.ContentTypeOptions.Validate(); err != nil { - invalidParams.AddNested("ContentTypeOptions", err.(request.ErrInvalidParams)) - } - } - if s.FrameOptions != nil { - if err := s.FrameOptions.Validate(); err != nil { - invalidParams.AddNested("FrameOptions", err.(request.ErrInvalidParams)) - } - } - if s.ReferrerPolicy != nil { - if err := s.ReferrerPolicy.Validate(); err != nil { - invalidParams.AddNested("ReferrerPolicy", err.(request.ErrInvalidParams)) - } - } - if s.StrictTransportSecurity != nil { - if err := s.StrictTransportSecurity.Validate(); err != nil { - invalidParams.AddNested("StrictTransportSecurity", err.(request.ErrInvalidParams)) - } - } - if s.XSSProtection != nil { - if err := s.XSSProtection.Validate(); err != nil { - invalidParams.AddNested("XSSProtection", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContentSecurityPolicy sets the ContentSecurityPolicy field's value. -func (s *ResponseHeadersPolicySecurityHeadersConfig) SetContentSecurityPolicy(v *ResponseHeadersPolicyContentSecurityPolicy) *ResponseHeadersPolicySecurityHeadersConfig { - s.ContentSecurityPolicy = v - return s -} - -// SetContentTypeOptions sets the ContentTypeOptions field's value. -func (s *ResponseHeadersPolicySecurityHeadersConfig) SetContentTypeOptions(v *ResponseHeadersPolicyContentTypeOptions) *ResponseHeadersPolicySecurityHeadersConfig { - s.ContentTypeOptions = v - return s -} - -// SetFrameOptions sets the FrameOptions field's value. -func (s *ResponseHeadersPolicySecurityHeadersConfig) SetFrameOptions(v *ResponseHeadersPolicyFrameOptions) *ResponseHeadersPolicySecurityHeadersConfig { - s.FrameOptions = v - return s -} - -// SetReferrerPolicy sets the ReferrerPolicy field's value. -func (s *ResponseHeadersPolicySecurityHeadersConfig) SetReferrerPolicy(v *ResponseHeadersPolicyReferrerPolicy) *ResponseHeadersPolicySecurityHeadersConfig { - s.ReferrerPolicy = v - return s -} - -// SetStrictTransportSecurity sets the StrictTransportSecurity field's value. -func (s *ResponseHeadersPolicySecurityHeadersConfig) SetStrictTransportSecurity(v *ResponseHeadersPolicyStrictTransportSecurity) *ResponseHeadersPolicySecurityHeadersConfig { - s.StrictTransportSecurity = v - return s -} - -// SetXSSProtection sets the XSSProtection field's value. -func (s *ResponseHeadersPolicySecurityHeadersConfig) SetXSSProtection(v *ResponseHeadersPolicyXSSProtection) *ResponseHeadersPolicySecurityHeadersConfig { - s.XSSProtection = v - return s -} - -// A configuration for enabling the Server-Timing header in HTTP responses sent -// from CloudFront. CloudFront adds this header to HTTP responses that it sends -// in response to requests that match a cache behavior that's associated with -// this response headers policy. -// -// You can use the Server-Timing header to view metrics that can help you gain -// insights about the behavior and performance of CloudFront. For example, you -// can see which cache layer served a cache hit, or the first byte latency from -// the origin when there was a cache miss. You can use the metrics in the Server-Timing -// header to troubleshoot issues or test the efficiency of your CloudFront configuration. -// For more information, see Server-Timing header (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/understanding-response-headers-policies.html#server-timing-header) -// in the Amazon CloudFront Developer Guide. -type ResponseHeadersPolicyServerTimingHeadersConfig struct { - _ struct{} `type:"structure"` - - // A Boolean that determines whether CloudFront adds the Server-Timing header - // to HTTP responses that it sends in response to requests that match a cache - // behavior that's associated with this response headers policy. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` - - // A number 0–100 (inclusive) that specifies the percentage of responses that - // you want CloudFront to add the Server-Timing header to. When you set the - // sampling rate to 100, CloudFront adds the Server-Timing header to the HTTP - // response for every request that matches the cache behavior that this response - // headers policy is attached to. When you set it to 50, CloudFront adds the - // header to 50% of the responses for requests that match the cache behavior. - // You can set the sampling rate to any number 0–100 with up to four decimal - // places. - SamplingRate *float64 `type:"double"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResponseHeadersPolicyServerTimingHeadersConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResponseHeadersPolicyServerTimingHeadersConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResponseHeadersPolicyServerTimingHeadersConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResponseHeadersPolicyServerTimingHeadersConfig"} - 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 *ResponseHeadersPolicyServerTimingHeadersConfig) SetEnabled(v bool) *ResponseHeadersPolicyServerTimingHeadersConfig { - s.Enabled = &v - return s -} - -// SetSamplingRate sets the SamplingRate field's value. -func (s *ResponseHeadersPolicyServerTimingHeadersConfig) SetSamplingRate(v float64) *ResponseHeadersPolicyServerTimingHeadersConfig { - s.SamplingRate = &v - return s -} - -// Determines whether CloudFront includes the Strict-Transport-Security HTTP -// response header and the header's value. -// -// For more information about the Strict-Transport-Security HTTP response header, -// see Strict-Transport-Security (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security) -// in the MDN Web Docs. -type ResponseHeadersPolicyStrictTransportSecurity struct { - _ struct{} `type:"structure"` - - // A number that CloudFront uses as the value for the max-age directive in the - // Strict-Transport-Security HTTP response header. - // - // AccessControlMaxAgeSec is a required field - AccessControlMaxAgeSec *int64 `type:"integer" required:"true"` - - // A Boolean that determines whether CloudFront includes the includeSubDomains - // directive in the Strict-Transport-Security HTTP response header. - IncludeSubdomains *bool `type:"boolean"` - - // A Boolean that determines whether CloudFront overrides the Strict-Transport-Security - // HTTP response header received from the origin with the one specified in this - // response headers policy. - // - // Override is a required field - Override *bool `type:"boolean" required:"true"` - - // A Boolean that determines whether CloudFront includes the preload directive - // in the Strict-Transport-Security HTTP response header. - Preload *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 ResponseHeadersPolicyStrictTransportSecurity) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResponseHeadersPolicyStrictTransportSecurity) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResponseHeadersPolicyStrictTransportSecurity) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResponseHeadersPolicyStrictTransportSecurity"} - if s.AccessControlMaxAgeSec == nil { - invalidParams.Add(request.NewErrParamRequired("AccessControlMaxAgeSec")) - } - if s.Override == nil { - invalidParams.Add(request.NewErrParamRequired("Override")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessControlMaxAgeSec sets the AccessControlMaxAgeSec field's value. -func (s *ResponseHeadersPolicyStrictTransportSecurity) SetAccessControlMaxAgeSec(v int64) *ResponseHeadersPolicyStrictTransportSecurity { - s.AccessControlMaxAgeSec = &v - return s -} - -// SetIncludeSubdomains sets the IncludeSubdomains field's value. -func (s *ResponseHeadersPolicyStrictTransportSecurity) SetIncludeSubdomains(v bool) *ResponseHeadersPolicyStrictTransportSecurity { - s.IncludeSubdomains = &v - return s -} - -// SetOverride sets the Override field's value. -func (s *ResponseHeadersPolicyStrictTransportSecurity) SetOverride(v bool) *ResponseHeadersPolicyStrictTransportSecurity { - s.Override = &v - return s -} - -// SetPreload sets the Preload field's value. -func (s *ResponseHeadersPolicyStrictTransportSecurity) SetPreload(v bool) *ResponseHeadersPolicyStrictTransportSecurity { - s.Preload = &v - return s -} - -// Contains a response headers policy. -type ResponseHeadersPolicySummary struct { - _ struct{} `type:"structure"` - - // The response headers policy. - // - // ResponseHeadersPolicy is a required field - ResponseHeadersPolicy *ResponseHeadersPolicy `type:"structure" required:"true"` - - // The type of response headers policy, either managed (created by Amazon Web - // Services) or custom (created in this Amazon Web Services account). - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"ResponseHeadersPolicyType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResponseHeadersPolicySummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResponseHeadersPolicySummary) GoString() string { - return s.String() -} - -// SetResponseHeadersPolicy sets the ResponseHeadersPolicy field's value. -func (s *ResponseHeadersPolicySummary) SetResponseHeadersPolicy(v *ResponseHeadersPolicy) *ResponseHeadersPolicySummary { - s.ResponseHeadersPolicy = v - return s -} - -// SetType sets the Type field's value. -func (s *ResponseHeadersPolicySummary) SetType(v string) *ResponseHeadersPolicySummary { - s.Type = &v - return s -} - -// Determines whether CloudFront includes the X-XSS-Protection HTTP response -// header and the header's value. -// -// For more information about the X-XSS-Protection HTTP response header, see -// X-XSS-Protection (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection) -// in the MDN Web Docs. -type ResponseHeadersPolicyXSSProtection struct { - _ struct{} `type:"structure"` - - // A Boolean that determines whether CloudFront includes the mode=block directive - // in the X-XSS-Protection header. - // - // For more information about this directive, see X-XSS-Protection (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection) - // in the MDN Web Docs. - ModeBlock *bool `type:"boolean"` - - // A Boolean that determines whether CloudFront overrides the X-XSS-Protection - // HTTP response header received from the origin with the one specified in this - // response headers policy. - // - // Override is a required field - Override *bool `type:"boolean" required:"true"` - - // A Boolean that determines the value of the X-XSS-Protection HTTP response - // header. When this setting is true, the value of the X-XSS-Protection header - // is 1. When this setting is false, the value of the X-XSS-Protection header - // is 0. - // - // For more information about these settings, see X-XSS-Protection (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection) - // in the MDN Web Docs. - // - // Protection is a required field - Protection *bool `type:"boolean" required:"true"` - - // A reporting URI, which CloudFront uses as the value of the report directive - // in the X-XSS-Protection header. - // - // You cannot specify a ReportUri when ModeBlock is true. - // - // For more information about using a reporting URL, see X-XSS-Protection (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection) - // in the MDN Web Docs. - ReportUri *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 ResponseHeadersPolicyXSSProtection) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResponseHeadersPolicyXSSProtection) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResponseHeadersPolicyXSSProtection) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResponseHeadersPolicyXSSProtection"} - if s.Override == nil { - invalidParams.Add(request.NewErrParamRequired("Override")) - } - if s.Protection == nil { - invalidParams.Add(request.NewErrParamRequired("Protection")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetModeBlock sets the ModeBlock field's value. -func (s *ResponseHeadersPolicyXSSProtection) SetModeBlock(v bool) *ResponseHeadersPolicyXSSProtection { - s.ModeBlock = &v - return s -} - -// SetOverride sets the Override field's value. -func (s *ResponseHeadersPolicyXSSProtection) SetOverride(v bool) *ResponseHeadersPolicyXSSProtection { - s.Override = &v - return s -} - -// SetProtection sets the Protection field's value. -func (s *ResponseHeadersPolicyXSSProtection) SetProtection(v bool) *ResponseHeadersPolicyXSSProtection { - s.Protection = &v - return s -} - -// SetReportUri sets the ReportUri field's value. -func (s *ResponseHeadersPolicyXSSProtection) SetReportUri(v string) *ResponseHeadersPolicyXSSProtection { - s.ReportUri = &v - return s -} - -// A complex type that identifies ways in which you want to restrict distribution -// of your content. -type Restrictions struct { - _ struct{} `type:"structure"` - - // A complex type that controls the countries in which your content is distributed. - // CloudFront determines the location of your users using MaxMind GeoIP databases. - // - // GeoRestriction is a required field - GeoRestriction *GeoRestriction `type:"structure" 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 Restrictions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Restrictions) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Restrictions) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Restrictions"} - if s.GeoRestriction == nil { - invalidParams.Add(request.NewErrParamRequired("GeoRestriction")) - } - if s.GeoRestriction != nil { - if err := s.GeoRestriction.Validate(); err != nil { - invalidParams.AddNested("GeoRestriction", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGeoRestriction sets the GeoRestriction field's value. -func (s *Restrictions) SetGeoRestriction(v *GeoRestriction) *Restrictions { - s.GeoRestriction = v - return s -} - -// A complex type that contains information about the Amazon S3 bucket from -// which you want CloudFront to get your media files for distribution. -type S3Origin struct { - _ struct{} `type:"structure"` - - // The DNS name of the Amazon S3 origin. - // - // DomainName is a required field - DomainName *string `type:"string" required:"true"` - - // The CloudFront origin access identity to associate with the distribution. - // Use an origin access identity to configure the distribution so that end users - // can only access objects in an Amazon S3 bucket through CloudFront. - // - // If you want end users to be able to access objects using either the CloudFront - // URL or the Amazon S3 URL, specify an empty OriginAccessIdentity element. - // - // To delete the origin access identity from an existing distribution, update - // the distribution configuration and include an empty OriginAccessIdentity - // element. - // - // To replace the origin access identity, update the distribution configuration - // and specify the new origin access identity. - // - // For more information, see Using an Origin Access Identity to Restrict Access - // to Your Amazon S3 Content (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html) - // in the Amazon CloudFront Developer Guide. - // - // OriginAccessIdentity is a required field - OriginAccessIdentity *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 S3Origin) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s S3Origin) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *S3Origin) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "S3Origin"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - if s.OriginAccessIdentity == nil { - invalidParams.Add(request.NewErrParamRequired("OriginAccessIdentity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *S3Origin) SetDomainName(v string) *S3Origin { - s.DomainName = &v - return s -} - -// SetOriginAccessIdentity sets the OriginAccessIdentity field's value. -func (s *S3Origin) SetOriginAccessIdentity(v string) *S3Origin { - s.OriginAccessIdentity = &v - return s -} - -// A complex type that contains information about the Amazon S3 origin. If the -// origin is a custom origin or an S3 bucket that is configured as a website -// endpoint, use the CustomOriginConfig element instead. -type S3OriginConfig struct { - _ struct{} `type:"structure"` - - // - // If you're using origin access control (OAC) instead of origin access identity, - // specify an empty OriginAccessIdentity element. For more information, see - // Restricting access to an Amazon Web Services (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-origin.html) - // in the Amazon CloudFront Developer Guide. - // - // The CloudFront origin access identity to associate with the origin. Use an - // origin access identity to configure the origin so that viewers can only access - // objects in an Amazon S3 bucket through CloudFront. The format of the value - // is: - // - // origin-access-identity/cloudfront/ID-of-origin-access-identity - // - // The ID-of-origin-access-identity is the value that CloudFront returned in - // the ID element when you created the origin access identity. - // - // If you want viewers to be able to access objects using either the CloudFront - // URL or the Amazon S3 URL, specify an empty OriginAccessIdentity element. - // - // To delete the origin access identity from an existing distribution, update - // the distribution configuration and include an empty OriginAccessIdentity - // element. - // - // To replace the origin access identity, update the distribution configuration - // and specify the new origin access identity. - // - // For more information about the origin access identity, see Serving Private - // Content through CloudFront (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) - // in the Amazon CloudFront Developer Guide. - // - // OriginAccessIdentity is a required field - OriginAccessIdentity *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 S3OriginConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s S3OriginConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *S3OriginConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "S3OriginConfig"} - if s.OriginAccessIdentity == nil { - invalidParams.Add(request.NewErrParamRequired("OriginAccessIdentity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOriginAccessIdentity sets the OriginAccessIdentity field's value. -func (s *S3OriginConfig) SetOriginAccessIdentity(v string) *S3OriginConfig { - s.OriginAccessIdentity = &v - return s -} - -// Session stickiness provides the ability to define multiple requests from -// a single viewer as a single session. This prevents the potentially inconsistent -// experience of sending some of a given user's requests to your staging distribution, -// while others are sent to your primary distribution. Define the session duration -// using TTL values. -type SessionStickinessConfig struct { - _ struct{} `type:"structure"` - - // The amount of time after which you want sessions to cease if no requests - // are received. Allowed values are 300–3600 seconds (5–60 minutes). - // - // The value must be less than or equal to MaximumTTL. - // - // IdleTTL is a required field - IdleTTL *int64 `type:"integer" required:"true"` - - // The maximum amount of time to consider requests from the viewer as being - // part of the same session. Allowed values are 300–3600 seconds (5–60 minutes). - // - // The value must be greater than or equal to IdleTTL. - // - // MaximumTTL is a required field - MaximumTTL *int64 `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 SessionStickinessConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SessionStickinessConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SessionStickinessConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SessionStickinessConfig"} - if s.IdleTTL == nil { - invalidParams.Add(request.NewErrParamRequired("IdleTTL")) - } - if s.MaximumTTL == nil { - invalidParams.Add(request.NewErrParamRequired("MaximumTTL")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIdleTTL sets the IdleTTL field's value. -func (s *SessionStickinessConfig) SetIdleTTL(v int64) *SessionStickinessConfig { - s.IdleTTL = &v - return s -} - -// SetMaximumTTL sets the MaximumTTL field's value. -func (s *SessionStickinessConfig) SetMaximumTTL(v int64) *SessionStickinessConfig { - s.MaximumTTL = &v - return s -} - -// A list of Amazon Web Services accounts and the active CloudFront key pairs -// in each account that CloudFront can use to verify the signatures of signed -// URLs and signed cookies. -type Signer struct { - _ struct{} `type:"structure"` - - // An Amazon Web Services account number that contains active CloudFront key - // pairs that CloudFront can use to verify the signatures of signed URLs and - // signed cookies. If the Amazon Web Services account that owns the key pairs - // is the same account that owns the CloudFront distribution, the value of this - // field is self. - AwsAccountNumber *string `type:"string"` - - // A list of CloudFront key pair identifiers. - KeyPairIds *KeyPairIds `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 Signer) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Signer) GoString() string { - return s.String() -} - -// SetAwsAccountNumber sets the AwsAccountNumber field's value. -func (s *Signer) SetAwsAccountNumber(v string) *Signer { - s.AwsAccountNumber = &v - return s -} - -// SetKeyPairIds sets the KeyPairIds field's value. -func (s *Signer) SetKeyPairIds(v *KeyPairIds) *Signer { - s.KeyPairIds = v - return s -} - -// The CloudFront domain name of the staging distribution. -type StagingDistributionDnsNames struct { - _ struct{} `type:"structure"` - - // The CloudFront domain name of the staging distribution. - Items []*string `locationNameList:"DnsName" type:"list"` - - // The number of CloudFront domain names in your staging distribution. - // - // Quantity is a required field - Quantity *int64 `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 StagingDistributionDnsNames) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s StagingDistributionDnsNames) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StagingDistributionDnsNames) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StagingDistributionDnsNames"} - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *StagingDistributionDnsNames) SetItems(v []*string) *StagingDistributionDnsNames { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *StagingDistributionDnsNames) SetQuantity(v int64) *StagingDistributionDnsNames { - s.Quantity = &v - return s -} - -// A complex data type for the status codes that you specify that, when returned -// by a primary origin, trigger CloudFront to failover to a second origin. -type StatusCodes struct { - _ struct{} `type:"structure"` - - // The items (status codes) for an origin group. - // - // Items is a required field - Items []*int64 `locationNameList:"StatusCode" min:"1" type:"list" required:"true"` - - // The number of status codes. - // - // Quantity is a required field - Quantity *int64 `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 StatusCodes) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s StatusCodes) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StatusCodes) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StatusCodes"} - if s.Items == nil { - invalidParams.Add(request.NewErrParamRequired("Items")) - } - if s.Items != nil && len(s.Items) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Items", 1)) - } - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *StatusCodes) SetItems(v []*int64) *StatusCodes { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *StatusCodes) SetQuantity(v int64) *StatusCodes { - s.Quantity = &v - return s -} - -// A streaming distribution tells CloudFront where you want RTMP content to -// be delivered from, and the details about how to track and manage content -// delivery. -type StreamingDistribution struct { - _ struct{} `type:"structure"` - - // The ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, - // where 123456789012 is your Amazon Web Services account ID. - // - // ARN is a required field - ARN *string `type:"string" required:"true"` - - // A complex type that lists the Amazon Web Services accounts, if any, that - // you included in the TrustedSigners complex type for this distribution. These - // are the accounts that you want to allow to create signed URLs for private - // content. - // - // The Signer complex type lists the Amazon Web Services account number of the - // trusted signer or self if the signer is the Amazon Web Services account that - // created the distribution. The Signer element also includes the IDs of any - // active CloudFront key pairs that are associated with the trusted signer's - // Amazon Web Services account. If no KeyPairId element appears for a Signer, - // that signer can't create signed URLs. - // - // For more information, see Serving Private Content through CloudFront (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) - // in the Amazon CloudFront Developer Guide. - // - // ActiveTrustedSigners is a required field - ActiveTrustedSigners *ActiveTrustedSigners `type:"structure" required:"true"` - - // The domain name that corresponds to the streaming distribution, for example, - // s5c39gqb8ow64r.cloudfront.net. - // - // DomainName is a required field - DomainName *string `type:"string" required:"true"` - - // The identifier for the RTMP distribution. For example: EGTXBD79EXAMPLE. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The date and time that the distribution was last modified. - LastModifiedTime *time.Time `type:"timestamp"` - - // The current status of the RTMP distribution. When the status is Deployed, - // the distribution's information is propagated to all CloudFront edge locations. - // - // Status is a required field - Status *string `type:"string" required:"true"` - - // The current configuration information for the RTMP distribution. - // - // StreamingDistributionConfig is a required field - StreamingDistributionConfig *StreamingDistributionConfig `type:"structure" 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 StreamingDistribution) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s StreamingDistribution) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *StreamingDistribution) SetARN(v string) *StreamingDistribution { - s.ARN = &v - return s -} - -// SetActiveTrustedSigners sets the ActiveTrustedSigners field's value. -func (s *StreamingDistribution) SetActiveTrustedSigners(v *ActiveTrustedSigners) *StreamingDistribution { - s.ActiveTrustedSigners = v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *StreamingDistribution) SetDomainName(v string) *StreamingDistribution { - s.DomainName = &v - return s -} - -// SetId sets the Id field's value. -func (s *StreamingDistribution) SetId(v string) *StreamingDistribution { - s.Id = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *StreamingDistribution) SetLastModifiedTime(v time.Time) *StreamingDistribution { - s.LastModifiedTime = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *StreamingDistribution) SetStatus(v string) *StreamingDistribution { - s.Status = &v - return s -} - -// SetStreamingDistributionConfig sets the StreamingDistributionConfig field's value. -func (s *StreamingDistribution) SetStreamingDistributionConfig(v *StreamingDistributionConfig) *StreamingDistribution { - s.StreamingDistributionConfig = v - return s -} - -// The RTMP distribution's configuration information. -type StreamingDistributionConfig struct { - _ struct{} `type:"structure"` - - // A complex type that contains information about CNAMEs (alternate domain names), - // if any, for this streaming distribution. - Aliases *Aliases `type:"structure"` - - // A unique value (for example, a date-time stamp) that ensures that the request - // can't be replayed. - // - // If the value of CallerReference is new (regardless of the content of the - // StreamingDistributionConfig object), CloudFront creates a new distribution. - // - // If CallerReference is a value that you already sent in a previous request - // to create a distribution, CloudFront returns a DistributionAlreadyExists - // error. - // - // CallerReference is a required field - CallerReference *string `type:"string" required:"true"` - - // Any comments you want to include about the streaming distribution. - // - // Comment is a required field - Comment *string `type:"string" required:"true"` - - // Whether the streaming distribution is enabled to accept user requests for - // content. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` - - // A complex type that controls whether access logs are written for the streaming - // distribution. - Logging *StreamingLoggingConfig `type:"structure"` - - // A complex type that contains information about price class for this streaming - // distribution. - PriceClass *string `type:"string" enum:"PriceClass"` - - // A complex type that contains information about the Amazon S3 bucket from - // which you want CloudFront to get your media files for distribution. - // - // S3Origin is a required field - S3Origin *S3Origin `type:"structure" required:"true"` - - // A complex type that specifies any Amazon Web Services accounts that you want - // to permit to create signed URLs for private content. If you want the distribution - // to use signed URLs, include this element; if you want the distribution to - // use public URLs, remove this element. For more information, see Serving Private - // Content through CloudFront (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) - // in the Amazon CloudFront Developer Guide. - // - // TrustedSigners is a required field - TrustedSigners *TrustedSigners `type:"structure" 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 StreamingDistributionConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s StreamingDistributionConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StreamingDistributionConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StreamingDistributionConfig"} - if s.CallerReference == nil { - invalidParams.Add(request.NewErrParamRequired("CallerReference")) - } - if s.Comment == nil { - invalidParams.Add(request.NewErrParamRequired("Comment")) - } - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - if s.S3Origin == nil { - invalidParams.Add(request.NewErrParamRequired("S3Origin")) - } - if s.TrustedSigners == nil { - invalidParams.Add(request.NewErrParamRequired("TrustedSigners")) - } - if s.Aliases != nil { - if err := s.Aliases.Validate(); err != nil { - invalidParams.AddNested("Aliases", err.(request.ErrInvalidParams)) - } - } - if s.Logging != nil { - if err := s.Logging.Validate(); err != nil { - invalidParams.AddNested("Logging", err.(request.ErrInvalidParams)) - } - } - if s.S3Origin != nil { - if err := s.S3Origin.Validate(); err != nil { - invalidParams.AddNested("S3Origin", err.(request.ErrInvalidParams)) - } - } - if s.TrustedSigners != nil { - if err := s.TrustedSigners.Validate(); err != nil { - invalidParams.AddNested("TrustedSigners", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAliases sets the Aliases field's value. -func (s *StreamingDistributionConfig) SetAliases(v *Aliases) *StreamingDistributionConfig { - s.Aliases = v - return s -} - -// SetCallerReference sets the CallerReference field's value. -func (s *StreamingDistributionConfig) SetCallerReference(v string) *StreamingDistributionConfig { - s.CallerReference = &v - return s -} - -// SetComment sets the Comment field's value. -func (s *StreamingDistributionConfig) SetComment(v string) *StreamingDistributionConfig { - s.Comment = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *StreamingDistributionConfig) SetEnabled(v bool) *StreamingDistributionConfig { - s.Enabled = &v - return s -} - -// SetLogging sets the Logging field's value. -func (s *StreamingDistributionConfig) SetLogging(v *StreamingLoggingConfig) *StreamingDistributionConfig { - s.Logging = v - return s -} - -// SetPriceClass sets the PriceClass field's value. -func (s *StreamingDistributionConfig) SetPriceClass(v string) *StreamingDistributionConfig { - s.PriceClass = &v - return s -} - -// SetS3Origin sets the S3Origin field's value. -func (s *StreamingDistributionConfig) SetS3Origin(v *S3Origin) *StreamingDistributionConfig { - s.S3Origin = v - return s -} - -// SetTrustedSigners sets the TrustedSigners field's value. -func (s *StreamingDistributionConfig) SetTrustedSigners(v *TrustedSigners) *StreamingDistributionConfig { - s.TrustedSigners = v - return s -} - -// A streaming distribution Configuration and a list of tags to be associated -// with the streaming distribution. -type StreamingDistributionConfigWithTags struct { - _ struct{} `type:"structure"` - - // A streaming distribution Configuration. - // - // StreamingDistributionConfig is a required field - StreamingDistributionConfig *StreamingDistributionConfig `type:"structure" required:"true"` - - // A complex type that contains zero or more Tag elements. - // - // Tags is a required field - Tags *Tags `type:"structure" 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 StreamingDistributionConfigWithTags) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s StreamingDistributionConfigWithTags) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StreamingDistributionConfigWithTags) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StreamingDistributionConfigWithTags"} - if s.StreamingDistributionConfig == nil { - invalidParams.Add(request.NewErrParamRequired("StreamingDistributionConfig")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.StreamingDistributionConfig != nil { - if err := s.StreamingDistributionConfig.Validate(); err != nil { - invalidParams.AddNested("StreamingDistributionConfig", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - if err := s.Tags.Validate(); err != nil { - invalidParams.AddNested("Tags", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStreamingDistributionConfig sets the StreamingDistributionConfig field's value. -func (s *StreamingDistributionConfigWithTags) SetStreamingDistributionConfig(v *StreamingDistributionConfig) *StreamingDistributionConfigWithTags { - s.StreamingDistributionConfig = v - return s -} - -// SetTags sets the Tags field's value. -func (s *StreamingDistributionConfigWithTags) SetTags(v *Tags) *StreamingDistributionConfigWithTags { - s.Tags = v - return s -} - -// A streaming distribution list. -type StreamingDistributionList struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether more streaming distributions remain to be listed. - // If your results were truncated, you can make a follow-up pagination request - // using the Marker request parameter to retrieve more distributions in the - // list. - // - // IsTruncated is a required field - IsTruncated *bool `type:"boolean" required:"true"` - - // A complex type that contains one StreamingDistributionSummary element for - // each distribution that was created by the current Amazon Web Services account. - Items []*StreamingDistributionSummary `locationNameList:"StreamingDistributionSummary" type:"list"` - - // The value you provided for the Marker request parameter. - // - // Marker is a required field - Marker *string `type:"string" required:"true"` - - // The value you provided for the MaxItems request parameter. - // - // MaxItems is a required field - MaxItems *int64 `type:"integer" required:"true"` - - // If IsTruncated is true, this element is present and contains the value you - // can use for the Marker request parameter to continue listing your RTMP distributions - // where they left off. - NextMarker *string `type:"string"` - - // The number of streaming distributions that were created by the current Amazon - // Web Services account. - // - // Quantity is a required field - Quantity *int64 `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 StreamingDistributionList) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s StreamingDistributionList) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *StreamingDistributionList) SetIsTruncated(v bool) *StreamingDistributionList { - s.IsTruncated = &v - return s -} - -// SetItems sets the Items field's value. -func (s *StreamingDistributionList) SetItems(v []*StreamingDistributionSummary) *StreamingDistributionList { - s.Items = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *StreamingDistributionList) SetMarker(v string) *StreamingDistributionList { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *StreamingDistributionList) SetMaxItems(v int64) *StreamingDistributionList { - s.MaxItems = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *StreamingDistributionList) SetNextMarker(v string) *StreamingDistributionList { - s.NextMarker = &v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *StreamingDistributionList) SetQuantity(v int64) *StreamingDistributionList { - s.Quantity = &v - return s -} - -// A summary of the information for a CloudFront streaming distribution. -type StreamingDistributionSummary struct { - _ struct{} `type:"structure"` - - // The ARN (Amazon Resource Name) for the streaming distribution. For example: - // arn:aws:cloudfront::123456789012:streaming-distribution/EDFDVBD632BHDS5, - // where 123456789012 is your Amazon Web Services account ID. - // - // ARN is a required field - ARN *string `type:"string" required:"true"` - - // A complex type that contains information about CNAMEs (alternate domain names), - // if any, for this streaming distribution. - // - // Aliases is a required field - Aliases *Aliases `type:"structure" required:"true"` - - // The comment originally specified when this distribution was created. - // - // Comment is a required field - Comment *string `type:"string" required:"true"` - - // The domain name corresponding to the distribution, for example, d111111abcdef8.cloudfront.net. - // - // DomainName is a required field - DomainName *string `type:"string" required:"true"` - - // Whether the distribution is enabled to accept end user requests for content. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` - - // The identifier for the distribution, for example, EDFDVBD632BHDS5. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The date and time the distribution was last modified. - // - // LastModifiedTime is a required field - LastModifiedTime *time.Time `type:"timestamp" required:"true"` - - // A complex type that contains information about price class for this streaming - // distribution. - // - // PriceClass is a required field - PriceClass *string `type:"string" required:"true" enum:"PriceClass"` - - // A complex type that contains information about the Amazon S3 bucket from - // which you want CloudFront to get your media files for distribution. - // - // S3Origin is a required field - S3Origin *S3Origin `type:"structure" required:"true"` - - // Indicates the current status of the distribution. When the status is Deployed, - // the distribution's information is fully propagated throughout the Amazon - // CloudFront system. - // - // Status is a required field - Status *string `type:"string" required:"true"` - - // A complex type that specifies the Amazon Web Services accounts, if any, that - // you want to allow to create signed URLs for private content. If you want - // to require signed URLs in requests for objects in the target origin that - // match the PathPattern for this cache behavior, specify true for Enabled, - // and specify the applicable values for Quantity and Items.If you don't want - // to require signed URLs in requests for objects that match PathPattern, specify - // false for Enabled and 0 for Quantity. Omit Items. To add, change, or remove - // one or more trusted signers, change Enabled to true (if it's currently false), - // change Quantity as applicable, and specify all of the trusted signers that - // you want to include in the updated distribution. - // - // For more information, see Serving Private Content through CloudFront (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) - // in the Amazon CloudFront Developer Guide. - // - // TrustedSigners is a required field - TrustedSigners *TrustedSigners `type:"structure" 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 StreamingDistributionSummary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s StreamingDistributionSummary) GoString() string { - return s.String() -} - -// SetARN sets the ARN field's value. -func (s *StreamingDistributionSummary) SetARN(v string) *StreamingDistributionSummary { - s.ARN = &v - return s -} - -// SetAliases sets the Aliases field's value. -func (s *StreamingDistributionSummary) SetAliases(v *Aliases) *StreamingDistributionSummary { - s.Aliases = v - return s -} - -// SetComment sets the Comment field's value. -func (s *StreamingDistributionSummary) SetComment(v string) *StreamingDistributionSummary { - s.Comment = &v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *StreamingDistributionSummary) SetDomainName(v string) *StreamingDistributionSummary { - s.DomainName = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *StreamingDistributionSummary) SetEnabled(v bool) *StreamingDistributionSummary { - s.Enabled = &v - return s -} - -// SetId sets the Id field's value. -func (s *StreamingDistributionSummary) SetId(v string) *StreamingDistributionSummary { - s.Id = &v - return s -} - -// SetLastModifiedTime sets the LastModifiedTime field's value. -func (s *StreamingDistributionSummary) SetLastModifiedTime(v time.Time) *StreamingDistributionSummary { - s.LastModifiedTime = &v - return s -} - -// SetPriceClass sets the PriceClass field's value. -func (s *StreamingDistributionSummary) SetPriceClass(v string) *StreamingDistributionSummary { - s.PriceClass = &v - return s -} - -// SetS3Origin sets the S3Origin field's value. -func (s *StreamingDistributionSummary) SetS3Origin(v *S3Origin) *StreamingDistributionSummary { - s.S3Origin = v - return s -} - -// SetStatus sets the Status field's value. -func (s *StreamingDistributionSummary) SetStatus(v string) *StreamingDistributionSummary { - s.Status = &v - return s -} - -// SetTrustedSigners sets the TrustedSigners field's value. -func (s *StreamingDistributionSummary) SetTrustedSigners(v *TrustedSigners) *StreamingDistributionSummary { - s.TrustedSigners = v - return s -} - -// A complex type that controls whether access logs are written for this streaming -// distribution. -type StreamingLoggingConfig struct { - _ struct{} `type:"structure"` - - // The Amazon S3 bucket to store the access logs in, for example, myawslogbucket.s3.amazonaws.com. - // - // Bucket is a required field - Bucket *string `type:"string" required:"true"` - - // Specifies whether you want CloudFront to save access logs to an Amazon S3 - // bucket. If you don't want to enable logging when you create a streaming distribution - // or if you want to disable logging for an existing streaming distribution, - // specify false for Enabled, and specify empty Bucket and Prefix elements. - // If you specify false for Enabled but you specify values for Bucket and Prefix, - // the values are automatically deleted. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` - - // An optional string that you want CloudFront to prefix to the access log filenames - // for this streaming distribution, for example, myprefix/. If you want to enable - // logging, but you don't want to specify a prefix, you still must include an - // empty Prefix element in the Logging element. - // - // Prefix is a required field - Prefix *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 StreamingLoggingConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s StreamingLoggingConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StreamingLoggingConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StreamingLoggingConfig"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - if s.Prefix == nil { - invalidParams.Add(request.NewErrParamRequired("Prefix")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *StreamingLoggingConfig) SetBucket(v string) *StreamingLoggingConfig { - s.Bucket = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *StreamingLoggingConfig) SetEnabled(v bool) *StreamingLoggingConfig { - s.Enabled = &v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *StreamingLoggingConfig) SetPrefix(v string) *StreamingLoggingConfig { - s.Prefix = &v - return s -} - -// A complex type that contains Tag key and Tag value. -type Tag struct { - _ struct{} `type:"structure"` - - // A string that contains Tag key. - // - // The string length should be between 1 and 128 characters. Valid characters - // include a-z, A-Z, 0-9, space, and the special characters _ - . : / = + @. - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // A string that contains an optional Tag value. - // - // The string length should be between 0 and 256 characters. Valid characters - // include a-z, A-Z, 0-9, space, and the special characters _ - . : / = + @. - 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 -} - -// A complex type that contains zero or more Tag elements. -type TagKeys struct { - _ struct{} `type:"structure"` - - // A complex type that contains Tag key elements. - Items []*string `locationNameList:"Key" 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 TagKeys) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagKeys) GoString() string { - return s.String() -} - -// SetItems sets the Items field's value. -func (s *TagKeys) SetItems(v []*string) *TagKeys { - s.Items = v - return s -} - -// The request to add tags to a CloudFront resource. -type TagResourceInput struct { - _ struct{} `locationName:"TagResourceRequest" type:"structure" payload:"Tags"` - - // An ARN of a CloudFront resource. - // - // Resource is a required field - Resource *string `location:"querystring" locationName:"Resource" type:"string" required:"true"` - - // A complex type that contains zero or more Tag elements. - // - // Tags is a required field - Tags *Tags `locationName:"Tags" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API 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.Resource == nil { - invalidParams.Add(request.NewErrParamRequired("Resource")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil { - if err := s.Tags.Validate(); err != nil { - invalidParams.AddNested("Tags", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResource sets the Resource field's value. -func (s *TagResourceInput) SetResource(v string) *TagResourceInput { - s.Resource = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagResourceInput) SetTags(v *Tags) *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() -} - -// A complex type that contains zero or more Tag elements. -type Tags struct { - _ struct{} `type:"structure"` - - // A complex type that contains Tag elements. - Items []*Tag `locationNameList:"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 Tags) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Tags) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tags) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tags"} - if s.Items != nil { - for i, v := range s.Items { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetItems sets the Items field's value. -func (s *Tags) SetItems(v []*Tag) *Tags { - s.Items = v - return s -} - -type TestFunctionInput struct { - _ struct{} `locationName:"TestFunctionRequest" type:"structure" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` - - // The event object to test the function with. For more information about the - // structure of the event object, see Testing functions (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/managing-functions.html#test-function) - // in the Amazon CloudFront Developer Guide. - // - // EventObject is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by TestFunctionInput's - // String and GoString methods. - // - // EventObject is automatically base64 encoded/decoded by the SDK. - // - // EventObject is a required field - EventObject []byte `type:"blob" required:"true" sensitive:"true"` - - // The current version (ETag value) of the function that you are testing, which - // you can get using DescribeFunction. - // - // IfMatch is a required field - IfMatch *string `location:"header" locationName:"If-Match" type:"string" required:"true"` - - // The name of the function that you are testing. - // - // Name is a required field - Name *string `location:"uri" locationName:"Name" type:"string" required:"true"` - - // The stage of the function that you are testing, either DEVELOPMENT or LIVE. - Stage *string `type:"string" enum:"FunctionStage"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TestFunctionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TestFunctionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TestFunctionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TestFunctionInput"} - if s.EventObject == nil { - invalidParams.Add(request.NewErrParamRequired("EventObject")) - } - if s.IfMatch == nil { - invalidParams.Add(request.NewErrParamRequired("IfMatch")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEventObject sets the EventObject field's value. -func (s *TestFunctionInput) SetEventObject(v []byte) *TestFunctionInput { - s.EventObject = v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *TestFunctionInput) SetIfMatch(v string) *TestFunctionInput { - s.IfMatch = &v - return s -} - -// SetName sets the Name field's value. -func (s *TestFunctionInput) SetName(v string) *TestFunctionInput { - s.Name = &v - return s -} - -// SetStage sets the Stage field's value. -func (s *TestFunctionInput) SetStage(v string) *TestFunctionInput { - s.Stage = &v - return s -} - -type TestFunctionOutput struct { - _ struct{} `type:"structure" payload:"TestResult"` - - // An object that represents the result of running the function with the provided - // event object. - TestResult *TestResult `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 TestFunctionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TestFunctionOutput) GoString() string { - return s.String() -} - -// SetTestResult sets the TestResult field's value. -func (s *TestFunctionOutput) SetTestResult(v *TestResult) *TestFunctionOutput { - s.TestResult = v - return s -} - -// Contains the result of testing a CloudFront function with TestFunction. -type TestResult struct { - _ struct{} `type:"structure"` - - // The amount of time that the function took to run as a percentage of the maximum - // allowed time. For example, a compute utilization of 35 means that the function - // completed in 35% of the maximum allowed time. - ComputeUtilization *string `type:"string"` - - // If the result of testing the function was an error, this field contains the - // error message. - // - // FunctionErrorMessage is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by TestResult's - // String and GoString methods. - FunctionErrorMessage *string `type:"string" sensitive:"true"` - - // Contains the log lines that the function wrote (if any) when running the - // test. - // - // FunctionExecutionLogs is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by TestResult's - // String and GoString methods. - FunctionExecutionLogs []*string `type:"list" sensitive:"true"` - - // The event object returned by the function. For more information about the - // structure of the event object, see Event object structure (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/functions-event-structure.html) - // in the Amazon CloudFront Developer Guide. - // - // FunctionOutput is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by TestResult's - // String and GoString methods. - FunctionOutput *string `type:"string" sensitive:"true"` - - // Contains configuration information and metadata about the CloudFront function - // that was tested. - FunctionSummary *FunctionSummary `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 TestResult) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TestResult) GoString() string { - return s.String() -} - -// SetComputeUtilization sets the ComputeUtilization field's value. -func (s *TestResult) SetComputeUtilization(v string) *TestResult { - s.ComputeUtilization = &v - return s -} - -// SetFunctionErrorMessage sets the FunctionErrorMessage field's value. -func (s *TestResult) SetFunctionErrorMessage(v string) *TestResult { - s.FunctionErrorMessage = &v - return s -} - -// SetFunctionExecutionLogs sets the FunctionExecutionLogs field's value. -func (s *TestResult) SetFunctionExecutionLogs(v []*string) *TestResult { - s.FunctionExecutionLogs = v - return s -} - -// SetFunctionOutput sets the FunctionOutput field's value. -func (s *TestResult) SetFunctionOutput(v string) *TestResult { - s.FunctionOutput = &v - return s -} - -// SetFunctionSummary sets the FunctionSummary field's value. -func (s *TestResult) SetFunctionSummary(v *FunctionSummary) *TestResult { - s.FunctionSummary = v - return s -} - -// The traffic configuration of your continuous deployment. -type TrafficConfig struct { - _ struct{} `type:"structure"` - - // Determines which HTTP requests are sent to the staging distribution. - SingleHeaderConfig *ContinuousDeploymentSingleHeaderConfig `type:"structure"` - - // Contains the percentage of traffic to send to the staging distribution. - SingleWeightConfig *ContinuousDeploymentSingleWeightConfig `type:"structure"` - - // The type of traffic configuration. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"ContinuousDeploymentPolicyType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TrafficConfig) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TrafficConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TrafficConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TrafficConfig"} - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.SingleHeaderConfig != nil { - if err := s.SingleHeaderConfig.Validate(); err != nil { - invalidParams.AddNested("SingleHeaderConfig", err.(request.ErrInvalidParams)) - } - } - if s.SingleWeightConfig != nil { - if err := s.SingleWeightConfig.Validate(); err != nil { - invalidParams.AddNested("SingleWeightConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSingleHeaderConfig sets the SingleHeaderConfig field's value. -func (s *TrafficConfig) SetSingleHeaderConfig(v *ContinuousDeploymentSingleHeaderConfig) *TrafficConfig { - s.SingleHeaderConfig = v - return s -} - -// SetSingleWeightConfig sets the SingleWeightConfig field's value. -func (s *TrafficConfig) SetSingleWeightConfig(v *ContinuousDeploymentSingleWeightConfig) *TrafficConfig { - s.SingleWeightConfig = v - return s -} - -// SetType sets the Type field's value. -func (s *TrafficConfig) SetType(v string) *TrafficConfig { - s.Type = &v - return s -} - -// A list of key groups whose public keys CloudFront can use to verify the signatures -// of signed URLs and signed cookies. -type TrustedKeyGroups struct { - _ struct{} `type:"structure"` - - // This field is true if any of the key groups in the list have public keys - // that CloudFront can use to verify the signatures of signed URLs and signed - // cookies. If not, this field is false. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` - - // A list of key groups identifiers. - Items []*string `locationNameList:"KeyGroup" type:"list"` - - // The number of key groups in the list. - // - // Quantity is a required field - Quantity *int64 `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 TrustedKeyGroups) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TrustedKeyGroups) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TrustedKeyGroups) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TrustedKeyGroups"} - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnabled sets the Enabled field's value. -func (s *TrustedKeyGroups) SetEnabled(v bool) *TrustedKeyGroups { - s.Enabled = &v - return s -} - -// SetItems sets the Items field's value. -func (s *TrustedKeyGroups) SetItems(v []*string) *TrustedKeyGroups { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *TrustedKeyGroups) SetQuantity(v int64) *TrustedKeyGroups { - s.Quantity = &v - return s -} - -// A list of Amazon Web Services accounts whose public keys CloudFront can use -// to verify the signatures of signed URLs and signed cookies. -type TrustedSigners struct { - _ struct{} `type:"structure"` - - // This field is true if any of the Amazon Web Services accounts in the list - // are configured as trusted signers. If not, this field is false. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` - - // A list of Amazon Web Services account identifiers. - Items []*string `locationNameList:"AwsAccountNumber" type:"list"` - - // The number of Amazon Web Services accounts in the list. - // - // Quantity is a required field - Quantity *int64 `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 TrustedSigners) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TrustedSigners) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TrustedSigners) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TrustedSigners"} - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - if s.Quantity == nil { - invalidParams.Add(request.NewErrParamRequired("Quantity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnabled sets the Enabled field's value. -func (s *TrustedSigners) SetEnabled(v bool) *TrustedSigners { - s.Enabled = &v - return s -} - -// SetItems sets the Items field's value. -func (s *TrustedSigners) SetItems(v []*string) *TrustedSigners { - s.Items = v - return s -} - -// SetQuantity sets the Quantity field's value. -func (s *TrustedSigners) SetQuantity(v int64) *TrustedSigners { - s.Quantity = &v - return s -} - -// The request to remove tags from a CloudFront resource. -type UntagResourceInput struct { - _ struct{} `locationName:"UntagResourceRequest" type:"structure" payload:"TagKeys"` - - // An ARN of a CloudFront resource. - // - // Resource is a required field - Resource *string `location:"querystring" locationName:"Resource" type:"string" required:"true"` - - // A complex type that contains zero or more Tag key elements. - // - // TagKeys is a required field - TagKeys *TagKeys `locationName:"TagKeys" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API 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.Resource == nil { - invalidParams.Add(request.NewErrParamRequired("Resource")) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResource sets the Resource field's value. -func (s *UntagResourceInput) SetResource(v string) *UntagResourceInput { - s.Resource = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagResourceInput) SetTagKeys(v *TagKeys) *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 UpdateCachePolicyInput struct { - _ struct{} `locationName:"UpdateCachePolicyRequest" type:"structure" payload:"CachePolicyConfig"` - - // A cache policy configuration. - // - // CachePolicyConfig is a required field - CachePolicyConfig *CachePolicyConfig `locationName:"CachePolicyConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` - - // The unique identifier for the cache policy that you are updating. The identifier - // is returned in a cache behavior's CachePolicyId field in the response to - // GetDistributionConfig. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The version of the cache policy that you are updating. The version is returned - // in the cache policy's ETag field in the response to GetCachePolicyConfig. - IfMatch *string `location:"header" locationName:"If-Match" 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 UpdateCachePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateCachePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateCachePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateCachePolicyInput"} - if s.CachePolicyConfig == nil { - invalidParams.Add(request.NewErrParamRequired("CachePolicyConfig")) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.CachePolicyConfig != nil { - if err := s.CachePolicyConfig.Validate(); err != nil { - invalidParams.AddNested("CachePolicyConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCachePolicyConfig sets the CachePolicyConfig field's value. -func (s *UpdateCachePolicyInput) SetCachePolicyConfig(v *CachePolicyConfig) *UpdateCachePolicyInput { - s.CachePolicyConfig = v - return s -} - -// SetId sets the Id field's value. -func (s *UpdateCachePolicyInput) SetId(v string) *UpdateCachePolicyInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *UpdateCachePolicyInput) SetIfMatch(v string) *UpdateCachePolicyInput { - s.IfMatch = &v - return s -} - -type UpdateCachePolicyOutput struct { - _ struct{} `type:"structure" payload:"CachePolicy"` - - // A cache policy. - CachePolicy *CachePolicy `type:"structure"` - - // The current version of the cache policy. - ETag *string `location:"header" locationName:"ETag" 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 UpdateCachePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateCachePolicyOutput) GoString() string { - return s.String() -} - -// SetCachePolicy sets the CachePolicy field's value. -func (s *UpdateCachePolicyOutput) SetCachePolicy(v *CachePolicy) *UpdateCachePolicyOutput { - s.CachePolicy = v - return s -} - -// SetETag sets the ETag field's value. -func (s *UpdateCachePolicyOutput) SetETag(v string) *UpdateCachePolicyOutput { - s.ETag = &v - return s -} - -// The request to update an origin access identity. -type UpdateCloudFrontOriginAccessIdentityInput struct { - _ struct{} `locationName:"UpdateCloudFrontOriginAccessIdentityRequest" type:"structure" payload:"CloudFrontOriginAccessIdentityConfig"` - - // The identity's configuration information. - // - // CloudFrontOriginAccessIdentityConfig is a required field - CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `locationName:"CloudFrontOriginAccessIdentityConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` - - // The identity's id. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The value of the ETag header that you received when retrieving the identity's - // configuration. For example: E2QWRUHAPOMQZL. - IfMatch *string `location:"header" locationName:"If-Match" 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 UpdateCloudFrontOriginAccessIdentityInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateCloudFrontOriginAccessIdentityInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateCloudFrontOriginAccessIdentityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateCloudFrontOriginAccessIdentityInput"} - if s.CloudFrontOriginAccessIdentityConfig == nil { - invalidParams.Add(request.NewErrParamRequired("CloudFrontOriginAccessIdentityConfig")) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.CloudFrontOriginAccessIdentityConfig != nil { - if err := s.CloudFrontOriginAccessIdentityConfig.Validate(); err != nil { - invalidParams.AddNested("CloudFrontOriginAccessIdentityConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCloudFrontOriginAccessIdentityConfig sets the CloudFrontOriginAccessIdentityConfig field's value. -func (s *UpdateCloudFrontOriginAccessIdentityInput) SetCloudFrontOriginAccessIdentityConfig(v *OriginAccessIdentityConfig) *UpdateCloudFrontOriginAccessIdentityInput { - s.CloudFrontOriginAccessIdentityConfig = v - return s -} - -// SetId sets the Id field's value. -func (s *UpdateCloudFrontOriginAccessIdentityInput) SetId(v string) *UpdateCloudFrontOriginAccessIdentityInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *UpdateCloudFrontOriginAccessIdentityInput) SetIfMatch(v string) *UpdateCloudFrontOriginAccessIdentityInput { - s.IfMatch = &v - return s -} - -// The returned result of the corresponding request. -type UpdateCloudFrontOriginAccessIdentityOutput struct { - _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentity"` - - // The origin access identity's information. - CloudFrontOriginAccessIdentity *OriginAccessIdentity `type:"structure"` - - // The current version of the configuration. For example: E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" 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 UpdateCloudFrontOriginAccessIdentityOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateCloudFrontOriginAccessIdentityOutput) GoString() string { - return s.String() -} - -// SetCloudFrontOriginAccessIdentity sets the CloudFrontOriginAccessIdentity field's value. -func (s *UpdateCloudFrontOriginAccessIdentityOutput) SetCloudFrontOriginAccessIdentity(v *OriginAccessIdentity) *UpdateCloudFrontOriginAccessIdentityOutput { - s.CloudFrontOriginAccessIdentity = v - return s -} - -// SetETag sets the ETag field's value. -func (s *UpdateCloudFrontOriginAccessIdentityOutput) SetETag(v string) *UpdateCloudFrontOriginAccessIdentityOutput { - s.ETag = &v - return s -} - -type UpdateContinuousDeploymentPolicyInput struct { - _ struct{} `locationName:"UpdateContinuousDeploymentPolicyRequest" type:"structure" payload:"ContinuousDeploymentPolicyConfig"` - - // The continuous deployment policy configuration. - // - // ContinuousDeploymentPolicyConfig is a required field - ContinuousDeploymentPolicyConfig *ContinuousDeploymentPolicyConfig `locationName:"ContinuousDeploymentPolicyConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` - - // The identifier of the continuous deployment policy that you are updating. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The current version (ETag value) of the continuous deployment policy that - // you are updating. - IfMatch *string `location:"header" locationName:"If-Match" 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 UpdateContinuousDeploymentPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateContinuousDeploymentPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateContinuousDeploymentPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateContinuousDeploymentPolicyInput"} - if s.ContinuousDeploymentPolicyConfig == nil { - invalidParams.Add(request.NewErrParamRequired("ContinuousDeploymentPolicyConfig")) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.ContinuousDeploymentPolicyConfig != nil { - if err := s.ContinuousDeploymentPolicyConfig.Validate(); err != nil { - invalidParams.AddNested("ContinuousDeploymentPolicyConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContinuousDeploymentPolicyConfig sets the ContinuousDeploymentPolicyConfig field's value. -func (s *UpdateContinuousDeploymentPolicyInput) SetContinuousDeploymentPolicyConfig(v *ContinuousDeploymentPolicyConfig) *UpdateContinuousDeploymentPolicyInput { - s.ContinuousDeploymentPolicyConfig = v - return s -} - -// SetId sets the Id field's value. -func (s *UpdateContinuousDeploymentPolicyInput) SetId(v string) *UpdateContinuousDeploymentPolicyInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *UpdateContinuousDeploymentPolicyInput) SetIfMatch(v string) *UpdateContinuousDeploymentPolicyInput { - s.IfMatch = &v - return s -} - -type UpdateContinuousDeploymentPolicyOutput struct { - _ struct{} `type:"structure" payload:"ContinuousDeploymentPolicy"` - - // A continuous deployment policy. - ContinuousDeploymentPolicy *ContinuousDeploymentPolicy `type:"structure"` - - // The version identifier for the current version of the continuous deployment - // policy. - ETag *string `location:"header" locationName:"ETag" 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 UpdateContinuousDeploymentPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateContinuousDeploymentPolicyOutput) GoString() string { - return s.String() -} - -// SetContinuousDeploymentPolicy sets the ContinuousDeploymentPolicy field's value. -func (s *UpdateContinuousDeploymentPolicyOutput) SetContinuousDeploymentPolicy(v *ContinuousDeploymentPolicy) *UpdateContinuousDeploymentPolicyOutput { - s.ContinuousDeploymentPolicy = v - return s -} - -// SetETag sets the ETag field's value. -func (s *UpdateContinuousDeploymentPolicyOutput) SetETag(v string) *UpdateContinuousDeploymentPolicyOutput { - s.ETag = &v - return s -} - -// The request to update a distribution. -type UpdateDistributionInput struct { - _ struct{} `locationName:"UpdateDistributionRequest" type:"structure" payload:"DistributionConfig"` - - // The distribution's configuration information. - // - // DistributionConfig is a required field - DistributionConfig *DistributionConfig `locationName:"DistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` - - // The distribution's id. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The value of the ETag header that you received when retrieving the distribution's - // configuration. For example: E2QWRUHAPOMQZL. - IfMatch *string `location:"header" locationName:"If-Match" 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 UpdateDistributionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateDistributionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateDistributionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateDistributionInput"} - if s.DistributionConfig == nil { - invalidParams.Add(request.NewErrParamRequired("DistributionConfig")) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.DistributionConfig != nil { - if err := s.DistributionConfig.Validate(); err != nil { - invalidParams.AddNested("DistributionConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDistributionConfig sets the DistributionConfig field's value. -func (s *UpdateDistributionInput) SetDistributionConfig(v *DistributionConfig) *UpdateDistributionInput { - s.DistributionConfig = v - return s -} - -// SetId sets the Id field's value. -func (s *UpdateDistributionInput) SetId(v string) *UpdateDistributionInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *UpdateDistributionInput) SetIfMatch(v string) *UpdateDistributionInput { - s.IfMatch = &v - return s -} - -// The returned result of the corresponding request. -type UpdateDistributionOutput struct { - _ struct{} `type:"structure" payload:"Distribution"` - - // The distribution's information. - Distribution *Distribution `type:"structure"` - - // The current version of the configuration. For example: E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" 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 UpdateDistributionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateDistributionOutput) GoString() string { - return s.String() -} - -// SetDistribution sets the Distribution field's value. -func (s *UpdateDistributionOutput) SetDistribution(v *Distribution) *UpdateDistributionOutput { - s.Distribution = v - return s -} - -// SetETag sets the ETag field's value. -func (s *UpdateDistributionOutput) SetETag(v string) *UpdateDistributionOutput { - s.ETag = &v - return s -} - -type UpdateDistributionWithStagingConfigInput struct { - _ struct{} `locationName:"UpdateDistributionWithStagingConfigRequest" type:"structure"` - - // The identifier of the primary distribution to which you are copying a staging - // distribution's configuration. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The current versions (ETag values) of both primary and staging distributions. - // Provide these in the following format: - // - // , - IfMatch *string `location:"header" locationName:"If-Match" type:"string"` - - // The identifier of the staging distribution whose configuration you are copying - // to the primary distribution. - StagingDistributionId *string `location:"querystring" locationName:"StagingDistributionId" 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 UpdateDistributionWithStagingConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateDistributionWithStagingConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateDistributionWithStagingConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateDistributionWithStagingConfigInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *UpdateDistributionWithStagingConfigInput) SetId(v string) *UpdateDistributionWithStagingConfigInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *UpdateDistributionWithStagingConfigInput) SetIfMatch(v string) *UpdateDistributionWithStagingConfigInput { - s.IfMatch = &v - return s -} - -// SetStagingDistributionId sets the StagingDistributionId field's value. -func (s *UpdateDistributionWithStagingConfigInput) SetStagingDistributionId(v string) *UpdateDistributionWithStagingConfigInput { - s.StagingDistributionId = &v - return s -} - -type UpdateDistributionWithStagingConfigOutput struct { - _ struct{} `type:"structure" payload:"Distribution"` - - // A distribution tells CloudFront where you want content to be delivered from, - // and the details about how to track and manage content delivery. - Distribution *Distribution `type:"structure"` - - // The current version of the primary distribution (after it's updated). - ETag *string `location:"header" locationName:"ETag" 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 UpdateDistributionWithStagingConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateDistributionWithStagingConfigOutput) GoString() string { - return s.String() -} - -// SetDistribution sets the Distribution field's value. -func (s *UpdateDistributionWithStagingConfigOutput) SetDistribution(v *Distribution) *UpdateDistributionWithStagingConfigOutput { - s.Distribution = v - return s -} - -// SetETag sets the ETag field's value. -func (s *UpdateDistributionWithStagingConfigOutput) SetETag(v string) *UpdateDistributionWithStagingConfigOutput { - s.ETag = &v - return s -} - -type UpdateFieldLevelEncryptionConfigInput struct { - _ struct{} `locationName:"UpdateFieldLevelEncryptionConfigRequest" type:"structure" payload:"FieldLevelEncryptionConfig"` - - // Request to update a field-level encryption configuration. - // - // FieldLevelEncryptionConfig is a required field - FieldLevelEncryptionConfig *FieldLevelEncryptionConfig `locationName:"FieldLevelEncryptionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` - - // The ID of the configuration you want to update. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The value of the ETag header that you received when retrieving the configuration - // identity to update. For example: E2QWRUHAPOMQZL. - IfMatch *string `location:"header" locationName:"If-Match" 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 UpdateFieldLevelEncryptionConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateFieldLevelEncryptionConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateFieldLevelEncryptionConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateFieldLevelEncryptionConfigInput"} - if s.FieldLevelEncryptionConfig == nil { - invalidParams.Add(request.NewErrParamRequired("FieldLevelEncryptionConfig")) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.FieldLevelEncryptionConfig != nil { - if err := s.FieldLevelEncryptionConfig.Validate(); err != nil { - invalidParams.AddNested("FieldLevelEncryptionConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFieldLevelEncryptionConfig sets the FieldLevelEncryptionConfig field's value. -func (s *UpdateFieldLevelEncryptionConfigInput) SetFieldLevelEncryptionConfig(v *FieldLevelEncryptionConfig) *UpdateFieldLevelEncryptionConfigInput { - s.FieldLevelEncryptionConfig = v - return s -} - -// SetId sets the Id field's value. -func (s *UpdateFieldLevelEncryptionConfigInput) SetId(v string) *UpdateFieldLevelEncryptionConfigInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *UpdateFieldLevelEncryptionConfigInput) SetIfMatch(v string) *UpdateFieldLevelEncryptionConfigInput { - s.IfMatch = &v - return s -} - -type UpdateFieldLevelEncryptionConfigOutput struct { - _ struct{} `type:"structure" payload:"FieldLevelEncryption"` - - // The value of the ETag header that you received when updating the configuration. - // For example: E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // Return the results of updating the configuration. - FieldLevelEncryption *FieldLevelEncryption `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 UpdateFieldLevelEncryptionConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateFieldLevelEncryptionConfigOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *UpdateFieldLevelEncryptionConfigOutput) SetETag(v string) *UpdateFieldLevelEncryptionConfigOutput { - s.ETag = &v - return s -} - -// SetFieldLevelEncryption sets the FieldLevelEncryption field's value. -func (s *UpdateFieldLevelEncryptionConfigOutput) SetFieldLevelEncryption(v *FieldLevelEncryption) *UpdateFieldLevelEncryptionConfigOutput { - s.FieldLevelEncryption = v - return s -} - -type UpdateFieldLevelEncryptionProfileInput struct { - _ struct{} `locationName:"UpdateFieldLevelEncryptionProfileRequest" type:"structure" payload:"FieldLevelEncryptionProfileConfig"` - - // Request to update a field-level encryption profile. - // - // FieldLevelEncryptionProfileConfig is a required field - FieldLevelEncryptionProfileConfig *FieldLevelEncryptionProfileConfig `locationName:"FieldLevelEncryptionProfileConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` - - // The ID of the field-level encryption profile request. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The value of the ETag header that you received when retrieving the profile - // identity to update. For example: E2QWRUHAPOMQZL. - IfMatch *string `location:"header" locationName:"If-Match" 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 UpdateFieldLevelEncryptionProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateFieldLevelEncryptionProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateFieldLevelEncryptionProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateFieldLevelEncryptionProfileInput"} - if s.FieldLevelEncryptionProfileConfig == nil { - invalidParams.Add(request.NewErrParamRequired("FieldLevelEncryptionProfileConfig")) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.FieldLevelEncryptionProfileConfig != nil { - if err := s.FieldLevelEncryptionProfileConfig.Validate(); err != nil { - invalidParams.AddNested("FieldLevelEncryptionProfileConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFieldLevelEncryptionProfileConfig sets the FieldLevelEncryptionProfileConfig field's value. -func (s *UpdateFieldLevelEncryptionProfileInput) SetFieldLevelEncryptionProfileConfig(v *FieldLevelEncryptionProfileConfig) *UpdateFieldLevelEncryptionProfileInput { - s.FieldLevelEncryptionProfileConfig = v - return s -} - -// SetId sets the Id field's value. -func (s *UpdateFieldLevelEncryptionProfileInput) SetId(v string) *UpdateFieldLevelEncryptionProfileInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *UpdateFieldLevelEncryptionProfileInput) SetIfMatch(v string) *UpdateFieldLevelEncryptionProfileInput { - s.IfMatch = &v - return s -} - -type UpdateFieldLevelEncryptionProfileOutput struct { - _ struct{} `type:"structure" payload:"FieldLevelEncryptionProfile"` - - // The result of the field-level encryption profile request. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // Return the results of updating the profile. - FieldLevelEncryptionProfile *FieldLevelEncryptionProfile `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 UpdateFieldLevelEncryptionProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateFieldLevelEncryptionProfileOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *UpdateFieldLevelEncryptionProfileOutput) SetETag(v string) *UpdateFieldLevelEncryptionProfileOutput { - s.ETag = &v - return s -} - -// SetFieldLevelEncryptionProfile sets the FieldLevelEncryptionProfile field's value. -func (s *UpdateFieldLevelEncryptionProfileOutput) SetFieldLevelEncryptionProfile(v *FieldLevelEncryptionProfile) *UpdateFieldLevelEncryptionProfileOutput { - s.FieldLevelEncryptionProfile = v - return s -} - -type UpdateFunctionInput struct { - _ struct{} `locationName:"UpdateFunctionRequest" type:"structure" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` - - // The function code. For more information about writing a CloudFront function, - // see Writing function code for CloudFront Functions (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/writing-function-code.html) - // in the Amazon CloudFront Developer Guide. - // - // FunctionCode is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by UpdateFunctionInput's - // String and GoString methods. - // - // FunctionCode is automatically base64 encoded/decoded by the SDK. - // - // FunctionCode is a required field - FunctionCode []byte `min:"1" type:"blob" required:"true" sensitive:"true"` - - // Configuration information about the function. - // - // FunctionConfig is a required field - FunctionConfig *FunctionConfig `type:"structure" required:"true"` - - // The current version (ETag value) of the function that you are updating, which - // you can get using DescribeFunction. - // - // IfMatch is a required field - IfMatch *string `location:"header" locationName:"If-Match" type:"string" required:"true"` - - // The name of the function that you are updating. - // - // Name is a required field - Name *string `location:"uri" locationName:"Name" 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 UpdateFunctionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateFunctionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateFunctionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateFunctionInput"} - if s.FunctionCode == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionCode")) - } - if s.FunctionCode != nil && len(s.FunctionCode) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FunctionCode", 1)) - } - if s.FunctionConfig == nil { - invalidParams.Add(request.NewErrParamRequired("FunctionConfig")) - } - if s.IfMatch == nil { - invalidParams.Add(request.NewErrParamRequired("IfMatch")) - } - 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.FunctionConfig != nil { - if err := s.FunctionConfig.Validate(); err != nil { - invalidParams.AddNested("FunctionConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFunctionCode sets the FunctionCode field's value. -func (s *UpdateFunctionInput) SetFunctionCode(v []byte) *UpdateFunctionInput { - s.FunctionCode = v - return s -} - -// SetFunctionConfig sets the FunctionConfig field's value. -func (s *UpdateFunctionInput) SetFunctionConfig(v *FunctionConfig) *UpdateFunctionInput { - s.FunctionConfig = v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *UpdateFunctionInput) SetIfMatch(v string) *UpdateFunctionInput { - s.IfMatch = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateFunctionInput) SetName(v string) *UpdateFunctionInput { - s.Name = &v - return s -} - -type UpdateFunctionOutput struct { - _ struct{} `type:"structure" payload:"FunctionSummary"` - - // The version identifier for the current version of the CloudFront function. - ETag *string `location:"header" locationName:"ETtag" type:"string"` - - // Contains configuration information and metadata about a CloudFront function. - FunctionSummary *FunctionSummary `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 UpdateFunctionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateFunctionOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *UpdateFunctionOutput) SetETag(v string) *UpdateFunctionOutput { - s.ETag = &v - return s -} - -// SetFunctionSummary sets the FunctionSummary field's value. -func (s *UpdateFunctionOutput) SetFunctionSummary(v *FunctionSummary) *UpdateFunctionOutput { - s.FunctionSummary = v - return s -} - -type UpdateKeyGroupInput struct { - _ struct{} `locationName:"UpdateKeyGroupRequest" type:"structure" payload:"KeyGroupConfig"` - - // The identifier of the key group that you are updating. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The version of the key group that you are updating. The version is the key - // group's ETag value. - IfMatch *string `location:"header" locationName:"If-Match" type:"string"` - - // The key group configuration. - // - // KeyGroupConfig is a required field - KeyGroupConfig *KeyGroupConfig `locationName:"KeyGroupConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateKeyGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateKeyGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateKeyGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateKeyGroupInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.KeyGroupConfig == nil { - invalidParams.Add(request.NewErrParamRequired("KeyGroupConfig")) - } - if s.KeyGroupConfig != nil { - if err := s.KeyGroupConfig.Validate(); err != nil { - invalidParams.AddNested("KeyGroupConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *UpdateKeyGroupInput) SetId(v string) *UpdateKeyGroupInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *UpdateKeyGroupInput) SetIfMatch(v string) *UpdateKeyGroupInput { - s.IfMatch = &v - return s -} - -// SetKeyGroupConfig sets the KeyGroupConfig field's value. -func (s *UpdateKeyGroupInput) SetKeyGroupConfig(v *KeyGroupConfig) *UpdateKeyGroupInput { - s.KeyGroupConfig = v - return s -} - -type UpdateKeyGroupOutput struct { - _ struct{} `type:"structure" payload:"KeyGroup"` - - // The identifier for this version of the key group. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The key group that was just updated. - KeyGroup *KeyGroup `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 UpdateKeyGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateKeyGroupOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *UpdateKeyGroupOutput) SetETag(v string) *UpdateKeyGroupOutput { - s.ETag = &v - return s -} - -// SetKeyGroup sets the KeyGroup field's value. -func (s *UpdateKeyGroupOutput) SetKeyGroup(v *KeyGroup) *UpdateKeyGroupOutput { - s.KeyGroup = v - return s -} - -type UpdateKeyValueStoreInput struct { - _ struct{} `locationName:"UpdateKeyValueStoreRequest" type:"structure" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` - - // The comment of the key value store to update. - // - // Comment is a required field - Comment *string `type:"string" required:"true"` - - // The key value store to update, if a match occurs. - // - // IfMatch is a required field - IfMatch *string `location:"header" locationName:"If-Match" type:"string" required:"true"` - - // The name of the key value store to update. - // - // Name is a required field - Name *string `location:"uri" locationName:"Name" 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 UpdateKeyValueStoreInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateKeyValueStoreInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateKeyValueStoreInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateKeyValueStoreInput"} - if s.Comment == nil { - invalidParams.Add(request.NewErrParamRequired("Comment")) - } - if s.IfMatch == nil { - invalidParams.Add(request.NewErrParamRequired("IfMatch")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetComment sets the Comment field's value. -func (s *UpdateKeyValueStoreInput) SetComment(v string) *UpdateKeyValueStoreInput { - s.Comment = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *UpdateKeyValueStoreInput) SetIfMatch(v string) *UpdateKeyValueStoreInput { - s.IfMatch = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateKeyValueStoreInput) SetName(v string) *UpdateKeyValueStoreInput { - s.Name = &v - return s -} - -type UpdateKeyValueStoreOutput struct { - _ struct{} `type:"structure" payload:"KeyValueStore"` - - // The ETag of the resulting key value store. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The resulting key value store to update. - KeyValueStore *KeyValueStore `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 UpdateKeyValueStoreOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateKeyValueStoreOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *UpdateKeyValueStoreOutput) SetETag(v string) *UpdateKeyValueStoreOutput { - s.ETag = &v - return s -} - -// SetKeyValueStore sets the KeyValueStore field's value. -func (s *UpdateKeyValueStoreOutput) SetKeyValueStore(v *KeyValueStore) *UpdateKeyValueStoreOutput { - s.KeyValueStore = v - return s -} - -type UpdateOriginAccessControlInput struct { - _ struct{} `locationName:"UpdateOriginAccessControlRequest" type:"structure" payload:"OriginAccessControlConfig"` - - // The unique identifier of the origin access control that you are updating. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The current version (ETag value) of the origin access control that you are - // updating. - IfMatch *string `location:"header" locationName:"If-Match" type:"string"` - - // An origin access control. - // - // OriginAccessControlConfig is a required field - OriginAccessControlConfig *OriginAccessControlConfig `locationName:"OriginAccessControlConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateOriginAccessControlInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateOriginAccessControlInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateOriginAccessControlInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateOriginAccessControlInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.OriginAccessControlConfig == nil { - invalidParams.Add(request.NewErrParamRequired("OriginAccessControlConfig")) - } - if s.OriginAccessControlConfig != nil { - if err := s.OriginAccessControlConfig.Validate(); err != nil { - invalidParams.AddNested("OriginAccessControlConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *UpdateOriginAccessControlInput) SetId(v string) *UpdateOriginAccessControlInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *UpdateOriginAccessControlInput) SetIfMatch(v string) *UpdateOriginAccessControlInput { - s.IfMatch = &v - return s -} - -// SetOriginAccessControlConfig sets the OriginAccessControlConfig field's value. -func (s *UpdateOriginAccessControlInput) SetOriginAccessControlConfig(v *OriginAccessControlConfig) *UpdateOriginAccessControlInput { - s.OriginAccessControlConfig = v - return s -} - -type UpdateOriginAccessControlOutput struct { - _ struct{} `type:"structure" payload:"OriginAccessControl"` - - // The new version of the origin access control after it has been updated. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The origin access control after it has been updated. - OriginAccessControl *OriginAccessControl `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 UpdateOriginAccessControlOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateOriginAccessControlOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *UpdateOriginAccessControlOutput) SetETag(v string) *UpdateOriginAccessControlOutput { - s.ETag = &v - return s -} - -// SetOriginAccessControl sets the OriginAccessControl field's value. -func (s *UpdateOriginAccessControlOutput) SetOriginAccessControl(v *OriginAccessControl) *UpdateOriginAccessControlOutput { - s.OriginAccessControl = v - return s -} - -type UpdateOriginRequestPolicyInput struct { - _ struct{} `locationName:"UpdateOriginRequestPolicyRequest" type:"structure" payload:"OriginRequestPolicyConfig"` - - // The unique identifier for the origin request policy that you are updating. - // The identifier is returned in a cache behavior's OriginRequestPolicyId field - // in the response to GetDistributionConfig. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The version of the origin request policy that you are updating. The version - // is returned in the origin request policy's ETag field in the response to - // GetOriginRequestPolicyConfig. - IfMatch *string `location:"header" locationName:"If-Match" type:"string"` - - // An origin request policy configuration. - // - // OriginRequestPolicyConfig is a required field - OriginRequestPolicyConfig *OriginRequestPolicyConfig `locationName:"OriginRequestPolicyConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateOriginRequestPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateOriginRequestPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateOriginRequestPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateOriginRequestPolicyInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.OriginRequestPolicyConfig == nil { - invalidParams.Add(request.NewErrParamRequired("OriginRequestPolicyConfig")) - } - if s.OriginRequestPolicyConfig != nil { - if err := s.OriginRequestPolicyConfig.Validate(); err != nil { - invalidParams.AddNested("OriginRequestPolicyConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *UpdateOriginRequestPolicyInput) SetId(v string) *UpdateOriginRequestPolicyInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *UpdateOriginRequestPolicyInput) SetIfMatch(v string) *UpdateOriginRequestPolicyInput { - s.IfMatch = &v - return s -} - -// SetOriginRequestPolicyConfig sets the OriginRequestPolicyConfig field's value. -func (s *UpdateOriginRequestPolicyInput) SetOriginRequestPolicyConfig(v *OriginRequestPolicyConfig) *UpdateOriginRequestPolicyInput { - s.OriginRequestPolicyConfig = v - return s -} - -type UpdateOriginRequestPolicyOutput struct { - _ struct{} `type:"structure" payload:"OriginRequestPolicy"` - - // The current version of the origin request policy. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // An origin request policy. - OriginRequestPolicy *OriginRequestPolicy `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 UpdateOriginRequestPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateOriginRequestPolicyOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *UpdateOriginRequestPolicyOutput) SetETag(v string) *UpdateOriginRequestPolicyOutput { - s.ETag = &v - return s -} - -// SetOriginRequestPolicy sets the OriginRequestPolicy field's value. -func (s *UpdateOriginRequestPolicyOutput) SetOriginRequestPolicy(v *OriginRequestPolicy) *UpdateOriginRequestPolicyOutput { - s.OriginRequestPolicy = v - return s -} - -type UpdatePublicKeyInput struct { - _ struct{} `locationName:"UpdatePublicKeyRequest" type:"structure" payload:"PublicKeyConfig"` - - // The identifier of the public key that you are updating. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The value of the ETag header that you received when retrieving the public - // key to update. For example: E2QWRUHAPOMQZL. - IfMatch *string `location:"header" locationName:"If-Match" type:"string"` - - // A public key configuration. - // - // PublicKeyConfig is a required field - PublicKeyConfig *PublicKeyConfig `locationName:"PublicKeyConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdatePublicKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdatePublicKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdatePublicKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdatePublicKeyInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.PublicKeyConfig == nil { - invalidParams.Add(request.NewErrParamRequired("PublicKeyConfig")) - } - if s.PublicKeyConfig != nil { - if err := s.PublicKeyConfig.Validate(); err != nil { - invalidParams.AddNested("PublicKeyConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *UpdatePublicKeyInput) SetId(v string) *UpdatePublicKeyInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *UpdatePublicKeyInput) SetIfMatch(v string) *UpdatePublicKeyInput { - s.IfMatch = &v - return s -} - -// SetPublicKeyConfig sets the PublicKeyConfig field's value. -func (s *UpdatePublicKeyInput) SetPublicKeyConfig(v *PublicKeyConfig) *UpdatePublicKeyInput { - s.PublicKeyConfig = v - return s -} - -type UpdatePublicKeyOutput struct { - _ struct{} `type:"structure" payload:"PublicKey"` - - // The identifier of the current version of the public key. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The public key. - PublicKey *PublicKey `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 UpdatePublicKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdatePublicKeyOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *UpdatePublicKeyOutput) SetETag(v string) *UpdatePublicKeyOutput { - s.ETag = &v - return s -} - -// SetPublicKey sets the PublicKey field's value. -func (s *UpdatePublicKeyOutput) SetPublicKey(v *PublicKey) *UpdatePublicKeyOutput { - s.PublicKey = v - return s -} - -type UpdateRealtimeLogConfigInput struct { - _ struct{} `locationName:"UpdateRealtimeLogConfigRequest" type:"structure" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` - - // The Amazon Resource Name (ARN) for this real-time log configuration. - ARN *string `type:"string"` - - // Contains information about the Amazon Kinesis data stream where you are sending - // real-time log data. - EndPoints []*EndPoint `type:"list"` - - // A list of fields to include in each real-time log record. - // - // For more information about fields, see Real-time log configuration fields - // (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html#understand-real-time-log-config-fields) - // in the Amazon CloudFront Developer Guide. - Fields []*string `locationNameList:"Field" type:"list"` - - // The name for this real-time log configuration. - Name *string `type:"string"` - - // The sampling rate for this real-time log configuration. The sampling rate - // determines the percentage of viewer requests that are represented in the - // real-time log data. You must provide an integer between 1 and 100, inclusive. - SamplingRate *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 UpdateRealtimeLogConfigInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateRealtimeLogConfigInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateRealtimeLogConfigInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateRealtimeLogConfigInput"} - if s.EndPoints != nil { - for i, v := range s.EndPoints { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "EndPoints", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetARN sets the ARN field's value. -func (s *UpdateRealtimeLogConfigInput) SetARN(v string) *UpdateRealtimeLogConfigInput { - s.ARN = &v - return s -} - -// SetEndPoints sets the EndPoints field's value. -func (s *UpdateRealtimeLogConfigInput) SetEndPoints(v []*EndPoint) *UpdateRealtimeLogConfigInput { - s.EndPoints = v - return s -} - -// SetFields sets the Fields field's value. -func (s *UpdateRealtimeLogConfigInput) SetFields(v []*string) *UpdateRealtimeLogConfigInput { - s.Fields = v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateRealtimeLogConfigInput) SetName(v string) *UpdateRealtimeLogConfigInput { - s.Name = &v - return s -} - -// SetSamplingRate sets the SamplingRate field's value. -func (s *UpdateRealtimeLogConfigInput) SetSamplingRate(v int64) *UpdateRealtimeLogConfigInput { - s.SamplingRate = &v - return s -} - -type UpdateRealtimeLogConfigOutput struct { - _ struct{} `type:"structure"` - - // A real-time log configuration. - RealtimeLogConfig *RealtimeLogConfig `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 UpdateRealtimeLogConfigOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateRealtimeLogConfigOutput) GoString() string { - return s.String() -} - -// SetRealtimeLogConfig sets the RealtimeLogConfig field's value. -func (s *UpdateRealtimeLogConfigOutput) SetRealtimeLogConfig(v *RealtimeLogConfig) *UpdateRealtimeLogConfigOutput { - s.RealtimeLogConfig = v - return s -} - -type UpdateResponseHeadersPolicyInput struct { - _ struct{} `locationName:"UpdateResponseHeadersPolicyRequest" type:"structure" payload:"ResponseHeadersPolicyConfig"` - - // The identifier for the response headers policy that you are updating. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The version of the response headers policy that you are updating. - // - // The version is returned in the cache policy's ETag field in the response - // to GetResponseHeadersPolicyConfig. - IfMatch *string `location:"header" locationName:"If-Match" type:"string"` - - // A response headers policy configuration. - // - // ResponseHeadersPolicyConfig is a required field - ResponseHeadersPolicyConfig *ResponseHeadersPolicyConfig `locationName:"ResponseHeadersPolicyConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateResponseHeadersPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateResponseHeadersPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateResponseHeadersPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateResponseHeadersPolicyInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.ResponseHeadersPolicyConfig == nil { - invalidParams.Add(request.NewErrParamRequired("ResponseHeadersPolicyConfig")) - } - if s.ResponseHeadersPolicyConfig != nil { - if err := s.ResponseHeadersPolicyConfig.Validate(); err != nil { - invalidParams.AddNested("ResponseHeadersPolicyConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *UpdateResponseHeadersPolicyInput) SetId(v string) *UpdateResponseHeadersPolicyInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *UpdateResponseHeadersPolicyInput) SetIfMatch(v string) *UpdateResponseHeadersPolicyInput { - s.IfMatch = &v - return s -} - -// SetResponseHeadersPolicyConfig sets the ResponseHeadersPolicyConfig field's value. -func (s *UpdateResponseHeadersPolicyInput) SetResponseHeadersPolicyConfig(v *ResponseHeadersPolicyConfig) *UpdateResponseHeadersPolicyInput { - s.ResponseHeadersPolicyConfig = v - return s -} - -type UpdateResponseHeadersPolicyOutput struct { - _ struct{} `type:"structure" payload:"ResponseHeadersPolicy"` - - // The current version of the response headers policy. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // A response headers policy. - ResponseHeadersPolicy *ResponseHeadersPolicy `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 UpdateResponseHeadersPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateResponseHeadersPolicyOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *UpdateResponseHeadersPolicyOutput) SetETag(v string) *UpdateResponseHeadersPolicyOutput { - s.ETag = &v - return s -} - -// SetResponseHeadersPolicy sets the ResponseHeadersPolicy field's value. -func (s *UpdateResponseHeadersPolicyOutput) SetResponseHeadersPolicy(v *ResponseHeadersPolicy) *UpdateResponseHeadersPolicyOutput { - s.ResponseHeadersPolicy = v - return s -} - -// The request to update a streaming distribution. -type UpdateStreamingDistributionInput struct { - _ struct{} `locationName:"UpdateStreamingDistributionRequest" type:"structure" payload:"StreamingDistributionConfig"` - - // The streaming distribution's id. - // - // Id is a required field - Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` - - // The value of the ETag header that you received when retrieving the streaming - // distribution's configuration. For example: E2QWRUHAPOMQZL. - IfMatch *string `location:"header" locationName:"If-Match" type:"string"` - - // The streaming distribution's configuration information. - // - // StreamingDistributionConfig is a required field - StreamingDistributionConfig *StreamingDistributionConfig `locationName:"StreamingDistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2020-05-31/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateStreamingDistributionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateStreamingDistributionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateStreamingDistributionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateStreamingDistributionInput"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Id != nil && len(*s.Id) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Id", 1)) - } - if s.StreamingDistributionConfig == nil { - invalidParams.Add(request.NewErrParamRequired("StreamingDistributionConfig")) - } - if s.StreamingDistributionConfig != nil { - if err := s.StreamingDistributionConfig.Validate(); err != nil { - invalidParams.AddNested("StreamingDistributionConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetId sets the Id field's value. -func (s *UpdateStreamingDistributionInput) SetId(v string) *UpdateStreamingDistributionInput { - s.Id = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *UpdateStreamingDistributionInput) SetIfMatch(v string) *UpdateStreamingDistributionInput { - s.IfMatch = &v - return s -} - -// SetStreamingDistributionConfig sets the StreamingDistributionConfig field's value. -func (s *UpdateStreamingDistributionInput) SetStreamingDistributionConfig(v *StreamingDistributionConfig) *UpdateStreamingDistributionInput { - s.StreamingDistributionConfig = v - return s -} - -// The returned result of the corresponding request. -type UpdateStreamingDistributionOutput struct { - _ struct{} `type:"structure" payload:"StreamingDistribution"` - - // The current version of the configuration. For example: E2QWRUHAPOMQZL. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // The streaming distribution's information. - StreamingDistribution *StreamingDistribution `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 UpdateStreamingDistributionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateStreamingDistributionOutput) GoString() string { - return s.String() -} - -// SetETag sets the ETag field's value. -func (s *UpdateStreamingDistributionOutput) SetETag(v string) *UpdateStreamingDistributionOutput { - s.ETag = &v - return s -} - -// SetStreamingDistribution sets the StreamingDistribution field's value. -func (s *UpdateStreamingDistributionOutput) SetStreamingDistribution(v *StreamingDistribution) *UpdateStreamingDistributionOutput { - s.StreamingDistribution = v - return s -} - -// A complex type that determines the distribution's SSL/TLS configuration for -// communicating with viewers. -// -// If the distribution doesn't use Aliases (also known as alternate domain names -// or CNAMEs)—that is, if the distribution uses the CloudFront domain name -// such as d111111abcdef8.cloudfront.net—set CloudFrontDefaultCertificate -// to true and leave all other fields empty. -// -// If the distribution uses Aliases (alternate domain names or CNAMEs), use -// the fields in this type to specify the following settings: -// -// - Which viewers the distribution accepts HTTPS connections from: only -// viewers that support server name indication (SNI) (https://en.wikipedia.org/wiki/Server_Name_Indication) -// (recommended), or all viewers including those that don't support SNI. -// To accept HTTPS connections from only viewers that support SNI, set SSLSupportMethod -// to sni-only. This is recommended. Most browsers and clients support SNI. -// To accept HTTPS connections from all viewers, including those that don't -// support SNI, set SSLSupportMethod to vip. This is not recommended, and -// results in additional monthly charges from CloudFront. -// -// - The minimum SSL/TLS protocol version that the distribution can use to -// communicate with viewers. To specify a minimum version, choose a value -// for MinimumProtocolVersion. For more information, see Security Policy -// (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValues-security-policy) -// in the Amazon CloudFront Developer Guide. -// -// - The location of the SSL/TLS certificate, Certificate Manager (ACM) (https://docs.aws.amazon.com/acm/latest/userguide/acm-overview.html) -// (recommended) or Identity and Access Management (IAM) (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html). -// You specify the location by setting a value in one of the following fields -// (not both): ACMCertificateArn IAMCertificateId -// -// All distributions support HTTPS connections from viewers. To require viewers -// to use HTTPS only, or to redirect them from HTTP to HTTPS, use ViewerProtocolPolicy -// in the CacheBehavior or DefaultCacheBehavior. To specify how CloudFront should -// use SSL/TLS to communicate with your custom origin, use CustomOriginConfig. -// -// For more information, see Using HTTPS with CloudFront (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-https.html) -// and Using Alternate Domain Names and HTTPS (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-https-alternate-domain-names.html) -// in the Amazon CloudFront Developer Guide. -type ViewerCertificate struct { - _ struct{} `type:"structure"` - - // If the distribution uses Aliases (alternate domain names or CNAMEs) and the - // SSL/TLS certificate is stored in Certificate Manager (ACM) (https://docs.aws.amazon.com/acm/latest/userguide/acm-overview.html), - // provide the Amazon Resource Name (ARN) of the ACM certificate. CloudFront - // only supports ACM certificates in the US East (N. Virginia) Region (us-east-1). - // - // If you specify an ACM certificate ARN, you must also specify values for MinimumProtocolVersion - // and SSLSupportMethod. - ACMCertificateArn *string `type:"string"` - - // This field is deprecated. Use one of the following fields instead: - // - // * ACMCertificateArn - // - // * IAMCertificateId - // - // * CloudFrontDefaultCertificate - // - // Deprecated: Certificate has been deprecated - Certificate *string `deprecated:"true" type:"string"` - - // This field is deprecated. Use one of the following fields instead: - // - // * ACMCertificateArn - // - // * IAMCertificateId - // - // * CloudFrontDefaultCertificate - // - // Deprecated: CertificateSource has been deprecated - CertificateSource *string `deprecated:"true" type:"string" enum:"CertificateSource"` - - // If the distribution uses the CloudFront domain name such as d111111abcdef8.cloudfront.net, - // set this field to true. - // - // If the distribution uses Aliases (alternate domain names or CNAMEs), set - // this field to false and specify values for the following fields: - // - // * ACMCertificateArn or IAMCertificateId (specify a value for one, not - // both) - // - // * MinimumProtocolVersion - // - // * SSLSupportMethod - CloudFrontDefaultCertificate *bool `type:"boolean"` - - // If the distribution uses Aliases (alternate domain names or CNAMEs) and the - // SSL/TLS certificate is stored in Identity and Access Management (IAM) (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html), - // provide the ID of the IAM certificate. - // - // If you specify an IAM certificate ID, you must also specify values for MinimumProtocolVersion - // and SSLSupportMethod. - IAMCertificateId *string `type:"string"` - - // If the distribution uses Aliases (alternate domain names or CNAMEs), specify - // the security policy that you want CloudFront to use for HTTPS connections - // with viewers. The security policy determines two settings: - // - // * The minimum SSL/TLS protocol that CloudFront can use to communicate - // with viewers. - // - // * The ciphers that CloudFront can use to encrypt the content that it returns - // to viewers. - // - // For more information, see Security Policy (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValues-security-policy) - // and Supported Protocols and Ciphers Between Viewers and CloudFront (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/secure-connections-supported-viewer-protocols-ciphers.html#secure-connections-supported-ciphers) - // in the Amazon CloudFront Developer Guide. - // - // On the CloudFront console, this setting is called Security Policy. - // - // When you're using SNI only (you set SSLSupportMethod to sni-only), you must - // specify TLSv1 or higher. - // - // If the distribution uses the CloudFront domain name such as d111111abcdef8.cloudfront.net - // (you set CloudFrontDefaultCertificate to true), CloudFront automatically - // sets the security policy to TLSv1 regardless of the value that you set here. - MinimumProtocolVersion *string `type:"string" enum:"MinimumProtocolVersion"` - - // If the distribution uses Aliases (alternate domain names or CNAMEs), specify - // which viewers the distribution accepts HTTPS connections from. - // - // * sni-only – The distribution accepts HTTPS connections from only viewers - // that support server name indication (SNI) (https://en.wikipedia.org/wiki/Server_Name_Indication). - // This is recommended. Most browsers and clients support SNI. - // - // * vip – The distribution accepts HTTPS connections from all viewers - // including those that don't support SNI. This is not recommended, and results - // in additional monthly charges from CloudFront. - // - // * static-ip - Do not specify this value unless your distribution has been - // enabled for this feature by the CloudFront team. If you have a use case - // that requires static IP addresses for a distribution, contact CloudFront - // through the Amazon Web Services Support Center (https://console.aws.amazon.com/support/home). - // - // If the distribution uses the CloudFront domain name such as d111111abcdef8.cloudfront.net, - // don't set a value for this field. - SSLSupportMethod *string `type:"string" enum:"SSLSupportMethod"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ViewerCertificate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ViewerCertificate) GoString() string { - return s.String() -} - -// SetACMCertificateArn sets the ACMCertificateArn field's value. -func (s *ViewerCertificate) SetACMCertificateArn(v string) *ViewerCertificate { - s.ACMCertificateArn = &v - return s -} - -// SetCertificate sets the Certificate field's value. -func (s *ViewerCertificate) SetCertificate(v string) *ViewerCertificate { - s.Certificate = &v - return s -} - -// SetCertificateSource sets the CertificateSource field's value. -func (s *ViewerCertificate) SetCertificateSource(v string) *ViewerCertificate { - s.CertificateSource = &v - return s -} - -// SetCloudFrontDefaultCertificate sets the CloudFrontDefaultCertificate field's value. -func (s *ViewerCertificate) SetCloudFrontDefaultCertificate(v bool) *ViewerCertificate { - s.CloudFrontDefaultCertificate = &v - return s -} - -// SetIAMCertificateId sets the IAMCertificateId field's value. -func (s *ViewerCertificate) SetIAMCertificateId(v string) *ViewerCertificate { - s.IAMCertificateId = &v - return s -} - -// SetMinimumProtocolVersion sets the MinimumProtocolVersion field's value. -func (s *ViewerCertificate) SetMinimumProtocolVersion(v string) *ViewerCertificate { - s.MinimumProtocolVersion = &v - return s -} - -// SetSSLSupportMethod sets the SSLSupportMethod field's value. -func (s *ViewerCertificate) SetSSLSupportMethod(v string) *ViewerCertificate { - s.SSLSupportMethod = &v - return s -} - -const ( - // CachePolicyCookieBehaviorNone is a CachePolicyCookieBehavior enum value - CachePolicyCookieBehaviorNone = "none" - - // CachePolicyCookieBehaviorWhitelist is a CachePolicyCookieBehavior enum value - CachePolicyCookieBehaviorWhitelist = "whitelist" - - // CachePolicyCookieBehaviorAllExcept is a CachePolicyCookieBehavior enum value - CachePolicyCookieBehaviorAllExcept = "allExcept" - - // CachePolicyCookieBehaviorAll is a CachePolicyCookieBehavior enum value - CachePolicyCookieBehaviorAll = "all" -) - -// CachePolicyCookieBehavior_Values returns all elements of the CachePolicyCookieBehavior enum -func CachePolicyCookieBehavior_Values() []string { - return []string{ - CachePolicyCookieBehaviorNone, - CachePolicyCookieBehaviorWhitelist, - CachePolicyCookieBehaviorAllExcept, - CachePolicyCookieBehaviorAll, - } -} - -const ( - // CachePolicyHeaderBehaviorNone is a CachePolicyHeaderBehavior enum value - CachePolicyHeaderBehaviorNone = "none" - - // CachePolicyHeaderBehaviorWhitelist is a CachePolicyHeaderBehavior enum value - CachePolicyHeaderBehaviorWhitelist = "whitelist" -) - -// CachePolicyHeaderBehavior_Values returns all elements of the CachePolicyHeaderBehavior enum -func CachePolicyHeaderBehavior_Values() []string { - return []string{ - CachePolicyHeaderBehaviorNone, - CachePolicyHeaderBehaviorWhitelist, - } -} - -const ( - // CachePolicyQueryStringBehaviorNone is a CachePolicyQueryStringBehavior enum value - CachePolicyQueryStringBehaviorNone = "none" - - // CachePolicyQueryStringBehaviorWhitelist is a CachePolicyQueryStringBehavior enum value - CachePolicyQueryStringBehaviorWhitelist = "whitelist" - - // CachePolicyQueryStringBehaviorAllExcept is a CachePolicyQueryStringBehavior enum value - CachePolicyQueryStringBehaviorAllExcept = "allExcept" - - // CachePolicyQueryStringBehaviorAll is a CachePolicyQueryStringBehavior enum value - CachePolicyQueryStringBehaviorAll = "all" -) - -// CachePolicyQueryStringBehavior_Values returns all elements of the CachePolicyQueryStringBehavior enum -func CachePolicyQueryStringBehavior_Values() []string { - return []string{ - CachePolicyQueryStringBehaviorNone, - CachePolicyQueryStringBehaviorWhitelist, - CachePolicyQueryStringBehaviorAllExcept, - CachePolicyQueryStringBehaviorAll, - } -} - -const ( - // CachePolicyTypeManaged is a CachePolicyType enum value - CachePolicyTypeManaged = "managed" - - // CachePolicyTypeCustom is a CachePolicyType enum value - CachePolicyTypeCustom = "custom" -) - -// CachePolicyType_Values returns all elements of the CachePolicyType enum -func CachePolicyType_Values() []string { - return []string{ - CachePolicyTypeManaged, - CachePolicyTypeCustom, - } -} - -const ( - // CertificateSourceCloudfront is a CertificateSource enum value - CertificateSourceCloudfront = "cloudfront" - - // CertificateSourceIam is a CertificateSource enum value - CertificateSourceIam = "iam" - - // CertificateSourceAcm is a CertificateSource enum value - CertificateSourceAcm = "acm" -) - -// CertificateSource_Values returns all elements of the CertificateSource enum -func CertificateSource_Values() []string { - return []string{ - CertificateSourceCloudfront, - CertificateSourceIam, - CertificateSourceAcm, - } -} - -const ( - // ContinuousDeploymentPolicyTypeSingleWeight is a ContinuousDeploymentPolicyType enum value - ContinuousDeploymentPolicyTypeSingleWeight = "SingleWeight" - - // ContinuousDeploymentPolicyTypeSingleHeader is a ContinuousDeploymentPolicyType enum value - ContinuousDeploymentPolicyTypeSingleHeader = "SingleHeader" -) - -// ContinuousDeploymentPolicyType_Values returns all elements of the ContinuousDeploymentPolicyType enum -func ContinuousDeploymentPolicyType_Values() []string { - return []string{ - ContinuousDeploymentPolicyTypeSingleWeight, - ContinuousDeploymentPolicyTypeSingleHeader, - } -} - -const ( - // EventTypeViewerRequest is a EventType enum value - EventTypeViewerRequest = "viewer-request" - - // EventTypeViewerResponse is a EventType enum value - EventTypeViewerResponse = "viewer-response" - - // EventTypeOriginRequest is a EventType enum value - EventTypeOriginRequest = "origin-request" - - // EventTypeOriginResponse is a EventType enum value - EventTypeOriginResponse = "origin-response" -) - -// EventType_Values returns all elements of the EventType enum -func EventType_Values() []string { - return []string{ - EventTypeViewerRequest, - EventTypeViewerResponse, - EventTypeOriginRequest, - EventTypeOriginResponse, - } -} - -const ( - // FormatUrlencoded is a Format enum value - FormatUrlencoded = "URLEncoded" -) - -// Format_Values returns all elements of the Format enum -func Format_Values() []string { - return []string{ - FormatUrlencoded, - } -} - -const ( - // FrameOptionsListDeny is a FrameOptionsList enum value - FrameOptionsListDeny = "DENY" - - // FrameOptionsListSameorigin is a FrameOptionsList enum value - FrameOptionsListSameorigin = "SAMEORIGIN" -) - -// FrameOptionsList_Values returns all elements of the FrameOptionsList enum -func FrameOptionsList_Values() []string { - return []string{ - FrameOptionsListDeny, - FrameOptionsListSameorigin, - } -} - -const ( - // FunctionRuntimeCloudfrontJs10 is a FunctionRuntime enum value - FunctionRuntimeCloudfrontJs10 = "cloudfront-js-1.0" - - // FunctionRuntimeCloudfrontJs20 is a FunctionRuntime enum value - FunctionRuntimeCloudfrontJs20 = "cloudfront-js-2.0" -) - -// FunctionRuntime_Values returns all elements of the FunctionRuntime enum -func FunctionRuntime_Values() []string { - return []string{ - FunctionRuntimeCloudfrontJs10, - FunctionRuntimeCloudfrontJs20, - } -} - -const ( - // FunctionStageDevelopment is a FunctionStage enum value - FunctionStageDevelopment = "DEVELOPMENT" - - // FunctionStageLive is a FunctionStage enum value - FunctionStageLive = "LIVE" -) - -// FunctionStage_Values returns all elements of the FunctionStage enum -func FunctionStage_Values() []string { - return []string{ - FunctionStageDevelopment, - FunctionStageLive, - } -} - -const ( - // GeoRestrictionTypeBlacklist is a GeoRestrictionType enum value - GeoRestrictionTypeBlacklist = "blacklist" - - // GeoRestrictionTypeWhitelist is a GeoRestrictionType enum value - GeoRestrictionTypeWhitelist = "whitelist" - - // GeoRestrictionTypeNone is a GeoRestrictionType enum value - GeoRestrictionTypeNone = "none" -) - -// GeoRestrictionType_Values returns all elements of the GeoRestrictionType enum -func GeoRestrictionType_Values() []string { - return []string{ - GeoRestrictionTypeBlacklist, - GeoRestrictionTypeWhitelist, - GeoRestrictionTypeNone, - } -} - -const ( - // HttpVersionHttp11 is a HttpVersion enum value - HttpVersionHttp11 = "http1.1" - - // HttpVersionHttp2 is a HttpVersion enum value - HttpVersionHttp2 = "http2" - - // HttpVersionHttp3 is a HttpVersion enum value - HttpVersionHttp3 = "http3" - - // HttpVersionHttp2and3 is a HttpVersion enum value - HttpVersionHttp2and3 = "http2and3" -) - -// HttpVersion_Values returns all elements of the HttpVersion enum -func HttpVersion_Values() []string { - return []string{ - HttpVersionHttp11, - HttpVersionHttp2, - HttpVersionHttp3, - HttpVersionHttp2and3, - } -} - -const ( - // ICPRecordalStatusApproved is a ICPRecordalStatus enum value - ICPRecordalStatusApproved = "APPROVED" - - // ICPRecordalStatusSuspended is a ICPRecordalStatus enum value - ICPRecordalStatusSuspended = "SUSPENDED" - - // ICPRecordalStatusPending is a ICPRecordalStatus enum value - ICPRecordalStatusPending = "PENDING" -) - -// ICPRecordalStatus_Values returns all elements of the ICPRecordalStatus enum -func ICPRecordalStatus_Values() []string { - return []string{ - ICPRecordalStatusApproved, - ICPRecordalStatusSuspended, - ICPRecordalStatusPending, - } -} - -const ( - // ImportSourceTypeS3 is a ImportSourceType enum value - ImportSourceTypeS3 = "S3" -) - -// ImportSourceType_Values returns all elements of the ImportSourceType enum -func ImportSourceType_Values() []string { - return []string{ - ImportSourceTypeS3, - } -} - -const ( - // ItemSelectionNone is a ItemSelection enum value - ItemSelectionNone = "none" - - // ItemSelectionWhitelist is a ItemSelection enum value - ItemSelectionWhitelist = "whitelist" - - // ItemSelectionAll is a ItemSelection enum value - ItemSelectionAll = "all" -) - -// ItemSelection_Values returns all elements of the ItemSelection enum -func ItemSelection_Values() []string { - return []string{ - ItemSelectionNone, - ItemSelectionWhitelist, - ItemSelectionAll, - } -} - -const ( - // MethodGet is a Method enum value - MethodGet = "GET" - - // MethodHead is a Method enum value - MethodHead = "HEAD" - - // MethodPost is a Method enum value - MethodPost = "POST" - - // MethodPut is a Method enum value - MethodPut = "PUT" - - // MethodPatch is a Method enum value - MethodPatch = "PATCH" - - // MethodOptions is a Method enum value - MethodOptions = "OPTIONS" - - // MethodDelete is a Method enum value - MethodDelete = "DELETE" -) - -// Method_Values returns all elements of the Method enum -func Method_Values() []string { - return []string{ - MethodGet, - MethodHead, - MethodPost, - MethodPut, - MethodPatch, - MethodOptions, - MethodDelete, - } -} - -const ( - // MinimumProtocolVersionSslv3 is a MinimumProtocolVersion enum value - MinimumProtocolVersionSslv3 = "SSLv3" - - // MinimumProtocolVersionTlsv1 is a MinimumProtocolVersion enum value - MinimumProtocolVersionTlsv1 = "TLSv1" - - // MinimumProtocolVersionTlsv12016 is a MinimumProtocolVersion enum value - MinimumProtocolVersionTlsv12016 = "TLSv1_2016" - - // MinimumProtocolVersionTlsv112016 is a MinimumProtocolVersion enum value - MinimumProtocolVersionTlsv112016 = "TLSv1.1_2016" - - // MinimumProtocolVersionTlsv122018 is a MinimumProtocolVersion enum value - MinimumProtocolVersionTlsv122018 = "TLSv1.2_2018" - - // MinimumProtocolVersionTlsv122019 is a MinimumProtocolVersion enum value - MinimumProtocolVersionTlsv122019 = "TLSv1.2_2019" - - // MinimumProtocolVersionTlsv122021 is a MinimumProtocolVersion enum value - MinimumProtocolVersionTlsv122021 = "TLSv1.2_2021" -) - -// MinimumProtocolVersion_Values returns all elements of the MinimumProtocolVersion enum -func MinimumProtocolVersion_Values() []string { - return []string{ - MinimumProtocolVersionSslv3, - MinimumProtocolVersionTlsv1, - MinimumProtocolVersionTlsv12016, - MinimumProtocolVersionTlsv112016, - MinimumProtocolVersionTlsv122018, - MinimumProtocolVersionTlsv122019, - MinimumProtocolVersionTlsv122021, - } -} - -const ( - // OriginAccessControlOriginTypesS3 is a OriginAccessControlOriginTypes enum value - OriginAccessControlOriginTypesS3 = "s3" - - // OriginAccessControlOriginTypesMediastore is a OriginAccessControlOriginTypes enum value - OriginAccessControlOriginTypesMediastore = "mediastore" - - // OriginAccessControlOriginTypesMediapackagev2 is a OriginAccessControlOriginTypes enum value - OriginAccessControlOriginTypesMediapackagev2 = "mediapackagev2" - - // OriginAccessControlOriginTypesLambda is a OriginAccessControlOriginTypes enum value - OriginAccessControlOriginTypesLambda = "lambda" -) - -// OriginAccessControlOriginTypes_Values returns all elements of the OriginAccessControlOriginTypes enum -func OriginAccessControlOriginTypes_Values() []string { - return []string{ - OriginAccessControlOriginTypesS3, - OriginAccessControlOriginTypesMediastore, - OriginAccessControlOriginTypesMediapackagev2, - OriginAccessControlOriginTypesLambda, - } -} - -const ( - // OriginAccessControlSigningBehaviorsNever is a OriginAccessControlSigningBehaviors enum value - OriginAccessControlSigningBehaviorsNever = "never" - - // OriginAccessControlSigningBehaviorsAlways is a OriginAccessControlSigningBehaviors enum value - OriginAccessControlSigningBehaviorsAlways = "always" - - // OriginAccessControlSigningBehaviorsNoOverride is a OriginAccessControlSigningBehaviors enum value - OriginAccessControlSigningBehaviorsNoOverride = "no-override" -) - -// OriginAccessControlSigningBehaviors_Values returns all elements of the OriginAccessControlSigningBehaviors enum -func OriginAccessControlSigningBehaviors_Values() []string { - return []string{ - OriginAccessControlSigningBehaviorsNever, - OriginAccessControlSigningBehaviorsAlways, - OriginAccessControlSigningBehaviorsNoOverride, - } -} - -const ( - // OriginAccessControlSigningProtocolsSigv4 is a OriginAccessControlSigningProtocols enum value - OriginAccessControlSigningProtocolsSigv4 = "sigv4" -) - -// OriginAccessControlSigningProtocols_Values returns all elements of the OriginAccessControlSigningProtocols enum -func OriginAccessControlSigningProtocols_Values() []string { - return []string{ - OriginAccessControlSigningProtocolsSigv4, - } -} - -const ( - // OriginProtocolPolicyHttpOnly is a OriginProtocolPolicy enum value - OriginProtocolPolicyHttpOnly = "http-only" - - // OriginProtocolPolicyMatchViewer is a OriginProtocolPolicy enum value - OriginProtocolPolicyMatchViewer = "match-viewer" - - // OriginProtocolPolicyHttpsOnly is a OriginProtocolPolicy enum value - OriginProtocolPolicyHttpsOnly = "https-only" -) - -// OriginProtocolPolicy_Values returns all elements of the OriginProtocolPolicy enum -func OriginProtocolPolicy_Values() []string { - return []string{ - OriginProtocolPolicyHttpOnly, - OriginProtocolPolicyMatchViewer, - OriginProtocolPolicyHttpsOnly, - } -} - -const ( - // OriginRequestPolicyCookieBehaviorNone is a OriginRequestPolicyCookieBehavior enum value - OriginRequestPolicyCookieBehaviorNone = "none" - - // OriginRequestPolicyCookieBehaviorWhitelist is a OriginRequestPolicyCookieBehavior enum value - OriginRequestPolicyCookieBehaviorWhitelist = "whitelist" - - // OriginRequestPolicyCookieBehaviorAll is a OriginRequestPolicyCookieBehavior enum value - OriginRequestPolicyCookieBehaviorAll = "all" - - // OriginRequestPolicyCookieBehaviorAllExcept is a OriginRequestPolicyCookieBehavior enum value - OriginRequestPolicyCookieBehaviorAllExcept = "allExcept" -) - -// OriginRequestPolicyCookieBehavior_Values returns all elements of the OriginRequestPolicyCookieBehavior enum -func OriginRequestPolicyCookieBehavior_Values() []string { - return []string{ - OriginRequestPolicyCookieBehaviorNone, - OriginRequestPolicyCookieBehaviorWhitelist, - OriginRequestPolicyCookieBehaviorAll, - OriginRequestPolicyCookieBehaviorAllExcept, - } -} - -const ( - // OriginRequestPolicyHeaderBehaviorNone is a OriginRequestPolicyHeaderBehavior enum value - OriginRequestPolicyHeaderBehaviorNone = "none" - - // OriginRequestPolicyHeaderBehaviorWhitelist is a OriginRequestPolicyHeaderBehavior enum value - OriginRequestPolicyHeaderBehaviorWhitelist = "whitelist" - - // OriginRequestPolicyHeaderBehaviorAllViewer is a OriginRequestPolicyHeaderBehavior enum value - OriginRequestPolicyHeaderBehaviorAllViewer = "allViewer" - - // OriginRequestPolicyHeaderBehaviorAllViewerAndWhitelistCloudFront is a OriginRequestPolicyHeaderBehavior enum value - OriginRequestPolicyHeaderBehaviorAllViewerAndWhitelistCloudFront = "allViewerAndWhitelistCloudFront" - - // OriginRequestPolicyHeaderBehaviorAllExcept is a OriginRequestPolicyHeaderBehavior enum value - OriginRequestPolicyHeaderBehaviorAllExcept = "allExcept" -) - -// OriginRequestPolicyHeaderBehavior_Values returns all elements of the OriginRequestPolicyHeaderBehavior enum -func OriginRequestPolicyHeaderBehavior_Values() []string { - return []string{ - OriginRequestPolicyHeaderBehaviorNone, - OriginRequestPolicyHeaderBehaviorWhitelist, - OriginRequestPolicyHeaderBehaviorAllViewer, - OriginRequestPolicyHeaderBehaviorAllViewerAndWhitelistCloudFront, - OriginRequestPolicyHeaderBehaviorAllExcept, - } -} - -const ( - // OriginRequestPolicyQueryStringBehaviorNone is a OriginRequestPolicyQueryStringBehavior enum value - OriginRequestPolicyQueryStringBehaviorNone = "none" - - // OriginRequestPolicyQueryStringBehaviorWhitelist is a OriginRequestPolicyQueryStringBehavior enum value - OriginRequestPolicyQueryStringBehaviorWhitelist = "whitelist" - - // OriginRequestPolicyQueryStringBehaviorAll is a OriginRequestPolicyQueryStringBehavior enum value - OriginRequestPolicyQueryStringBehaviorAll = "all" - - // OriginRequestPolicyQueryStringBehaviorAllExcept is a OriginRequestPolicyQueryStringBehavior enum value - OriginRequestPolicyQueryStringBehaviorAllExcept = "allExcept" -) - -// OriginRequestPolicyQueryStringBehavior_Values returns all elements of the OriginRequestPolicyQueryStringBehavior enum -func OriginRequestPolicyQueryStringBehavior_Values() []string { - return []string{ - OriginRequestPolicyQueryStringBehaviorNone, - OriginRequestPolicyQueryStringBehaviorWhitelist, - OriginRequestPolicyQueryStringBehaviorAll, - OriginRequestPolicyQueryStringBehaviorAllExcept, - } -} - -const ( - // OriginRequestPolicyTypeManaged is a OriginRequestPolicyType enum value - OriginRequestPolicyTypeManaged = "managed" - - // OriginRequestPolicyTypeCustom is a OriginRequestPolicyType enum value - OriginRequestPolicyTypeCustom = "custom" -) - -// OriginRequestPolicyType_Values returns all elements of the OriginRequestPolicyType enum -func OriginRequestPolicyType_Values() []string { - return []string{ - OriginRequestPolicyTypeManaged, - OriginRequestPolicyTypeCustom, - } -} - -const ( - // PriceClassPriceClass100 is a PriceClass enum value - PriceClassPriceClass100 = "PriceClass_100" - - // PriceClassPriceClass200 is a PriceClass enum value - PriceClassPriceClass200 = "PriceClass_200" - - // PriceClassPriceClassAll is a PriceClass enum value - PriceClassPriceClassAll = "PriceClass_All" -) - -// PriceClass_Values returns all elements of the PriceClass enum -func PriceClass_Values() []string { - return []string{ - PriceClassPriceClass100, - PriceClassPriceClass200, - PriceClassPriceClassAll, - } -} - -const ( - // RealtimeMetricsSubscriptionStatusEnabled is a RealtimeMetricsSubscriptionStatus enum value - RealtimeMetricsSubscriptionStatusEnabled = "Enabled" - - // RealtimeMetricsSubscriptionStatusDisabled is a RealtimeMetricsSubscriptionStatus enum value - RealtimeMetricsSubscriptionStatusDisabled = "Disabled" -) - -// RealtimeMetricsSubscriptionStatus_Values returns all elements of the RealtimeMetricsSubscriptionStatus enum -func RealtimeMetricsSubscriptionStatus_Values() []string { - return []string{ - RealtimeMetricsSubscriptionStatusEnabled, - RealtimeMetricsSubscriptionStatusDisabled, - } -} - -const ( - // ReferrerPolicyListNoReferrer is a ReferrerPolicyList enum value - ReferrerPolicyListNoReferrer = "no-referrer" - - // ReferrerPolicyListNoReferrerWhenDowngrade is a ReferrerPolicyList enum value - ReferrerPolicyListNoReferrerWhenDowngrade = "no-referrer-when-downgrade" - - // ReferrerPolicyListOrigin is a ReferrerPolicyList enum value - ReferrerPolicyListOrigin = "origin" - - // ReferrerPolicyListOriginWhenCrossOrigin is a ReferrerPolicyList enum value - ReferrerPolicyListOriginWhenCrossOrigin = "origin-when-cross-origin" - - // ReferrerPolicyListSameOrigin is a ReferrerPolicyList enum value - ReferrerPolicyListSameOrigin = "same-origin" - - // ReferrerPolicyListStrictOrigin is a ReferrerPolicyList enum value - ReferrerPolicyListStrictOrigin = "strict-origin" - - // ReferrerPolicyListStrictOriginWhenCrossOrigin is a ReferrerPolicyList enum value - ReferrerPolicyListStrictOriginWhenCrossOrigin = "strict-origin-when-cross-origin" - - // ReferrerPolicyListUnsafeUrl is a ReferrerPolicyList enum value - ReferrerPolicyListUnsafeUrl = "unsafe-url" -) - -// ReferrerPolicyList_Values returns all elements of the ReferrerPolicyList enum -func ReferrerPolicyList_Values() []string { - return []string{ - ReferrerPolicyListNoReferrer, - ReferrerPolicyListNoReferrerWhenDowngrade, - ReferrerPolicyListOrigin, - ReferrerPolicyListOriginWhenCrossOrigin, - ReferrerPolicyListSameOrigin, - ReferrerPolicyListStrictOrigin, - ReferrerPolicyListStrictOriginWhenCrossOrigin, - ReferrerPolicyListUnsafeUrl, - } -} - -const ( - // ResponseHeadersPolicyAccessControlAllowMethodsValuesGet is a ResponseHeadersPolicyAccessControlAllowMethodsValues enum value - ResponseHeadersPolicyAccessControlAllowMethodsValuesGet = "GET" - - // ResponseHeadersPolicyAccessControlAllowMethodsValuesPost is a ResponseHeadersPolicyAccessControlAllowMethodsValues enum value - ResponseHeadersPolicyAccessControlAllowMethodsValuesPost = "POST" - - // ResponseHeadersPolicyAccessControlAllowMethodsValuesOptions is a ResponseHeadersPolicyAccessControlAllowMethodsValues enum value - ResponseHeadersPolicyAccessControlAllowMethodsValuesOptions = "OPTIONS" - - // ResponseHeadersPolicyAccessControlAllowMethodsValuesPut is a ResponseHeadersPolicyAccessControlAllowMethodsValues enum value - ResponseHeadersPolicyAccessControlAllowMethodsValuesPut = "PUT" - - // ResponseHeadersPolicyAccessControlAllowMethodsValuesDelete is a ResponseHeadersPolicyAccessControlAllowMethodsValues enum value - ResponseHeadersPolicyAccessControlAllowMethodsValuesDelete = "DELETE" - - // ResponseHeadersPolicyAccessControlAllowMethodsValuesPatch is a ResponseHeadersPolicyAccessControlAllowMethodsValues enum value - ResponseHeadersPolicyAccessControlAllowMethodsValuesPatch = "PATCH" - - // ResponseHeadersPolicyAccessControlAllowMethodsValuesHead is a ResponseHeadersPolicyAccessControlAllowMethodsValues enum value - ResponseHeadersPolicyAccessControlAllowMethodsValuesHead = "HEAD" - - // ResponseHeadersPolicyAccessControlAllowMethodsValuesAll is a ResponseHeadersPolicyAccessControlAllowMethodsValues enum value - ResponseHeadersPolicyAccessControlAllowMethodsValuesAll = "ALL" -) - -// ResponseHeadersPolicyAccessControlAllowMethodsValues_Values returns all elements of the ResponseHeadersPolicyAccessControlAllowMethodsValues enum -func ResponseHeadersPolicyAccessControlAllowMethodsValues_Values() []string { - return []string{ - ResponseHeadersPolicyAccessControlAllowMethodsValuesGet, - ResponseHeadersPolicyAccessControlAllowMethodsValuesPost, - ResponseHeadersPolicyAccessControlAllowMethodsValuesOptions, - ResponseHeadersPolicyAccessControlAllowMethodsValuesPut, - ResponseHeadersPolicyAccessControlAllowMethodsValuesDelete, - ResponseHeadersPolicyAccessControlAllowMethodsValuesPatch, - ResponseHeadersPolicyAccessControlAllowMethodsValuesHead, - ResponseHeadersPolicyAccessControlAllowMethodsValuesAll, - } -} - -const ( - // ResponseHeadersPolicyTypeManaged is a ResponseHeadersPolicyType enum value - ResponseHeadersPolicyTypeManaged = "managed" - - // ResponseHeadersPolicyTypeCustom is a ResponseHeadersPolicyType enum value - ResponseHeadersPolicyTypeCustom = "custom" -) - -// ResponseHeadersPolicyType_Values returns all elements of the ResponseHeadersPolicyType enum -func ResponseHeadersPolicyType_Values() []string { - return []string{ - ResponseHeadersPolicyTypeManaged, - ResponseHeadersPolicyTypeCustom, - } -} - -const ( - // SSLSupportMethodSniOnly is a SSLSupportMethod enum value - SSLSupportMethodSniOnly = "sni-only" - - // SSLSupportMethodVip is a SSLSupportMethod enum value - SSLSupportMethodVip = "vip" - - // SSLSupportMethodStaticIp is a SSLSupportMethod enum value - SSLSupportMethodStaticIp = "static-ip" -) - -// SSLSupportMethod_Values returns all elements of the SSLSupportMethod enum -func SSLSupportMethod_Values() []string { - return []string{ - SSLSupportMethodSniOnly, - SSLSupportMethodVip, - SSLSupportMethodStaticIp, - } -} - -const ( - // SslProtocolSslv3 is a SslProtocol enum value - SslProtocolSslv3 = "SSLv3" - - // SslProtocolTlsv1 is a SslProtocol enum value - SslProtocolTlsv1 = "TLSv1" - - // SslProtocolTlsv11 is a SslProtocol enum value - SslProtocolTlsv11 = "TLSv1.1" - - // SslProtocolTlsv12 is a SslProtocol enum value - SslProtocolTlsv12 = "TLSv1.2" -) - -// SslProtocol_Values returns all elements of the SslProtocol enum -func SslProtocol_Values() []string { - return []string{ - SslProtocolSslv3, - SslProtocolTlsv1, - SslProtocolTlsv11, - SslProtocolTlsv12, - } -} - -const ( - // ViewerProtocolPolicyAllowAll is a ViewerProtocolPolicy enum value - ViewerProtocolPolicyAllowAll = "allow-all" - - // ViewerProtocolPolicyHttpsOnly is a ViewerProtocolPolicy enum value - ViewerProtocolPolicyHttpsOnly = "https-only" - - // ViewerProtocolPolicyRedirectToHttps is a ViewerProtocolPolicy enum value - ViewerProtocolPolicyRedirectToHttps = "redirect-to-https" -) - -// ViewerProtocolPolicy_Values returns all elements of the ViewerProtocolPolicy enum -func ViewerProtocolPolicy_Values() []string { - return []string{ - ViewerProtocolPolicyAllowAll, - ViewerProtocolPolicyHttpsOnly, - ViewerProtocolPolicyRedirectToHttps, - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/cloudfrontiface/interface.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/cloudfrontiface/interface.go deleted file mode 100644 index 662efd162e..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/cloudfrontiface/interface.go +++ /dev/null @@ -1,532 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package cloudfrontiface provides an interface to enable mocking the Amazon CloudFront service client -// for testing your code. -// -// It is important to note that this interface will have breaking changes -// when the service model is updated and adds new API operations, paginators, -// and waiters. -package cloudfrontiface - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/service/cloudfront" -) - -// CloudFrontAPI provides an interface to enable mocking the -// cloudfront.CloudFront service client's API operation, -// paginators, and waiters. This make unit testing your code that calls out -// to the SDK's service client's calls easier. -// -// The best way to use this interface is so the SDK's service client's calls -// can be stubbed out for unit testing your code with the SDK without needing -// to inject custom request handlers into the SDK's request pipeline. -// -// // myFunc uses an SDK service client to make a request to -// // Amazon CloudFront. -// func myFunc(svc cloudfrontiface.CloudFrontAPI) bool { -// // Make svc.AssociateAlias request -// } -// -// func main() { -// sess := session.New() -// svc := cloudfront.New(sess) -// -// myFunc(svc) -// } -// -// In your _test.go file: -// -// // Define a mock struct to be used in your unit tests of myFunc. -// type mockCloudFrontClient struct { -// cloudfrontiface.CloudFrontAPI -// } -// func (m *mockCloudFrontClient) AssociateAlias(input *cloudfront.AssociateAliasInput) (*cloudfront.AssociateAliasOutput, error) { -// // mock response/functionality -// } -// -// func TestMyFunc(t *testing.T) { -// // Setup Test -// mockSvc := &mockCloudFrontClient{} -// -// myfunc(mockSvc) -// -// // Verify myFunc's functionality -// } -// -// It is important to note that this interface will have breaking changes -// when the service model is updated and adds new API operations, paginators, -// and waiters. Its suggested to use the pattern above for testing, or using -// tooling to generate mocks to satisfy the interfaces. -type CloudFrontAPI interface { - AssociateAlias(*cloudfront.AssociateAliasInput) (*cloudfront.AssociateAliasOutput, error) - AssociateAliasWithContext(aws.Context, *cloudfront.AssociateAliasInput, ...request.Option) (*cloudfront.AssociateAliasOutput, error) - AssociateAliasRequest(*cloudfront.AssociateAliasInput) (*request.Request, *cloudfront.AssociateAliasOutput) - - CopyDistribution(*cloudfront.CopyDistributionInput) (*cloudfront.CopyDistributionOutput, error) - CopyDistributionWithContext(aws.Context, *cloudfront.CopyDistributionInput, ...request.Option) (*cloudfront.CopyDistributionOutput, error) - CopyDistributionRequest(*cloudfront.CopyDistributionInput) (*request.Request, *cloudfront.CopyDistributionOutput) - - CreateCachePolicy(*cloudfront.CreateCachePolicyInput) (*cloudfront.CreateCachePolicyOutput, error) - CreateCachePolicyWithContext(aws.Context, *cloudfront.CreateCachePolicyInput, ...request.Option) (*cloudfront.CreateCachePolicyOutput, error) - CreateCachePolicyRequest(*cloudfront.CreateCachePolicyInput) (*request.Request, *cloudfront.CreateCachePolicyOutput) - - CreateCloudFrontOriginAccessIdentity(*cloudfront.CreateCloudFrontOriginAccessIdentityInput) (*cloudfront.CreateCloudFrontOriginAccessIdentityOutput, error) - CreateCloudFrontOriginAccessIdentityWithContext(aws.Context, *cloudfront.CreateCloudFrontOriginAccessIdentityInput, ...request.Option) (*cloudfront.CreateCloudFrontOriginAccessIdentityOutput, error) - CreateCloudFrontOriginAccessIdentityRequest(*cloudfront.CreateCloudFrontOriginAccessIdentityInput) (*request.Request, *cloudfront.CreateCloudFrontOriginAccessIdentityOutput) - - CreateContinuousDeploymentPolicy(*cloudfront.CreateContinuousDeploymentPolicyInput) (*cloudfront.CreateContinuousDeploymentPolicyOutput, error) - CreateContinuousDeploymentPolicyWithContext(aws.Context, *cloudfront.CreateContinuousDeploymentPolicyInput, ...request.Option) (*cloudfront.CreateContinuousDeploymentPolicyOutput, error) - CreateContinuousDeploymentPolicyRequest(*cloudfront.CreateContinuousDeploymentPolicyInput) (*request.Request, *cloudfront.CreateContinuousDeploymentPolicyOutput) - - CreateDistribution(*cloudfront.CreateDistributionInput) (*cloudfront.CreateDistributionOutput, error) - CreateDistributionWithContext(aws.Context, *cloudfront.CreateDistributionInput, ...request.Option) (*cloudfront.CreateDistributionOutput, error) - CreateDistributionRequest(*cloudfront.CreateDistributionInput) (*request.Request, *cloudfront.CreateDistributionOutput) - - CreateDistributionWithTags(*cloudfront.CreateDistributionWithTagsInput) (*cloudfront.CreateDistributionWithTagsOutput, error) - CreateDistributionWithTagsWithContext(aws.Context, *cloudfront.CreateDistributionWithTagsInput, ...request.Option) (*cloudfront.CreateDistributionWithTagsOutput, error) - CreateDistributionWithTagsRequest(*cloudfront.CreateDistributionWithTagsInput) (*request.Request, *cloudfront.CreateDistributionWithTagsOutput) - - CreateFieldLevelEncryptionConfig(*cloudfront.CreateFieldLevelEncryptionConfigInput) (*cloudfront.CreateFieldLevelEncryptionConfigOutput, error) - CreateFieldLevelEncryptionConfigWithContext(aws.Context, *cloudfront.CreateFieldLevelEncryptionConfigInput, ...request.Option) (*cloudfront.CreateFieldLevelEncryptionConfigOutput, error) - CreateFieldLevelEncryptionConfigRequest(*cloudfront.CreateFieldLevelEncryptionConfigInput) (*request.Request, *cloudfront.CreateFieldLevelEncryptionConfigOutput) - - CreateFieldLevelEncryptionProfile(*cloudfront.CreateFieldLevelEncryptionProfileInput) (*cloudfront.CreateFieldLevelEncryptionProfileOutput, error) - CreateFieldLevelEncryptionProfileWithContext(aws.Context, *cloudfront.CreateFieldLevelEncryptionProfileInput, ...request.Option) (*cloudfront.CreateFieldLevelEncryptionProfileOutput, error) - CreateFieldLevelEncryptionProfileRequest(*cloudfront.CreateFieldLevelEncryptionProfileInput) (*request.Request, *cloudfront.CreateFieldLevelEncryptionProfileOutput) - - CreateFunction(*cloudfront.CreateFunctionInput) (*cloudfront.CreateFunctionOutput, error) - CreateFunctionWithContext(aws.Context, *cloudfront.CreateFunctionInput, ...request.Option) (*cloudfront.CreateFunctionOutput, error) - CreateFunctionRequest(*cloudfront.CreateFunctionInput) (*request.Request, *cloudfront.CreateFunctionOutput) - - CreateInvalidation(*cloudfront.CreateInvalidationInput) (*cloudfront.CreateInvalidationOutput, error) - CreateInvalidationWithContext(aws.Context, *cloudfront.CreateInvalidationInput, ...request.Option) (*cloudfront.CreateInvalidationOutput, error) - CreateInvalidationRequest(*cloudfront.CreateInvalidationInput) (*request.Request, *cloudfront.CreateInvalidationOutput) - - CreateKeyGroup(*cloudfront.CreateKeyGroupInput) (*cloudfront.CreateKeyGroupOutput, error) - CreateKeyGroupWithContext(aws.Context, *cloudfront.CreateKeyGroupInput, ...request.Option) (*cloudfront.CreateKeyGroupOutput, error) - CreateKeyGroupRequest(*cloudfront.CreateKeyGroupInput) (*request.Request, *cloudfront.CreateKeyGroupOutput) - - CreateKeyValueStore(*cloudfront.CreateKeyValueStoreInput) (*cloudfront.CreateKeyValueStoreOutput, error) - CreateKeyValueStoreWithContext(aws.Context, *cloudfront.CreateKeyValueStoreInput, ...request.Option) (*cloudfront.CreateKeyValueStoreOutput, error) - CreateKeyValueStoreRequest(*cloudfront.CreateKeyValueStoreInput) (*request.Request, *cloudfront.CreateKeyValueStoreOutput) - - CreateMonitoringSubscription(*cloudfront.CreateMonitoringSubscriptionInput) (*cloudfront.CreateMonitoringSubscriptionOutput, error) - CreateMonitoringSubscriptionWithContext(aws.Context, *cloudfront.CreateMonitoringSubscriptionInput, ...request.Option) (*cloudfront.CreateMonitoringSubscriptionOutput, error) - CreateMonitoringSubscriptionRequest(*cloudfront.CreateMonitoringSubscriptionInput) (*request.Request, *cloudfront.CreateMonitoringSubscriptionOutput) - - CreateOriginAccessControl(*cloudfront.CreateOriginAccessControlInput) (*cloudfront.CreateOriginAccessControlOutput, error) - CreateOriginAccessControlWithContext(aws.Context, *cloudfront.CreateOriginAccessControlInput, ...request.Option) (*cloudfront.CreateOriginAccessControlOutput, error) - CreateOriginAccessControlRequest(*cloudfront.CreateOriginAccessControlInput) (*request.Request, *cloudfront.CreateOriginAccessControlOutput) - - CreateOriginRequestPolicy(*cloudfront.CreateOriginRequestPolicyInput) (*cloudfront.CreateOriginRequestPolicyOutput, error) - CreateOriginRequestPolicyWithContext(aws.Context, *cloudfront.CreateOriginRequestPolicyInput, ...request.Option) (*cloudfront.CreateOriginRequestPolicyOutput, error) - CreateOriginRequestPolicyRequest(*cloudfront.CreateOriginRequestPolicyInput) (*request.Request, *cloudfront.CreateOriginRequestPolicyOutput) - - CreatePublicKey(*cloudfront.CreatePublicKeyInput) (*cloudfront.CreatePublicKeyOutput, error) - CreatePublicKeyWithContext(aws.Context, *cloudfront.CreatePublicKeyInput, ...request.Option) (*cloudfront.CreatePublicKeyOutput, error) - CreatePublicKeyRequest(*cloudfront.CreatePublicKeyInput) (*request.Request, *cloudfront.CreatePublicKeyOutput) - - CreateRealtimeLogConfig(*cloudfront.CreateRealtimeLogConfigInput) (*cloudfront.CreateRealtimeLogConfigOutput, error) - CreateRealtimeLogConfigWithContext(aws.Context, *cloudfront.CreateRealtimeLogConfigInput, ...request.Option) (*cloudfront.CreateRealtimeLogConfigOutput, error) - CreateRealtimeLogConfigRequest(*cloudfront.CreateRealtimeLogConfigInput) (*request.Request, *cloudfront.CreateRealtimeLogConfigOutput) - - CreateResponseHeadersPolicy(*cloudfront.CreateResponseHeadersPolicyInput) (*cloudfront.CreateResponseHeadersPolicyOutput, error) - CreateResponseHeadersPolicyWithContext(aws.Context, *cloudfront.CreateResponseHeadersPolicyInput, ...request.Option) (*cloudfront.CreateResponseHeadersPolicyOutput, error) - CreateResponseHeadersPolicyRequest(*cloudfront.CreateResponseHeadersPolicyInput) (*request.Request, *cloudfront.CreateResponseHeadersPolicyOutput) - - CreateStreamingDistribution(*cloudfront.CreateStreamingDistributionInput) (*cloudfront.CreateStreamingDistributionOutput, error) - CreateStreamingDistributionWithContext(aws.Context, *cloudfront.CreateStreamingDistributionInput, ...request.Option) (*cloudfront.CreateStreamingDistributionOutput, error) - CreateStreamingDistributionRequest(*cloudfront.CreateStreamingDistributionInput) (*request.Request, *cloudfront.CreateStreamingDistributionOutput) - - CreateStreamingDistributionWithTags(*cloudfront.CreateStreamingDistributionWithTagsInput) (*cloudfront.CreateStreamingDistributionWithTagsOutput, error) - CreateStreamingDistributionWithTagsWithContext(aws.Context, *cloudfront.CreateStreamingDistributionWithTagsInput, ...request.Option) (*cloudfront.CreateStreamingDistributionWithTagsOutput, error) - CreateStreamingDistributionWithTagsRequest(*cloudfront.CreateStreamingDistributionWithTagsInput) (*request.Request, *cloudfront.CreateStreamingDistributionWithTagsOutput) - - DeleteCachePolicy(*cloudfront.DeleteCachePolicyInput) (*cloudfront.DeleteCachePolicyOutput, error) - DeleteCachePolicyWithContext(aws.Context, *cloudfront.DeleteCachePolicyInput, ...request.Option) (*cloudfront.DeleteCachePolicyOutput, error) - DeleteCachePolicyRequest(*cloudfront.DeleteCachePolicyInput) (*request.Request, *cloudfront.DeleteCachePolicyOutput) - - DeleteCloudFrontOriginAccessIdentity(*cloudfront.DeleteCloudFrontOriginAccessIdentityInput) (*cloudfront.DeleteCloudFrontOriginAccessIdentityOutput, error) - DeleteCloudFrontOriginAccessIdentityWithContext(aws.Context, *cloudfront.DeleteCloudFrontOriginAccessIdentityInput, ...request.Option) (*cloudfront.DeleteCloudFrontOriginAccessIdentityOutput, error) - DeleteCloudFrontOriginAccessIdentityRequest(*cloudfront.DeleteCloudFrontOriginAccessIdentityInput) (*request.Request, *cloudfront.DeleteCloudFrontOriginAccessIdentityOutput) - - DeleteContinuousDeploymentPolicy(*cloudfront.DeleteContinuousDeploymentPolicyInput) (*cloudfront.DeleteContinuousDeploymentPolicyOutput, error) - DeleteContinuousDeploymentPolicyWithContext(aws.Context, *cloudfront.DeleteContinuousDeploymentPolicyInput, ...request.Option) (*cloudfront.DeleteContinuousDeploymentPolicyOutput, error) - DeleteContinuousDeploymentPolicyRequest(*cloudfront.DeleteContinuousDeploymentPolicyInput) (*request.Request, *cloudfront.DeleteContinuousDeploymentPolicyOutput) - - DeleteDistribution(*cloudfront.DeleteDistributionInput) (*cloudfront.DeleteDistributionOutput, error) - DeleteDistributionWithContext(aws.Context, *cloudfront.DeleteDistributionInput, ...request.Option) (*cloudfront.DeleteDistributionOutput, error) - DeleteDistributionRequest(*cloudfront.DeleteDistributionInput) (*request.Request, *cloudfront.DeleteDistributionOutput) - - DeleteFieldLevelEncryptionConfig(*cloudfront.DeleteFieldLevelEncryptionConfigInput) (*cloudfront.DeleteFieldLevelEncryptionConfigOutput, error) - DeleteFieldLevelEncryptionConfigWithContext(aws.Context, *cloudfront.DeleteFieldLevelEncryptionConfigInput, ...request.Option) (*cloudfront.DeleteFieldLevelEncryptionConfigOutput, error) - DeleteFieldLevelEncryptionConfigRequest(*cloudfront.DeleteFieldLevelEncryptionConfigInput) (*request.Request, *cloudfront.DeleteFieldLevelEncryptionConfigOutput) - - DeleteFieldLevelEncryptionProfile(*cloudfront.DeleteFieldLevelEncryptionProfileInput) (*cloudfront.DeleteFieldLevelEncryptionProfileOutput, error) - DeleteFieldLevelEncryptionProfileWithContext(aws.Context, *cloudfront.DeleteFieldLevelEncryptionProfileInput, ...request.Option) (*cloudfront.DeleteFieldLevelEncryptionProfileOutput, error) - DeleteFieldLevelEncryptionProfileRequest(*cloudfront.DeleteFieldLevelEncryptionProfileInput) (*request.Request, *cloudfront.DeleteFieldLevelEncryptionProfileOutput) - - DeleteFunction(*cloudfront.DeleteFunctionInput) (*cloudfront.DeleteFunctionOutput, error) - DeleteFunctionWithContext(aws.Context, *cloudfront.DeleteFunctionInput, ...request.Option) (*cloudfront.DeleteFunctionOutput, error) - DeleteFunctionRequest(*cloudfront.DeleteFunctionInput) (*request.Request, *cloudfront.DeleteFunctionOutput) - - DeleteKeyGroup(*cloudfront.DeleteKeyGroupInput) (*cloudfront.DeleteKeyGroupOutput, error) - DeleteKeyGroupWithContext(aws.Context, *cloudfront.DeleteKeyGroupInput, ...request.Option) (*cloudfront.DeleteKeyGroupOutput, error) - DeleteKeyGroupRequest(*cloudfront.DeleteKeyGroupInput) (*request.Request, *cloudfront.DeleteKeyGroupOutput) - - DeleteKeyValueStore(*cloudfront.DeleteKeyValueStoreInput) (*cloudfront.DeleteKeyValueStoreOutput, error) - DeleteKeyValueStoreWithContext(aws.Context, *cloudfront.DeleteKeyValueStoreInput, ...request.Option) (*cloudfront.DeleteKeyValueStoreOutput, error) - DeleteKeyValueStoreRequest(*cloudfront.DeleteKeyValueStoreInput) (*request.Request, *cloudfront.DeleteKeyValueStoreOutput) - - DeleteMonitoringSubscription(*cloudfront.DeleteMonitoringSubscriptionInput) (*cloudfront.DeleteMonitoringSubscriptionOutput, error) - DeleteMonitoringSubscriptionWithContext(aws.Context, *cloudfront.DeleteMonitoringSubscriptionInput, ...request.Option) (*cloudfront.DeleteMonitoringSubscriptionOutput, error) - DeleteMonitoringSubscriptionRequest(*cloudfront.DeleteMonitoringSubscriptionInput) (*request.Request, *cloudfront.DeleteMonitoringSubscriptionOutput) - - DeleteOriginAccessControl(*cloudfront.DeleteOriginAccessControlInput) (*cloudfront.DeleteOriginAccessControlOutput, error) - DeleteOriginAccessControlWithContext(aws.Context, *cloudfront.DeleteOriginAccessControlInput, ...request.Option) (*cloudfront.DeleteOriginAccessControlOutput, error) - DeleteOriginAccessControlRequest(*cloudfront.DeleteOriginAccessControlInput) (*request.Request, *cloudfront.DeleteOriginAccessControlOutput) - - DeleteOriginRequestPolicy(*cloudfront.DeleteOriginRequestPolicyInput) (*cloudfront.DeleteOriginRequestPolicyOutput, error) - DeleteOriginRequestPolicyWithContext(aws.Context, *cloudfront.DeleteOriginRequestPolicyInput, ...request.Option) (*cloudfront.DeleteOriginRequestPolicyOutput, error) - DeleteOriginRequestPolicyRequest(*cloudfront.DeleteOriginRequestPolicyInput) (*request.Request, *cloudfront.DeleteOriginRequestPolicyOutput) - - DeletePublicKey(*cloudfront.DeletePublicKeyInput) (*cloudfront.DeletePublicKeyOutput, error) - DeletePublicKeyWithContext(aws.Context, *cloudfront.DeletePublicKeyInput, ...request.Option) (*cloudfront.DeletePublicKeyOutput, error) - DeletePublicKeyRequest(*cloudfront.DeletePublicKeyInput) (*request.Request, *cloudfront.DeletePublicKeyOutput) - - DeleteRealtimeLogConfig(*cloudfront.DeleteRealtimeLogConfigInput) (*cloudfront.DeleteRealtimeLogConfigOutput, error) - DeleteRealtimeLogConfigWithContext(aws.Context, *cloudfront.DeleteRealtimeLogConfigInput, ...request.Option) (*cloudfront.DeleteRealtimeLogConfigOutput, error) - DeleteRealtimeLogConfigRequest(*cloudfront.DeleteRealtimeLogConfigInput) (*request.Request, *cloudfront.DeleteRealtimeLogConfigOutput) - - DeleteResponseHeadersPolicy(*cloudfront.DeleteResponseHeadersPolicyInput) (*cloudfront.DeleteResponseHeadersPolicyOutput, error) - DeleteResponseHeadersPolicyWithContext(aws.Context, *cloudfront.DeleteResponseHeadersPolicyInput, ...request.Option) (*cloudfront.DeleteResponseHeadersPolicyOutput, error) - DeleteResponseHeadersPolicyRequest(*cloudfront.DeleteResponseHeadersPolicyInput) (*request.Request, *cloudfront.DeleteResponseHeadersPolicyOutput) - - DeleteStreamingDistribution(*cloudfront.DeleteStreamingDistributionInput) (*cloudfront.DeleteStreamingDistributionOutput, error) - DeleteStreamingDistributionWithContext(aws.Context, *cloudfront.DeleteStreamingDistributionInput, ...request.Option) (*cloudfront.DeleteStreamingDistributionOutput, error) - DeleteStreamingDistributionRequest(*cloudfront.DeleteStreamingDistributionInput) (*request.Request, *cloudfront.DeleteStreamingDistributionOutput) - - DescribeFunction(*cloudfront.DescribeFunctionInput) (*cloudfront.DescribeFunctionOutput, error) - DescribeFunctionWithContext(aws.Context, *cloudfront.DescribeFunctionInput, ...request.Option) (*cloudfront.DescribeFunctionOutput, error) - DescribeFunctionRequest(*cloudfront.DescribeFunctionInput) (*request.Request, *cloudfront.DescribeFunctionOutput) - - DescribeKeyValueStore(*cloudfront.DescribeKeyValueStoreInput) (*cloudfront.DescribeKeyValueStoreOutput, error) - DescribeKeyValueStoreWithContext(aws.Context, *cloudfront.DescribeKeyValueStoreInput, ...request.Option) (*cloudfront.DescribeKeyValueStoreOutput, error) - DescribeKeyValueStoreRequest(*cloudfront.DescribeKeyValueStoreInput) (*request.Request, *cloudfront.DescribeKeyValueStoreOutput) - - GetCachePolicy(*cloudfront.GetCachePolicyInput) (*cloudfront.GetCachePolicyOutput, error) - GetCachePolicyWithContext(aws.Context, *cloudfront.GetCachePolicyInput, ...request.Option) (*cloudfront.GetCachePolicyOutput, error) - GetCachePolicyRequest(*cloudfront.GetCachePolicyInput) (*request.Request, *cloudfront.GetCachePolicyOutput) - - GetCachePolicyConfig(*cloudfront.GetCachePolicyConfigInput) (*cloudfront.GetCachePolicyConfigOutput, error) - GetCachePolicyConfigWithContext(aws.Context, *cloudfront.GetCachePolicyConfigInput, ...request.Option) (*cloudfront.GetCachePolicyConfigOutput, error) - GetCachePolicyConfigRequest(*cloudfront.GetCachePolicyConfigInput) (*request.Request, *cloudfront.GetCachePolicyConfigOutput) - - GetCloudFrontOriginAccessIdentity(*cloudfront.GetCloudFrontOriginAccessIdentityInput) (*cloudfront.GetCloudFrontOriginAccessIdentityOutput, error) - GetCloudFrontOriginAccessIdentityWithContext(aws.Context, *cloudfront.GetCloudFrontOriginAccessIdentityInput, ...request.Option) (*cloudfront.GetCloudFrontOriginAccessIdentityOutput, error) - GetCloudFrontOriginAccessIdentityRequest(*cloudfront.GetCloudFrontOriginAccessIdentityInput) (*request.Request, *cloudfront.GetCloudFrontOriginAccessIdentityOutput) - - GetCloudFrontOriginAccessIdentityConfig(*cloudfront.GetCloudFrontOriginAccessIdentityConfigInput) (*cloudfront.GetCloudFrontOriginAccessIdentityConfigOutput, error) - GetCloudFrontOriginAccessIdentityConfigWithContext(aws.Context, *cloudfront.GetCloudFrontOriginAccessIdentityConfigInput, ...request.Option) (*cloudfront.GetCloudFrontOriginAccessIdentityConfigOutput, error) - GetCloudFrontOriginAccessIdentityConfigRequest(*cloudfront.GetCloudFrontOriginAccessIdentityConfigInput) (*request.Request, *cloudfront.GetCloudFrontOriginAccessIdentityConfigOutput) - - GetContinuousDeploymentPolicy(*cloudfront.GetContinuousDeploymentPolicyInput) (*cloudfront.GetContinuousDeploymentPolicyOutput, error) - GetContinuousDeploymentPolicyWithContext(aws.Context, *cloudfront.GetContinuousDeploymentPolicyInput, ...request.Option) (*cloudfront.GetContinuousDeploymentPolicyOutput, error) - GetContinuousDeploymentPolicyRequest(*cloudfront.GetContinuousDeploymentPolicyInput) (*request.Request, *cloudfront.GetContinuousDeploymentPolicyOutput) - - GetContinuousDeploymentPolicyConfig(*cloudfront.GetContinuousDeploymentPolicyConfigInput) (*cloudfront.GetContinuousDeploymentPolicyConfigOutput, error) - GetContinuousDeploymentPolicyConfigWithContext(aws.Context, *cloudfront.GetContinuousDeploymentPolicyConfigInput, ...request.Option) (*cloudfront.GetContinuousDeploymentPolicyConfigOutput, error) - GetContinuousDeploymentPolicyConfigRequest(*cloudfront.GetContinuousDeploymentPolicyConfigInput) (*request.Request, *cloudfront.GetContinuousDeploymentPolicyConfigOutput) - - GetDistribution(*cloudfront.GetDistributionInput) (*cloudfront.GetDistributionOutput, error) - GetDistributionWithContext(aws.Context, *cloudfront.GetDistributionInput, ...request.Option) (*cloudfront.GetDistributionOutput, error) - GetDistributionRequest(*cloudfront.GetDistributionInput) (*request.Request, *cloudfront.GetDistributionOutput) - - GetDistributionConfig(*cloudfront.GetDistributionConfigInput) (*cloudfront.GetDistributionConfigOutput, error) - GetDistributionConfigWithContext(aws.Context, *cloudfront.GetDistributionConfigInput, ...request.Option) (*cloudfront.GetDistributionConfigOutput, error) - GetDistributionConfigRequest(*cloudfront.GetDistributionConfigInput) (*request.Request, *cloudfront.GetDistributionConfigOutput) - - GetFieldLevelEncryption(*cloudfront.GetFieldLevelEncryptionInput) (*cloudfront.GetFieldLevelEncryptionOutput, error) - GetFieldLevelEncryptionWithContext(aws.Context, *cloudfront.GetFieldLevelEncryptionInput, ...request.Option) (*cloudfront.GetFieldLevelEncryptionOutput, error) - GetFieldLevelEncryptionRequest(*cloudfront.GetFieldLevelEncryptionInput) (*request.Request, *cloudfront.GetFieldLevelEncryptionOutput) - - GetFieldLevelEncryptionConfig(*cloudfront.GetFieldLevelEncryptionConfigInput) (*cloudfront.GetFieldLevelEncryptionConfigOutput, error) - GetFieldLevelEncryptionConfigWithContext(aws.Context, *cloudfront.GetFieldLevelEncryptionConfigInput, ...request.Option) (*cloudfront.GetFieldLevelEncryptionConfigOutput, error) - GetFieldLevelEncryptionConfigRequest(*cloudfront.GetFieldLevelEncryptionConfigInput) (*request.Request, *cloudfront.GetFieldLevelEncryptionConfigOutput) - - GetFieldLevelEncryptionProfile(*cloudfront.GetFieldLevelEncryptionProfileInput) (*cloudfront.GetFieldLevelEncryptionProfileOutput, error) - GetFieldLevelEncryptionProfileWithContext(aws.Context, *cloudfront.GetFieldLevelEncryptionProfileInput, ...request.Option) (*cloudfront.GetFieldLevelEncryptionProfileOutput, error) - GetFieldLevelEncryptionProfileRequest(*cloudfront.GetFieldLevelEncryptionProfileInput) (*request.Request, *cloudfront.GetFieldLevelEncryptionProfileOutput) - - GetFieldLevelEncryptionProfileConfig(*cloudfront.GetFieldLevelEncryptionProfileConfigInput) (*cloudfront.GetFieldLevelEncryptionProfileConfigOutput, error) - GetFieldLevelEncryptionProfileConfigWithContext(aws.Context, *cloudfront.GetFieldLevelEncryptionProfileConfigInput, ...request.Option) (*cloudfront.GetFieldLevelEncryptionProfileConfigOutput, error) - GetFieldLevelEncryptionProfileConfigRequest(*cloudfront.GetFieldLevelEncryptionProfileConfigInput) (*request.Request, *cloudfront.GetFieldLevelEncryptionProfileConfigOutput) - - GetFunction(*cloudfront.GetFunctionInput) (*cloudfront.GetFunctionOutput, error) - GetFunctionWithContext(aws.Context, *cloudfront.GetFunctionInput, ...request.Option) (*cloudfront.GetFunctionOutput, error) - GetFunctionRequest(*cloudfront.GetFunctionInput) (*request.Request, *cloudfront.GetFunctionOutput) - - GetInvalidation(*cloudfront.GetInvalidationInput) (*cloudfront.GetInvalidationOutput, error) - GetInvalidationWithContext(aws.Context, *cloudfront.GetInvalidationInput, ...request.Option) (*cloudfront.GetInvalidationOutput, error) - GetInvalidationRequest(*cloudfront.GetInvalidationInput) (*request.Request, *cloudfront.GetInvalidationOutput) - - GetKeyGroup(*cloudfront.GetKeyGroupInput) (*cloudfront.GetKeyGroupOutput, error) - GetKeyGroupWithContext(aws.Context, *cloudfront.GetKeyGroupInput, ...request.Option) (*cloudfront.GetKeyGroupOutput, error) - GetKeyGroupRequest(*cloudfront.GetKeyGroupInput) (*request.Request, *cloudfront.GetKeyGroupOutput) - - GetKeyGroupConfig(*cloudfront.GetKeyGroupConfigInput) (*cloudfront.GetKeyGroupConfigOutput, error) - GetKeyGroupConfigWithContext(aws.Context, *cloudfront.GetKeyGroupConfigInput, ...request.Option) (*cloudfront.GetKeyGroupConfigOutput, error) - GetKeyGroupConfigRequest(*cloudfront.GetKeyGroupConfigInput) (*request.Request, *cloudfront.GetKeyGroupConfigOutput) - - GetMonitoringSubscription(*cloudfront.GetMonitoringSubscriptionInput) (*cloudfront.GetMonitoringSubscriptionOutput, error) - GetMonitoringSubscriptionWithContext(aws.Context, *cloudfront.GetMonitoringSubscriptionInput, ...request.Option) (*cloudfront.GetMonitoringSubscriptionOutput, error) - GetMonitoringSubscriptionRequest(*cloudfront.GetMonitoringSubscriptionInput) (*request.Request, *cloudfront.GetMonitoringSubscriptionOutput) - - GetOriginAccessControl(*cloudfront.GetOriginAccessControlInput) (*cloudfront.GetOriginAccessControlOutput, error) - GetOriginAccessControlWithContext(aws.Context, *cloudfront.GetOriginAccessControlInput, ...request.Option) (*cloudfront.GetOriginAccessControlOutput, error) - GetOriginAccessControlRequest(*cloudfront.GetOriginAccessControlInput) (*request.Request, *cloudfront.GetOriginAccessControlOutput) - - GetOriginAccessControlConfig(*cloudfront.GetOriginAccessControlConfigInput) (*cloudfront.GetOriginAccessControlConfigOutput, error) - GetOriginAccessControlConfigWithContext(aws.Context, *cloudfront.GetOriginAccessControlConfigInput, ...request.Option) (*cloudfront.GetOriginAccessControlConfigOutput, error) - GetOriginAccessControlConfigRequest(*cloudfront.GetOriginAccessControlConfigInput) (*request.Request, *cloudfront.GetOriginAccessControlConfigOutput) - - GetOriginRequestPolicy(*cloudfront.GetOriginRequestPolicyInput) (*cloudfront.GetOriginRequestPolicyOutput, error) - GetOriginRequestPolicyWithContext(aws.Context, *cloudfront.GetOriginRequestPolicyInput, ...request.Option) (*cloudfront.GetOriginRequestPolicyOutput, error) - GetOriginRequestPolicyRequest(*cloudfront.GetOriginRequestPolicyInput) (*request.Request, *cloudfront.GetOriginRequestPolicyOutput) - - GetOriginRequestPolicyConfig(*cloudfront.GetOriginRequestPolicyConfigInput) (*cloudfront.GetOriginRequestPolicyConfigOutput, error) - GetOriginRequestPolicyConfigWithContext(aws.Context, *cloudfront.GetOriginRequestPolicyConfigInput, ...request.Option) (*cloudfront.GetOriginRequestPolicyConfigOutput, error) - GetOriginRequestPolicyConfigRequest(*cloudfront.GetOriginRequestPolicyConfigInput) (*request.Request, *cloudfront.GetOriginRequestPolicyConfigOutput) - - GetPublicKey(*cloudfront.GetPublicKeyInput) (*cloudfront.GetPublicKeyOutput, error) - GetPublicKeyWithContext(aws.Context, *cloudfront.GetPublicKeyInput, ...request.Option) (*cloudfront.GetPublicKeyOutput, error) - GetPublicKeyRequest(*cloudfront.GetPublicKeyInput) (*request.Request, *cloudfront.GetPublicKeyOutput) - - GetPublicKeyConfig(*cloudfront.GetPublicKeyConfigInput) (*cloudfront.GetPublicKeyConfigOutput, error) - GetPublicKeyConfigWithContext(aws.Context, *cloudfront.GetPublicKeyConfigInput, ...request.Option) (*cloudfront.GetPublicKeyConfigOutput, error) - GetPublicKeyConfigRequest(*cloudfront.GetPublicKeyConfigInput) (*request.Request, *cloudfront.GetPublicKeyConfigOutput) - - GetRealtimeLogConfig(*cloudfront.GetRealtimeLogConfigInput) (*cloudfront.GetRealtimeLogConfigOutput, error) - GetRealtimeLogConfigWithContext(aws.Context, *cloudfront.GetRealtimeLogConfigInput, ...request.Option) (*cloudfront.GetRealtimeLogConfigOutput, error) - GetRealtimeLogConfigRequest(*cloudfront.GetRealtimeLogConfigInput) (*request.Request, *cloudfront.GetRealtimeLogConfigOutput) - - GetResponseHeadersPolicy(*cloudfront.GetResponseHeadersPolicyInput) (*cloudfront.GetResponseHeadersPolicyOutput, error) - GetResponseHeadersPolicyWithContext(aws.Context, *cloudfront.GetResponseHeadersPolicyInput, ...request.Option) (*cloudfront.GetResponseHeadersPolicyOutput, error) - GetResponseHeadersPolicyRequest(*cloudfront.GetResponseHeadersPolicyInput) (*request.Request, *cloudfront.GetResponseHeadersPolicyOutput) - - GetResponseHeadersPolicyConfig(*cloudfront.GetResponseHeadersPolicyConfigInput) (*cloudfront.GetResponseHeadersPolicyConfigOutput, error) - GetResponseHeadersPolicyConfigWithContext(aws.Context, *cloudfront.GetResponseHeadersPolicyConfigInput, ...request.Option) (*cloudfront.GetResponseHeadersPolicyConfigOutput, error) - GetResponseHeadersPolicyConfigRequest(*cloudfront.GetResponseHeadersPolicyConfigInput) (*request.Request, *cloudfront.GetResponseHeadersPolicyConfigOutput) - - GetStreamingDistribution(*cloudfront.GetStreamingDistributionInput) (*cloudfront.GetStreamingDistributionOutput, error) - GetStreamingDistributionWithContext(aws.Context, *cloudfront.GetStreamingDistributionInput, ...request.Option) (*cloudfront.GetStreamingDistributionOutput, error) - GetStreamingDistributionRequest(*cloudfront.GetStreamingDistributionInput) (*request.Request, *cloudfront.GetStreamingDistributionOutput) - - GetStreamingDistributionConfig(*cloudfront.GetStreamingDistributionConfigInput) (*cloudfront.GetStreamingDistributionConfigOutput, error) - GetStreamingDistributionConfigWithContext(aws.Context, *cloudfront.GetStreamingDistributionConfigInput, ...request.Option) (*cloudfront.GetStreamingDistributionConfigOutput, error) - GetStreamingDistributionConfigRequest(*cloudfront.GetStreamingDistributionConfigInput) (*request.Request, *cloudfront.GetStreamingDistributionConfigOutput) - - ListCachePolicies(*cloudfront.ListCachePoliciesInput) (*cloudfront.ListCachePoliciesOutput, error) - ListCachePoliciesWithContext(aws.Context, *cloudfront.ListCachePoliciesInput, ...request.Option) (*cloudfront.ListCachePoliciesOutput, error) - ListCachePoliciesRequest(*cloudfront.ListCachePoliciesInput) (*request.Request, *cloudfront.ListCachePoliciesOutput) - - ListCloudFrontOriginAccessIdentities(*cloudfront.ListCloudFrontOriginAccessIdentitiesInput) (*cloudfront.ListCloudFrontOriginAccessIdentitiesOutput, error) - ListCloudFrontOriginAccessIdentitiesWithContext(aws.Context, *cloudfront.ListCloudFrontOriginAccessIdentitiesInput, ...request.Option) (*cloudfront.ListCloudFrontOriginAccessIdentitiesOutput, error) - ListCloudFrontOriginAccessIdentitiesRequest(*cloudfront.ListCloudFrontOriginAccessIdentitiesInput) (*request.Request, *cloudfront.ListCloudFrontOriginAccessIdentitiesOutput) - - ListCloudFrontOriginAccessIdentitiesPages(*cloudfront.ListCloudFrontOriginAccessIdentitiesInput, func(*cloudfront.ListCloudFrontOriginAccessIdentitiesOutput, bool) bool) error - ListCloudFrontOriginAccessIdentitiesPagesWithContext(aws.Context, *cloudfront.ListCloudFrontOriginAccessIdentitiesInput, func(*cloudfront.ListCloudFrontOriginAccessIdentitiesOutput, bool) bool, ...request.Option) error - - ListConflictingAliases(*cloudfront.ListConflictingAliasesInput) (*cloudfront.ListConflictingAliasesOutput, error) - ListConflictingAliasesWithContext(aws.Context, *cloudfront.ListConflictingAliasesInput, ...request.Option) (*cloudfront.ListConflictingAliasesOutput, error) - ListConflictingAliasesRequest(*cloudfront.ListConflictingAliasesInput) (*request.Request, *cloudfront.ListConflictingAliasesOutput) - - ListContinuousDeploymentPolicies(*cloudfront.ListContinuousDeploymentPoliciesInput) (*cloudfront.ListContinuousDeploymentPoliciesOutput, error) - ListContinuousDeploymentPoliciesWithContext(aws.Context, *cloudfront.ListContinuousDeploymentPoliciesInput, ...request.Option) (*cloudfront.ListContinuousDeploymentPoliciesOutput, error) - ListContinuousDeploymentPoliciesRequest(*cloudfront.ListContinuousDeploymentPoliciesInput) (*request.Request, *cloudfront.ListContinuousDeploymentPoliciesOutput) - - ListDistributions(*cloudfront.ListDistributionsInput) (*cloudfront.ListDistributionsOutput, error) - ListDistributionsWithContext(aws.Context, *cloudfront.ListDistributionsInput, ...request.Option) (*cloudfront.ListDistributionsOutput, error) - ListDistributionsRequest(*cloudfront.ListDistributionsInput) (*request.Request, *cloudfront.ListDistributionsOutput) - - ListDistributionsPages(*cloudfront.ListDistributionsInput, func(*cloudfront.ListDistributionsOutput, bool) bool) error - ListDistributionsPagesWithContext(aws.Context, *cloudfront.ListDistributionsInput, func(*cloudfront.ListDistributionsOutput, bool) bool, ...request.Option) error - - ListDistributionsByCachePolicyId(*cloudfront.ListDistributionsByCachePolicyIdInput) (*cloudfront.ListDistributionsByCachePolicyIdOutput, error) - ListDistributionsByCachePolicyIdWithContext(aws.Context, *cloudfront.ListDistributionsByCachePolicyIdInput, ...request.Option) (*cloudfront.ListDistributionsByCachePolicyIdOutput, error) - ListDistributionsByCachePolicyIdRequest(*cloudfront.ListDistributionsByCachePolicyIdInput) (*request.Request, *cloudfront.ListDistributionsByCachePolicyIdOutput) - - ListDistributionsByKeyGroup(*cloudfront.ListDistributionsByKeyGroupInput) (*cloudfront.ListDistributionsByKeyGroupOutput, error) - ListDistributionsByKeyGroupWithContext(aws.Context, *cloudfront.ListDistributionsByKeyGroupInput, ...request.Option) (*cloudfront.ListDistributionsByKeyGroupOutput, error) - ListDistributionsByKeyGroupRequest(*cloudfront.ListDistributionsByKeyGroupInput) (*request.Request, *cloudfront.ListDistributionsByKeyGroupOutput) - - ListDistributionsByOriginRequestPolicyId(*cloudfront.ListDistributionsByOriginRequestPolicyIdInput) (*cloudfront.ListDistributionsByOriginRequestPolicyIdOutput, error) - ListDistributionsByOriginRequestPolicyIdWithContext(aws.Context, *cloudfront.ListDistributionsByOriginRequestPolicyIdInput, ...request.Option) (*cloudfront.ListDistributionsByOriginRequestPolicyIdOutput, error) - ListDistributionsByOriginRequestPolicyIdRequest(*cloudfront.ListDistributionsByOriginRequestPolicyIdInput) (*request.Request, *cloudfront.ListDistributionsByOriginRequestPolicyIdOutput) - - ListDistributionsByRealtimeLogConfig(*cloudfront.ListDistributionsByRealtimeLogConfigInput) (*cloudfront.ListDistributionsByRealtimeLogConfigOutput, error) - ListDistributionsByRealtimeLogConfigWithContext(aws.Context, *cloudfront.ListDistributionsByRealtimeLogConfigInput, ...request.Option) (*cloudfront.ListDistributionsByRealtimeLogConfigOutput, error) - ListDistributionsByRealtimeLogConfigRequest(*cloudfront.ListDistributionsByRealtimeLogConfigInput) (*request.Request, *cloudfront.ListDistributionsByRealtimeLogConfigOutput) - - ListDistributionsByResponseHeadersPolicyId(*cloudfront.ListDistributionsByResponseHeadersPolicyIdInput) (*cloudfront.ListDistributionsByResponseHeadersPolicyIdOutput, error) - ListDistributionsByResponseHeadersPolicyIdWithContext(aws.Context, *cloudfront.ListDistributionsByResponseHeadersPolicyIdInput, ...request.Option) (*cloudfront.ListDistributionsByResponseHeadersPolicyIdOutput, error) - ListDistributionsByResponseHeadersPolicyIdRequest(*cloudfront.ListDistributionsByResponseHeadersPolicyIdInput) (*request.Request, *cloudfront.ListDistributionsByResponseHeadersPolicyIdOutput) - - ListDistributionsByWebACLId(*cloudfront.ListDistributionsByWebACLIdInput) (*cloudfront.ListDistributionsByWebACLIdOutput, error) - ListDistributionsByWebACLIdWithContext(aws.Context, *cloudfront.ListDistributionsByWebACLIdInput, ...request.Option) (*cloudfront.ListDistributionsByWebACLIdOutput, error) - ListDistributionsByWebACLIdRequest(*cloudfront.ListDistributionsByWebACLIdInput) (*request.Request, *cloudfront.ListDistributionsByWebACLIdOutput) - - ListFieldLevelEncryptionConfigs(*cloudfront.ListFieldLevelEncryptionConfigsInput) (*cloudfront.ListFieldLevelEncryptionConfigsOutput, error) - ListFieldLevelEncryptionConfigsWithContext(aws.Context, *cloudfront.ListFieldLevelEncryptionConfigsInput, ...request.Option) (*cloudfront.ListFieldLevelEncryptionConfigsOutput, error) - ListFieldLevelEncryptionConfigsRequest(*cloudfront.ListFieldLevelEncryptionConfigsInput) (*request.Request, *cloudfront.ListFieldLevelEncryptionConfigsOutput) - - ListFieldLevelEncryptionProfiles(*cloudfront.ListFieldLevelEncryptionProfilesInput) (*cloudfront.ListFieldLevelEncryptionProfilesOutput, error) - ListFieldLevelEncryptionProfilesWithContext(aws.Context, *cloudfront.ListFieldLevelEncryptionProfilesInput, ...request.Option) (*cloudfront.ListFieldLevelEncryptionProfilesOutput, error) - ListFieldLevelEncryptionProfilesRequest(*cloudfront.ListFieldLevelEncryptionProfilesInput) (*request.Request, *cloudfront.ListFieldLevelEncryptionProfilesOutput) - - ListFunctions(*cloudfront.ListFunctionsInput) (*cloudfront.ListFunctionsOutput, error) - ListFunctionsWithContext(aws.Context, *cloudfront.ListFunctionsInput, ...request.Option) (*cloudfront.ListFunctionsOutput, error) - ListFunctionsRequest(*cloudfront.ListFunctionsInput) (*request.Request, *cloudfront.ListFunctionsOutput) - - ListInvalidations(*cloudfront.ListInvalidationsInput) (*cloudfront.ListInvalidationsOutput, error) - ListInvalidationsWithContext(aws.Context, *cloudfront.ListInvalidationsInput, ...request.Option) (*cloudfront.ListInvalidationsOutput, error) - ListInvalidationsRequest(*cloudfront.ListInvalidationsInput) (*request.Request, *cloudfront.ListInvalidationsOutput) - - ListInvalidationsPages(*cloudfront.ListInvalidationsInput, func(*cloudfront.ListInvalidationsOutput, bool) bool) error - ListInvalidationsPagesWithContext(aws.Context, *cloudfront.ListInvalidationsInput, func(*cloudfront.ListInvalidationsOutput, bool) bool, ...request.Option) error - - ListKeyGroups(*cloudfront.ListKeyGroupsInput) (*cloudfront.ListKeyGroupsOutput, error) - ListKeyGroupsWithContext(aws.Context, *cloudfront.ListKeyGroupsInput, ...request.Option) (*cloudfront.ListKeyGroupsOutput, error) - ListKeyGroupsRequest(*cloudfront.ListKeyGroupsInput) (*request.Request, *cloudfront.ListKeyGroupsOutput) - - ListKeyValueStores(*cloudfront.ListKeyValueStoresInput) (*cloudfront.ListKeyValueStoresOutput, error) - ListKeyValueStoresWithContext(aws.Context, *cloudfront.ListKeyValueStoresInput, ...request.Option) (*cloudfront.ListKeyValueStoresOutput, error) - ListKeyValueStoresRequest(*cloudfront.ListKeyValueStoresInput) (*request.Request, *cloudfront.ListKeyValueStoresOutput) - - ListKeyValueStoresPages(*cloudfront.ListKeyValueStoresInput, func(*cloudfront.ListKeyValueStoresOutput, bool) bool) error - ListKeyValueStoresPagesWithContext(aws.Context, *cloudfront.ListKeyValueStoresInput, func(*cloudfront.ListKeyValueStoresOutput, bool) bool, ...request.Option) error - - ListOriginAccessControls(*cloudfront.ListOriginAccessControlsInput) (*cloudfront.ListOriginAccessControlsOutput, error) - ListOriginAccessControlsWithContext(aws.Context, *cloudfront.ListOriginAccessControlsInput, ...request.Option) (*cloudfront.ListOriginAccessControlsOutput, error) - ListOriginAccessControlsRequest(*cloudfront.ListOriginAccessControlsInput) (*request.Request, *cloudfront.ListOriginAccessControlsOutput) - - ListOriginRequestPolicies(*cloudfront.ListOriginRequestPoliciesInput) (*cloudfront.ListOriginRequestPoliciesOutput, error) - ListOriginRequestPoliciesWithContext(aws.Context, *cloudfront.ListOriginRequestPoliciesInput, ...request.Option) (*cloudfront.ListOriginRequestPoliciesOutput, error) - ListOriginRequestPoliciesRequest(*cloudfront.ListOriginRequestPoliciesInput) (*request.Request, *cloudfront.ListOriginRequestPoliciesOutput) - - ListPublicKeys(*cloudfront.ListPublicKeysInput) (*cloudfront.ListPublicKeysOutput, error) - ListPublicKeysWithContext(aws.Context, *cloudfront.ListPublicKeysInput, ...request.Option) (*cloudfront.ListPublicKeysOutput, error) - ListPublicKeysRequest(*cloudfront.ListPublicKeysInput) (*request.Request, *cloudfront.ListPublicKeysOutput) - - ListRealtimeLogConfigs(*cloudfront.ListRealtimeLogConfigsInput) (*cloudfront.ListRealtimeLogConfigsOutput, error) - ListRealtimeLogConfigsWithContext(aws.Context, *cloudfront.ListRealtimeLogConfigsInput, ...request.Option) (*cloudfront.ListRealtimeLogConfigsOutput, error) - ListRealtimeLogConfigsRequest(*cloudfront.ListRealtimeLogConfigsInput) (*request.Request, *cloudfront.ListRealtimeLogConfigsOutput) - - ListResponseHeadersPolicies(*cloudfront.ListResponseHeadersPoliciesInput) (*cloudfront.ListResponseHeadersPoliciesOutput, error) - ListResponseHeadersPoliciesWithContext(aws.Context, *cloudfront.ListResponseHeadersPoliciesInput, ...request.Option) (*cloudfront.ListResponseHeadersPoliciesOutput, error) - ListResponseHeadersPoliciesRequest(*cloudfront.ListResponseHeadersPoliciesInput) (*request.Request, *cloudfront.ListResponseHeadersPoliciesOutput) - - ListStreamingDistributions(*cloudfront.ListStreamingDistributionsInput) (*cloudfront.ListStreamingDistributionsOutput, error) - ListStreamingDistributionsWithContext(aws.Context, *cloudfront.ListStreamingDistributionsInput, ...request.Option) (*cloudfront.ListStreamingDistributionsOutput, error) - ListStreamingDistributionsRequest(*cloudfront.ListStreamingDistributionsInput) (*request.Request, *cloudfront.ListStreamingDistributionsOutput) - - ListStreamingDistributionsPages(*cloudfront.ListStreamingDistributionsInput, func(*cloudfront.ListStreamingDistributionsOutput, bool) bool) error - ListStreamingDistributionsPagesWithContext(aws.Context, *cloudfront.ListStreamingDistributionsInput, func(*cloudfront.ListStreamingDistributionsOutput, bool) bool, ...request.Option) error - - ListTagsForResource(*cloudfront.ListTagsForResourceInput) (*cloudfront.ListTagsForResourceOutput, error) - ListTagsForResourceWithContext(aws.Context, *cloudfront.ListTagsForResourceInput, ...request.Option) (*cloudfront.ListTagsForResourceOutput, error) - ListTagsForResourceRequest(*cloudfront.ListTagsForResourceInput) (*request.Request, *cloudfront.ListTagsForResourceOutput) - - PublishFunction(*cloudfront.PublishFunctionInput) (*cloudfront.PublishFunctionOutput, error) - PublishFunctionWithContext(aws.Context, *cloudfront.PublishFunctionInput, ...request.Option) (*cloudfront.PublishFunctionOutput, error) - PublishFunctionRequest(*cloudfront.PublishFunctionInput) (*request.Request, *cloudfront.PublishFunctionOutput) - - TagResource(*cloudfront.TagResourceInput) (*cloudfront.TagResourceOutput, error) - TagResourceWithContext(aws.Context, *cloudfront.TagResourceInput, ...request.Option) (*cloudfront.TagResourceOutput, error) - TagResourceRequest(*cloudfront.TagResourceInput) (*request.Request, *cloudfront.TagResourceOutput) - - TestFunction(*cloudfront.TestFunctionInput) (*cloudfront.TestFunctionOutput, error) - TestFunctionWithContext(aws.Context, *cloudfront.TestFunctionInput, ...request.Option) (*cloudfront.TestFunctionOutput, error) - TestFunctionRequest(*cloudfront.TestFunctionInput) (*request.Request, *cloudfront.TestFunctionOutput) - - UntagResource(*cloudfront.UntagResourceInput) (*cloudfront.UntagResourceOutput, error) - UntagResourceWithContext(aws.Context, *cloudfront.UntagResourceInput, ...request.Option) (*cloudfront.UntagResourceOutput, error) - UntagResourceRequest(*cloudfront.UntagResourceInput) (*request.Request, *cloudfront.UntagResourceOutput) - - UpdateCachePolicy(*cloudfront.UpdateCachePolicyInput) (*cloudfront.UpdateCachePolicyOutput, error) - UpdateCachePolicyWithContext(aws.Context, *cloudfront.UpdateCachePolicyInput, ...request.Option) (*cloudfront.UpdateCachePolicyOutput, error) - UpdateCachePolicyRequest(*cloudfront.UpdateCachePolicyInput) (*request.Request, *cloudfront.UpdateCachePolicyOutput) - - UpdateCloudFrontOriginAccessIdentity(*cloudfront.UpdateCloudFrontOriginAccessIdentityInput) (*cloudfront.UpdateCloudFrontOriginAccessIdentityOutput, error) - UpdateCloudFrontOriginAccessIdentityWithContext(aws.Context, *cloudfront.UpdateCloudFrontOriginAccessIdentityInput, ...request.Option) (*cloudfront.UpdateCloudFrontOriginAccessIdentityOutput, error) - UpdateCloudFrontOriginAccessIdentityRequest(*cloudfront.UpdateCloudFrontOriginAccessIdentityInput) (*request.Request, *cloudfront.UpdateCloudFrontOriginAccessIdentityOutput) - - UpdateContinuousDeploymentPolicy(*cloudfront.UpdateContinuousDeploymentPolicyInput) (*cloudfront.UpdateContinuousDeploymentPolicyOutput, error) - UpdateContinuousDeploymentPolicyWithContext(aws.Context, *cloudfront.UpdateContinuousDeploymentPolicyInput, ...request.Option) (*cloudfront.UpdateContinuousDeploymentPolicyOutput, error) - UpdateContinuousDeploymentPolicyRequest(*cloudfront.UpdateContinuousDeploymentPolicyInput) (*request.Request, *cloudfront.UpdateContinuousDeploymentPolicyOutput) - - UpdateDistribution(*cloudfront.UpdateDistributionInput) (*cloudfront.UpdateDistributionOutput, error) - UpdateDistributionWithContext(aws.Context, *cloudfront.UpdateDistributionInput, ...request.Option) (*cloudfront.UpdateDistributionOutput, error) - UpdateDistributionRequest(*cloudfront.UpdateDistributionInput) (*request.Request, *cloudfront.UpdateDistributionOutput) - - UpdateDistributionWithStagingConfig(*cloudfront.UpdateDistributionWithStagingConfigInput) (*cloudfront.UpdateDistributionWithStagingConfigOutput, error) - UpdateDistributionWithStagingConfigWithContext(aws.Context, *cloudfront.UpdateDistributionWithStagingConfigInput, ...request.Option) (*cloudfront.UpdateDistributionWithStagingConfigOutput, error) - UpdateDistributionWithStagingConfigRequest(*cloudfront.UpdateDistributionWithStagingConfigInput) (*request.Request, *cloudfront.UpdateDistributionWithStagingConfigOutput) - - UpdateFieldLevelEncryptionConfig(*cloudfront.UpdateFieldLevelEncryptionConfigInput) (*cloudfront.UpdateFieldLevelEncryptionConfigOutput, error) - UpdateFieldLevelEncryptionConfigWithContext(aws.Context, *cloudfront.UpdateFieldLevelEncryptionConfigInput, ...request.Option) (*cloudfront.UpdateFieldLevelEncryptionConfigOutput, error) - UpdateFieldLevelEncryptionConfigRequest(*cloudfront.UpdateFieldLevelEncryptionConfigInput) (*request.Request, *cloudfront.UpdateFieldLevelEncryptionConfigOutput) - - UpdateFieldLevelEncryptionProfile(*cloudfront.UpdateFieldLevelEncryptionProfileInput) (*cloudfront.UpdateFieldLevelEncryptionProfileOutput, error) - UpdateFieldLevelEncryptionProfileWithContext(aws.Context, *cloudfront.UpdateFieldLevelEncryptionProfileInput, ...request.Option) (*cloudfront.UpdateFieldLevelEncryptionProfileOutput, error) - UpdateFieldLevelEncryptionProfileRequest(*cloudfront.UpdateFieldLevelEncryptionProfileInput) (*request.Request, *cloudfront.UpdateFieldLevelEncryptionProfileOutput) - - UpdateFunction(*cloudfront.UpdateFunctionInput) (*cloudfront.UpdateFunctionOutput, error) - UpdateFunctionWithContext(aws.Context, *cloudfront.UpdateFunctionInput, ...request.Option) (*cloudfront.UpdateFunctionOutput, error) - UpdateFunctionRequest(*cloudfront.UpdateFunctionInput) (*request.Request, *cloudfront.UpdateFunctionOutput) - - UpdateKeyGroup(*cloudfront.UpdateKeyGroupInput) (*cloudfront.UpdateKeyGroupOutput, error) - UpdateKeyGroupWithContext(aws.Context, *cloudfront.UpdateKeyGroupInput, ...request.Option) (*cloudfront.UpdateKeyGroupOutput, error) - UpdateKeyGroupRequest(*cloudfront.UpdateKeyGroupInput) (*request.Request, *cloudfront.UpdateKeyGroupOutput) - - UpdateKeyValueStore(*cloudfront.UpdateKeyValueStoreInput) (*cloudfront.UpdateKeyValueStoreOutput, error) - UpdateKeyValueStoreWithContext(aws.Context, *cloudfront.UpdateKeyValueStoreInput, ...request.Option) (*cloudfront.UpdateKeyValueStoreOutput, error) - UpdateKeyValueStoreRequest(*cloudfront.UpdateKeyValueStoreInput) (*request.Request, *cloudfront.UpdateKeyValueStoreOutput) - - UpdateOriginAccessControl(*cloudfront.UpdateOriginAccessControlInput) (*cloudfront.UpdateOriginAccessControlOutput, error) - UpdateOriginAccessControlWithContext(aws.Context, *cloudfront.UpdateOriginAccessControlInput, ...request.Option) (*cloudfront.UpdateOriginAccessControlOutput, error) - UpdateOriginAccessControlRequest(*cloudfront.UpdateOriginAccessControlInput) (*request.Request, *cloudfront.UpdateOriginAccessControlOutput) - - UpdateOriginRequestPolicy(*cloudfront.UpdateOriginRequestPolicyInput) (*cloudfront.UpdateOriginRequestPolicyOutput, error) - UpdateOriginRequestPolicyWithContext(aws.Context, *cloudfront.UpdateOriginRequestPolicyInput, ...request.Option) (*cloudfront.UpdateOriginRequestPolicyOutput, error) - UpdateOriginRequestPolicyRequest(*cloudfront.UpdateOriginRequestPolicyInput) (*request.Request, *cloudfront.UpdateOriginRequestPolicyOutput) - - UpdatePublicKey(*cloudfront.UpdatePublicKeyInput) (*cloudfront.UpdatePublicKeyOutput, error) - UpdatePublicKeyWithContext(aws.Context, *cloudfront.UpdatePublicKeyInput, ...request.Option) (*cloudfront.UpdatePublicKeyOutput, error) - UpdatePublicKeyRequest(*cloudfront.UpdatePublicKeyInput) (*request.Request, *cloudfront.UpdatePublicKeyOutput) - - UpdateRealtimeLogConfig(*cloudfront.UpdateRealtimeLogConfigInput) (*cloudfront.UpdateRealtimeLogConfigOutput, error) - UpdateRealtimeLogConfigWithContext(aws.Context, *cloudfront.UpdateRealtimeLogConfigInput, ...request.Option) (*cloudfront.UpdateRealtimeLogConfigOutput, error) - UpdateRealtimeLogConfigRequest(*cloudfront.UpdateRealtimeLogConfigInput) (*request.Request, *cloudfront.UpdateRealtimeLogConfigOutput) - - UpdateResponseHeadersPolicy(*cloudfront.UpdateResponseHeadersPolicyInput) (*cloudfront.UpdateResponseHeadersPolicyOutput, error) - UpdateResponseHeadersPolicyWithContext(aws.Context, *cloudfront.UpdateResponseHeadersPolicyInput, ...request.Option) (*cloudfront.UpdateResponseHeadersPolicyOutput, error) - UpdateResponseHeadersPolicyRequest(*cloudfront.UpdateResponseHeadersPolicyInput) (*request.Request, *cloudfront.UpdateResponseHeadersPolicyOutput) - - UpdateStreamingDistribution(*cloudfront.UpdateStreamingDistributionInput) (*cloudfront.UpdateStreamingDistributionOutput, error) - UpdateStreamingDistributionWithContext(aws.Context, *cloudfront.UpdateStreamingDistributionInput, ...request.Option) (*cloudfront.UpdateStreamingDistributionOutput, error) - UpdateStreamingDistributionRequest(*cloudfront.UpdateStreamingDistributionInput) (*request.Request, *cloudfront.UpdateStreamingDistributionOutput) - - WaitUntilDistributionDeployed(*cloudfront.GetDistributionInput) error - WaitUntilDistributionDeployedWithContext(aws.Context, *cloudfront.GetDistributionInput, ...request.WaiterOption) error - - WaitUntilInvalidationCompleted(*cloudfront.GetInvalidationInput) error - WaitUntilInvalidationCompletedWithContext(aws.Context, *cloudfront.GetInvalidationInput, ...request.WaiterOption) error - - WaitUntilStreamingDistributionDeployed(*cloudfront.GetStreamingDistributionInput) error - WaitUntilStreamingDistributionDeployedWithContext(aws.Context, *cloudfront.GetStreamingDistributionInput, ...request.WaiterOption) error -} - -var _ CloudFrontAPI = (*cloudfront.CloudFront)(nil) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/doc.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/doc.go deleted file mode 100644 index 29fdafa697..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/doc.go +++ /dev/null @@ -1,31 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package cloudfront provides the client and types for making API -// requests to Amazon CloudFront. -// -// This is the Amazon CloudFront API Reference. This guide is for developers -// who need detailed information about CloudFront API actions, data types, and -// errors. For detailed information about CloudFront features, see the Amazon -// CloudFront Developer Guide (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Introduction.html). -// -// See https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31 for more information on this service. -// -// See cloudfront package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudfront/ -// -// # Using the Client -// -// To contact Amazon CloudFront 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 CloudFront client CloudFront for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudfront/#New -package cloudfront diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/errors.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/errors.go deleted file mode 100644 index 66e8b17a9f..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/errors.go +++ /dev/null @@ -1,1018 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudfront - -const ( - - // ErrCodeAccessDenied for service response error code - // "AccessDenied". - // - // Access denied. - ErrCodeAccessDenied = "AccessDenied" - - // ErrCodeBatchTooLarge for service response error code - // "BatchTooLarge". - // - // Invalidation batch specified is too large. - ErrCodeBatchTooLarge = "BatchTooLarge" - - // ErrCodeCNAMEAlreadyExists for service response error code - // "CNAMEAlreadyExists". - // - // The CNAME specified is already defined for CloudFront. - ErrCodeCNAMEAlreadyExists = "CNAMEAlreadyExists" - - // ErrCodeCachePolicyAlreadyExists for service response error code - // "CachePolicyAlreadyExists". - // - // A cache policy with this name already exists. You must provide a unique name. - // To modify an existing cache policy, use UpdateCachePolicy. - ErrCodeCachePolicyAlreadyExists = "CachePolicyAlreadyExists" - - // ErrCodeCachePolicyInUse for service response error code - // "CachePolicyInUse". - // - // Cannot delete the cache policy because it is attached to one or more cache - // behaviors. - ErrCodeCachePolicyInUse = "CachePolicyInUse" - - // ErrCodeCannotChangeImmutablePublicKeyFields for service response error code - // "CannotChangeImmutablePublicKeyFields". - // - // You can't change the value of a public key. - ErrCodeCannotChangeImmutablePublicKeyFields = "CannotChangeImmutablePublicKeyFields" - - // ErrCodeCannotDeleteEntityWhileInUse for service response error code - // "CannotDeleteEntityWhileInUse". - // - // The key value store entity cannot be deleted while it is in use. - ErrCodeCannotDeleteEntityWhileInUse = "CannotDeleteEntityWhileInUse" - - // ErrCodeContinuousDeploymentPolicyAlreadyExists for service response error code - // "ContinuousDeploymentPolicyAlreadyExists". - // - // A continuous deployment policy with this configuration already exists. - ErrCodeContinuousDeploymentPolicyAlreadyExists = "ContinuousDeploymentPolicyAlreadyExists" - - // ErrCodeContinuousDeploymentPolicyInUse for service response error code - // "ContinuousDeploymentPolicyInUse". - // - // You cannot delete a continuous deployment policy that is associated with - // a primary distribution. - ErrCodeContinuousDeploymentPolicyInUse = "ContinuousDeploymentPolicyInUse" - - // ErrCodeDistributionAlreadyExists for service response error code - // "DistributionAlreadyExists". - // - // The caller reference you attempted to create the distribution with is associated - // with another distribution. - ErrCodeDistributionAlreadyExists = "DistributionAlreadyExists" - - // ErrCodeDistributionNotDisabled for service response error code - // "DistributionNotDisabled". - // - // The specified CloudFront distribution is not disabled. You must disable the - // distribution before you can delete it. - ErrCodeDistributionNotDisabled = "DistributionNotDisabled" - - // ErrCodeEntityAlreadyExists for service response error code - // "EntityAlreadyExists". - // - // The key value store entity already exists. You must provide a unique key - // value store entity. - ErrCodeEntityAlreadyExists = "EntityAlreadyExists" - - // ErrCodeEntityLimitExceeded for service response error code - // "EntityLimitExceeded". - // - // The key value store entity limit has been exceeded. - ErrCodeEntityLimitExceeded = "EntityLimitExceeded" - - // ErrCodeEntityNotFound for service response error code - // "EntityNotFound". - // - // The key value store entity was not found. - ErrCodeEntityNotFound = "EntityNotFound" - - // ErrCodeEntitySizeLimitExceeded for service response error code - // "EntitySizeLimitExceeded". - // - // The key value store entity size limit was exceeded. - ErrCodeEntitySizeLimitExceeded = "EntitySizeLimitExceeded" - - // ErrCodeFieldLevelEncryptionConfigAlreadyExists for service response error code - // "FieldLevelEncryptionConfigAlreadyExists". - // - // The specified configuration for field-level encryption already exists. - ErrCodeFieldLevelEncryptionConfigAlreadyExists = "FieldLevelEncryptionConfigAlreadyExists" - - // ErrCodeFieldLevelEncryptionConfigInUse for service response error code - // "FieldLevelEncryptionConfigInUse". - // - // The specified configuration for field-level encryption is in use. - ErrCodeFieldLevelEncryptionConfigInUse = "FieldLevelEncryptionConfigInUse" - - // ErrCodeFieldLevelEncryptionProfileAlreadyExists for service response error code - // "FieldLevelEncryptionProfileAlreadyExists". - // - // The specified profile for field-level encryption already exists. - ErrCodeFieldLevelEncryptionProfileAlreadyExists = "FieldLevelEncryptionProfileAlreadyExists" - - // ErrCodeFieldLevelEncryptionProfileInUse for service response error code - // "FieldLevelEncryptionProfileInUse". - // - // The specified profile for field-level encryption is in use. - ErrCodeFieldLevelEncryptionProfileInUse = "FieldLevelEncryptionProfileInUse" - - // ErrCodeFieldLevelEncryptionProfileSizeExceeded for service response error code - // "FieldLevelEncryptionProfileSizeExceeded". - // - // The maximum size of a profile for field-level encryption was exceeded. - ErrCodeFieldLevelEncryptionProfileSizeExceeded = "FieldLevelEncryptionProfileSizeExceeded" - - // ErrCodeFunctionAlreadyExists for service response error code - // "FunctionAlreadyExists". - // - // A function with the same name already exists in this Amazon Web Services - // account. To create a function, you must provide a unique name. To update - // an existing function, use UpdateFunction. - ErrCodeFunctionAlreadyExists = "FunctionAlreadyExists" - - // ErrCodeFunctionInUse for service response error code - // "FunctionInUse". - // - // Cannot delete the function because it's attached to one or more cache behaviors. - ErrCodeFunctionInUse = "FunctionInUse" - - // ErrCodeFunctionSizeLimitExceeded for service response error code - // "FunctionSizeLimitExceeded". - // - // The function is too large. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) - // (formerly known as limits) in the Amazon CloudFront Developer Guide. - ErrCodeFunctionSizeLimitExceeded = "FunctionSizeLimitExceeded" - - // ErrCodeIllegalDelete for service response error code - // "IllegalDelete". - // - // You cannot delete a managed policy. - ErrCodeIllegalDelete = "IllegalDelete" - - // ErrCodeIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior for service response error code - // "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior". - // - // The specified configuration for field-level encryption can't be associated - // with the specified cache behavior. - ErrCodeIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior = "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior" - - // ErrCodeIllegalOriginAccessConfiguration for service response error code - // "IllegalOriginAccessConfiguration". - // - // An origin cannot contain both an origin access control (OAC) and an origin - // access identity (OAI). - ErrCodeIllegalOriginAccessConfiguration = "IllegalOriginAccessConfiguration" - - // ErrCodeIllegalUpdate for service response error code - // "IllegalUpdate". - // - // The update contains modifications that are not allowed. - ErrCodeIllegalUpdate = "IllegalUpdate" - - // ErrCodeInconsistentQuantities for service response error code - // "InconsistentQuantities". - // - // The value of Quantity and the size of Items don't match. - ErrCodeInconsistentQuantities = "InconsistentQuantities" - - // ErrCodeInvalidArgument for service response error code - // "InvalidArgument". - // - // An argument is invalid. - ErrCodeInvalidArgument = "InvalidArgument" - - // ErrCodeInvalidDefaultRootObject for service response error code - // "InvalidDefaultRootObject". - // - // The default root object file name is too big or contains an invalid character. - ErrCodeInvalidDefaultRootObject = "InvalidDefaultRootObject" - - // ErrCodeInvalidDomainNameForOriginAccessControl for service response error code - // "InvalidDomainNameForOriginAccessControl". - // - // An origin access control is associated with an origin whose domain name is - // not supported. - ErrCodeInvalidDomainNameForOriginAccessControl = "InvalidDomainNameForOriginAccessControl" - - // ErrCodeInvalidErrorCode for service response error code - // "InvalidErrorCode". - // - // An invalid error code was specified. - ErrCodeInvalidErrorCode = "InvalidErrorCode" - - // ErrCodeInvalidForwardCookies for service response error code - // "InvalidForwardCookies". - // - // Your request contains forward cookies option which doesn't match with the - // expectation for the whitelisted list of cookie names. Either list of cookie - // names has been specified when not allowed or list of cookie names is missing - // when expected. - ErrCodeInvalidForwardCookies = "InvalidForwardCookies" - - // ErrCodeInvalidFunctionAssociation for service response error code - // "InvalidFunctionAssociation". - // - // A CloudFront function association is invalid. - ErrCodeInvalidFunctionAssociation = "InvalidFunctionAssociation" - - // ErrCodeInvalidGeoRestrictionParameter for service response error code - // "InvalidGeoRestrictionParameter". - // - // The specified geo restriction parameter is not valid. - ErrCodeInvalidGeoRestrictionParameter = "InvalidGeoRestrictionParameter" - - // ErrCodeInvalidHeadersForS3Origin for service response error code - // "InvalidHeadersForS3Origin". - // - // The headers specified are not valid for an Amazon S3 origin. - ErrCodeInvalidHeadersForS3Origin = "InvalidHeadersForS3Origin" - - // ErrCodeInvalidIfMatchVersion for service response error code - // "InvalidIfMatchVersion". - // - // The If-Match version is missing or not valid. - ErrCodeInvalidIfMatchVersion = "InvalidIfMatchVersion" - - // ErrCodeInvalidLambdaFunctionAssociation for service response error code - // "InvalidLambdaFunctionAssociation". - // - // The specified Lambda@Edge function association is invalid. - ErrCodeInvalidLambdaFunctionAssociation = "InvalidLambdaFunctionAssociation" - - // ErrCodeInvalidLocationCode for service response error code - // "InvalidLocationCode". - // - // The location code specified is not valid. - ErrCodeInvalidLocationCode = "InvalidLocationCode" - - // ErrCodeInvalidMinimumProtocolVersion for service response error code - // "InvalidMinimumProtocolVersion". - // - // The minimum protocol version specified is not valid. - ErrCodeInvalidMinimumProtocolVersion = "InvalidMinimumProtocolVersion" - - // ErrCodeInvalidOrigin for service response error code - // "InvalidOrigin". - // - // The Amazon S3 origin server specified does not refer to a valid Amazon S3 - // bucket. - ErrCodeInvalidOrigin = "InvalidOrigin" - - // ErrCodeInvalidOriginAccessControl for service response error code - // "InvalidOriginAccessControl". - // - // The origin access control is not valid. - ErrCodeInvalidOriginAccessControl = "InvalidOriginAccessControl" - - // ErrCodeInvalidOriginAccessIdentity for service response error code - // "InvalidOriginAccessIdentity". - // - // The origin access identity is not valid or doesn't exist. - ErrCodeInvalidOriginAccessIdentity = "InvalidOriginAccessIdentity" - - // ErrCodeInvalidOriginKeepaliveTimeout for service response error code - // "InvalidOriginKeepaliveTimeout". - // - // The keep alive timeout specified for the origin is not valid. - ErrCodeInvalidOriginKeepaliveTimeout = "InvalidOriginKeepaliveTimeout" - - // ErrCodeInvalidOriginReadTimeout for service response error code - // "InvalidOriginReadTimeout". - // - // The read timeout specified for the origin is not valid. - ErrCodeInvalidOriginReadTimeout = "InvalidOriginReadTimeout" - - // ErrCodeInvalidProtocolSettings for service response error code - // "InvalidProtocolSettings". - // - // You cannot specify SSLv3 as the minimum protocol version if you only want - // to support only clients that support Server Name Indication (SNI). - ErrCodeInvalidProtocolSettings = "InvalidProtocolSettings" - - // ErrCodeInvalidQueryStringParameters for service response error code - // "InvalidQueryStringParameters". - // - // The query string parameters specified are not valid. - ErrCodeInvalidQueryStringParameters = "InvalidQueryStringParameters" - - // ErrCodeInvalidRelativePath for service response error code - // "InvalidRelativePath". - // - // The relative path is too big, is not URL-encoded, or does not begin with - // a slash (/). - ErrCodeInvalidRelativePath = "InvalidRelativePath" - - // ErrCodeInvalidRequiredProtocol for service response error code - // "InvalidRequiredProtocol". - // - // This operation requires the HTTPS protocol. Ensure that you specify the HTTPS - // protocol in your request, or omit the RequiredProtocols element from your - // distribution configuration. - ErrCodeInvalidRequiredProtocol = "InvalidRequiredProtocol" - - // ErrCodeInvalidResponseCode for service response error code - // "InvalidResponseCode". - // - // A response code is not valid. - ErrCodeInvalidResponseCode = "InvalidResponseCode" - - // ErrCodeInvalidTTLOrder for service response error code - // "InvalidTTLOrder". - // - // The TTL order specified is not valid. - ErrCodeInvalidTTLOrder = "InvalidTTLOrder" - - // ErrCodeInvalidTagging for service response error code - // "InvalidTagging". - // - // The tagging specified is not valid. - ErrCodeInvalidTagging = "InvalidTagging" - - // ErrCodeInvalidViewerCertificate for service response error code - // "InvalidViewerCertificate". - // - // A viewer certificate specified is not valid. - ErrCodeInvalidViewerCertificate = "InvalidViewerCertificate" - - // ErrCodeInvalidWebACLId for service response error code - // "InvalidWebACLId". - // - // A web ACL ID specified is not valid. To specify a web ACL created using the - // latest version of WAF, use the ACL ARN, for example arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a. - // To specify a web ACL created using WAF Classic, use the ACL ID, for example - // 473e64fd-f30b-4765-81a0-62ad96dd167a. - ErrCodeInvalidWebACLId = "InvalidWebACLId" - - // ErrCodeKeyGroupAlreadyExists for service response error code - // "KeyGroupAlreadyExists". - // - // A key group with this name already exists. You must provide a unique name. - // To modify an existing key group, use UpdateKeyGroup. - ErrCodeKeyGroupAlreadyExists = "KeyGroupAlreadyExists" - - // ErrCodeMissingBody for service response error code - // "MissingBody". - // - // This operation requires a body. Ensure that the body is present and the Content-Type - // header is set. - ErrCodeMissingBody = "MissingBody" - - // ErrCodeMonitoringSubscriptionAlreadyExists for service response error code - // "MonitoringSubscriptionAlreadyExists". - // - // A monitoring subscription already exists for the specified distribution. - ErrCodeMonitoringSubscriptionAlreadyExists = "MonitoringSubscriptionAlreadyExists" - - // ErrCodeNoSuchCachePolicy for service response error code - // "NoSuchCachePolicy". - // - // The cache policy does not exist. - ErrCodeNoSuchCachePolicy = "NoSuchCachePolicy" - - // ErrCodeNoSuchCloudFrontOriginAccessIdentity for service response error code - // "NoSuchCloudFrontOriginAccessIdentity". - // - // The specified origin access identity does not exist. - ErrCodeNoSuchCloudFrontOriginAccessIdentity = "NoSuchCloudFrontOriginAccessIdentity" - - // ErrCodeNoSuchContinuousDeploymentPolicy for service response error code - // "NoSuchContinuousDeploymentPolicy". - // - // The continuous deployment policy doesn't exist. - ErrCodeNoSuchContinuousDeploymentPolicy = "NoSuchContinuousDeploymentPolicy" - - // ErrCodeNoSuchDistribution for service response error code - // "NoSuchDistribution". - // - // The specified distribution does not exist. - ErrCodeNoSuchDistribution = "NoSuchDistribution" - - // ErrCodeNoSuchFieldLevelEncryptionConfig for service response error code - // "NoSuchFieldLevelEncryptionConfig". - // - // The specified configuration for field-level encryption doesn't exist. - ErrCodeNoSuchFieldLevelEncryptionConfig = "NoSuchFieldLevelEncryptionConfig" - - // ErrCodeNoSuchFieldLevelEncryptionProfile for service response error code - // "NoSuchFieldLevelEncryptionProfile". - // - // The specified profile for field-level encryption doesn't exist. - ErrCodeNoSuchFieldLevelEncryptionProfile = "NoSuchFieldLevelEncryptionProfile" - - // ErrCodeNoSuchFunctionExists for service response error code - // "NoSuchFunctionExists". - // - // The function does not exist. - ErrCodeNoSuchFunctionExists = "NoSuchFunctionExists" - - // ErrCodeNoSuchInvalidation for service response error code - // "NoSuchInvalidation". - // - // The specified invalidation does not exist. - ErrCodeNoSuchInvalidation = "NoSuchInvalidation" - - // ErrCodeNoSuchMonitoringSubscription for service response error code - // "NoSuchMonitoringSubscription". - // - // A monitoring subscription does not exist for the specified distribution. - ErrCodeNoSuchMonitoringSubscription = "NoSuchMonitoringSubscription" - - // ErrCodeNoSuchOrigin for service response error code - // "NoSuchOrigin". - // - // No origin exists with the specified Origin Id. - ErrCodeNoSuchOrigin = "NoSuchOrigin" - - // ErrCodeNoSuchOriginAccessControl for service response error code - // "NoSuchOriginAccessControl". - // - // The origin access control does not exist. - ErrCodeNoSuchOriginAccessControl = "NoSuchOriginAccessControl" - - // ErrCodeNoSuchOriginRequestPolicy for service response error code - // "NoSuchOriginRequestPolicy". - // - // The origin request policy does not exist. - ErrCodeNoSuchOriginRequestPolicy = "NoSuchOriginRequestPolicy" - - // ErrCodeNoSuchPublicKey for service response error code - // "NoSuchPublicKey". - // - // The specified public key doesn't exist. - ErrCodeNoSuchPublicKey = "NoSuchPublicKey" - - // ErrCodeNoSuchRealtimeLogConfig for service response error code - // "NoSuchRealtimeLogConfig". - // - // The real-time log configuration does not exist. - ErrCodeNoSuchRealtimeLogConfig = "NoSuchRealtimeLogConfig" - - // ErrCodeNoSuchResource for service response error code - // "NoSuchResource". - // - // A resource that was specified is not valid. - ErrCodeNoSuchResource = "NoSuchResource" - - // ErrCodeNoSuchResponseHeadersPolicy for service response error code - // "NoSuchResponseHeadersPolicy". - // - // The response headers policy does not exist. - ErrCodeNoSuchResponseHeadersPolicy = "NoSuchResponseHeadersPolicy" - - // ErrCodeNoSuchStreamingDistribution for service response error code - // "NoSuchStreamingDistribution". - // - // The specified streaming distribution does not exist. - ErrCodeNoSuchStreamingDistribution = "NoSuchStreamingDistribution" - - // ErrCodeOriginAccessControlAlreadyExists for service response error code - // "OriginAccessControlAlreadyExists". - // - // An origin access control with the specified parameters already exists. - ErrCodeOriginAccessControlAlreadyExists = "OriginAccessControlAlreadyExists" - - // ErrCodeOriginAccessControlInUse for service response error code - // "OriginAccessControlInUse". - // - // Cannot delete the origin access control because it's in use by one or more - // distributions. - ErrCodeOriginAccessControlInUse = "OriginAccessControlInUse" - - // ErrCodeOriginAccessIdentityAlreadyExists for service response error code - // "CloudFrontOriginAccessIdentityAlreadyExists". - // - // If the CallerReference is a value you already sent in a previous request - // to create an identity but the content of the CloudFrontOriginAccessIdentityConfig - // is different from the original request, CloudFront returns a CloudFrontOriginAccessIdentityAlreadyExists - // error. - ErrCodeOriginAccessIdentityAlreadyExists = "CloudFrontOriginAccessIdentityAlreadyExists" - - // ErrCodeOriginAccessIdentityInUse for service response error code - // "CloudFrontOriginAccessIdentityInUse". - // - // The Origin Access Identity specified is already in use. - ErrCodeOriginAccessIdentityInUse = "CloudFrontOriginAccessIdentityInUse" - - // ErrCodeOriginRequestPolicyAlreadyExists for service response error code - // "OriginRequestPolicyAlreadyExists". - // - // An origin request policy with this name already exists. You must provide - // a unique name. To modify an existing origin request policy, use UpdateOriginRequestPolicy. - ErrCodeOriginRequestPolicyAlreadyExists = "OriginRequestPolicyAlreadyExists" - - // ErrCodeOriginRequestPolicyInUse for service response error code - // "OriginRequestPolicyInUse". - // - // Cannot delete the origin request policy because it is attached to one or - // more cache behaviors. - ErrCodeOriginRequestPolicyInUse = "OriginRequestPolicyInUse" - - // ErrCodePreconditionFailed for service response error code - // "PreconditionFailed". - // - // The precondition in one or more of the request fields evaluated to false. - ErrCodePreconditionFailed = "PreconditionFailed" - - // ErrCodePublicKeyAlreadyExists for service response error code - // "PublicKeyAlreadyExists". - // - // The specified public key already exists. - ErrCodePublicKeyAlreadyExists = "PublicKeyAlreadyExists" - - // ErrCodePublicKeyInUse for service response error code - // "PublicKeyInUse". - // - // The specified public key is in use. - ErrCodePublicKeyInUse = "PublicKeyInUse" - - // ErrCodeQueryArgProfileEmpty for service response error code - // "QueryArgProfileEmpty". - // - // No profile specified for the field-level encryption query argument. - ErrCodeQueryArgProfileEmpty = "QueryArgProfileEmpty" - - // ErrCodeRealtimeLogConfigAlreadyExists for service response error code - // "RealtimeLogConfigAlreadyExists". - // - // A real-time log configuration with this name already exists. You must provide - // a unique name. To modify an existing real-time log configuration, use UpdateRealtimeLogConfig. - ErrCodeRealtimeLogConfigAlreadyExists = "RealtimeLogConfigAlreadyExists" - - // ErrCodeRealtimeLogConfigInUse for service response error code - // "RealtimeLogConfigInUse". - // - // Cannot delete the real-time log configuration because it is attached to one - // or more cache behaviors. - ErrCodeRealtimeLogConfigInUse = "RealtimeLogConfigInUse" - - // ErrCodeRealtimeLogConfigOwnerMismatch for service response error code - // "RealtimeLogConfigOwnerMismatch". - // - // The specified real-time log configuration belongs to a different Amazon Web - // Services account. - ErrCodeRealtimeLogConfigOwnerMismatch = "RealtimeLogConfigOwnerMismatch" - - // ErrCodeResourceInUse for service response error code - // "ResourceInUse". - // - // Cannot delete this resource because it is in use. - ErrCodeResourceInUse = "ResourceInUse" - - // ErrCodeResponseHeadersPolicyAlreadyExists for service response error code - // "ResponseHeadersPolicyAlreadyExists". - // - // A response headers policy with this name already exists. You must provide - // a unique name. To modify an existing response headers policy, use UpdateResponseHeadersPolicy. - ErrCodeResponseHeadersPolicyAlreadyExists = "ResponseHeadersPolicyAlreadyExists" - - // ErrCodeResponseHeadersPolicyInUse for service response error code - // "ResponseHeadersPolicyInUse". - // - // Cannot delete the response headers policy because it is attached to one or - // more cache behaviors in a CloudFront distribution. - ErrCodeResponseHeadersPolicyInUse = "ResponseHeadersPolicyInUse" - - // ErrCodeStagingDistributionInUse for service response error code - // "StagingDistributionInUse". - // - // A continuous deployment policy for this staging distribution already exists. - ErrCodeStagingDistributionInUse = "StagingDistributionInUse" - - // ErrCodeStreamingDistributionAlreadyExists for service response error code - // "StreamingDistributionAlreadyExists". - // - // The caller reference you attempted to create the streaming distribution with - // is associated with another distribution - ErrCodeStreamingDistributionAlreadyExists = "StreamingDistributionAlreadyExists" - - // ErrCodeStreamingDistributionNotDisabled for service response error code - // "StreamingDistributionNotDisabled". - // - // The specified CloudFront distribution is not disabled. You must disable the - // distribution before you can delete it. - ErrCodeStreamingDistributionNotDisabled = "StreamingDistributionNotDisabled" - - // ErrCodeTestFunctionFailed for service response error code - // "TestFunctionFailed". - // - // The CloudFront function failed. - ErrCodeTestFunctionFailed = "TestFunctionFailed" - - // ErrCodeTooLongCSPInResponseHeadersPolicy for service response error code - // "TooLongCSPInResponseHeadersPolicy". - // - // The length of the Content-Security-Policy header value in the response headers - // policy exceeds the maximum. - // - // For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) - // (formerly known as limits) in the Amazon CloudFront Developer Guide. - ErrCodeTooLongCSPInResponseHeadersPolicy = "TooLongCSPInResponseHeadersPolicy" - - // ErrCodeTooManyCacheBehaviors for service response error code - // "TooManyCacheBehaviors". - // - // You cannot create more cache behaviors for the distribution. - ErrCodeTooManyCacheBehaviors = "TooManyCacheBehaviors" - - // ErrCodeTooManyCachePolicies for service response error code - // "TooManyCachePolicies". - // - // You have reached the maximum number of cache policies for this Amazon Web - // Services account. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) - // (formerly known as limits) in the Amazon CloudFront Developer Guide. - ErrCodeTooManyCachePolicies = "TooManyCachePolicies" - - // ErrCodeTooManyCertificates for service response error code - // "TooManyCertificates". - // - // You cannot create anymore custom SSL/TLS certificates. - ErrCodeTooManyCertificates = "TooManyCertificates" - - // ErrCodeTooManyCloudFrontOriginAccessIdentities for service response error code - // "TooManyCloudFrontOriginAccessIdentities". - // - // Processing your request would cause you to exceed the maximum number of origin - // access identities allowed. - ErrCodeTooManyCloudFrontOriginAccessIdentities = "TooManyCloudFrontOriginAccessIdentities" - - // ErrCodeTooManyContinuousDeploymentPolicies for service response error code - // "TooManyContinuousDeploymentPolicies". - // - // You have reached the maximum number of continuous deployment policies for - // this Amazon Web Services account. - ErrCodeTooManyContinuousDeploymentPolicies = "TooManyContinuousDeploymentPolicies" - - // ErrCodeTooManyCookieNamesInWhiteList for service response error code - // "TooManyCookieNamesInWhiteList". - // - // Your request contains more cookie names in the whitelist than are allowed - // per cache behavior. - ErrCodeTooManyCookieNamesInWhiteList = "TooManyCookieNamesInWhiteList" - - // ErrCodeTooManyCookiesInCachePolicy for service response error code - // "TooManyCookiesInCachePolicy". - // - // The number of cookies in the cache policy exceeds the maximum. For more information, - // see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) - // (formerly known as limits) in the Amazon CloudFront Developer Guide. - ErrCodeTooManyCookiesInCachePolicy = "TooManyCookiesInCachePolicy" - - // ErrCodeTooManyCookiesInOriginRequestPolicy for service response error code - // "TooManyCookiesInOriginRequestPolicy". - // - // The number of cookies in the origin request policy exceeds the maximum. For - // more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) - // (formerly known as limits) in the Amazon CloudFront Developer Guide. - ErrCodeTooManyCookiesInOriginRequestPolicy = "TooManyCookiesInOriginRequestPolicy" - - // ErrCodeTooManyCustomHeadersInResponseHeadersPolicy for service response error code - // "TooManyCustomHeadersInResponseHeadersPolicy". - // - // The number of custom headers in the response headers policy exceeds the maximum. - // - // For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) - // (formerly known as limits) in the Amazon CloudFront Developer Guide. - ErrCodeTooManyCustomHeadersInResponseHeadersPolicy = "TooManyCustomHeadersInResponseHeadersPolicy" - - // ErrCodeTooManyDistributionCNAMEs for service response error code - // "TooManyDistributionCNAMEs". - // - // Your request contains more CNAMEs than are allowed per distribution. - ErrCodeTooManyDistributionCNAMEs = "TooManyDistributionCNAMEs" - - // ErrCodeTooManyDistributions for service response error code - // "TooManyDistributions". - // - // Processing your request would cause you to exceed the maximum number of distributions - // allowed. - ErrCodeTooManyDistributions = "TooManyDistributions" - - // ErrCodeTooManyDistributionsAssociatedToCachePolicy for service response error code - // "TooManyDistributionsAssociatedToCachePolicy". - // - // The maximum number of distributions have been associated with the specified - // cache policy. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) - // (formerly known as limits) in the Amazon CloudFront Developer Guide. - ErrCodeTooManyDistributionsAssociatedToCachePolicy = "TooManyDistributionsAssociatedToCachePolicy" - - // ErrCodeTooManyDistributionsAssociatedToFieldLevelEncryptionConfig for service response error code - // "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig". - // - // The maximum number of distributions have been associated with the specified - // configuration for field-level encryption. - ErrCodeTooManyDistributionsAssociatedToFieldLevelEncryptionConfig = "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig" - - // ErrCodeTooManyDistributionsAssociatedToKeyGroup for service response error code - // "TooManyDistributionsAssociatedToKeyGroup". - // - // The number of distributions that reference this key group is more than the - // maximum allowed. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) - // (formerly known as limits) in the Amazon CloudFront Developer Guide. - ErrCodeTooManyDistributionsAssociatedToKeyGroup = "TooManyDistributionsAssociatedToKeyGroup" - - // ErrCodeTooManyDistributionsAssociatedToOriginAccessControl for service response error code - // "TooManyDistributionsAssociatedToOriginAccessControl". - // - // The maximum number of distributions have been associated with the specified - // origin access control. - // - // For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) - // (formerly known as limits) in the Amazon CloudFront Developer Guide. - ErrCodeTooManyDistributionsAssociatedToOriginAccessControl = "TooManyDistributionsAssociatedToOriginAccessControl" - - // ErrCodeTooManyDistributionsAssociatedToOriginRequestPolicy for service response error code - // "TooManyDistributionsAssociatedToOriginRequestPolicy". - // - // The maximum number of distributions have been associated with the specified - // origin request policy. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) - // (formerly known as limits) in the Amazon CloudFront Developer Guide. - ErrCodeTooManyDistributionsAssociatedToOriginRequestPolicy = "TooManyDistributionsAssociatedToOriginRequestPolicy" - - // ErrCodeTooManyDistributionsAssociatedToResponseHeadersPolicy for service response error code - // "TooManyDistributionsAssociatedToResponseHeadersPolicy". - // - // The maximum number of distributions have been associated with the specified - // response headers policy. - // - // For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) - // (formerly known as limits) in the Amazon CloudFront Developer Guide. - ErrCodeTooManyDistributionsAssociatedToResponseHeadersPolicy = "TooManyDistributionsAssociatedToResponseHeadersPolicy" - - // ErrCodeTooManyDistributionsWithFunctionAssociations for service response error code - // "TooManyDistributionsWithFunctionAssociations". - // - // You have reached the maximum number of distributions that are associated - // with a CloudFront function. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) - // (formerly known as limits) in the Amazon CloudFront Developer Guide. - ErrCodeTooManyDistributionsWithFunctionAssociations = "TooManyDistributionsWithFunctionAssociations" - - // ErrCodeTooManyDistributionsWithLambdaAssociations for service response error code - // "TooManyDistributionsWithLambdaAssociations". - // - // Processing your request would cause the maximum number of distributions with - // Lambda@Edge function associations per owner to be exceeded. - ErrCodeTooManyDistributionsWithLambdaAssociations = "TooManyDistributionsWithLambdaAssociations" - - // ErrCodeTooManyDistributionsWithSingleFunctionARN for service response error code - // "TooManyDistributionsWithSingleFunctionARN". - // - // The maximum number of distributions have been associated with the specified - // Lambda@Edge function. - ErrCodeTooManyDistributionsWithSingleFunctionARN = "TooManyDistributionsWithSingleFunctionARN" - - // ErrCodeTooManyFieldLevelEncryptionConfigs for service response error code - // "TooManyFieldLevelEncryptionConfigs". - // - // The maximum number of configurations for field-level encryption have been - // created. - ErrCodeTooManyFieldLevelEncryptionConfigs = "TooManyFieldLevelEncryptionConfigs" - - // ErrCodeTooManyFieldLevelEncryptionContentTypeProfiles for service response error code - // "TooManyFieldLevelEncryptionContentTypeProfiles". - // - // The maximum number of content type profiles for field-level encryption have - // been created. - ErrCodeTooManyFieldLevelEncryptionContentTypeProfiles = "TooManyFieldLevelEncryptionContentTypeProfiles" - - // ErrCodeTooManyFieldLevelEncryptionEncryptionEntities for service response error code - // "TooManyFieldLevelEncryptionEncryptionEntities". - // - // The maximum number of encryption entities for field-level encryption have - // been created. - ErrCodeTooManyFieldLevelEncryptionEncryptionEntities = "TooManyFieldLevelEncryptionEncryptionEntities" - - // ErrCodeTooManyFieldLevelEncryptionFieldPatterns for service response error code - // "TooManyFieldLevelEncryptionFieldPatterns". - // - // The maximum number of field patterns for field-level encryption have been - // created. - ErrCodeTooManyFieldLevelEncryptionFieldPatterns = "TooManyFieldLevelEncryptionFieldPatterns" - - // ErrCodeTooManyFieldLevelEncryptionProfiles for service response error code - // "TooManyFieldLevelEncryptionProfiles". - // - // The maximum number of profiles for field-level encryption have been created. - ErrCodeTooManyFieldLevelEncryptionProfiles = "TooManyFieldLevelEncryptionProfiles" - - // ErrCodeTooManyFieldLevelEncryptionQueryArgProfiles for service response error code - // "TooManyFieldLevelEncryptionQueryArgProfiles". - // - // The maximum number of query arg profiles for field-level encryption have - // been created. - ErrCodeTooManyFieldLevelEncryptionQueryArgProfiles = "TooManyFieldLevelEncryptionQueryArgProfiles" - - // ErrCodeTooManyFunctionAssociations for service response error code - // "TooManyFunctionAssociations". - // - // You have reached the maximum number of CloudFront function associations for - // this distribution. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) - // (formerly known as limits) in the Amazon CloudFront Developer Guide. - ErrCodeTooManyFunctionAssociations = "TooManyFunctionAssociations" - - // ErrCodeTooManyFunctions for service response error code - // "TooManyFunctions". - // - // You have reached the maximum number of CloudFront functions for this Amazon - // Web Services account. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) - // (formerly known as limits) in the Amazon CloudFront Developer Guide. - ErrCodeTooManyFunctions = "TooManyFunctions" - - // ErrCodeTooManyHeadersInCachePolicy for service response error code - // "TooManyHeadersInCachePolicy". - // - // The number of headers in the cache policy exceeds the maximum. For more information, - // see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) - // (formerly known as limits) in the Amazon CloudFront Developer Guide. - ErrCodeTooManyHeadersInCachePolicy = "TooManyHeadersInCachePolicy" - - // ErrCodeTooManyHeadersInForwardedValues for service response error code - // "TooManyHeadersInForwardedValues". - // - // Your request contains too many headers in forwarded values. - ErrCodeTooManyHeadersInForwardedValues = "TooManyHeadersInForwardedValues" - - // ErrCodeTooManyHeadersInOriginRequestPolicy for service response error code - // "TooManyHeadersInOriginRequestPolicy". - // - // The number of headers in the origin request policy exceeds the maximum. For - // more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) - // (formerly known as limits) in the Amazon CloudFront Developer Guide. - ErrCodeTooManyHeadersInOriginRequestPolicy = "TooManyHeadersInOriginRequestPolicy" - - // ErrCodeTooManyInvalidationsInProgress for service response error code - // "TooManyInvalidationsInProgress". - // - // You have exceeded the maximum number of allowable InProgress invalidation - // batch requests, or invalidation objects. - ErrCodeTooManyInvalidationsInProgress = "TooManyInvalidationsInProgress" - - // ErrCodeTooManyKeyGroups for service response error code - // "TooManyKeyGroups". - // - // You have reached the maximum number of key groups for this Amazon Web Services - // account. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) - // (formerly known as limits) in the Amazon CloudFront Developer Guide. - ErrCodeTooManyKeyGroups = "TooManyKeyGroups" - - // ErrCodeTooManyKeyGroupsAssociatedToDistribution for service response error code - // "TooManyKeyGroupsAssociatedToDistribution". - // - // The number of key groups referenced by this distribution is more than the - // maximum allowed. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) - // (formerly known as limits) in the Amazon CloudFront Developer Guide. - ErrCodeTooManyKeyGroupsAssociatedToDistribution = "TooManyKeyGroupsAssociatedToDistribution" - - // ErrCodeTooManyLambdaFunctionAssociations for service response error code - // "TooManyLambdaFunctionAssociations". - // - // Your request contains more Lambda@Edge function associations than are allowed - // per distribution. - ErrCodeTooManyLambdaFunctionAssociations = "TooManyLambdaFunctionAssociations" - - // ErrCodeTooManyOriginAccessControls for service response error code - // "TooManyOriginAccessControls". - // - // The number of origin access controls in your Amazon Web Services account - // exceeds the maximum allowed. - // - // For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) - // (formerly known as limits) in the Amazon CloudFront Developer Guide. - ErrCodeTooManyOriginAccessControls = "TooManyOriginAccessControls" - - // ErrCodeTooManyOriginCustomHeaders for service response error code - // "TooManyOriginCustomHeaders". - // - // Your request contains too many origin custom headers. - ErrCodeTooManyOriginCustomHeaders = "TooManyOriginCustomHeaders" - - // ErrCodeTooManyOriginGroupsPerDistribution for service response error code - // "TooManyOriginGroupsPerDistribution". - // - // Processing your request would cause you to exceed the maximum number of origin - // groups allowed. - ErrCodeTooManyOriginGroupsPerDistribution = "TooManyOriginGroupsPerDistribution" - - // ErrCodeTooManyOriginRequestPolicies for service response error code - // "TooManyOriginRequestPolicies". - // - // You have reached the maximum number of origin request policies for this Amazon - // Web Services account. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) - // (formerly known as limits) in the Amazon CloudFront Developer Guide. - ErrCodeTooManyOriginRequestPolicies = "TooManyOriginRequestPolicies" - - // ErrCodeTooManyOrigins for service response error code - // "TooManyOrigins". - // - // You cannot create more origins for the distribution. - ErrCodeTooManyOrigins = "TooManyOrigins" - - // ErrCodeTooManyPublicKeys for service response error code - // "TooManyPublicKeys". - // - // The maximum number of public keys for field-level encryption have been created. - // To create a new public key, delete one of the existing keys. - ErrCodeTooManyPublicKeys = "TooManyPublicKeys" - - // ErrCodeTooManyPublicKeysInKeyGroup for service response error code - // "TooManyPublicKeysInKeyGroup". - // - // The number of public keys in this key group is more than the maximum allowed. - // For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) - // (formerly known as limits) in the Amazon CloudFront Developer Guide. - ErrCodeTooManyPublicKeysInKeyGroup = "TooManyPublicKeysInKeyGroup" - - // ErrCodeTooManyQueryStringParameters for service response error code - // "TooManyQueryStringParameters". - // - // Your request contains too many query string parameters. - ErrCodeTooManyQueryStringParameters = "TooManyQueryStringParameters" - - // ErrCodeTooManyQueryStringsInCachePolicy for service response error code - // "TooManyQueryStringsInCachePolicy". - // - // The number of query strings in the cache policy exceeds the maximum. For - // more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) - // (formerly known as limits) in the Amazon CloudFront Developer Guide. - ErrCodeTooManyQueryStringsInCachePolicy = "TooManyQueryStringsInCachePolicy" - - // ErrCodeTooManyQueryStringsInOriginRequestPolicy for service response error code - // "TooManyQueryStringsInOriginRequestPolicy". - // - // The number of query strings in the origin request policy exceeds the maximum. - // For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) - // (formerly known as limits) in the Amazon CloudFront Developer Guide. - ErrCodeTooManyQueryStringsInOriginRequestPolicy = "TooManyQueryStringsInOriginRequestPolicy" - - // ErrCodeTooManyRealtimeLogConfigs for service response error code - // "TooManyRealtimeLogConfigs". - // - // You have reached the maximum number of real-time log configurations for this - // Amazon Web Services account. For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) - // (formerly known as limits) in the Amazon CloudFront Developer Guide. - ErrCodeTooManyRealtimeLogConfigs = "TooManyRealtimeLogConfigs" - - // ErrCodeTooManyRemoveHeadersInResponseHeadersPolicy for service response error code - // "TooManyRemoveHeadersInResponseHeadersPolicy". - // - // The number of headers in RemoveHeadersConfig in the response headers policy - // exceeds the maximum. - // - // For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) - // (formerly known as limits) in the Amazon CloudFront Developer Guide. - ErrCodeTooManyRemoveHeadersInResponseHeadersPolicy = "TooManyRemoveHeadersInResponseHeadersPolicy" - - // ErrCodeTooManyResponseHeadersPolicies for service response error code - // "TooManyResponseHeadersPolicies". - // - // You have reached the maximum number of response headers policies for this - // Amazon Web Services account. - // - // For more information, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) - // (formerly known as limits) in the Amazon CloudFront Developer Guide. - ErrCodeTooManyResponseHeadersPolicies = "TooManyResponseHeadersPolicies" - - // ErrCodeTooManyStreamingDistributionCNAMEs for service response error code - // "TooManyStreamingDistributionCNAMEs". - // - // Your request contains more CNAMEs than are allowed per distribution. - ErrCodeTooManyStreamingDistributionCNAMEs = "TooManyStreamingDistributionCNAMEs" - - // ErrCodeTooManyStreamingDistributions for service response error code - // "TooManyStreamingDistributions". - // - // Processing your request would cause you to exceed the maximum number of streaming - // distributions allowed. - ErrCodeTooManyStreamingDistributions = "TooManyStreamingDistributions" - - // ErrCodeTooManyTrustedSigners for service response error code - // "TooManyTrustedSigners". - // - // Your request contains more trusted signers than are allowed per distribution. - ErrCodeTooManyTrustedSigners = "TooManyTrustedSigners" - - // ErrCodeTrustedKeyGroupDoesNotExist for service response error code - // "TrustedKeyGroupDoesNotExist". - // - // The specified key group does not exist. - ErrCodeTrustedKeyGroupDoesNotExist = "TrustedKeyGroupDoesNotExist" - - // ErrCodeTrustedSignerDoesNotExist for service response error code - // "TrustedSignerDoesNotExist". - // - // One or more of your trusted signers don't exist. - ErrCodeTrustedSignerDoesNotExist = "TrustedSignerDoesNotExist" - - // ErrCodeUnsupportedOperation for service response error code - // "UnsupportedOperation". - // - // This operation is not supported in this region. - ErrCodeUnsupportedOperation = "UnsupportedOperation" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/service.go deleted file mode 100644 index 0f19446b2e..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/service.go +++ /dev/null @@ -1,104 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudfront - -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/restxml" -) - -// CloudFront provides the API operation methods for making requests to -// Amazon CloudFront. See this package's package overview docs -// for details on the service. -// -// CloudFront methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type CloudFront 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 = "cloudfront" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "CloudFront" // ServiceID is a unique identifier of a specific service. -) - -// New creates a new instance of the CloudFront 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 CloudFront client from just a session. -// svc := cloudfront.New(mySession) -// -// // Create a CloudFront client with additional configuration -// svc := cloudfront.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudFront { - 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) *CloudFront { - svc := &CloudFront{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - PartitionID: partitionID, - Endpoint: endpoint, - APIVersion: "2020-05-31", - ResolvedRegion: resolvedRegion, - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a CloudFront operation and runs any -// custom request initialization. -func (c *CloudFront) 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/cloudfront/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/waiters.go deleted file mode 100644 index cbebdcca83..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/waiters.go +++ /dev/null @@ -1,148 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package cloudfront - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilDistributionDeployed uses the CloudFront API operation -// GetDistribution 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 *CloudFront) WaitUntilDistributionDeployed(input *GetDistributionInput) error { - return c.WaitUntilDistributionDeployedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilDistributionDeployedWithContext is an extended version of WaitUntilDistributionDeployed. -// 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 *CloudFront) WaitUntilDistributionDeployedWithContext(ctx aws.Context, input *GetDistributionInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilDistributionDeployed", - MaxAttempts: 35, - Delay: request.ConstantWaiterDelay(60 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "Distribution.Status", - Expected: "Deployed", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *GetDistributionInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetDistributionRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilInvalidationCompleted uses the CloudFront API operation -// GetInvalidation 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 *CloudFront) WaitUntilInvalidationCompleted(input *GetInvalidationInput) error { - return c.WaitUntilInvalidationCompletedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilInvalidationCompletedWithContext is an extended version of WaitUntilInvalidationCompleted. -// 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 *CloudFront) WaitUntilInvalidationCompletedWithContext(ctx aws.Context, input *GetInvalidationInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilInvalidationCompleted", - MaxAttempts: 30, - Delay: request.ConstantWaiterDelay(20 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "Invalidation.Status", - Expected: "Completed", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *GetInvalidationInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetInvalidationRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilStreamingDistributionDeployed uses the CloudFront API operation -// GetStreamingDistribution 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 *CloudFront) WaitUntilStreamingDistributionDeployed(input *GetStreamingDistributionInput) error { - return c.WaitUntilStreamingDistributionDeployedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilStreamingDistributionDeployedWithContext is an extended version of WaitUntilStreamingDistributionDeployed. -// 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 *CloudFront) WaitUntilStreamingDistributionDeployedWithContext(ctx aws.Context, input *GetStreamingDistributionInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilStreamingDistributionDeployed", - MaxAttempts: 25, - Delay: request.ConstantWaiterDelay(60 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "StreamingDistribution.Status", - Expected: "Deployed", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *GetStreamingDistributionInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetStreamingDistributionRequest(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/iam/api.go b/vendor/github.com/aws/aws-sdk-go/service/iam/api.go deleted file mode 100644 index d7737eb6ff..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/iam/api.go +++ /dev/null @@ -1,41679 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package iam - -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 opAddClientIDToOpenIDConnectProvider = "AddClientIDToOpenIDConnectProvider" - -// AddClientIDToOpenIDConnectProviderRequest generates a "aws/request.Request" representing the -// client's request for the AddClientIDToOpenIDConnectProvider 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 AddClientIDToOpenIDConnectProvider for more information on using the AddClientIDToOpenIDConnectProvider -// 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 AddClientIDToOpenIDConnectProviderRequest method. -// req, resp := client.AddClientIDToOpenIDConnectProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/AddClientIDToOpenIDConnectProvider -func (c *IAM) AddClientIDToOpenIDConnectProviderRequest(input *AddClientIDToOpenIDConnectProviderInput) (req *request.Request, output *AddClientIDToOpenIDConnectProviderOutput) { - op := &request.Operation{ - Name: opAddClientIDToOpenIDConnectProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddClientIDToOpenIDConnectProviderInput{} - } - - output = &AddClientIDToOpenIDConnectProviderOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddClientIDToOpenIDConnectProvider API operation for AWS Identity and Access Management. -// -// Adds a new client ID (also known as audience) to the list of client IDs already -// registered for the specified IAM OpenID Connect (OIDC) provider resource. -// -// This operation is idempotent; it does not fail or return an error if you -// add an existing client ID to the provider. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation AddClientIDToOpenIDConnectProvider for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/AddClientIDToOpenIDConnectProvider -func (c *IAM) AddClientIDToOpenIDConnectProvider(input *AddClientIDToOpenIDConnectProviderInput) (*AddClientIDToOpenIDConnectProviderOutput, error) { - req, out := c.AddClientIDToOpenIDConnectProviderRequest(input) - return out, req.Send() -} - -// AddClientIDToOpenIDConnectProviderWithContext is the same as AddClientIDToOpenIDConnectProvider with the addition of -// the ability to pass a context and additional request options. -// -// See AddClientIDToOpenIDConnectProvider 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 *IAM) AddClientIDToOpenIDConnectProviderWithContext(ctx aws.Context, input *AddClientIDToOpenIDConnectProviderInput, opts ...request.Option) (*AddClientIDToOpenIDConnectProviderOutput, error) { - req, out := c.AddClientIDToOpenIDConnectProviderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAddRoleToInstanceProfile = "AddRoleToInstanceProfile" - -// AddRoleToInstanceProfileRequest generates a "aws/request.Request" representing the -// client's request for the AddRoleToInstanceProfile 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 AddRoleToInstanceProfile for more information on using the AddRoleToInstanceProfile -// 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 AddRoleToInstanceProfileRequest method. -// req, resp := client.AddRoleToInstanceProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/AddRoleToInstanceProfile -func (c *IAM) AddRoleToInstanceProfileRequest(input *AddRoleToInstanceProfileInput) (req *request.Request, output *AddRoleToInstanceProfileOutput) { - op := &request.Operation{ - Name: opAddRoleToInstanceProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddRoleToInstanceProfileInput{} - } - - output = &AddRoleToInstanceProfileOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddRoleToInstanceProfile API operation for AWS Identity and Access Management. -// -// Adds the specified IAM role to the specified instance profile. An instance -// profile can contain only one role, and this quota cannot be increased. You -// can remove the existing role and then add a different role to an instance -// profile. You must then wait for the change to appear across all of Amazon -// Web Services because of eventual consistency (https://en.wikipedia.org/wiki/Eventual_consistency). -// To force the change, you must disassociate the instance profile (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DisassociateIamInstanceProfile.html) -// and then associate the instance profile (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_AssociateIamInstanceProfile.html), -// or you can stop your instance and then restart it. -// -// The caller of this operation must be granted the PassRole permission on the -// IAM role by a permissions policy. -// -// For more information about roles, see IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) -// in the IAM User Guide. For more information about instance profiles, see -// Using instance profiles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation AddRoleToInstanceProfile for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeUnmodifiableEntityException "UnmodifiableEntity" -// The request was rejected because service-linked roles are protected Amazon -// Web Services resources. Only the service that depends on the service-linked -// role can modify or delete the role on your behalf. The error message includes -// the name of the service that depends on this service-linked role. You must -// request the change through that service. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/AddRoleToInstanceProfile -func (c *IAM) AddRoleToInstanceProfile(input *AddRoleToInstanceProfileInput) (*AddRoleToInstanceProfileOutput, error) { - req, out := c.AddRoleToInstanceProfileRequest(input) - return out, req.Send() -} - -// AddRoleToInstanceProfileWithContext is the same as AddRoleToInstanceProfile with the addition of -// the ability to pass a context and additional request options. -// -// See AddRoleToInstanceProfile 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 *IAM) AddRoleToInstanceProfileWithContext(ctx aws.Context, input *AddRoleToInstanceProfileInput, opts ...request.Option) (*AddRoleToInstanceProfileOutput, error) { - req, out := c.AddRoleToInstanceProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAddUserToGroup = "AddUserToGroup" - -// AddUserToGroupRequest generates a "aws/request.Request" representing the -// client's request for the AddUserToGroup 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 AddUserToGroup for more information on using the AddUserToGroup -// 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 AddUserToGroupRequest method. -// req, resp := client.AddUserToGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/AddUserToGroup -func (c *IAM) AddUserToGroupRequest(input *AddUserToGroupInput) (req *request.Request, output *AddUserToGroupOutput) { - op := &request.Operation{ - Name: opAddUserToGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddUserToGroupInput{} - } - - output = &AddUserToGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddUserToGroup API operation for AWS Identity and Access Management. -// -// Adds the specified user to the specified 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 AWS Identity and Access Management's -// API operation AddUserToGroup for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/AddUserToGroup -func (c *IAM) AddUserToGroup(input *AddUserToGroupInput) (*AddUserToGroupOutput, error) { - req, out := c.AddUserToGroupRequest(input) - return out, req.Send() -} - -// AddUserToGroupWithContext is the same as AddUserToGroup with the addition of -// the ability to pass a context and additional request options. -// -// See AddUserToGroup 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 *IAM) AddUserToGroupWithContext(ctx aws.Context, input *AddUserToGroupInput, opts ...request.Option) (*AddUserToGroupOutput, error) { - req, out := c.AddUserToGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAttachGroupPolicy = "AttachGroupPolicy" - -// AttachGroupPolicyRequest generates a "aws/request.Request" representing the -// client's request for the AttachGroupPolicy 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 AttachGroupPolicy for more information on using the AttachGroupPolicy -// 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 AttachGroupPolicyRequest method. -// req, resp := client.AttachGroupPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/AttachGroupPolicy -func (c *IAM) AttachGroupPolicyRequest(input *AttachGroupPolicyInput) (req *request.Request, output *AttachGroupPolicyOutput) { - op := &request.Operation{ - Name: opAttachGroupPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AttachGroupPolicyInput{} - } - - output = &AttachGroupPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AttachGroupPolicy API operation for AWS Identity and Access Management. -// -// Attaches the specified managed policy to the specified IAM group. -// -// You use this operation to attach a managed policy to a group. To embed an -// inline policy in a group, use PutGroupPolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_PutGroupPolicy.html). -// -// As a best practice, you can validate your IAM policies. To learn more, see -// Validating IAM policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html) -// in the IAM User Guide. -// -// For more information about policies, see Managed policies and inline policies -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation AttachGroupPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodePolicyNotAttachableException "PolicyNotAttachable" -// The request failed because Amazon Web Services service role policies can -// only be attached to the service-linked role for that service. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/AttachGroupPolicy -func (c *IAM) AttachGroupPolicy(input *AttachGroupPolicyInput) (*AttachGroupPolicyOutput, error) { - req, out := c.AttachGroupPolicyRequest(input) - return out, req.Send() -} - -// AttachGroupPolicyWithContext is the same as AttachGroupPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See AttachGroupPolicy 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 *IAM) AttachGroupPolicyWithContext(ctx aws.Context, input *AttachGroupPolicyInput, opts ...request.Option) (*AttachGroupPolicyOutput, error) { - req, out := c.AttachGroupPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAttachRolePolicy = "AttachRolePolicy" - -// AttachRolePolicyRequest generates a "aws/request.Request" representing the -// client's request for the AttachRolePolicy 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 AttachRolePolicy for more information on using the AttachRolePolicy -// 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 AttachRolePolicyRequest method. -// req, resp := client.AttachRolePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/AttachRolePolicy -func (c *IAM) AttachRolePolicyRequest(input *AttachRolePolicyInput) (req *request.Request, output *AttachRolePolicyOutput) { - op := &request.Operation{ - Name: opAttachRolePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AttachRolePolicyInput{} - } - - output = &AttachRolePolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AttachRolePolicy API operation for AWS Identity and Access Management. -// -// Attaches the specified managed policy to the specified IAM role. When you -// attach a managed policy to a role, the managed policy becomes part of the -// role's permission (access) policy. -// -// You cannot use a managed policy as the role's trust policy. The role's trust -// policy is created at the same time as the role, using CreateRole (https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html). -// You can update a role's trust policy using UpdateAssumerolePolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_UpdateAssumeRolePolicy.html). -// -// Use this operation to attach a managed policy to a role. To embed an inline -// policy in a role, use PutRolePolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_PutRolePolicy.html). -// For more information about policies, see Managed policies and inline policies -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// As a best practice, you can validate your IAM policies. To learn more, see -// Validating IAM policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation AttachRolePolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeUnmodifiableEntityException "UnmodifiableEntity" -// The request was rejected because service-linked roles are protected Amazon -// Web Services resources. Only the service that depends on the service-linked -// role can modify or delete the role on your behalf. The error message includes -// the name of the service that depends on this service-linked role. You must -// request the change through that service. -// -// - ErrCodePolicyNotAttachableException "PolicyNotAttachable" -// The request failed because Amazon Web Services service role policies can -// only be attached to the service-linked role for that service. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/AttachRolePolicy -func (c *IAM) AttachRolePolicy(input *AttachRolePolicyInput) (*AttachRolePolicyOutput, error) { - req, out := c.AttachRolePolicyRequest(input) - return out, req.Send() -} - -// AttachRolePolicyWithContext is the same as AttachRolePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See AttachRolePolicy 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 *IAM) AttachRolePolicyWithContext(ctx aws.Context, input *AttachRolePolicyInput, opts ...request.Option) (*AttachRolePolicyOutput, error) { - req, out := c.AttachRolePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAttachUserPolicy = "AttachUserPolicy" - -// AttachUserPolicyRequest generates a "aws/request.Request" representing the -// client's request for the AttachUserPolicy 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 AttachUserPolicy for more information on using the AttachUserPolicy -// 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 AttachUserPolicyRequest method. -// req, resp := client.AttachUserPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/AttachUserPolicy -func (c *IAM) AttachUserPolicyRequest(input *AttachUserPolicyInput) (req *request.Request, output *AttachUserPolicyOutput) { - op := &request.Operation{ - Name: opAttachUserPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AttachUserPolicyInput{} - } - - output = &AttachUserPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AttachUserPolicy API operation for AWS Identity and Access Management. -// -// Attaches the specified managed policy to the specified user. -// -// You use this operation to attach a managed policy to a user. To embed an -// inline policy in a user, use PutUserPolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_PutUserPolicy.html). -// -// As a best practice, you can validate your IAM policies. To learn more, see -// Validating IAM policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html) -// in the IAM User Guide. -// -// For more information about policies, see Managed policies and inline policies -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation AttachUserPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodePolicyNotAttachableException "PolicyNotAttachable" -// The request failed because Amazon Web Services service role policies can -// only be attached to the service-linked role for that service. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/AttachUserPolicy -func (c *IAM) AttachUserPolicy(input *AttachUserPolicyInput) (*AttachUserPolicyOutput, error) { - req, out := c.AttachUserPolicyRequest(input) - return out, req.Send() -} - -// AttachUserPolicyWithContext is the same as AttachUserPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See AttachUserPolicy 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 *IAM) AttachUserPolicyWithContext(ctx aws.Context, input *AttachUserPolicyInput, opts ...request.Option) (*AttachUserPolicyOutput, error) { - req, out := c.AttachUserPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opChangePassword = "ChangePassword" - -// ChangePasswordRequest generates a "aws/request.Request" representing the -// client's request for the ChangePassword 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 ChangePassword for more information on using the ChangePassword -// 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 ChangePasswordRequest method. -// req, resp := client.ChangePasswordRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ChangePassword -func (c *IAM) ChangePasswordRequest(input *ChangePasswordInput) (req *request.Request, output *ChangePasswordOutput) { - op := &request.Operation{ - Name: opChangePassword, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ChangePasswordInput{} - } - - output = &ChangePasswordOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ChangePassword API operation for AWS Identity and Access Management. -// -// Changes the password of the IAM user who is calling this operation. This -// operation can be performed using the CLI, the Amazon Web Services API, or -// the My Security Credentials page in the Amazon Web Services Management Console. -// The Amazon Web Services account root user password is not affected by this -// operation. -// -// Use UpdateLoginProfile to use the CLI, the Amazon Web Services API, or the -// Users page in the IAM console to change the password for any IAM user. For -// more information about modifying passwords, see Managing passwords (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingLogins.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation ChangePassword for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidUserTypeException "InvalidUserType" -// The request was rejected because the type of user for the transaction was -// incorrect. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeEntityTemporarilyUnmodifiableException "EntityTemporarilyUnmodifiable" -// The request was rejected because it referenced an entity that is temporarily -// unmodifiable, such as a user name that was deleted and then recreated. The -// error indicates that the request is likely to succeed if you try again after -// waiting several minutes. The error message describes the entity. -// -// - ErrCodePasswordPolicyViolationException "PasswordPolicyViolation" -// The request was rejected because the provided password did not meet the requirements -// imposed by the account password policy. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ChangePassword -func (c *IAM) ChangePassword(input *ChangePasswordInput) (*ChangePasswordOutput, error) { - req, out := c.ChangePasswordRequest(input) - return out, req.Send() -} - -// ChangePasswordWithContext is the same as ChangePassword with the addition of -// the ability to pass a context and additional request options. -// -// See ChangePassword 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 *IAM) ChangePasswordWithContext(ctx aws.Context, input *ChangePasswordInput, opts ...request.Option) (*ChangePasswordOutput, error) { - req, out := c.ChangePasswordRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateAccessKey = "CreateAccessKey" - -// CreateAccessKeyRequest generates a "aws/request.Request" representing the -// client's request for the CreateAccessKey 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 CreateAccessKey for more information on using the CreateAccessKey -// 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 CreateAccessKeyRequest method. -// req, resp := client.CreateAccessKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateAccessKey -func (c *IAM) CreateAccessKeyRequest(input *CreateAccessKeyInput) (req *request.Request, output *CreateAccessKeyOutput) { - op := &request.Operation{ - Name: opCreateAccessKey, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateAccessKeyInput{} - } - - output = &CreateAccessKeyOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateAccessKey API operation for AWS Identity and Access Management. -// -// Creates a new Amazon Web Services secret access key and corresponding Amazon -// Web Services access key ID for the specified user. The default status for -// new keys is Active. -// -// If you do not specify a user name, IAM determines the user name implicitly -// based on the Amazon Web Services access key ID signing the request. This -// operation works for access keys under the Amazon Web Services account. Consequently, -// you can use this operation to manage Amazon Web Services account root user -// credentials. This is true even if the Amazon Web Services account has no -// associated users. -// -// For information about quotas on the number of keys you can create, see IAM -// and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM User Guide. -// -// To ensure the security of your Amazon Web Services account, the secret access -// key is accessible only during key and user creation. You must save the key -// (for example, in a text file) if you want to be able to access it again. -// If a secret key is lost, you can delete the access keys for the associated -// user and then create new keys. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation CreateAccessKey for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateAccessKey -func (c *IAM) CreateAccessKey(input *CreateAccessKeyInput) (*CreateAccessKeyOutput, error) { - req, out := c.CreateAccessKeyRequest(input) - return out, req.Send() -} - -// CreateAccessKeyWithContext is the same as CreateAccessKey with the addition of -// the ability to pass a context and additional request options. -// -// See CreateAccessKey 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 *IAM) CreateAccessKeyWithContext(ctx aws.Context, input *CreateAccessKeyInput, opts ...request.Option) (*CreateAccessKeyOutput, error) { - req, out := c.CreateAccessKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateAccountAlias = "CreateAccountAlias" - -// CreateAccountAliasRequest generates a "aws/request.Request" representing the -// client's request for the CreateAccountAlias 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 CreateAccountAlias for more information on using the CreateAccountAlias -// 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 CreateAccountAliasRequest method. -// req, resp := client.CreateAccountAliasRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateAccountAlias -func (c *IAM) CreateAccountAliasRequest(input *CreateAccountAliasInput) (req *request.Request, output *CreateAccountAliasOutput) { - op := &request.Operation{ - Name: opCreateAccountAlias, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateAccountAliasInput{} - } - - output = &CreateAccountAliasOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateAccountAlias API operation for AWS Identity and Access Management. -// -// Creates an alias for your Amazon Web Services account. For information about -// using an Amazon Web Services account alias, see Creating, deleting, and listing -// an Amazon Web Services account alias (https://docs.aws.amazon.com/signin/latest/userguide/CreateAccountAlias.html) -// in the Amazon Web Services Sign-In 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 AWS Identity and Access Management's -// API operation CreateAccountAlias for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateAccountAlias -func (c *IAM) CreateAccountAlias(input *CreateAccountAliasInput) (*CreateAccountAliasOutput, error) { - req, out := c.CreateAccountAliasRequest(input) - return out, req.Send() -} - -// CreateAccountAliasWithContext is the same as CreateAccountAlias with the addition of -// the ability to pass a context and additional request options. -// -// See CreateAccountAlias 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 *IAM) CreateAccountAliasWithContext(ctx aws.Context, input *CreateAccountAliasInput, opts ...request.Option) (*CreateAccountAliasOutput, error) { - req, out := c.CreateAccountAliasRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateGroup = "CreateGroup" - -// CreateGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateGroup 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 CreateGroup for more information on using the CreateGroup -// 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 CreateGroupRequest method. -// req, resp := client.CreateGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateGroup -func (c *IAM) CreateGroupRequest(input *CreateGroupInput) (req *request.Request, output *CreateGroupOutput) { - op := &request.Operation{ - Name: opCreateGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateGroupInput{} - } - - output = &CreateGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateGroup API operation for AWS Identity and Access Management. -// -// Creates a new group. -// -// For information about the number of groups you can create, see IAM and STS -// quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation CreateGroup for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateGroup -func (c *IAM) CreateGroup(input *CreateGroupInput) (*CreateGroupOutput, error) { - req, out := c.CreateGroupRequest(input) - return out, req.Send() -} - -// CreateGroupWithContext is the same as CreateGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateGroup 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 *IAM) CreateGroupWithContext(ctx aws.Context, input *CreateGroupInput, opts ...request.Option) (*CreateGroupOutput, error) { - req, out := c.CreateGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateInstanceProfile = "CreateInstanceProfile" - -// CreateInstanceProfileRequest generates a "aws/request.Request" representing the -// client's request for the CreateInstanceProfile 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 CreateInstanceProfile for more information on using the CreateInstanceProfile -// 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 CreateInstanceProfileRequest method. -// req, resp := client.CreateInstanceProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateInstanceProfile -func (c *IAM) CreateInstanceProfileRequest(input *CreateInstanceProfileInput) (req *request.Request, output *CreateInstanceProfileOutput) { - op := &request.Operation{ - Name: opCreateInstanceProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateInstanceProfileInput{} - } - - output = &CreateInstanceProfileOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateInstanceProfile API operation for AWS Identity and Access Management. -// -// Creates a new instance profile. For information about instance profiles, -// see Using roles for applications on Amazon EC2 (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html) -// in the IAM User Guide, and Instance profiles (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#ec2-instance-profile) -// in the Amazon EC2 User Guide. -// -// For information about the number of instance profiles you can create, see -// IAM object quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation CreateInstanceProfile for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateInstanceProfile -func (c *IAM) CreateInstanceProfile(input *CreateInstanceProfileInput) (*CreateInstanceProfileOutput, error) { - req, out := c.CreateInstanceProfileRequest(input) - return out, req.Send() -} - -// CreateInstanceProfileWithContext is the same as CreateInstanceProfile with the addition of -// the ability to pass a context and additional request options. -// -// See CreateInstanceProfile 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 *IAM) CreateInstanceProfileWithContext(ctx aws.Context, input *CreateInstanceProfileInput, opts ...request.Option) (*CreateInstanceProfileOutput, error) { - req, out := c.CreateInstanceProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateLoginProfile = "CreateLoginProfile" - -// CreateLoginProfileRequest generates a "aws/request.Request" representing the -// client's request for the CreateLoginProfile 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 CreateLoginProfile for more information on using the CreateLoginProfile -// 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 CreateLoginProfileRequest method. -// req, resp := client.CreateLoginProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateLoginProfile -func (c *IAM) CreateLoginProfileRequest(input *CreateLoginProfileInput) (req *request.Request, output *CreateLoginProfileOutput) { - op := &request.Operation{ - Name: opCreateLoginProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateLoginProfileInput{} - } - - output = &CreateLoginProfileOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateLoginProfile API operation for AWS Identity and Access Management. -// -// Creates a password for the specified IAM user. A password allows an IAM user -// to access Amazon Web Services services through the Amazon Web Services Management -// Console. -// -// You can use the CLI, the Amazon Web Services API, or the Users page in the -// IAM console to create a password for any IAM user. Use ChangePassword to -// update your own existing password in the My Security Credentials page in -// the Amazon Web Services Management Console. -// -// For more information about managing passwords, see Managing passwords (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingLogins.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation CreateLoginProfile for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodePasswordPolicyViolationException "PasswordPolicyViolation" -// The request was rejected because the provided password did not meet the requirements -// imposed by the account password policy. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateLoginProfile -func (c *IAM) CreateLoginProfile(input *CreateLoginProfileInput) (*CreateLoginProfileOutput, error) { - req, out := c.CreateLoginProfileRequest(input) - return out, req.Send() -} - -// CreateLoginProfileWithContext is the same as CreateLoginProfile with the addition of -// the ability to pass a context and additional request options. -// -// See CreateLoginProfile 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 *IAM) CreateLoginProfileWithContext(ctx aws.Context, input *CreateLoginProfileInput, opts ...request.Option) (*CreateLoginProfileOutput, error) { - req, out := c.CreateLoginProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateOpenIDConnectProvider = "CreateOpenIDConnectProvider" - -// CreateOpenIDConnectProviderRequest generates a "aws/request.Request" representing the -// client's request for the CreateOpenIDConnectProvider 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 CreateOpenIDConnectProvider for more information on using the CreateOpenIDConnectProvider -// 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 CreateOpenIDConnectProviderRequest method. -// req, resp := client.CreateOpenIDConnectProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateOpenIDConnectProvider -func (c *IAM) CreateOpenIDConnectProviderRequest(input *CreateOpenIDConnectProviderInput) (req *request.Request, output *CreateOpenIDConnectProviderOutput) { - op := &request.Operation{ - Name: opCreateOpenIDConnectProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateOpenIDConnectProviderInput{} - } - - output = &CreateOpenIDConnectProviderOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateOpenIDConnectProvider API operation for AWS Identity and Access Management. -// -// Creates an IAM entity to describe an identity provider (IdP) that supports -// OpenID Connect (OIDC) (http://openid.net/connect/). -// -// The OIDC provider that you create with this operation can be used as a principal -// in a role's trust policy. Such a policy establishes a trust relationship -// between Amazon Web Services and the OIDC provider. -// -// If you are using an OIDC identity provider from Google, Facebook, or Amazon -// Cognito, you don't need to create a separate IAM identity provider. These -// OIDC identity providers are already built-in to Amazon Web Services and are -// available for your use. Instead, you can move directly to creating new roles -// using your identity provider. To learn more, see Creating a role for web -// identity or OpenID connect federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_oidc.html) -// in the IAM User Guide. -// -// When you create the IAM OIDC provider, you specify the following: -// -// - The URL of the OIDC identity provider (IdP) to trust -// -// - A list of client IDs (also known as audiences) that identify the application -// or applications allowed to authenticate using the OIDC provider -// -// - A list of tags that are attached to the specified IAM OIDC provider -// -// - A list of thumbprints of one or more server certificates that the IdP -// uses -// -// You get all of this information from the OIDC IdP you want to use to access -// Amazon Web Services. -// -// Amazon Web Services secures communication with some OIDC identity providers -// (IdPs) through our library of trusted root certificate authorities (CAs) -// instead of using a certificate thumbprint to verify your IdP server certificate. -// In these cases, your legacy thumbprint remains in your configuration, but -// is no longer used for validation. These OIDC IdPs include Auth0, GitHub, -// GitLab, Google, and those that use an Amazon S3 bucket to host a JSON Web -// Key Set (JWKS) endpoint. -// -// The trust for the OIDC provider is derived from the IAM provider that this -// operation creates. Therefore, it is best to limit access to the CreateOpenIDConnectProvider -// operation to highly privileged users. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation CreateOpenIDConnectProvider for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// - ErrCodeOpenIdIdpCommunicationErrorException "OpenIdIdpCommunicationError" -// The request failed because IAM cannot connect to the OpenID Connect identity -// provider URL. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateOpenIDConnectProvider -func (c *IAM) CreateOpenIDConnectProvider(input *CreateOpenIDConnectProviderInput) (*CreateOpenIDConnectProviderOutput, error) { - req, out := c.CreateOpenIDConnectProviderRequest(input) - return out, req.Send() -} - -// CreateOpenIDConnectProviderWithContext is the same as CreateOpenIDConnectProvider with the addition of -// the ability to pass a context and additional request options. -// -// See CreateOpenIDConnectProvider 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 *IAM) CreateOpenIDConnectProviderWithContext(ctx aws.Context, input *CreateOpenIDConnectProviderInput, opts ...request.Option) (*CreateOpenIDConnectProviderOutput, error) { - req, out := c.CreateOpenIDConnectProviderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreatePolicy = "CreatePolicy" - -// CreatePolicyRequest generates a "aws/request.Request" representing the -// client's request for the CreatePolicy 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 CreatePolicy for more information on using the CreatePolicy -// 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 CreatePolicyRequest method. -// req, resp := client.CreatePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreatePolicy -func (c *IAM) CreatePolicyRequest(input *CreatePolicyInput) (req *request.Request, output *CreatePolicyOutput) { - op := &request.Operation{ - Name: opCreatePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreatePolicyInput{} - } - - output = &CreatePolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreatePolicy API operation for AWS Identity and Access Management. -// -// Creates a new managed policy for your Amazon Web Services account. -// -// This operation creates a policy version with a version identifier of v1 and -// sets v1 as the policy's default version. For more information about policy -// versions, see Versioning for managed policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) -// in the IAM User Guide. -// -// As a best practice, you can validate your IAM policies. To learn more, see -// Validating IAM policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html) -// in the IAM User Guide. -// -// For more information about managed policies in general, see Managed policies -// and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation CreatePolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument" -// The request was rejected because the policy document was malformed. The error -// message describes the specific error. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreatePolicy -func (c *IAM) CreatePolicy(input *CreatePolicyInput) (*CreatePolicyOutput, error) { - req, out := c.CreatePolicyRequest(input) - return out, req.Send() -} - -// CreatePolicyWithContext is the same as CreatePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See CreatePolicy 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 *IAM) CreatePolicyWithContext(ctx aws.Context, input *CreatePolicyInput, opts ...request.Option) (*CreatePolicyOutput, error) { - req, out := c.CreatePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreatePolicyVersion = "CreatePolicyVersion" - -// CreatePolicyVersionRequest generates a "aws/request.Request" representing the -// client's request for the CreatePolicyVersion 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 CreatePolicyVersion for more information on using the CreatePolicyVersion -// 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 CreatePolicyVersionRequest method. -// req, resp := client.CreatePolicyVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreatePolicyVersion -func (c *IAM) CreatePolicyVersionRequest(input *CreatePolicyVersionInput) (req *request.Request, output *CreatePolicyVersionOutput) { - op := &request.Operation{ - Name: opCreatePolicyVersion, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreatePolicyVersionInput{} - } - - output = &CreatePolicyVersionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreatePolicyVersion API operation for AWS Identity and Access Management. -// -// Creates a new version of the specified managed policy. To update a managed -// policy, you create a new policy version. A managed policy can have up to -// five versions. If the policy has five versions, you must delete an existing -// version using DeletePolicyVersion before you create a new version. -// -// Optionally, you can set the new version as the policy's default version. -// The default version is the version that is in effect for the IAM users, groups, -// and roles to which the policy is attached. -// -// For more information about managed policy versions, see Versioning for managed -// policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation CreatePolicyVersion for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument" -// The request was rejected because the policy document was malformed. The error -// message describes the specific error. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreatePolicyVersion -func (c *IAM) CreatePolicyVersion(input *CreatePolicyVersionInput) (*CreatePolicyVersionOutput, error) { - req, out := c.CreatePolicyVersionRequest(input) - return out, req.Send() -} - -// CreatePolicyVersionWithContext is the same as CreatePolicyVersion with the addition of -// the ability to pass a context and additional request options. -// -// See CreatePolicyVersion 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 *IAM) CreatePolicyVersionWithContext(ctx aws.Context, input *CreatePolicyVersionInput, opts ...request.Option) (*CreatePolicyVersionOutput, error) { - req, out := c.CreatePolicyVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateRole = "CreateRole" - -// CreateRoleRequest generates a "aws/request.Request" representing the -// client's request for the CreateRole 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 CreateRole for more information on using the CreateRole -// 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 CreateRoleRequest method. -// req, resp := client.CreateRoleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateRole -func (c *IAM) CreateRoleRequest(input *CreateRoleInput) (req *request.Request, output *CreateRoleOutput) { - op := &request.Operation{ - Name: opCreateRole, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateRoleInput{} - } - - output = &CreateRoleOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateRole API operation for AWS Identity and Access Management. -// -// Creates a new role for your Amazon Web Services account. -// -// For more information about roles, see IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) -// in the IAM User Guide. For information about quotas for role names and the -// number of roles you can create, see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation CreateRole for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument" -// The request was rejected because the policy document was malformed. The error -// message describes the specific error. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateRole -func (c *IAM) CreateRole(input *CreateRoleInput) (*CreateRoleOutput, error) { - req, out := c.CreateRoleRequest(input) - return out, req.Send() -} - -// CreateRoleWithContext is the same as CreateRole with the addition of -// the ability to pass a context and additional request options. -// -// See CreateRole 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 *IAM) CreateRoleWithContext(ctx aws.Context, input *CreateRoleInput, opts ...request.Option) (*CreateRoleOutput, error) { - req, out := c.CreateRoleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateSAMLProvider = "CreateSAMLProvider" - -// CreateSAMLProviderRequest generates a "aws/request.Request" representing the -// client's request for the CreateSAMLProvider 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 CreateSAMLProvider for more information on using the CreateSAMLProvider -// 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 CreateSAMLProviderRequest method. -// req, resp := client.CreateSAMLProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateSAMLProvider -func (c *IAM) CreateSAMLProviderRequest(input *CreateSAMLProviderInput) (req *request.Request, output *CreateSAMLProviderOutput) { - op := &request.Operation{ - Name: opCreateSAMLProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateSAMLProviderInput{} - } - - output = &CreateSAMLProviderOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateSAMLProvider API operation for AWS Identity and Access Management. -// -// Creates an IAM resource that describes an identity provider (IdP) that supports -// SAML 2.0. -// -// The SAML provider resource that you create with this operation can be used -// as a principal in an IAM role's trust policy. Such a policy can enable federated -// users who sign in using the SAML IdP to assume the role. You can create an -// IAM role that supports Web-based single sign-on (SSO) to the Amazon Web Services -// Management Console or one that supports API access to Amazon Web Services. -// -// When you create the SAML provider resource, you upload a SAML metadata document -// that you get from your IdP. That document includes the issuer's name, expiration -// information, and keys that can be used to validate the SAML authentication -// response (assertions) that the IdP sends. You must generate the metadata -// document using the identity management software that is used as your organization's -// IdP. -// -// This operation requires Signature Version 4 (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). -// -// For more information, see Enabling SAML 2.0 federated users to access the -// Amazon Web Services Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-saml.html) -// and About SAML 2.0-based federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation CreateSAMLProvider for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateSAMLProvider -func (c *IAM) CreateSAMLProvider(input *CreateSAMLProviderInput) (*CreateSAMLProviderOutput, error) { - req, out := c.CreateSAMLProviderRequest(input) - return out, req.Send() -} - -// CreateSAMLProviderWithContext is the same as CreateSAMLProvider with the addition of -// the ability to pass a context and additional request options. -// -// See CreateSAMLProvider 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 *IAM) CreateSAMLProviderWithContext(ctx aws.Context, input *CreateSAMLProviderInput, opts ...request.Option) (*CreateSAMLProviderOutput, error) { - req, out := c.CreateSAMLProviderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateServiceLinkedRole = "CreateServiceLinkedRole" - -// CreateServiceLinkedRoleRequest generates a "aws/request.Request" representing the -// client's request for the CreateServiceLinkedRole 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 CreateServiceLinkedRole for more information on using the CreateServiceLinkedRole -// 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 CreateServiceLinkedRoleRequest method. -// req, resp := client.CreateServiceLinkedRoleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateServiceLinkedRole -func (c *IAM) CreateServiceLinkedRoleRequest(input *CreateServiceLinkedRoleInput) (req *request.Request, output *CreateServiceLinkedRoleOutput) { - op := &request.Operation{ - Name: opCreateServiceLinkedRole, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateServiceLinkedRoleInput{} - } - - output = &CreateServiceLinkedRoleOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateServiceLinkedRole API operation for AWS Identity and Access Management. -// -// Creates an IAM role that is linked to a specific Amazon Web Services service. -// The service controls the attached policies and when the role can be deleted. -// This helps ensure that the service is not broken by an unexpectedly changed -// or deleted role, which could put your Amazon Web Services resources into -// an unknown state. Allowing the service to control the role helps improve -// service stability and proper cleanup when a service and its role are no longer -// needed. For more information, see Using service-linked roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html) -// in the IAM User Guide. -// -// To attach a policy to this service-linked role, you must make the request -// using the Amazon Web Services service that depends on this role. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation CreateServiceLinkedRole for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateServiceLinkedRole -func (c *IAM) CreateServiceLinkedRole(input *CreateServiceLinkedRoleInput) (*CreateServiceLinkedRoleOutput, error) { - req, out := c.CreateServiceLinkedRoleRequest(input) - return out, req.Send() -} - -// CreateServiceLinkedRoleWithContext is the same as CreateServiceLinkedRole with the addition of -// the ability to pass a context and additional request options. -// -// See CreateServiceLinkedRole 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 *IAM) CreateServiceLinkedRoleWithContext(ctx aws.Context, input *CreateServiceLinkedRoleInput, opts ...request.Option) (*CreateServiceLinkedRoleOutput, error) { - req, out := c.CreateServiceLinkedRoleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateServiceSpecificCredential = "CreateServiceSpecificCredential" - -// CreateServiceSpecificCredentialRequest generates a "aws/request.Request" representing the -// client's request for the CreateServiceSpecificCredential 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 CreateServiceSpecificCredential for more information on using the CreateServiceSpecificCredential -// 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 CreateServiceSpecificCredentialRequest method. -// req, resp := client.CreateServiceSpecificCredentialRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateServiceSpecificCredential -func (c *IAM) CreateServiceSpecificCredentialRequest(input *CreateServiceSpecificCredentialInput) (req *request.Request, output *CreateServiceSpecificCredentialOutput) { - op := &request.Operation{ - Name: opCreateServiceSpecificCredential, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateServiceSpecificCredentialInput{} - } - - output = &CreateServiceSpecificCredentialOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateServiceSpecificCredential API operation for AWS Identity and Access Management. -// -// Generates a set of credentials consisting of a user name and password that -// can be used to access the service specified in the request. These credentials -// are generated by IAM, and can be used only for the specified service. -// -// You can have a maximum of two sets of service-specific credentials for each -// supported service per user. -// -// You can create service-specific credentials for CodeCommit and Amazon Keyspaces -// (for Apache Cassandra). -// -// You can reset the password to a new service-generated value by calling ResetServiceSpecificCredential. -// -// For more information about service-specific credentials, see Using IAM with -// CodeCommit: Git credentials, SSH keys, and Amazon Web Services access keys -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_ssh-keys.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation CreateServiceSpecificCredential for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceNotSupportedException "NotSupportedService" -// The specified service does not support service-specific credentials. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateServiceSpecificCredential -func (c *IAM) CreateServiceSpecificCredential(input *CreateServiceSpecificCredentialInput) (*CreateServiceSpecificCredentialOutput, error) { - req, out := c.CreateServiceSpecificCredentialRequest(input) - return out, req.Send() -} - -// CreateServiceSpecificCredentialWithContext is the same as CreateServiceSpecificCredential with the addition of -// the ability to pass a context and additional request options. -// -// See CreateServiceSpecificCredential 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 *IAM) CreateServiceSpecificCredentialWithContext(ctx aws.Context, input *CreateServiceSpecificCredentialInput, opts ...request.Option) (*CreateServiceSpecificCredentialOutput, error) { - req, out := c.CreateServiceSpecificCredentialRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateUser = "CreateUser" - -// CreateUserRequest generates a "aws/request.Request" representing the -// client's request for the CreateUser 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 CreateUser for more information on using the CreateUser -// 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 CreateUserRequest method. -// req, resp := client.CreateUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateUser -func (c *IAM) CreateUserRequest(input *CreateUserInput) (req *request.Request, output *CreateUserOutput) { - op := &request.Operation{ - Name: opCreateUser, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateUserInput{} - } - - output = &CreateUserOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateUser API operation for AWS Identity and Access Management. -// -// Creates a new IAM user for your Amazon Web Services account. -// -// For information about quotas for the number of IAM users you can create, -// see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation CreateUser for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateUser -func (c *IAM) CreateUser(input *CreateUserInput) (*CreateUserOutput, error) { - req, out := c.CreateUserRequest(input) - return out, req.Send() -} - -// CreateUserWithContext is the same as CreateUser with the addition of -// the ability to pass a context and additional request options. -// -// See CreateUser 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 *IAM) CreateUserWithContext(ctx aws.Context, input *CreateUserInput, opts ...request.Option) (*CreateUserOutput, error) { - req, out := c.CreateUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateVirtualMFADevice = "CreateVirtualMFADevice" - -// CreateVirtualMFADeviceRequest generates a "aws/request.Request" representing the -// client's request for the CreateVirtualMFADevice 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 CreateVirtualMFADevice for more information on using the CreateVirtualMFADevice -// 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 CreateVirtualMFADeviceRequest method. -// req, resp := client.CreateVirtualMFADeviceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateVirtualMFADevice -func (c *IAM) CreateVirtualMFADeviceRequest(input *CreateVirtualMFADeviceInput) (req *request.Request, output *CreateVirtualMFADeviceOutput) { - op := &request.Operation{ - Name: opCreateVirtualMFADevice, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateVirtualMFADeviceInput{} - } - - output = &CreateVirtualMFADeviceOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateVirtualMFADevice API operation for AWS Identity and Access Management. -// -// Creates a new virtual MFA device for the Amazon Web Services account. After -// creating the virtual MFA, use EnableMFADevice to attach the MFA device to -// an IAM user. For more information about creating and working with virtual -// MFA devices, see Using a virtual MFA device (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html) -// in the IAM User Guide. -// -// For information about the maximum number of MFA devices you can create, see -// IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM User Guide. -// -// The seed information contained in the QR code and the Base32 string should -// be treated like any other secret access information. In other words, protect -// the seed information as you would your Amazon Web Services access keys or -// your passwords. After you provision your virtual device, you should ensure -// that the information is destroyed following secure procedures. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation CreateVirtualMFADevice for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/CreateVirtualMFADevice -func (c *IAM) CreateVirtualMFADevice(input *CreateVirtualMFADeviceInput) (*CreateVirtualMFADeviceOutput, error) { - req, out := c.CreateVirtualMFADeviceRequest(input) - return out, req.Send() -} - -// CreateVirtualMFADeviceWithContext is the same as CreateVirtualMFADevice with the addition of -// the ability to pass a context and additional request options. -// -// See CreateVirtualMFADevice 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 *IAM) CreateVirtualMFADeviceWithContext(ctx aws.Context, input *CreateVirtualMFADeviceInput, opts ...request.Option) (*CreateVirtualMFADeviceOutput, error) { - req, out := c.CreateVirtualMFADeviceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeactivateMFADevice = "DeactivateMFADevice" - -// DeactivateMFADeviceRequest generates a "aws/request.Request" representing the -// client's request for the DeactivateMFADevice 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 DeactivateMFADevice for more information on using the DeactivateMFADevice -// 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 DeactivateMFADeviceRequest method. -// req, resp := client.DeactivateMFADeviceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeactivateMFADevice -func (c *IAM) DeactivateMFADeviceRequest(input *DeactivateMFADeviceInput) (req *request.Request, output *DeactivateMFADeviceOutput) { - op := &request.Operation{ - Name: opDeactivateMFADevice, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeactivateMFADeviceInput{} - } - - output = &DeactivateMFADeviceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeactivateMFADevice API operation for AWS Identity and Access Management. -// -// Deactivates the specified MFA device and removes it from association with -// the user name for which it was originally enabled. -// -// For more information about creating and working with virtual MFA devices, -// see Enabling a virtual multi-factor authentication (MFA) device (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation DeactivateMFADevice for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeEntityTemporarilyUnmodifiableException "EntityTemporarilyUnmodifiable" -// The request was rejected because it referenced an entity that is temporarily -// unmodifiable, such as a user name that was deleted and then recreated. The -// error indicates that the request is likely to succeed if you try again after -// waiting several minutes. The error message describes the entity. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeactivateMFADevice -func (c *IAM) DeactivateMFADevice(input *DeactivateMFADeviceInput) (*DeactivateMFADeviceOutput, error) { - req, out := c.DeactivateMFADeviceRequest(input) - return out, req.Send() -} - -// DeactivateMFADeviceWithContext is the same as DeactivateMFADevice with the addition of -// the ability to pass a context and additional request options. -// -// See DeactivateMFADevice 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 *IAM) DeactivateMFADeviceWithContext(ctx aws.Context, input *DeactivateMFADeviceInput, opts ...request.Option) (*DeactivateMFADeviceOutput, error) { - req, out := c.DeactivateMFADeviceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteAccessKey = "DeleteAccessKey" - -// DeleteAccessKeyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteAccessKey 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 DeleteAccessKey for more information on using the DeleteAccessKey -// 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 DeleteAccessKeyRequest method. -// req, resp := client.DeleteAccessKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteAccessKey -func (c *IAM) DeleteAccessKeyRequest(input *DeleteAccessKeyInput) (req *request.Request, output *DeleteAccessKeyOutput) { - op := &request.Operation{ - Name: opDeleteAccessKey, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteAccessKeyInput{} - } - - output = &DeleteAccessKeyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteAccessKey API operation for AWS Identity and Access Management. -// -// Deletes the access key pair associated with the specified IAM user. -// -// If you do not specify a user name, IAM determines the user name implicitly -// based on the Amazon Web Services access key ID signing the request. This -// operation works for access keys under the Amazon Web Services account. Consequently, -// you can use this operation to manage Amazon Web Services account root user -// credentials even if the Amazon Web Services account has no associated users. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteAccessKey for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteAccessKey -func (c *IAM) DeleteAccessKey(input *DeleteAccessKeyInput) (*DeleteAccessKeyOutput, error) { - req, out := c.DeleteAccessKeyRequest(input) - return out, req.Send() -} - -// DeleteAccessKeyWithContext is the same as DeleteAccessKey with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteAccessKey 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 *IAM) DeleteAccessKeyWithContext(ctx aws.Context, input *DeleteAccessKeyInput, opts ...request.Option) (*DeleteAccessKeyOutput, error) { - req, out := c.DeleteAccessKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteAccountAlias = "DeleteAccountAlias" - -// DeleteAccountAliasRequest generates a "aws/request.Request" representing the -// client's request for the DeleteAccountAlias 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 DeleteAccountAlias for more information on using the DeleteAccountAlias -// 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 DeleteAccountAliasRequest method. -// req, resp := client.DeleteAccountAliasRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteAccountAlias -func (c *IAM) DeleteAccountAliasRequest(input *DeleteAccountAliasInput) (req *request.Request, output *DeleteAccountAliasOutput) { - op := &request.Operation{ - Name: opDeleteAccountAlias, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteAccountAliasInput{} - } - - output = &DeleteAccountAliasOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteAccountAlias API operation for AWS Identity and Access Management. -// -// Deletes the specified Amazon Web Services account alias. For information -// about using an Amazon Web Services account alias, see Creating, deleting, -// and listing an Amazon Web Services account alias (https://docs.aws.amazon.com/signin/latest/userguide/CreateAccountAlias.html) -// in the Amazon Web Services Sign-In 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 AWS Identity and Access Management's -// API operation DeleteAccountAlias for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteAccountAlias -func (c *IAM) DeleteAccountAlias(input *DeleteAccountAliasInput) (*DeleteAccountAliasOutput, error) { - req, out := c.DeleteAccountAliasRequest(input) - return out, req.Send() -} - -// DeleteAccountAliasWithContext is the same as DeleteAccountAlias with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteAccountAlias 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 *IAM) DeleteAccountAliasWithContext(ctx aws.Context, input *DeleteAccountAliasInput, opts ...request.Option) (*DeleteAccountAliasOutput, error) { - req, out := c.DeleteAccountAliasRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteAccountPasswordPolicy = "DeleteAccountPasswordPolicy" - -// DeleteAccountPasswordPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteAccountPasswordPolicy 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 DeleteAccountPasswordPolicy for more information on using the DeleteAccountPasswordPolicy -// 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 DeleteAccountPasswordPolicyRequest method. -// req, resp := client.DeleteAccountPasswordPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteAccountPasswordPolicy -func (c *IAM) DeleteAccountPasswordPolicyRequest(input *DeleteAccountPasswordPolicyInput) (req *request.Request, output *DeleteAccountPasswordPolicyOutput) { - op := &request.Operation{ - Name: opDeleteAccountPasswordPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteAccountPasswordPolicyInput{} - } - - output = &DeleteAccountPasswordPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteAccountPasswordPolicy API operation for AWS Identity and Access Management. -// -// Deletes the password policy for the Amazon Web Services account. There are -// no parameters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteAccountPasswordPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteAccountPasswordPolicy -func (c *IAM) DeleteAccountPasswordPolicy(input *DeleteAccountPasswordPolicyInput) (*DeleteAccountPasswordPolicyOutput, error) { - req, out := c.DeleteAccountPasswordPolicyRequest(input) - return out, req.Send() -} - -// DeleteAccountPasswordPolicyWithContext is the same as DeleteAccountPasswordPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteAccountPasswordPolicy 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 *IAM) DeleteAccountPasswordPolicyWithContext(ctx aws.Context, input *DeleteAccountPasswordPolicyInput, opts ...request.Option) (*DeleteAccountPasswordPolicyOutput, error) { - req, out := c.DeleteAccountPasswordPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteGroup = "DeleteGroup" - -// DeleteGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteGroup 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 DeleteGroup for more information on using the DeleteGroup -// 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 DeleteGroupRequest method. -// req, resp := client.DeleteGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteGroup -func (c *IAM) DeleteGroupRequest(input *DeleteGroupInput) (req *request.Request, output *DeleteGroupOutput) { - op := &request.Operation{ - Name: opDeleteGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteGroupInput{} - } - - output = &DeleteGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteGroup API operation for AWS Identity and Access Management. -// -// Deletes the specified IAM group. The group must not contain any users or -// have any attached policies. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteGroup for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeDeleteConflictException "DeleteConflict" -// The request was rejected because it attempted to delete a resource that has -// attached subordinate entities. The error message describes these entities. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteGroup -func (c *IAM) DeleteGroup(input *DeleteGroupInput) (*DeleteGroupOutput, error) { - req, out := c.DeleteGroupRequest(input) - return out, req.Send() -} - -// DeleteGroupWithContext is the same as DeleteGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteGroup 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 *IAM) DeleteGroupWithContext(ctx aws.Context, input *DeleteGroupInput, opts ...request.Option) (*DeleteGroupOutput, error) { - req, out := c.DeleteGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteGroupPolicy = "DeleteGroupPolicy" - -// DeleteGroupPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteGroupPolicy 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 DeleteGroupPolicy for more information on using the DeleteGroupPolicy -// 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 DeleteGroupPolicyRequest method. -// req, resp := client.DeleteGroupPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteGroupPolicy -func (c *IAM) DeleteGroupPolicyRequest(input *DeleteGroupPolicyInput) (req *request.Request, output *DeleteGroupPolicyOutput) { - op := &request.Operation{ - Name: opDeleteGroupPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteGroupPolicyInput{} - } - - output = &DeleteGroupPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteGroupPolicy API operation for AWS Identity and Access Management. -// -// Deletes the specified inline policy that is embedded in the specified IAM -// group. -// -// A group can also have managed policies attached to it. To detach a managed -// policy from a group, use DetachGroupPolicy. For more information about policies, -// refer to Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation DeleteGroupPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteGroupPolicy -func (c *IAM) DeleteGroupPolicy(input *DeleteGroupPolicyInput) (*DeleteGroupPolicyOutput, error) { - req, out := c.DeleteGroupPolicyRequest(input) - return out, req.Send() -} - -// DeleteGroupPolicyWithContext is the same as DeleteGroupPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteGroupPolicy 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 *IAM) DeleteGroupPolicyWithContext(ctx aws.Context, input *DeleteGroupPolicyInput, opts ...request.Option) (*DeleteGroupPolicyOutput, error) { - req, out := c.DeleteGroupPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteInstanceProfile = "DeleteInstanceProfile" - -// DeleteInstanceProfileRequest generates a "aws/request.Request" representing the -// client's request for the DeleteInstanceProfile 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 DeleteInstanceProfile for more information on using the DeleteInstanceProfile -// 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 DeleteInstanceProfileRequest method. -// req, resp := client.DeleteInstanceProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteInstanceProfile -func (c *IAM) DeleteInstanceProfileRequest(input *DeleteInstanceProfileInput) (req *request.Request, output *DeleteInstanceProfileOutput) { - op := &request.Operation{ - Name: opDeleteInstanceProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteInstanceProfileInput{} - } - - output = &DeleteInstanceProfileOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteInstanceProfile API operation for AWS Identity and Access Management. -// -// Deletes the specified instance profile. The instance profile must not have -// an associated role. -// -// Make sure that you do not have any Amazon EC2 instances running with the -// instance profile you are about to delete. Deleting a role or instance profile -// that is associated with a running instance will break any applications running -// on the instance. -// -// For more information about instance profiles, see Using instance profiles -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation DeleteInstanceProfile for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeDeleteConflictException "DeleteConflict" -// The request was rejected because it attempted to delete a resource that has -// attached subordinate entities. The error message describes these entities. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteInstanceProfile -func (c *IAM) DeleteInstanceProfile(input *DeleteInstanceProfileInput) (*DeleteInstanceProfileOutput, error) { - req, out := c.DeleteInstanceProfileRequest(input) - return out, req.Send() -} - -// DeleteInstanceProfileWithContext is the same as DeleteInstanceProfile with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteInstanceProfile 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 *IAM) DeleteInstanceProfileWithContext(ctx aws.Context, input *DeleteInstanceProfileInput, opts ...request.Option) (*DeleteInstanceProfileOutput, error) { - req, out := c.DeleteInstanceProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteLoginProfile = "DeleteLoginProfile" - -// DeleteLoginProfileRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLoginProfile 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 DeleteLoginProfile for more information on using the DeleteLoginProfile -// 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 DeleteLoginProfileRequest method. -// req, resp := client.DeleteLoginProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteLoginProfile -func (c *IAM) DeleteLoginProfileRequest(input *DeleteLoginProfileInput) (req *request.Request, output *DeleteLoginProfileOutput) { - op := &request.Operation{ - Name: opDeleteLoginProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteLoginProfileInput{} - } - - output = &DeleteLoginProfileOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteLoginProfile API operation for AWS Identity and Access Management. -// -// Deletes the password for the specified IAM user, For more information, see -// Managing passwords for IAM users (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_passwords_admin-change-user.html). -// -// You can use the CLI, the Amazon Web Services API, or the Users page in the -// IAM console to delete a password for any IAM user. You can use ChangePassword -// to update, but not delete, your own password in the My Security Credentials -// page in the Amazon Web Services Management Console. -// -// Deleting a user's password does not prevent a user from accessing Amazon -// Web Services through the command line interface or the API. To prevent all -// user access, you must also either make any access keys inactive or delete -// them. For more information about making keys inactive or deleting them, see -// UpdateAccessKey and DeleteAccessKey. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteLoginProfile for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeEntityTemporarilyUnmodifiableException "EntityTemporarilyUnmodifiable" -// The request was rejected because it referenced an entity that is temporarily -// unmodifiable, such as a user name that was deleted and then recreated. The -// error indicates that the request is likely to succeed if you try again after -// waiting several minutes. The error message describes the entity. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteLoginProfile -func (c *IAM) DeleteLoginProfile(input *DeleteLoginProfileInput) (*DeleteLoginProfileOutput, error) { - req, out := c.DeleteLoginProfileRequest(input) - return out, req.Send() -} - -// DeleteLoginProfileWithContext is the same as DeleteLoginProfile with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteLoginProfile 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 *IAM) DeleteLoginProfileWithContext(ctx aws.Context, input *DeleteLoginProfileInput, opts ...request.Option) (*DeleteLoginProfileOutput, error) { - req, out := c.DeleteLoginProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteOpenIDConnectProvider = "DeleteOpenIDConnectProvider" - -// DeleteOpenIDConnectProviderRequest generates a "aws/request.Request" representing the -// client's request for the DeleteOpenIDConnectProvider 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 DeleteOpenIDConnectProvider for more information on using the DeleteOpenIDConnectProvider -// 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 DeleteOpenIDConnectProviderRequest method. -// req, resp := client.DeleteOpenIDConnectProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteOpenIDConnectProvider -func (c *IAM) DeleteOpenIDConnectProviderRequest(input *DeleteOpenIDConnectProviderInput) (req *request.Request, output *DeleteOpenIDConnectProviderOutput) { - op := &request.Operation{ - Name: opDeleteOpenIDConnectProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteOpenIDConnectProviderInput{} - } - - output = &DeleteOpenIDConnectProviderOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteOpenIDConnectProvider API operation for AWS Identity and Access Management. -// -// Deletes an OpenID Connect identity provider (IdP) resource object in IAM. -// -// Deleting an IAM OIDC provider resource does not update any roles that reference -// the provider as a principal in their trust policies. Any attempt to assume -// a role that references a deleted provider fails. -// -// This operation is idempotent; it does not fail or return an error if you -// call the operation for a provider that does not exist. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteOpenIDConnectProvider for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteOpenIDConnectProvider -func (c *IAM) DeleteOpenIDConnectProvider(input *DeleteOpenIDConnectProviderInput) (*DeleteOpenIDConnectProviderOutput, error) { - req, out := c.DeleteOpenIDConnectProviderRequest(input) - return out, req.Send() -} - -// DeleteOpenIDConnectProviderWithContext is the same as DeleteOpenIDConnectProvider with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteOpenIDConnectProvider 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 *IAM) DeleteOpenIDConnectProviderWithContext(ctx aws.Context, input *DeleteOpenIDConnectProviderInput, opts ...request.Option) (*DeleteOpenIDConnectProviderOutput, error) { - req, out := c.DeleteOpenIDConnectProviderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeletePolicy = "DeletePolicy" - -// DeletePolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeletePolicy 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 DeletePolicy for more information on using the DeletePolicy -// 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 DeletePolicyRequest method. -// req, resp := client.DeletePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeletePolicy -func (c *IAM) DeletePolicyRequest(input *DeletePolicyInput) (req *request.Request, output *DeletePolicyOutput) { - op := &request.Operation{ - Name: opDeletePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeletePolicyInput{} - } - - output = &DeletePolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeletePolicy API operation for AWS Identity and Access Management. -// -// Deletes the specified managed policy. -// -// Before you can delete a managed policy, you must first detach the policy -// from all users, groups, and roles that it is attached to. In addition, you -// must delete all the policy's versions. The following steps describe the process -// for deleting a managed policy: -// -// - Detach the policy from all users, groups, and roles that the policy -// is attached to, using DetachUserPolicy, DetachGroupPolicy, or DetachRolePolicy. -// To list all the users, groups, and roles that a policy is attached to, -// use ListEntitiesForPolicy. -// -// - Delete all versions of the policy using DeletePolicyVersion. To list -// the policy's versions, use ListPolicyVersions. You cannot use DeletePolicyVersion -// to delete the version that is marked as the default version. You delete -// the policy's default version in the next step of the process. -// -// - Delete the policy (this automatically deletes the policy's default version) -// using this operation. -// -// For information about managed policies, see Managed policies and inline policies -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation DeletePolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeDeleteConflictException "DeleteConflict" -// The request was rejected because it attempted to delete a resource that has -// attached subordinate entities. The error message describes these entities. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeletePolicy -func (c *IAM) DeletePolicy(input *DeletePolicyInput) (*DeletePolicyOutput, error) { - req, out := c.DeletePolicyRequest(input) - return out, req.Send() -} - -// DeletePolicyWithContext is the same as DeletePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeletePolicy 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 *IAM) DeletePolicyWithContext(ctx aws.Context, input *DeletePolicyInput, opts ...request.Option) (*DeletePolicyOutput, error) { - req, out := c.DeletePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeletePolicyVersion = "DeletePolicyVersion" - -// DeletePolicyVersionRequest generates a "aws/request.Request" representing the -// client's request for the DeletePolicyVersion 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 DeletePolicyVersion for more information on using the DeletePolicyVersion -// 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 DeletePolicyVersionRequest method. -// req, resp := client.DeletePolicyVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeletePolicyVersion -func (c *IAM) DeletePolicyVersionRequest(input *DeletePolicyVersionInput) (req *request.Request, output *DeletePolicyVersionOutput) { - op := &request.Operation{ - Name: opDeletePolicyVersion, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeletePolicyVersionInput{} - } - - output = &DeletePolicyVersionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeletePolicyVersion API operation for AWS Identity and Access Management. -// -// Deletes the specified version from the specified managed policy. -// -// You cannot delete the default version from a policy using this operation. -// To delete the default version from a policy, use DeletePolicy. To find out -// which version of a policy is marked as the default version, use ListPolicyVersions. -// -// For information about versions for managed policies, see Versioning for managed -// policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation DeletePolicyVersion for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeDeleteConflictException "DeleteConflict" -// The request was rejected because it attempted to delete a resource that has -// attached subordinate entities. The error message describes these entities. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeletePolicyVersion -func (c *IAM) DeletePolicyVersion(input *DeletePolicyVersionInput) (*DeletePolicyVersionOutput, error) { - req, out := c.DeletePolicyVersionRequest(input) - return out, req.Send() -} - -// DeletePolicyVersionWithContext is the same as DeletePolicyVersion with the addition of -// the ability to pass a context and additional request options. -// -// See DeletePolicyVersion 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 *IAM) DeletePolicyVersionWithContext(ctx aws.Context, input *DeletePolicyVersionInput, opts ...request.Option) (*DeletePolicyVersionOutput, error) { - req, out := c.DeletePolicyVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRole = "DeleteRole" - -// DeleteRoleRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRole 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 DeleteRole for more information on using the DeleteRole -// 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 DeleteRoleRequest method. -// req, resp := client.DeleteRoleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteRole -func (c *IAM) DeleteRoleRequest(input *DeleteRoleInput) (req *request.Request, output *DeleteRoleOutput) { - op := &request.Operation{ - Name: opDeleteRole, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteRoleInput{} - } - - output = &DeleteRoleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteRole API operation for AWS Identity and Access Management. -// -// Deletes the specified role. Unlike the Amazon Web Services Management Console, -// when you delete a role programmatically, you must delete the items attached -// to the role manually, or the deletion fails. For more information, see Deleting -// an IAM role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_manage_delete.html#roles-managingrole-deleting-cli). -// Before attempting to delete a role, remove the following attached items: -// -// - Inline policies (DeleteRolePolicy) -// -// - Attached managed policies (DetachRolePolicy) -// -// - Instance profile (RemoveRoleFromInstanceProfile) -// -// - Optional – Delete instance profile after detaching from role for resource -// clean up (DeleteInstanceProfile) -// -// Make sure that you do not have any Amazon EC2 instances running with the -// role you are about to delete. Deleting a role or instance profile that is -// associated with a running instance will break any applications running on -// the instance. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteRole for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeDeleteConflictException "DeleteConflict" -// The request was rejected because it attempted to delete a resource that has -// attached subordinate entities. The error message describes these entities. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeUnmodifiableEntityException "UnmodifiableEntity" -// The request was rejected because service-linked roles are protected Amazon -// Web Services resources. Only the service that depends on the service-linked -// role can modify or delete the role on your behalf. The error message includes -// the name of the service that depends on this service-linked role. You must -// request the change through that service. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteRole -func (c *IAM) DeleteRole(input *DeleteRoleInput) (*DeleteRoleOutput, error) { - req, out := c.DeleteRoleRequest(input) - return out, req.Send() -} - -// DeleteRoleWithContext is the same as DeleteRole with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRole 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 *IAM) DeleteRoleWithContext(ctx aws.Context, input *DeleteRoleInput, opts ...request.Option) (*DeleteRoleOutput, error) { - req, out := c.DeleteRoleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRolePermissionsBoundary = "DeleteRolePermissionsBoundary" - -// DeleteRolePermissionsBoundaryRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRolePermissionsBoundary 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 DeleteRolePermissionsBoundary for more information on using the DeleteRolePermissionsBoundary -// 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 DeleteRolePermissionsBoundaryRequest method. -// req, resp := client.DeleteRolePermissionsBoundaryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteRolePermissionsBoundary -func (c *IAM) DeleteRolePermissionsBoundaryRequest(input *DeleteRolePermissionsBoundaryInput) (req *request.Request, output *DeleteRolePermissionsBoundaryOutput) { - op := &request.Operation{ - Name: opDeleteRolePermissionsBoundary, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteRolePermissionsBoundaryInput{} - } - - output = &DeleteRolePermissionsBoundaryOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteRolePermissionsBoundary API operation for AWS Identity and Access Management. -// -// Deletes the permissions boundary for the specified IAM role. -// -// You cannot set the boundary for a service-linked role. -// -// Deleting the permissions boundary for a role might increase its permissions. -// For example, it might allow anyone who assumes the role to perform all the -// actions granted in its permissions policies. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteRolePermissionsBoundary for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeUnmodifiableEntityException "UnmodifiableEntity" -// The request was rejected because service-linked roles are protected Amazon -// Web Services resources. Only the service that depends on the service-linked -// role can modify or delete the role on your behalf. The error message includes -// the name of the service that depends on this service-linked role. You must -// request the change through that service. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteRolePermissionsBoundary -func (c *IAM) DeleteRolePermissionsBoundary(input *DeleteRolePermissionsBoundaryInput) (*DeleteRolePermissionsBoundaryOutput, error) { - req, out := c.DeleteRolePermissionsBoundaryRequest(input) - return out, req.Send() -} - -// DeleteRolePermissionsBoundaryWithContext is the same as DeleteRolePermissionsBoundary with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRolePermissionsBoundary 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 *IAM) DeleteRolePermissionsBoundaryWithContext(ctx aws.Context, input *DeleteRolePermissionsBoundaryInput, opts ...request.Option) (*DeleteRolePermissionsBoundaryOutput, error) { - req, out := c.DeleteRolePermissionsBoundaryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRolePolicy = "DeleteRolePolicy" - -// DeleteRolePolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRolePolicy 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 DeleteRolePolicy for more information on using the DeleteRolePolicy -// 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 DeleteRolePolicyRequest method. -// req, resp := client.DeleteRolePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteRolePolicy -func (c *IAM) DeleteRolePolicyRequest(input *DeleteRolePolicyInput) (req *request.Request, output *DeleteRolePolicyOutput) { - op := &request.Operation{ - Name: opDeleteRolePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteRolePolicyInput{} - } - - output = &DeleteRolePolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteRolePolicy API operation for AWS Identity and Access Management. -// -// Deletes the specified inline policy that is embedded in the specified IAM -// role. -// -// A role can also have managed policies attached to it. To detach a managed -// policy from a role, use DetachRolePolicy. For more information about policies, -// refer to Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation DeleteRolePolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeUnmodifiableEntityException "UnmodifiableEntity" -// The request was rejected because service-linked roles are protected Amazon -// Web Services resources. Only the service that depends on the service-linked -// role can modify or delete the role on your behalf. The error message includes -// the name of the service that depends on this service-linked role. You must -// request the change through that service. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteRolePolicy -func (c *IAM) DeleteRolePolicy(input *DeleteRolePolicyInput) (*DeleteRolePolicyOutput, error) { - req, out := c.DeleteRolePolicyRequest(input) - return out, req.Send() -} - -// DeleteRolePolicyWithContext is the same as DeleteRolePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRolePolicy 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 *IAM) DeleteRolePolicyWithContext(ctx aws.Context, input *DeleteRolePolicyInput, opts ...request.Option) (*DeleteRolePolicyOutput, error) { - req, out := c.DeleteRolePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSAMLProvider = "DeleteSAMLProvider" - -// DeleteSAMLProviderRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSAMLProvider 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 DeleteSAMLProvider for more information on using the DeleteSAMLProvider -// 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 DeleteSAMLProviderRequest method. -// req, resp := client.DeleteSAMLProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteSAMLProvider -func (c *IAM) DeleteSAMLProviderRequest(input *DeleteSAMLProviderInput) (req *request.Request, output *DeleteSAMLProviderOutput) { - op := &request.Operation{ - Name: opDeleteSAMLProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteSAMLProviderInput{} - } - - output = &DeleteSAMLProviderOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteSAMLProvider API operation for AWS Identity and Access Management. -// -// Deletes a SAML provider resource in IAM. -// -// Deleting the provider resource from IAM does not update any roles that reference -// the SAML provider resource's ARN as a principal in their trust policies. -// Any attempt to assume a role that references a non-existent provider resource -// ARN fails. -// -// This operation requires Signature Version 4 (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.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 AWS Identity and Access Management's -// API operation DeleteSAMLProvider for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteSAMLProvider -func (c *IAM) DeleteSAMLProvider(input *DeleteSAMLProviderInput) (*DeleteSAMLProviderOutput, error) { - req, out := c.DeleteSAMLProviderRequest(input) - return out, req.Send() -} - -// DeleteSAMLProviderWithContext is the same as DeleteSAMLProvider with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSAMLProvider 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 *IAM) DeleteSAMLProviderWithContext(ctx aws.Context, input *DeleteSAMLProviderInput, opts ...request.Option) (*DeleteSAMLProviderOutput, error) { - req, out := c.DeleteSAMLProviderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSSHPublicKey = "DeleteSSHPublicKey" - -// DeleteSSHPublicKeyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSSHPublicKey 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 DeleteSSHPublicKey for more information on using the DeleteSSHPublicKey -// 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 DeleteSSHPublicKeyRequest method. -// req, resp := client.DeleteSSHPublicKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteSSHPublicKey -func (c *IAM) DeleteSSHPublicKeyRequest(input *DeleteSSHPublicKeyInput) (req *request.Request, output *DeleteSSHPublicKeyOutput) { - op := &request.Operation{ - Name: opDeleteSSHPublicKey, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteSSHPublicKeyInput{} - } - - output = &DeleteSSHPublicKeyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteSSHPublicKey API operation for AWS Identity and Access Management. -// -// Deletes the specified SSH public key. -// -// The SSH public key deleted by this operation is used only for authenticating -// the associated IAM user to an CodeCommit repository. For more information -// about using SSH keys to authenticate to an CodeCommit repository, see Set -// up CodeCommit for SSH connections (https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html) -// in the CodeCommit 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 AWS Identity and Access Management's -// API operation DeleteSSHPublicKey for usage and error information. -// -// Returned Error Codes: -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteSSHPublicKey -func (c *IAM) DeleteSSHPublicKey(input *DeleteSSHPublicKeyInput) (*DeleteSSHPublicKeyOutput, error) { - req, out := c.DeleteSSHPublicKeyRequest(input) - return out, req.Send() -} - -// DeleteSSHPublicKeyWithContext is the same as DeleteSSHPublicKey with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSSHPublicKey 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 *IAM) DeleteSSHPublicKeyWithContext(ctx aws.Context, input *DeleteSSHPublicKeyInput, opts ...request.Option) (*DeleteSSHPublicKeyOutput, error) { - req, out := c.DeleteSSHPublicKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteServerCertificate = "DeleteServerCertificate" - -// DeleteServerCertificateRequest generates a "aws/request.Request" representing the -// client's request for the DeleteServerCertificate 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 DeleteServerCertificate for more information on using the DeleteServerCertificate -// 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 DeleteServerCertificateRequest method. -// req, resp := client.DeleteServerCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteServerCertificate -func (c *IAM) DeleteServerCertificateRequest(input *DeleteServerCertificateInput) (req *request.Request, output *DeleteServerCertificateOutput) { - op := &request.Operation{ - Name: opDeleteServerCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteServerCertificateInput{} - } - - output = &DeleteServerCertificateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteServerCertificate API operation for AWS Identity and Access Management. -// -// Deletes the specified server certificate. -// -// For more information about working with server certificates, see Working -// with server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) -// in the IAM User Guide. This topic also includes a list of Amazon Web Services -// services that can use the server certificates that you manage with IAM. -// -// If you are using a server certificate with Elastic Load Balancing, deleting -// the certificate could have implications for your application. If Elastic -// Load Balancing doesn't detect the deletion of bound certificates, it may -// continue to use the certificates. This could cause Elastic Load Balancing -// to stop accepting traffic. We recommend that you remove the reference to -// the certificate from Elastic Load Balancing before using this command to -// delete the certificate. For more information, see DeleteLoadBalancerListeners -// (https://docs.aws.amazon.com/ElasticLoadBalancing/latest/APIReference/API_DeleteLoadBalancerListeners.html) -// in the Elastic Load Balancing API Reference. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteServerCertificate for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeDeleteConflictException "DeleteConflict" -// The request was rejected because it attempted to delete a resource that has -// attached subordinate entities. The error message describes these entities. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteServerCertificate -func (c *IAM) DeleteServerCertificate(input *DeleteServerCertificateInput) (*DeleteServerCertificateOutput, error) { - req, out := c.DeleteServerCertificateRequest(input) - return out, req.Send() -} - -// DeleteServerCertificateWithContext is the same as DeleteServerCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteServerCertificate 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 *IAM) DeleteServerCertificateWithContext(ctx aws.Context, input *DeleteServerCertificateInput, opts ...request.Option) (*DeleteServerCertificateOutput, error) { - req, out := c.DeleteServerCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteServiceLinkedRole = "DeleteServiceLinkedRole" - -// DeleteServiceLinkedRoleRequest generates a "aws/request.Request" representing the -// client's request for the DeleteServiceLinkedRole 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 DeleteServiceLinkedRole for more information on using the DeleteServiceLinkedRole -// 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 DeleteServiceLinkedRoleRequest method. -// req, resp := client.DeleteServiceLinkedRoleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteServiceLinkedRole -func (c *IAM) DeleteServiceLinkedRoleRequest(input *DeleteServiceLinkedRoleInput) (req *request.Request, output *DeleteServiceLinkedRoleOutput) { - op := &request.Operation{ - Name: opDeleteServiceLinkedRole, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteServiceLinkedRoleInput{} - } - - output = &DeleteServiceLinkedRoleOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteServiceLinkedRole API operation for AWS Identity and Access Management. -// -// Submits a service-linked role deletion request and returns a DeletionTaskId, -// which you can use to check the status of the deletion. Before you call this -// operation, confirm that the role has no active sessions and that any resources -// used by the role in the linked service are deleted. If you call this operation -// more than once for the same service-linked role and an earlier deletion task -// is not complete, then the DeletionTaskId of the earlier request is returned. -// -// If you submit a deletion request for a service-linked role whose linked service -// is still accessing a resource, then the deletion task fails. If it fails, -// the GetServiceLinkedRoleDeletionStatus operation returns the reason for the -// failure, usually including the resources that must be deleted. To delete -// the service-linked role, you must first remove those resources from the linked -// service and then submit the deletion request again. Resources are specific -// to the service that is linked to the role. For more information about removing -// resources from a service, see the Amazon Web Services documentation (http://docs.aws.amazon.com/) -// for your service. -// -// For more information about service-linked roles, see Roles terms and concepts: -// Amazon Web Services service-linked role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-service-linked-role) -// in the IAM 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 AWS Identity and Access Management's -// API operation DeleteServiceLinkedRole for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteServiceLinkedRole -func (c *IAM) DeleteServiceLinkedRole(input *DeleteServiceLinkedRoleInput) (*DeleteServiceLinkedRoleOutput, error) { - req, out := c.DeleteServiceLinkedRoleRequest(input) - return out, req.Send() -} - -// DeleteServiceLinkedRoleWithContext is the same as DeleteServiceLinkedRole with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteServiceLinkedRole 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 *IAM) DeleteServiceLinkedRoleWithContext(ctx aws.Context, input *DeleteServiceLinkedRoleInput, opts ...request.Option) (*DeleteServiceLinkedRoleOutput, error) { - req, out := c.DeleteServiceLinkedRoleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteServiceSpecificCredential = "DeleteServiceSpecificCredential" - -// DeleteServiceSpecificCredentialRequest generates a "aws/request.Request" representing the -// client's request for the DeleteServiceSpecificCredential 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 DeleteServiceSpecificCredential for more information on using the DeleteServiceSpecificCredential -// 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 DeleteServiceSpecificCredentialRequest method. -// req, resp := client.DeleteServiceSpecificCredentialRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteServiceSpecificCredential -func (c *IAM) DeleteServiceSpecificCredentialRequest(input *DeleteServiceSpecificCredentialInput) (req *request.Request, output *DeleteServiceSpecificCredentialOutput) { - op := &request.Operation{ - Name: opDeleteServiceSpecificCredential, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteServiceSpecificCredentialInput{} - } - - output = &DeleteServiceSpecificCredentialOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteServiceSpecificCredential API operation for AWS Identity and Access Management. -// -// Deletes the specified service-specific credential. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteServiceSpecificCredential for usage and error information. -// -// Returned Error Codes: -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteServiceSpecificCredential -func (c *IAM) DeleteServiceSpecificCredential(input *DeleteServiceSpecificCredentialInput) (*DeleteServiceSpecificCredentialOutput, error) { - req, out := c.DeleteServiceSpecificCredentialRequest(input) - return out, req.Send() -} - -// DeleteServiceSpecificCredentialWithContext is the same as DeleteServiceSpecificCredential with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteServiceSpecificCredential 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 *IAM) DeleteServiceSpecificCredentialWithContext(ctx aws.Context, input *DeleteServiceSpecificCredentialInput, opts ...request.Option) (*DeleteServiceSpecificCredentialOutput, error) { - req, out := c.DeleteServiceSpecificCredentialRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSigningCertificate = "DeleteSigningCertificate" - -// DeleteSigningCertificateRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSigningCertificate 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 DeleteSigningCertificate for more information on using the DeleteSigningCertificate -// 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 DeleteSigningCertificateRequest method. -// req, resp := client.DeleteSigningCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteSigningCertificate -func (c *IAM) DeleteSigningCertificateRequest(input *DeleteSigningCertificateInput) (req *request.Request, output *DeleteSigningCertificateOutput) { - op := &request.Operation{ - Name: opDeleteSigningCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteSigningCertificateInput{} - } - - output = &DeleteSigningCertificateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteSigningCertificate API operation for AWS Identity and Access Management. -// -// Deletes a signing certificate associated with the specified IAM user. -// -// If you do not specify a user name, IAM determines the user name implicitly -// based on the Amazon Web Services access key ID signing the request. This -// operation works for access keys under the Amazon Web Services account. Consequently, -// you can use this operation to manage Amazon Web Services account root user -// credentials even if the Amazon Web Services account has no associated IAM -// users. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteSigningCertificate for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteSigningCertificate -func (c *IAM) DeleteSigningCertificate(input *DeleteSigningCertificateInput) (*DeleteSigningCertificateOutput, error) { - req, out := c.DeleteSigningCertificateRequest(input) - return out, req.Send() -} - -// DeleteSigningCertificateWithContext is the same as DeleteSigningCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSigningCertificate 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 *IAM) DeleteSigningCertificateWithContext(ctx aws.Context, input *DeleteSigningCertificateInput, opts ...request.Option) (*DeleteSigningCertificateOutput, error) { - req, out := c.DeleteSigningCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteUser = "DeleteUser" - -// DeleteUserRequest generates a "aws/request.Request" representing the -// client's request for the DeleteUser 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 DeleteUser for more information on using the DeleteUser -// 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 DeleteUserRequest method. -// req, resp := client.DeleteUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteUser -func (c *IAM) DeleteUserRequest(input *DeleteUserInput) (req *request.Request, output *DeleteUserOutput) { - op := &request.Operation{ - Name: opDeleteUser, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteUserInput{} - } - - output = &DeleteUserOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteUser API operation for AWS Identity and Access Management. -// -// Deletes the specified IAM user. Unlike the Amazon Web Services Management -// Console, when you delete a user programmatically, you must delete the items -// attached to the user manually, or the deletion fails. For more information, -// see Deleting an IAM user (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_manage.html#id_users_deleting_cli). -// Before attempting to delete a user, remove the following items: -// -// - Password (DeleteLoginProfile) -// -// - Access keys (DeleteAccessKey) -// -// - Signing certificate (DeleteSigningCertificate) -// -// - SSH public key (DeleteSSHPublicKey) -// -// - Git credentials (DeleteServiceSpecificCredential) -// -// - Multi-factor authentication (MFA) device (DeactivateMFADevice, DeleteVirtualMFADevice) -// -// - Inline policies (DeleteUserPolicy) -// -// - Attached managed policies (DetachUserPolicy) -// -// - Group memberships (RemoveUserFromGroup) -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteUser for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeDeleteConflictException "DeleteConflict" -// The request was rejected because it attempted to delete a resource that has -// attached subordinate entities. The error message describes these entities. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteUser -func (c *IAM) DeleteUser(input *DeleteUserInput) (*DeleteUserOutput, error) { - req, out := c.DeleteUserRequest(input) - return out, req.Send() -} - -// DeleteUserWithContext is the same as DeleteUser with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteUser 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 *IAM) DeleteUserWithContext(ctx aws.Context, input *DeleteUserInput, opts ...request.Option) (*DeleteUserOutput, error) { - req, out := c.DeleteUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteUserPermissionsBoundary = "DeleteUserPermissionsBoundary" - -// DeleteUserPermissionsBoundaryRequest generates a "aws/request.Request" representing the -// client's request for the DeleteUserPermissionsBoundary 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 DeleteUserPermissionsBoundary for more information on using the DeleteUserPermissionsBoundary -// 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 DeleteUserPermissionsBoundaryRequest method. -// req, resp := client.DeleteUserPermissionsBoundaryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteUserPermissionsBoundary -func (c *IAM) DeleteUserPermissionsBoundaryRequest(input *DeleteUserPermissionsBoundaryInput) (req *request.Request, output *DeleteUserPermissionsBoundaryOutput) { - op := &request.Operation{ - Name: opDeleteUserPermissionsBoundary, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteUserPermissionsBoundaryInput{} - } - - output = &DeleteUserPermissionsBoundaryOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteUserPermissionsBoundary API operation for AWS Identity and Access Management. -// -// Deletes the permissions boundary for the specified IAM user. -// -// Deleting the permissions boundary for a user might increase its permissions -// by allowing the user to perform all the actions granted in its permissions -// policies. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteUserPermissionsBoundary for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteUserPermissionsBoundary -func (c *IAM) DeleteUserPermissionsBoundary(input *DeleteUserPermissionsBoundaryInput) (*DeleteUserPermissionsBoundaryOutput, error) { - req, out := c.DeleteUserPermissionsBoundaryRequest(input) - return out, req.Send() -} - -// DeleteUserPermissionsBoundaryWithContext is the same as DeleteUserPermissionsBoundary with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteUserPermissionsBoundary 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 *IAM) DeleteUserPermissionsBoundaryWithContext(ctx aws.Context, input *DeleteUserPermissionsBoundaryInput, opts ...request.Option) (*DeleteUserPermissionsBoundaryOutput, error) { - req, out := c.DeleteUserPermissionsBoundaryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteUserPolicy = "DeleteUserPolicy" - -// DeleteUserPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteUserPolicy 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 DeleteUserPolicy for more information on using the DeleteUserPolicy -// 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 DeleteUserPolicyRequest method. -// req, resp := client.DeleteUserPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteUserPolicy -func (c *IAM) DeleteUserPolicyRequest(input *DeleteUserPolicyInput) (req *request.Request, output *DeleteUserPolicyOutput) { - op := &request.Operation{ - Name: opDeleteUserPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteUserPolicyInput{} - } - - output = &DeleteUserPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteUserPolicy API operation for AWS Identity and Access Management. -// -// Deletes the specified inline policy that is embedded in the specified IAM -// user. -// -// A user can also have managed policies attached to it. To detach a managed -// policy from a user, use DetachUserPolicy. For more information about policies, -// refer to Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation DeleteUserPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteUserPolicy -func (c *IAM) DeleteUserPolicy(input *DeleteUserPolicyInput) (*DeleteUserPolicyOutput, error) { - req, out := c.DeleteUserPolicyRequest(input) - return out, req.Send() -} - -// DeleteUserPolicyWithContext is the same as DeleteUserPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteUserPolicy 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 *IAM) DeleteUserPolicyWithContext(ctx aws.Context, input *DeleteUserPolicyInput, opts ...request.Option) (*DeleteUserPolicyOutput, error) { - req, out := c.DeleteUserPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteVirtualMFADevice = "DeleteVirtualMFADevice" - -// DeleteVirtualMFADeviceRequest generates a "aws/request.Request" representing the -// client's request for the DeleteVirtualMFADevice 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 DeleteVirtualMFADevice for more information on using the DeleteVirtualMFADevice -// 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 DeleteVirtualMFADeviceRequest method. -// req, resp := client.DeleteVirtualMFADeviceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteVirtualMFADevice -func (c *IAM) DeleteVirtualMFADeviceRequest(input *DeleteVirtualMFADeviceInput) (req *request.Request, output *DeleteVirtualMFADeviceOutput) { - op := &request.Operation{ - Name: opDeleteVirtualMFADevice, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteVirtualMFADeviceInput{} - } - - output = &DeleteVirtualMFADeviceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteVirtualMFADevice API operation for AWS Identity and Access Management. -// -// Deletes a virtual MFA device. -// -// You must deactivate a user's virtual MFA device before you can delete it. -// For information about deactivating MFA devices, see DeactivateMFADevice. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation DeleteVirtualMFADevice for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeDeleteConflictException "DeleteConflict" -// The request was rejected because it attempted to delete a resource that has -// attached subordinate entities. The error message describes these entities. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteVirtualMFADevice -func (c *IAM) DeleteVirtualMFADevice(input *DeleteVirtualMFADeviceInput) (*DeleteVirtualMFADeviceOutput, error) { - req, out := c.DeleteVirtualMFADeviceRequest(input) - return out, req.Send() -} - -// DeleteVirtualMFADeviceWithContext is the same as DeleteVirtualMFADevice with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteVirtualMFADevice 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 *IAM) DeleteVirtualMFADeviceWithContext(ctx aws.Context, input *DeleteVirtualMFADeviceInput, opts ...request.Option) (*DeleteVirtualMFADeviceOutput, error) { - req, out := c.DeleteVirtualMFADeviceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDetachGroupPolicy = "DetachGroupPolicy" - -// DetachGroupPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DetachGroupPolicy 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 DetachGroupPolicy for more information on using the DetachGroupPolicy -// 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 DetachGroupPolicyRequest method. -// req, resp := client.DetachGroupPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DetachGroupPolicy -func (c *IAM) DetachGroupPolicyRequest(input *DetachGroupPolicyInput) (req *request.Request, output *DetachGroupPolicyOutput) { - op := &request.Operation{ - Name: opDetachGroupPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DetachGroupPolicyInput{} - } - - output = &DetachGroupPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DetachGroupPolicy API operation for AWS Identity and Access Management. -// -// Removes the specified managed policy from the specified IAM group. -// -// A group can also have inline policies embedded with it. To delete an inline -// policy, use DeleteGroupPolicy. For information about policies, see Managed -// policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation DetachGroupPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DetachGroupPolicy -func (c *IAM) DetachGroupPolicy(input *DetachGroupPolicyInput) (*DetachGroupPolicyOutput, error) { - req, out := c.DetachGroupPolicyRequest(input) - return out, req.Send() -} - -// DetachGroupPolicyWithContext is the same as DetachGroupPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DetachGroupPolicy 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 *IAM) DetachGroupPolicyWithContext(ctx aws.Context, input *DetachGroupPolicyInput, opts ...request.Option) (*DetachGroupPolicyOutput, error) { - req, out := c.DetachGroupPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDetachRolePolicy = "DetachRolePolicy" - -// DetachRolePolicyRequest generates a "aws/request.Request" representing the -// client's request for the DetachRolePolicy 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 DetachRolePolicy for more information on using the DetachRolePolicy -// 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 DetachRolePolicyRequest method. -// req, resp := client.DetachRolePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DetachRolePolicy -func (c *IAM) DetachRolePolicyRequest(input *DetachRolePolicyInput) (req *request.Request, output *DetachRolePolicyOutput) { - op := &request.Operation{ - Name: opDetachRolePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DetachRolePolicyInput{} - } - - output = &DetachRolePolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DetachRolePolicy API operation for AWS Identity and Access Management. -// -// Removes the specified managed policy from the specified role. -// -// A role can also have inline policies embedded with it. To delete an inline -// policy, use DeleteRolePolicy. For information about policies, see Managed -// policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation DetachRolePolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeUnmodifiableEntityException "UnmodifiableEntity" -// The request was rejected because service-linked roles are protected Amazon -// Web Services resources. Only the service that depends on the service-linked -// role can modify or delete the role on your behalf. The error message includes -// the name of the service that depends on this service-linked role. You must -// request the change through that service. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DetachRolePolicy -func (c *IAM) DetachRolePolicy(input *DetachRolePolicyInput) (*DetachRolePolicyOutput, error) { - req, out := c.DetachRolePolicyRequest(input) - return out, req.Send() -} - -// DetachRolePolicyWithContext is the same as DetachRolePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DetachRolePolicy 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 *IAM) DetachRolePolicyWithContext(ctx aws.Context, input *DetachRolePolicyInput, opts ...request.Option) (*DetachRolePolicyOutput, error) { - req, out := c.DetachRolePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDetachUserPolicy = "DetachUserPolicy" - -// DetachUserPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DetachUserPolicy 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 DetachUserPolicy for more information on using the DetachUserPolicy -// 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 DetachUserPolicyRequest method. -// req, resp := client.DetachUserPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DetachUserPolicy -func (c *IAM) DetachUserPolicyRequest(input *DetachUserPolicyInput) (req *request.Request, output *DetachUserPolicyOutput) { - op := &request.Operation{ - Name: opDetachUserPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DetachUserPolicyInput{} - } - - output = &DetachUserPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DetachUserPolicy API operation for AWS Identity and Access Management. -// -// Removes the specified managed policy from the specified user. -// -// A user can also have inline policies embedded with it. To delete an inline -// policy, use DeleteUserPolicy. For information about policies, see Managed -// policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation DetachUserPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DetachUserPolicy -func (c *IAM) DetachUserPolicy(input *DetachUserPolicyInput) (*DetachUserPolicyOutput, error) { - req, out := c.DetachUserPolicyRequest(input) - return out, req.Send() -} - -// DetachUserPolicyWithContext is the same as DetachUserPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DetachUserPolicy 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 *IAM) DetachUserPolicyWithContext(ctx aws.Context, input *DetachUserPolicyInput, opts ...request.Option) (*DetachUserPolicyOutput, error) { - req, out := c.DetachUserPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEnableMFADevice = "EnableMFADevice" - -// EnableMFADeviceRequest generates a "aws/request.Request" representing the -// client's request for the EnableMFADevice 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 EnableMFADevice for more information on using the EnableMFADevice -// 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 EnableMFADeviceRequest method. -// req, resp := client.EnableMFADeviceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/EnableMFADevice -func (c *IAM) EnableMFADeviceRequest(input *EnableMFADeviceInput) (req *request.Request, output *EnableMFADeviceOutput) { - op := &request.Operation{ - Name: opEnableMFADevice, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &EnableMFADeviceInput{} - } - - output = &EnableMFADeviceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// EnableMFADevice API operation for AWS Identity and Access Management. -// -// Enables the specified MFA device and associates it with the specified IAM -// user. When enabled, the MFA device is required for every subsequent login -// by the IAM user associated with the device. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation EnableMFADevice for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeEntityTemporarilyUnmodifiableException "EntityTemporarilyUnmodifiable" -// The request was rejected because it referenced an entity that is temporarily -// unmodifiable, such as a user name that was deleted and then recreated. The -// error indicates that the request is likely to succeed if you try again after -// waiting several minutes. The error message describes the entity. -// -// - ErrCodeInvalidAuthenticationCodeException "InvalidAuthenticationCode" -// The request was rejected because the authentication code was not recognized. -// The error message describes the specific error. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/EnableMFADevice -func (c *IAM) EnableMFADevice(input *EnableMFADeviceInput) (*EnableMFADeviceOutput, error) { - req, out := c.EnableMFADeviceRequest(input) - return out, req.Send() -} - -// EnableMFADeviceWithContext is the same as EnableMFADevice with the addition of -// the ability to pass a context and additional request options. -// -// See EnableMFADevice 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 *IAM) EnableMFADeviceWithContext(ctx aws.Context, input *EnableMFADeviceInput, opts ...request.Option) (*EnableMFADeviceOutput, error) { - req, out := c.EnableMFADeviceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGenerateCredentialReport = "GenerateCredentialReport" - -// GenerateCredentialReportRequest generates a "aws/request.Request" representing the -// client's request for the GenerateCredentialReport 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 GenerateCredentialReport for more information on using the GenerateCredentialReport -// 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 GenerateCredentialReportRequest method. -// req, resp := client.GenerateCredentialReportRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GenerateCredentialReport -func (c *IAM) GenerateCredentialReportRequest(input *GenerateCredentialReportInput) (req *request.Request, output *GenerateCredentialReportOutput) { - op := &request.Operation{ - Name: opGenerateCredentialReport, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GenerateCredentialReportInput{} - } - - output = &GenerateCredentialReportOutput{} - req = c.newRequest(op, input, output) - return -} - -// GenerateCredentialReport API operation for AWS Identity and Access Management. -// -// Generates a credential report for the Amazon Web Services account. For more -// information about the credential report, see Getting credential reports (https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation GenerateCredentialReport for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GenerateCredentialReport -func (c *IAM) GenerateCredentialReport(input *GenerateCredentialReportInput) (*GenerateCredentialReportOutput, error) { - req, out := c.GenerateCredentialReportRequest(input) - return out, req.Send() -} - -// GenerateCredentialReportWithContext is the same as GenerateCredentialReport with the addition of -// the ability to pass a context and additional request options. -// -// See GenerateCredentialReport 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 *IAM) GenerateCredentialReportWithContext(ctx aws.Context, input *GenerateCredentialReportInput, opts ...request.Option) (*GenerateCredentialReportOutput, error) { - req, out := c.GenerateCredentialReportRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGenerateOrganizationsAccessReport = "GenerateOrganizationsAccessReport" - -// GenerateOrganizationsAccessReportRequest generates a "aws/request.Request" representing the -// client's request for the GenerateOrganizationsAccessReport 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 GenerateOrganizationsAccessReport for more information on using the GenerateOrganizationsAccessReport -// 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 GenerateOrganizationsAccessReportRequest method. -// req, resp := client.GenerateOrganizationsAccessReportRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GenerateOrganizationsAccessReport -func (c *IAM) GenerateOrganizationsAccessReportRequest(input *GenerateOrganizationsAccessReportInput) (req *request.Request, output *GenerateOrganizationsAccessReportOutput) { - op := &request.Operation{ - Name: opGenerateOrganizationsAccessReport, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GenerateOrganizationsAccessReportInput{} - } - - output = &GenerateOrganizationsAccessReportOutput{} - req = c.newRequest(op, input, output) - return -} - -// GenerateOrganizationsAccessReport API operation for AWS Identity and Access Management. -// -// Generates a report for service last accessed data for Organizations. You -// can generate a report for any entities (organization root, organizational -// unit, or account) or policies in your organization. -// -// To call this operation, you must be signed in using your Organizations management -// account credentials. You can use your long-term IAM user or root user credentials, -// or temporary credentials from assuming an IAM role. SCPs must be enabled -// for your organization root. You must have the required IAM and Organizations -// permissions. For more information, see Refining permissions using service -// last accessed data (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html) -// in the IAM User Guide. -// -// You can generate a service last accessed data report for entities by specifying -// only the entity's path. This data includes a list of services that are allowed -// by any service control policies (SCPs) that apply to the entity. -// -// You can generate a service last accessed data report for a policy by specifying -// an entity's path and an optional Organizations policy ID. This data includes -// a list of services that are allowed by the specified SCP. -// -// For each service in both report types, the data includes the most recent -// account activity that the policy allows to account principals in the entity -// or the entity's children. For important information about the data, reporting -// period, permissions required, troubleshooting, and supported Regions see -// Reducing permissions using service last accessed data (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html) -// in the IAM User Guide. -// -// The data includes all attempts to access Amazon Web Services, not just the -// successful ones. This includes all attempts that were made using the Amazon -// Web Services Management Console, the Amazon Web Services API through any -// of the SDKs, or any of the command line tools. An unexpected entry in the -// service last accessed data does not mean that an account has been compromised, -// because the request might have been denied. Refer to your CloudTrail logs -// as the authoritative source for information about all API calls and whether -// they were successful or denied access. For more information, see Logging -// IAM events with CloudTrail (https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html) -// in the IAM User Guide. -// -// This operation returns a JobId. Use this parameter in the GetOrganizationsAccessReport -// operation to check the status of the report generation. To check the status -// of this request, use the JobId parameter in the GetOrganizationsAccessReport -// operation and test the JobStatus response parameter. When the job is complete, -// you can retrieve the report. -// -// To generate a service last accessed data report for entities, specify an -// entity path without specifying the optional Organizations policy ID. The -// type of entity that you specify determines the data returned in the report. -// -// - Root – When you specify the organizations root as the entity, the -// resulting report lists all of the services allowed by SCPs that are attached -// to your root. For each service, the report includes data for all accounts -// in your organization except the management account, because the management -// account is not limited by SCPs. -// -// - OU – When you specify an organizational unit (OU) as the entity, the -// resulting report lists all of the services allowed by SCPs that are attached -// to the OU and its parents. For each service, the report includes data -// for all accounts in the OU or its children. This data excludes the management -// account, because the management account is not limited by SCPs. -// -// - management account – When you specify the management account, the -// resulting report lists all Amazon Web Services services, because the management -// account is not limited by SCPs. For each service, the report includes -// data for only the management account. -// -// - Account – When you specify another account as the entity, the resulting -// report lists all of the services allowed by SCPs that are attached to -// the account and its parents. For each service, the report includes data -// for only the specified account. -// -// To generate a service last accessed data report for policies, specify an -// entity path and the optional Organizations policy ID. The type of entity -// that you specify determines the data returned for each service. -// -// - Root – When you specify the root entity and a policy ID, the resulting -// report lists all of the services that are allowed by the specified SCP. -// For each service, the report includes data for all accounts in your organization -// to which the SCP applies. This data excludes the management account, because -// the management account is not limited by SCPs. If the SCP is not attached -// to any entities in the organization, then the report will return a list -// of services with no data. -// -// - OU – When you specify an OU entity and a policy ID, the resulting -// report lists all of the services that are allowed by the specified SCP. -// For each service, the report includes data for all accounts in the OU -// or its children to which the SCP applies. This means that other accounts -// outside the OU that are affected by the SCP might not be included in the -// data. This data excludes the management account, because the management -// account is not limited by SCPs. If the SCP is not attached to the OU or -// one of its children, the report will return a list of services with no -// data. -// -// - management account – When you specify the management account, the -// resulting report lists all Amazon Web Services services, because the management -// account is not limited by SCPs. If you specify a policy ID in the CLI -// or API, the policy is ignored. For each service, the report includes data -// for only the management account. -// -// - Account – When you specify another account entity and a policy ID, -// the resulting report lists all of the services that are allowed by the -// specified SCP. For each service, the report includes data for only the -// specified account. This means that other accounts in the organization -// that are affected by the SCP might not be included in the data. If the -// SCP is not attached to the account, the report will return a list of services -// with no data. -// -// Service last accessed data does not use other policy types when determining -// whether a principal could access a service. These other policy types include -// identity-based policies, resource-based policies, access control lists, IAM -// permissions boundaries, and STS assume role policies. It only applies SCP -// logic. For more about the evaluation of policy types, see Evaluating policies -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics) -// in the IAM User Guide. -// -// For more information about service last accessed data, see Reducing policy -// scope by viewing user activity (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation GenerateOrganizationsAccessReport for usage and error information. -// -// Returned Error Codes: -// - ErrCodeReportGenerationLimitExceededException "ReportGenerationLimitExceeded" -// The request failed because the maximum number of concurrent requests for -// this account are already running. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GenerateOrganizationsAccessReport -func (c *IAM) GenerateOrganizationsAccessReport(input *GenerateOrganizationsAccessReportInput) (*GenerateOrganizationsAccessReportOutput, error) { - req, out := c.GenerateOrganizationsAccessReportRequest(input) - return out, req.Send() -} - -// GenerateOrganizationsAccessReportWithContext is the same as GenerateOrganizationsAccessReport with the addition of -// the ability to pass a context and additional request options. -// -// See GenerateOrganizationsAccessReport 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 *IAM) GenerateOrganizationsAccessReportWithContext(ctx aws.Context, input *GenerateOrganizationsAccessReportInput, opts ...request.Option) (*GenerateOrganizationsAccessReportOutput, error) { - req, out := c.GenerateOrganizationsAccessReportRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGenerateServiceLastAccessedDetails = "GenerateServiceLastAccessedDetails" - -// GenerateServiceLastAccessedDetailsRequest generates a "aws/request.Request" representing the -// client's request for the GenerateServiceLastAccessedDetails 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 GenerateServiceLastAccessedDetails for more information on using the GenerateServiceLastAccessedDetails -// 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 GenerateServiceLastAccessedDetailsRequest method. -// req, resp := client.GenerateServiceLastAccessedDetailsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GenerateServiceLastAccessedDetails -func (c *IAM) GenerateServiceLastAccessedDetailsRequest(input *GenerateServiceLastAccessedDetailsInput) (req *request.Request, output *GenerateServiceLastAccessedDetailsOutput) { - op := &request.Operation{ - Name: opGenerateServiceLastAccessedDetails, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GenerateServiceLastAccessedDetailsInput{} - } - - output = &GenerateServiceLastAccessedDetailsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GenerateServiceLastAccessedDetails API operation for AWS Identity and Access Management. -// -// Generates a report that includes details about when an IAM resource (user, -// group, role, or policy) was last used in an attempt to access Amazon Web -// Services services. Recent activity usually appears within four hours. IAM -// reports activity for at least the last 400 days, or less if your Region began -// supporting this feature within the last year. For more information, see Regions -// where data is tracked (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period). -// For more information about services and actions for which action last accessed -// information is displayed, see IAM action last accessed information services -// and actions (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor-action-last-accessed.html). -// -// The service last accessed data includes all attempts to access an Amazon -// Web Services API, not just the successful ones. This includes all attempts -// that were made using the Amazon Web Services Management Console, the Amazon -// Web Services API through any of the SDKs, or any of the command line tools. -// An unexpected entry in the service last accessed data does not mean that -// your account has been compromised, because the request might have been denied. -// Refer to your CloudTrail logs as the authoritative source for information -// about all API calls and whether they were successful or denied access. For -// more information, see Logging IAM events with CloudTrail (https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html) -// in the IAM User Guide. -// -// The GenerateServiceLastAccessedDetails operation returns a JobId. Use this -// parameter in the following operations to retrieve the following details from -// your report: -// -// - GetServiceLastAccessedDetails – Use this operation for users, groups, -// roles, or policies to list every Amazon Web Services service that the -// resource could access using permissions policies. For each service, the -// response includes information about the most recent access attempt. The -// JobId returned by GenerateServiceLastAccessedDetail must be used by the -// same role within a session, or by the same user when used to call GetServiceLastAccessedDetail. -// -// - GetServiceLastAccessedDetailsWithEntities – Use this operation for -// groups and policies to list information about the associated entities -// (users or roles) that attempted to access a specific Amazon Web Services -// service. -// -// To check the status of the GenerateServiceLastAccessedDetails request, use -// the JobId parameter in the same operations and test the JobStatus response -// parameter. -// -// For additional information about the permissions policies that allow an identity -// (user, group, or role) to access specific services, use the ListPoliciesGrantingServiceAccess -// operation. -// -// Service last accessed data does not use other policy types when determining -// whether a resource could access a service. These other policy types include -// resource-based policies, access control lists, Organizations policies, IAM -// permissions boundaries, and STS assume role policies. It only applies permissions -// policy logic. For more about the evaluation of policy types, see Evaluating -// policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics) -// in the IAM User Guide. -// -// For more information about service and action last accessed data, see Reducing -// permissions using service last accessed data (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation GenerateServiceLastAccessedDetails for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GenerateServiceLastAccessedDetails -func (c *IAM) GenerateServiceLastAccessedDetails(input *GenerateServiceLastAccessedDetailsInput) (*GenerateServiceLastAccessedDetailsOutput, error) { - req, out := c.GenerateServiceLastAccessedDetailsRequest(input) - return out, req.Send() -} - -// GenerateServiceLastAccessedDetailsWithContext is the same as GenerateServiceLastAccessedDetails with the addition of -// the ability to pass a context and additional request options. -// -// See GenerateServiceLastAccessedDetails 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 *IAM) GenerateServiceLastAccessedDetailsWithContext(ctx aws.Context, input *GenerateServiceLastAccessedDetailsInput, opts ...request.Option) (*GenerateServiceLastAccessedDetailsOutput, error) { - req, out := c.GenerateServiceLastAccessedDetailsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetAccessKeyLastUsed = "GetAccessKeyLastUsed" - -// GetAccessKeyLastUsedRequest generates a "aws/request.Request" representing the -// client's request for the GetAccessKeyLastUsed 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 GetAccessKeyLastUsed for more information on using the GetAccessKeyLastUsed -// 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 GetAccessKeyLastUsedRequest method. -// req, resp := client.GetAccessKeyLastUsedRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetAccessKeyLastUsed -func (c *IAM) GetAccessKeyLastUsedRequest(input *GetAccessKeyLastUsedInput) (req *request.Request, output *GetAccessKeyLastUsedOutput) { - op := &request.Operation{ - Name: opGetAccessKeyLastUsed, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetAccessKeyLastUsedInput{} - } - - output = &GetAccessKeyLastUsedOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetAccessKeyLastUsed API operation for AWS Identity and Access Management. -// -// Retrieves information about when the specified access key was last used. -// The information includes the date and time of last use, along with the Amazon -// Web Services service and Region that were specified in the last request made -// with that key. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetAccessKeyLastUsed for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetAccessKeyLastUsed -func (c *IAM) GetAccessKeyLastUsed(input *GetAccessKeyLastUsedInput) (*GetAccessKeyLastUsedOutput, error) { - req, out := c.GetAccessKeyLastUsedRequest(input) - return out, req.Send() -} - -// GetAccessKeyLastUsedWithContext is the same as GetAccessKeyLastUsed with the addition of -// the ability to pass a context and additional request options. -// -// See GetAccessKeyLastUsed 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 *IAM) GetAccessKeyLastUsedWithContext(ctx aws.Context, input *GetAccessKeyLastUsedInput, opts ...request.Option) (*GetAccessKeyLastUsedOutput, error) { - req, out := c.GetAccessKeyLastUsedRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetAccountAuthorizationDetails = "GetAccountAuthorizationDetails" - -// GetAccountAuthorizationDetailsRequest generates a "aws/request.Request" representing the -// client's request for the GetAccountAuthorizationDetails 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 GetAccountAuthorizationDetails for more information on using the GetAccountAuthorizationDetails -// 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 GetAccountAuthorizationDetailsRequest method. -// req, resp := client.GetAccountAuthorizationDetailsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetAccountAuthorizationDetails -func (c *IAM) GetAccountAuthorizationDetailsRequest(input *GetAccountAuthorizationDetailsInput) (req *request.Request, output *GetAccountAuthorizationDetailsOutput) { - op := &request.Operation{ - Name: opGetAccountAuthorizationDetails, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &GetAccountAuthorizationDetailsInput{} - } - - output = &GetAccountAuthorizationDetailsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetAccountAuthorizationDetails API operation for AWS Identity and Access Management. -// -// Retrieves information about all IAM users, groups, roles, and policies in -// your Amazon Web Services account, including their relationships to one another. -// Use this operation to obtain a snapshot of the configuration of IAM permissions -// (users, groups, roles, and policies) in your account. -// -// Policies returned by this operation are URL-encoded compliant with RFC 3986 -// (https://tools.ietf.org/html/rfc3986). You can use a URL decoding method -// to convert the policy back to plain JSON text. For example, if you use Java, -// you can use the decode method of the java.net.URLDecoder utility class in -// the Java SDK. Other languages and SDKs provide similar functionality. -// -// You can optionally filter the results using the Filter parameter. You can -// paginate the results using the MaxItems and Marker parameters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetAccountAuthorizationDetails for usage and error information. -// -// Returned Error Codes: -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetAccountAuthorizationDetails -func (c *IAM) GetAccountAuthorizationDetails(input *GetAccountAuthorizationDetailsInput) (*GetAccountAuthorizationDetailsOutput, error) { - req, out := c.GetAccountAuthorizationDetailsRequest(input) - return out, req.Send() -} - -// GetAccountAuthorizationDetailsWithContext is the same as GetAccountAuthorizationDetails with the addition of -// the ability to pass a context and additional request options. -// -// See GetAccountAuthorizationDetails 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 *IAM) GetAccountAuthorizationDetailsWithContext(ctx aws.Context, input *GetAccountAuthorizationDetailsInput, opts ...request.Option) (*GetAccountAuthorizationDetailsOutput, error) { - req, out := c.GetAccountAuthorizationDetailsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetAccountAuthorizationDetailsPages iterates over the pages of a GetAccountAuthorizationDetails operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetAccountAuthorizationDetails 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 GetAccountAuthorizationDetails operation. -// pageNum := 0 -// err := client.GetAccountAuthorizationDetailsPages(params, -// func(page *iam.GetAccountAuthorizationDetailsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) GetAccountAuthorizationDetailsPages(input *GetAccountAuthorizationDetailsInput, fn func(*GetAccountAuthorizationDetailsOutput, bool) bool) error { - return c.GetAccountAuthorizationDetailsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetAccountAuthorizationDetailsPagesWithContext same as GetAccountAuthorizationDetailsPages 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 *IAM) GetAccountAuthorizationDetailsPagesWithContext(ctx aws.Context, input *GetAccountAuthorizationDetailsInput, fn func(*GetAccountAuthorizationDetailsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetAccountAuthorizationDetailsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetAccountAuthorizationDetailsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*GetAccountAuthorizationDetailsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opGetAccountPasswordPolicy = "GetAccountPasswordPolicy" - -// GetAccountPasswordPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetAccountPasswordPolicy 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 GetAccountPasswordPolicy for more information on using the GetAccountPasswordPolicy -// 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 GetAccountPasswordPolicyRequest method. -// req, resp := client.GetAccountPasswordPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetAccountPasswordPolicy -func (c *IAM) GetAccountPasswordPolicyRequest(input *GetAccountPasswordPolicyInput) (req *request.Request, output *GetAccountPasswordPolicyOutput) { - op := &request.Operation{ - Name: opGetAccountPasswordPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetAccountPasswordPolicyInput{} - } - - output = &GetAccountPasswordPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetAccountPasswordPolicy API operation for AWS Identity and Access Management. -// -// Retrieves the password policy for the Amazon Web Services account. This tells -// you the complexity requirements and mandatory rotation periods for the IAM -// user passwords in your account. For more information about using a password -// policy, see Managing an IAM password policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingPasswordPolicies.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 AWS Identity and Access Management's -// API operation GetAccountPasswordPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetAccountPasswordPolicy -func (c *IAM) GetAccountPasswordPolicy(input *GetAccountPasswordPolicyInput) (*GetAccountPasswordPolicyOutput, error) { - req, out := c.GetAccountPasswordPolicyRequest(input) - return out, req.Send() -} - -// GetAccountPasswordPolicyWithContext is the same as GetAccountPasswordPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetAccountPasswordPolicy 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 *IAM) GetAccountPasswordPolicyWithContext(ctx aws.Context, input *GetAccountPasswordPolicyInput, opts ...request.Option) (*GetAccountPasswordPolicyOutput, error) { - req, out := c.GetAccountPasswordPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetAccountSummary = "GetAccountSummary" - -// GetAccountSummaryRequest generates a "aws/request.Request" representing the -// client's request for the GetAccountSummary 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 GetAccountSummary for more information on using the GetAccountSummary -// 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 GetAccountSummaryRequest method. -// req, resp := client.GetAccountSummaryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetAccountSummary -func (c *IAM) GetAccountSummaryRequest(input *GetAccountSummaryInput) (req *request.Request, output *GetAccountSummaryOutput) { - op := &request.Operation{ - Name: opGetAccountSummary, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetAccountSummaryInput{} - } - - output = &GetAccountSummaryOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetAccountSummary API operation for AWS Identity and Access Management. -// -// Retrieves information about IAM entity usage and IAM quotas in the Amazon -// Web Services account. -// -// For information about IAM quotas, see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation GetAccountSummary for usage and error information. -// -// Returned Error Codes: -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetAccountSummary -func (c *IAM) GetAccountSummary(input *GetAccountSummaryInput) (*GetAccountSummaryOutput, error) { - req, out := c.GetAccountSummaryRequest(input) - return out, req.Send() -} - -// GetAccountSummaryWithContext is the same as GetAccountSummary with the addition of -// the ability to pass a context and additional request options. -// -// See GetAccountSummary 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 *IAM) GetAccountSummaryWithContext(ctx aws.Context, input *GetAccountSummaryInput, opts ...request.Option) (*GetAccountSummaryOutput, error) { - req, out := c.GetAccountSummaryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetContextKeysForCustomPolicy = "GetContextKeysForCustomPolicy" - -// GetContextKeysForCustomPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetContextKeysForCustomPolicy 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 GetContextKeysForCustomPolicy for more information on using the GetContextKeysForCustomPolicy -// 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 GetContextKeysForCustomPolicyRequest method. -// req, resp := client.GetContextKeysForCustomPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetContextKeysForCustomPolicy -func (c *IAM) GetContextKeysForCustomPolicyRequest(input *GetContextKeysForCustomPolicyInput) (req *request.Request, output *GetContextKeysForPolicyResponse) { - op := &request.Operation{ - Name: opGetContextKeysForCustomPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetContextKeysForCustomPolicyInput{} - } - - output = &GetContextKeysForPolicyResponse{} - req = c.newRequest(op, input, output) - return -} - -// GetContextKeysForCustomPolicy API operation for AWS Identity and Access Management. -// -// Gets a list of all of the context keys referenced in the input policies. -// The policies are supplied as a list of one or more strings. To get the context -// keys from policies associated with an IAM user, group, or role, use GetContextKeysForPrincipalPolicy. -// -// Context keys are variables maintained by Amazon Web Services and its services -// that provide details about the context of an API query request. Context keys -// can be evaluated by testing against a value specified in an IAM policy. Use -// GetContextKeysForCustomPolicy to understand what key names and values you -// must supply when you call SimulateCustomPolicy. Note that all parameters -// are shown in unencoded form here for clarity but must be URL encoded to be -// included as a part of a real HTML request. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetContextKeysForCustomPolicy for usage and error information. -// -// Returned Error Codes: -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetContextKeysForCustomPolicy -func (c *IAM) GetContextKeysForCustomPolicy(input *GetContextKeysForCustomPolicyInput) (*GetContextKeysForPolicyResponse, error) { - req, out := c.GetContextKeysForCustomPolicyRequest(input) - return out, req.Send() -} - -// GetContextKeysForCustomPolicyWithContext is the same as GetContextKeysForCustomPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetContextKeysForCustomPolicy 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 *IAM) GetContextKeysForCustomPolicyWithContext(ctx aws.Context, input *GetContextKeysForCustomPolicyInput, opts ...request.Option) (*GetContextKeysForPolicyResponse, error) { - req, out := c.GetContextKeysForCustomPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetContextKeysForPrincipalPolicy = "GetContextKeysForPrincipalPolicy" - -// GetContextKeysForPrincipalPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetContextKeysForPrincipalPolicy 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 GetContextKeysForPrincipalPolicy for more information on using the GetContextKeysForPrincipalPolicy -// 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 GetContextKeysForPrincipalPolicyRequest method. -// req, resp := client.GetContextKeysForPrincipalPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetContextKeysForPrincipalPolicy -func (c *IAM) GetContextKeysForPrincipalPolicyRequest(input *GetContextKeysForPrincipalPolicyInput) (req *request.Request, output *GetContextKeysForPolicyResponse) { - op := &request.Operation{ - Name: opGetContextKeysForPrincipalPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetContextKeysForPrincipalPolicyInput{} - } - - output = &GetContextKeysForPolicyResponse{} - req = c.newRequest(op, input, output) - return -} - -// GetContextKeysForPrincipalPolicy API operation for AWS Identity and Access Management. -// -// Gets a list of all of the context keys referenced in all the IAM policies -// that are attached to the specified IAM entity. The entity can be an IAM user, -// group, or role. If you specify a user, then the request also includes all -// of the policies attached to groups that the user is a member of. -// -// You can optionally include a list of one or more additional policies, specified -// as strings. If you want to include only a list of policies by string, use -// GetContextKeysForCustomPolicy instead. -// -// Note: This operation discloses information about the permissions granted -// to other users. If you do not want users to see other user's permissions, -// then consider allowing them to use GetContextKeysForCustomPolicy instead. -// -// Context keys are variables maintained by Amazon Web Services and its services -// that provide details about the context of an API query request. Context keys -// can be evaluated by testing against a value in an IAM policy. Use GetContextKeysForPrincipalPolicy -// to understand what key names and values you must supply when you call SimulatePrincipalPolicy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetContextKeysForPrincipalPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetContextKeysForPrincipalPolicy -func (c *IAM) GetContextKeysForPrincipalPolicy(input *GetContextKeysForPrincipalPolicyInput) (*GetContextKeysForPolicyResponse, error) { - req, out := c.GetContextKeysForPrincipalPolicyRequest(input) - return out, req.Send() -} - -// GetContextKeysForPrincipalPolicyWithContext is the same as GetContextKeysForPrincipalPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetContextKeysForPrincipalPolicy 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 *IAM) GetContextKeysForPrincipalPolicyWithContext(ctx aws.Context, input *GetContextKeysForPrincipalPolicyInput, opts ...request.Option) (*GetContextKeysForPolicyResponse, error) { - req, out := c.GetContextKeysForPrincipalPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetCredentialReport = "GetCredentialReport" - -// GetCredentialReportRequest generates a "aws/request.Request" representing the -// client's request for the GetCredentialReport 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 GetCredentialReport for more information on using the GetCredentialReport -// 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 GetCredentialReportRequest method. -// req, resp := client.GetCredentialReportRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetCredentialReport -func (c *IAM) GetCredentialReportRequest(input *GetCredentialReportInput) (req *request.Request, output *GetCredentialReportOutput) { - op := &request.Operation{ - Name: opGetCredentialReport, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetCredentialReportInput{} - } - - output = &GetCredentialReportOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetCredentialReport API operation for AWS Identity and Access Management. -// -// Retrieves a credential report for the Amazon Web Services account. For more -// information about the credential report, see Getting credential reports (https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation GetCredentialReport for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeCredentialReportNotPresentException "ReportNotPresent" -// The request was rejected because the credential report does not exist. To -// generate a credential report, use GenerateCredentialReport. -// -// - ErrCodeCredentialReportExpiredException "ReportExpired" -// The request was rejected because the most recent credential report has expired. -// To generate a new credential report, use GenerateCredentialReport. For more -// information about credential report expiration, see Getting credential reports -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html) -// in the IAM User Guide. -// -// - ErrCodeCredentialReportNotReadyException "ReportInProgress" -// The request was rejected because the credential report is still being generated. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetCredentialReport -func (c *IAM) GetCredentialReport(input *GetCredentialReportInput) (*GetCredentialReportOutput, error) { - req, out := c.GetCredentialReportRequest(input) - return out, req.Send() -} - -// GetCredentialReportWithContext is the same as GetCredentialReport with the addition of -// the ability to pass a context and additional request options. -// -// See GetCredentialReport 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 *IAM) GetCredentialReportWithContext(ctx aws.Context, input *GetCredentialReportInput, opts ...request.Option) (*GetCredentialReportOutput, error) { - req, out := c.GetCredentialReportRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetGroup = "GetGroup" - -// GetGroupRequest generates a "aws/request.Request" representing the -// client's request for the GetGroup 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 GetGroup for more information on using the GetGroup -// 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 GetGroupRequest method. -// req, resp := client.GetGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetGroup -func (c *IAM) GetGroupRequest(input *GetGroupInput) (req *request.Request, output *GetGroupOutput) { - op := &request.Operation{ - Name: opGetGroup, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &GetGroupInput{} - } - - output = &GetGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetGroup API operation for AWS Identity and Access Management. -// -// Returns a list of IAM users that are in the specified IAM group. You can -// paginate the results using the MaxItems and Marker parameters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetGroup for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetGroup -func (c *IAM) GetGroup(input *GetGroupInput) (*GetGroupOutput, error) { - req, out := c.GetGroupRequest(input) - return out, req.Send() -} - -// GetGroupWithContext is the same as GetGroup with the addition of -// the ability to pass a context and additional request options. -// -// See GetGroup 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 *IAM) GetGroupWithContext(ctx aws.Context, input *GetGroupInput, opts ...request.Option) (*GetGroupOutput, error) { - req, out := c.GetGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetGroupPages iterates over the pages of a GetGroup operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetGroup 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 GetGroup operation. -// pageNum := 0 -// err := client.GetGroupPages(params, -// func(page *iam.GetGroupOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) GetGroupPages(input *GetGroupInput, fn func(*GetGroupOutput, bool) bool) error { - return c.GetGroupPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetGroupPagesWithContext same as GetGroupPages 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 *IAM) GetGroupPagesWithContext(ctx aws.Context, input *GetGroupInput, fn func(*GetGroupOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetGroupInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetGroupRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*GetGroupOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opGetGroupPolicy = "GetGroupPolicy" - -// GetGroupPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetGroupPolicy 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 GetGroupPolicy for more information on using the GetGroupPolicy -// 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 GetGroupPolicyRequest method. -// req, resp := client.GetGroupPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetGroupPolicy -func (c *IAM) GetGroupPolicyRequest(input *GetGroupPolicyInput) (req *request.Request, output *GetGroupPolicyOutput) { - op := &request.Operation{ - Name: opGetGroupPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetGroupPolicyInput{} - } - - output = &GetGroupPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetGroupPolicy API operation for AWS Identity and Access Management. -// -// Retrieves the specified inline policy document that is embedded in the specified -// IAM group. -// -// Policies returned by this operation are URL-encoded compliant with RFC 3986 -// (https://tools.ietf.org/html/rfc3986). You can use a URL decoding method -// to convert the policy back to plain JSON text. For example, if you use Java, -// you can use the decode method of the java.net.URLDecoder utility class in -// the Java SDK. Other languages and SDKs provide similar functionality. -// -// An IAM group can also have managed policies attached to it. To retrieve a -// managed policy document that is attached to a group, use GetPolicy to determine -// the policy's default version, then use GetPolicyVersion to retrieve the policy -// document. -// -// For more information about policies, see Managed policies and inline policies -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation GetGroupPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetGroupPolicy -func (c *IAM) GetGroupPolicy(input *GetGroupPolicyInput) (*GetGroupPolicyOutput, error) { - req, out := c.GetGroupPolicyRequest(input) - return out, req.Send() -} - -// GetGroupPolicyWithContext is the same as GetGroupPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetGroupPolicy 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 *IAM) GetGroupPolicyWithContext(ctx aws.Context, input *GetGroupPolicyInput, opts ...request.Option) (*GetGroupPolicyOutput, error) { - req, out := c.GetGroupPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetInstanceProfile = "GetInstanceProfile" - -// GetInstanceProfileRequest generates a "aws/request.Request" representing the -// client's request for the GetInstanceProfile 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 GetInstanceProfile for more information on using the GetInstanceProfile -// 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 GetInstanceProfileRequest method. -// req, resp := client.GetInstanceProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetInstanceProfile -func (c *IAM) GetInstanceProfileRequest(input *GetInstanceProfileInput) (req *request.Request, output *GetInstanceProfileOutput) { - op := &request.Operation{ - Name: opGetInstanceProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetInstanceProfileInput{} - } - - output = &GetInstanceProfileOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetInstanceProfile API operation for AWS Identity and Access Management. -// -// Retrieves information about the specified instance profile, including the -// instance profile's path, GUID, ARN, and role. For more information about -// instance profiles, see Using instance profiles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation GetInstanceProfile for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetInstanceProfile -func (c *IAM) GetInstanceProfile(input *GetInstanceProfileInput) (*GetInstanceProfileOutput, error) { - req, out := c.GetInstanceProfileRequest(input) - return out, req.Send() -} - -// GetInstanceProfileWithContext is the same as GetInstanceProfile with the addition of -// the ability to pass a context and additional request options. -// -// See GetInstanceProfile 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 *IAM) GetInstanceProfileWithContext(ctx aws.Context, input *GetInstanceProfileInput, opts ...request.Option) (*GetInstanceProfileOutput, error) { - req, out := c.GetInstanceProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetLoginProfile = "GetLoginProfile" - -// GetLoginProfileRequest generates a "aws/request.Request" representing the -// client's request for the GetLoginProfile 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 GetLoginProfile for more information on using the GetLoginProfile -// 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 GetLoginProfileRequest method. -// req, resp := client.GetLoginProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetLoginProfile -func (c *IAM) GetLoginProfileRequest(input *GetLoginProfileInput) (req *request.Request, output *GetLoginProfileOutput) { - op := &request.Operation{ - Name: opGetLoginProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetLoginProfileInput{} - } - - output = &GetLoginProfileOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetLoginProfile API operation for AWS Identity and Access Management. -// -// Retrieves the user name for the specified IAM user. A login profile is created -// when you create a password for the user to access the Amazon Web Services -// Management Console. If the user does not exist or does not have a password, -// the operation returns a 404 (NoSuchEntity) error. -// -// If you create an IAM user with access to the console, the CreateDate reflects -// the date you created the initial password for the user. -// -// If you create an IAM user with programmatic access, and then later add a -// password for the user to access the Amazon Web Services Management Console, -// the CreateDate reflects the initial password creation date. A user with programmatic -// access does not have a login profile unless you create a password for the -// user to access the Amazon Web Services Management Console. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetLoginProfile for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetLoginProfile -func (c *IAM) GetLoginProfile(input *GetLoginProfileInput) (*GetLoginProfileOutput, error) { - req, out := c.GetLoginProfileRequest(input) - return out, req.Send() -} - -// GetLoginProfileWithContext is the same as GetLoginProfile with the addition of -// the ability to pass a context and additional request options. -// -// See GetLoginProfile 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 *IAM) GetLoginProfileWithContext(ctx aws.Context, input *GetLoginProfileInput, opts ...request.Option) (*GetLoginProfileOutput, error) { - req, out := c.GetLoginProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetMFADevice = "GetMFADevice" - -// GetMFADeviceRequest generates a "aws/request.Request" representing the -// client's request for the GetMFADevice 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 GetMFADevice for more information on using the GetMFADevice -// 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 GetMFADeviceRequest method. -// req, resp := client.GetMFADeviceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetMFADevice -func (c *IAM) GetMFADeviceRequest(input *GetMFADeviceInput) (req *request.Request, output *GetMFADeviceOutput) { - op := &request.Operation{ - Name: opGetMFADevice, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetMFADeviceInput{} - } - - output = &GetMFADeviceOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetMFADevice API operation for AWS Identity and Access Management. -// -// Retrieves information about an MFA device for a specified user. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetMFADevice for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetMFADevice -func (c *IAM) GetMFADevice(input *GetMFADeviceInput) (*GetMFADeviceOutput, error) { - req, out := c.GetMFADeviceRequest(input) - return out, req.Send() -} - -// GetMFADeviceWithContext is the same as GetMFADevice with the addition of -// the ability to pass a context and additional request options. -// -// See GetMFADevice 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 *IAM) GetMFADeviceWithContext(ctx aws.Context, input *GetMFADeviceInput, opts ...request.Option) (*GetMFADeviceOutput, error) { - req, out := c.GetMFADeviceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetOpenIDConnectProvider = "GetOpenIDConnectProvider" - -// GetOpenIDConnectProviderRequest generates a "aws/request.Request" representing the -// client's request for the GetOpenIDConnectProvider 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 GetOpenIDConnectProvider for more information on using the GetOpenIDConnectProvider -// 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 GetOpenIDConnectProviderRequest method. -// req, resp := client.GetOpenIDConnectProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetOpenIDConnectProvider -func (c *IAM) GetOpenIDConnectProviderRequest(input *GetOpenIDConnectProviderInput) (req *request.Request, output *GetOpenIDConnectProviderOutput) { - op := &request.Operation{ - Name: opGetOpenIDConnectProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetOpenIDConnectProviderInput{} - } - - output = &GetOpenIDConnectProviderOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetOpenIDConnectProvider API operation for AWS Identity and Access Management. -// -// Returns information about the specified OpenID Connect (OIDC) provider resource -// object in IAM. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetOpenIDConnectProvider for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetOpenIDConnectProvider -func (c *IAM) GetOpenIDConnectProvider(input *GetOpenIDConnectProviderInput) (*GetOpenIDConnectProviderOutput, error) { - req, out := c.GetOpenIDConnectProviderRequest(input) - return out, req.Send() -} - -// GetOpenIDConnectProviderWithContext is the same as GetOpenIDConnectProvider with the addition of -// the ability to pass a context and additional request options. -// -// See GetOpenIDConnectProvider 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 *IAM) GetOpenIDConnectProviderWithContext(ctx aws.Context, input *GetOpenIDConnectProviderInput, opts ...request.Option) (*GetOpenIDConnectProviderOutput, error) { - req, out := c.GetOpenIDConnectProviderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetOrganizationsAccessReport = "GetOrganizationsAccessReport" - -// GetOrganizationsAccessReportRequest generates a "aws/request.Request" representing the -// client's request for the GetOrganizationsAccessReport 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 GetOrganizationsAccessReport for more information on using the GetOrganizationsAccessReport -// 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 GetOrganizationsAccessReportRequest method. -// req, resp := client.GetOrganizationsAccessReportRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetOrganizationsAccessReport -func (c *IAM) GetOrganizationsAccessReportRequest(input *GetOrganizationsAccessReportInput) (req *request.Request, output *GetOrganizationsAccessReportOutput) { - op := &request.Operation{ - Name: opGetOrganizationsAccessReport, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetOrganizationsAccessReportInput{} - } - - output = &GetOrganizationsAccessReportOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetOrganizationsAccessReport API operation for AWS Identity and Access Management. -// -// Retrieves the service last accessed data report for Organizations that was -// previously generated using the GenerateOrganizationsAccessReport operation. -// This operation retrieves the status of your report job and the report contents. -// -// Depending on the parameters that you passed when you generated the report, -// the data returned could include different information. For details, see GenerateOrganizationsAccessReport. -// -// To call this operation, you must be signed in to the management account in -// your organization. SCPs must be enabled for your organization root. You must -// have permissions to perform this operation. For more information, see Refining -// permissions using service last accessed data (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html) -// in the IAM User Guide. -// -// For each service that principals in an account (root user, IAM users, or -// IAM roles) could access using SCPs, the operation returns details about the -// most recent access attempt. If there was no attempt, the service is listed -// without details about the most recent attempt to access the service. If the -// operation fails, it returns the reason that it failed. -// -// By default, the list is sorted by service namespace. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetOrganizationsAccessReport for usage and error information. -// -// Returned Error Codes: -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetOrganizationsAccessReport -func (c *IAM) GetOrganizationsAccessReport(input *GetOrganizationsAccessReportInput) (*GetOrganizationsAccessReportOutput, error) { - req, out := c.GetOrganizationsAccessReportRequest(input) - return out, req.Send() -} - -// GetOrganizationsAccessReportWithContext is the same as GetOrganizationsAccessReport with the addition of -// the ability to pass a context and additional request options. -// -// See GetOrganizationsAccessReport 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 *IAM) GetOrganizationsAccessReportWithContext(ctx aws.Context, input *GetOrganizationsAccessReportInput, opts ...request.Option) (*GetOrganizationsAccessReportOutput, error) { - req, out := c.GetOrganizationsAccessReportRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetPolicy = "GetPolicy" - -// GetPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetPolicy 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 GetPolicy for more information on using the GetPolicy -// 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 GetPolicyRequest method. -// req, resp := client.GetPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetPolicy -func (c *IAM) GetPolicyRequest(input *GetPolicyInput) (req *request.Request, output *GetPolicyOutput) { - op := &request.Operation{ - Name: opGetPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetPolicyInput{} - } - - output = &GetPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetPolicy API operation for AWS Identity and Access Management. -// -// Retrieves information about the specified managed policy, including the policy's -// default version and the total number of IAM users, groups, and roles to which -// the policy is attached. To retrieve the list of the specific users, groups, -// and roles that the policy is attached to, use ListEntitiesForPolicy. This -// operation returns metadata about the policy. To retrieve the actual policy -// document for a specific version of the policy, use GetPolicyVersion. -// -// This operation retrieves information about managed policies. To retrieve -// information about an inline policy that is embedded with an IAM user, group, -// or role, use GetUserPolicy, GetGroupPolicy, or GetRolePolicy. -// -// For more information about policies, see Managed policies and inline policies -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation GetPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetPolicy -func (c *IAM) GetPolicy(input *GetPolicyInput) (*GetPolicyOutput, error) { - req, out := c.GetPolicyRequest(input) - return out, req.Send() -} - -// GetPolicyWithContext is the same as GetPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetPolicy 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 *IAM) GetPolicyWithContext(ctx aws.Context, input *GetPolicyInput, opts ...request.Option) (*GetPolicyOutput, error) { - req, out := c.GetPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetPolicyVersion = "GetPolicyVersion" - -// GetPolicyVersionRequest generates a "aws/request.Request" representing the -// client's request for the GetPolicyVersion 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 GetPolicyVersion for more information on using the GetPolicyVersion -// 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 GetPolicyVersionRequest method. -// req, resp := client.GetPolicyVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetPolicyVersion -func (c *IAM) GetPolicyVersionRequest(input *GetPolicyVersionInput) (req *request.Request, output *GetPolicyVersionOutput) { - op := &request.Operation{ - Name: opGetPolicyVersion, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetPolicyVersionInput{} - } - - output = &GetPolicyVersionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetPolicyVersion API operation for AWS Identity and Access Management. -// -// Retrieves information about the specified version of the specified managed -// policy, including the policy document. -// -// Policies returned by this operation are URL-encoded compliant with RFC 3986 -// (https://tools.ietf.org/html/rfc3986). You can use a URL decoding method -// to convert the policy back to plain JSON text. For example, if you use Java, -// you can use the decode method of the java.net.URLDecoder utility class in -// the Java SDK. Other languages and SDKs provide similar functionality. -// -// To list the available versions for a policy, use ListPolicyVersions. -// -// This operation retrieves information about managed policies. To retrieve -// information about an inline policy that is embedded in a user, group, or -// role, use GetUserPolicy, GetGroupPolicy, or GetRolePolicy. -// -// For more information about the types of policies, see Managed policies and -// inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// For more information about managed policy versions, see Versioning for managed -// policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation GetPolicyVersion for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetPolicyVersion -func (c *IAM) GetPolicyVersion(input *GetPolicyVersionInput) (*GetPolicyVersionOutput, error) { - req, out := c.GetPolicyVersionRequest(input) - return out, req.Send() -} - -// GetPolicyVersionWithContext is the same as GetPolicyVersion with the addition of -// the ability to pass a context and additional request options. -// -// See GetPolicyVersion 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 *IAM) GetPolicyVersionWithContext(ctx aws.Context, input *GetPolicyVersionInput, opts ...request.Option) (*GetPolicyVersionOutput, error) { - req, out := c.GetPolicyVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRole = "GetRole" - -// GetRoleRequest generates a "aws/request.Request" representing the -// client's request for the GetRole 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 GetRole for more information on using the GetRole -// 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 GetRoleRequest method. -// req, resp := client.GetRoleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetRole -func (c *IAM) GetRoleRequest(input *GetRoleInput) (req *request.Request, output *GetRoleOutput) { - op := &request.Operation{ - Name: opGetRole, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetRoleInput{} - } - - output = &GetRoleOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRole API operation for AWS Identity and Access Management. -// -// Retrieves information about the specified role, including the role's path, -// GUID, ARN, and the role's trust policy that grants permission to assume the -// role. For more information about roles, see IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) -// in the IAM User Guide. -// -// Policies returned by this operation are URL-encoded compliant with RFC 3986 -// (https://tools.ietf.org/html/rfc3986). You can use a URL decoding method -// to convert the policy back to plain JSON text. For example, if you use Java, -// you can use the decode method of the java.net.URLDecoder utility class in -// the Java SDK. Other languages and SDKs provide similar functionality. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetRole for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetRole -func (c *IAM) GetRole(input *GetRoleInput) (*GetRoleOutput, error) { - req, out := c.GetRoleRequest(input) - return out, req.Send() -} - -// GetRoleWithContext is the same as GetRole with the addition of -// the ability to pass a context and additional request options. -// -// See GetRole 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 *IAM) GetRoleWithContext(ctx aws.Context, input *GetRoleInput, opts ...request.Option) (*GetRoleOutput, error) { - req, out := c.GetRoleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetRolePolicy = "GetRolePolicy" - -// GetRolePolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetRolePolicy 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 GetRolePolicy for more information on using the GetRolePolicy -// 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 GetRolePolicyRequest method. -// req, resp := client.GetRolePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetRolePolicy -func (c *IAM) GetRolePolicyRequest(input *GetRolePolicyInput) (req *request.Request, output *GetRolePolicyOutput) { - op := &request.Operation{ - Name: opGetRolePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetRolePolicyInput{} - } - - output = &GetRolePolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetRolePolicy API operation for AWS Identity and Access Management. -// -// Retrieves the specified inline policy document that is embedded with the -// specified IAM role. -// -// Policies returned by this operation are URL-encoded compliant with RFC 3986 -// (https://tools.ietf.org/html/rfc3986). You can use a URL decoding method -// to convert the policy back to plain JSON text. For example, if you use Java, -// you can use the decode method of the java.net.URLDecoder utility class in -// the Java SDK. Other languages and SDKs provide similar functionality. -// -// An IAM role can also have managed policies attached to it. To retrieve a -// managed policy document that is attached to a role, use GetPolicy to determine -// the policy's default version, then use GetPolicyVersion to retrieve the policy -// document. -// -// For more information about policies, see Managed policies and inline policies -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// For more information about roles, see IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation GetRolePolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetRolePolicy -func (c *IAM) GetRolePolicy(input *GetRolePolicyInput) (*GetRolePolicyOutput, error) { - req, out := c.GetRolePolicyRequest(input) - return out, req.Send() -} - -// GetRolePolicyWithContext is the same as GetRolePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetRolePolicy 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 *IAM) GetRolePolicyWithContext(ctx aws.Context, input *GetRolePolicyInput, opts ...request.Option) (*GetRolePolicyOutput, error) { - req, out := c.GetRolePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSAMLProvider = "GetSAMLProvider" - -// GetSAMLProviderRequest generates a "aws/request.Request" representing the -// client's request for the GetSAMLProvider 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 GetSAMLProvider for more information on using the GetSAMLProvider -// 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 GetSAMLProviderRequest method. -// req, resp := client.GetSAMLProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetSAMLProvider -func (c *IAM) GetSAMLProviderRequest(input *GetSAMLProviderInput) (req *request.Request, output *GetSAMLProviderOutput) { - op := &request.Operation{ - Name: opGetSAMLProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetSAMLProviderInput{} - } - - output = &GetSAMLProviderOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSAMLProvider API operation for AWS Identity and Access Management. -// -// Returns the SAML provider metadocument that was uploaded when the IAM SAML -// provider resource object was created or updated. -// -// This operation requires Signature Version 4 (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.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 AWS Identity and Access Management's -// API operation GetSAMLProvider for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetSAMLProvider -func (c *IAM) GetSAMLProvider(input *GetSAMLProviderInput) (*GetSAMLProviderOutput, error) { - req, out := c.GetSAMLProviderRequest(input) - return out, req.Send() -} - -// GetSAMLProviderWithContext is the same as GetSAMLProvider with the addition of -// the ability to pass a context and additional request options. -// -// See GetSAMLProvider 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 *IAM) GetSAMLProviderWithContext(ctx aws.Context, input *GetSAMLProviderInput, opts ...request.Option) (*GetSAMLProviderOutput, error) { - req, out := c.GetSAMLProviderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetSSHPublicKey = "GetSSHPublicKey" - -// GetSSHPublicKeyRequest generates a "aws/request.Request" representing the -// client's request for the GetSSHPublicKey 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 GetSSHPublicKey for more information on using the GetSSHPublicKey -// 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 GetSSHPublicKeyRequest method. -// req, resp := client.GetSSHPublicKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetSSHPublicKey -func (c *IAM) GetSSHPublicKeyRequest(input *GetSSHPublicKeyInput) (req *request.Request, output *GetSSHPublicKeyOutput) { - op := &request.Operation{ - Name: opGetSSHPublicKey, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetSSHPublicKeyInput{} - } - - output = &GetSSHPublicKeyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetSSHPublicKey API operation for AWS Identity and Access Management. -// -// Retrieves the specified SSH public key, including metadata about the key. -// -// The SSH public key retrieved by this operation is used only for authenticating -// the associated IAM user to an CodeCommit repository. For more information -// about using SSH keys to authenticate to an CodeCommit repository, see Set -// up CodeCommit for SSH connections (https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html) -// in the CodeCommit 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 AWS Identity and Access Management's -// API operation GetSSHPublicKey for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeUnrecognizedPublicKeyEncodingException "UnrecognizedPublicKeyEncoding" -// The request was rejected because the public key encoding format is unsupported -// or unrecognized. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetSSHPublicKey -func (c *IAM) GetSSHPublicKey(input *GetSSHPublicKeyInput) (*GetSSHPublicKeyOutput, error) { - req, out := c.GetSSHPublicKeyRequest(input) - return out, req.Send() -} - -// GetSSHPublicKeyWithContext is the same as GetSSHPublicKey with the addition of -// the ability to pass a context and additional request options. -// -// See GetSSHPublicKey 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 *IAM) GetSSHPublicKeyWithContext(ctx aws.Context, input *GetSSHPublicKeyInput, opts ...request.Option) (*GetSSHPublicKeyOutput, error) { - req, out := c.GetSSHPublicKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetServerCertificate = "GetServerCertificate" - -// GetServerCertificateRequest generates a "aws/request.Request" representing the -// client's request for the GetServerCertificate 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 GetServerCertificate for more information on using the GetServerCertificate -// 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 GetServerCertificateRequest method. -// req, resp := client.GetServerCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetServerCertificate -func (c *IAM) GetServerCertificateRequest(input *GetServerCertificateInput) (req *request.Request, output *GetServerCertificateOutput) { - op := &request.Operation{ - Name: opGetServerCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetServerCertificateInput{} - } - - output = &GetServerCertificateOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetServerCertificate API operation for AWS Identity and Access Management. -// -// Retrieves information about the specified server certificate stored in IAM. -// -// For more information about working with server certificates, see Working -// with server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) -// in the IAM User Guide. This topic includes a list of Amazon Web Services -// services that can use the server certificates that you manage with IAM. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetServerCertificate for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetServerCertificate -func (c *IAM) GetServerCertificate(input *GetServerCertificateInput) (*GetServerCertificateOutput, error) { - req, out := c.GetServerCertificateRequest(input) - return out, req.Send() -} - -// GetServerCertificateWithContext is the same as GetServerCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See GetServerCertificate 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 *IAM) GetServerCertificateWithContext(ctx aws.Context, input *GetServerCertificateInput, opts ...request.Option) (*GetServerCertificateOutput, error) { - req, out := c.GetServerCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetServiceLastAccessedDetails = "GetServiceLastAccessedDetails" - -// GetServiceLastAccessedDetailsRequest generates a "aws/request.Request" representing the -// client's request for the GetServiceLastAccessedDetails 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 GetServiceLastAccessedDetails for more information on using the GetServiceLastAccessedDetails -// 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 GetServiceLastAccessedDetailsRequest method. -// req, resp := client.GetServiceLastAccessedDetailsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetServiceLastAccessedDetails -func (c *IAM) GetServiceLastAccessedDetailsRequest(input *GetServiceLastAccessedDetailsInput) (req *request.Request, output *GetServiceLastAccessedDetailsOutput) { - op := &request.Operation{ - Name: opGetServiceLastAccessedDetails, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetServiceLastAccessedDetailsInput{} - } - - output = &GetServiceLastAccessedDetailsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetServiceLastAccessedDetails API operation for AWS Identity and Access Management. -// -// Retrieves a service last accessed report that was created using the GenerateServiceLastAccessedDetails -// operation. You can use the JobId parameter in GetServiceLastAccessedDetails -// to retrieve the status of your report job. When the report is complete, you -// can retrieve the generated report. The report includes a list of Amazon Web -// Services services that the resource (user, group, role, or managed policy) -// can access. -// -// Service last accessed data does not use other policy types when determining -// whether a resource could access a service. These other policy types include -// resource-based policies, access control lists, Organizations policies, IAM -// permissions boundaries, and STS assume role policies. It only applies permissions -// policy logic. For more about the evaluation of policy types, see Evaluating -// policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics) -// in the IAM User Guide. -// -// For each service that the resource could access using permissions policies, -// the operation returns details about the most recent access attempt. If there -// was no attempt, the service is listed without details about the most recent -// attempt to access the service. If the operation fails, the GetServiceLastAccessedDetails -// operation returns the reason that it failed. -// -// The GetServiceLastAccessedDetails operation returns a list of services. This -// list includes the number of entities that have attempted to access the service -// and the date and time of the last attempt. It also returns the ARN of the -// following entity, depending on the resource ARN that you used to generate -// the report: -// -// - User – Returns the user ARN that you used to generate the report -// -// - Group – Returns the ARN of the group member (user) that last attempted -// to access the service -// -// - Role – Returns the role ARN that you used to generate the report -// -// - Policy – Returns the ARN of the user or role that last used the policy -// to attempt to access the service -// -// By default, the list is sorted by service namespace. -// -// If you specified ACTION_LEVEL granularity when you generated the report, -// this operation returns service and action last accessed data. This includes -// the most recent access attempt for each tracked action within a service. -// Otherwise, this operation returns only service data. -// -// For more information about service and action last accessed data, see Reducing -// permissions using service last accessed data (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation GetServiceLastAccessedDetails for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetServiceLastAccessedDetails -func (c *IAM) GetServiceLastAccessedDetails(input *GetServiceLastAccessedDetailsInput) (*GetServiceLastAccessedDetailsOutput, error) { - req, out := c.GetServiceLastAccessedDetailsRequest(input) - return out, req.Send() -} - -// GetServiceLastAccessedDetailsWithContext is the same as GetServiceLastAccessedDetails with the addition of -// the ability to pass a context and additional request options. -// -// See GetServiceLastAccessedDetails 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 *IAM) GetServiceLastAccessedDetailsWithContext(ctx aws.Context, input *GetServiceLastAccessedDetailsInput, opts ...request.Option) (*GetServiceLastAccessedDetailsOutput, error) { - req, out := c.GetServiceLastAccessedDetailsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetServiceLastAccessedDetailsWithEntities = "GetServiceLastAccessedDetailsWithEntities" - -// GetServiceLastAccessedDetailsWithEntitiesRequest generates a "aws/request.Request" representing the -// client's request for the GetServiceLastAccessedDetailsWithEntities 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 GetServiceLastAccessedDetailsWithEntities for more information on using the GetServiceLastAccessedDetailsWithEntities -// 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 GetServiceLastAccessedDetailsWithEntitiesRequest method. -// req, resp := client.GetServiceLastAccessedDetailsWithEntitiesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetServiceLastAccessedDetailsWithEntities -func (c *IAM) GetServiceLastAccessedDetailsWithEntitiesRequest(input *GetServiceLastAccessedDetailsWithEntitiesInput) (req *request.Request, output *GetServiceLastAccessedDetailsWithEntitiesOutput) { - op := &request.Operation{ - Name: opGetServiceLastAccessedDetailsWithEntities, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetServiceLastAccessedDetailsWithEntitiesInput{} - } - - output = &GetServiceLastAccessedDetailsWithEntitiesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetServiceLastAccessedDetailsWithEntities API operation for AWS Identity and Access Management. -// -// After you generate a group or policy report using the GenerateServiceLastAccessedDetails -// operation, you can use the JobId parameter in GetServiceLastAccessedDetailsWithEntities. -// This operation retrieves the status of your report job and a list of entities -// that could have used group or policy permissions to access the specified -// service. -// -// - Group – For a group report, this operation returns a list of users -// in the group that could have used the group’s policies in an attempt -// to access the service. -// -// - Policy – For a policy report, this operation returns a list of entities -// (users or roles) that could have used the policy in an attempt to access -// the service. -// -// You can also use this operation for user or role reports to retrieve details -// about those entities. -// -// If the operation fails, the GetServiceLastAccessedDetailsWithEntities operation -// returns the reason that it failed. -// -// By default, the list of associated entities is sorted by date, with the most -// recent access listed first. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetServiceLastAccessedDetailsWithEntities for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetServiceLastAccessedDetailsWithEntities -func (c *IAM) GetServiceLastAccessedDetailsWithEntities(input *GetServiceLastAccessedDetailsWithEntitiesInput) (*GetServiceLastAccessedDetailsWithEntitiesOutput, error) { - req, out := c.GetServiceLastAccessedDetailsWithEntitiesRequest(input) - return out, req.Send() -} - -// GetServiceLastAccessedDetailsWithEntitiesWithContext is the same as GetServiceLastAccessedDetailsWithEntities with the addition of -// the ability to pass a context and additional request options. -// -// See GetServiceLastAccessedDetailsWithEntities 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 *IAM) GetServiceLastAccessedDetailsWithEntitiesWithContext(ctx aws.Context, input *GetServiceLastAccessedDetailsWithEntitiesInput, opts ...request.Option) (*GetServiceLastAccessedDetailsWithEntitiesOutput, error) { - req, out := c.GetServiceLastAccessedDetailsWithEntitiesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetServiceLinkedRoleDeletionStatus = "GetServiceLinkedRoleDeletionStatus" - -// GetServiceLinkedRoleDeletionStatusRequest generates a "aws/request.Request" representing the -// client's request for the GetServiceLinkedRoleDeletionStatus 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 GetServiceLinkedRoleDeletionStatus for more information on using the GetServiceLinkedRoleDeletionStatus -// 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 GetServiceLinkedRoleDeletionStatusRequest method. -// req, resp := client.GetServiceLinkedRoleDeletionStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetServiceLinkedRoleDeletionStatus -func (c *IAM) GetServiceLinkedRoleDeletionStatusRequest(input *GetServiceLinkedRoleDeletionStatusInput) (req *request.Request, output *GetServiceLinkedRoleDeletionStatusOutput) { - op := &request.Operation{ - Name: opGetServiceLinkedRoleDeletionStatus, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetServiceLinkedRoleDeletionStatusInput{} - } - - output = &GetServiceLinkedRoleDeletionStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetServiceLinkedRoleDeletionStatus API operation for AWS Identity and Access Management. -// -// Retrieves the status of your service-linked role deletion. After you use -// DeleteServiceLinkedRole to submit a service-linked role for deletion, you -// can use the DeletionTaskId parameter in GetServiceLinkedRoleDeletionStatus -// to check the status of the deletion. If the deletion fails, this operation -// returns the reason that it failed, if that information is returned by the -// service. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation GetServiceLinkedRoleDeletionStatus for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetServiceLinkedRoleDeletionStatus -func (c *IAM) GetServiceLinkedRoleDeletionStatus(input *GetServiceLinkedRoleDeletionStatusInput) (*GetServiceLinkedRoleDeletionStatusOutput, error) { - req, out := c.GetServiceLinkedRoleDeletionStatusRequest(input) - return out, req.Send() -} - -// GetServiceLinkedRoleDeletionStatusWithContext is the same as GetServiceLinkedRoleDeletionStatus with the addition of -// the ability to pass a context and additional request options. -// -// See GetServiceLinkedRoleDeletionStatus 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 *IAM) GetServiceLinkedRoleDeletionStatusWithContext(ctx aws.Context, input *GetServiceLinkedRoleDeletionStatusInput, opts ...request.Option) (*GetServiceLinkedRoleDeletionStatusOutput, error) { - req, out := c.GetServiceLinkedRoleDeletionStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetUser = "GetUser" - -// GetUserRequest generates a "aws/request.Request" representing the -// client's request for the GetUser 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 GetUser for more information on using the GetUser -// 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 GetUserRequest method. -// req, resp := client.GetUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetUser -func (c *IAM) GetUserRequest(input *GetUserInput) (req *request.Request, output *GetUserOutput) { - op := &request.Operation{ - Name: opGetUser, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetUserInput{} - } - - output = &GetUserOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetUser API operation for AWS Identity and Access Management. -// -// Retrieves information about the specified IAM user, including the user's -// creation date, path, unique ID, and ARN. -// -// If you do not specify a user name, IAM determines the user name implicitly -// based on the Amazon Web Services access key ID used to sign the request to -// this 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 AWS Identity and Access Management's -// API operation GetUser for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetUser -func (c *IAM) GetUser(input *GetUserInput) (*GetUserOutput, error) { - req, out := c.GetUserRequest(input) - return out, req.Send() -} - -// GetUserWithContext is the same as GetUser with the addition of -// the ability to pass a context and additional request options. -// -// See GetUser 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 *IAM) GetUserWithContext(ctx aws.Context, input *GetUserInput, opts ...request.Option) (*GetUserOutput, error) { - req, out := c.GetUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetUserPolicy = "GetUserPolicy" - -// GetUserPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetUserPolicy 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 GetUserPolicy for more information on using the GetUserPolicy -// 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 GetUserPolicyRequest method. -// req, resp := client.GetUserPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetUserPolicy -func (c *IAM) GetUserPolicyRequest(input *GetUserPolicyInput) (req *request.Request, output *GetUserPolicyOutput) { - op := &request.Operation{ - Name: opGetUserPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetUserPolicyInput{} - } - - output = &GetUserPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetUserPolicy API operation for AWS Identity and Access Management. -// -// Retrieves the specified inline policy document that is embedded in the specified -// IAM user. -// -// Policies returned by this operation are URL-encoded compliant with RFC 3986 -// (https://tools.ietf.org/html/rfc3986). You can use a URL decoding method -// to convert the policy back to plain JSON text. For example, if you use Java, -// you can use the decode method of the java.net.URLDecoder utility class in -// the Java SDK. Other languages and SDKs provide similar functionality. -// -// An IAM user can also have managed policies attached to it. To retrieve a -// managed policy document that is attached to a user, use GetPolicy to determine -// the policy's default version. Then use GetPolicyVersion to retrieve the policy -// document. -// -// For more information about policies, see Managed policies and inline policies -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation GetUserPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetUserPolicy -func (c *IAM) GetUserPolicy(input *GetUserPolicyInput) (*GetUserPolicyOutput, error) { - req, out := c.GetUserPolicyRequest(input) - return out, req.Send() -} - -// GetUserPolicyWithContext is the same as GetUserPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetUserPolicy 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 *IAM) GetUserPolicyWithContext(ctx aws.Context, input *GetUserPolicyInput, opts ...request.Option) (*GetUserPolicyOutput, error) { - req, out := c.GetUserPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListAccessKeys = "ListAccessKeys" - -// ListAccessKeysRequest generates a "aws/request.Request" representing the -// client's request for the ListAccessKeys 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 ListAccessKeys for more information on using the ListAccessKeys -// 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 ListAccessKeysRequest method. -// req, resp := client.ListAccessKeysRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListAccessKeys -func (c *IAM) ListAccessKeysRequest(input *ListAccessKeysInput) (req *request.Request, output *ListAccessKeysOutput) { - op := &request.Operation{ - Name: opListAccessKeys, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListAccessKeysInput{} - } - - output = &ListAccessKeysOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAccessKeys API operation for AWS Identity and Access Management. -// -// Returns information about the access key IDs associated with the specified -// IAM user. If there is none, the operation returns an empty list. -// -// Although each user is limited to a small number of keys, you can still paginate -// the results using the MaxItems and Marker parameters. -// -// If the UserName is not specified, the user name is determined implicitly -// based on the Amazon Web Services access key ID used to sign the request. -// If a temporary access key is used, then UserName is required. If a long-term -// key is assigned to the user, then UserName is not required. -// -// This operation works for access keys under the Amazon Web Services account. -// If the Amazon Web Services account has no associated users, the root user -// returns it's own access key IDs by running this command. -// -// To ensure the security of your Amazon Web Services account, the secret access -// key is accessible only during key and user creation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListAccessKeys for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListAccessKeys -func (c *IAM) ListAccessKeys(input *ListAccessKeysInput) (*ListAccessKeysOutput, error) { - req, out := c.ListAccessKeysRequest(input) - return out, req.Send() -} - -// ListAccessKeysWithContext is the same as ListAccessKeys with the addition of -// the ability to pass a context and additional request options. -// -// See ListAccessKeys 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 *IAM) ListAccessKeysWithContext(ctx aws.Context, input *ListAccessKeysInput, opts ...request.Option) (*ListAccessKeysOutput, error) { - req, out := c.ListAccessKeysRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListAccessKeysPages iterates over the pages of a ListAccessKeys operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListAccessKeys 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 ListAccessKeys operation. -// pageNum := 0 -// err := client.ListAccessKeysPages(params, -// func(page *iam.ListAccessKeysOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListAccessKeysPages(input *ListAccessKeysInput, fn func(*ListAccessKeysOutput, bool) bool) error { - return c.ListAccessKeysPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListAccessKeysPagesWithContext same as ListAccessKeysPages 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 *IAM) ListAccessKeysPagesWithContext(ctx aws.Context, input *ListAccessKeysInput, fn func(*ListAccessKeysOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListAccessKeysInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListAccessKeysRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListAccessKeysOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListAccountAliases = "ListAccountAliases" - -// ListAccountAliasesRequest generates a "aws/request.Request" representing the -// client's request for the ListAccountAliases 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 ListAccountAliases for more information on using the ListAccountAliases -// 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 ListAccountAliasesRequest method. -// req, resp := client.ListAccountAliasesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListAccountAliases -func (c *IAM) ListAccountAliasesRequest(input *ListAccountAliasesInput) (req *request.Request, output *ListAccountAliasesOutput) { - op := &request.Operation{ - Name: opListAccountAliases, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListAccountAliasesInput{} - } - - output = &ListAccountAliasesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAccountAliases API operation for AWS Identity and Access Management. -// -// Lists the account alias associated with the Amazon Web Services account (Note: -// you can have only one). For information about using an Amazon Web Services -// account alias, see Creating, deleting, and listing an Amazon Web Services -// account alias (https://docs.aws.amazon.com/signin/latest/userguide/CreateAccountAlias.html) -// in the Amazon Web Services Sign-In 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 AWS Identity and Access Management's -// API operation ListAccountAliases for usage and error information. -// -// Returned Error Codes: -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListAccountAliases -func (c *IAM) ListAccountAliases(input *ListAccountAliasesInput) (*ListAccountAliasesOutput, error) { - req, out := c.ListAccountAliasesRequest(input) - return out, req.Send() -} - -// ListAccountAliasesWithContext is the same as ListAccountAliases with the addition of -// the ability to pass a context and additional request options. -// -// See ListAccountAliases 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 *IAM) ListAccountAliasesWithContext(ctx aws.Context, input *ListAccountAliasesInput, opts ...request.Option) (*ListAccountAliasesOutput, error) { - req, out := c.ListAccountAliasesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListAccountAliasesPages iterates over the pages of a ListAccountAliases operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListAccountAliases 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 ListAccountAliases operation. -// pageNum := 0 -// err := client.ListAccountAliasesPages(params, -// func(page *iam.ListAccountAliasesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListAccountAliasesPages(input *ListAccountAliasesInput, fn func(*ListAccountAliasesOutput, bool) bool) error { - return c.ListAccountAliasesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListAccountAliasesPagesWithContext same as ListAccountAliasesPages 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 *IAM) ListAccountAliasesPagesWithContext(ctx aws.Context, input *ListAccountAliasesInput, fn func(*ListAccountAliasesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListAccountAliasesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListAccountAliasesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListAccountAliasesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListAttachedGroupPolicies = "ListAttachedGroupPolicies" - -// ListAttachedGroupPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the ListAttachedGroupPolicies 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 ListAttachedGroupPolicies for more information on using the ListAttachedGroupPolicies -// 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 ListAttachedGroupPoliciesRequest method. -// req, resp := client.ListAttachedGroupPoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListAttachedGroupPolicies -func (c *IAM) ListAttachedGroupPoliciesRequest(input *ListAttachedGroupPoliciesInput) (req *request.Request, output *ListAttachedGroupPoliciesOutput) { - op := &request.Operation{ - Name: opListAttachedGroupPolicies, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListAttachedGroupPoliciesInput{} - } - - output = &ListAttachedGroupPoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAttachedGroupPolicies API operation for AWS Identity and Access Management. -// -// Lists all managed policies that are attached to the specified IAM group. -// -// An IAM group can also have inline policies embedded with it. To list the -// inline policies for a group, use ListGroupPolicies. For information about -// policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// You can paginate the results using the MaxItems and Marker parameters. You -// can use the PathPrefix parameter to limit the list of policies to only those -// matching the specified path prefix. If there are no policies attached to -// the specified group (or none that match the specified path prefix), the operation -// returns an empty list. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListAttachedGroupPolicies for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListAttachedGroupPolicies -func (c *IAM) ListAttachedGroupPolicies(input *ListAttachedGroupPoliciesInput) (*ListAttachedGroupPoliciesOutput, error) { - req, out := c.ListAttachedGroupPoliciesRequest(input) - return out, req.Send() -} - -// ListAttachedGroupPoliciesWithContext is the same as ListAttachedGroupPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See ListAttachedGroupPolicies 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 *IAM) ListAttachedGroupPoliciesWithContext(ctx aws.Context, input *ListAttachedGroupPoliciesInput, opts ...request.Option) (*ListAttachedGroupPoliciesOutput, error) { - req, out := c.ListAttachedGroupPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListAttachedGroupPoliciesPages iterates over the pages of a ListAttachedGroupPolicies operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListAttachedGroupPolicies 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 ListAttachedGroupPolicies operation. -// pageNum := 0 -// err := client.ListAttachedGroupPoliciesPages(params, -// func(page *iam.ListAttachedGroupPoliciesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListAttachedGroupPoliciesPages(input *ListAttachedGroupPoliciesInput, fn func(*ListAttachedGroupPoliciesOutput, bool) bool) error { - return c.ListAttachedGroupPoliciesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListAttachedGroupPoliciesPagesWithContext same as ListAttachedGroupPoliciesPages 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 *IAM) ListAttachedGroupPoliciesPagesWithContext(ctx aws.Context, input *ListAttachedGroupPoliciesInput, fn func(*ListAttachedGroupPoliciesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListAttachedGroupPoliciesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListAttachedGroupPoliciesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListAttachedGroupPoliciesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListAttachedRolePolicies = "ListAttachedRolePolicies" - -// ListAttachedRolePoliciesRequest generates a "aws/request.Request" representing the -// client's request for the ListAttachedRolePolicies 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 ListAttachedRolePolicies for more information on using the ListAttachedRolePolicies -// 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 ListAttachedRolePoliciesRequest method. -// req, resp := client.ListAttachedRolePoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListAttachedRolePolicies -func (c *IAM) ListAttachedRolePoliciesRequest(input *ListAttachedRolePoliciesInput) (req *request.Request, output *ListAttachedRolePoliciesOutput) { - op := &request.Operation{ - Name: opListAttachedRolePolicies, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListAttachedRolePoliciesInput{} - } - - output = &ListAttachedRolePoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAttachedRolePolicies API operation for AWS Identity and Access Management. -// -// Lists all managed policies that are attached to the specified IAM role. -// -// An IAM role can also have inline policies embedded with it. To list the inline -// policies for a role, use ListRolePolicies. For information about policies, -// see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// You can paginate the results using the MaxItems and Marker parameters. You -// can use the PathPrefix parameter to limit the list of policies to only those -// matching the specified path prefix. If there are no policies attached to -// the specified role (or none that match the specified path prefix), the operation -// returns an empty list. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListAttachedRolePolicies for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListAttachedRolePolicies -func (c *IAM) ListAttachedRolePolicies(input *ListAttachedRolePoliciesInput) (*ListAttachedRolePoliciesOutput, error) { - req, out := c.ListAttachedRolePoliciesRequest(input) - return out, req.Send() -} - -// ListAttachedRolePoliciesWithContext is the same as ListAttachedRolePolicies with the addition of -// the ability to pass a context and additional request options. -// -// See ListAttachedRolePolicies 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 *IAM) ListAttachedRolePoliciesWithContext(ctx aws.Context, input *ListAttachedRolePoliciesInput, opts ...request.Option) (*ListAttachedRolePoliciesOutput, error) { - req, out := c.ListAttachedRolePoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListAttachedRolePoliciesPages iterates over the pages of a ListAttachedRolePolicies operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListAttachedRolePolicies 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 ListAttachedRolePolicies operation. -// pageNum := 0 -// err := client.ListAttachedRolePoliciesPages(params, -// func(page *iam.ListAttachedRolePoliciesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListAttachedRolePoliciesPages(input *ListAttachedRolePoliciesInput, fn func(*ListAttachedRolePoliciesOutput, bool) bool) error { - return c.ListAttachedRolePoliciesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListAttachedRolePoliciesPagesWithContext same as ListAttachedRolePoliciesPages 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 *IAM) ListAttachedRolePoliciesPagesWithContext(ctx aws.Context, input *ListAttachedRolePoliciesInput, fn func(*ListAttachedRolePoliciesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListAttachedRolePoliciesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListAttachedRolePoliciesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListAttachedRolePoliciesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListAttachedUserPolicies = "ListAttachedUserPolicies" - -// ListAttachedUserPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the ListAttachedUserPolicies 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 ListAttachedUserPolicies for more information on using the ListAttachedUserPolicies -// 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 ListAttachedUserPoliciesRequest method. -// req, resp := client.ListAttachedUserPoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListAttachedUserPolicies -func (c *IAM) ListAttachedUserPoliciesRequest(input *ListAttachedUserPoliciesInput) (req *request.Request, output *ListAttachedUserPoliciesOutput) { - op := &request.Operation{ - Name: opListAttachedUserPolicies, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListAttachedUserPoliciesInput{} - } - - output = &ListAttachedUserPoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListAttachedUserPolicies API operation for AWS Identity and Access Management. -// -// Lists all managed policies that are attached to the specified IAM user. -// -// An IAM user can also have inline policies embedded with it. To list the inline -// policies for a user, use ListUserPolicies. For information about policies, -// see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// You can paginate the results using the MaxItems and Marker parameters. You -// can use the PathPrefix parameter to limit the list of policies to only those -// matching the specified path prefix. If there are no policies attached to -// the specified group (or none that match the specified path prefix), the operation -// returns an empty list. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListAttachedUserPolicies for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListAttachedUserPolicies -func (c *IAM) ListAttachedUserPolicies(input *ListAttachedUserPoliciesInput) (*ListAttachedUserPoliciesOutput, error) { - req, out := c.ListAttachedUserPoliciesRequest(input) - return out, req.Send() -} - -// ListAttachedUserPoliciesWithContext is the same as ListAttachedUserPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See ListAttachedUserPolicies 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 *IAM) ListAttachedUserPoliciesWithContext(ctx aws.Context, input *ListAttachedUserPoliciesInput, opts ...request.Option) (*ListAttachedUserPoliciesOutput, error) { - req, out := c.ListAttachedUserPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListAttachedUserPoliciesPages iterates over the pages of a ListAttachedUserPolicies operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListAttachedUserPolicies 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 ListAttachedUserPolicies operation. -// pageNum := 0 -// err := client.ListAttachedUserPoliciesPages(params, -// func(page *iam.ListAttachedUserPoliciesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListAttachedUserPoliciesPages(input *ListAttachedUserPoliciesInput, fn func(*ListAttachedUserPoliciesOutput, bool) bool) error { - return c.ListAttachedUserPoliciesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListAttachedUserPoliciesPagesWithContext same as ListAttachedUserPoliciesPages 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 *IAM) ListAttachedUserPoliciesPagesWithContext(ctx aws.Context, input *ListAttachedUserPoliciesInput, fn func(*ListAttachedUserPoliciesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListAttachedUserPoliciesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListAttachedUserPoliciesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListAttachedUserPoliciesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListEntitiesForPolicy = "ListEntitiesForPolicy" - -// ListEntitiesForPolicyRequest generates a "aws/request.Request" representing the -// client's request for the ListEntitiesForPolicy 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 ListEntitiesForPolicy for more information on using the ListEntitiesForPolicy -// 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 ListEntitiesForPolicyRequest method. -// req, resp := client.ListEntitiesForPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListEntitiesForPolicy -func (c *IAM) ListEntitiesForPolicyRequest(input *ListEntitiesForPolicyInput) (req *request.Request, output *ListEntitiesForPolicyOutput) { - op := &request.Operation{ - Name: opListEntitiesForPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListEntitiesForPolicyInput{} - } - - output = &ListEntitiesForPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListEntitiesForPolicy API operation for AWS Identity and Access Management. -// -// Lists all IAM users, groups, and roles that the specified managed policy -// is attached to. -// -// You can use the optional EntityFilter parameter to limit the results to a -// particular type of entity (users, groups, or roles). For example, to list -// only the roles that are attached to the specified policy, set EntityFilter -// to Role. -// -// You can paginate the results using the MaxItems and Marker parameters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListEntitiesForPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListEntitiesForPolicy -func (c *IAM) ListEntitiesForPolicy(input *ListEntitiesForPolicyInput) (*ListEntitiesForPolicyOutput, error) { - req, out := c.ListEntitiesForPolicyRequest(input) - return out, req.Send() -} - -// ListEntitiesForPolicyWithContext is the same as ListEntitiesForPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See ListEntitiesForPolicy 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 *IAM) ListEntitiesForPolicyWithContext(ctx aws.Context, input *ListEntitiesForPolicyInput, opts ...request.Option) (*ListEntitiesForPolicyOutput, error) { - req, out := c.ListEntitiesForPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListEntitiesForPolicyPages iterates over the pages of a ListEntitiesForPolicy operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListEntitiesForPolicy 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 ListEntitiesForPolicy operation. -// pageNum := 0 -// err := client.ListEntitiesForPolicyPages(params, -// func(page *iam.ListEntitiesForPolicyOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListEntitiesForPolicyPages(input *ListEntitiesForPolicyInput, fn func(*ListEntitiesForPolicyOutput, bool) bool) error { - return c.ListEntitiesForPolicyPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListEntitiesForPolicyPagesWithContext same as ListEntitiesForPolicyPages 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 *IAM) ListEntitiesForPolicyPagesWithContext(ctx aws.Context, input *ListEntitiesForPolicyInput, fn func(*ListEntitiesForPolicyOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListEntitiesForPolicyInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListEntitiesForPolicyRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListEntitiesForPolicyOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListGroupPolicies = "ListGroupPolicies" - -// ListGroupPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the ListGroupPolicies 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 ListGroupPolicies for more information on using the ListGroupPolicies -// 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 ListGroupPoliciesRequest method. -// req, resp := client.ListGroupPoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListGroupPolicies -func (c *IAM) ListGroupPoliciesRequest(input *ListGroupPoliciesInput) (req *request.Request, output *ListGroupPoliciesOutput) { - op := &request.Operation{ - Name: opListGroupPolicies, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListGroupPoliciesInput{} - } - - output = &ListGroupPoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListGroupPolicies API operation for AWS Identity and Access Management. -// -// Lists the names of the inline policies that are embedded in the specified -// IAM group. -// -// An IAM group can also have managed policies attached to it. To list the managed -// policies that are attached to a group, use ListAttachedGroupPolicies. For -// more information about policies, see Managed policies and inline policies -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// You can paginate the results using the MaxItems and Marker parameters. If -// there are no inline policies embedded with the specified group, the operation -// returns an empty list. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListGroupPolicies for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListGroupPolicies -func (c *IAM) ListGroupPolicies(input *ListGroupPoliciesInput) (*ListGroupPoliciesOutput, error) { - req, out := c.ListGroupPoliciesRequest(input) - return out, req.Send() -} - -// ListGroupPoliciesWithContext is the same as ListGroupPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See ListGroupPolicies 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 *IAM) ListGroupPoliciesWithContext(ctx aws.Context, input *ListGroupPoliciesInput, opts ...request.Option) (*ListGroupPoliciesOutput, error) { - req, out := c.ListGroupPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListGroupPoliciesPages iterates over the pages of a ListGroupPolicies operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListGroupPolicies 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 ListGroupPolicies operation. -// pageNum := 0 -// err := client.ListGroupPoliciesPages(params, -// func(page *iam.ListGroupPoliciesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListGroupPoliciesPages(input *ListGroupPoliciesInput, fn func(*ListGroupPoliciesOutput, bool) bool) error { - return c.ListGroupPoliciesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListGroupPoliciesPagesWithContext same as ListGroupPoliciesPages 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 *IAM) ListGroupPoliciesPagesWithContext(ctx aws.Context, input *ListGroupPoliciesInput, fn func(*ListGroupPoliciesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListGroupPoliciesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListGroupPoliciesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListGroupPoliciesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListGroups = "ListGroups" - -// ListGroupsRequest generates a "aws/request.Request" representing the -// client's request for the ListGroups 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 ListGroups for more information on using the ListGroups -// 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 ListGroupsRequest method. -// req, resp := client.ListGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListGroups -func (c *IAM) ListGroupsRequest(input *ListGroupsInput) (req *request.Request, output *ListGroupsOutput) { - op := &request.Operation{ - Name: opListGroups, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListGroupsInput{} - } - - output = &ListGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListGroups API operation for AWS Identity and Access Management. -// -// Lists the IAM groups that have the specified path prefix. -// -// You can paginate the results using the MaxItems and Marker parameters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListGroups for usage and error information. -// -// Returned Error Codes: -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListGroups -func (c *IAM) ListGroups(input *ListGroupsInput) (*ListGroupsOutput, error) { - req, out := c.ListGroupsRequest(input) - return out, req.Send() -} - -// ListGroupsWithContext is the same as ListGroups with the addition of -// the ability to pass a context and additional request options. -// -// See ListGroups 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 *IAM) ListGroupsWithContext(ctx aws.Context, input *ListGroupsInput, opts ...request.Option) (*ListGroupsOutput, error) { - req, out := c.ListGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListGroupsPages iterates over the pages of a ListGroups operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListGroups 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 ListGroups operation. -// pageNum := 0 -// err := client.ListGroupsPages(params, -// func(page *iam.ListGroupsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListGroupsPages(input *ListGroupsInput, fn func(*ListGroupsOutput, bool) bool) error { - return c.ListGroupsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListGroupsPagesWithContext same as ListGroupsPages 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 *IAM) ListGroupsPagesWithContext(ctx aws.Context, input *ListGroupsInput, fn func(*ListGroupsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListGroupsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListGroupsForUser = "ListGroupsForUser" - -// ListGroupsForUserRequest generates a "aws/request.Request" representing the -// client's request for the ListGroupsForUser 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 ListGroupsForUser for more information on using the ListGroupsForUser -// 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 ListGroupsForUserRequest method. -// req, resp := client.ListGroupsForUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListGroupsForUser -func (c *IAM) ListGroupsForUserRequest(input *ListGroupsForUserInput) (req *request.Request, output *ListGroupsForUserOutput) { - op := &request.Operation{ - Name: opListGroupsForUser, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListGroupsForUserInput{} - } - - output = &ListGroupsForUserOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListGroupsForUser API operation for AWS Identity and Access Management. -// -// Lists the IAM groups that the specified IAM user belongs to. -// -// You can paginate the results using the MaxItems and Marker parameters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListGroupsForUser for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListGroupsForUser -func (c *IAM) ListGroupsForUser(input *ListGroupsForUserInput) (*ListGroupsForUserOutput, error) { - req, out := c.ListGroupsForUserRequest(input) - return out, req.Send() -} - -// ListGroupsForUserWithContext is the same as ListGroupsForUser with the addition of -// the ability to pass a context and additional request options. -// -// See ListGroupsForUser 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 *IAM) ListGroupsForUserWithContext(ctx aws.Context, input *ListGroupsForUserInput, opts ...request.Option) (*ListGroupsForUserOutput, error) { - req, out := c.ListGroupsForUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListGroupsForUserPages iterates over the pages of a ListGroupsForUser operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListGroupsForUser 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 ListGroupsForUser operation. -// pageNum := 0 -// err := client.ListGroupsForUserPages(params, -// func(page *iam.ListGroupsForUserOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListGroupsForUserPages(input *ListGroupsForUserInput, fn func(*ListGroupsForUserOutput, bool) bool) error { - return c.ListGroupsForUserPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListGroupsForUserPagesWithContext same as ListGroupsForUserPages 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 *IAM) ListGroupsForUserPagesWithContext(ctx aws.Context, input *ListGroupsForUserInput, fn func(*ListGroupsForUserOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListGroupsForUserInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListGroupsForUserRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListGroupsForUserOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListInstanceProfileTags = "ListInstanceProfileTags" - -// ListInstanceProfileTagsRequest generates a "aws/request.Request" representing the -// client's request for the ListInstanceProfileTags 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 ListInstanceProfileTags for more information on using the ListInstanceProfileTags -// 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 ListInstanceProfileTagsRequest method. -// req, resp := client.ListInstanceProfileTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListInstanceProfileTags -func (c *IAM) ListInstanceProfileTagsRequest(input *ListInstanceProfileTagsInput) (req *request.Request, output *ListInstanceProfileTagsOutput) { - op := &request.Operation{ - Name: opListInstanceProfileTags, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListInstanceProfileTagsInput{} - } - - output = &ListInstanceProfileTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListInstanceProfileTags API operation for AWS Identity and Access Management. -// -// Lists the tags that are attached to the specified IAM instance profile. The -// returned list of tags is sorted by tag key. For more information about tagging, -// see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation ListInstanceProfileTags for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListInstanceProfileTags -func (c *IAM) ListInstanceProfileTags(input *ListInstanceProfileTagsInput) (*ListInstanceProfileTagsOutput, error) { - req, out := c.ListInstanceProfileTagsRequest(input) - return out, req.Send() -} - -// ListInstanceProfileTagsWithContext is the same as ListInstanceProfileTags with the addition of -// the ability to pass a context and additional request options. -// -// See ListInstanceProfileTags 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 *IAM) ListInstanceProfileTagsWithContext(ctx aws.Context, input *ListInstanceProfileTagsInput, opts ...request.Option) (*ListInstanceProfileTagsOutput, error) { - req, out := c.ListInstanceProfileTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListInstanceProfileTagsPages iterates over the pages of a ListInstanceProfileTags operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListInstanceProfileTags 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 ListInstanceProfileTags operation. -// pageNum := 0 -// err := client.ListInstanceProfileTagsPages(params, -// func(page *iam.ListInstanceProfileTagsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListInstanceProfileTagsPages(input *ListInstanceProfileTagsInput, fn func(*ListInstanceProfileTagsOutput, bool) bool) error { - return c.ListInstanceProfileTagsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListInstanceProfileTagsPagesWithContext same as ListInstanceProfileTagsPages 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 *IAM) ListInstanceProfileTagsPagesWithContext(ctx aws.Context, input *ListInstanceProfileTagsInput, fn func(*ListInstanceProfileTagsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListInstanceProfileTagsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListInstanceProfileTagsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListInstanceProfileTagsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListInstanceProfiles = "ListInstanceProfiles" - -// ListInstanceProfilesRequest generates a "aws/request.Request" representing the -// client's request for the ListInstanceProfiles 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 ListInstanceProfiles for more information on using the ListInstanceProfiles -// 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 ListInstanceProfilesRequest method. -// req, resp := client.ListInstanceProfilesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListInstanceProfiles -func (c *IAM) ListInstanceProfilesRequest(input *ListInstanceProfilesInput) (req *request.Request, output *ListInstanceProfilesOutput) { - op := &request.Operation{ - Name: opListInstanceProfiles, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListInstanceProfilesInput{} - } - - output = &ListInstanceProfilesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListInstanceProfiles API operation for AWS Identity and Access Management. -// -// Lists the instance profiles that have the specified path prefix. If there -// are none, the operation returns an empty list. For more information about -// instance profiles, see Using instance profiles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) -// in the IAM User Guide. -// -// IAM resource-listing operations return a subset of the available attributes -// for the resource. For example, this operation does not return tags, even -// though they are an attribute of the returned object. To view all of the information -// for an instance profile, see GetInstanceProfile. -// -// You can paginate the results using the MaxItems and Marker parameters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListInstanceProfiles for usage and error information. -// -// Returned Error Codes: -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListInstanceProfiles -func (c *IAM) ListInstanceProfiles(input *ListInstanceProfilesInput) (*ListInstanceProfilesOutput, error) { - req, out := c.ListInstanceProfilesRequest(input) - return out, req.Send() -} - -// ListInstanceProfilesWithContext is the same as ListInstanceProfiles with the addition of -// the ability to pass a context and additional request options. -// -// See ListInstanceProfiles 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 *IAM) ListInstanceProfilesWithContext(ctx aws.Context, input *ListInstanceProfilesInput, opts ...request.Option) (*ListInstanceProfilesOutput, error) { - req, out := c.ListInstanceProfilesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListInstanceProfilesPages iterates over the pages of a ListInstanceProfiles operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListInstanceProfiles 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 ListInstanceProfiles operation. -// pageNum := 0 -// err := client.ListInstanceProfilesPages(params, -// func(page *iam.ListInstanceProfilesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListInstanceProfilesPages(input *ListInstanceProfilesInput, fn func(*ListInstanceProfilesOutput, bool) bool) error { - return c.ListInstanceProfilesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListInstanceProfilesPagesWithContext same as ListInstanceProfilesPages 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 *IAM) ListInstanceProfilesPagesWithContext(ctx aws.Context, input *ListInstanceProfilesInput, fn func(*ListInstanceProfilesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListInstanceProfilesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListInstanceProfilesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListInstanceProfilesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListInstanceProfilesForRole = "ListInstanceProfilesForRole" - -// ListInstanceProfilesForRoleRequest generates a "aws/request.Request" representing the -// client's request for the ListInstanceProfilesForRole 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 ListInstanceProfilesForRole for more information on using the ListInstanceProfilesForRole -// 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 ListInstanceProfilesForRoleRequest method. -// req, resp := client.ListInstanceProfilesForRoleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListInstanceProfilesForRole -func (c *IAM) ListInstanceProfilesForRoleRequest(input *ListInstanceProfilesForRoleInput) (req *request.Request, output *ListInstanceProfilesForRoleOutput) { - op := &request.Operation{ - Name: opListInstanceProfilesForRole, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListInstanceProfilesForRoleInput{} - } - - output = &ListInstanceProfilesForRoleOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListInstanceProfilesForRole API operation for AWS Identity and Access Management. -// -// Lists the instance profiles that have the specified associated IAM role. -// If there are none, the operation returns an empty list. For more information -// about instance profiles, go to Using instance profiles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) -// in the IAM User Guide. -// -// You can paginate the results using the MaxItems and Marker parameters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListInstanceProfilesForRole for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListInstanceProfilesForRole -func (c *IAM) ListInstanceProfilesForRole(input *ListInstanceProfilesForRoleInput) (*ListInstanceProfilesForRoleOutput, error) { - req, out := c.ListInstanceProfilesForRoleRequest(input) - return out, req.Send() -} - -// ListInstanceProfilesForRoleWithContext is the same as ListInstanceProfilesForRole with the addition of -// the ability to pass a context and additional request options. -// -// See ListInstanceProfilesForRole 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 *IAM) ListInstanceProfilesForRoleWithContext(ctx aws.Context, input *ListInstanceProfilesForRoleInput, opts ...request.Option) (*ListInstanceProfilesForRoleOutput, error) { - req, out := c.ListInstanceProfilesForRoleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListInstanceProfilesForRolePages iterates over the pages of a ListInstanceProfilesForRole operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListInstanceProfilesForRole 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 ListInstanceProfilesForRole operation. -// pageNum := 0 -// err := client.ListInstanceProfilesForRolePages(params, -// func(page *iam.ListInstanceProfilesForRoleOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListInstanceProfilesForRolePages(input *ListInstanceProfilesForRoleInput, fn func(*ListInstanceProfilesForRoleOutput, bool) bool) error { - return c.ListInstanceProfilesForRolePagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListInstanceProfilesForRolePagesWithContext same as ListInstanceProfilesForRolePages 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 *IAM) ListInstanceProfilesForRolePagesWithContext(ctx aws.Context, input *ListInstanceProfilesForRoleInput, fn func(*ListInstanceProfilesForRoleOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListInstanceProfilesForRoleInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListInstanceProfilesForRoleRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListInstanceProfilesForRoleOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListMFADeviceTags = "ListMFADeviceTags" - -// ListMFADeviceTagsRequest generates a "aws/request.Request" representing the -// client's request for the ListMFADeviceTags 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 ListMFADeviceTags for more information on using the ListMFADeviceTags -// 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 ListMFADeviceTagsRequest method. -// req, resp := client.ListMFADeviceTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListMFADeviceTags -func (c *IAM) ListMFADeviceTagsRequest(input *ListMFADeviceTagsInput) (req *request.Request, output *ListMFADeviceTagsOutput) { - op := &request.Operation{ - Name: opListMFADeviceTags, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListMFADeviceTagsInput{} - } - - output = &ListMFADeviceTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListMFADeviceTags API operation for AWS Identity and Access Management. -// -// Lists the tags that are attached to the specified IAM virtual multi-factor -// authentication (MFA) device. The returned list of tags is sorted by tag key. -// For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation ListMFADeviceTags for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListMFADeviceTags -func (c *IAM) ListMFADeviceTags(input *ListMFADeviceTagsInput) (*ListMFADeviceTagsOutput, error) { - req, out := c.ListMFADeviceTagsRequest(input) - return out, req.Send() -} - -// ListMFADeviceTagsWithContext is the same as ListMFADeviceTags with the addition of -// the ability to pass a context and additional request options. -// -// See ListMFADeviceTags 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 *IAM) ListMFADeviceTagsWithContext(ctx aws.Context, input *ListMFADeviceTagsInput, opts ...request.Option) (*ListMFADeviceTagsOutput, error) { - req, out := c.ListMFADeviceTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListMFADeviceTagsPages iterates over the pages of a ListMFADeviceTags operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListMFADeviceTags 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 ListMFADeviceTags operation. -// pageNum := 0 -// err := client.ListMFADeviceTagsPages(params, -// func(page *iam.ListMFADeviceTagsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListMFADeviceTagsPages(input *ListMFADeviceTagsInput, fn func(*ListMFADeviceTagsOutput, bool) bool) error { - return c.ListMFADeviceTagsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListMFADeviceTagsPagesWithContext same as ListMFADeviceTagsPages 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 *IAM) ListMFADeviceTagsPagesWithContext(ctx aws.Context, input *ListMFADeviceTagsInput, fn func(*ListMFADeviceTagsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListMFADeviceTagsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListMFADeviceTagsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListMFADeviceTagsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListMFADevices = "ListMFADevices" - -// ListMFADevicesRequest generates a "aws/request.Request" representing the -// client's request for the ListMFADevices 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 ListMFADevices for more information on using the ListMFADevices -// 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 ListMFADevicesRequest method. -// req, resp := client.ListMFADevicesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListMFADevices -func (c *IAM) ListMFADevicesRequest(input *ListMFADevicesInput) (req *request.Request, output *ListMFADevicesOutput) { - op := &request.Operation{ - Name: opListMFADevices, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListMFADevicesInput{} - } - - output = &ListMFADevicesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListMFADevices API operation for AWS Identity and Access Management. -// -// Lists the MFA devices for an IAM user. If the request includes a IAM user -// name, then this operation lists all the MFA devices associated with the specified -// user. If you do not specify a user name, IAM determines the user name implicitly -// based on the Amazon Web Services access key ID signing the request for this -// operation. -// -// You can paginate the results using the MaxItems and Marker parameters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListMFADevices for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListMFADevices -func (c *IAM) ListMFADevices(input *ListMFADevicesInput) (*ListMFADevicesOutput, error) { - req, out := c.ListMFADevicesRequest(input) - return out, req.Send() -} - -// ListMFADevicesWithContext is the same as ListMFADevices with the addition of -// the ability to pass a context and additional request options. -// -// See ListMFADevices 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 *IAM) ListMFADevicesWithContext(ctx aws.Context, input *ListMFADevicesInput, opts ...request.Option) (*ListMFADevicesOutput, error) { - req, out := c.ListMFADevicesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListMFADevicesPages iterates over the pages of a ListMFADevices operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListMFADevices 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 ListMFADevices operation. -// pageNum := 0 -// err := client.ListMFADevicesPages(params, -// func(page *iam.ListMFADevicesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListMFADevicesPages(input *ListMFADevicesInput, fn func(*ListMFADevicesOutput, bool) bool) error { - return c.ListMFADevicesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListMFADevicesPagesWithContext same as ListMFADevicesPages 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 *IAM) ListMFADevicesPagesWithContext(ctx aws.Context, input *ListMFADevicesInput, fn func(*ListMFADevicesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListMFADevicesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListMFADevicesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListMFADevicesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListOpenIDConnectProviderTags = "ListOpenIDConnectProviderTags" - -// ListOpenIDConnectProviderTagsRequest generates a "aws/request.Request" representing the -// client's request for the ListOpenIDConnectProviderTags 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 ListOpenIDConnectProviderTags for more information on using the ListOpenIDConnectProviderTags -// 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 ListOpenIDConnectProviderTagsRequest method. -// req, resp := client.ListOpenIDConnectProviderTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListOpenIDConnectProviderTags -func (c *IAM) ListOpenIDConnectProviderTagsRequest(input *ListOpenIDConnectProviderTagsInput) (req *request.Request, output *ListOpenIDConnectProviderTagsOutput) { - op := &request.Operation{ - Name: opListOpenIDConnectProviderTags, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListOpenIDConnectProviderTagsInput{} - } - - output = &ListOpenIDConnectProviderTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListOpenIDConnectProviderTags API operation for AWS Identity and Access Management. -// -// Lists the tags that are attached to the specified OpenID Connect (OIDC)-compatible -// identity provider. The returned list of tags is sorted by tag key. For more -// information, see About web identity federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc.html). -// -// For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation ListOpenIDConnectProviderTags for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListOpenIDConnectProviderTags -func (c *IAM) ListOpenIDConnectProviderTags(input *ListOpenIDConnectProviderTagsInput) (*ListOpenIDConnectProviderTagsOutput, error) { - req, out := c.ListOpenIDConnectProviderTagsRequest(input) - return out, req.Send() -} - -// ListOpenIDConnectProviderTagsWithContext is the same as ListOpenIDConnectProviderTags with the addition of -// the ability to pass a context and additional request options. -// -// See ListOpenIDConnectProviderTags 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 *IAM) ListOpenIDConnectProviderTagsWithContext(ctx aws.Context, input *ListOpenIDConnectProviderTagsInput, opts ...request.Option) (*ListOpenIDConnectProviderTagsOutput, error) { - req, out := c.ListOpenIDConnectProviderTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListOpenIDConnectProviderTagsPages iterates over the pages of a ListOpenIDConnectProviderTags operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListOpenIDConnectProviderTags 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 ListOpenIDConnectProviderTags operation. -// pageNum := 0 -// err := client.ListOpenIDConnectProviderTagsPages(params, -// func(page *iam.ListOpenIDConnectProviderTagsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListOpenIDConnectProviderTagsPages(input *ListOpenIDConnectProviderTagsInput, fn func(*ListOpenIDConnectProviderTagsOutput, bool) bool) error { - return c.ListOpenIDConnectProviderTagsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListOpenIDConnectProviderTagsPagesWithContext same as ListOpenIDConnectProviderTagsPages 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 *IAM) ListOpenIDConnectProviderTagsPagesWithContext(ctx aws.Context, input *ListOpenIDConnectProviderTagsInput, fn func(*ListOpenIDConnectProviderTagsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListOpenIDConnectProviderTagsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListOpenIDConnectProviderTagsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListOpenIDConnectProviderTagsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListOpenIDConnectProviders = "ListOpenIDConnectProviders" - -// ListOpenIDConnectProvidersRequest generates a "aws/request.Request" representing the -// client's request for the ListOpenIDConnectProviders 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 ListOpenIDConnectProviders for more information on using the ListOpenIDConnectProviders -// 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 ListOpenIDConnectProvidersRequest method. -// req, resp := client.ListOpenIDConnectProvidersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListOpenIDConnectProviders -func (c *IAM) ListOpenIDConnectProvidersRequest(input *ListOpenIDConnectProvidersInput) (req *request.Request, output *ListOpenIDConnectProvidersOutput) { - op := &request.Operation{ - Name: opListOpenIDConnectProviders, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListOpenIDConnectProvidersInput{} - } - - output = &ListOpenIDConnectProvidersOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListOpenIDConnectProviders API operation for AWS Identity and Access Management. -// -// Lists information about the IAM OpenID Connect (OIDC) provider resource objects -// defined in the Amazon Web Services account. -// -// IAM resource-listing operations return a subset of the available attributes -// for the resource. For example, this operation does not return tags, even -// though they are an attribute of the returned object. To view all of the information -// for an OIDC provider, see GetOpenIDConnectProvider. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListOpenIDConnectProviders for usage and error information. -// -// Returned Error Codes: -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListOpenIDConnectProviders -func (c *IAM) ListOpenIDConnectProviders(input *ListOpenIDConnectProvidersInput) (*ListOpenIDConnectProvidersOutput, error) { - req, out := c.ListOpenIDConnectProvidersRequest(input) - return out, req.Send() -} - -// ListOpenIDConnectProvidersWithContext is the same as ListOpenIDConnectProviders with the addition of -// the ability to pass a context and additional request options. -// -// See ListOpenIDConnectProviders 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 *IAM) ListOpenIDConnectProvidersWithContext(ctx aws.Context, input *ListOpenIDConnectProvidersInput, opts ...request.Option) (*ListOpenIDConnectProvidersOutput, error) { - req, out := c.ListOpenIDConnectProvidersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListPolicies = "ListPolicies" - -// ListPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the ListPolicies 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 ListPolicies for more information on using the ListPolicies -// 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 ListPoliciesRequest method. -// req, resp := client.ListPoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListPolicies -func (c *IAM) ListPoliciesRequest(input *ListPoliciesInput) (req *request.Request, output *ListPoliciesOutput) { - op := &request.Operation{ - Name: opListPolicies, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListPoliciesInput{} - } - - output = &ListPoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPolicies API operation for AWS Identity and Access Management. -// -// Lists all the managed policies that are available in your Amazon Web Services -// account, including your own customer-defined managed policies and all Amazon -// Web Services managed policies. -// -// You can filter the list of policies that is returned using the optional OnlyAttached, -// Scope, and PathPrefix parameters. For example, to list only the customer -// managed policies in your Amazon Web Services account, set Scope to Local. -// To list only Amazon Web Services managed policies, set Scope to AWS. -// -// You can paginate the results using the MaxItems and Marker parameters. -// -// For more information about managed policies, see Managed policies and inline -// policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// IAM resource-listing operations return a subset of the available attributes -// for the resource. For example, this operation does not return tags, even -// though they are an attribute of the returned object. To view all of the information -// for a customer manged policy, see GetPolicy. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListPolicies for usage and error information. -// -// Returned Error Codes: -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListPolicies -func (c *IAM) ListPolicies(input *ListPoliciesInput) (*ListPoliciesOutput, error) { - req, out := c.ListPoliciesRequest(input) - return out, req.Send() -} - -// ListPoliciesWithContext is the same as ListPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See ListPolicies 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 *IAM) ListPoliciesWithContext(ctx aws.Context, input *ListPoliciesInput, opts ...request.Option) (*ListPoliciesOutput, error) { - req, out := c.ListPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListPoliciesPages iterates over the pages of a ListPolicies operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListPolicies 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 ListPolicies operation. -// pageNum := 0 -// err := client.ListPoliciesPages(params, -// func(page *iam.ListPoliciesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListPoliciesPages(input *ListPoliciesInput, fn func(*ListPoliciesOutput, bool) bool) error { - return c.ListPoliciesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListPoliciesPagesWithContext same as ListPoliciesPages 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 *IAM) ListPoliciesPagesWithContext(ctx aws.Context, input *ListPoliciesInput, fn func(*ListPoliciesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListPoliciesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListPoliciesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListPoliciesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListPoliciesGrantingServiceAccess = "ListPoliciesGrantingServiceAccess" - -// ListPoliciesGrantingServiceAccessRequest generates a "aws/request.Request" representing the -// client's request for the ListPoliciesGrantingServiceAccess 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 ListPoliciesGrantingServiceAccess for more information on using the ListPoliciesGrantingServiceAccess -// 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 ListPoliciesGrantingServiceAccessRequest method. -// req, resp := client.ListPoliciesGrantingServiceAccessRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListPoliciesGrantingServiceAccess -func (c *IAM) ListPoliciesGrantingServiceAccessRequest(input *ListPoliciesGrantingServiceAccessInput) (req *request.Request, output *ListPoliciesGrantingServiceAccessOutput) { - op := &request.Operation{ - Name: opListPoliciesGrantingServiceAccess, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListPoliciesGrantingServiceAccessInput{} - } - - output = &ListPoliciesGrantingServiceAccessOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPoliciesGrantingServiceAccess API operation for AWS Identity and Access Management. -// -// Retrieves a list of policies that the IAM identity (user, group, or role) -// can use to access each specified service. -// -// This operation does not use other policy types when determining whether a -// resource could access a service. These other policy types include resource-based -// policies, access control lists, Organizations policies, IAM permissions boundaries, -// and STS assume role policies. It only applies permissions policy logic. For -// more about the evaluation of policy types, see Evaluating policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics) -// in the IAM User Guide. -// -// The list of policies returned by the operation depends on the ARN of the -// identity that you provide. -// -// - User – The list of policies includes the managed and inline policies -// that are attached to the user directly. The list also includes any additional -// managed and inline policies that are attached to the group to which the -// user belongs. -// -// - Group – The list of policies includes only the managed and inline -// policies that are attached to the group directly. Policies that are attached -// to the group’s user are not included. -// -// - Role – The list of policies includes only the managed and inline policies -// that are attached to the role. -// -// For each managed policy, this operation returns the ARN and policy name. -// For each inline policy, it returns the policy name and the entity to which -// it is attached. Inline policies do not have an ARN. For more information -// about these policy types, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html) -// in the IAM User Guide. -// -// Policies that are attached to users and roles as permissions boundaries are -// not returned. To view which managed policy is currently used to set the permissions -// boundary for a user or role, use the GetUser or GetRole operations. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListPoliciesGrantingServiceAccess for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListPoliciesGrantingServiceAccess -func (c *IAM) ListPoliciesGrantingServiceAccess(input *ListPoliciesGrantingServiceAccessInput) (*ListPoliciesGrantingServiceAccessOutput, error) { - req, out := c.ListPoliciesGrantingServiceAccessRequest(input) - return out, req.Send() -} - -// ListPoliciesGrantingServiceAccessWithContext is the same as ListPoliciesGrantingServiceAccess with the addition of -// the ability to pass a context and additional request options. -// -// See ListPoliciesGrantingServiceAccess 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 *IAM) ListPoliciesGrantingServiceAccessWithContext(ctx aws.Context, input *ListPoliciesGrantingServiceAccessInput, opts ...request.Option) (*ListPoliciesGrantingServiceAccessOutput, error) { - req, out := c.ListPoliciesGrantingServiceAccessRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListPolicyTags = "ListPolicyTags" - -// ListPolicyTagsRequest generates a "aws/request.Request" representing the -// client's request for the ListPolicyTags 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 ListPolicyTags for more information on using the ListPolicyTags -// 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 ListPolicyTagsRequest method. -// req, resp := client.ListPolicyTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListPolicyTags -func (c *IAM) ListPolicyTagsRequest(input *ListPolicyTagsInput) (req *request.Request, output *ListPolicyTagsOutput) { - op := &request.Operation{ - Name: opListPolicyTags, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListPolicyTagsInput{} - } - - output = &ListPolicyTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPolicyTags API operation for AWS Identity and Access Management. -// -// Lists the tags that are attached to the specified IAM customer managed policy. -// The returned list of tags is sorted by tag key. For more information about -// tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation ListPolicyTags for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListPolicyTags -func (c *IAM) ListPolicyTags(input *ListPolicyTagsInput) (*ListPolicyTagsOutput, error) { - req, out := c.ListPolicyTagsRequest(input) - return out, req.Send() -} - -// ListPolicyTagsWithContext is the same as ListPolicyTags with the addition of -// the ability to pass a context and additional request options. -// -// See ListPolicyTags 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 *IAM) ListPolicyTagsWithContext(ctx aws.Context, input *ListPolicyTagsInput, opts ...request.Option) (*ListPolicyTagsOutput, error) { - req, out := c.ListPolicyTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListPolicyTagsPages iterates over the pages of a ListPolicyTags operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListPolicyTags 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 ListPolicyTags operation. -// pageNum := 0 -// err := client.ListPolicyTagsPages(params, -// func(page *iam.ListPolicyTagsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListPolicyTagsPages(input *ListPolicyTagsInput, fn func(*ListPolicyTagsOutput, bool) bool) error { - return c.ListPolicyTagsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListPolicyTagsPagesWithContext same as ListPolicyTagsPages 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 *IAM) ListPolicyTagsPagesWithContext(ctx aws.Context, input *ListPolicyTagsInput, fn func(*ListPolicyTagsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListPolicyTagsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListPolicyTagsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListPolicyTagsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListPolicyVersions = "ListPolicyVersions" - -// ListPolicyVersionsRequest generates a "aws/request.Request" representing the -// client's request for the ListPolicyVersions 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 ListPolicyVersions for more information on using the ListPolicyVersions -// 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 ListPolicyVersionsRequest method. -// req, resp := client.ListPolicyVersionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListPolicyVersions -func (c *IAM) ListPolicyVersionsRequest(input *ListPolicyVersionsInput) (req *request.Request, output *ListPolicyVersionsOutput) { - op := &request.Operation{ - Name: opListPolicyVersions, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListPolicyVersionsInput{} - } - - output = &ListPolicyVersionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListPolicyVersions API operation for AWS Identity and Access Management. -// -// Lists information about the versions of the specified managed policy, including -// the version that is currently set as the policy's default version. -// -// For more information about managed policies, see Managed policies and inline -// policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation ListPolicyVersions for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListPolicyVersions -func (c *IAM) ListPolicyVersions(input *ListPolicyVersionsInput) (*ListPolicyVersionsOutput, error) { - req, out := c.ListPolicyVersionsRequest(input) - return out, req.Send() -} - -// ListPolicyVersionsWithContext is the same as ListPolicyVersions with the addition of -// the ability to pass a context and additional request options. -// -// See ListPolicyVersions 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 *IAM) ListPolicyVersionsWithContext(ctx aws.Context, input *ListPolicyVersionsInput, opts ...request.Option) (*ListPolicyVersionsOutput, error) { - req, out := c.ListPolicyVersionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListPolicyVersionsPages iterates over the pages of a ListPolicyVersions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListPolicyVersions 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 ListPolicyVersions operation. -// pageNum := 0 -// err := client.ListPolicyVersionsPages(params, -// func(page *iam.ListPolicyVersionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListPolicyVersionsPages(input *ListPolicyVersionsInput, fn func(*ListPolicyVersionsOutput, bool) bool) error { - return c.ListPolicyVersionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListPolicyVersionsPagesWithContext same as ListPolicyVersionsPages 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 *IAM) ListPolicyVersionsPagesWithContext(ctx aws.Context, input *ListPolicyVersionsInput, fn func(*ListPolicyVersionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListPolicyVersionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListPolicyVersionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListPolicyVersionsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListRolePolicies = "ListRolePolicies" - -// ListRolePoliciesRequest generates a "aws/request.Request" representing the -// client's request for the ListRolePolicies 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 ListRolePolicies for more information on using the ListRolePolicies -// 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 ListRolePoliciesRequest method. -// req, resp := client.ListRolePoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListRolePolicies -func (c *IAM) ListRolePoliciesRequest(input *ListRolePoliciesInput) (req *request.Request, output *ListRolePoliciesOutput) { - op := &request.Operation{ - Name: opListRolePolicies, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListRolePoliciesInput{} - } - - output = &ListRolePoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListRolePolicies API operation for AWS Identity and Access Management. -// -// Lists the names of the inline policies that are embedded in the specified -// IAM role. -// -// An IAM role can also have managed policies attached to it. To list the managed -// policies that are attached to a role, use ListAttachedRolePolicies. For more -// information about policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// You can paginate the results using the MaxItems and Marker parameters. If -// there are no inline policies embedded with the specified role, the operation -// returns an empty list. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListRolePolicies for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListRolePolicies -func (c *IAM) ListRolePolicies(input *ListRolePoliciesInput) (*ListRolePoliciesOutput, error) { - req, out := c.ListRolePoliciesRequest(input) - return out, req.Send() -} - -// ListRolePoliciesWithContext is the same as ListRolePolicies with the addition of -// the ability to pass a context and additional request options. -// -// See ListRolePolicies 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 *IAM) ListRolePoliciesWithContext(ctx aws.Context, input *ListRolePoliciesInput, opts ...request.Option) (*ListRolePoliciesOutput, error) { - req, out := c.ListRolePoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListRolePoliciesPages iterates over the pages of a ListRolePolicies operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListRolePolicies 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 ListRolePolicies operation. -// pageNum := 0 -// err := client.ListRolePoliciesPages(params, -// func(page *iam.ListRolePoliciesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListRolePoliciesPages(input *ListRolePoliciesInput, fn func(*ListRolePoliciesOutput, bool) bool) error { - return c.ListRolePoliciesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListRolePoliciesPagesWithContext same as ListRolePoliciesPages 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 *IAM) ListRolePoliciesPagesWithContext(ctx aws.Context, input *ListRolePoliciesInput, fn func(*ListRolePoliciesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListRolePoliciesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListRolePoliciesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListRolePoliciesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListRoleTags = "ListRoleTags" - -// ListRoleTagsRequest generates a "aws/request.Request" representing the -// client's request for the ListRoleTags 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 ListRoleTags for more information on using the ListRoleTags -// 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 ListRoleTagsRequest method. -// req, resp := client.ListRoleTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListRoleTags -func (c *IAM) ListRoleTagsRequest(input *ListRoleTagsInput) (req *request.Request, output *ListRoleTagsOutput) { - op := &request.Operation{ - Name: opListRoleTags, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListRoleTagsInput{} - } - - output = &ListRoleTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListRoleTags API operation for AWS Identity and Access Management. -// -// Lists the tags that are attached to the specified role. The returned list -// of tags is sorted by tag key. For more information about tagging, see Tagging -// IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation ListRoleTags for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListRoleTags -func (c *IAM) ListRoleTags(input *ListRoleTagsInput) (*ListRoleTagsOutput, error) { - req, out := c.ListRoleTagsRequest(input) - return out, req.Send() -} - -// ListRoleTagsWithContext is the same as ListRoleTags with the addition of -// the ability to pass a context and additional request options. -// -// See ListRoleTags 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 *IAM) ListRoleTagsWithContext(ctx aws.Context, input *ListRoleTagsInput, opts ...request.Option) (*ListRoleTagsOutput, error) { - req, out := c.ListRoleTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListRoleTagsPages iterates over the pages of a ListRoleTags operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListRoleTags 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 ListRoleTags operation. -// pageNum := 0 -// err := client.ListRoleTagsPages(params, -// func(page *iam.ListRoleTagsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListRoleTagsPages(input *ListRoleTagsInput, fn func(*ListRoleTagsOutput, bool) bool) error { - return c.ListRoleTagsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListRoleTagsPagesWithContext same as ListRoleTagsPages 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 *IAM) ListRoleTagsPagesWithContext(ctx aws.Context, input *ListRoleTagsInput, fn func(*ListRoleTagsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListRoleTagsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListRoleTagsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListRoleTagsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListRoles = "ListRoles" - -// ListRolesRequest generates a "aws/request.Request" representing the -// client's request for the ListRoles 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 ListRoles for more information on using the ListRoles -// 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 ListRolesRequest method. -// req, resp := client.ListRolesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListRoles -func (c *IAM) ListRolesRequest(input *ListRolesInput) (req *request.Request, output *ListRolesOutput) { - op := &request.Operation{ - Name: opListRoles, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListRolesInput{} - } - - output = &ListRolesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListRoles API operation for AWS Identity and Access Management. -// -// Lists the IAM roles that have the specified path prefix. If there are none, -// the operation returns an empty list. For more information about roles, see -// IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) -// in the IAM User Guide. -// -// IAM resource-listing operations return a subset of the available attributes -// for the resource. This operation does not return the following attributes, -// even though they are an attribute of the returned object: -// -// - PermissionsBoundary -// -// - RoleLastUsed -// -// - Tags -// -// To view all of the information for a role, see GetRole. -// -// You can paginate the results using the MaxItems and Marker parameters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListRoles for usage and error information. -// -// Returned Error Codes: -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListRoles -func (c *IAM) ListRoles(input *ListRolesInput) (*ListRolesOutput, error) { - req, out := c.ListRolesRequest(input) - return out, req.Send() -} - -// ListRolesWithContext is the same as ListRoles with the addition of -// the ability to pass a context and additional request options. -// -// See ListRoles 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 *IAM) ListRolesWithContext(ctx aws.Context, input *ListRolesInput, opts ...request.Option) (*ListRolesOutput, error) { - req, out := c.ListRolesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListRolesPages iterates over the pages of a ListRoles operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListRoles 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 ListRoles operation. -// pageNum := 0 -// err := client.ListRolesPages(params, -// func(page *iam.ListRolesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListRolesPages(input *ListRolesInput, fn func(*ListRolesOutput, bool) bool) error { - return c.ListRolesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListRolesPagesWithContext same as ListRolesPages 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 *IAM) ListRolesPagesWithContext(ctx aws.Context, input *ListRolesInput, fn func(*ListRolesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListRolesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListRolesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListRolesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListSAMLProviderTags = "ListSAMLProviderTags" - -// ListSAMLProviderTagsRequest generates a "aws/request.Request" representing the -// client's request for the ListSAMLProviderTags 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 ListSAMLProviderTags for more information on using the ListSAMLProviderTags -// 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 ListSAMLProviderTagsRequest method. -// req, resp := client.ListSAMLProviderTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListSAMLProviderTags -func (c *IAM) ListSAMLProviderTagsRequest(input *ListSAMLProviderTagsInput) (req *request.Request, output *ListSAMLProviderTagsOutput) { - op := &request.Operation{ - Name: opListSAMLProviderTags, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListSAMLProviderTagsInput{} - } - - output = &ListSAMLProviderTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListSAMLProviderTags API operation for AWS Identity and Access Management. -// -// Lists the tags that are attached to the specified Security Assertion Markup -// Language (SAML) identity provider. The returned list of tags is sorted by -// tag key. For more information, see About SAML 2.0-based federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html). -// -// For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation ListSAMLProviderTags for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListSAMLProviderTags -func (c *IAM) ListSAMLProviderTags(input *ListSAMLProviderTagsInput) (*ListSAMLProviderTagsOutput, error) { - req, out := c.ListSAMLProviderTagsRequest(input) - return out, req.Send() -} - -// ListSAMLProviderTagsWithContext is the same as ListSAMLProviderTags with the addition of -// the ability to pass a context and additional request options. -// -// See ListSAMLProviderTags 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 *IAM) ListSAMLProviderTagsWithContext(ctx aws.Context, input *ListSAMLProviderTagsInput, opts ...request.Option) (*ListSAMLProviderTagsOutput, error) { - req, out := c.ListSAMLProviderTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListSAMLProviderTagsPages iterates over the pages of a ListSAMLProviderTags operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListSAMLProviderTags 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 ListSAMLProviderTags operation. -// pageNum := 0 -// err := client.ListSAMLProviderTagsPages(params, -// func(page *iam.ListSAMLProviderTagsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListSAMLProviderTagsPages(input *ListSAMLProviderTagsInput, fn func(*ListSAMLProviderTagsOutput, bool) bool) error { - return c.ListSAMLProviderTagsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListSAMLProviderTagsPagesWithContext same as ListSAMLProviderTagsPages 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 *IAM) ListSAMLProviderTagsPagesWithContext(ctx aws.Context, input *ListSAMLProviderTagsInput, fn func(*ListSAMLProviderTagsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListSAMLProviderTagsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListSAMLProviderTagsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListSAMLProviderTagsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListSAMLProviders = "ListSAMLProviders" - -// ListSAMLProvidersRequest generates a "aws/request.Request" representing the -// client's request for the ListSAMLProviders 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 ListSAMLProviders for more information on using the ListSAMLProviders -// 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 ListSAMLProvidersRequest method. -// req, resp := client.ListSAMLProvidersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListSAMLProviders -func (c *IAM) ListSAMLProvidersRequest(input *ListSAMLProvidersInput) (req *request.Request, output *ListSAMLProvidersOutput) { - op := &request.Operation{ - Name: opListSAMLProviders, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListSAMLProvidersInput{} - } - - output = &ListSAMLProvidersOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListSAMLProviders API operation for AWS Identity and Access Management. -// -// Lists the SAML provider resource objects defined in IAM in the account. IAM -// resource-listing operations return a subset of the available attributes for -// the resource. For example, this operation does not return tags, even though -// they are an attribute of the returned object. To view all of the information -// for a SAML provider, see GetSAMLProvider. -// -// This operation requires Signature Version 4 (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.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 AWS Identity and Access Management's -// API operation ListSAMLProviders for usage and error information. -// -// Returned Error Codes: -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListSAMLProviders -func (c *IAM) ListSAMLProviders(input *ListSAMLProvidersInput) (*ListSAMLProvidersOutput, error) { - req, out := c.ListSAMLProvidersRequest(input) - return out, req.Send() -} - -// ListSAMLProvidersWithContext is the same as ListSAMLProviders with the addition of -// the ability to pass a context and additional request options. -// -// See ListSAMLProviders 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 *IAM) ListSAMLProvidersWithContext(ctx aws.Context, input *ListSAMLProvidersInput, opts ...request.Option) (*ListSAMLProvidersOutput, error) { - req, out := c.ListSAMLProvidersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListSSHPublicKeys = "ListSSHPublicKeys" - -// ListSSHPublicKeysRequest generates a "aws/request.Request" representing the -// client's request for the ListSSHPublicKeys 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 ListSSHPublicKeys for more information on using the ListSSHPublicKeys -// 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 ListSSHPublicKeysRequest method. -// req, resp := client.ListSSHPublicKeysRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListSSHPublicKeys -func (c *IAM) ListSSHPublicKeysRequest(input *ListSSHPublicKeysInput) (req *request.Request, output *ListSSHPublicKeysOutput) { - op := &request.Operation{ - Name: opListSSHPublicKeys, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListSSHPublicKeysInput{} - } - - output = &ListSSHPublicKeysOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListSSHPublicKeys API operation for AWS Identity and Access Management. -// -// Returns information about the SSH public keys associated with the specified -// IAM user. If none exists, the operation returns an empty list. -// -// The SSH public keys returned by this operation are used only for authenticating -// the IAM user to an CodeCommit repository. For more information about using -// SSH keys to authenticate to an CodeCommit repository, see Set up CodeCommit -// for SSH connections (https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html) -// in the CodeCommit User Guide. -// -// Although each user is limited to a small number of keys, you can still paginate -// the results using the MaxItems and Marker parameters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListSSHPublicKeys for usage and error information. -// -// Returned Error Codes: -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListSSHPublicKeys -func (c *IAM) ListSSHPublicKeys(input *ListSSHPublicKeysInput) (*ListSSHPublicKeysOutput, error) { - req, out := c.ListSSHPublicKeysRequest(input) - return out, req.Send() -} - -// ListSSHPublicKeysWithContext is the same as ListSSHPublicKeys with the addition of -// the ability to pass a context and additional request options. -// -// See ListSSHPublicKeys 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 *IAM) ListSSHPublicKeysWithContext(ctx aws.Context, input *ListSSHPublicKeysInput, opts ...request.Option) (*ListSSHPublicKeysOutput, error) { - req, out := c.ListSSHPublicKeysRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListSSHPublicKeysPages iterates over the pages of a ListSSHPublicKeys operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListSSHPublicKeys 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 ListSSHPublicKeys operation. -// pageNum := 0 -// err := client.ListSSHPublicKeysPages(params, -// func(page *iam.ListSSHPublicKeysOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListSSHPublicKeysPages(input *ListSSHPublicKeysInput, fn func(*ListSSHPublicKeysOutput, bool) bool) error { - return c.ListSSHPublicKeysPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListSSHPublicKeysPagesWithContext same as ListSSHPublicKeysPages 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 *IAM) ListSSHPublicKeysPagesWithContext(ctx aws.Context, input *ListSSHPublicKeysInput, fn func(*ListSSHPublicKeysOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListSSHPublicKeysInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListSSHPublicKeysRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListSSHPublicKeysOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListServerCertificateTags = "ListServerCertificateTags" - -// ListServerCertificateTagsRequest generates a "aws/request.Request" representing the -// client's request for the ListServerCertificateTags 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 ListServerCertificateTags for more information on using the ListServerCertificateTags -// 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 ListServerCertificateTagsRequest method. -// req, resp := client.ListServerCertificateTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListServerCertificateTags -func (c *IAM) ListServerCertificateTagsRequest(input *ListServerCertificateTagsInput) (req *request.Request, output *ListServerCertificateTagsOutput) { - op := &request.Operation{ - Name: opListServerCertificateTags, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListServerCertificateTagsInput{} - } - - output = &ListServerCertificateTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListServerCertificateTags API operation for AWS Identity and Access Management. -// -// Lists the tags that are attached to the specified IAM server certificate. -// The returned list of tags is sorted by tag key. For more information about -// tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. -// -// For certificates in a Region supported by Certificate Manager (ACM), we recommend -// that you don't use IAM server certificates. Instead, use ACM to provision, -// manage, and deploy your server certificates. For more information about IAM -// server certificates, Working with server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation ListServerCertificateTags for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListServerCertificateTags -func (c *IAM) ListServerCertificateTags(input *ListServerCertificateTagsInput) (*ListServerCertificateTagsOutput, error) { - req, out := c.ListServerCertificateTagsRequest(input) - return out, req.Send() -} - -// ListServerCertificateTagsWithContext is the same as ListServerCertificateTags with the addition of -// the ability to pass a context and additional request options. -// -// See ListServerCertificateTags 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 *IAM) ListServerCertificateTagsWithContext(ctx aws.Context, input *ListServerCertificateTagsInput, opts ...request.Option) (*ListServerCertificateTagsOutput, error) { - req, out := c.ListServerCertificateTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListServerCertificateTagsPages iterates over the pages of a ListServerCertificateTags operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListServerCertificateTags 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 ListServerCertificateTags operation. -// pageNum := 0 -// err := client.ListServerCertificateTagsPages(params, -// func(page *iam.ListServerCertificateTagsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListServerCertificateTagsPages(input *ListServerCertificateTagsInput, fn func(*ListServerCertificateTagsOutput, bool) bool) error { - return c.ListServerCertificateTagsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListServerCertificateTagsPagesWithContext same as ListServerCertificateTagsPages 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 *IAM) ListServerCertificateTagsPagesWithContext(ctx aws.Context, input *ListServerCertificateTagsInput, fn func(*ListServerCertificateTagsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListServerCertificateTagsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListServerCertificateTagsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListServerCertificateTagsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListServerCertificates = "ListServerCertificates" - -// ListServerCertificatesRequest generates a "aws/request.Request" representing the -// client's request for the ListServerCertificates 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 ListServerCertificates for more information on using the ListServerCertificates -// 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 ListServerCertificatesRequest method. -// req, resp := client.ListServerCertificatesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListServerCertificates -func (c *IAM) ListServerCertificatesRequest(input *ListServerCertificatesInput) (req *request.Request, output *ListServerCertificatesOutput) { - op := &request.Operation{ - Name: opListServerCertificates, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListServerCertificatesInput{} - } - - output = &ListServerCertificatesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListServerCertificates API operation for AWS Identity and Access Management. -// -// Lists the server certificates stored in IAM that have the specified path -// prefix. If none exist, the operation returns an empty list. -// -// You can paginate the results using the MaxItems and Marker parameters. -// -// For more information about working with server certificates, see Working -// with server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) -// in the IAM User Guide. This topic also includes a list of Amazon Web Services -// services that can use the server certificates that you manage with IAM. -// -// IAM resource-listing operations return a subset of the available attributes -// for the resource. For example, this operation does not return tags, even -// though they are an attribute of the returned object. To view all of the information -// for a servercertificate, see GetServerCertificate. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListServerCertificates for usage and error information. -// -// Returned Error Codes: -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListServerCertificates -func (c *IAM) ListServerCertificates(input *ListServerCertificatesInput) (*ListServerCertificatesOutput, error) { - req, out := c.ListServerCertificatesRequest(input) - return out, req.Send() -} - -// ListServerCertificatesWithContext is the same as ListServerCertificates with the addition of -// the ability to pass a context and additional request options. -// -// See ListServerCertificates 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 *IAM) ListServerCertificatesWithContext(ctx aws.Context, input *ListServerCertificatesInput, opts ...request.Option) (*ListServerCertificatesOutput, error) { - req, out := c.ListServerCertificatesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListServerCertificatesPages iterates over the pages of a ListServerCertificates operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListServerCertificates 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 ListServerCertificates operation. -// pageNum := 0 -// err := client.ListServerCertificatesPages(params, -// func(page *iam.ListServerCertificatesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListServerCertificatesPages(input *ListServerCertificatesInput, fn func(*ListServerCertificatesOutput, bool) bool) error { - return c.ListServerCertificatesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListServerCertificatesPagesWithContext same as ListServerCertificatesPages 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 *IAM) ListServerCertificatesPagesWithContext(ctx aws.Context, input *ListServerCertificatesInput, fn func(*ListServerCertificatesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListServerCertificatesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListServerCertificatesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListServerCertificatesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListServiceSpecificCredentials = "ListServiceSpecificCredentials" - -// ListServiceSpecificCredentialsRequest generates a "aws/request.Request" representing the -// client's request for the ListServiceSpecificCredentials 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 ListServiceSpecificCredentials for more information on using the ListServiceSpecificCredentials -// 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 ListServiceSpecificCredentialsRequest method. -// req, resp := client.ListServiceSpecificCredentialsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListServiceSpecificCredentials -func (c *IAM) ListServiceSpecificCredentialsRequest(input *ListServiceSpecificCredentialsInput) (req *request.Request, output *ListServiceSpecificCredentialsOutput) { - op := &request.Operation{ - Name: opListServiceSpecificCredentials, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ListServiceSpecificCredentialsInput{} - } - - output = &ListServiceSpecificCredentialsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListServiceSpecificCredentials API operation for AWS Identity and Access Management. -// -// Returns information about the service-specific credentials associated with -// the specified IAM user. If none exists, the operation returns an empty list. -// The service-specific credentials returned by this operation are used only -// for authenticating the IAM user to a specific service. For more information -// about using service-specific credentials to authenticate to an Amazon Web -// Services service, see Set up service-specific credentials (https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html) -// in the CodeCommit 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 AWS Identity and Access Management's -// API operation ListServiceSpecificCredentials for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceNotSupportedException "NotSupportedService" -// The specified service does not support service-specific credentials. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListServiceSpecificCredentials -func (c *IAM) ListServiceSpecificCredentials(input *ListServiceSpecificCredentialsInput) (*ListServiceSpecificCredentialsOutput, error) { - req, out := c.ListServiceSpecificCredentialsRequest(input) - return out, req.Send() -} - -// ListServiceSpecificCredentialsWithContext is the same as ListServiceSpecificCredentials with the addition of -// the ability to pass a context and additional request options. -// -// See ListServiceSpecificCredentials 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 *IAM) ListServiceSpecificCredentialsWithContext(ctx aws.Context, input *ListServiceSpecificCredentialsInput, opts ...request.Option) (*ListServiceSpecificCredentialsOutput, error) { - req, out := c.ListServiceSpecificCredentialsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListSigningCertificates = "ListSigningCertificates" - -// ListSigningCertificatesRequest generates a "aws/request.Request" representing the -// client's request for the ListSigningCertificates 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 ListSigningCertificates for more information on using the ListSigningCertificates -// 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 ListSigningCertificatesRequest method. -// req, resp := client.ListSigningCertificatesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListSigningCertificates -func (c *IAM) ListSigningCertificatesRequest(input *ListSigningCertificatesInput) (req *request.Request, output *ListSigningCertificatesOutput) { - op := &request.Operation{ - Name: opListSigningCertificates, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListSigningCertificatesInput{} - } - - output = &ListSigningCertificatesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListSigningCertificates API operation for AWS Identity and Access Management. -// -// Returns information about the signing certificates associated with the specified -// IAM user. If none exists, the operation returns an empty list. -// -// Although each user is limited to a small number of signing certificates, -// you can still paginate the results using the MaxItems and Marker parameters. -// -// If the UserName field is not specified, the user name is determined implicitly -// based on the Amazon Web Services access key ID used to sign the request for -// this operation. This operation works for access keys under the Amazon Web -// Services account. Consequently, you can use this operation to manage Amazon -// Web Services account root user credentials even if the Amazon Web Services -// account has no associated users. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListSigningCertificates for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListSigningCertificates -func (c *IAM) ListSigningCertificates(input *ListSigningCertificatesInput) (*ListSigningCertificatesOutput, error) { - req, out := c.ListSigningCertificatesRequest(input) - return out, req.Send() -} - -// ListSigningCertificatesWithContext is the same as ListSigningCertificates with the addition of -// the ability to pass a context and additional request options. -// -// See ListSigningCertificates 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 *IAM) ListSigningCertificatesWithContext(ctx aws.Context, input *ListSigningCertificatesInput, opts ...request.Option) (*ListSigningCertificatesOutput, error) { - req, out := c.ListSigningCertificatesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListSigningCertificatesPages iterates over the pages of a ListSigningCertificates operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListSigningCertificates 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 ListSigningCertificates operation. -// pageNum := 0 -// err := client.ListSigningCertificatesPages(params, -// func(page *iam.ListSigningCertificatesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListSigningCertificatesPages(input *ListSigningCertificatesInput, fn func(*ListSigningCertificatesOutput, bool) bool) error { - return c.ListSigningCertificatesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListSigningCertificatesPagesWithContext same as ListSigningCertificatesPages 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 *IAM) ListSigningCertificatesPagesWithContext(ctx aws.Context, input *ListSigningCertificatesInput, fn func(*ListSigningCertificatesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListSigningCertificatesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListSigningCertificatesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListSigningCertificatesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListUserPolicies = "ListUserPolicies" - -// ListUserPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the ListUserPolicies 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 ListUserPolicies for more information on using the ListUserPolicies -// 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 ListUserPoliciesRequest method. -// req, resp := client.ListUserPoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListUserPolicies -func (c *IAM) ListUserPoliciesRequest(input *ListUserPoliciesInput) (req *request.Request, output *ListUserPoliciesOutput) { - op := &request.Operation{ - Name: opListUserPolicies, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListUserPoliciesInput{} - } - - output = &ListUserPoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListUserPolicies API operation for AWS Identity and Access Management. -// -// Lists the names of the inline policies embedded in the specified IAM user. -// -// An IAM user can also have managed policies attached to it. To list the managed -// policies that are attached to a user, use ListAttachedUserPolicies. For more -// information about policies, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// You can paginate the results using the MaxItems and Marker parameters. If -// there are no inline policies embedded with the specified user, the operation -// returns an empty list. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListUserPolicies for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListUserPolicies -func (c *IAM) ListUserPolicies(input *ListUserPoliciesInput) (*ListUserPoliciesOutput, error) { - req, out := c.ListUserPoliciesRequest(input) - return out, req.Send() -} - -// ListUserPoliciesWithContext is the same as ListUserPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See ListUserPolicies 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 *IAM) ListUserPoliciesWithContext(ctx aws.Context, input *ListUserPoliciesInput, opts ...request.Option) (*ListUserPoliciesOutput, error) { - req, out := c.ListUserPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListUserPoliciesPages iterates over the pages of a ListUserPolicies operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListUserPolicies 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 ListUserPolicies operation. -// pageNum := 0 -// err := client.ListUserPoliciesPages(params, -// func(page *iam.ListUserPoliciesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListUserPoliciesPages(input *ListUserPoliciesInput, fn func(*ListUserPoliciesOutput, bool) bool) error { - return c.ListUserPoliciesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListUserPoliciesPagesWithContext same as ListUserPoliciesPages 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 *IAM) ListUserPoliciesPagesWithContext(ctx aws.Context, input *ListUserPoliciesInput, fn func(*ListUserPoliciesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListUserPoliciesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListUserPoliciesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListUserPoliciesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListUserTags = "ListUserTags" - -// ListUserTagsRequest generates a "aws/request.Request" representing the -// client's request for the ListUserTags 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 ListUserTags for more information on using the ListUserTags -// 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 ListUserTagsRequest method. -// req, resp := client.ListUserTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListUserTags -func (c *IAM) ListUserTagsRequest(input *ListUserTagsInput) (req *request.Request, output *ListUserTagsOutput) { - op := &request.Operation{ - Name: opListUserTags, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListUserTagsInput{} - } - - output = &ListUserTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListUserTags API operation for AWS Identity and Access Management. -// -// Lists the tags that are attached to the specified IAM user. The returned -// list of tags is sorted by tag key. For more information about tagging, see -// Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation ListUserTags for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListUserTags -func (c *IAM) ListUserTags(input *ListUserTagsInput) (*ListUserTagsOutput, error) { - req, out := c.ListUserTagsRequest(input) - return out, req.Send() -} - -// ListUserTagsWithContext is the same as ListUserTags with the addition of -// the ability to pass a context and additional request options. -// -// See ListUserTags 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 *IAM) ListUserTagsWithContext(ctx aws.Context, input *ListUserTagsInput, opts ...request.Option) (*ListUserTagsOutput, error) { - req, out := c.ListUserTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListUserTagsPages iterates over the pages of a ListUserTags operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListUserTags 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 ListUserTags operation. -// pageNum := 0 -// err := client.ListUserTagsPages(params, -// func(page *iam.ListUserTagsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListUserTagsPages(input *ListUserTagsInput, fn func(*ListUserTagsOutput, bool) bool) error { - return c.ListUserTagsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListUserTagsPagesWithContext same as ListUserTagsPages 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 *IAM) ListUserTagsPagesWithContext(ctx aws.Context, input *ListUserTagsInput, fn func(*ListUserTagsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListUserTagsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListUserTagsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListUserTagsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListUsers = "ListUsers" - -// ListUsersRequest generates a "aws/request.Request" representing the -// client's request for the ListUsers 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 ListUsers for more information on using the ListUsers -// 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 ListUsersRequest method. -// req, resp := client.ListUsersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListUsers -func (c *IAM) ListUsersRequest(input *ListUsersInput) (req *request.Request, output *ListUsersOutput) { - op := &request.Operation{ - Name: opListUsers, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListUsersInput{} - } - - output = &ListUsersOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListUsers API operation for AWS Identity and Access Management. -// -// Lists the IAM users that have the specified path prefix. If no path prefix -// is specified, the operation returns all users in the Amazon Web Services -// account. If there are none, the operation returns an empty list. -// -// IAM resource-listing operations return a subset of the available attributes -// for the resource. This operation does not return the following attributes, -// even though they are an attribute of the returned object: -// -// - PermissionsBoundary -// -// - Tags -// -// To view all of the information for a user, see GetUser. -// -// You can paginate the results using the MaxItems and Marker parameters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListUsers for usage and error information. -// -// Returned Error Codes: -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListUsers -func (c *IAM) ListUsers(input *ListUsersInput) (*ListUsersOutput, error) { - req, out := c.ListUsersRequest(input) - return out, req.Send() -} - -// ListUsersWithContext is the same as ListUsers with the addition of -// the ability to pass a context and additional request options. -// -// See ListUsers 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 *IAM) ListUsersWithContext(ctx aws.Context, input *ListUsersInput, opts ...request.Option) (*ListUsersOutput, error) { - req, out := c.ListUsersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListUsersPages iterates over the pages of a ListUsers operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListUsers 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 ListUsers operation. -// pageNum := 0 -// err := client.ListUsersPages(params, -// func(page *iam.ListUsersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListUsersPages(input *ListUsersInput, fn func(*ListUsersOutput, bool) bool) error { - return c.ListUsersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListUsersPagesWithContext same as ListUsersPages 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 *IAM) ListUsersPagesWithContext(ctx aws.Context, input *ListUsersInput, fn func(*ListUsersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListUsersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListUsersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListUsersOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListVirtualMFADevices = "ListVirtualMFADevices" - -// ListVirtualMFADevicesRequest generates a "aws/request.Request" representing the -// client's request for the ListVirtualMFADevices 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 ListVirtualMFADevices for more information on using the ListVirtualMFADevices -// 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 ListVirtualMFADevicesRequest method. -// req, resp := client.ListVirtualMFADevicesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListVirtualMFADevices -func (c *IAM) ListVirtualMFADevicesRequest(input *ListVirtualMFADevicesInput) (req *request.Request, output *ListVirtualMFADevicesOutput) { - op := &request.Operation{ - Name: opListVirtualMFADevices, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListVirtualMFADevicesInput{} - } - - output = &ListVirtualMFADevicesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListVirtualMFADevices API operation for AWS Identity and Access Management. -// -// Lists the virtual MFA devices defined in the Amazon Web Services account -// by assignment status. If you do not specify an assignment status, the operation -// returns a list of all virtual MFA devices. Assignment status can be Assigned, -// Unassigned, or Any. -// -// IAM resource-listing operations return a subset of the available attributes -// for the resource. For example, this operation does not return tags, even -// though they are an attribute of the returned object. To view tag information -// for a virtual MFA device, see ListMFADeviceTags. -// -// You can paginate the results using the MaxItems and Marker parameters. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ListVirtualMFADevices for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListVirtualMFADevices -func (c *IAM) ListVirtualMFADevices(input *ListVirtualMFADevicesInput) (*ListVirtualMFADevicesOutput, error) { - req, out := c.ListVirtualMFADevicesRequest(input) - return out, req.Send() -} - -// ListVirtualMFADevicesWithContext is the same as ListVirtualMFADevices with the addition of -// the ability to pass a context and additional request options. -// -// See ListVirtualMFADevices 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 *IAM) ListVirtualMFADevicesWithContext(ctx aws.Context, input *ListVirtualMFADevicesInput, opts ...request.Option) (*ListVirtualMFADevicesOutput, error) { - req, out := c.ListVirtualMFADevicesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListVirtualMFADevicesPages iterates over the pages of a ListVirtualMFADevices operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListVirtualMFADevices 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 ListVirtualMFADevices operation. -// pageNum := 0 -// err := client.ListVirtualMFADevicesPages(params, -// func(page *iam.ListVirtualMFADevicesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) ListVirtualMFADevicesPages(input *ListVirtualMFADevicesInput, fn func(*ListVirtualMFADevicesOutput, bool) bool) error { - return c.ListVirtualMFADevicesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListVirtualMFADevicesPagesWithContext same as ListVirtualMFADevicesPages 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 *IAM) ListVirtualMFADevicesPagesWithContext(ctx aws.Context, input *ListVirtualMFADevicesInput, fn func(*ListVirtualMFADevicesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListVirtualMFADevicesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListVirtualMFADevicesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListVirtualMFADevicesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opPutGroupPolicy = "PutGroupPolicy" - -// PutGroupPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutGroupPolicy 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 PutGroupPolicy for more information on using the PutGroupPolicy -// 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 PutGroupPolicyRequest method. -// req, resp := client.PutGroupPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutGroupPolicy -func (c *IAM) PutGroupPolicyRequest(input *PutGroupPolicyInput) (req *request.Request, output *PutGroupPolicyOutput) { - op := &request.Operation{ - Name: opPutGroupPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutGroupPolicyInput{} - } - - output = &PutGroupPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutGroupPolicy API operation for AWS Identity and Access Management. -// -// Adds or updates an inline policy document that is embedded in the specified -// IAM group. -// -// A user can also have managed policies attached to it. To attach a managed -// policy to a group, use AttachGroupPolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_AttachGroupPolicy.html). -// To create a new managed policy, use CreatePolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicy.html). -// For information about policies, see Managed policies and inline policies -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// For information about the maximum number of inline policies that you can -// embed in a group, see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM User Guide. -// -// Because policy documents can be large, you should use POST rather than GET -// when calling PutGroupPolicy. For general information about using the Query -// API with IAM, see Making query requests (https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation PutGroupPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument" -// The request was rejected because the policy document was malformed. The error -// message describes the specific error. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutGroupPolicy -func (c *IAM) PutGroupPolicy(input *PutGroupPolicyInput) (*PutGroupPolicyOutput, error) { - req, out := c.PutGroupPolicyRequest(input) - return out, req.Send() -} - -// PutGroupPolicyWithContext is the same as PutGroupPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutGroupPolicy 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 *IAM) PutGroupPolicyWithContext(ctx aws.Context, input *PutGroupPolicyInput, opts ...request.Option) (*PutGroupPolicyOutput, error) { - req, out := c.PutGroupPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutRolePermissionsBoundary = "PutRolePermissionsBoundary" - -// PutRolePermissionsBoundaryRequest generates a "aws/request.Request" representing the -// client's request for the PutRolePermissionsBoundary 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 PutRolePermissionsBoundary for more information on using the PutRolePermissionsBoundary -// 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 PutRolePermissionsBoundaryRequest method. -// req, resp := client.PutRolePermissionsBoundaryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutRolePermissionsBoundary -func (c *IAM) PutRolePermissionsBoundaryRequest(input *PutRolePermissionsBoundaryInput) (req *request.Request, output *PutRolePermissionsBoundaryOutput) { - op := &request.Operation{ - Name: opPutRolePermissionsBoundary, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutRolePermissionsBoundaryInput{} - } - - output = &PutRolePermissionsBoundaryOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutRolePermissionsBoundary API operation for AWS Identity and Access Management. -// -// Adds or updates the policy that is specified as the IAM role's permissions -// boundary. You can use an Amazon Web Services managed policy or a customer -// managed policy to set the boundary for a role. Use the boundary to control -// the maximum permissions that the role can have. Setting a permissions boundary -// is an advanced feature that can affect the permissions for the role. -// -// You cannot set the boundary for a service-linked role. -// -// Policies used as permissions boundaries do not provide permissions. You must -// also attach a permissions policy to the role. To learn how the effective -// permissions for a role are evaluated, see IAM JSON policy evaluation logic -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation PutRolePermissionsBoundary for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeUnmodifiableEntityException "UnmodifiableEntity" -// The request was rejected because service-linked roles are protected Amazon -// Web Services resources. Only the service that depends on the service-linked -// role can modify or delete the role on your behalf. The error message includes -// the name of the service that depends on this service-linked role. You must -// request the change through that service. -// -// - ErrCodePolicyNotAttachableException "PolicyNotAttachable" -// The request failed because Amazon Web Services service role policies can -// only be attached to the service-linked role for that service. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutRolePermissionsBoundary -func (c *IAM) PutRolePermissionsBoundary(input *PutRolePermissionsBoundaryInput) (*PutRolePermissionsBoundaryOutput, error) { - req, out := c.PutRolePermissionsBoundaryRequest(input) - return out, req.Send() -} - -// PutRolePermissionsBoundaryWithContext is the same as PutRolePermissionsBoundary with the addition of -// the ability to pass a context and additional request options. -// -// See PutRolePermissionsBoundary 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 *IAM) PutRolePermissionsBoundaryWithContext(ctx aws.Context, input *PutRolePermissionsBoundaryInput, opts ...request.Option) (*PutRolePermissionsBoundaryOutput, error) { - req, out := c.PutRolePermissionsBoundaryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutRolePolicy = "PutRolePolicy" - -// PutRolePolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutRolePolicy 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 PutRolePolicy for more information on using the PutRolePolicy -// 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 PutRolePolicyRequest method. -// req, resp := client.PutRolePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutRolePolicy -func (c *IAM) PutRolePolicyRequest(input *PutRolePolicyInput) (req *request.Request, output *PutRolePolicyOutput) { - op := &request.Operation{ - Name: opPutRolePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutRolePolicyInput{} - } - - output = &PutRolePolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutRolePolicy API operation for AWS Identity and Access Management. -// -// Adds or updates an inline policy document that is embedded in the specified -// IAM role. -// -// When you embed an inline policy in a role, the inline policy is used as part -// of the role's access (permissions) policy. The role's trust policy is created -// at the same time as the role, using CreateRole (https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html). -// You can update a role's trust policy using UpdateAssumeRolePolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_UpdateAssumeRolePolicy.html). -// For more information about roles, see IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/roles-toplevel.html) -// in the IAM User Guide. -// -// A role can also have a managed policy attached to it. To attach a managed -// policy to a role, use AttachRolePolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_AttachRolePolicy.html). -// To create a new managed policy, use CreatePolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicy.html). -// For information about policies, see Managed policies and inline policies -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// For information about the maximum number of inline policies that you can -// embed with a role, see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM User Guide. -// -// Because policy documents can be large, you should use POST rather than GET -// when calling PutRolePolicy. For general information about using the Query -// API with IAM, see Making query requests (https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation PutRolePolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument" -// The request was rejected because the policy document was malformed. The error -// message describes the specific error. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeUnmodifiableEntityException "UnmodifiableEntity" -// The request was rejected because service-linked roles are protected Amazon -// Web Services resources. Only the service that depends on the service-linked -// role can modify or delete the role on your behalf. The error message includes -// the name of the service that depends on this service-linked role. You must -// request the change through that service. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutRolePolicy -func (c *IAM) PutRolePolicy(input *PutRolePolicyInput) (*PutRolePolicyOutput, error) { - req, out := c.PutRolePolicyRequest(input) - return out, req.Send() -} - -// PutRolePolicyWithContext is the same as PutRolePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutRolePolicy 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 *IAM) PutRolePolicyWithContext(ctx aws.Context, input *PutRolePolicyInput, opts ...request.Option) (*PutRolePolicyOutput, error) { - req, out := c.PutRolePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutUserPermissionsBoundary = "PutUserPermissionsBoundary" - -// PutUserPermissionsBoundaryRequest generates a "aws/request.Request" representing the -// client's request for the PutUserPermissionsBoundary 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 PutUserPermissionsBoundary for more information on using the PutUserPermissionsBoundary -// 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 PutUserPermissionsBoundaryRequest method. -// req, resp := client.PutUserPermissionsBoundaryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutUserPermissionsBoundary -func (c *IAM) PutUserPermissionsBoundaryRequest(input *PutUserPermissionsBoundaryInput) (req *request.Request, output *PutUserPermissionsBoundaryOutput) { - op := &request.Operation{ - Name: opPutUserPermissionsBoundary, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutUserPermissionsBoundaryInput{} - } - - output = &PutUserPermissionsBoundaryOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutUserPermissionsBoundary API operation for AWS Identity and Access Management. -// -// Adds or updates the policy that is specified as the IAM user's permissions -// boundary. You can use an Amazon Web Services managed policy or a customer -// managed policy to set the boundary for a user. Use the boundary to control -// the maximum permissions that the user can have. Setting a permissions boundary -// is an advanced feature that can affect the permissions for the user. -// -// Policies that are used as permissions boundaries do not provide permissions. -// You must also attach a permissions policy to the user. To learn how the effective -// permissions for a user are evaluated, see IAM JSON policy evaluation logic -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation PutUserPermissionsBoundary for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodePolicyNotAttachableException "PolicyNotAttachable" -// The request failed because Amazon Web Services service role policies can -// only be attached to the service-linked role for that service. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutUserPermissionsBoundary -func (c *IAM) PutUserPermissionsBoundary(input *PutUserPermissionsBoundaryInput) (*PutUserPermissionsBoundaryOutput, error) { - req, out := c.PutUserPermissionsBoundaryRequest(input) - return out, req.Send() -} - -// PutUserPermissionsBoundaryWithContext is the same as PutUserPermissionsBoundary with the addition of -// the ability to pass a context and additional request options. -// -// See PutUserPermissionsBoundary 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 *IAM) PutUserPermissionsBoundaryWithContext(ctx aws.Context, input *PutUserPermissionsBoundaryInput, opts ...request.Option) (*PutUserPermissionsBoundaryOutput, error) { - req, out := c.PutUserPermissionsBoundaryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutUserPolicy = "PutUserPolicy" - -// PutUserPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutUserPolicy 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 PutUserPolicy for more information on using the PutUserPolicy -// 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 PutUserPolicyRequest method. -// req, resp := client.PutUserPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutUserPolicy -func (c *IAM) PutUserPolicyRequest(input *PutUserPolicyInput) (req *request.Request, output *PutUserPolicyOutput) { - op := &request.Operation{ - Name: opPutUserPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &PutUserPolicyInput{} - } - - output = &PutUserPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutUserPolicy API operation for AWS Identity and Access Management. -// -// Adds or updates an inline policy document that is embedded in the specified -// IAM user. -// -// An IAM user can also have a managed policy attached to it. To attach a managed -// policy to a user, use AttachUserPolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_AttachUserPolicy.html). -// To create a new managed policy, use CreatePolicy (https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreatePolicy.html). -// For information about policies, see Managed policies and inline policies -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -// -// For information about the maximum number of inline policies that you can -// embed in a user, see IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM User Guide. -// -// Because policy documents can be large, you should use POST rather than GET -// when calling PutUserPolicy. For general information about using the Query -// API with IAM, see Making query requests (https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation PutUserPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument" -// The request was rejected because the policy document was malformed. The error -// message describes the specific error. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/PutUserPolicy -func (c *IAM) PutUserPolicy(input *PutUserPolicyInput) (*PutUserPolicyOutput, error) { - req, out := c.PutUserPolicyRequest(input) - return out, req.Send() -} - -// PutUserPolicyWithContext is the same as PutUserPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutUserPolicy 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 *IAM) PutUserPolicyWithContext(ctx aws.Context, input *PutUserPolicyInput, opts ...request.Option) (*PutUserPolicyOutput, error) { - req, out := c.PutUserPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveClientIDFromOpenIDConnectProvider = "RemoveClientIDFromOpenIDConnectProvider" - -// RemoveClientIDFromOpenIDConnectProviderRequest generates a "aws/request.Request" representing the -// client's request for the RemoveClientIDFromOpenIDConnectProvider 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 RemoveClientIDFromOpenIDConnectProvider for more information on using the RemoveClientIDFromOpenIDConnectProvider -// 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 RemoveClientIDFromOpenIDConnectProviderRequest method. -// req, resp := client.RemoveClientIDFromOpenIDConnectProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/RemoveClientIDFromOpenIDConnectProvider -func (c *IAM) RemoveClientIDFromOpenIDConnectProviderRequest(input *RemoveClientIDFromOpenIDConnectProviderInput) (req *request.Request, output *RemoveClientIDFromOpenIDConnectProviderOutput) { - op := &request.Operation{ - Name: opRemoveClientIDFromOpenIDConnectProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveClientIDFromOpenIDConnectProviderInput{} - } - - output = &RemoveClientIDFromOpenIDConnectProviderOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveClientIDFromOpenIDConnectProvider API operation for AWS Identity and Access Management. -// -// Removes the specified client ID (also known as audience) from the list of -// client IDs registered for the specified IAM OpenID Connect (OIDC) provider -// resource object. -// -// This operation is idempotent; it does not fail or return an error if you -// try to remove a client ID that does not exist. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation RemoveClientIDFromOpenIDConnectProvider for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/RemoveClientIDFromOpenIDConnectProvider -func (c *IAM) RemoveClientIDFromOpenIDConnectProvider(input *RemoveClientIDFromOpenIDConnectProviderInput) (*RemoveClientIDFromOpenIDConnectProviderOutput, error) { - req, out := c.RemoveClientIDFromOpenIDConnectProviderRequest(input) - return out, req.Send() -} - -// RemoveClientIDFromOpenIDConnectProviderWithContext is the same as RemoveClientIDFromOpenIDConnectProvider with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveClientIDFromOpenIDConnectProvider 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 *IAM) RemoveClientIDFromOpenIDConnectProviderWithContext(ctx aws.Context, input *RemoveClientIDFromOpenIDConnectProviderInput, opts ...request.Option) (*RemoveClientIDFromOpenIDConnectProviderOutput, error) { - req, out := c.RemoveClientIDFromOpenIDConnectProviderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveRoleFromInstanceProfile = "RemoveRoleFromInstanceProfile" - -// RemoveRoleFromInstanceProfileRequest generates a "aws/request.Request" representing the -// client's request for the RemoveRoleFromInstanceProfile 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 RemoveRoleFromInstanceProfile for more information on using the RemoveRoleFromInstanceProfile -// 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 RemoveRoleFromInstanceProfileRequest method. -// req, resp := client.RemoveRoleFromInstanceProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/RemoveRoleFromInstanceProfile -func (c *IAM) RemoveRoleFromInstanceProfileRequest(input *RemoveRoleFromInstanceProfileInput) (req *request.Request, output *RemoveRoleFromInstanceProfileOutput) { - op := &request.Operation{ - Name: opRemoveRoleFromInstanceProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveRoleFromInstanceProfileInput{} - } - - output = &RemoveRoleFromInstanceProfileOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveRoleFromInstanceProfile API operation for AWS Identity and Access Management. -// -// Removes the specified IAM role from the specified Amazon EC2 instance profile. -// -// Make sure that you do not have any Amazon EC2 instances running with the -// role you are about to remove from the instance profile. Removing a role from -// an instance profile that is associated with a running instance might break -// any applications running on the instance. -// -// For more information about roles, see IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) -// in the IAM User Guide. For more information about instance profiles, see -// Using instance profiles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation RemoveRoleFromInstanceProfile for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeUnmodifiableEntityException "UnmodifiableEntity" -// The request was rejected because service-linked roles are protected Amazon -// Web Services resources. Only the service that depends on the service-linked -// role can modify or delete the role on your behalf. The error message includes -// the name of the service that depends on this service-linked role. You must -// request the change through that service. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/RemoveRoleFromInstanceProfile -func (c *IAM) RemoveRoleFromInstanceProfile(input *RemoveRoleFromInstanceProfileInput) (*RemoveRoleFromInstanceProfileOutput, error) { - req, out := c.RemoveRoleFromInstanceProfileRequest(input) - return out, req.Send() -} - -// RemoveRoleFromInstanceProfileWithContext is the same as RemoveRoleFromInstanceProfile with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveRoleFromInstanceProfile 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 *IAM) RemoveRoleFromInstanceProfileWithContext(ctx aws.Context, input *RemoveRoleFromInstanceProfileInput, opts ...request.Option) (*RemoveRoleFromInstanceProfileOutput, error) { - req, out := c.RemoveRoleFromInstanceProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveUserFromGroup = "RemoveUserFromGroup" - -// RemoveUserFromGroupRequest generates a "aws/request.Request" representing the -// client's request for the RemoveUserFromGroup 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 RemoveUserFromGroup for more information on using the RemoveUserFromGroup -// 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 RemoveUserFromGroupRequest method. -// req, resp := client.RemoveUserFromGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/RemoveUserFromGroup -func (c *IAM) RemoveUserFromGroupRequest(input *RemoveUserFromGroupInput) (req *request.Request, output *RemoveUserFromGroupOutput) { - op := &request.Operation{ - Name: opRemoveUserFromGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveUserFromGroupInput{} - } - - output = &RemoveUserFromGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveUserFromGroup API operation for AWS Identity and Access Management. -// -// Removes the specified user from the specified 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 AWS Identity and Access Management's -// API operation RemoveUserFromGroup for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/RemoveUserFromGroup -func (c *IAM) RemoveUserFromGroup(input *RemoveUserFromGroupInput) (*RemoveUserFromGroupOutput, error) { - req, out := c.RemoveUserFromGroupRequest(input) - return out, req.Send() -} - -// RemoveUserFromGroupWithContext is the same as RemoveUserFromGroup with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveUserFromGroup 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 *IAM) RemoveUserFromGroupWithContext(ctx aws.Context, input *RemoveUserFromGroupInput, opts ...request.Option) (*RemoveUserFromGroupOutput, error) { - req, out := c.RemoveUserFromGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opResetServiceSpecificCredential = "ResetServiceSpecificCredential" - -// ResetServiceSpecificCredentialRequest generates a "aws/request.Request" representing the -// client's request for the ResetServiceSpecificCredential 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 ResetServiceSpecificCredential for more information on using the ResetServiceSpecificCredential -// 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 ResetServiceSpecificCredentialRequest method. -// req, resp := client.ResetServiceSpecificCredentialRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ResetServiceSpecificCredential -func (c *IAM) ResetServiceSpecificCredentialRequest(input *ResetServiceSpecificCredentialInput) (req *request.Request, output *ResetServiceSpecificCredentialOutput) { - op := &request.Operation{ - Name: opResetServiceSpecificCredential, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ResetServiceSpecificCredentialInput{} - } - - output = &ResetServiceSpecificCredentialOutput{} - req = c.newRequest(op, input, output) - return -} - -// ResetServiceSpecificCredential API operation for AWS Identity and Access Management. -// -// Resets the password for a service-specific credential. The new password is -// Amazon Web Services generated and cryptographically strong. It cannot be -// configured by the user. Resetting the password immediately invalidates the -// previous password associated with this user. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation ResetServiceSpecificCredential for usage and error information. -// -// Returned Error Codes: -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ResetServiceSpecificCredential -func (c *IAM) ResetServiceSpecificCredential(input *ResetServiceSpecificCredentialInput) (*ResetServiceSpecificCredentialOutput, error) { - req, out := c.ResetServiceSpecificCredentialRequest(input) - return out, req.Send() -} - -// ResetServiceSpecificCredentialWithContext is the same as ResetServiceSpecificCredential with the addition of -// the ability to pass a context and additional request options. -// -// See ResetServiceSpecificCredential 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 *IAM) ResetServiceSpecificCredentialWithContext(ctx aws.Context, input *ResetServiceSpecificCredentialInput, opts ...request.Option) (*ResetServiceSpecificCredentialOutput, error) { - req, out := c.ResetServiceSpecificCredentialRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opResyncMFADevice = "ResyncMFADevice" - -// ResyncMFADeviceRequest generates a "aws/request.Request" representing the -// client's request for the ResyncMFADevice 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 ResyncMFADevice for more information on using the ResyncMFADevice -// 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 ResyncMFADeviceRequest method. -// req, resp := client.ResyncMFADeviceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ResyncMFADevice -func (c *IAM) ResyncMFADeviceRequest(input *ResyncMFADeviceInput) (req *request.Request, output *ResyncMFADeviceOutput) { - op := &request.Operation{ - Name: opResyncMFADevice, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ResyncMFADeviceInput{} - } - - output = &ResyncMFADeviceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ResyncMFADevice API operation for AWS Identity and Access Management. -// -// Synchronizes the specified MFA device with its IAM resource object on the -// Amazon Web Services servers. -// -// For more information about creating and working with virtual MFA devices, -// see Using a virtual MFA device (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation ResyncMFADevice for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidAuthenticationCodeException "InvalidAuthenticationCode" -// The request was rejected because the authentication code was not recognized. -// The error message describes the specific error. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ResyncMFADevice -func (c *IAM) ResyncMFADevice(input *ResyncMFADeviceInput) (*ResyncMFADeviceOutput, error) { - req, out := c.ResyncMFADeviceRequest(input) - return out, req.Send() -} - -// ResyncMFADeviceWithContext is the same as ResyncMFADevice with the addition of -// the ability to pass a context and additional request options. -// -// See ResyncMFADevice 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 *IAM) ResyncMFADeviceWithContext(ctx aws.Context, input *ResyncMFADeviceInput, opts ...request.Option) (*ResyncMFADeviceOutput, error) { - req, out := c.ResyncMFADeviceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetDefaultPolicyVersion = "SetDefaultPolicyVersion" - -// SetDefaultPolicyVersionRequest generates a "aws/request.Request" representing the -// client's request for the SetDefaultPolicyVersion 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 SetDefaultPolicyVersion for more information on using the SetDefaultPolicyVersion -// 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 SetDefaultPolicyVersionRequest method. -// req, resp := client.SetDefaultPolicyVersionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/SetDefaultPolicyVersion -func (c *IAM) SetDefaultPolicyVersionRequest(input *SetDefaultPolicyVersionInput) (req *request.Request, output *SetDefaultPolicyVersionOutput) { - op := &request.Operation{ - Name: opSetDefaultPolicyVersion, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetDefaultPolicyVersionInput{} - } - - output = &SetDefaultPolicyVersionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetDefaultPolicyVersion API operation for AWS Identity and Access Management. -// -// Sets the specified version of the specified policy as the policy's default -// (operative) version. -// -// This operation affects all users, groups, and roles that the policy is attached -// to. To list the users, groups, and roles that the policy is attached to, -// use ListEntitiesForPolicy. -// -// For information about managed policies, see Managed policies and inline policies -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation SetDefaultPolicyVersion for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/SetDefaultPolicyVersion -func (c *IAM) SetDefaultPolicyVersion(input *SetDefaultPolicyVersionInput) (*SetDefaultPolicyVersionOutput, error) { - req, out := c.SetDefaultPolicyVersionRequest(input) - return out, req.Send() -} - -// SetDefaultPolicyVersionWithContext is the same as SetDefaultPolicyVersion with the addition of -// the ability to pass a context and additional request options. -// -// See SetDefaultPolicyVersion 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 *IAM) SetDefaultPolicyVersionWithContext(ctx aws.Context, input *SetDefaultPolicyVersionInput, opts ...request.Option) (*SetDefaultPolicyVersionOutput, error) { - req, out := c.SetDefaultPolicyVersionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetSecurityTokenServicePreferences = "SetSecurityTokenServicePreferences" - -// SetSecurityTokenServicePreferencesRequest generates a "aws/request.Request" representing the -// client's request for the SetSecurityTokenServicePreferences 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 SetSecurityTokenServicePreferences for more information on using the SetSecurityTokenServicePreferences -// 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 SetSecurityTokenServicePreferencesRequest method. -// req, resp := client.SetSecurityTokenServicePreferencesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/SetSecurityTokenServicePreferences -func (c *IAM) SetSecurityTokenServicePreferencesRequest(input *SetSecurityTokenServicePreferencesInput) (req *request.Request, output *SetSecurityTokenServicePreferencesOutput) { - op := &request.Operation{ - Name: opSetSecurityTokenServicePreferences, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetSecurityTokenServicePreferencesInput{} - } - - output = &SetSecurityTokenServicePreferencesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetSecurityTokenServicePreferences API operation for AWS Identity and Access Management. -// -// Sets the specified version of the global endpoint token as the token version -// used for the Amazon Web Services account. -// -// By default, Security Token Service (STS) is available as a global service, -// and all STS requests go to a single endpoint at https://sts.amazonaws.com. -// Amazon Web Services recommends using Regional STS endpoints to reduce latency, -// build in redundancy, and increase session token availability. For information -// about Regional endpoints for STS, see Security Token Service endpoints and -// quotas (https://docs.aws.amazon.com/general/latest/gr/sts.html) in the Amazon -// Web Services General Reference. -// -// If you make an STS call to the global endpoint, the resulting session tokens -// might be valid in some Regions but not others. It depends on the version -// that is set in this operation. Version 1 tokens are valid only in Amazon -// Web Services Regions that are available by default. These tokens do not work -// in manually enabled Regions, such as Asia Pacific (Hong Kong). Version 2 -// tokens are valid in all Regions. However, version 2 tokens are longer and -// might affect systems where you temporarily store tokens. For information, -// see Activating and deactivating STS in an Amazon Web Services Region (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) -// in the IAM User Guide. -// -// To view the current session token version, see the GlobalEndpointTokenVersion -// entry in the response of the GetAccountSummary 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 AWS Identity and Access Management's -// API operation SetSecurityTokenServicePreferences for usage and error information. -// -// Returned Error Codes: -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/SetSecurityTokenServicePreferences -func (c *IAM) SetSecurityTokenServicePreferences(input *SetSecurityTokenServicePreferencesInput) (*SetSecurityTokenServicePreferencesOutput, error) { - req, out := c.SetSecurityTokenServicePreferencesRequest(input) - return out, req.Send() -} - -// SetSecurityTokenServicePreferencesWithContext is the same as SetSecurityTokenServicePreferences with the addition of -// the ability to pass a context and additional request options. -// -// See SetSecurityTokenServicePreferences 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 *IAM) SetSecurityTokenServicePreferencesWithContext(ctx aws.Context, input *SetSecurityTokenServicePreferencesInput, opts ...request.Option) (*SetSecurityTokenServicePreferencesOutput, error) { - req, out := c.SetSecurityTokenServicePreferencesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSimulateCustomPolicy = "SimulateCustomPolicy" - -// SimulateCustomPolicyRequest generates a "aws/request.Request" representing the -// client's request for the SimulateCustomPolicy 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 SimulateCustomPolicy for more information on using the SimulateCustomPolicy -// 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 SimulateCustomPolicyRequest method. -// req, resp := client.SimulateCustomPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/SimulateCustomPolicy -func (c *IAM) SimulateCustomPolicyRequest(input *SimulateCustomPolicyInput) (req *request.Request, output *SimulatePolicyResponse) { - op := &request.Operation{ - Name: opSimulateCustomPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &SimulateCustomPolicyInput{} - } - - output = &SimulatePolicyResponse{} - req = c.newRequest(op, input, output) - return -} - -// SimulateCustomPolicy API operation for AWS Identity and Access Management. -// -// Simulate how a set of IAM policies and optionally a resource-based policy -// works with a list of API operations and Amazon Web Services resources to -// determine the policies' effective permissions. The policies are provided -// as strings. -// -// The simulation does not perform the API operations; it only checks the authorization -// to determine if the simulated policies allow or deny the operations. You -// can simulate resources that don't exist in your account. -// -// If you want to simulate existing policies that are attached to an IAM user, -// group, or role, use SimulatePrincipalPolicy instead. -// -// Context keys are variables that are maintained by Amazon Web Services and -// its services and which provide details about the context of an API query -// request. You can use the Condition element of an IAM policy to evaluate context -// keys. To get the list of context keys that the policies require for correct -// simulation, use GetContextKeysForCustomPolicy. -// -// If the output is long, you can use MaxItems and Marker parameters to paginate -// the results. -// -// The IAM policy simulator evaluates statements in the identity-based policy -// and the inputs that you provide during simulation. The policy simulator results -// can differ from your live Amazon Web Services environment. We recommend that -// you check your policies against your live Amazon Web Services environment -// after testing using the policy simulator to confirm that you have the desired -// results. For more information about using the policy simulator, see Testing -// IAM policies with the IAM policy simulator (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_testing-policies.html)in -// the IAM 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 AWS Identity and Access Management's -// API operation SimulateCustomPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodePolicyEvaluationException "PolicyEvaluation" -// The request failed because a provided policy could not be successfully evaluated. -// An additional detailed message indicates the source of the failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/SimulateCustomPolicy -func (c *IAM) SimulateCustomPolicy(input *SimulateCustomPolicyInput) (*SimulatePolicyResponse, error) { - req, out := c.SimulateCustomPolicyRequest(input) - return out, req.Send() -} - -// SimulateCustomPolicyWithContext is the same as SimulateCustomPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See SimulateCustomPolicy 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 *IAM) SimulateCustomPolicyWithContext(ctx aws.Context, input *SimulateCustomPolicyInput, opts ...request.Option) (*SimulatePolicyResponse, error) { - req, out := c.SimulateCustomPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// SimulateCustomPolicyPages iterates over the pages of a SimulateCustomPolicy operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See SimulateCustomPolicy 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 SimulateCustomPolicy operation. -// pageNum := 0 -// err := client.SimulateCustomPolicyPages(params, -// func(page *iam.SimulatePolicyResponse, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) SimulateCustomPolicyPages(input *SimulateCustomPolicyInput, fn func(*SimulatePolicyResponse, bool) bool) error { - return c.SimulateCustomPolicyPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// SimulateCustomPolicyPagesWithContext same as SimulateCustomPolicyPages 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 *IAM) SimulateCustomPolicyPagesWithContext(ctx aws.Context, input *SimulateCustomPolicyInput, fn func(*SimulatePolicyResponse, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *SimulateCustomPolicyInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.SimulateCustomPolicyRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*SimulatePolicyResponse), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opSimulatePrincipalPolicy = "SimulatePrincipalPolicy" - -// SimulatePrincipalPolicyRequest generates a "aws/request.Request" representing the -// client's request for the SimulatePrincipalPolicy 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 SimulatePrincipalPolicy for more information on using the SimulatePrincipalPolicy -// 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 SimulatePrincipalPolicyRequest method. -// req, resp := client.SimulatePrincipalPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/SimulatePrincipalPolicy -func (c *IAM) SimulatePrincipalPolicyRequest(input *SimulatePrincipalPolicyInput) (req *request.Request, output *SimulatePolicyResponse) { - op := &request.Operation{ - Name: opSimulatePrincipalPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &SimulatePrincipalPolicyInput{} - } - - output = &SimulatePolicyResponse{} - req = c.newRequest(op, input, output) - return -} - -// SimulatePrincipalPolicy API operation for AWS Identity and Access Management. -// -// Simulate how a set of IAM policies attached to an IAM entity works with a -// list of API operations and Amazon Web Services resources to determine the -// policies' effective permissions. The entity can be an IAM user, group, or -// role. If you specify a user, then the simulation also includes all of the -// policies that are attached to groups that the user belongs to. You can simulate -// resources that don't exist in your account. -// -// You can optionally include a list of one or more additional policies specified -// as strings to include in the simulation. If you want to simulate only policies -// specified as strings, use SimulateCustomPolicy instead. -// -// You can also optionally include one resource-based policy to be evaluated -// with each of the resources included in the simulation for IAM users only. -// -// The simulation does not perform the API operations; it only checks the authorization -// to determine if the simulated policies allow or deny the operations. -// -// Note: This operation discloses information about the permissions granted -// to other users. If you do not want users to see other user's permissions, -// then consider allowing them to use SimulateCustomPolicy instead. -// -// Context keys are variables maintained by Amazon Web Services and its services -// that provide details about the context of an API query request. You can use -// the Condition element of an IAM policy to evaluate context keys. To get the -// list of context keys that the policies require for correct simulation, use -// GetContextKeysForPrincipalPolicy. -// -// If the output is long, you can use the MaxItems and Marker parameters to -// paginate the results. -// -// The IAM policy simulator evaluates statements in the identity-based policy -// and the inputs that you provide during simulation. The policy simulator results -// can differ from your live Amazon Web Services environment. We recommend that -// you check your policies against your live Amazon Web Services environment -// after testing using the policy simulator to confirm that you have the desired -// results. For more information about using the policy simulator, see Testing -// IAM policies with the IAM policy simulator (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_testing-policies.html)in -// the IAM 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 AWS Identity and Access Management's -// API operation SimulatePrincipalPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodePolicyEvaluationException "PolicyEvaluation" -// The request failed because a provided policy could not be successfully evaluated. -// An additional detailed message indicates the source of the failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/SimulatePrincipalPolicy -func (c *IAM) SimulatePrincipalPolicy(input *SimulatePrincipalPolicyInput) (*SimulatePolicyResponse, error) { - req, out := c.SimulatePrincipalPolicyRequest(input) - return out, req.Send() -} - -// SimulatePrincipalPolicyWithContext is the same as SimulatePrincipalPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See SimulatePrincipalPolicy 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 *IAM) SimulatePrincipalPolicyWithContext(ctx aws.Context, input *SimulatePrincipalPolicyInput, opts ...request.Option) (*SimulatePolicyResponse, error) { - req, out := c.SimulatePrincipalPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// SimulatePrincipalPolicyPages iterates over the pages of a SimulatePrincipalPolicy operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See SimulatePrincipalPolicy 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 SimulatePrincipalPolicy operation. -// pageNum := 0 -// err := client.SimulatePrincipalPolicyPages(params, -// func(page *iam.SimulatePolicyResponse, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *IAM) SimulatePrincipalPolicyPages(input *SimulatePrincipalPolicyInput, fn func(*SimulatePolicyResponse, bool) bool) error { - return c.SimulatePrincipalPolicyPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// SimulatePrincipalPolicyPagesWithContext same as SimulatePrincipalPolicyPages 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 *IAM) SimulatePrincipalPolicyPagesWithContext(ctx aws.Context, input *SimulatePrincipalPolicyInput, fn func(*SimulatePolicyResponse, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *SimulatePrincipalPolicyInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.SimulatePrincipalPolicyRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*SimulatePolicyResponse), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opTagInstanceProfile = "TagInstanceProfile" - -// TagInstanceProfileRequest generates a "aws/request.Request" representing the -// client's request for the TagInstanceProfile 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 TagInstanceProfile for more information on using the TagInstanceProfile -// 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 TagInstanceProfileRequest method. -// req, resp := client.TagInstanceProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagInstanceProfile -func (c *IAM) TagInstanceProfileRequest(input *TagInstanceProfileInput) (req *request.Request, output *TagInstanceProfileOutput) { - op := &request.Operation{ - Name: opTagInstanceProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagInstanceProfileInput{} - } - - output = &TagInstanceProfileOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagInstanceProfile API operation for AWS Identity and Access Management. -// -// Adds one or more tags to an IAM instance profile. If a tag with the same -// key name already exists, then that tag is overwritten with the new value. -// -// Each tag consists of a key name and an associated value. By assigning tags -// to your resources, you can do the following: -// -// - Administrative grouping and discovery - Attach tags to resources to -// aid in organization and search. For example, you could search for all -// resources with the key name Project and the value MyImportantProject. -// Or search for all resources with the key name Cost Center and the value -// 41200. -// -// - Access control - Include tags in IAM user-based and resource-based policies. -// You can use tags to restrict access to only an IAM instance profile that -// has a specified tag attached. For examples of policies that show how to -// use tags to control access, see Control access using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) -// in the IAM User Guide. -// -// - If any one of the tags is invalid or if you exceed the allowed maximum -// number of tags, then the entire request fails and the resource is not -// created. For more information about tagging, see Tagging IAM resources -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) in the -// IAM User Guide. -// -// - Amazon Web Services always interprets the tag Value as a single string. -// If you need to store an array, you can store comma-separated values in -// the string. However, you must interpret the value in your code. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation TagInstanceProfile for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagInstanceProfile -func (c *IAM) TagInstanceProfile(input *TagInstanceProfileInput) (*TagInstanceProfileOutput, error) { - req, out := c.TagInstanceProfileRequest(input) - return out, req.Send() -} - -// TagInstanceProfileWithContext is the same as TagInstanceProfile with the addition of -// the ability to pass a context and additional request options. -// -// See TagInstanceProfile 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 *IAM) TagInstanceProfileWithContext(ctx aws.Context, input *TagInstanceProfileInput, opts ...request.Option) (*TagInstanceProfileOutput, error) { - req, out := c.TagInstanceProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTagMFADevice = "TagMFADevice" - -// TagMFADeviceRequest generates a "aws/request.Request" representing the -// client's request for the TagMFADevice 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 TagMFADevice for more information on using the TagMFADevice -// 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 TagMFADeviceRequest method. -// req, resp := client.TagMFADeviceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagMFADevice -func (c *IAM) TagMFADeviceRequest(input *TagMFADeviceInput) (req *request.Request, output *TagMFADeviceOutput) { - op := &request.Operation{ - Name: opTagMFADevice, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagMFADeviceInput{} - } - - output = &TagMFADeviceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagMFADevice API operation for AWS Identity and Access Management. -// -// Adds one or more tags to an IAM virtual multi-factor authentication (MFA) -// device. If a tag with the same key name already exists, then that tag is -// overwritten with the new value. -// -// A tag consists of a key name and an associated value. By assigning tags to -// your resources, you can do the following: -// -// - Administrative grouping and discovery - Attach tags to resources to -// aid in organization and search. For example, you could search for all -// resources with the key name Project and the value MyImportantProject. -// Or search for all resources with the key name Cost Center and the value -// 41200. -// -// - Access control - Include tags in IAM user-based and resource-based policies. -// You can use tags to restrict access to only an IAM virtual MFA device -// that has a specified tag attached. For examples of policies that show -// how to use tags to control access, see Control access using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) -// in the IAM User Guide. -// -// - If any one of the tags is invalid or if you exceed the allowed maximum -// number of tags, then the entire request fails and the resource is not -// created. For more information about tagging, see Tagging IAM resources -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) in the -// IAM User Guide. -// -// - Amazon Web Services always interprets the tag Value as a single string. -// If you need to store an array, you can store comma-separated values in -// the string. However, you must interpret the value in your code. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation TagMFADevice for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagMFADevice -func (c *IAM) TagMFADevice(input *TagMFADeviceInput) (*TagMFADeviceOutput, error) { - req, out := c.TagMFADeviceRequest(input) - return out, req.Send() -} - -// TagMFADeviceWithContext is the same as TagMFADevice with the addition of -// the ability to pass a context and additional request options. -// -// See TagMFADevice 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 *IAM) TagMFADeviceWithContext(ctx aws.Context, input *TagMFADeviceInput, opts ...request.Option) (*TagMFADeviceOutput, error) { - req, out := c.TagMFADeviceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTagOpenIDConnectProvider = "TagOpenIDConnectProvider" - -// TagOpenIDConnectProviderRequest generates a "aws/request.Request" representing the -// client's request for the TagOpenIDConnectProvider 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 TagOpenIDConnectProvider for more information on using the TagOpenIDConnectProvider -// 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 TagOpenIDConnectProviderRequest method. -// req, resp := client.TagOpenIDConnectProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagOpenIDConnectProvider -func (c *IAM) TagOpenIDConnectProviderRequest(input *TagOpenIDConnectProviderInput) (req *request.Request, output *TagOpenIDConnectProviderOutput) { - op := &request.Operation{ - Name: opTagOpenIDConnectProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagOpenIDConnectProviderInput{} - } - - output = &TagOpenIDConnectProviderOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagOpenIDConnectProvider API operation for AWS Identity and Access Management. -// -// Adds one or more tags to an OpenID Connect (OIDC)-compatible identity provider. -// For more information about these providers, see About web identity federation -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc.html). -// If a tag with the same key name already exists, then that tag is overwritten -// with the new value. -// -// A tag consists of a key name and an associated value. By assigning tags to -// your resources, you can do the following: -// -// - Administrative grouping and discovery - Attach tags to resources to -// aid in organization and search. For example, you could search for all -// resources with the key name Project and the value MyImportantProject. -// Or search for all resources with the key name Cost Center and the value -// 41200. -// -// - Access control - Include tags in IAM identity-based and resource-based -// policies. You can use tags to restrict access to only an OIDC provider -// that has a specified tag attached. For examples of policies that show -// how to use tags to control access, see Control access using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) -// in the IAM User Guide. -// -// - If any one of the tags is invalid or if you exceed the allowed maximum -// number of tags, then the entire request fails and the resource is not -// created. For more information about tagging, see Tagging IAM resources -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) in the -// IAM User Guide. -// -// - Amazon Web Services always interprets the tag Value as a single string. -// If you need to store an array, you can store comma-separated values in -// the string. However, you must interpret the value in your code. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation TagOpenIDConnectProvider for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagOpenIDConnectProvider -func (c *IAM) TagOpenIDConnectProvider(input *TagOpenIDConnectProviderInput) (*TagOpenIDConnectProviderOutput, error) { - req, out := c.TagOpenIDConnectProviderRequest(input) - return out, req.Send() -} - -// TagOpenIDConnectProviderWithContext is the same as TagOpenIDConnectProvider with the addition of -// the ability to pass a context and additional request options. -// -// See TagOpenIDConnectProvider 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 *IAM) TagOpenIDConnectProviderWithContext(ctx aws.Context, input *TagOpenIDConnectProviderInput, opts ...request.Option) (*TagOpenIDConnectProviderOutput, error) { - req, out := c.TagOpenIDConnectProviderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTagPolicy = "TagPolicy" - -// TagPolicyRequest generates a "aws/request.Request" representing the -// client's request for the TagPolicy 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 TagPolicy for more information on using the TagPolicy -// 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 TagPolicyRequest method. -// req, resp := client.TagPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagPolicy -func (c *IAM) TagPolicyRequest(input *TagPolicyInput) (req *request.Request, output *TagPolicyOutput) { - op := &request.Operation{ - Name: opTagPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagPolicyInput{} - } - - output = &TagPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagPolicy API operation for AWS Identity and Access Management. -// -// Adds one or more tags to an IAM customer managed policy. If a tag with the -// same key name already exists, then that tag is overwritten with the new value. -// -// A tag consists of a key name and an associated value. By assigning tags to -// your resources, you can do the following: -// -// - Administrative grouping and discovery - Attach tags to resources to -// aid in organization and search. For example, you could search for all -// resources with the key name Project and the value MyImportantProject. -// Or search for all resources with the key name Cost Center and the value -// 41200. -// -// - Access control - Include tags in IAM user-based and resource-based policies. -// You can use tags to restrict access to only an IAM customer managed policy -// that has a specified tag attached. For examples of policies that show -// how to use tags to control access, see Control access using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) -// in the IAM User Guide. -// -// - If any one of the tags is invalid or if you exceed the allowed maximum -// number of tags, then the entire request fails and the resource is not -// created. For more information about tagging, see Tagging IAM resources -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) in the -// IAM User Guide. -// -// - Amazon Web Services always interprets the tag Value as a single string. -// If you need to store an array, you can store comma-separated values in -// the string. However, you must interpret the value in your code. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation TagPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagPolicy -func (c *IAM) TagPolicy(input *TagPolicyInput) (*TagPolicyOutput, error) { - req, out := c.TagPolicyRequest(input) - return out, req.Send() -} - -// TagPolicyWithContext is the same as TagPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See TagPolicy 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 *IAM) TagPolicyWithContext(ctx aws.Context, input *TagPolicyInput, opts ...request.Option) (*TagPolicyOutput, error) { - req, out := c.TagPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTagRole = "TagRole" - -// TagRoleRequest generates a "aws/request.Request" representing the -// client's request for the TagRole 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 TagRole for more information on using the TagRole -// 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 TagRoleRequest method. -// req, resp := client.TagRoleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagRole -func (c *IAM) TagRoleRequest(input *TagRoleInput) (req *request.Request, output *TagRoleOutput) { - op := &request.Operation{ - Name: opTagRole, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagRoleInput{} - } - - output = &TagRoleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagRole API operation for AWS Identity and Access Management. -// -// Adds one or more tags to an IAM role. The role can be a regular role or a -// service-linked role. If a tag with the same key name already exists, then -// that tag is overwritten with the new value. -// -// A tag consists of a key name and an associated value. By assigning tags to -// your resources, you can do the following: -// -// - Administrative grouping and discovery - Attach tags to resources to -// aid in organization and search. For example, you could search for all -// resources with the key name Project and the value MyImportantProject. -// Or search for all resources with the key name Cost Center and the value -// 41200. -// -// - Access control - Include tags in IAM user-based and resource-based policies. -// You can use tags to restrict access to only an IAM role that has a specified -// tag attached. You can also restrict access to only those resources that -// have a certain tag attached. For examples of policies that show how to -// use tags to control access, see Control access using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) -// in the IAM User Guide. -// -// - Cost allocation - Use tags to help track which individuals and teams -// are using which Amazon Web Services resources. -// -// - If any one of the tags is invalid or if you exceed the allowed maximum -// number of tags, then the entire request fails and the resource is not -// created. For more information about tagging, see Tagging IAM resources -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) in the -// IAM User Guide. -// -// - Amazon Web Services always interprets the tag Value as a single string. -// If you need to store an array, you can store comma-separated values in -// the string. However, you must interpret the value in your code. -// -// For more information about tagging, see Tagging IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation TagRole for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagRole -func (c *IAM) TagRole(input *TagRoleInput) (*TagRoleOutput, error) { - req, out := c.TagRoleRequest(input) - return out, req.Send() -} - -// TagRoleWithContext is the same as TagRole with the addition of -// the ability to pass a context and additional request options. -// -// See TagRole 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 *IAM) TagRoleWithContext(ctx aws.Context, input *TagRoleInput, opts ...request.Option) (*TagRoleOutput, error) { - req, out := c.TagRoleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTagSAMLProvider = "TagSAMLProvider" - -// TagSAMLProviderRequest generates a "aws/request.Request" representing the -// client's request for the TagSAMLProvider 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 TagSAMLProvider for more information on using the TagSAMLProvider -// 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 TagSAMLProviderRequest method. -// req, resp := client.TagSAMLProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagSAMLProvider -func (c *IAM) TagSAMLProviderRequest(input *TagSAMLProviderInput) (req *request.Request, output *TagSAMLProviderOutput) { - op := &request.Operation{ - Name: opTagSAMLProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagSAMLProviderInput{} - } - - output = &TagSAMLProviderOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagSAMLProvider API operation for AWS Identity and Access Management. -// -// Adds one or more tags to a Security Assertion Markup Language (SAML) identity -// provider. For more information about these providers, see About SAML 2.0-based -// federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html). -// If a tag with the same key name already exists, then that tag is overwritten -// with the new value. -// -// A tag consists of a key name and an associated value. By assigning tags to -// your resources, you can do the following: -// -// - Administrative grouping and discovery - Attach tags to resources to -// aid in organization and search. For example, you could search for all -// resources with the key name Project and the value MyImportantProject. -// Or search for all resources with the key name Cost Center and the value -// 41200. -// -// - Access control - Include tags in IAM user-based and resource-based policies. -// You can use tags to restrict access to only a SAML identity provider that -// has a specified tag attached. For examples of policies that show how to -// use tags to control access, see Control access using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) -// in the IAM User Guide. -// -// - If any one of the tags is invalid or if you exceed the allowed maximum -// number of tags, then the entire request fails and the resource is not -// created. For more information about tagging, see Tagging IAM resources -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) in the -// IAM User Guide. -// -// - Amazon Web Services always interprets the tag Value as a single string. -// If you need to store an array, you can store comma-separated values in -// the string. However, you must interpret the value in your code. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation TagSAMLProvider for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagSAMLProvider -func (c *IAM) TagSAMLProvider(input *TagSAMLProviderInput) (*TagSAMLProviderOutput, error) { - req, out := c.TagSAMLProviderRequest(input) - return out, req.Send() -} - -// TagSAMLProviderWithContext is the same as TagSAMLProvider with the addition of -// the ability to pass a context and additional request options. -// -// See TagSAMLProvider 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 *IAM) TagSAMLProviderWithContext(ctx aws.Context, input *TagSAMLProviderInput, opts ...request.Option) (*TagSAMLProviderOutput, error) { - req, out := c.TagSAMLProviderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTagServerCertificate = "TagServerCertificate" - -// TagServerCertificateRequest generates a "aws/request.Request" representing the -// client's request for the TagServerCertificate 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 TagServerCertificate for more information on using the TagServerCertificate -// 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 TagServerCertificateRequest method. -// req, resp := client.TagServerCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagServerCertificate -func (c *IAM) TagServerCertificateRequest(input *TagServerCertificateInput) (req *request.Request, output *TagServerCertificateOutput) { - op := &request.Operation{ - Name: opTagServerCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagServerCertificateInput{} - } - - output = &TagServerCertificateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagServerCertificate API operation for AWS Identity and Access Management. -// -// Adds one or more tags to an IAM server certificate. If a tag with the same -// key name already exists, then that tag is overwritten with the new value. -// -// For certificates in a Region supported by Certificate Manager (ACM), we recommend -// that you don't use IAM server certificates. Instead, use ACM to provision, -// manage, and deploy your server certificates. For more information about IAM -// server certificates, Working with server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) -// in the IAM User Guide. -// -// A tag consists of a key name and an associated value. By assigning tags to -// your resources, you can do the following: -// -// - Administrative grouping and discovery - Attach tags to resources to -// aid in organization and search. For example, you could search for all -// resources with the key name Project and the value MyImportantProject. -// Or search for all resources with the key name Cost Center and the value -// 41200. -// -// - Access control - Include tags in IAM user-based and resource-based policies. -// You can use tags to restrict access to only a server certificate that -// has a specified tag attached. For examples of policies that show how to -// use tags to control access, see Control access using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) -// in the IAM User Guide. -// -// - Cost allocation - Use tags to help track which individuals and teams -// are using which Amazon Web Services resources. -// -// - If any one of the tags is invalid or if you exceed the allowed maximum -// number of tags, then the entire request fails and the resource is not -// created. For more information about tagging, see Tagging IAM resources -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) in the -// IAM User Guide. -// -// - Amazon Web Services always interprets the tag Value as a single string. -// If you need to store an array, you can store comma-separated values in -// the string. However, you must interpret the value in your code. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation TagServerCertificate for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagServerCertificate -func (c *IAM) TagServerCertificate(input *TagServerCertificateInput) (*TagServerCertificateOutput, error) { - req, out := c.TagServerCertificateRequest(input) - return out, req.Send() -} - -// TagServerCertificateWithContext is the same as TagServerCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See TagServerCertificate 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 *IAM) TagServerCertificateWithContext(ctx aws.Context, input *TagServerCertificateInput, opts ...request.Option) (*TagServerCertificateOutput, error) { - req, out := c.TagServerCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTagUser = "TagUser" - -// TagUserRequest generates a "aws/request.Request" representing the -// client's request for the TagUser 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 TagUser for more information on using the TagUser -// 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 TagUserRequest method. -// req, resp := client.TagUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagUser -func (c *IAM) TagUserRequest(input *TagUserInput) (req *request.Request, output *TagUserOutput) { - op := &request.Operation{ - Name: opTagUser, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagUserInput{} - } - - output = &TagUserOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagUser API operation for AWS Identity and Access Management. -// -// Adds one or more tags to an IAM user. If a tag with the same key name already -// exists, then that tag is overwritten with the new value. -// -// A tag consists of a key name and an associated value. By assigning tags to -// your resources, you can do the following: -// -// - Administrative grouping and discovery - Attach tags to resources to -// aid in organization and search. For example, you could search for all -// resources with the key name Project and the value MyImportantProject. -// Or search for all resources with the key name Cost Center and the value -// 41200. -// -// - Access control - Include tags in IAM identity-based and resource-based -// policies. You can use tags to restrict access to only an IAM requesting -// user that has a specified tag attached. You can also restrict access to -// only those resources that have a certain tag attached. For examples of -// policies that show how to use tags to control access, see Control access -// using IAM tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) -// in the IAM User Guide. -// -// - Cost allocation - Use tags to help track which individuals and teams -// are using which Amazon Web Services resources. -// -// - If any one of the tags is invalid or if you exceed the allowed maximum -// number of tags, then the entire request fails and the resource is not -// created. For more information about tagging, see Tagging IAM resources -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) in the -// IAM User Guide. -// -// - Amazon Web Services always interprets the tag Value as a single string. -// If you need to store an array, you can store comma-separated values in -// the string. However, you must interpret the value in your code. -// -// For more information about tagging, see Tagging IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation TagUser for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagUser -func (c *IAM) TagUser(input *TagUserInput) (*TagUserOutput, error) { - req, out := c.TagUserRequest(input) - return out, req.Send() -} - -// TagUserWithContext is the same as TagUser with the addition of -// the ability to pass a context and additional request options. -// -// See TagUser 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 *IAM) TagUserWithContext(ctx aws.Context, input *TagUserInput, opts ...request.Option) (*TagUserOutput, error) { - req, out := c.TagUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUntagInstanceProfile = "UntagInstanceProfile" - -// UntagInstanceProfileRequest generates a "aws/request.Request" representing the -// client's request for the UntagInstanceProfile 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 UntagInstanceProfile for more information on using the UntagInstanceProfile -// 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 UntagInstanceProfileRequest method. -// req, resp := client.UntagInstanceProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagInstanceProfile -func (c *IAM) UntagInstanceProfileRequest(input *UntagInstanceProfileInput) (req *request.Request, output *UntagInstanceProfileOutput) { - op := &request.Operation{ - Name: opUntagInstanceProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagInstanceProfileInput{} - } - - output = &UntagInstanceProfileOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagInstanceProfile API operation for AWS Identity and Access Management. -// -// Removes the specified tags from the IAM instance profile. For more information -// about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation UntagInstanceProfile for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagInstanceProfile -func (c *IAM) UntagInstanceProfile(input *UntagInstanceProfileInput) (*UntagInstanceProfileOutput, error) { - req, out := c.UntagInstanceProfileRequest(input) - return out, req.Send() -} - -// UntagInstanceProfileWithContext is the same as UntagInstanceProfile with the addition of -// the ability to pass a context and additional request options. -// -// See UntagInstanceProfile 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 *IAM) UntagInstanceProfileWithContext(ctx aws.Context, input *UntagInstanceProfileInput, opts ...request.Option) (*UntagInstanceProfileOutput, error) { - req, out := c.UntagInstanceProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUntagMFADevice = "UntagMFADevice" - -// UntagMFADeviceRequest generates a "aws/request.Request" representing the -// client's request for the UntagMFADevice 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 UntagMFADevice for more information on using the UntagMFADevice -// 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 UntagMFADeviceRequest method. -// req, resp := client.UntagMFADeviceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagMFADevice -func (c *IAM) UntagMFADeviceRequest(input *UntagMFADeviceInput) (req *request.Request, output *UntagMFADeviceOutput) { - op := &request.Operation{ - Name: opUntagMFADevice, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagMFADeviceInput{} - } - - output = &UntagMFADeviceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagMFADevice API operation for AWS Identity and Access Management. -// -// Removes the specified tags from the IAM virtual multi-factor authentication -// (MFA) device. For more information about tagging, see Tagging IAM resources -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) in the IAM -// 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 AWS Identity and Access Management's -// API operation UntagMFADevice for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagMFADevice -func (c *IAM) UntagMFADevice(input *UntagMFADeviceInput) (*UntagMFADeviceOutput, error) { - req, out := c.UntagMFADeviceRequest(input) - return out, req.Send() -} - -// UntagMFADeviceWithContext is the same as UntagMFADevice with the addition of -// the ability to pass a context and additional request options. -// -// See UntagMFADevice 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 *IAM) UntagMFADeviceWithContext(ctx aws.Context, input *UntagMFADeviceInput, opts ...request.Option) (*UntagMFADeviceOutput, error) { - req, out := c.UntagMFADeviceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUntagOpenIDConnectProvider = "UntagOpenIDConnectProvider" - -// UntagOpenIDConnectProviderRequest generates a "aws/request.Request" representing the -// client's request for the UntagOpenIDConnectProvider 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 UntagOpenIDConnectProvider for more information on using the UntagOpenIDConnectProvider -// 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 UntagOpenIDConnectProviderRequest method. -// req, resp := client.UntagOpenIDConnectProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagOpenIDConnectProvider -func (c *IAM) UntagOpenIDConnectProviderRequest(input *UntagOpenIDConnectProviderInput) (req *request.Request, output *UntagOpenIDConnectProviderOutput) { - op := &request.Operation{ - Name: opUntagOpenIDConnectProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagOpenIDConnectProviderInput{} - } - - output = &UntagOpenIDConnectProviderOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagOpenIDConnectProvider API operation for AWS Identity and Access Management. -// -// Removes the specified tags from the specified OpenID Connect (OIDC)-compatible -// identity provider in IAM. For more information about OIDC providers, see -// About web identity federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc.html). -// For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation UntagOpenIDConnectProvider for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagOpenIDConnectProvider -func (c *IAM) UntagOpenIDConnectProvider(input *UntagOpenIDConnectProviderInput) (*UntagOpenIDConnectProviderOutput, error) { - req, out := c.UntagOpenIDConnectProviderRequest(input) - return out, req.Send() -} - -// UntagOpenIDConnectProviderWithContext is the same as UntagOpenIDConnectProvider with the addition of -// the ability to pass a context and additional request options. -// -// See UntagOpenIDConnectProvider 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 *IAM) UntagOpenIDConnectProviderWithContext(ctx aws.Context, input *UntagOpenIDConnectProviderInput, opts ...request.Option) (*UntagOpenIDConnectProviderOutput, error) { - req, out := c.UntagOpenIDConnectProviderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUntagPolicy = "UntagPolicy" - -// UntagPolicyRequest generates a "aws/request.Request" representing the -// client's request for the UntagPolicy 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 UntagPolicy for more information on using the UntagPolicy -// 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 UntagPolicyRequest method. -// req, resp := client.UntagPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagPolicy -func (c *IAM) UntagPolicyRequest(input *UntagPolicyInput) (req *request.Request, output *UntagPolicyOutput) { - op := &request.Operation{ - Name: opUntagPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagPolicyInput{} - } - - output = &UntagPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagPolicy API operation for AWS Identity and Access Management. -// -// Removes the specified tags from the customer managed policy. For more information -// about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation UntagPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagPolicy -func (c *IAM) UntagPolicy(input *UntagPolicyInput) (*UntagPolicyOutput, error) { - req, out := c.UntagPolicyRequest(input) - return out, req.Send() -} - -// UntagPolicyWithContext is the same as UntagPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See UntagPolicy 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 *IAM) UntagPolicyWithContext(ctx aws.Context, input *UntagPolicyInput, opts ...request.Option) (*UntagPolicyOutput, error) { - req, out := c.UntagPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUntagRole = "UntagRole" - -// UntagRoleRequest generates a "aws/request.Request" representing the -// client's request for the UntagRole 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 UntagRole for more information on using the UntagRole -// 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 UntagRoleRequest method. -// req, resp := client.UntagRoleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagRole -func (c *IAM) UntagRoleRequest(input *UntagRoleInput) (req *request.Request, output *UntagRoleOutput) { - op := &request.Operation{ - Name: opUntagRole, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagRoleInput{} - } - - output = &UntagRoleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagRole API operation for AWS Identity and Access Management. -// -// Removes the specified tags from the role. For more information about tagging, -// see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation UntagRole for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagRole -func (c *IAM) UntagRole(input *UntagRoleInput) (*UntagRoleOutput, error) { - req, out := c.UntagRoleRequest(input) - return out, req.Send() -} - -// UntagRoleWithContext is the same as UntagRole with the addition of -// the ability to pass a context and additional request options. -// -// See UntagRole 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 *IAM) UntagRoleWithContext(ctx aws.Context, input *UntagRoleInput, opts ...request.Option) (*UntagRoleOutput, error) { - req, out := c.UntagRoleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUntagSAMLProvider = "UntagSAMLProvider" - -// UntagSAMLProviderRequest generates a "aws/request.Request" representing the -// client's request for the UntagSAMLProvider 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 UntagSAMLProvider for more information on using the UntagSAMLProvider -// 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 UntagSAMLProviderRequest method. -// req, resp := client.UntagSAMLProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagSAMLProvider -func (c *IAM) UntagSAMLProviderRequest(input *UntagSAMLProviderInput) (req *request.Request, output *UntagSAMLProviderOutput) { - op := &request.Operation{ - Name: opUntagSAMLProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagSAMLProviderInput{} - } - - output = &UntagSAMLProviderOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagSAMLProvider API operation for AWS Identity and Access Management. -// -// Removes the specified tags from the specified Security Assertion Markup Language -// (SAML) identity provider in IAM. For more information about these providers, -// see About web identity federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc.html). -// For more information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation UntagSAMLProvider for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagSAMLProvider -func (c *IAM) UntagSAMLProvider(input *UntagSAMLProviderInput) (*UntagSAMLProviderOutput, error) { - req, out := c.UntagSAMLProviderRequest(input) - return out, req.Send() -} - -// UntagSAMLProviderWithContext is the same as UntagSAMLProvider with the addition of -// the ability to pass a context and additional request options. -// -// See UntagSAMLProvider 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 *IAM) UntagSAMLProviderWithContext(ctx aws.Context, input *UntagSAMLProviderInput, opts ...request.Option) (*UntagSAMLProviderOutput, error) { - req, out := c.UntagSAMLProviderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUntagServerCertificate = "UntagServerCertificate" - -// UntagServerCertificateRequest generates a "aws/request.Request" representing the -// client's request for the UntagServerCertificate 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 UntagServerCertificate for more information on using the UntagServerCertificate -// 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 UntagServerCertificateRequest method. -// req, resp := client.UntagServerCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagServerCertificate -func (c *IAM) UntagServerCertificateRequest(input *UntagServerCertificateInput) (req *request.Request, output *UntagServerCertificateOutput) { - op := &request.Operation{ - Name: opUntagServerCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagServerCertificateInput{} - } - - output = &UntagServerCertificateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagServerCertificate API operation for AWS Identity and Access Management. -// -// Removes the specified tags from the IAM server certificate. For more information -// about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. -// -// For certificates in a Region supported by Certificate Manager (ACM), we recommend -// that you don't use IAM server certificates. Instead, use ACM to provision, -// manage, and deploy your server certificates. For more information about IAM -// server certificates, Working with server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation UntagServerCertificate for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagServerCertificate -func (c *IAM) UntagServerCertificate(input *UntagServerCertificateInput) (*UntagServerCertificateOutput, error) { - req, out := c.UntagServerCertificateRequest(input) - return out, req.Send() -} - -// UntagServerCertificateWithContext is the same as UntagServerCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See UntagServerCertificate 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 *IAM) UntagServerCertificateWithContext(ctx aws.Context, input *UntagServerCertificateInput, opts ...request.Option) (*UntagServerCertificateOutput, error) { - req, out := c.UntagServerCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUntagUser = "UntagUser" - -// UntagUserRequest generates a "aws/request.Request" representing the -// client's request for the UntagUser 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 UntagUser for more information on using the UntagUser -// 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 UntagUserRequest method. -// req, resp := client.UntagUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagUser -func (c *IAM) UntagUserRequest(input *UntagUserInput) (req *request.Request, output *UntagUserOutput) { - op := &request.Operation{ - Name: opUntagUser, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagUserInput{} - } - - output = &UntagUserOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagUser API operation for AWS Identity and Access Management. -// -// Removes the specified tags from the user. For more information about tagging, -// see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation UntagUser for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagUser -func (c *IAM) UntagUser(input *UntagUserInput) (*UntagUserOutput, error) { - req, out := c.UntagUserRequest(input) - return out, req.Send() -} - -// UntagUserWithContext is the same as UntagUser with the addition of -// the ability to pass a context and additional request options. -// -// See UntagUser 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 *IAM) UntagUserWithContext(ctx aws.Context, input *UntagUserInput, opts ...request.Option) (*UntagUserOutput, error) { - req, out := c.UntagUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateAccessKey = "UpdateAccessKey" - -// UpdateAccessKeyRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAccessKey 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 UpdateAccessKey for more information on using the UpdateAccessKey -// 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 UpdateAccessKeyRequest method. -// req, resp := client.UpdateAccessKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateAccessKey -func (c *IAM) UpdateAccessKeyRequest(input *UpdateAccessKeyInput) (req *request.Request, output *UpdateAccessKeyOutput) { - op := &request.Operation{ - Name: opUpdateAccessKey, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateAccessKeyInput{} - } - - output = &UpdateAccessKeyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateAccessKey API operation for AWS Identity and Access Management. -// -// Changes the status of the specified access key from Active to Inactive, or -// vice versa. This operation can be used to disable a user's key as part of -// a key rotation workflow. -// -// If the UserName is not specified, the user name is determined implicitly -// based on the Amazon Web Services access key ID used to sign the request. -// If a temporary access key is used, then UserName is required. If a long-term -// key is assigned to the user, then UserName is not required. This operation -// works for access keys under the Amazon Web Services account. Consequently, -// you can use this operation to manage Amazon Web Services account root user -// credentials even if the Amazon Web Services account has no associated users. -// -// For information about rotating keys, see Managing keys and certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/ManagingCredentials.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation UpdateAccessKey for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateAccessKey -func (c *IAM) UpdateAccessKey(input *UpdateAccessKeyInput) (*UpdateAccessKeyOutput, error) { - req, out := c.UpdateAccessKeyRequest(input) - return out, req.Send() -} - -// UpdateAccessKeyWithContext is the same as UpdateAccessKey with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateAccessKey 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 *IAM) UpdateAccessKeyWithContext(ctx aws.Context, input *UpdateAccessKeyInput, opts ...request.Option) (*UpdateAccessKeyOutput, error) { - req, out := c.UpdateAccessKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateAccountPasswordPolicy = "UpdateAccountPasswordPolicy" - -// UpdateAccountPasswordPolicyRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAccountPasswordPolicy 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 UpdateAccountPasswordPolicy for more information on using the UpdateAccountPasswordPolicy -// 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 UpdateAccountPasswordPolicyRequest method. -// req, resp := client.UpdateAccountPasswordPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateAccountPasswordPolicy -func (c *IAM) UpdateAccountPasswordPolicyRequest(input *UpdateAccountPasswordPolicyInput) (req *request.Request, output *UpdateAccountPasswordPolicyOutput) { - op := &request.Operation{ - Name: opUpdateAccountPasswordPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateAccountPasswordPolicyInput{} - } - - output = &UpdateAccountPasswordPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateAccountPasswordPolicy API operation for AWS Identity and Access Management. -// -// Updates the password policy settings for the Amazon Web Services account. -// -// This operation does not support partial updates. No parameters are required, -// but if you do not specify a parameter, that parameter's value reverts to -// its default value. See the Request Parameters section for each parameter's -// default value. Also note that some parameters do not allow the default parameter -// to be explicitly set. Instead, to invoke the default value, do not include -// that parameter when you invoke the operation. -// -// For more information about using a password policy, see Managing an IAM password -// policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingPasswordPolicies.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation UpdateAccountPasswordPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument" -// The request was rejected because the policy document was malformed. The error -// message describes the specific error. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateAccountPasswordPolicy -func (c *IAM) UpdateAccountPasswordPolicy(input *UpdateAccountPasswordPolicyInput) (*UpdateAccountPasswordPolicyOutput, error) { - req, out := c.UpdateAccountPasswordPolicyRequest(input) - return out, req.Send() -} - -// UpdateAccountPasswordPolicyWithContext is the same as UpdateAccountPasswordPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateAccountPasswordPolicy 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 *IAM) UpdateAccountPasswordPolicyWithContext(ctx aws.Context, input *UpdateAccountPasswordPolicyInput, opts ...request.Option) (*UpdateAccountPasswordPolicyOutput, error) { - req, out := c.UpdateAccountPasswordPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateAssumeRolePolicy = "UpdateAssumeRolePolicy" - -// UpdateAssumeRolePolicyRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAssumeRolePolicy 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 UpdateAssumeRolePolicy for more information on using the UpdateAssumeRolePolicy -// 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 UpdateAssumeRolePolicyRequest method. -// req, resp := client.UpdateAssumeRolePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateAssumeRolePolicy -func (c *IAM) UpdateAssumeRolePolicyRequest(input *UpdateAssumeRolePolicyInput) (req *request.Request, output *UpdateAssumeRolePolicyOutput) { - op := &request.Operation{ - Name: opUpdateAssumeRolePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateAssumeRolePolicyInput{} - } - - output = &UpdateAssumeRolePolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateAssumeRolePolicy API operation for AWS Identity and Access Management. -// -// Updates the policy that grants an IAM entity permission to assume a role. -// This is typically referred to as the "role trust policy". For more information -// about roles, see Using roles to delegate permissions and federate identities -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/roles-toplevel.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 AWS Identity and Access Management's -// API operation UpdateAssumeRolePolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument" -// The request was rejected because the policy document was malformed. The error -// message describes the specific error. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeUnmodifiableEntityException "UnmodifiableEntity" -// The request was rejected because service-linked roles are protected Amazon -// Web Services resources. Only the service that depends on the service-linked -// role can modify or delete the role on your behalf. The error message includes -// the name of the service that depends on this service-linked role. You must -// request the change through that service. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateAssumeRolePolicy -func (c *IAM) UpdateAssumeRolePolicy(input *UpdateAssumeRolePolicyInput) (*UpdateAssumeRolePolicyOutput, error) { - req, out := c.UpdateAssumeRolePolicyRequest(input) - return out, req.Send() -} - -// UpdateAssumeRolePolicyWithContext is the same as UpdateAssumeRolePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateAssumeRolePolicy 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 *IAM) UpdateAssumeRolePolicyWithContext(ctx aws.Context, input *UpdateAssumeRolePolicyInput, opts ...request.Option) (*UpdateAssumeRolePolicyOutput, error) { - req, out := c.UpdateAssumeRolePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateGroup = "UpdateGroup" - -// UpdateGroupRequest generates a "aws/request.Request" representing the -// client's request for the UpdateGroup 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 UpdateGroup for more information on using the UpdateGroup -// 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 UpdateGroupRequest method. -// req, resp := client.UpdateGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateGroup -func (c *IAM) UpdateGroupRequest(input *UpdateGroupInput) (req *request.Request, output *UpdateGroupOutput) { - op := &request.Operation{ - Name: opUpdateGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateGroupInput{} - } - - output = &UpdateGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateGroup API operation for AWS Identity and Access Management. -// -// Updates the name and/or the path of the specified IAM group. -// -// You should understand the implications of changing a group's path or name. -// For more information, see Renaming users and groups (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_WorkingWithGroupsAndUsers.html) -// in the IAM User Guide. -// -// The person making the request (the principal), must have permission to change -// the role group with the old name and the new name. For example, to change -// the group named Managers to MGRs, the principal must have a policy that allows -// them to update both groups. If the principal has permission to update the -// Managers group, but not the MGRs group, then the update fails. For more information -// about permissions, see Access management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.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 AWS Identity and Access Management's -// API operation UpdateGroup for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateGroup -func (c *IAM) UpdateGroup(input *UpdateGroupInput) (*UpdateGroupOutput, error) { - req, out := c.UpdateGroupRequest(input) - return out, req.Send() -} - -// UpdateGroupWithContext is the same as UpdateGroup with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateGroup 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 *IAM) UpdateGroupWithContext(ctx aws.Context, input *UpdateGroupInput, opts ...request.Option) (*UpdateGroupOutput, error) { - req, out := c.UpdateGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateLoginProfile = "UpdateLoginProfile" - -// UpdateLoginProfileRequest generates a "aws/request.Request" representing the -// client's request for the UpdateLoginProfile 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 UpdateLoginProfile for more information on using the UpdateLoginProfile -// 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 UpdateLoginProfileRequest method. -// req, resp := client.UpdateLoginProfileRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateLoginProfile -func (c *IAM) UpdateLoginProfileRequest(input *UpdateLoginProfileInput) (req *request.Request, output *UpdateLoginProfileOutput) { - op := &request.Operation{ - Name: opUpdateLoginProfile, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateLoginProfileInput{} - } - - output = &UpdateLoginProfileOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateLoginProfile API operation for AWS Identity and Access Management. -// -// Changes the password for the specified IAM user. You can use the CLI, the -// Amazon Web Services API, or the Users page in the IAM console to change the -// password for any IAM user. Use ChangePassword to change your own password -// in the My Security Credentials page in the Amazon Web Services Management -// Console. -// -// For more information about modifying passwords, see Managing passwords (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingLogins.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation UpdateLoginProfile for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeEntityTemporarilyUnmodifiableException "EntityTemporarilyUnmodifiable" -// The request was rejected because it referenced an entity that is temporarily -// unmodifiable, such as a user name that was deleted and then recreated. The -// error indicates that the request is likely to succeed if you try again after -// waiting several minutes. The error message describes the entity. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodePasswordPolicyViolationException "PasswordPolicyViolation" -// The request was rejected because the provided password did not meet the requirements -// imposed by the account password policy. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateLoginProfile -func (c *IAM) UpdateLoginProfile(input *UpdateLoginProfileInput) (*UpdateLoginProfileOutput, error) { - req, out := c.UpdateLoginProfileRequest(input) - return out, req.Send() -} - -// UpdateLoginProfileWithContext is the same as UpdateLoginProfile with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateLoginProfile 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 *IAM) UpdateLoginProfileWithContext(ctx aws.Context, input *UpdateLoginProfileInput, opts ...request.Option) (*UpdateLoginProfileOutput, error) { - req, out := c.UpdateLoginProfileRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateOpenIDConnectProviderThumbprint = "UpdateOpenIDConnectProviderThumbprint" - -// UpdateOpenIDConnectProviderThumbprintRequest generates a "aws/request.Request" representing the -// client's request for the UpdateOpenIDConnectProviderThumbprint 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 UpdateOpenIDConnectProviderThumbprint for more information on using the UpdateOpenIDConnectProviderThumbprint -// 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 UpdateOpenIDConnectProviderThumbprintRequest method. -// req, resp := client.UpdateOpenIDConnectProviderThumbprintRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateOpenIDConnectProviderThumbprint -func (c *IAM) UpdateOpenIDConnectProviderThumbprintRequest(input *UpdateOpenIDConnectProviderThumbprintInput) (req *request.Request, output *UpdateOpenIDConnectProviderThumbprintOutput) { - op := &request.Operation{ - Name: opUpdateOpenIDConnectProviderThumbprint, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateOpenIDConnectProviderThumbprintInput{} - } - - output = &UpdateOpenIDConnectProviderThumbprintOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateOpenIDConnectProviderThumbprint API operation for AWS Identity and Access Management. -// -// Replaces the existing list of server certificate thumbprints associated with -// an OpenID Connect (OIDC) provider resource object with a new list of thumbprints. -// -// The list that you pass with this operation completely replaces the existing -// list of thumbprints. (The lists are not merged.) -// -// Typically, you need to update a thumbprint only when the identity provider -// certificate changes, which occurs rarely. However, if the provider's certificate -// does change, any attempt to assume an IAM role that specifies the OIDC provider -// as a principal fails until the certificate thumbprint is updated. -// -// Amazon Web Services secures communication with some OIDC identity providers -// (IdPs) through our library of trusted root certificate authorities (CAs) -// instead of using a certificate thumbprint to verify your IdP server certificate. -// In these cases, your legacy thumbprint remains in your configuration, but -// is no longer used for validation. These OIDC IdPs include Auth0, GitHub, -// GitLab, Google, and those that use an Amazon S3 bucket to host a JSON Web -// Key Set (JWKS) endpoint. -// -// Trust for the OIDC provider is derived from the provider certificate and -// is validated by the thumbprint. Therefore, it is best to limit access to -// the UpdateOpenIDConnectProviderThumbprint operation to highly privileged -// users. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation UpdateOpenIDConnectProviderThumbprint for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateOpenIDConnectProviderThumbprint -func (c *IAM) UpdateOpenIDConnectProviderThumbprint(input *UpdateOpenIDConnectProviderThumbprintInput) (*UpdateOpenIDConnectProviderThumbprintOutput, error) { - req, out := c.UpdateOpenIDConnectProviderThumbprintRequest(input) - return out, req.Send() -} - -// UpdateOpenIDConnectProviderThumbprintWithContext is the same as UpdateOpenIDConnectProviderThumbprint with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateOpenIDConnectProviderThumbprint 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 *IAM) UpdateOpenIDConnectProviderThumbprintWithContext(ctx aws.Context, input *UpdateOpenIDConnectProviderThumbprintInput, opts ...request.Option) (*UpdateOpenIDConnectProviderThumbprintOutput, error) { - req, out := c.UpdateOpenIDConnectProviderThumbprintRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateRole = "UpdateRole" - -// UpdateRoleRequest generates a "aws/request.Request" representing the -// client's request for the UpdateRole 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 UpdateRole for more information on using the UpdateRole -// 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 UpdateRoleRequest method. -// req, resp := client.UpdateRoleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateRole -func (c *IAM) UpdateRoleRequest(input *UpdateRoleInput) (req *request.Request, output *UpdateRoleOutput) { - op := &request.Operation{ - Name: opUpdateRole, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateRoleInput{} - } - - output = &UpdateRoleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateRole API operation for AWS Identity and Access Management. -// -// Updates the description or maximum session duration setting of a role. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation UpdateRole for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeUnmodifiableEntityException "UnmodifiableEntity" -// The request was rejected because service-linked roles are protected Amazon -// Web Services resources. Only the service that depends on the service-linked -// role can modify or delete the role on your behalf. The error message includes -// the name of the service that depends on this service-linked role. You must -// request the change through that service. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateRole -func (c *IAM) UpdateRole(input *UpdateRoleInput) (*UpdateRoleOutput, error) { - req, out := c.UpdateRoleRequest(input) - return out, req.Send() -} - -// UpdateRoleWithContext is the same as UpdateRole with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateRole 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 *IAM) UpdateRoleWithContext(ctx aws.Context, input *UpdateRoleInput, opts ...request.Option) (*UpdateRoleOutput, error) { - req, out := c.UpdateRoleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateRoleDescription = "UpdateRoleDescription" - -// UpdateRoleDescriptionRequest generates a "aws/request.Request" representing the -// client's request for the UpdateRoleDescription 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 UpdateRoleDescription for more information on using the UpdateRoleDescription -// 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 UpdateRoleDescriptionRequest method. -// req, resp := client.UpdateRoleDescriptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateRoleDescription -func (c *IAM) UpdateRoleDescriptionRequest(input *UpdateRoleDescriptionInput) (req *request.Request, output *UpdateRoleDescriptionOutput) { - op := &request.Operation{ - Name: opUpdateRoleDescription, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateRoleDescriptionInput{} - } - - output = &UpdateRoleDescriptionOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateRoleDescription API operation for AWS Identity and Access Management. -// -// Use UpdateRole instead. -// -// Modifies only the description of a role. This operation performs the same -// function as the Description parameter in the UpdateRole 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 AWS Identity and Access Management's -// API operation UpdateRoleDescription for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeUnmodifiableEntityException "UnmodifiableEntity" -// The request was rejected because service-linked roles are protected Amazon -// Web Services resources. Only the service that depends on the service-linked -// role can modify or delete the role on your behalf. The error message includes -// the name of the service that depends on this service-linked role. You must -// request the change through that service. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateRoleDescription -func (c *IAM) UpdateRoleDescription(input *UpdateRoleDescriptionInput) (*UpdateRoleDescriptionOutput, error) { - req, out := c.UpdateRoleDescriptionRequest(input) - return out, req.Send() -} - -// UpdateRoleDescriptionWithContext is the same as UpdateRoleDescription with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateRoleDescription 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 *IAM) UpdateRoleDescriptionWithContext(ctx aws.Context, input *UpdateRoleDescriptionInput, opts ...request.Option) (*UpdateRoleDescriptionOutput, error) { - req, out := c.UpdateRoleDescriptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateSAMLProvider = "UpdateSAMLProvider" - -// UpdateSAMLProviderRequest generates a "aws/request.Request" representing the -// client's request for the UpdateSAMLProvider 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 UpdateSAMLProvider for more information on using the UpdateSAMLProvider -// 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 UpdateSAMLProviderRequest method. -// req, resp := client.UpdateSAMLProviderRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateSAMLProvider -func (c *IAM) UpdateSAMLProviderRequest(input *UpdateSAMLProviderInput) (req *request.Request, output *UpdateSAMLProviderOutput) { - op := &request.Operation{ - Name: opUpdateSAMLProvider, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateSAMLProviderInput{} - } - - output = &UpdateSAMLProviderOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateSAMLProvider API operation for AWS Identity and Access Management. -// -// Updates the metadata document for an existing SAML provider resource object. -// -// This operation requires Signature Version 4 (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.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 AWS Identity and Access Management's -// API operation UpdateSAMLProvider for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateSAMLProvider -func (c *IAM) UpdateSAMLProvider(input *UpdateSAMLProviderInput) (*UpdateSAMLProviderOutput, error) { - req, out := c.UpdateSAMLProviderRequest(input) - return out, req.Send() -} - -// UpdateSAMLProviderWithContext is the same as UpdateSAMLProvider with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateSAMLProvider 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 *IAM) UpdateSAMLProviderWithContext(ctx aws.Context, input *UpdateSAMLProviderInput, opts ...request.Option) (*UpdateSAMLProviderOutput, error) { - req, out := c.UpdateSAMLProviderRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateSSHPublicKey = "UpdateSSHPublicKey" - -// UpdateSSHPublicKeyRequest generates a "aws/request.Request" representing the -// client's request for the UpdateSSHPublicKey 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 UpdateSSHPublicKey for more information on using the UpdateSSHPublicKey -// 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 UpdateSSHPublicKeyRequest method. -// req, resp := client.UpdateSSHPublicKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateSSHPublicKey -func (c *IAM) UpdateSSHPublicKeyRequest(input *UpdateSSHPublicKeyInput) (req *request.Request, output *UpdateSSHPublicKeyOutput) { - op := &request.Operation{ - Name: opUpdateSSHPublicKey, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateSSHPublicKeyInput{} - } - - output = &UpdateSSHPublicKeyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateSSHPublicKey API operation for AWS Identity and Access Management. -// -// Sets the status of an IAM user's SSH public key to active or inactive. SSH -// public keys that are inactive cannot be used for authentication. This operation -// can be used to disable a user's SSH public key as part of a key rotation -// work flow. -// -// The SSH public key affected by this operation is used only for authenticating -// the associated IAM user to an CodeCommit repository. For more information -// about using SSH keys to authenticate to an CodeCommit repository, see Set -// up CodeCommit for SSH connections (https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html) -// in the CodeCommit 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 AWS Identity and Access Management's -// API operation UpdateSSHPublicKey for usage and error information. -// -// Returned Error Codes: -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateSSHPublicKey -func (c *IAM) UpdateSSHPublicKey(input *UpdateSSHPublicKeyInput) (*UpdateSSHPublicKeyOutput, error) { - req, out := c.UpdateSSHPublicKeyRequest(input) - return out, req.Send() -} - -// UpdateSSHPublicKeyWithContext is the same as UpdateSSHPublicKey with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateSSHPublicKey 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 *IAM) UpdateSSHPublicKeyWithContext(ctx aws.Context, input *UpdateSSHPublicKeyInput, opts ...request.Option) (*UpdateSSHPublicKeyOutput, error) { - req, out := c.UpdateSSHPublicKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateServerCertificate = "UpdateServerCertificate" - -// UpdateServerCertificateRequest generates a "aws/request.Request" representing the -// client's request for the UpdateServerCertificate 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 UpdateServerCertificate for more information on using the UpdateServerCertificate -// 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 UpdateServerCertificateRequest method. -// req, resp := client.UpdateServerCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateServerCertificate -func (c *IAM) UpdateServerCertificateRequest(input *UpdateServerCertificateInput) (req *request.Request, output *UpdateServerCertificateOutput) { - op := &request.Operation{ - Name: opUpdateServerCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateServerCertificateInput{} - } - - output = &UpdateServerCertificateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateServerCertificate API operation for AWS Identity and Access Management. -// -// Updates the name and/or the path of the specified server certificate stored -// in IAM. -// -// For more information about working with server certificates, see Working -// with server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) -// in the IAM User Guide. This topic also includes a list of Amazon Web Services -// services that can use the server certificates that you manage with IAM. -// -// You should understand the implications of changing a server certificate's -// path or name. For more information, see Renaming a server certificate (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs_manage.html#RenamingServerCerts) -// in the IAM User Guide. -// -// The person making the request (the principal), must have permission to change -// the server certificate with the old name and the new name. For example, to -// change the certificate named ProductionCert to ProdCert, the principal must -// have a policy that allows them to update both certificates. If the principal -// has permission to update the ProductionCert group, but not the ProdCert certificate, -// then the update fails. For more information about permissions, see Access -// management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation UpdateServerCertificate for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateServerCertificate -func (c *IAM) UpdateServerCertificate(input *UpdateServerCertificateInput) (*UpdateServerCertificateOutput, error) { - req, out := c.UpdateServerCertificateRequest(input) - return out, req.Send() -} - -// UpdateServerCertificateWithContext is the same as UpdateServerCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateServerCertificate 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 *IAM) UpdateServerCertificateWithContext(ctx aws.Context, input *UpdateServerCertificateInput, opts ...request.Option) (*UpdateServerCertificateOutput, error) { - req, out := c.UpdateServerCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateServiceSpecificCredential = "UpdateServiceSpecificCredential" - -// UpdateServiceSpecificCredentialRequest generates a "aws/request.Request" representing the -// client's request for the UpdateServiceSpecificCredential 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 UpdateServiceSpecificCredential for more information on using the UpdateServiceSpecificCredential -// 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 UpdateServiceSpecificCredentialRequest method. -// req, resp := client.UpdateServiceSpecificCredentialRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateServiceSpecificCredential -func (c *IAM) UpdateServiceSpecificCredentialRequest(input *UpdateServiceSpecificCredentialInput) (req *request.Request, output *UpdateServiceSpecificCredentialOutput) { - op := &request.Operation{ - Name: opUpdateServiceSpecificCredential, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateServiceSpecificCredentialInput{} - } - - output = &UpdateServiceSpecificCredentialOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateServiceSpecificCredential API operation for AWS Identity and Access Management. -// -// Sets the status of a service-specific credential to Active or Inactive. Service-specific -// credentials that are inactive cannot be used for authentication to the service. -// This operation can be used to disable a user's service-specific credential -// as part of a credential rotation work flow. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation UpdateServiceSpecificCredential for usage and error information. -// -// Returned Error Codes: -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateServiceSpecificCredential -func (c *IAM) UpdateServiceSpecificCredential(input *UpdateServiceSpecificCredentialInput) (*UpdateServiceSpecificCredentialOutput, error) { - req, out := c.UpdateServiceSpecificCredentialRequest(input) - return out, req.Send() -} - -// UpdateServiceSpecificCredentialWithContext is the same as UpdateServiceSpecificCredential with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateServiceSpecificCredential 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 *IAM) UpdateServiceSpecificCredentialWithContext(ctx aws.Context, input *UpdateServiceSpecificCredentialInput, opts ...request.Option) (*UpdateServiceSpecificCredentialOutput, error) { - req, out := c.UpdateServiceSpecificCredentialRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateSigningCertificate = "UpdateSigningCertificate" - -// UpdateSigningCertificateRequest generates a "aws/request.Request" representing the -// client's request for the UpdateSigningCertificate 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 UpdateSigningCertificate for more information on using the UpdateSigningCertificate -// 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 UpdateSigningCertificateRequest method. -// req, resp := client.UpdateSigningCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateSigningCertificate -func (c *IAM) UpdateSigningCertificateRequest(input *UpdateSigningCertificateInput) (req *request.Request, output *UpdateSigningCertificateOutput) { - op := &request.Operation{ - Name: opUpdateSigningCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateSigningCertificateInput{} - } - - output = &UpdateSigningCertificateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateSigningCertificate API operation for AWS Identity and Access Management. -// -// Changes the status of the specified user signing certificate from active -// to disabled, or vice versa. This operation can be used to disable an IAM -// user's signing certificate as part of a certificate rotation work flow. -// -// If the UserName field is not specified, the user name is determined implicitly -// based on the Amazon Web Services access key ID used to sign the request. -// This operation works for access keys under the Amazon Web Services account. -// Consequently, you can use this operation to manage Amazon Web Services account -// root user credentials even if the Amazon Web Services account has no associated -// users. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Identity and Access Management's -// API operation UpdateSigningCertificate for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateSigningCertificate -func (c *IAM) UpdateSigningCertificate(input *UpdateSigningCertificateInput) (*UpdateSigningCertificateOutput, error) { - req, out := c.UpdateSigningCertificateRequest(input) - return out, req.Send() -} - -// UpdateSigningCertificateWithContext is the same as UpdateSigningCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateSigningCertificate 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 *IAM) UpdateSigningCertificateWithContext(ctx aws.Context, input *UpdateSigningCertificateInput, opts ...request.Option) (*UpdateSigningCertificateOutput, error) { - req, out := c.UpdateSigningCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateUser = "UpdateUser" - -// UpdateUserRequest generates a "aws/request.Request" representing the -// client's request for the UpdateUser 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 UpdateUser for more information on using the UpdateUser -// 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 UpdateUserRequest method. -// req, resp := client.UpdateUserRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateUser -func (c *IAM) UpdateUserRequest(input *UpdateUserInput) (req *request.Request, output *UpdateUserOutput) { - op := &request.Operation{ - Name: opUpdateUser, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UpdateUserInput{} - } - - output = &UpdateUserOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UpdateUser API operation for AWS Identity and Access Management. -// -// Updates the name and/or the path of the specified IAM user. -// -// You should understand the implications of changing an IAM user's path or -// name. For more information, see Renaming an IAM user (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_manage.html#id_users_renaming) -// and Renaming an IAM group (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups_manage_rename.html) -// in the IAM User Guide. -// -// To change a user name, the requester must have appropriate permissions on -// both the source object and the target object. For example, to change Bob -// to Robert, the entity making the request must have permission on Bob and -// Robert, or must have permission on all (*). For more information about permissions, -// see Permissions and policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/PermissionsAndPolicies.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 AWS Identity and Access Management's -// API operation UpdateUser for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeEntityTemporarilyUnmodifiableException "EntityTemporarilyUnmodifiable" -// The request was rejected because it referenced an entity that is temporarily -// unmodifiable, such as a user name that was deleted and then recreated. The -// error indicates that the request is likely to succeed if you try again after -// waiting several minutes. The error message describes the entity. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateUser -func (c *IAM) UpdateUser(input *UpdateUserInput) (*UpdateUserOutput, error) { - req, out := c.UpdateUserRequest(input) - return out, req.Send() -} - -// UpdateUserWithContext is the same as UpdateUser with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateUser 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 *IAM) UpdateUserWithContext(ctx aws.Context, input *UpdateUserInput, opts ...request.Option) (*UpdateUserOutput, error) { - req, out := c.UpdateUserRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUploadSSHPublicKey = "UploadSSHPublicKey" - -// UploadSSHPublicKeyRequest generates a "aws/request.Request" representing the -// client's request for the UploadSSHPublicKey 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 UploadSSHPublicKey for more information on using the UploadSSHPublicKey -// 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 UploadSSHPublicKeyRequest method. -// req, resp := client.UploadSSHPublicKeyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UploadSSHPublicKey -func (c *IAM) UploadSSHPublicKeyRequest(input *UploadSSHPublicKeyInput) (req *request.Request, output *UploadSSHPublicKeyOutput) { - op := &request.Operation{ - Name: opUploadSSHPublicKey, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UploadSSHPublicKeyInput{} - } - - output = &UploadSSHPublicKeyOutput{} - req = c.newRequest(op, input, output) - return -} - -// UploadSSHPublicKey API operation for AWS Identity and Access Management. -// -// Uploads an SSH public key and associates it with the specified IAM user. -// -// The SSH public key uploaded by this operation can be used only for authenticating -// the associated IAM user to an CodeCommit repository. For more information -// about using SSH keys to authenticate to an CodeCommit repository, see Set -// up CodeCommit for SSH connections (https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-credentials-ssh.html) -// in the CodeCommit 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 AWS Identity and Access Management's -// API operation UploadSSHPublicKey for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeInvalidPublicKeyException "InvalidPublicKey" -// The request was rejected because the public key is malformed or otherwise -// invalid. -// -// - ErrCodeDuplicateSSHPublicKeyException "DuplicateSSHPublicKey" -// The request was rejected because the SSH public key is already associated -// with the specified IAM user. -// -// - ErrCodeUnrecognizedPublicKeyEncodingException "UnrecognizedPublicKeyEncoding" -// The request was rejected because the public key encoding format is unsupported -// or unrecognized. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UploadSSHPublicKey -func (c *IAM) UploadSSHPublicKey(input *UploadSSHPublicKeyInput) (*UploadSSHPublicKeyOutput, error) { - req, out := c.UploadSSHPublicKeyRequest(input) - return out, req.Send() -} - -// UploadSSHPublicKeyWithContext is the same as UploadSSHPublicKey with the addition of -// the ability to pass a context and additional request options. -// -// See UploadSSHPublicKey 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 *IAM) UploadSSHPublicKeyWithContext(ctx aws.Context, input *UploadSSHPublicKeyInput, opts ...request.Option) (*UploadSSHPublicKeyOutput, error) { - req, out := c.UploadSSHPublicKeyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUploadServerCertificate = "UploadServerCertificate" - -// UploadServerCertificateRequest generates a "aws/request.Request" representing the -// client's request for the UploadServerCertificate 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 UploadServerCertificate for more information on using the UploadServerCertificate -// 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 UploadServerCertificateRequest method. -// req, resp := client.UploadServerCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UploadServerCertificate -func (c *IAM) UploadServerCertificateRequest(input *UploadServerCertificateInput) (req *request.Request, output *UploadServerCertificateOutput) { - op := &request.Operation{ - Name: opUploadServerCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UploadServerCertificateInput{} - } - - output = &UploadServerCertificateOutput{} - req = c.newRequest(op, input, output) - return -} - -// UploadServerCertificate API operation for AWS Identity and Access Management. -// -// Uploads a server certificate entity for the Amazon Web Services account. -// The server certificate entity includes a public key certificate, a private -// key, and an optional certificate chain, which should all be PEM-encoded. -// -// We recommend that you use Certificate Manager (https://docs.aws.amazon.com/acm/) -// to provision, manage, and deploy your server certificates. With ACM you can -// request a certificate, deploy it to Amazon Web Services resources, and let -// ACM handle certificate renewals for you. Certificates provided by ACM are -// free. For more information about using ACM, see the Certificate Manager User -// Guide (https://docs.aws.amazon.com/acm/latest/userguide/). -// -// For more information about working with server certificates, see Working -// with server certificates (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) -// in the IAM User Guide. This topic includes a list of Amazon Web Services -// services that can use the server certificates that you manage with IAM. -// -// For information about the number of server certificates you can upload, see -// IAM and STS quotas (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) -// in the IAM User Guide. -// -// Because the body of the public key certificate, private key, and the certificate -// chain can be large, you should use POST rather than GET when calling UploadServerCertificate. -// For information about setting up signatures and authorization through the -// API, see Signing Amazon Web Services API requests (https://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html) -// in the Amazon Web Services General Reference. For general information about -// using the Query API with IAM, see Calling the API by making HTTP query requests -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/programming.html) in the -// IAM 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 AWS Identity and Access Management's -// API operation UploadServerCertificate for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeInvalidInputException "InvalidInput" -// The request was rejected because an invalid or out-of-range value was supplied -// for an input parameter. -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeMalformedCertificateException "MalformedCertificate" -// The request was rejected because the certificate was malformed or expired. -// The error message describes the specific error. -// -// - ErrCodeKeyPairMismatchException "KeyPairMismatch" -// The request was rejected because the public key certificate and the private -// key do not match. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UploadServerCertificate -func (c *IAM) UploadServerCertificate(input *UploadServerCertificateInput) (*UploadServerCertificateOutput, error) { - req, out := c.UploadServerCertificateRequest(input) - return out, req.Send() -} - -// UploadServerCertificateWithContext is the same as UploadServerCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See UploadServerCertificate 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 *IAM) UploadServerCertificateWithContext(ctx aws.Context, input *UploadServerCertificateInput, opts ...request.Option) (*UploadServerCertificateOutput, error) { - req, out := c.UploadServerCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUploadSigningCertificate = "UploadSigningCertificate" - -// UploadSigningCertificateRequest generates a "aws/request.Request" representing the -// client's request for the UploadSigningCertificate 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 UploadSigningCertificate for more information on using the UploadSigningCertificate -// 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 UploadSigningCertificateRequest method. -// req, resp := client.UploadSigningCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UploadSigningCertificate -func (c *IAM) UploadSigningCertificateRequest(input *UploadSigningCertificateInput) (req *request.Request, output *UploadSigningCertificateOutput) { - op := &request.Operation{ - Name: opUploadSigningCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UploadSigningCertificateInput{} - } - - output = &UploadSigningCertificateOutput{} - req = c.newRequest(op, input, output) - return -} - -// UploadSigningCertificate API operation for AWS Identity and Access Management. -// -// Uploads an X.509 signing certificate and associates it with the specified -// IAM user. Some Amazon Web Services services require you to use certificates -// to validate requests that are signed with a corresponding private key. When -// you upload the certificate, its default status is Active. -// -// For information about when you would use an X.509 signing certificate, see -// Managing server certificates in IAM (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html) -// in the IAM User Guide. -// -// If the UserName is not specified, the IAM user name is determined implicitly -// based on the Amazon Web Services access key ID used to sign the request. -// This operation works for access keys under the Amazon Web Services account. -// Consequently, you can use this operation to manage Amazon Web Services account -// root user credentials even if the Amazon Web Services account has no associated -// users. -// -// Because the body of an X.509 certificate can be large, you should use POST -// rather than GET when calling UploadSigningCertificate. For information about -// setting up signatures and authorization through the API, see Signing Amazon -// Web Services API requests (https://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html) -// in the Amazon Web Services General Reference. For general information about -// using the Query API with IAM, see Making query requests (https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html) -// in the IAM 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 AWS Identity and Access Management's -// API operation UploadSigningCertificate for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLimitExceededException "LimitExceeded" -// The request was rejected because it attempted to create resources beyond -// the current Amazon Web Services account limits. The error message describes -// the limit exceeded. -// -// - ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" -// The request was rejected because it attempted to create a resource that already -// exists. -// -// - ErrCodeMalformedCertificateException "MalformedCertificate" -// The request was rejected because the certificate was malformed or expired. -// The error message describes the specific error. -// -// - ErrCodeInvalidCertificateException "InvalidCertificate" -// The request was rejected because the certificate is invalid. -// -// - ErrCodeDuplicateCertificateException "DuplicateCertificate" -// The request was rejected because the same certificate is associated with -// an IAM user in the account. -// -// - ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced a resource entity that does -// not exist. The error message describes the resource. -// -// - ErrCodeConcurrentModificationException "ConcurrentModification" -// The request was rejected because multiple requests to change this object -// were submitted simultaneously. Wait a few minutes and submit your request -// again. -// -// - ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UploadSigningCertificate -func (c *IAM) UploadSigningCertificate(input *UploadSigningCertificateInput) (*UploadSigningCertificateOutput, error) { - req, out := c.UploadSigningCertificateRequest(input) - return out, req.Send() -} - -// UploadSigningCertificateWithContext is the same as UploadSigningCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See UploadSigningCertificate 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 *IAM) UploadSigningCertificateWithContext(ctx aws.Context, input *UploadSigningCertificateInput, opts ...request.Option) (*UploadSigningCertificateOutput, error) { - req, out := c.UploadSigningCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// An object that contains details about when a principal in the reported Organizations -// entity last attempted to access an Amazon Web Services service. A principal -// can be an IAM user, an IAM role, or the Amazon Web Services account root -// user within the reported Organizations entity. -// -// This data type is a response element in the GetOrganizationsAccessReport -// operation. -type AccessDetail struct { - _ struct{} `type:"structure"` - - // The path of the Organizations entity (root, organizational unit, or account) - // from which an authenticated principal last attempted to access the service. - // Amazon Web Services does not report unauthenticated requests. - // - // This field is null if no principals (IAM users, IAM roles, or root user) - // in the reported Organizations entity attempted to access the service within - // the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). - EntityPath *string `min:"19" type:"string"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when an authenticated principal most recently attempted to access the service. - // Amazon Web Services does not report unauthenticated requests. - // - // This field is null if no principals in the reported Organizations entity - // attempted to access the service within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). - LastAuthenticatedTime *time.Time `type:"timestamp"` - - // The Region where the last service access attempt occurred. - // - // This field is null if no principals in the reported Organizations entity - // attempted to access the service within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). - Region *string `type:"string"` - - // The name of the service in which access was attempted. - // - // ServiceName is a required field - ServiceName *string `type:"string" required:"true"` - - // The namespace of the service in which access was attempted. - // - // To learn the service namespace of a service, see Actions, resources, and - // condition keys for Amazon Web Services services (https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html) - // in the Service Authorization Reference. Choose the name of the service to - // view details for that service. In the first paragraph, find the service prefix. - // For example, (service prefix: a4b). For more information about service namespaces, - // see Amazon Web Services service namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. - // - // ServiceNamespace is a required field - ServiceNamespace *string `min:"1" type:"string" required:"true"` - - // The number of accounts with authenticated principals (root user, IAM users, - // and IAM roles) that attempted to access the service in the tracking period. - TotalAuthenticatedEntities *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 AccessDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccessDetail) GoString() string { - return s.String() -} - -// SetEntityPath sets the EntityPath field's value. -func (s *AccessDetail) SetEntityPath(v string) *AccessDetail { - s.EntityPath = &v - return s -} - -// SetLastAuthenticatedTime sets the LastAuthenticatedTime field's value. -func (s *AccessDetail) SetLastAuthenticatedTime(v time.Time) *AccessDetail { - s.LastAuthenticatedTime = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *AccessDetail) SetRegion(v string) *AccessDetail { - s.Region = &v - return s -} - -// SetServiceName sets the ServiceName field's value. -func (s *AccessDetail) SetServiceName(v string) *AccessDetail { - s.ServiceName = &v - return s -} - -// SetServiceNamespace sets the ServiceNamespace field's value. -func (s *AccessDetail) SetServiceNamespace(v string) *AccessDetail { - s.ServiceNamespace = &v - return s -} - -// SetTotalAuthenticatedEntities sets the TotalAuthenticatedEntities field's value. -func (s *AccessDetail) SetTotalAuthenticatedEntities(v int64) *AccessDetail { - s.TotalAuthenticatedEntities = &v - return s -} - -// Contains information about an Amazon Web Services access key. -// -// This data type is used as a response element in the CreateAccessKey and ListAccessKeys -// operations. -// -// The SecretAccessKey value is returned only in response to CreateAccessKey. -// You can get a secret access key only when you first create an access key; -// you cannot recover the secret access key later. If you lose a secret access -// key, you must create a new access key. -type AccessKey struct { - _ struct{} `type:"structure"` - - // The ID for this access key. - // - // AccessKeyId is a required field - AccessKeyId *string `min:"16" type:"string" required:"true"` - - // The date when the access key was created. - CreateDate *time.Time `type:"timestamp"` - - // The secret key used to sign requests. - // - // SecretAccessKey is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by AccessKey's - // String and GoString methods. - // - // SecretAccessKey is a required field - SecretAccessKey *string `type:"string" required:"true" sensitive:"true"` - - // The status of the access key. Active means that the key is valid for API - // calls, while Inactive means it is not. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"StatusType"` - - // The name of the IAM user that the access key is associated with. - // - // UserName is a required field - UserName *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 AccessKey) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccessKey) GoString() string { - return s.String() -} - -// SetAccessKeyId sets the AccessKeyId field's value. -func (s *AccessKey) SetAccessKeyId(v string) *AccessKey { - s.AccessKeyId = &v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *AccessKey) SetCreateDate(v time.Time) *AccessKey { - s.CreateDate = &v - return s -} - -// SetSecretAccessKey sets the SecretAccessKey field's value. -func (s *AccessKey) SetSecretAccessKey(v string) *AccessKey { - s.SecretAccessKey = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *AccessKey) SetStatus(v string) *AccessKey { - s.Status = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *AccessKey) SetUserName(v string) *AccessKey { - s.UserName = &v - return s -} - -// Contains information about the last time an Amazon Web Services access key -// was used since IAM began tracking this information on April 22, 2015. -// -// This data type is used as a response element in the GetAccessKeyLastUsed -// operation. -type AccessKeyLastUsed struct { - _ struct{} `type:"structure"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the access key was most recently used. This field is null in the following - // situations: - // - // * The user does not have an access key. - // - // * An access key exists but has not been used since IAM began tracking - // this information. - // - // * There is no sign-in data associated with the user. - // - // LastUsedDate is a required field - LastUsedDate *time.Time `type:"timestamp" required:"true"` - - // The Amazon Web Services Region where this access key was most recently used. - // The value for this field is "N/A" in the following situations: - // - // * The user does not have an access key. - // - // * An access key exists but has not been used since IAM began tracking - // this information. - // - // * There is no sign-in data associated with the user. - // - // For more information about Amazon Web Services Regions, see Regions and endpoints - // (https://docs.aws.amazon.com/general/latest/gr/rande.html) in the Amazon - // Web Services General Reference. - // - // Region is a required field - Region *string `type:"string" required:"true"` - - // The name of the Amazon Web Services service with which this access key was - // most recently used. The value of this field is "N/A" in the following situations: - // - // * The user does not have an access key. - // - // * An access key exists but has not been used since IAM started tracking - // this information. - // - // * There is no sign-in data associated with the user. - // - // ServiceName is a required field - ServiceName *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 AccessKeyLastUsed) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccessKeyLastUsed) GoString() string { - return s.String() -} - -// SetLastUsedDate sets the LastUsedDate field's value. -func (s *AccessKeyLastUsed) SetLastUsedDate(v time.Time) *AccessKeyLastUsed { - s.LastUsedDate = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *AccessKeyLastUsed) SetRegion(v string) *AccessKeyLastUsed { - s.Region = &v - return s -} - -// SetServiceName sets the ServiceName field's value. -func (s *AccessKeyLastUsed) SetServiceName(v string) *AccessKeyLastUsed { - s.ServiceName = &v - return s -} - -// Contains information about an Amazon Web Services access key, without its -// secret key. -// -// This data type is used as a response element in the ListAccessKeys operation. -type AccessKeyMetadata struct { - _ struct{} `type:"structure"` - - // The ID for this access key. - AccessKeyId *string `min:"16" type:"string"` - - // The date when the access key was created. - CreateDate *time.Time `type:"timestamp"` - - // The status of the access key. Active means that the key is valid for API - // calls; Inactive means it is not. - Status *string `type:"string" enum:"StatusType"` - - // The name of the IAM user that the key is associated with. - UserName *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 AccessKeyMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccessKeyMetadata) GoString() string { - return s.String() -} - -// SetAccessKeyId sets the AccessKeyId field's value. -func (s *AccessKeyMetadata) SetAccessKeyId(v string) *AccessKeyMetadata { - s.AccessKeyId = &v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *AccessKeyMetadata) SetCreateDate(v time.Time) *AccessKeyMetadata { - s.CreateDate = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *AccessKeyMetadata) SetStatus(v string) *AccessKeyMetadata { - s.Status = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *AccessKeyMetadata) SetUserName(v string) *AccessKeyMetadata { - s.UserName = &v - return s -} - -type AddClientIDToOpenIDConnectProviderInput struct { - _ struct{} `type:"structure"` - - // The client ID (also known as audience) to add to the IAM OpenID Connect provider - // resource. - // - // ClientID is a required field - ClientID *string `min:"1" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the IAM OpenID Connect (OIDC) provider - // resource to add the client ID to. You can get a list of OIDC provider ARNs - // by using the ListOpenIDConnectProviders operation. - // - // OpenIDConnectProviderArn is a required field - OpenIDConnectProviderArn *string `min:"20" 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 AddClientIDToOpenIDConnectProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AddClientIDToOpenIDConnectProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddClientIDToOpenIDConnectProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddClientIDToOpenIDConnectProviderInput"} - if s.ClientID == nil { - invalidParams.Add(request.NewErrParamRequired("ClientID")) - } - if s.ClientID != nil && len(*s.ClientID) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientID", 1)) - } - if s.OpenIDConnectProviderArn == nil { - invalidParams.Add(request.NewErrParamRequired("OpenIDConnectProviderArn")) - } - if s.OpenIDConnectProviderArn != nil && len(*s.OpenIDConnectProviderArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("OpenIDConnectProviderArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientID sets the ClientID field's value. -func (s *AddClientIDToOpenIDConnectProviderInput) SetClientID(v string) *AddClientIDToOpenIDConnectProviderInput { - s.ClientID = &v - return s -} - -// SetOpenIDConnectProviderArn sets the OpenIDConnectProviderArn field's value. -func (s *AddClientIDToOpenIDConnectProviderInput) SetOpenIDConnectProviderArn(v string) *AddClientIDToOpenIDConnectProviderInput { - s.OpenIDConnectProviderArn = &v - return s -} - -type AddClientIDToOpenIDConnectProviderOutput 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 AddClientIDToOpenIDConnectProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AddClientIDToOpenIDConnectProviderOutput) GoString() string { - return s.String() -} - -type AddRoleToInstanceProfileInput struct { - _ struct{} `type:"structure"` - - // The name of the instance profile to update. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // InstanceProfileName is a required field - InstanceProfileName *string `min:"1" type:"string" required:"true"` - - // The name of the role to add. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *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 AddRoleToInstanceProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AddRoleToInstanceProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddRoleToInstanceProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddRoleToInstanceProfileInput"} - if s.InstanceProfileName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceProfileName")) - } - if s.InstanceProfileName != nil && len(*s.InstanceProfileName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InstanceProfileName", 1)) - } - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceProfileName sets the InstanceProfileName field's value. -func (s *AddRoleToInstanceProfileInput) SetInstanceProfileName(v string) *AddRoleToInstanceProfileInput { - s.InstanceProfileName = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *AddRoleToInstanceProfileInput) SetRoleName(v string) *AddRoleToInstanceProfileInput { - s.RoleName = &v - return s -} - -type AddRoleToInstanceProfileOutput 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 AddRoleToInstanceProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AddRoleToInstanceProfileOutput) GoString() string { - return s.String() -} - -type AddUserToGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the group to update. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // The name of the user to add. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *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 AddUserToGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AddUserToGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddUserToGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddUserToGroupInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *AddUserToGroupInput) SetGroupName(v string) *AddUserToGroupInput { - s.GroupName = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *AddUserToGroupInput) SetUserName(v string) *AddUserToGroupInput { - s.UserName = &v - return s -} - -type AddUserToGroupOutput 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 AddUserToGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AddUserToGroupOutput) GoString() string { - return s.String() -} - -type AttachGroupPolicyInput struct { - _ struct{} `type:"structure"` - - // The name (friendly name, not ARN) of the group to attach the policy to. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the IAM policy you want to attach. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicyArn is a required field - PolicyArn *string `min:"20" 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 AttachGroupPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AttachGroupPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttachGroupPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachGroupPolicyInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *AttachGroupPolicyInput) SetGroupName(v string) *AttachGroupPolicyInput { - s.GroupName = &v - return s -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *AttachGroupPolicyInput) SetPolicyArn(v string) *AttachGroupPolicyInput { - s.PolicyArn = &v - return s -} - -type AttachGroupPolicyOutput 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 AttachGroupPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AttachGroupPolicyOutput) GoString() string { - return s.String() -} - -type AttachRolePolicyInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the IAM policy you want to attach. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicyArn is a required field - PolicyArn *string `min:"20" type:"string" required:"true"` - - // The name (friendly name, not ARN) of the role to attach the policy to. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *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 AttachRolePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AttachRolePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttachRolePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachRolePolicyInput"} - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *AttachRolePolicyInput) SetPolicyArn(v string) *AttachRolePolicyInput { - s.PolicyArn = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *AttachRolePolicyInput) SetRoleName(v string) *AttachRolePolicyInput { - s.RoleName = &v - return s -} - -type AttachRolePolicyOutput 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 AttachRolePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AttachRolePolicyOutput) GoString() string { - return s.String() -} - -type AttachUserPolicyInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the IAM policy you want to attach. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicyArn is a required field - PolicyArn *string `min:"20" type:"string" required:"true"` - - // The name (friendly name, not ARN) of the IAM user to attach the policy to. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *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 AttachUserPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AttachUserPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttachUserPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachUserPolicyInput"} - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *AttachUserPolicyInput) SetPolicyArn(v string) *AttachUserPolicyInput { - s.PolicyArn = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *AttachUserPolicyInput) SetUserName(v string) *AttachUserPolicyInput { - s.UserName = &v - return s -} - -type AttachUserPolicyOutput 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 AttachUserPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AttachUserPolicyOutput) GoString() string { - return s.String() -} - -// Contains information about an attached permissions boundary. -// -// An attached permissions boundary is a managed policy that has been attached -// to a user or role to set the permissions boundary. -// -// For more information about permissions boundaries, see Permissions boundaries -// for IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) -// in the IAM User Guide. -type AttachedPermissionsBoundary struct { - _ struct{} `type:"structure"` - - // The ARN of the policy used to set the permissions boundary for the user or - // role. - PermissionsBoundaryArn *string `min:"20" type:"string"` - - // The permissions boundary usage type that indicates what type of IAM resource - // is used as the permissions boundary for an entity. This data type can only - // have a value of Policy. - PermissionsBoundaryType *string `type:"string" enum:"PermissionsBoundaryAttachmentType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AttachedPermissionsBoundary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AttachedPermissionsBoundary) GoString() string { - return s.String() -} - -// SetPermissionsBoundaryArn sets the PermissionsBoundaryArn field's value. -func (s *AttachedPermissionsBoundary) SetPermissionsBoundaryArn(v string) *AttachedPermissionsBoundary { - s.PermissionsBoundaryArn = &v - return s -} - -// SetPermissionsBoundaryType sets the PermissionsBoundaryType field's value. -func (s *AttachedPermissionsBoundary) SetPermissionsBoundaryType(v string) *AttachedPermissionsBoundary { - s.PermissionsBoundaryType = &v - return s -} - -// Contains information about an attached policy. -// -// An attached policy is a managed policy that has been attached to a user, -// group, or role. This data type is used as a response element in the ListAttachedGroupPolicies, -// ListAttachedRolePolicies, ListAttachedUserPolicies, and GetAccountAuthorizationDetails -// operations. -// -// For more information about managed policies, refer to Managed policies and -// inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -type AttachedPolicy struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web - // Services resources. - // - // For more information about ARNs, go to Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - PolicyArn *string `min:"20" type:"string"` - - // The friendly name of the attached policy. - PolicyName *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 AttachedPolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AttachedPolicy) GoString() string { - return s.String() -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *AttachedPolicy) SetPolicyArn(v string) *AttachedPolicy { - s.PolicyArn = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *AttachedPolicy) SetPolicyName(v string) *AttachedPolicy { - s.PolicyName = &v - return s -} - -type ChangePasswordInput struct { - _ struct{} `type:"structure"` - - // The new password. The new password must conform to the Amazon Web Services - // account's password policy, if one exists. - // - // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate - // this parameter is a string of characters. That string can include almost - // any printable ASCII character from the space (\u0020) through the end of - // the ASCII character range (\u00FF). You can also include the tab (\u0009), - // line feed (\u000A), and carriage return (\u000D) characters. Any of these - // characters are valid in a password. However, many tools, such as the Amazon - // Web Services Management Console, might restrict the ability to type certain - // characters because they have special meaning within that tool. - // - // NewPassword is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by ChangePasswordInput's - // String and GoString methods. - // - // NewPassword is a required field - NewPassword *string `min:"1" type:"string" required:"true" sensitive:"true"` - - // The IAM user's current password. - // - // OldPassword is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by ChangePasswordInput's - // String and GoString methods. - // - // OldPassword is a required field - OldPassword *string `min:"1" type:"string" required:"true" sensitive:"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 ChangePasswordInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ChangePasswordInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ChangePasswordInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ChangePasswordInput"} - if s.NewPassword == nil { - invalidParams.Add(request.NewErrParamRequired("NewPassword")) - } - if s.NewPassword != nil && len(*s.NewPassword) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NewPassword", 1)) - } - if s.OldPassword == nil { - invalidParams.Add(request.NewErrParamRequired("OldPassword")) - } - if s.OldPassword != nil && len(*s.OldPassword) < 1 { - invalidParams.Add(request.NewErrParamMinLen("OldPassword", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNewPassword sets the NewPassword field's value. -func (s *ChangePasswordInput) SetNewPassword(v string) *ChangePasswordInput { - s.NewPassword = &v - return s -} - -// SetOldPassword sets the OldPassword field's value. -func (s *ChangePasswordInput) SetOldPassword(v string) *ChangePasswordInput { - s.OldPassword = &v - return s -} - -type ChangePasswordOutput 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 ChangePasswordOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ChangePasswordOutput) GoString() string { - return s.String() -} - -// Contains information about a condition context key. It includes the name -// of the key and specifies the value (or values, if the context key supports -// multiple values) to use in the simulation. This information is used when -// evaluating the Condition elements of the input policies. -// -// This data type is used as an input parameter to SimulateCustomPolicy and -// SimulatePrincipalPolicy. -type ContextEntry struct { - _ struct{} `type:"structure"` - - // The full name of a condition context key, including the service prefix. For - // example, aws:SourceIp or s3:VersionId. - ContextKeyName *string `min:"5" type:"string"` - - // The data type of the value (or values) specified in the ContextKeyValues - // parameter. - ContextKeyType *string `type:"string" enum:"ContextKeyTypeEnum"` - - // The value (or values, if the condition context key supports multiple values) - // to provide to the simulation when the key is referenced by a Condition element - // in an input policy. - ContextKeyValues []*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 ContextEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ContextEntry) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ContextEntry) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ContextEntry"} - if s.ContextKeyName != nil && len(*s.ContextKeyName) < 5 { - invalidParams.Add(request.NewErrParamMinLen("ContextKeyName", 5)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContextKeyName sets the ContextKeyName field's value. -func (s *ContextEntry) SetContextKeyName(v string) *ContextEntry { - s.ContextKeyName = &v - return s -} - -// SetContextKeyType sets the ContextKeyType field's value. -func (s *ContextEntry) SetContextKeyType(v string) *ContextEntry { - s.ContextKeyType = &v - return s -} - -// SetContextKeyValues sets the ContextKeyValues field's value. -func (s *ContextEntry) SetContextKeyValues(v []*string) *ContextEntry { - s.ContextKeyValues = v - return s -} - -type CreateAccessKeyInput struct { - _ struct{} `type:"structure"` - - // The name of the IAM user that the new key will belong to. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - UserName *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 CreateAccessKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateAccessKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateAccessKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateAccessKeyInput"} - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUserName sets the UserName field's value. -func (s *CreateAccessKeyInput) SetUserName(v string) *CreateAccessKeyInput { - s.UserName = &v - return s -} - -// Contains the response to a successful CreateAccessKey request. -type CreateAccessKeyOutput struct { - _ struct{} `type:"structure"` - - // A structure with details about the access key. - // - // AccessKey is a required field - AccessKey *AccessKey `type:"structure" 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 CreateAccessKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateAccessKeyOutput) GoString() string { - return s.String() -} - -// SetAccessKey sets the AccessKey field's value. -func (s *CreateAccessKeyOutput) SetAccessKey(v *AccessKey) *CreateAccessKeyOutput { - s.AccessKey = v - return s -} - -type CreateAccountAliasInput struct { - _ struct{} `type:"structure"` - - // The account alias to create. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of lowercase letters, digits, and dashes. - // You cannot start or finish with a dash, nor can you have two dashes in a - // row. - // - // AccountAlias is a required field - AccountAlias *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 CreateAccountAliasInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateAccountAliasInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateAccountAliasInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateAccountAliasInput"} - if s.AccountAlias == nil { - invalidParams.Add(request.NewErrParamRequired("AccountAlias")) - } - if s.AccountAlias != nil && len(*s.AccountAlias) < 3 { - invalidParams.Add(request.NewErrParamMinLen("AccountAlias", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountAlias sets the AccountAlias field's value. -func (s *CreateAccountAliasInput) SetAccountAlias(v string) *CreateAccountAliasInput { - s.AccountAlias = &v - return s -} - -type CreateAccountAliasOutput 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 CreateAccountAliasOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateAccountAliasOutput) GoString() string { - return s.String() -} - -type CreateGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the group to create. Do not include the path in this value. - // - // IAM user, group, role, and policy names must be unique within the account. - // Names are not distinguished by case. For example, you cannot create resources - // named both "MyResource" and "myresource". - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // The path to the group. For more information about paths, see IAM identifiers - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // This parameter is optional. If it is not included, it defaults to a slash - // (/). - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. - 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 CreateGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateGroupInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.Path != nil && len(*s.Path) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Path", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *CreateGroupInput) SetGroupName(v string) *CreateGroupInput { - s.GroupName = &v - return s -} - -// SetPath sets the Path field's value. -func (s *CreateGroupInput) SetPath(v string) *CreateGroupInput { - s.Path = &v - return s -} - -// Contains the response to a successful CreateGroup request. -type CreateGroupOutput struct { - _ struct{} `type:"structure"` - - // A structure containing details about the new group. - // - // Group is a required field - Group *Group `type:"structure" 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 CreateGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateGroupOutput) GoString() string { - return s.String() -} - -// SetGroup sets the Group field's value. -func (s *CreateGroupOutput) SetGroup(v *Group) *CreateGroupOutput { - s.Group = v - return s -} - -type CreateInstanceProfileInput struct { - _ struct{} `type:"structure"` - - // The name of the instance profile to create. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // InstanceProfileName is a required field - InstanceProfileName *string `min:"1" type:"string" required:"true"` - - // The path to the instance profile. For more information about paths, see IAM - // Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // This parameter is optional. If it is not included, it defaults to a slash - // (/). - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. - Path *string `min:"1" type:"string"` - - // A list of tags that you want to attach to the newly created IAM instance - // profile. Each tag consists of a key name and an associated value. For more - // information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - // - // If any one of the tags is invalid or if you exceed the allowed maximum number - // of tags, then the entire request fails and the resource is not created. - 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 CreateInstanceProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateInstanceProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateInstanceProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateInstanceProfileInput"} - if s.InstanceProfileName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceProfileName")) - } - if s.InstanceProfileName != nil && len(*s.InstanceProfileName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InstanceProfileName", 1)) - } - if s.Path != nil && len(*s.Path) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Path", 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 -} - -// SetInstanceProfileName sets the InstanceProfileName field's value. -func (s *CreateInstanceProfileInput) SetInstanceProfileName(v string) *CreateInstanceProfileInput { - s.InstanceProfileName = &v - return s -} - -// SetPath sets the Path field's value. -func (s *CreateInstanceProfileInput) SetPath(v string) *CreateInstanceProfileInput { - s.Path = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateInstanceProfileInput) SetTags(v []*Tag) *CreateInstanceProfileInput { - s.Tags = v - return s -} - -// Contains the response to a successful CreateInstanceProfile request. -type CreateInstanceProfileOutput struct { - _ struct{} `type:"structure"` - - // A structure containing details about the new instance profile. - // - // InstanceProfile is a required field - InstanceProfile *InstanceProfile `type:"structure" 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 CreateInstanceProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateInstanceProfileOutput) GoString() string { - return s.String() -} - -// SetInstanceProfile sets the InstanceProfile field's value. -func (s *CreateInstanceProfileOutput) SetInstanceProfile(v *InstanceProfile) *CreateInstanceProfileOutput { - s.InstanceProfile = v - return s -} - -type CreateLoginProfileInput struct { - _ struct{} `type:"structure"` - - // The new password for the user. - // - // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate - // this parameter is a string of characters. That string can include almost - // any printable ASCII character from the space (\u0020) through the end of - // the ASCII character range (\u00FF). You can also include the tab (\u0009), - // line feed (\u000A), and carriage return (\u000D) characters. Any of these - // characters are valid in a password. However, many tools, such as the Amazon - // Web Services Management Console, might restrict the ability to type certain - // characters because they have special meaning within that tool. - // - // Password is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by CreateLoginProfileInput's - // String and GoString methods. - // - // Password is a required field - Password *string `min:"1" type:"string" required:"true" sensitive:"true"` - - // Specifies whether the user is required to set a new password on next sign-in. - PasswordResetRequired *bool `type:"boolean"` - - // The name of the IAM user to create a password for. The user must already - // exist. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *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 CreateLoginProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateLoginProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLoginProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLoginProfileInput"} - if s.Password == nil { - invalidParams.Add(request.NewErrParamRequired("Password")) - } - if s.Password != nil && len(*s.Password) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Password", 1)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPassword sets the Password field's value. -func (s *CreateLoginProfileInput) SetPassword(v string) *CreateLoginProfileInput { - s.Password = &v - return s -} - -// SetPasswordResetRequired sets the PasswordResetRequired field's value. -func (s *CreateLoginProfileInput) SetPasswordResetRequired(v bool) *CreateLoginProfileInput { - s.PasswordResetRequired = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *CreateLoginProfileInput) SetUserName(v string) *CreateLoginProfileInput { - s.UserName = &v - return s -} - -// Contains the response to a successful CreateLoginProfile request. -type CreateLoginProfileOutput struct { - _ struct{} `type:"structure"` - - // A structure containing the user name and password create date. - // - // LoginProfile is a required field - LoginProfile *LoginProfile `type:"structure" 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 CreateLoginProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateLoginProfileOutput) GoString() string { - return s.String() -} - -// SetLoginProfile sets the LoginProfile field's value. -func (s *CreateLoginProfileOutput) SetLoginProfile(v *LoginProfile) *CreateLoginProfileOutput { - s.LoginProfile = v - return s -} - -type CreateOpenIDConnectProviderInput struct { - _ struct{} `type:"structure"` - - // Provides a list of client IDs, also known as audiences. When a mobile or - // web app registers with an OpenID Connect provider, they establish a value - // that identifies the application. This is the value that's sent as the client_id - // parameter on OAuth requests. - // - // You can register multiple client IDs with the same provider. For example, - // you might have multiple applications that use the same OIDC provider. You - // cannot register more than 100 client IDs with a single IAM OIDC provider. - // - // There is no defined format for a client ID. The CreateOpenIDConnectProviderRequest - // operation accepts client IDs up to 255 characters long. - ClientIDList []*string `type:"list"` - - // A list of tags that you want to attach to the new IAM OpenID Connect (OIDC) - // provider. Each tag consists of a key name and an associated value. For more - // information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - // - // If any one of the tags is invalid or if you exceed the allowed maximum number - // of tags, then the entire request fails and the resource is not created. - Tags []*Tag `type:"list"` - - // A list of server certificate thumbprints for the OpenID Connect (OIDC) identity - // provider's server certificates. Typically this list includes only one entry. - // However, IAM lets you have up to five thumbprints for an OIDC provider. This - // lets you maintain multiple thumbprints if the identity provider is rotating - // certificates. - // - // This parameter is optional. If it is not included, IAM will retrieve and - // use the top intermediate certificate authority (CA) thumbprint of the OpenID - // Connect identity provider server certificate. - // - // The server certificate thumbprint is the hex-encoded SHA-1 hash value of - // the X.509 certificate used by the domain where the OpenID Connect provider - // makes its keys available. It is always a 40-character string. - // - // For example, assume that the OIDC provider is server.example.com and the - // provider stores its keys at https://keys.server.example.com/openid-connect. - // In that case, the thumbprint string would be the hex-encoded SHA-1 hash value - // of the certificate used by https://keys.server.example.com. - // - // For more information about obtaining the OIDC provider thumbprint, see Obtaining - // the thumbprint for an OpenID Connect provider (https://docs.aws.amazon.com/IAM/latest/UserGuide/identity-providers-oidc-obtain-thumbprint.html) - // in the IAM user Guide. - ThumbprintList []*string `type:"list"` - - // The URL of the identity provider. The URL must begin with https:// and should - // correspond to the iss claim in the provider's OpenID Connect ID tokens. Per - // the OIDC standard, path components are allowed but query parameters are not. - // Typically the URL consists of only a hostname, like https://server.example.org - // or https://example.com. The URL should not contain a port number. - // - // You cannot register the same provider multiple times in a single Amazon Web - // Services account. If you try to submit a URL that has already been used for - // an OpenID Connect provider in the Amazon Web Services account, you will get - // an error. - // - // Url is a required field - Url *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 CreateOpenIDConnectProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateOpenIDConnectProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateOpenIDConnectProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateOpenIDConnectProviderInput"} - if s.Url == nil { - invalidParams.Add(request.NewErrParamRequired("Url")) - } - if s.Url != nil && len(*s.Url) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Url", 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 -} - -// SetClientIDList sets the ClientIDList field's value. -func (s *CreateOpenIDConnectProviderInput) SetClientIDList(v []*string) *CreateOpenIDConnectProviderInput { - s.ClientIDList = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateOpenIDConnectProviderInput) SetTags(v []*Tag) *CreateOpenIDConnectProviderInput { - s.Tags = v - return s -} - -// SetThumbprintList sets the ThumbprintList field's value. -func (s *CreateOpenIDConnectProviderInput) SetThumbprintList(v []*string) *CreateOpenIDConnectProviderInput { - s.ThumbprintList = v - return s -} - -// SetUrl sets the Url field's value. -func (s *CreateOpenIDConnectProviderInput) SetUrl(v string) *CreateOpenIDConnectProviderInput { - s.Url = &v - return s -} - -// Contains the response to a successful CreateOpenIDConnectProvider request. -type CreateOpenIDConnectProviderOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the new IAM OpenID Connect provider that - // is created. For more information, see OpenIDConnectProviderListEntry. - OpenIDConnectProviderArn *string `min:"20" type:"string"` - - // A list of tags that are attached to the new IAM OIDC provider. The returned - // list of tags is sorted by tag key. For more information about tagging, see - // Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User 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 CreateOpenIDConnectProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateOpenIDConnectProviderOutput) GoString() string { - return s.String() -} - -// SetOpenIDConnectProviderArn sets the OpenIDConnectProviderArn field's value. -func (s *CreateOpenIDConnectProviderOutput) SetOpenIDConnectProviderArn(v string) *CreateOpenIDConnectProviderOutput { - s.OpenIDConnectProviderArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateOpenIDConnectProviderOutput) SetTags(v []*Tag) *CreateOpenIDConnectProviderOutput { - s.Tags = v - return s -} - -type CreatePolicyInput struct { - _ struct{} `type:"structure"` - - // A friendly description of the policy. - // - // Typically used to store information about the permissions defined in the - // policy. For example, "Grants access to production DynamoDB tables." - // - // The policy description is immutable. After a value is assigned, it cannot - // be changed. - Description *string `type:"string"` - - // The path for the policy. - // - // For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // This parameter is optional. If it is not included, it defaults to a slash - // (/). - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. - // - // You cannot use an asterisk (*) in the path name. - Path *string `min:"1" type:"string"` - - // The JSON policy document that you want to use as the content for the new - // policy. - // - // You must provide policies in JSON format in IAM. However, for CloudFormation - // templates formatted in YAML, you can provide the policy in JSON or YAML format. - // CloudFormation always converts a YAML policy to JSON format before submitting - // it to IAM. - // - // The maximum length of the policy document that you can pass in this operation, - // including whitespace, is listed below. To view the maximum character counts - // of a managed policy with no whitespaces, see IAM and STS character quotas - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length). - // - // To learn more about JSON policy grammar, see Grammar of the IAM JSON policy - // language (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_grammar.html) - // in the IAM User Guide. - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // PolicyDocument is a required field - PolicyDocument *string `min:"1" type:"string" required:"true"` - - // The friendly name of the policy. - // - // IAM user, group, role, and policy names must be unique within the account. - // Names are not distinguished by case. For example, you cannot create resources - // named both "MyResource" and "myresource". - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` - - // A list of tags that you want to attach to the new IAM customer managed policy. - // Each tag consists of a key name and an associated value. For more information - // about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - // - // If any one of the tags is invalid or if you exceed the allowed maximum number - // of tags, then the entire request fails and the resource is not created. - 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 CreatePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreatePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePolicyInput"} - if s.Path != nil && len(*s.Path) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Path", 1)) - } - if s.PolicyDocument == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyDocument")) - } - if s.PolicyDocument != nil && len(*s.PolicyDocument) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyDocument", 1)) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 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 -} - -// SetDescription sets the Description field's value. -func (s *CreatePolicyInput) SetDescription(v string) *CreatePolicyInput { - s.Description = &v - return s -} - -// SetPath sets the Path field's value. -func (s *CreatePolicyInput) SetPath(v string) *CreatePolicyInput { - s.Path = &v - return s -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *CreatePolicyInput) SetPolicyDocument(v string) *CreatePolicyInput { - s.PolicyDocument = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *CreatePolicyInput) SetPolicyName(v string) *CreatePolicyInput { - s.PolicyName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreatePolicyInput) SetTags(v []*Tag) *CreatePolicyInput { - s.Tags = v - return s -} - -// Contains the response to a successful CreatePolicy request. -type CreatePolicyOutput struct { - _ struct{} `type:"structure"` - - // A structure containing details about the new policy. - Policy *Policy `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 CreatePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreatePolicyOutput) GoString() string { - return s.String() -} - -// SetPolicy sets the Policy field's value. -func (s *CreatePolicyOutput) SetPolicy(v *Policy) *CreatePolicyOutput { - s.Policy = v - return s -} - -type CreatePolicyVersionInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the IAM policy to which you want to add - // a new version. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicyArn is a required field - PolicyArn *string `min:"20" type:"string" required:"true"` - - // The JSON policy document that you want to use as the content for this new - // version of the policy. - // - // You must provide policies in JSON format in IAM. However, for CloudFormation - // templates formatted in YAML, you can provide the policy in JSON or YAML format. - // CloudFormation always converts a YAML policy to JSON format before submitting - // it to IAM. - // - // The maximum length of the policy document that you can pass in this operation, - // including whitespace, is listed below. To view the maximum character counts - // of a managed policy with no whitespaces, see IAM and STS character quotas - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length). - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // PolicyDocument is a required field - PolicyDocument *string `min:"1" type:"string" required:"true"` - - // Specifies whether to set this version as the policy's default version. - // - // When this parameter is true, the new policy version becomes the operative - // version. That is, it becomes the version that is in effect for the IAM users, - // groups, and roles that the policy is attached to. - // - // For more information about managed policy versions, see Versioning for managed - // policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) - // in the IAM User Guide. - SetAsDefault *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 CreatePolicyVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreatePolicyVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePolicyVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePolicyVersionInput"} - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - if s.PolicyDocument == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyDocument")) - } - if s.PolicyDocument != nil && len(*s.PolicyDocument) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyDocument", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *CreatePolicyVersionInput) SetPolicyArn(v string) *CreatePolicyVersionInput { - s.PolicyArn = &v - return s -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *CreatePolicyVersionInput) SetPolicyDocument(v string) *CreatePolicyVersionInput { - s.PolicyDocument = &v - return s -} - -// SetSetAsDefault sets the SetAsDefault field's value. -func (s *CreatePolicyVersionInput) SetSetAsDefault(v bool) *CreatePolicyVersionInput { - s.SetAsDefault = &v - return s -} - -// Contains the response to a successful CreatePolicyVersion request. -type CreatePolicyVersionOutput struct { - _ struct{} `type:"structure"` - - // A structure containing details about the new policy version. - PolicyVersion *PolicyVersion `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 CreatePolicyVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreatePolicyVersionOutput) GoString() string { - return s.String() -} - -// SetPolicyVersion sets the PolicyVersion field's value. -func (s *CreatePolicyVersionOutput) SetPolicyVersion(v *PolicyVersion) *CreatePolicyVersionOutput { - s.PolicyVersion = v - return s -} - -type CreateRoleInput struct { - _ struct{} `type:"structure"` - - // The trust relationship policy document that grants an entity permission to - // assume the role. - // - // In IAM, you must provide a JSON policy that has been converted to a string. - // However, for CloudFormation templates formatted in YAML, you can provide - // the policy in JSON or YAML format. CloudFormation always converts a YAML - // policy to JSON format before submitting it to IAM. - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // Upon success, the response includes the same trust policy in JSON format. - // - // AssumeRolePolicyDocument is a required field - AssumeRolePolicyDocument *string `min:"1" type:"string" required:"true"` - - // A description of the role. - Description *string `type:"string"` - - // The maximum session duration (in seconds) that you want to set for the specified - // role. If you do not specify a value for this setting, the default value of - // one hour is applied. This setting can have a value from 1 hour to 12 hours. - // - // Anyone who assumes the role from the CLI or API can use the DurationSeconds - // API parameter or the duration-seconds CLI parameter to request a longer session. - // The MaxSessionDuration setting determines the maximum duration that can be - // requested using the DurationSeconds parameter. If users don't specify a value - // for the DurationSeconds parameter, their security credentials are valid for - // one hour by default. This applies when you use the AssumeRole* API operations - // or the assume-role* CLI operations but does not apply when you use those - // operations to create a console URL. For more information, see Using IAM roles - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html) in the - // IAM User Guide. - MaxSessionDuration *int64 `min:"3600" type:"integer"` - - // The path to the role. For more information about paths, see IAM Identifiers - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // This parameter is optional. If it is not included, it defaults to a slash - // (/). - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. - Path *string `min:"1" type:"string"` - - // The ARN of the managed policy that is used to set the permissions boundary - // for the role. - // - // A permissions boundary policy defines the maximum permissions that identity-based - // policies can grant to an entity, but does not grant permissions. Permissions - // boundaries do not define the maximum permissions that a resource-based policy - // can grant to an entity. To learn more, see Permissions boundaries for IAM - // entities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. - // - // For more information about policy types, see Policy types (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types) - // in the IAM User Guide. - PermissionsBoundary *string `min:"20" type:"string"` - - // The name of the role to create. - // - // IAM user, group, role, and policy names must be unique within the account. - // Names are not distinguished by case. For example, you cannot create resources - // named both "MyResource" and "myresource". - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *string `min:"1" type:"string" required:"true"` - - // A list of tags that you want to attach to the new role. Each tag consists - // of a key name and an associated value. For more information about tagging, - // see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - // - // If any one of the tags is invalid or if you exceed the allowed maximum number - // of tags, then the entire request fails and the resource is not created. - 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 CreateRoleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateRoleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateRoleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateRoleInput"} - if s.AssumeRolePolicyDocument == nil { - invalidParams.Add(request.NewErrParamRequired("AssumeRolePolicyDocument")) - } - if s.AssumeRolePolicyDocument != nil && len(*s.AssumeRolePolicyDocument) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AssumeRolePolicyDocument", 1)) - } - if s.MaxSessionDuration != nil && *s.MaxSessionDuration < 3600 { - invalidParams.Add(request.NewErrParamMinValue("MaxSessionDuration", 3600)) - } - if s.Path != nil && len(*s.Path) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Path", 1)) - } - if s.PermissionsBoundary != nil && len(*s.PermissionsBoundary) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PermissionsBoundary", 20)) - } - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 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 -} - -// SetAssumeRolePolicyDocument sets the AssumeRolePolicyDocument field's value. -func (s *CreateRoleInput) SetAssumeRolePolicyDocument(v string) *CreateRoleInput { - s.AssumeRolePolicyDocument = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateRoleInput) SetDescription(v string) *CreateRoleInput { - s.Description = &v - return s -} - -// SetMaxSessionDuration sets the MaxSessionDuration field's value. -func (s *CreateRoleInput) SetMaxSessionDuration(v int64) *CreateRoleInput { - s.MaxSessionDuration = &v - return s -} - -// SetPath sets the Path field's value. -func (s *CreateRoleInput) SetPath(v string) *CreateRoleInput { - s.Path = &v - return s -} - -// SetPermissionsBoundary sets the PermissionsBoundary field's value. -func (s *CreateRoleInput) SetPermissionsBoundary(v string) *CreateRoleInput { - s.PermissionsBoundary = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *CreateRoleInput) SetRoleName(v string) *CreateRoleInput { - s.RoleName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateRoleInput) SetTags(v []*Tag) *CreateRoleInput { - s.Tags = v - return s -} - -// Contains the response to a successful CreateRole request. -type CreateRoleOutput struct { - _ struct{} `type:"structure"` - - // A structure containing details about the new role. - // - // Role is a required field - Role *Role `type:"structure" 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 CreateRoleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateRoleOutput) GoString() string { - return s.String() -} - -// SetRole sets the Role field's value. -func (s *CreateRoleOutput) SetRole(v *Role) *CreateRoleOutput { - s.Role = v - return s -} - -type CreateSAMLProviderInput struct { - _ struct{} `type:"structure"` - - // The name of the provider to create. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // An XML document generated by an identity provider (IdP) that supports SAML - // 2.0. The document includes the issuer's name, expiration information, and - // keys that can be used to validate the SAML authentication response (assertions) - // that are received from the IdP. You must generate the metadata document using - // the identity management software that is used as your organization's IdP. - // - // For more information, see About SAML 2.0-based federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html) - // in the IAM User Guide - // - // SAMLMetadataDocument is a required field - SAMLMetadataDocument *string `min:"1000" type:"string" required:"true"` - - // A list of tags that you want to attach to the new IAM SAML provider. Each - // tag consists of a key name and an associated value. For more information - // about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - // - // If any one of the tags is invalid or if you exceed the allowed maximum number - // of tags, then the entire request fails and the resource is not created. - 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 CreateSAMLProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateSAMLProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateSAMLProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateSAMLProviderInput"} - 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.SAMLMetadataDocument == nil { - invalidParams.Add(request.NewErrParamRequired("SAMLMetadataDocument")) - } - if s.SAMLMetadataDocument != nil && len(*s.SAMLMetadataDocument) < 1000 { - invalidParams.Add(request.NewErrParamMinLen("SAMLMetadataDocument", 1000)) - } - 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 -} - -// SetName sets the Name field's value. -func (s *CreateSAMLProviderInput) SetName(v string) *CreateSAMLProviderInput { - s.Name = &v - return s -} - -// SetSAMLMetadataDocument sets the SAMLMetadataDocument field's value. -func (s *CreateSAMLProviderInput) SetSAMLMetadataDocument(v string) *CreateSAMLProviderInput { - s.SAMLMetadataDocument = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateSAMLProviderInput) SetTags(v []*Tag) *CreateSAMLProviderInput { - s.Tags = v - return s -} - -// Contains the response to a successful CreateSAMLProvider request. -type CreateSAMLProviderOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the new SAML provider resource in IAM. - SAMLProviderArn *string `min:"20" type:"string"` - - // A list of tags that are attached to the new IAM SAML provider. The returned - // list of tags is sorted by tag key. For more information about tagging, see - // Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User 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 CreateSAMLProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateSAMLProviderOutput) GoString() string { - return s.String() -} - -// SetSAMLProviderArn sets the SAMLProviderArn field's value. -func (s *CreateSAMLProviderOutput) SetSAMLProviderArn(v string) *CreateSAMLProviderOutput { - s.SAMLProviderArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateSAMLProviderOutput) SetTags(v []*Tag) *CreateSAMLProviderOutput { - s.Tags = v - return s -} - -type CreateServiceLinkedRoleInput struct { - _ struct{} `type:"structure"` - - // The service principal for the Amazon Web Services service to which this role - // is attached. You use a string similar to a URL but without the http:// in - // front. For example: elasticbeanstalk.amazonaws.com. - // - // Service principals are unique and case-sensitive. To find the exact service - // principal for your service-linked role, see Amazon Web Services services - // that work with IAM (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html) - // in the IAM User Guide. Look for the services that have Yes in the Service-Linked - // Role column. Choose the Yes link to view the service-linked role documentation - // for that service. - // - // AWSServiceName is a required field - AWSServiceName *string `min:"1" type:"string" required:"true"` - - // - // A string that you provide, which is combined with the service-provided prefix - // to form the complete role name. If you make multiple requests for the same - // service, then you must supply a different CustomSuffix for each request. - // Otherwise the request fails with a duplicate role name error. For example, - // you could add -1 or -debug to the suffix. - // - // Some services do not support the CustomSuffix parameter. If you provide an - // optional suffix and the operation fails, try the operation again without - // the suffix. - CustomSuffix *string `min:"1" type:"string"` - - // The description of the role. - 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 CreateServiceLinkedRoleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateServiceLinkedRoleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateServiceLinkedRoleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateServiceLinkedRoleInput"} - if s.AWSServiceName == nil { - invalidParams.Add(request.NewErrParamRequired("AWSServiceName")) - } - if s.AWSServiceName != nil && len(*s.AWSServiceName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AWSServiceName", 1)) - } - if s.CustomSuffix != nil && len(*s.CustomSuffix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CustomSuffix", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAWSServiceName sets the AWSServiceName field's value. -func (s *CreateServiceLinkedRoleInput) SetAWSServiceName(v string) *CreateServiceLinkedRoleInput { - s.AWSServiceName = &v - return s -} - -// SetCustomSuffix sets the CustomSuffix field's value. -func (s *CreateServiceLinkedRoleInput) SetCustomSuffix(v string) *CreateServiceLinkedRoleInput { - s.CustomSuffix = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CreateServiceLinkedRoleInput) SetDescription(v string) *CreateServiceLinkedRoleInput { - s.Description = &v - return s -} - -type CreateServiceLinkedRoleOutput struct { - _ struct{} `type:"structure"` - - // A Role object that contains details about the newly created role. - Role *Role `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 CreateServiceLinkedRoleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateServiceLinkedRoleOutput) GoString() string { - return s.String() -} - -// SetRole sets the Role field's value. -func (s *CreateServiceLinkedRoleOutput) SetRole(v *Role) *CreateServiceLinkedRoleOutput { - s.Role = v - return s -} - -type CreateServiceSpecificCredentialInput struct { - _ struct{} `type:"structure"` - - // The name of the Amazon Web Services service that is to be associated with - // the credentials. The service you specify here is the only service that can - // be accessed using these credentials. - // - // ServiceName is a required field - ServiceName *string `type:"string" required:"true"` - - // The name of the IAM user that is to be associated with the credentials. The - // new service-specific credentials have the same permissions as the associated - // user except that they can be used only to access the specified service. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *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 CreateServiceSpecificCredentialInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateServiceSpecificCredentialInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateServiceSpecificCredentialInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateServiceSpecificCredentialInput"} - if s.ServiceName == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceName")) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServiceName sets the ServiceName field's value. -func (s *CreateServiceSpecificCredentialInput) SetServiceName(v string) *CreateServiceSpecificCredentialInput { - s.ServiceName = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *CreateServiceSpecificCredentialInput) SetUserName(v string) *CreateServiceSpecificCredentialInput { - s.UserName = &v - return s -} - -type CreateServiceSpecificCredentialOutput struct { - _ struct{} `type:"structure"` - - // A structure that contains information about the newly created service-specific - // credential. - // - // This is the only time that the password for this credential set is available. - // It cannot be recovered later. Instead, you must reset the password with ResetServiceSpecificCredential. - ServiceSpecificCredential *ServiceSpecificCredential `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 CreateServiceSpecificCredentialOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateServiceSpecificCredentialOutput) GoString() string { - return s.String() -} - -// SetServiceSpecificCredential sets the ServiceSpecificCredential field's value. -func (s *CreateServiceSpecificCredentialOutput) SetServiceSpecificCredential(v *ServiceSpecificCredential) *CreateServiceSpecificCredentialOutput { - s.ServiceSpecificCredential = v - return s -} - -type CreateUserInput struct { - _ struct{} `type:"structure"` - - // The path for the user name. For more information about paths, see IAM identifiers - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // This parameter is optional. If it is not included, it defaults to a slash - // (/). - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. - Path *string `min:"1" type:"string"` - - // The ARN of the managed policy that is used to set the permissions boundary - // for the user. - // - // A permissions boundary policy defines the maximum permissions that identity-based - // policies can grant to an entity, but does not grant permissions. Permissions - // boundaries do not define the maximum permissions that a resource-based policy - // can grant to an entity. To learn more, see Permissions boundaries for IAM - // entities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. - // - // For more information about policy types, see Policy types (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types) - // in the IAM User Guide. - PermissionsBoundary *string `min:"20" type:"string"` - - // A list of tags that you want to attach to the new user. Each tag consists - // of a key name and an associated value. For more information about tagging, - // see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - // - // If any one of the tags is invalid or if you exceed the allowed maximum number - // of tags, then the entire request fails and the resource is not created. - Tags []*Tag `type:"list"` - - // The name of the user to create. - // - // IAM user, group, role, and policy names must be unique within the account. - // Names are not distinguished by case. For example, you cannot create resources - // named both "MyResource" and "myresource". - // - // UserName is a required field - UserName *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 CreateUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateUserInput"} - if s.Path != nil && len(*s.Path) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Path", 1)) - } - if s.PermissionsBoundary != nil && len(*s.PermissionsBoundary) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PermissionsBoundary", 20)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 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 -} - -// SetPath sets the Path field's value. -func (s *CreateUserInput) SetPath(v string) *CreateUserInput { - s.Path = &v - return s -} - -// SetPermissionsBoundary sets the PermissionsBoundary field's value. -func (s *CreateUserInput) SetPermissionsBoundary(v string) *CreateUserInput { - s.PermissionsBoundary = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateUserInput) SetTags(v []*Tag) *CreateUserInput { - s.Tags = v - return s -} - -// SetUserName sets the UserName field's value. -func (s *CreateUserInput) SetUserName(v string) *CreateUserInput { - s.UserName = &v - return s -} - -// Contains the response to a successful CreateUser request. -type CreateUserOutput struct { - _ struct{} `type:"structure"` - - // A structure with details about the new IAM user. - User *User `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 CreateUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateUserOutput) GoString() string { - return s.String() -} - -// SetUser sets the User field's value. -func (s *CreateUserOutput) SetUser(v *User) *CreateUserOutput { - s.User = v - return s -} - -type CreateVirtualMFADeviceInput struct { - _ struct{} `type:"structure"` - - // The path for the virtual MFA device. For more information about paths, see - // IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // This parameter is optional. If it is not included, it defaults to a slash - // (/). - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. - Path *string `min:"1" type:"string"` - - // A list of tags that you want to attach to the new IAM virtual MFA device. - // Each tag consists of a key name and an associated value. For more information - // about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - // - // If any one of the tags is invalid or if you exceed the allowed maximum number - // of tags, then the entire request fails and the resource is not created. - Tags []*Tag `type:"list"` - - // The name of the virtual MFA device, which must be unique. Use with path to - // uniquely identify a virtual MFA device. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // VirtualMFADeviceName is a required field - VirtualMFADeviceName *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 CreateVirtualMFADeviceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateVirtualMFADeviceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateVirtualMFADeviceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateVirtualMFADeviceInput"} - if s.Path != nil && len(*s.Path) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Path", 1)) - } - if s.VirtualMFADeviceName == nil { - invalidParams.Add(request.NewErrParamRequired("VirtualMFADeviceName")) - } - if s.VirtualMFADeviceName != nil && len(*s.VirtualMFADeviceName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("VirtualMFADeviceName", 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 -} - -// SetPath sets the Path field's value. -func (s *CreateVirtualMFADeviceInput) SetPath(v string) *CreateVirtualMFADeviceInput { - s.Path = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateVirtualMFADeviceInput) SetTags(v []*Tag) *CreateVirtualMFADeviceInput { - s.Tags = v - return s -} - -// SetVirtualMFADeviceName sets the VirtualMFADeviceName field's value. -func (s *CreateVirtualMFADeviceInput) SetVirtualMFADeviceName(v string) *CreateVirtualMFADeviceInput { - s.VirtualMFADeviceName = &v - return s -} - -// Contains the response to a successful CreateVirtualMFADevice request. -type CreateVirtualMFADeviceOutput struct { - _ struct{} `type:"structure"` - - // A structure containing details about the new virtual MFA device. - // - // VirtualMFADevice is a required field - VirtualMFADevice *VirtualMFADevice `type:"structure" 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 CreateVirtualMFADeviceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateVirtualMFADeviceOutput) GoString() string { - return s.String() -} - -// SetVirtualMFADevice sets the VirtualMFADevice field's value. -func (s *CreateVirtualMFADeviceOutput) SetVirtualMFADevice(v *VirtualMFADevice) *CreateVirtualMFADeviceOutput { - s.VirtualMFADevice = v - return s -} - -type DeactivateMFADeviceInput struct { - _ struct{} `type:"structure"` - - // The serial number that uniquely identifies the MFA device. For virtual MFA - // devices, the serial number is the device ARN. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: =,.@:/- - // - // SerialNumber is a required field - SerialNumber *string `min:"9" type:"string" required:"true"` - - // The name of the user whose MFA device you want to deactivate. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *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 DeactivateMFADeviceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeactivateMFADeviceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeactivateMFADeviceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeactivateMFADeviceInput"} - if s.SerialNumber == nil { - invalidParams.Add(request.NewErrParamRequired("SerialNumber")) - } - if s.SerialNumber != nil && len(*s.SerialNumber) < 9 { - invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSerialNumber sets the SerialNumber field's value. -func (s *DeactivateMFADeviceInput) SetSerialNumber(v string) *DeactivateMFADeviceInput { - s.SerialNumber = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *DeactivateMFADeviceInput) SetUserName(v string) *DeactivateMFADeviceInput { - s.UserName = &v - return s -} - -type DeactivateMFADeviceOutput 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 DeactivateMFADeviceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeactivateMFADeviceOutput) GoString() string { - return s.String() -} - -type DeleteAccessKeyInput struct { - _ struct{} `type:"structure"` - - // The access key ID for the access key ID and secret access key you want to - // delete. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters that can consist of any upper or lowercased letter - // or digit. - // - // AccessKeyId is a required field - AccessKeyId *string `min:"16" type:"string" required:"true"` - - // The name of the user whose access key pair you want to delete. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - UserName *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 DeleteAccessKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteAccessKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteAccessKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteAccessKeyInput"} - if s.AccessKeyId == nil { - invalidParams.Add(request.NewErrParamRequired("AccessKeyId")) - } - if s.AccessKeyId != nil && len(*s.AccessKeyId) < 16 { - invalidParams.Add(request.NewErrParamMinLen("AccessKeyId", 16)) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessKeyId sets the AccessKeyId field's value. -func (s *DeleteAccessKeyInput) SetAccessKeyId(v string) *DeleteAccessKeyInput { - s.AccessKeyId = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *DeleteAccessKeyInput) SetUserName(v string) *DeleteAccessKeyInput { - s.UserName = &v - return s -} - -type DeleteAccessKeyOutput 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 DeleteAccessKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteAccessKeyOutput) GoString() string { - return s.String() -} - -type DeleteAccountAliasInput struct { - _ struct{} `type:"structure"` - - // The name of the account alias to delete. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of lowercase letters, digits, and dashes. - // You cannot start or finish with a dash, nor can you have two dashes in a - // row. - // - // AccountAlias is a required field - AccountAlias *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 DeleteAccountAliasInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteAccountAliasInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteAccountAliasInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteAccountAliasInput"} - if s.AccountAlias == nil { - invalidParams.Add(request.NewErrParamRequired("AccountAlias")) - } - if s.AccountAlias != nil && len(*s.AccountAlias) < 3 { - invalidParams.Add(request.NewErrParamMinLen("AccountAlias", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountAlias sets the AccountAlias field's value. -func (s *DeleteAccountAliasInput) SetAccountAlias(v string) *DeleteAccountAliasInput { - s.AccountAlias = &v - return s -} - -type DeleteAccountAliasOutput 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 DeleteAccountAliasOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteAccountAliasOutput) GoString() string { - return s.String() -} - -type DeleteAccountPasswordPolicyInput 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 DeleteAccountPasswordPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteAccountPasswordPolicyInput) GoString() string { - return s.String() -} - -type DeleteAccountPasswordPolicyOutput 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 DeleteAccountPasswordPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteAccountPasswordPolicyOutput) GoString() string { - return s.String() -} - -type DeleteGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the IAM group to delete. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // GroupName is a required field - GroupName *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 DeleteGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteGroupInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *DeleteGroupInput) SetGroupName(v string) *DeleteGroupInput { - s.GroupName = &v - return s -} - -type DeleteGroupOutput 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 DeleteGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteGroupOutput) GoString() string { - return s.String() -} - -type DeleteGroupPolicyInput struct { - _ struct{} `type:"structure"` - - // The name (friendly name, not ARN) identifying the group that the policy is - // embedded in. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // The name identifying the policy document to delete. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // PolicyName is a required field - PolicyName *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 DeleteGroupPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteGroupPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteGroupPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteGroupPolicyInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *DeleteGroupPolicyInput) SetGroupName(v string) *DeleteGroupPolicyInput { - s.GroupName = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *DeleteGroupPolicyInput) SetPolicyName(v string) *DeleteGroupPolicyInput { - s.PolicyName = &v - return s -} - -type DeleteGroupPolicyOutput 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 DeleteGroupPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteGroupPolicyOutput) GoString() string { - return s.String() -} - -type DeleteInstanceProfileInput struct { - _ struct{} `type:"structure"` - - // The name of the instance profile to delete. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // InstanceProfileName is a required field - InstanceProfileName *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 DeleteInstanceProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteInstanceProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteInstanceProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteInstanceProfileInput"} - if s.InstanceProfileName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceProfileName")) - } - if s.InstanceProfileName != nil && len(*s.InstanceProfileName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InstanceProfileName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceProfileName sets the InstanceProfileName field's value. -func (s *DeleteInstanceProfileInput) SetInstanceProfileName(v string) *DeleteInstanceProfileInput { - s.InstanceProfileName = &v - return s -} - -type DeleteInstanceProfileOutput 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 DeleteInstanceProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteInstanceProfileOutput) GoString() string { - return s.String() -} - -type DeleteLoginProfileInput struct { - _ struct{} `type:"structure"` - - // The name of the user whose password you want to delete. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *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 DeleteLoginProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteLoginProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLoginProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLoginProfileInput"} - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUserName sets the UserName field's value. -func (s *DeleteLoginProfileInput) SetUserName(v string) *DeleteLoginProfileInput { - s.UserName = &v - return s -} - -type DeleteLoginProfileOutput 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 DeleteLoginProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteLoginProfileOutput) GoString() string { - return s.String() -} - -type DeleteOpenIDConnectProviderInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the IAM OpenID Connect provider resource - // object to delete. You can get a list of OpenID Connect provider resource - // ARNs by using the ListOpenIDConnectProviders operation. - // - // OpenIDConnectProviderArn is a required field - OpenIDConnectProviderArn *string `min:"20" 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 DeleteOpenIDConnectProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteOpenIDConnectProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteOpenIDConnectProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteOpenIDConnectProviderInput"} - if s.OpenIDConnectProviderArn == nil { - invalidParams.Add(request.NewErrParamRequired("OpenIDConnectProviderArn")) - } - if s.OpenIDConnectProviderArn != nil && len(*s.OpenIDConnectProviderArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("OpenIDConnectProviderArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOpenIDConnectProviderArn sets the OpenIDConnectProviderArn field's value. -func (s *DeleteOpenIDConnectProviderInput) SetOpenIDConnectProviderArn(v string) *DeleteOpenIDConnectProviderInput { - s.OpenIDConnectProviderArn = &v - return s -} - -type DeleteOpenIDConnectProviderOutput 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 DeleteOpenIDConnectProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteOpenIDConnectProviderOutput) GoString() string { - return s.String() -} - -type DeletePolicyInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the IAM policy you want to delete. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicyArn is a required field - PolicyArn *string `min:"20" 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 DeletePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeletePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeletePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeletePolicyInput"} - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *DeletePolicyInput) SetPolicyArn(v string) *DeletePolicyInput { - s.PolicyArn = &v - return s -} - -type DeletePolicyOutput 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 DeletePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeletePolicyOutput) GoString() string { - return s.String() -} - -type DeletePolicyVersionInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the IAM policy from which you want to delete - // a version. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicyArn is a required field - PolicyArn *string `min:"20" type:"string" required:"true"` - - // The policy version to delete. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters that consists of the lowercase letter 'v' followed - // by one or two digits, and optionally followed by a period '.' and a string - // of letters and digits. - // - // For more information about managed policy versions, see Versioning for managed - // policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) - // in the IAM User Guide. - // - // VersionId is a required field - VersionId *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 DeletePolicyVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeletePolicyVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeletePolicyVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeletePolicyVersionInput"} - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - if s.VersionId == nil { - invalidParams.Add(request.NewErrParamRequired("VersionId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *DeletePolicyVersionInput) SetPolicyArn(v string) *DeletePolicyVersionInput { - s.PolicyArn = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *DeletePolicyVersionInput) SetVersionId(v string) *DeletePolicyVersionInput { - s.VersionId = &v - return s -} - -type DeletePolicyVersionOutput 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 DeletePolicyVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeletePolicyVersionOutput) GoString() string { - return s.String() -} - -type DeleteRoleInput struct { - _ struct{} `type:"structure"` - - // The name of the role to delete. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *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 DeleteRoleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteRoleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRoleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRoleInput"} - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRoleName sets the RoleName field's value. -func (s *DeleteRoleInput) SetRoleName(v string) *DeleteRoleInput { - s.RoleName = &v - return s -} - -type DeleteRoleOutput 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 DeleteRoleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteRoleOutput) GoString() string { - return s.String() -} - -type DeleteRolePermissionsBoundaryInput struct { - _ struct{} `type:"structure"` - - // The name (friendly name, not ARN) of the IAM role from which you want to - // remove the permissions boundary. - // - // RoleName is a required field - RoleName *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 DeleteRolePermissionsBoundaryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteRolePermissionsBoundaryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRolePermissionsBoundaryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRolePermissionsBoundaryInput"} - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRoleName sets the RoleName field's value. -func (s *DeleteRolePermissionsBoundaryInput) SetRoleName(v string) *DeleteRolePermissionsBoundaryInput { - s.RoleName = &v - return s -} - -type DeleteRolePermissionsBoundaryOutput 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 DeleteRolePermissionsBoundaryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteRolePermissionsBoundaryOutput) GoString() string { - return s.String() -} - -type DeleteRolePolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the inline policy to delete from the specified IAM role. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` - - // The name (friendly name, not ARN) identifying the role that the policy is - // embedded in. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *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 DeleteRolePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteRolePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRolePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRolePolicyInput"} - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyName sets the PolicyName field's value. -func (s *DeleteRolePolicyInput) SetPolicyName(v string) *DeleteRolePolicyInput { - s.PolicyName = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *DeleteRolePolicyInput) SetRoleName(v string) *DeleteRolePolicyInput { - s.RoleName = &v - return s -} - -type DeleteRolePolicyOutput 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 DeleteRolePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteRolePolicyOutput) GoString() string { - return s.String() -} - -type DeleteSAMLProviderInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the SAML provider to delete. - // - // SAMLProviderArn is a required field - SAMLProviderArn *string `min:"20" 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 DeleteSAMLProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteSAMLProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSAMLProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSAMLProviderInput"} - if s.SAMLProviderArn == nil { - invalidParams.Add(request.NewErrParamRequired("SAMLProviderArn")) - } - if s.SAMLProviderArn != nil && len(*s.SAMLProviderArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("SAMLProviderArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSAMLProviderArn sets the SAMLProviderArn field's value. -func (s *DeleteSAMLProviderInput) SetSAMLProviderArn(v string) *DeleteSAMLProviderInput { - s.SAMLProviderArn = &v - return s -} - -type DeleteSAMLProviderOutput 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 DeleteSAMLProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteSAMLProviderOutput) GoString() string { - return s.String() -} - -type DeleteSSHPublicKeyInput struct { - _ struct{} `type:"structure"` - - // The unique identifier for the SSH public key. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters that can consist of any upper or lowercased letter - // or digit. - // - // SSHPublicKeyId is a required field - SSHPublicKeyId *string `min:"20" type:"string" required:"true"` - - // The name of the IAM user associated with the SSH public key. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *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 DeleteSSHPublicKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteSSHPublicKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSSHPublicKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSSHPublicKeyInput"} - if s.SSHPublicKeyId == nil { - invalidParams.Add(request.NewErrParamRequired("SSHPublicKeyId")) - } - if s.SSHPublicKeyId != nil && len(*s.SSHPublicKeyId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("SSHPublicKeyId", 20)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSSHPublicKeyId sets the SSHPublicKeyId field's value. -func (s *DeleteSSHPublicKeyInput) SetSSHPublicKeyId(v string) *DeleteSSHPublicKeyInput { - s.SSHPublicKeyId = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *DeleteSSHPublicKeyInput) SetUserName(v string) *DeleteSSHPublicKeyInput { - s.UserName = &v - return s -} - -type DeleteSSHPublicKeyOutput 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 DeleteSSHPublicKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteSSHPublicKeyOutput) GoString() string { - return s.String() -} - -type DeleteServerCertificateInput struct { - _ struct{} `type:"structure"` - - // The name of the server certificate you want to delete. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // ServerCertificateName is a required field - ServerCertificateName *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 DeleteServerCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteServerCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteServerCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteServerCertificateInput"} - if s.ServerCertificateName == nil { - invalidParams.Add(request.NewErrParamRequired("ServerCertificateName")) - } - if s.ServerCertificateName != nil && len(*s.ServerCertificateName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServerCertificateName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServerCertificateName sets the ServerCertificateName field's value. -func (s *DeleteServerCertificateInput) SetServerCertificateName(v string) *DeleteServerCertificateInput { - s.ServerCertificateName = &v - return s -} - -type DeleteServerCertificateOutput 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 DeleteServerCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteServerCertificateOutput) GoString() string { - return s.String() -} - -type DeleteServiceLinkedRoleInput struct { - _ struct{} `type:"structure"` - - // The name of the service-linked role to be deleted. - // - // RoleName is a required field - RoleName *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 DeleteServiceLinkedRoleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteServiceLinkedRoleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteServiceLinkedRoleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteServiceLinkedRoleInput"} - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRoleName sets the RoleName field's value. -func (s *DeleteServiceLinkedRoleInput) SetRoleName(v string) *DeleteServiceLinkedRoleInput { - s.RoleName = &v - return s -} - -type DeleteServiceLinkedRoleOutput struct { - _ struct{} `type:"structure"` - - // The deletion task identifier that you can use to check the status of the - // deletion. This identifier is returned in the format task/aws-service-role///. - // - // DeletionTaskId is a required field - DeletionTaskId *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 DeleteServiceLinkedRoleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteServiceLinkedRoleOutput) GoString() string { - return s.String() -} - -// SetDeletionTaskId sets the DeletionTaskId field's value. -func (s *DeleteServiceLinkedRoleOutput) SetDeletionTaskId(v string) *DeleteServiceLinkedRoleOutput { - s.DeletionTaskId = &v - return s -} - -type DeleteServiceSpecificCredentialInput struct { - _ struct{} `type:"structure"` - - // The unique identifier of the service-specific credential. You can get this - // value by calling ListServiceSpecificCredentials. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters that can consist of any upper or lowercased letter - // or digit. - // - // ServiceSpecificCredentialId is a required field - ServiceSpecificCredentialId *string `min:"20" type:"string" required:"true"` - - // The name of the IAM user associated with the service-specific credential. - // If this value is not specified, then the operation assumes the user whose - // credentials are used to call the operation. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - UserName *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 DeleteServiceSpecificCredentialInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteServiceSpecificCredentialInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteServiceSpecificCredentialInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteServiceSpecificCredentialInput"} - if s.ServiceSpecificCredentialId == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceSpecificCredentialId")) - } - if s.ServiceSpecificCredentialId != nil && len(*s.ServiceSpecificCredentialId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("ServiceSpecificCredentialId", 20)) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServiceSpecificCredentialId sets the ServiceSpecificCredentialId field's value. -func (s *DeleteServiceSpecificCredentialInput) SetServiceSpecificCredentialId(v string) *DeleteServiceSpecificCredentialInput { - s.ServiceSpecificCredentialId = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *DeleteServiceSpecificCredentialInput) SetUserName(v string) *DeleteServiceSpecificCredentialInput { - s.UserName = &v - return s -} - -type DeleteServiceSpecificCredentialOutput 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 DeleteServiceSpecificCredentialOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteServiceSpecificCredentialOutput) GoString() string { - return s.String() -} - -type DeleteSigningCertificateInput struct { - _ struct{} `type:"structure"` - - // The ID of the signing certificate to delete. - // - // The format of this parameter, as described by its regex (http://wikipedia.org/wiki/regex) - // pattern, is a string of characters that can be upper- or lower-cased letters - // or digits. - // - // CertificateId is a required field - CertificateId *string `min:"24" type:"string" required:"true"` - - // The name of the user the signing certificate belongs to. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - UserName *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 DeleteSigningCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteSigningCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSigningCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSigningCertificateInput"} - if s.CertificateId == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateId")) - } - if s.CertificateId != nil && len(*s.CertificateId) < 24 { - invalidParams.Add(request.NewErrParamMinLen("CertificateId", 24)) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateId sets the CertificateId field's value. -func (s *DeleteSigningCertificateInput) SetCertificateId(v string) *DeleteSigningCertificateInput { - s.CertificateId = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *DeleteSigningCertificateInput) SetUserName(v string) *DeleteSigningCertificateInput { - s.UserName = &v - return s -} - -type DeleteSigningCertificateOutput 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 DeleteSigningCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteSigningCertificateOutput) GoString() string { - return s.String() -} - -type DeleteUserInput struct { - _ struct{} `type:"structure"` - - // The name of the user to delete. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *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 DeleteUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteUserInput"} - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUserName sets the UserName field's value. -func (s *DeleteUserInput) SetUserName(v string) *DeleteUserInput { - s.UserName = &v - return s -} - -type DeleteUserOutput 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 DeleteUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteUserOutput) GoString() string { - return s.String() -} - -type DeleteUserPermissionsBoundaryInput struct { - _ struct{} `type:"structure"` - - // The name (friendly name, not ARN) of the IAM user from which you want to - // remove the permissions boundary. - // - // UserName is a required field - UserName *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 DeleteUserPermissionsBoundaryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteUserPermissionsBoundaryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteUserPermissionsBoundaryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteUserPermissionsBoundaryInput"} - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUserName sets the UserName field's value. -func (s *DeleteUserPermissionsBoundaryInput) SetUserName(v string) *DeleteUserPermissionsBoundaryInput { - s.UserName = &v - return s -} - -type DeleteUserPermissionsBoundaryOutput 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 DeleteUserPermissionsBoundaryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteUserPermissionsBoundaryOutput) GoString() string { - return s.String() -} - -type DeleteUserPolicyInput struct { - _ struct{} `type:"structure"` - - // The name identifying the policy document to delete. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` - - // The name (friendly name, not ARN) identifying the user that the policy is - // embedded in. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *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 DeleteUserPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteUserPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteUserPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteUserPolicyInput"} - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyName sets the PolicyName field's value. -func (s *DeleteUserPolicyInput) SetPolicyName(v string) *DeleteUserPolicyInput { - s.PolicyName = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *DeleteUserPolicyInput) SetUserName(v string) *DeleteUserPolicyInput { - s.UserName = &v - return s -} - -type DeleteUserPolicyOutput 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 DeleteUserPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteUserPolicyOutput) GoString() string { - return s.String() -} - -type DeleteVirtualMFADeviceInput struct { - _ struct{} `type:"structure"` - - // The serial number that uniquely identifies the MFA device. For virtual MFA - // devices, the serial number is the same as the ARN. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: =,.@:/- - // - // SerialNumber is a required field - SerialNumber *string `min:"9" 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 DeleteVirtualMFADeviceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteVirtualMFADeviceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVirtualMFADeviceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVirtualMFADeviceInput"} - if s.SerialNumber == nil { - invalidParams.Add(request.NewErrParamRequired("SerialNumber")) - } - if s.SerialNumber != nil && len(*s.SerialNumber) < 9 { - invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSerialNumber sets the SerialNumber field's value. -func (s *DeleteVirtualMFADeviceInput) SetSerialNumber(v string) *DeleteVirtualMFADeviceInput { - s.SerialNumber = &v - return s -} - -type DeleteVirtualMFADeviceOutput 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 DeleteVirtualMFADeviceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteVirtualMFADeviceOutput) GoString() string { - return s.String() -} - -// The reason that the service-linked role deletion failed. -// -// This data type is used as a response element in the GetServiceLinkedRoleDeletionStatus -// operation. -type DeletionTaskFailureReasonType struct { - _ struct{} `type:"structure"` - - // A short description of the reason that the service-linked role deletion failed. - Reason *string `type:"string"` - - // A list of objects that contains details about the service-linked role deletion - // failure, if that information is returned by the service. If the service-linked - // role has active sessions or if any resources that were used by the role have - // not been deleted from the linked service, the role can't be deleted. This - // parameter includes a list of the resources that are associated with the role - // and the Region in which the resources are being used. - RoleUsageList []*RoleUsageType `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 DeletionTaskFailureReasonType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeletionTaskFailureReasonType) GoString() string { - return s.String() -} - -// SetReason sets the Reason field's value. -func (s *DeletionTaskFailureReasonType) SetReason(v string) *DeletionTaskFailureReasonType { - s.Reason = &v - return s -} - -// SetRoleUsageList sets the RoleUsageList field's value. -func (s *DeletionTaskFailureReasonType) SetRoleUsageList(v []*RoleUsageType) *DeletionTaskFailureReasonType { - s.RoleUsageList = v - return s -} - -type DetachGroupPolicyInput struct { - _ struct{} `type:"structure"` - - // The name (friendly name, not ARN) of the IAM group to detach the policy from. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the IAM policy you want to detach. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicyArn is a required field - PolicyArn *string `min:"20" 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 DetachGroupPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DetachGroupPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachGroupPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachGroupPolicyInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *DetachGroupPolicyInput) SetGroupName(v string) *DetachGroupPolicyInput { - s.GroupName = &v - return s -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *DetachGroupPolicyInput) SetPolicyArn(v string) *DetachGroupPolicyInput { - s.PolicyArn = &v - return s -} - -type DetachGroupPolicyOutput 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 DetachGroupPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DetachGroupPolicyOutput) GoString() string { - return s.String() -} - -type DetachRolePolicyInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the IAM policy you want to detach. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicyArn is a required field - PolicyArn *string `min:"20" type:"string" required:"true"` - - // The name (friendly name, not ARN) of the IAM role to detach the policy from. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *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 DetachRolePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DetachRolePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachRolePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachRolePolicyInput"} - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *DetachRolePolicyInput) SetPolicyArn(v string) *DetachRolePolicyInput { - s.PolicyArn = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *DetachRolePolicyInput) SetRoleName(v string) *DetachRolePolicyInput { - s.RoleName = &v - return s -} - -type DetachRolePolicyOutput 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 DetachRolePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DetachRolePolicyOutput) GoString() string { - return s.String() -} - -type DetachUserPolicyInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the IAM policy you want to detach. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicyArn is a required field - PolicyArn *string `min:"20" type:"string" required:"true"` - - // The name (friendly name, not ARN) of the IAM user to detach the policy from. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *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 DetachUserPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DetachUserPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachUserPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachUserPolicyInput"} - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *DetachUserPolicyInput) SetPolicyArn(v string) *DetachUserPolicyInput { - s.PolicyArn = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *DetachUserPolicyInput) SetUserName(v string) *DetachUserPolicyInput { - s.UserName = &v - return s -} - -type DetachUserPolicyOutput 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 DetachUserPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DetachUserPolicyOutput) GoString() string { - return s.String() -} - -type EnableMFADeviceInput struct { - _ struct{} `type:"structure"` - - // An authentication code emitted by the device. - // - // The format for this parameter is a string of six digits. - // - // Submit your request immediately after generating the authentication codes. - // If you generate the codes and then wait too long to submit the request, the - // MFA device successfully associates with the user but the MFA device becomes - // out of sync. This happens because time-based one-time passwords (TOTP) expire - // after a short period of time. If this happens, you can resync the device - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_sync.html). - // - // AuthenticationCode1 is a required field - AuthenticationCode1 *string `min:"6" type:"string" required:"true"` - - // A subsequent authentication code emitted by the device. - // - // The format for this parameter is a string of six digits. - // - // Submit your request immediately after generating the authentication codes. - // If you generate the codes and then wait too long to submit the request, the - // MFA device successfully associates with the user but the MFA device becomes - // out of sync. This happens because time-based one-time passwords (TOTP) expire - // after a short period of time. If this happens, you can resync the device - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_sync.html). - // - // AuthenticationCode2 is a required field - AuthenticationCode2 *string `min:"6" type:"string" required:"true"` - - // The serial number that uniquely identifies the MFA device. For virtual MFA - // devices, the serial number is the device ARN. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: =,.@:/- - // - // SerialNumber is a required field - SerialNumber *string `min:"9" type:"string" required:"true"` - - // The name of the IAM user for whom you want to enable the MFA device. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *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 EnableMFADeviceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s EnableMFADeviceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EnableMFADeviceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnableMFADeviceInput"} - if s.AuthenticationCode1 == nil { - invalidParams.Add(request.NewErrParamRequired("AuthenticationCode1")) - } - if s.AuthenticationCode1 != nil && len(*s.AuthenticationCode1) < 6 { - invalidParams.Add(request.NewErrParamMinLen("AuthenticationCode1", 6)) - } - if s.AuthenticationCode2 == nil { - invalidParams.Add(request.NewErrParamRequired("AuthenticationCode2")) - } - if s.AuthenticationCode2 != nil && len(*s.AuthenticationCode2) < 6 { - invalidParams.Add(request.NewErrParamMinLen("AuthenticationCode2", 6)) - } - if s.SerialNumber == nil { - invalidParams.Add(request.NewErrParamRequired("SerialNumber")) - } - if s.SerialNumber != nil && len(*s.SerialNumber) < 9 { - invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthenticationCode1 sets the AuthenticationCode1 field's value. -func (s *EnableMFADeviceInput) SetAuthenticationCode1(v string) *EnableMFADeviceInput { - s.AuthenticationCode1 = &v - return s -} - -// SetAuthenticationCode2 sets the AuthenticationCode2 field's value. -func (s *EnableMFADeviceInput) SetAuthenticationCode2(v string) *EnableMFADeviceInput { - s.AuthenticationCode2 = &v - return s -} - -// SetSerialNumber sets the SerialNumber field's value. -func (s *EnableMFADeviceInput) SetSerialNumber(v string) *EnableMFADeviceInput { - s.SerialNumber = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *EnableMFADeviceInput) SetUserName(v string) *EnableMFADeviceInput { - s.UserName = &v - return s -} - -type EnableMFADeviceOutput 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 EnableMFADeviceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s EnableMFADeviceOutput) GoString() string { - return s.String() -} - -// An object that contains details about when the IAM entities (users or roles) -// were last used in an attempt to access the specified Amazon Web Services -// service. -// -// This data type is a response element in the GetServiceLastAccessedDetailsWithEntities -// operation. -type EntityDetails struct { - _ struct{} `type:"structure"` - - // The EntityInfo object that contains details about the entity (user or role). - // - // EntityInfo is a required field - EntityInfo *EntityInfo `type:"structure" required:"true"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the authenticated entity last attempted to access Amazon Web Services. - // Amazon Web Services does not report unauthenticated requests. - // - // This field is null if no IAM entities attempted to access the service within - // the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). - LastAuthenticated *time.Time `type:"timestamp"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s EntityDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s EntityDetails) GoString() string { - return s.String() -} - -// SetEntityInfo sets the EntityInfo field's value. -func (s *EntityDetails) SetEntityInfo(v *EntityInfo) *EntityDetails { - s.EntityInfo = v - return s -} - -// SetLastAuthenticated sets the LastAuthenticated field's value. -func (s *EntityDetails) SetLastAuthenticated(v time.Time) *EntityDetails { - s.LastAuthenticated = &v - return s -} - -// Contains details about the specified entity (user or role). -// -// This data type is an element of the EntityDetails object. -type EntityInfo struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web - // Services resources. - // - // For more information about ARNs, go to Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // Arn is a required field - Arn *string `min:"20" type:"string" required:"true"` - - // The identifier of the entity (user or role). - // - // Id is a required field - Id *string `min:"16" type:"string" required:"true"` - - // The name of the entity (user or role). - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The path to the entity (user or role). For more information about paths, - // see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - Path *string `min:"1" type:"string"` - - // The type of entity (user or role). - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"PolicyOwnerEntityType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s EntityInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s EntityInfo) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *EntityInfo) SetArn(v string) *EntityInfo { - s.Arn = &v - return s -} - -// SetId sets the Id field's value. -func (s *EntityInfo) SetId(v string) *EntityInfo { - s.Id = &v - return s -} - -// SetName sets the Name field's value. -func (s *EntityInfo) SetName(v string) *EntityInfo { - s.Name = &v - return s -} - -// SetPath sets the Path field's value. -func (s *EntityInfo) SetPath(v string) *EntityInfo { - s.Path = &v - return s -} - -// SetType sets the Type field's value. -func (s *EntityInfo) SetType(v string) *EntityInfo { - s.Type = &v - return s -} - -// Contains information about the reason that the operation failed. -// -// This data type is used as a response element in the GetOrganizationsAccessReport, -// GetServiceLastAccessedDetails, and GetServiceLastAccessedDetailsWithEntities -// operations. -type ErrorDetails struct { - _ struct{} `type:"structure"` - - // The error code associated with the operation failure. - // - // Code is a required field - Code *string `type:"string" required:"true"` - - // Detailed information about the reason that the operation failed. - // - // Message is a required field - Message *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 ErrorDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ErrorDetails) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *ErrorDetails) SetCode(v string) *ErrorDetails { - s.Code = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *ErrorDetails) SetMessage(v string) *ErrorDetails { - s.Message = &v - return s -} - -// Contains the results of a simulation. -// -// This data type is used by the return parameter of SimulateCustomPolicy and -// SimulatePrincipalPolicy . -type EvaluationResult struct { - _ struct{} `type:"structure"` - - // The name of the API operation tested on the indicated resource. - // - // EvalActionName is a required field - EvalActionName *string `min:"3" type:"string" required:"true"` - - // The result of the simulation. - // - // EvalDecision is a required field - EvalDecision *string `type:"string" required:"true" enum:"PolicyEvaluationDecisionType"` - - // Additional details about the results of the cross-account evaluation decision. - // This parameter is populated for only cross-account simulations. It contains - // a brief summary of how each policy type contributes to the final evaluation - // decision. - // - // If the simulation evaluates policies within the same account and includes - // a resource ARN, then the parameter is present but the response is empty. - // If the simulation evaluates policies within the same account and specifies - // all resources (*), then the parameter is not returned. - // - // When you make a cross-account request, Amazon Web Services evaluates the - // request in the trusting account and the trusted account. The request is allowed - // only if both evaluations return true. For more information about how policies - // are evaluated, see Evaluating policies within a single account (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics). - // - // If an Organizations SCP included in the evaluation denies access, the simulation - // ends. In this case, policy evaluation does not proceed any further and this - // parameter is not returned. - EvalDecisionDetails map[string]*string `type:"map"` - - // The ARN of the resource that the indicated API operation was tested on. - EvalResourceName *string `min:"1" type:"string"` - - // A list of the statements in the input policies that determine the result - // for this scenario. Remember that even if multiple statements allow the operation - // on the resource, if only one statement denies that operation, then the explicit - // deny overrides any allow. In addition, the deny statement is the only entry - // included in the result. - MatchedStatements []*Statement `type:"list"` - - // A list of context keys that are required by the included input policies but - // that were not provided by one of the input parameters. This list is used - // when the resource in a simulation is "*", either explicitly, or when the - // ResourceArns parameter blank. If you include a list of resources, then any - // missing context values are instead included under the ResourceSpecificResults - // section. To discover the context keys used by a set of policies, you can - // call GetContextKeysForCustomPolicy or GetContextKeysForPrincipalPolicy. - MissingContextValues []*string `type:"list"` - - // A structure that details how Organizations and its service control policies - // affect the results of the simulation. Only applies if the simulated user's - // account is part of an organization. - OrganizationsDecisionDetail *OrganizationsDecisionDetail `type:"structure"` - - // Contains information about the effect that a permissions boundary has on - // a policy simulation when the boundary is applied to an IAM entity. - PermissionsBoundaryDecisionDetail *PermissionsBoundaryDecisionDetail `type:"structure"` - - // The individual results of the simulation of the API operation specified in - // EvalActionName on each resource. - ResourceSpecificResults []*ResourceSpecificResult `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 EvaluationResult) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s EvaluationResult) GoString() string { - return s.String() -} - -// SetEvalActionName sets the EvalActionName field's value. -func (s *EvaluationResult) SetEvalActionName(v string) *EvaluationResult { - s.EvalActionName = &v - return s -} - -// SetEvalDecision sets the EvalDecision field's value. -func (s *EvaluationResult) SetEvalDecision(v string) *EvaluationResult { - s.EvalDecision = &v - return s -} - -// SetEvalDecisionDetails sets the EvalDecisionDetails field's value. -func (s *EvaluationResult) SetEvalDecisionDetails(v map[string]*string) *EvaluationResult { - s.EvalDecisionDetails = v - return s -} - -// SetEvalResourceName sets the EvalResourceName field's value. -func (s *EvaluationResult) SetEvalResourceName(v string) *EvaluationResult { - s.EvalResourceName = &v - return s -} - -// SetMatchedStatements sets the MatchedStatements field's value. -func (s *EvaluationResult) SetMatchedStatements(v []*Statement) *EvaluationResult { - s.MatchedStatements = v - return s -} - -// SetMissingContextValues sets the MissingContextValues field's value. -func (s *EvaluationResult) SetMissingContextValues(v []*string) *EvaluationResult { - s.MissingContextValues = v - return s -} - -// SetOrganizationsDecisionDetail sets the OrganizationsDecisionDetail field's value. -func (s *EvaluationResult) SetOrganizationsDecisionDetail(v *OrganizationsDecisionDetail) *EvaluationResult { - s.OrganizationsDecisionDetail = v - return s -} - -// SetPermissionsBoundaryDecisionDetail sets the PermissionsBoundaryDecisionDetail field's value. -func (s *EvaluationResult) SetPermissionsBoundaryDecisionDetail(v *PermissionsBoundaryDecisionDetail) *EvaluationResult { - s.PermissionsBoundaryDecisionDetail = v - return s -} - -// SetResourceSpecificResults sets the ResourceSpecificResults field's value. -func (s *EvaluationResult) SetResourceSpecificResults(v []*ResourceSpecificResult) *EvaluationResult { - s.ResourceSpecificResults = v - return s -} - -type GenerateCredentialReportInput 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 GenerateCredentialReportInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GenerateCredentialReportInput) GoString() string { - return s.String() -} - -// Contains the response to a successful GenerateCredentialReport request. -type GenerateCredentialReportOutput struct { - _ struct{} `type:"structure"` - - // Information about the credential report. - Description *string `type:"string"` - - // Information about the state of the credential report. - State *string `type:"string" enum:"ReportStateType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GenerateCredentialReportOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GenerateCredentialReportOutput) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *GenerateCredentialReportOutput) SetDescription(v string) *GenerateCredentialReportOutput { - s.Description = &v - return s -} - -// SetState sets the State field's value. -func (s *GenerateCredentialReportOutput) SetState(v string) *GenerateCredentialReportOutput { - s.State = &v - return s -} - -type GenerateOrganizationsAccessReportInput struct { - _ struct{} `type:"structure"` - - // The path of the Organizations entity (root, OU, or account). You can build - // an entity path using the known structure of your organization. For example, - // assume that your account ID is 123456789012 and its parent OU ID is ou-rge0-awsabcde. - // The organization root ID is r-f6g7h8i9j0example and your organization ID - // is o-a1b2c3d4e5. Your entity path is o-a1b2c3d4e5/r-f6g7h8i9j0example/ou-rge0-awsabcde/123456789012. - // - // EntityPath is a required field - EntityPath *string `min:"19" type:"string" required:"true"` - - // The identifier of the Organizations service control policy (SCP). This parameter - // is optional. - // - // This ID is used to generate information about when an account principal that - // is limited by the SCP attempted to access an Amazon Web Services service. - OrganizationsPolicyId *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 GenerateOrganizationsAccessReportInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GenerateOrganizationsAccessReportInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GenerateOrganizationsAccessReportInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GenerateOrganizationsAccessReportInput"} - if s.EntityPath == nil { - invalidParams.Add(request.NewErrParamRequired("EntityPath")) - } - if s.EntityPath != nil && len(*s.EntityPath) < 19 { - invalidParams.Add(request.NewErrParamMinLen("EntityPath", 19)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEntityPath sets the EntityPath field's value. -func (s *GenerateOrganizationsAccessReportInput) SetEntityPath(v string) *GenerateOrganizationsAccessReportInput { - s.EntityPath = &v - return s -} - -// SetOrganizationsPolicyId sets the OrganizationsPolicyId field's value. -func (s *GenerateOrganizationsAccessReportInput) SetOrganizationsPolicyId(v string) *GenerateOrganizationsAccessReportInput { - s.OrganizationsPolicyId = &v - return s -} - -type GenerateOrganizationsAccessReportOutput struct { - _ struct{} `type:"structure"` - - // The job identifier that you can use in the GetOrganizationsAccessReport operation. - JobId *string `min:"36" 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 GenerateOrganizationsAccessReportOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GenerateOrganizationsAccessReportOutput) GoString() string { - return s.String() -} - -// SetJobId sets the JobId field's value. -func (s *GenerateOrganizationsAccessReportOutput) SetJobId(v string) *GenerateOrganizationsAccessReportOutput { - s.JobId = &v - return s -} - -type GenerateServiceLastAccessedDetailsInput struct { - _ struct{} `type:"structure"` - - // The ARN of the IAM resource (user, group, role, or managed policy) used to - // generate information about when the resource was last used in an attempt - // to access an Amazon Web Services service. - // - // Arn is a required field - Arn *string `min:"20" type:"string" required:"true"` - - // The level of detail that you want to generate. You can specify whether you - // want to generate information about the last attempt to access services or - // actions. If you specify service-level granularity, this operation generates - // only service data. If you specify action-level granularity, it generates - // service and action data. If you don't include this optional parameter, the - // operation generates service data. - Granularity *string `type:"string" enum:"AccessAdvisorUsageGranularityType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GenerateServiceLastAccessedDetailsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GenerateServiceLastAccessedDetailsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GenerateServiceLastAccessedDetailsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GenerateServiceLastAccessedDetailsInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *GenerateServiceLastAccessedDetailsInput) SetArn(v string) *GenerateServiceLastAccessedDetailsInput { - s.Arn = &v - return s -} - -// SetGranularity sets the Granularity field's value. -func (s *GenerateServiceLastAccessedDetailsInput) SetGranularity(v string) *GenerateServiceLastAccessedDetailsInput { - s.Granularity = &v - return s -} - -type GenerateServiceLastAccessedDetailsOutput struct { - _ struct{} `type:"structure"` - - // The JobId that you can use in the GetServiceLastAccessedDetails or GetServiceLastAccessedDetailsWithEntities - // operations. The JobId returned by GenerateServiceLastAccessedDetail must - // be used by the same role within a session, or by the same user when used - // to call GetServiceLastAccessedDetail. - JobId *string `min:"36" 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 GenerateServiceLastAccessedDetailsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GenerateServiceLastAccessedDetailsOutput) GoString() string { - return s.String() -} - -// SetJobId sets the JobId field's value. -func (s *GenerateServiceLastAccessedDetailsOutput) SetJobId(v string) *GenerateServiceLastAccessedDetailsOutput { - s.JobId = &v - return s -} - -type GetAccessKeyLastUsedInput struct { - _ struct{} `type:"structure"` - - // The identifier of an access key. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters that can consist of any upper or lowercased letter - // or digit. - // - // AccessKeyId is a required field - AccessKeyId *string `min:"16" 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 GetAccessKeyLastUsedInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetAccessKeyLastUsedInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetAccessKeyLastUsedInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetAccessKeyLastUsedInput"} - if s.AccessKeyId == nil { - invalidParams.Add(request.NewErrParamRequired("AccessKeyId")) - } - if s.AccessKeyId != nil && len(*s.AccessKeyId) < 16 { - invalidParams.Add(request.NewErrParamMinLen("AccessKeyId", 16)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessKeyId sets the AccessKeyId field's value. -func (s *GetAccessKeyLastUsedInput) SetAccessKeyId(v string) *GetAccessKeyLastUsedInput { - s.AccessKeyId = &v - return s -} - -// Contains the response to a successful GetAccessKeyLastUsed request. It is -// also returned as a member of the AccessKeyMetaData structure returned by -// the ListAccessKeys action. -type GetAccessKeyLastUsedOutput struct { - _ struct{} `type:"structure"` - - // Contains information about the last time the access key was used. - AccessKeyLastUsed *AccessKeyLastUsed `type:"structure"` - - // The name of the IAM user that owns this access key. - UserName *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 GetAccessKeyLastUsedOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetAccessKeyLastUsedOutput) GoString() string { - return s.String() -} - -// SetAccessKeyLastUsed sets the AccessKeyLastUsed field's value. -func (s *GetAccessKeyLastUsedOutput) SetAccessKeyLastUsed(v *AccessKeyLastUsed) *GetAccessKeyLastUsedOutput { - s.AccessKeyLastUsed = v - return s -} - -// SetUserName sets the UserName field's value. -func (s *GetAccessKeyLastUsedOutput) SetUserName(v string) *GetAccessKeyLastUsedOutput { - s.UserName = &v - return s -} - -type GetAccountAuthorizationDetailsInput struct { - _ struct{} `type:"structure"` - - // A list of entity types used to filter the results. Only the entities that - // match the types you specify are included in the output. Use the value LocalManagedPolicy - // to include customer managed policies. - // - // The format for this parameter is a comma-separated (if more than one) list - // of strings. Each string value in the list must be one of the valid values - // listed below. - Filter []*string `type:"list" enum:"EntityType"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *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 GetAccountAuthorizationDetailsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetAccountAuthorizationDetailsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetAccountAuthorizationDetailsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetAccountAuthorizationDetailsInput"} - 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 -} - -// SetFilter sets the Filter field's value. -func (s *GetAccountAuthorizationDetailsInput) SetFilter(v []*string) *GetAccountAuthorizationDetailsInput { - s.Filter = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *GetAccountAuthorizationDetailsInput) SetMarker(v string) *GetAccountAuthorizationDetailsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *GetAccountAuthorizationDetailsInput) SetMaxItems(v int64) *GetAccountAuthorizationDetailsInput { - s.MaxItems = &v - return s -} - -// Contains the response to a successful GetAccountAuthorizationDetails request. -type GetAccountAuthorizationDetailsOutput struct { - _ struct{} `type:"structure"` - - // A list containing information about IAM groups. - GroupDetailList []*GroupDetail `type:"list"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // A list containing information about managed policies. - Policies []*ManagedPolicyDetail `type:"list"` - - // A list containing information about IAM roles. - RoleDetailList []*RoleDetail `type:"list"` - - // A list containing information about IAM users. - UserDetailList []*UserDetail `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 GetAccountAuthorizationDetailsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetAccountAuthorizationDetailsOutput) GoString() string { - return s.String() -} - -// SetGroupDetailList sets the GroupDetailList field's value. -func (s *GetAccountAuthorizationDetailsOutput) SetGroupDetailList(v []*GroupDetail) *GetAccountAuthorizationDetailsOutput { - s.GroupDetailList = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *GetAccountAuthorizationDetailsOutput) SetIsTruncated(v bool) *GetAccountAuthorizationDetailsOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *GetAccountAuthorizationDetailsOutput) SetMarker(v string) *GetAccountAuthorizationDetailsOutput { - s.Marker = &v - return s -} - -// SetPolicies sets the Policies field's value. -func (s *GetAccountAuthorizationDetailsOutput) SetPolicies(v []*ManagedPolicyDetail) *GetAccountAuthorizationDetailsOutput { - s.Policies = v - return s -} - -// SetRoleDetailList sets the RoleDetailList field's value. -func (s *GetAccountAuthorizationDetailsOutput) SetRoleDetailList(v []*RoleDetail) *GetAccountAuthorizationDetailsOutput { - s.RoleDetailList = v - return s -} - -// SetUserDetailList sets the UserDetailList field's value. -func (s *GetAccountAuthorizationDetailsOutput) SetUserDetailList(v []*UserDetail) *GetAccountAuthorizationDetailsOutput { - s.UserDetailList = v - return s -} - -type GetAccountPasswordPolicyInput 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 GetAccountPasswordPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetAccountPasswordPolicyInput) GoString() string { - return s.String() -} - -// Contains the response to a successful GetAccountPasswordPolicy request. -type GetAccountPasswordPolicyOutput struct { - _ struct{} `type:"structure"` - - // A structure that contains details about the account's password policy. - // - // PasswordPolicy is a required field - PasswordPolicy *PasswordPolicy `type:"structure" 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 GetAccountPasswordPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetAccountPasswordPolicyOutput) GoString() string { - return s.String() -} - -// SetPasswordPolicy sets the PasswordPolicy field's value. -func (s *GetAccountPasswordPolicyOutput) SetPasswordPolicy(v *PasswordPolicy) *GetAccountPasswordPolicyOutput { - s.PasswordPolicy = v - return s -} - -type GetAccountSummaryInput 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 GetAccountSummaryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetAccountSummaryInput) GoString() string { - return s.String() -} - -// Contains the response to a successful GetAccountSummary request. -type GetAccountSummaryOutput struct { - _ struct{} `type:"structure"` - - // A set of key–value pairs containing information about IAM entity usage - // and IAM quotas. - SummaryMap map[string]*int64 `type:"map"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetAccountSummaryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetAccountSummaryOutput) GoString() string { - return s.String() -} - -// SetSummaryMap sets the SummaryMap field's value. -func (s *GetAccountSummaryOutput) SetSummaryMap(v map[string]*int64) *GetAccountSummaryOutput { - s.SummaryMap = v - return s -} - -type GetContextKeysForCustomPolicyInput struct { - _ struct{} `type:"structure"` - - // A list of policies for which you want the list of context keys referenced - // in those policies. Each document is specified as a string containing the - // complete, valid JSON text of an IAM policy. - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // PolicyInputList is a required field - PolicyInputList []*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 GetContextKeysForCustomPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetContextKeysForCustomPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetContextKeysForCustomPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetContextKeysForCustomPolicyInput"} - if s.PolicyInputList == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyInputList")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyInputList sets the PolicyInputList field's value. -func (s *GetContextKeysForCustomPolicyInput) SetPolicyInputList(v []*string) *GetContextKeysForCustomPolicyInput { - s.PolicyInputList = v - return s -} - -// Contains the response to a successful GetContextKeysForPrincipalPolicy or -// GetContextKeysForCustomPolicy request. -type GetContextKeysForPolicyResponse struct { - _ struct{} `type:"structure"` - - // The list of context keys that are referenced in the input policies. - ContextKeyNames []*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 GetContextKeysForPolicyResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetContextKeysForPolicyResponse) GoString() string { - return s.String() -} - -// SetContextKeyNames sets the ContextKeyNames field's value. -func (s *GetContextKeysForPolicyResponse) SetContextKeyNames(v []*string) *GetContextKeysForPolicyResponse { - s.ContextKeyNames = v - return s -} - -type GetContextKeysForPrincipalPolicyInput struct { - _ struct{} `type:"structure"` - - // An optional list of additional policies for which you want the list of context - // keys that are referenced. - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - PolicyInputList []*string `type:"list"` - - // The ARN of a user, group, or role whose policies contain the context keys - // that you want listed. If you specify a user, the list includes context keys - // that are found in all policies that are attached to the user. The list also - // includes all groups that the user is a member of. If you pick a group or - // a role, then it includes only those context keys that are found in policies - // attached to that entity. Note that all parameters are shown in unencoded - // form here for clarity, but must be URL encoded to be included as a part of - // a real HTML request. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicySourceArn is a required field - PolicySourceArn *string `min:"20" 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 GetContextKeysForPrincipalPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetContextKeysForPrincipalPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetContextKeysForPrincipalPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetContextKeysForPrincipalPolicyInput"} - if s.PolicySourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicySourceArn")) - } - if s.PolicySourceArn != nil && len(*s.PolicySourceArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicySourceArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyInputList sets the PolicyInputList field's value. -func (s *GetContextKeysForPrincipalPolicyInput) SetPolicyInputList(v []*string) *GetContextKeysForPrincipalPolicyInput { - s.PolicyInputList = v - return s -} - -// SetPolicySourceArn sets the PolicySourceArn field's value. -func (s *GetContextKeysForPrincipalPolicyInput) SetPolicySourceArn(v string) *GetContextKeysForPrincipalPolicyInput { - s.PolicySourceArn = &v - return s -} - -type GetCredentialReportInput 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 GetCredentialReportInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetCredentialReportInput) GoString() string { - return s.String() -} - -// Contains the response to a successful GetCredentialReport request. -type GetCredentialReportOutput struct { - _ struct{} `type:"structure"` - - // Contains the credential report. The report is Base64-encoded. - // Content is automatically base64 encoded/decoded by the SDK. - Content []byte `type:"blob"` - - // The date and time when the credential report was created, in ISO 8601 date-time - // format (http://www.iso.org/iso/iso8601). - GeneratedTime *time.Time `type:"timestamp"` - - // The format (MIME type) of the credential report. - ReportFormat *string `type:"string" enum:"ReportFormatType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetCredentialReportOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetCredentialReportOutput) GoString() string { - return s.String() -} - -// SetContent sets the Content field's value. -func (s *GetCredentialReportOutput) SetContent(v []byte) *GetCredentialReportOutput { - s.Content = v - return s -} - -// SetGeneratedTime sets the GeneratedTime field's value. -func (s *GetCredentialReportOutput) SetGeneratedTime(v time.Time) *GetCredentialReportOutput { - s.GeneratedTime = &v - return s -} - -// SetReportFormat sets the ReportFormat field's value. -func (s *GetCredentialReportOutput) SetReportFormat(v string) *GetCredentialReportOutput { - s.ReportFormat = &v - return s -} - -type GetGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the group. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *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 GetGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetGroupInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 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 -} - -// SetGroupName sets the GroupName field's value. -func (s *GetGroupInput) SetGroupName(v string) *GetGroupInput { - s.GroupName = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *GetGroupInput) SetMarker(v string) *GetGroupInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *GetGroupInput) SetMaxItems(v int64) *GetGroupInput { - s.MaxItems = &v - return s -} - -// Contains the response to a successful GetGroup request. -type GetGroupOutput struct { - _ struct{} `type:"structure"` - - // A structure that contains details about the group. - // - // Group is a required field - Group *Group `type:"structure" required:"true"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // A list of users in the group. - // - // Users is a required field - Users []*User `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 GetGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetGroupOutput) GoString() string { - return s.String() -} - -// SetGroup sets the Group field's value. -func (s *GetGroupOutput) SetGroup(v *Group) *GetGroupOutput { - s.Group = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *GetGroupOutput) SetIsTruncated(v bool) *GetGroupOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *GetGroupOutput) SetMarker(v string) *GetGroupOutput { - s.Marker = &v - return s -} - -// SetUsers sets the Users field's value. -func (s *GetGroupOutput) SetUsers(v []*User) *GetGroupOutput { - s.Users = v - return s -} - -type GetGroupPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the group the policy is associated with. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // The name of the policy document to get. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // PolicyName is a required field - PolicyName *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 GetGroupPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetGroupPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetGroupPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetGroupPolicyInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *GetGroupPolicyInput) SetGroupName(v string) *GetGroupPolicyInput { - s.GroupName = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *GetGroupPolicyInput) SetPolicyName(v string) *GetGroupPolicyInput { - s.PolicyName = &v - return s -} - -// Contains the response to a successful GetGroupPolicy request. -type GetGroupPolicyOutput struct { - _ struct{} `type:"structure"` - - // The group the policy is associated with. - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // The policy document. - // - // IAM stores policies in JSON format. However, resources that were created - // using CloudFormation templates can be formatted in YAML. CloudFormation always - // converts a YAML policy to JSON format before submitting it to IAM. - // - // PolicyDocument is a required field - PolicyDocument *string `min:"1" type:"string" required:"true"` - - // The name of the policy. - // - // PolicyName is a required field - PolicyName *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 GetGroupPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetGroupPolicyOutput) GoString() string { - return s.String() -} - -// SetGroupName sets the GroupName field's value. -func (s *GetGroupPolicyOutput) SetGroupName(v string) *GetGroupPolicyOutput { - s.GroupName = &v - return s -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *GetGroupPolicyOutput) SetPolicyDocument(v string) *GetGroupPolicyOutput { - s.PolicyDocument = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *GetGroupPolicyOutput) SetPolicyName(v string) *GetGroupPolicyOutput { - s.PolicyName = &v - return s -} - -type GetInstanceProfileInput struct { - _ struct{} `type:"structure"` - - // The name of the instance profile to get information about. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // InstanceProfileName is a required field - InstanceProfileName *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 GetInstanceProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetInstanceProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetInstanceProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInstanceProfileInput"} - if s.InstanceProfileName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceProfileName")) - } - if s.InstanceProfileName != nil && len(*s.InstanceProfileName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InstanceProfileName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceProfileName sets the InstanceProfileName field's value. -func (s *GetInstanceProfileInput) SetInstanceProfileName(v string) *GetInstanceProfileInput { - s.InstanceProfileName = &v - return s -} - -// Contains the response to a successful GetInstanceProfile request. -type GetInstanceProfileOutput struct { - _ struct{} `type:"structure"` - - // A structure containing details about the instance profile. - // - // InstanceProfile is a required field - InstanceProfile *InstanceProfile `type:"structure" 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 GetInstanceProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetInstanceProfileOutput) GoString() string { - return s.String() -} - -// SetInstanceProfile sets the InstanceProfile field's value. -func (s *GetInstanceProfileOutput) SetInstanceProfile(v *InstanceProfile) *GetInstanceProfileOutput { - s.InstanceProfile = v - return s -} - -type GetLoginProfileInput struct { - _ struct{} `type:"structure"` - - // The name of the user whose login profile you want to retrieve. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *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 GetLoginProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetLoginProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetLoginProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetLoginProfileInput"} - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUserName sets the UserName field's value. -func (s *GetLoginProfileInput) SetUserName(v string) *GetLoginProfileInput { - s.UserName = &v - return s -} - -// Contains the response to a successful GetLoginProfile request. -type GetLoginProfileOutput struct { - _ struct{} `type:"structure"` - - // A structure containing the user name and the profile creation date for the - // user. - // - // LoginProfile is a required field - LoginProfile *LoginProfile `type:"structure" 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 GetLoginProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetLoginProfileOutput) GoString() string { - return s.String() -} - -// SetLoginProfile sets the LoginProfile field's value. -func (s *GetLoginProfileOutput) SetLoginProfile(v *LoginProfile) *GetLoginProfileOutput { - s.LoginProfile = v - return s -} - -type GetMFADeviceInput struct { - _ struct{} `type:"structure"` - - // Serial number that uniquely identifies the MFA device. For this API, we only - // accept FIDO security key ARNs (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html). - // - // SerialNumber is a required field - SerialNumber *string `min:"9" type:"string" required:"true"` - - // The friendly name identifying the user. - UserName *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 GetMFADeviceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetMFADeviceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetMFADeviceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetMFADeviceInput"} - if s.SerialNumber == nil { - invalidParams.Add(request.NewErrParamRequired("SerialNumber")) - } - if s.SerialNumber != nil && len(*s.SerialNumber) < 9 { - invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9)) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSerialNumber sets the SerialNumber field's value. -func (s *GetMFADeviceInput) SetSerialNumber(v string) *GetMFADeviceInput { - s.SerialNumber = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *GetMFADeviceInput) SetUserName(v string) *GetMFADeviceInput { - s.UserName = &v - return s -} - -type GetMFADeviceOutput struct { - _ struct{} `type:"structure"` - - // The certifications of a specified user's MFA device. We currently provide - // FIPS-140-2, FIPS-140-3, and FIDO certification levels obtained from FIDO - // Alliance Metadata Service (MDS) (https://fidoalliance.org/metadata/). - Certifications map[string]*string `type:"map"` - - // The date that a specified user's MFA device was first enabled. - EnableDate *time.Time `type:"timestamp"` - - // Serial number that uniquely identifies the MFA device. For this API, we only - // accept FIDO security key ARNs (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html). - // - // SerialNumber is a required field - SerialNumber *string `min:"9" type:"string" required:"true"` - - // The friendly name identifying the user. - UserName *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 GetMFADeviceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetMFADeviceOutput) GoString() string { - return s.String() -} - -// SetCertifications sets the Certifications field's value. -func (s *GetMFADeviceOutput) SetCertifications(v map[string]*string) *GetMFADeviceOutput { - s.Certifications = v - return s -} - -// SetEnableDate sets the EnableDate field's value. -func (s *GetMFADeviceOutput) SetEnableDate(v time.Time) *GetMFADeviceOutput { - s.EnableDate = &v - return s -} - -// SetSerialNumber sets the SerialNumber field's value. -func (s *GetMFADeviceOutput) SetSerialNumber(v string) *GetMFADeviceOutput { - s.SerialNumber = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *GetMFADeviceOutput) SetUserName(v string) *GetMFADeviceOutput { - s.UserName = &v - return s -} - -type GetOpenIDConnectProviderInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the OIDC provider resource object in IAM - // to get information for. You can get a list of OIDC provider resource ARNs - // by using the ListOpenIDConnectProviders operation. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // OpenIDConnectProviderArn is a required field - OpenIDConnectProviderArn *string `min:"20" 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 GetOpenIDConnectProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetOpenIDConnectProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetOpenIDConnectProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetOpenIDConnectProviderInput"} - if s.OpenIDConnectProviderArn == nil { - invalidParams.Add(request.NewErrParamRequired("OpenIDConnectProviderArn")) - } - if s.OpenIDConnectProviderArn != nil && len(*s.OpenIDConnectProviderArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("OpenIDConnectProviderArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOpenIDConnectProviderArn sets the OpenIDConnectProviderArn field's value. -func (s *GetOpenIDConnectProviderInput) SetOpenIDConnectProviderArn(v string) *GetOpenIDConnectProviderInput { - s.OpenIDConnectProviderArn = &v - return s -} - -// Contains the response to a successful GetOpenIDConnectProvider request. -type GetOpenIDConnectProviderOutput struct { - _ struct{} `type:"structure"` - - // A list of client IDs (also known as audiences) that are associated with the - // specified IAM OIDC provider resource object. For more information, see CreateOpenIDConnectProvider. - ClientIDList []*string `type:"list"` - - // The date and time when the IAM OIDC provider resource object was created - // in the Amazon Web Services account. - CreateDate *time.Time `type:"timestamp"` - - // A list of tags that are attached to the specified IAM OIDC provider. The - // returned list of tags is sorted by tag key. For more information about tagging, - // see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - Tags []*Tag `type:"list"` - - // A list of certificate thumbprints that are associated with the specified - // IAM OIDC provider resource object. For more information, see CreateOpenIDConnectProvider. - ThumbprintList []*string `type:"list"` - - // The URL that the IAM OIDC provider resource object is associated with. For - // more information, see CreateOpenIDConnectProvider. - Url *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 GetOpenIDConnectProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetOpenIDConnectProviderOutput) GoString() string { - return s.String() -} - -// SetClientIDList sets the ClientIDList field's value. -func (s *GetOpenIDConnectProviderOutput) SetClientIDList(v []*string) *GetOpenIDConnectProviderOutput { - s.ClientIDList = v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *GetOpenIDConnectProviderOutput) SetCreateDate(v time.Time) *GetOpenIDConnectProviderOutput { - s.CreateDate = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *GetOpenIDConnectProviderOutput) SetTags(v []*Tag) *GetOpenIDConnectProviderOutput { - s.Tags = v - return s -} - -// SetThumbprintList sets the ThumbprintList field's value. -func (s *GetOpenIDConnectProviderOutput) SetThumbprintList(v []*string) *GetOpenIDConnectProviderOutput { - s.ThumbprintList = v - return s -} - -// SetUrl sets the Url field's value. -func (s *GetOpenIDConnectProviderOutput) SetUrl(v string) *GetOpenIDConnectProviderOutput { - s.Url = &v - return s -} - -type GetOrganizationsAccessReportInput struct { - _ struct{} `type:"structure"` - - // The identifier of the request generated by the GenerateOrganizationsAccessReport - // operation. - // - // JobId is a required field - JobId *string `min:"36" type:"string" required:"true"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The key that is used to sort the results. If you choose the namespace key, - // the results are returned in alphabetical order. If you choose the time key, - // the results are sorted numerically by the date and time. - SortKey *string `type:"string" enum:"SortKeyType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetOrganizationsAccessReportInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetOrganizationsAccessReportInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetOrganizationsAccessReportInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetOrganizationsAccessReportInput"} - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.JobId != nil && len(*s.JobId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("JobId", 36)) - } - 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 -} - -// SetJobId sets the JobId field's value. -func (s *GetOrganizationsAccessReportInput) SetJobId(v string) *GetOrganizationsAccessReportInput { - s.JobId = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *GetOrganizationsAccessReportInput) SetMarker(v string) *GetOrganizationsAccessReportInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *GetOrganizationsAccessReportInput) SetMaxItems(v int64) *GetOrganizationsAccessReportInput { - s.MaxItems = &v - return s -} - -// SetSortKey sets the SortKey field's value. -func (s *GetOrganizationsAccessReportInput) SetSortKey(v string) *GetOrganizationsAccessReportInput { - s.SortKey = &v - return s -} - -type GetOrganizationsAccessReportOutput struct { - _ struct{} `type:"structure"` - - // An object that contains details about the most recent attempt to access the - // service. - AccessDetails []*AccessDetail `type:"list"` - - // Contains information about the reason that the operation failed. - // - // This data type is used as a response element in the GetOrganizationsAccessReport, - // GetServiceLastAccessedDetails, and GetServiceLastAccessedDetailsWithEntities - // operations. - ErrorDetails *ErrorDetails `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the generated report job was completed or failed. - // - // This field is null if the job is still in progress, as indicated by a job - // status value of IN_PROGRESS. - JobCompletionDate *time.Time `type:"timestamp"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the report job was created. - // - // JobCreationDate is a required field - JobCreationDate *time.Time `type:"timestamp" required:"true"` - - // The status of the job. - // - // JobStatus is a required field - JobStatus *string `type:"string" required:"true" enum:"JobStatusType"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `min:"1" type:"string"` - - // The number of services that the applicable SCPs allow account principals - // to access. - NumberOfServicesAccessible *int64 `type:"integer"` - - // The number of services that account principals are allowed but did not attempt - // to access. - NumberOfServicesNotAccessed *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 GetOrganizationsAccessReportOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetOrganizationsAccessReportOutput) GoString() string { - return s.String() -} - -// SetAccessDetails sets the AccessDetails field's value. -func (s *GetOrganizationsAccessReportOutput) SetAccessDetails(v []*AccessDetail) *GetOrganizationsAccessReportOutput { - s.AccessDetails = v - return s -} - -// SetErrorDetails sets the ErrorDetails field's value. -func (s *GetOrganizationsAccessReportOutput) SetErrorDetails(v *ErrorDetails) *GetOrganizationsAccessReportOutput { - s.ErrorDetails = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *GetOrganizationsAccessReportOutput) SetIsTruncated(v bool) *GetOrganizationsAccessReportOutput { - s.IsTruncated = &v - return s -} - -// SetJobCompletionDate sets the JobCompletionDate field's value. -func (s *GetOrganizationsAccessReportOutput) SetJobCompletionDate(v time.Time) *GetOrganizationsAccessReportOutput { - s.JobCompletionDate = &v - return s -} - -// SetJobCreationDate sets the JobCreationDate field's value. -func (s *GetOrganizationsAccessReportOutput) SetJobCreationDate(v time.Time) *GetOrganizationsAccessReportOutput { - s.JobCreationDate = &v - return s -} - -// SetJobStatus sets the JobStatus field's value. -func (s *GetOrganizationsAccessReportOutput) SetJobStatus(v string) *GetOrganizationsAccessReportOutput { - s.JobStatus = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *GetOrganizationsAccessReportOutput) SetMarker(v string) *GetOrganizationsAccessReportOutput { - s.Marker = &v - return s -} - -// SetNumberOfServicesAccessible sets the NumberOfServicesAccessible field's value. -func (s *GetOrganizationsAccessReportOutput) SetNumberOfServicesAccessible(v int64) *GetOrganizationsAccessReportOutput { - s.NumberOfServicesAccessible = &v - return s -} - -// SetNumberOfServicesNotAccessed sets the NumberOfServicesNotAccessed field's value. -func (s *GetOrganizationsAccessReportOutput) SetNumberOfServicesNotAccessed(v int64) *GetOrganizationsAccessReportOutput { - s.NumberOfServicesNotAccessed = &v - return s -} - -type GetPolicyInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the managed policy that you want information - // about. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicyArn is a required field - PolicyArn *string `min:"20" 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 GetPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetPolicyInput"} - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *GetPolicyInput) SetPolicyArn(v string) *GetPolicyInput { - s.PolicyArn = &v - return s -} - -// Contains the response to a successful GetPolicy request. -type GetPolicyOutput struct { - _ struct{} `type:"structure"` - - // A structure containing details about the policy. - Policy *Policy `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 GetPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetPolicyOutput) GoString() string { - return s.String() -} - -// SetPolicy sets the Policy field's value. -func (s *GetPolicyOutput) SetPolicy(v *Policy) *GetPolicyOutput { - s.Policy = v - return s -} - -type GetPolicyVersionInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the managed policy that you want information - // about. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicyArn is a required field - PolicyArn *string `min:"20" type:"string" required:"true"` - - // Identifies the policy version to retrieve. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters that consists of the lowercase letter 'v' followed - // by one or two digits, and optionally followed by a period '.' and a string - // of letters and digits. - // - // VersionId is a required field - VersionId *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 GetPolicyVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetPolicyVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetPolicyVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetPolicyVersionInput"} - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - if s.VersionId == nil { - invalidParams.Add(request.NewErrParamRequired("VersionId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *GetPolicyVersionInput) SetPolicyArn(v string) *GetPolicyVersionInput { - s.PolicyArn = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *GetPolicyVersionInput) SetVersionId(v string) *GetPolicyVersionInput { - s.VersionId = &v - return s -} - -// Contains the response to a successful GetPolicyVersion request. -type GetPolicyVersionOutput struct { - _ struct{} `type:"structure"` - - // A structure containing details about the policy version. - PolicyVersion *PolicyVersion `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 GetPolicyVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetPolicyVersionOutput) GoString() string { - return s.String() -} - -// SetPolicyVersion sets the PolicyVersion field's value. -func (s *GetPolicyVersionOutput) SetPolicyVersion(v *PolicyVersion) *GetPolicyVersionOutput { - s.PolicyVersion = v - return s -} - -type GetRoleInput struct { - _ struct{} `type:"structure"` - - // The name of the IAM role to get information about. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *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 GetRoleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetRoleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRoleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRoleInput"} - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRoleName sets the RoleName field's value. -func (s *GetRoleInput) SetRoleName(v string) *GetRoleInput { - s.RoleName = &v - return s -} - -// Contains the response to a successful GetRole request. -type GetRoleOutput struct { - _ struct{} `type:"structure"` - - // A structure containing details about the IAM role. - // - // Role is a required field - Role *Role `type:"structure" 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 GetRoleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetRoleOutput) GoString() string { - return s.String() -} - -// SetRole sets the Role field's value. -func (s *GetRoleOutput) SetRole(v *Role) *GetRoleOutput { - s.Role = v - return s -} - -type GetRolePolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the policy document to get. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` - - // The name of the role associated with the policy. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *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 GetRolePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetRolePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetRolePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetRolePolicyInput"} - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyName sets the PolicyName field's value. -func (s *GetRolePolicyInput) SetPolicyName(v string) *GetRolePolicyInput { - s.PolicyName = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *GetRolePolicyInput) SetRoleName(v string) *GetRolePolicyInput { - s.RoleName = &v - return s -} - -// Contains the response to a successful GetRolePolicy request. -type GetRolePolicyOutput struct { - _ struct{} `type:"structure"` - - // The policy document. - // - // IAM stores policies in JSON format. However, resources that were created - // using CloudFormation templates can be formatted in YAML. CloudFormation always - // converts a YAML policy to JSON format before submitting it to IAM. - // - // PolicyDocument is a required field - PolicyDocument *string `min:"1" type:"string" required:"true"` - - // The name of the policy. - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` - - // The role the policy is associated with. - // - // RoleName is a required field - RoleName *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 GetRolePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetRolePolicyOutput) GoString() string { - return s.String() -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *GetRolePolicyOutput) SetPolicyDocument(v string) *GetRolePolicyOutput { - s.PolicyDocument = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *GetRolePolicyOutput) SetPolicyName(v string) *GetRolePolicyOutput { - s.PolicyName = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *GetRolePolicyOutput) SetRoleName(v string) *GetRolePolicyOutput { - s.RoleName = &v - return s -} - -type GetSAMLProviderInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the SAML provider resource object in IAM - // to get information about. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // SAMLProviderArn is a required field - SAMLProviderArn *string `min:"20" 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 GetSAMLProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetSAMLProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetSAMLProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetSAMLProviderInput"} - if s.SAMLProviderArn == nil { - invalidParams.Add(request.NewErrParamRequired("SAMLProviderArn")) - } - if s.SAMLProviderArn != nil && len(*s.SAMLProviderArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("SAMLProviderArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSAMLProviderArn sets the SAMLProviderArn field's value. -func (s *GetSAMLProviderInput) SetSAMLProviderArn(v string) *GetSAMLProviderInput { - s.SAMLProviderArn = &v - return s -} - -// Contains the response to a successful GetSAMLProvider request. -type GetSAMLProviderOutput struct { - _ struct{} `type:"structure"` - - // The date and time when the SAML provider was created. - CreateDate *time.Time `type:"timestamp"` - - // The XML metadata document that includes information about an identity provider. - SAMLMetadataDocument *string `min:"1000" type:"string"` - - // A list of tags that are attached to the specified IAM SAML provider. The - // returned list of tags is sorted by tag key. For more information about tagging, - // see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - Tags []*Tag `type:"list"` - - // The expiration date and time for the SAML provider. - ValidUntil *time.Time `type:"timestamp"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetSAMLProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetSAMLProviderOutput) GoString() string { - return s.String() -} - -// SetCreateDate sets the CreateDate field's value. -func (s *GetSAMLProviderOutput) SetCreateDate(v time.Time) *GetSAMLProviderOutput { - s.CreateDate = &v - return s -} - -// SetSAMLMetadataDocument sets the SAMLMetadataDocument field's value. -func (s *GetSAMLProviderOutput) SetSAMLMetadataDocument(v string) *GetSAMLProviderOutput { - s.SAMLMetadataDocument = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *GetSAMLProviderOutput) SetTags(v []*Tag) *GetSAMLProviderOutput { - s.Tags = v - return s -} - -// SetValidUntil sets the ValidUntil field's value. -func (s *GetSAMLProviderOutput) SetValidUntil(v time.Time) *GetSAMLProviderOutput { - s.ValidUntil = &v - return s -} - -type GetSSHPublicKeyInput struct { - _ struct{} `type:"structure"` - - // Specifies the public key encoding format to use in the response. To retrieve - // the public key in ssh-rsa format, use SSH. To retrieve the public key in - // PEM format, use PEM. - // - // Encoding is a required field - Encoding *string `type:"string" required:"true" enum:"EncodingType"` - - // The unique identifier for the SSH public key. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters that can consist of any upper or lowercased letter - // or digit. - // - // SSHPublicKeyId is a required field - SSHPublicKeyId *string `min:"20" type:"string" required:"true"` - - // The name of the IAM user associated with the SSH public key. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *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 GetSSHPublicKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetSSHPublicKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetSSHPublicKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetSSHPublicKeyInput"} - if s.Encoding == nil { - invalidParams.Add(request.NewErrParamRequired("Encoding")) - } - if s.SSHPublicKeyId == nil { - invalidParams.Add(request.NewErrParamRequired("SSHPublicKeyId")) - } - if s.SSHPublicKeyId != nil && len(*s.SSHPublicKeyId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("SSHPublicKeyId", 20)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEncoding sets the Encoding field's value. -func (s *GetSSHPublicKeyInput) SetEncoding(v string) *GetSSHPublicKeyInput { - s.Encoding = &v - return s -} - -// SetSSHPublicKeyId sets the SSHPublicKeyId field's value. -func (s *GetSSHPublicKeyInput) SetSSHPublicKeyId(v string) *GetSSHPublicKeyInput { - s.SSHPublicKeyId = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *GetSSHPublicKeyInput) SetUserName(v string) *GetSSHPublicKeyInput { - s.UserName = &v - return s -} - -// Contains the response to a successful GetSSHPublicKey request. -type GetSSHPublicKeyOutput struct { - _ struct{} `type:"structure"` - - // A structure containing details about the SSH public key. - SSHPublicKey *SSHPublicKey `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 GetSSHPublicKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetSSHPublicKeyOutput) GoString() string { - return s.String() -} - -// SetSSHPublicKey sets the SSHPublicKey field's value. -func (s *GetSSHPublicKeyOutput) SetSSHPublicKey(v *SSHPublicKey) *GetSSHPublicKeyOutput { - s.SSHPublicKey = v - return s -} - -type GetServerCertificateInput struct { - _ struct{} `type:"structure"` - - // The name of the server certificate you want to retrieve information about. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // ServerCertificateName is a required field - ServerCertificateName *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 GetServerCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetServerCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetServerCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetServerCertificateInput"} - if s.ServerCertificateName == nil { - invalidParams.Add(request.NewErrParamRequired("ServerCertificateName")) - } - if s.ServerCertificateName != nil && len(*s.ServerCertificateName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServerCertificateName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServerCertificateName sets the ServerCertificateName field's value. -func (s *GetServerCertificateInput) SetServerCertificateName(v string) *GetServerCertificateInput { - s.ServerCertificateName = &v - return s -} - -// Contains the response to a successful GetServerCertificate request. -type GetServerCertificateOutput struct { - _ struct{} `type:"structure"` - - // A structure containing details about the server certificate. - // - // ServerCertificate is a required field - ServerCertificate *ServerCertificate `type:"structure" 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 GetServerCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetServerCertificateOutput) GoString() string { - return s.String() -} - -// SetServerCertificate sets the ServerCertificate field's value. -func (s *GetServerCertificateOutput) SetServerCertificate(v *ServerCertificate) *GetServerCertificateOutput { - s.ServerCertificate = v - return s -} - -type GetServiceLastAccessedDetailsInput struct { - _ struct{} `type:"structure"` - - // The ID of the request generated by the GenerateServiceLastAccessedDetails - // operation. The JobId returned by GenerateServiceLastAccessedDetail must be - // used by the same role within a session, or by the same user when used to - // call GetServiceLastAccessedDetail. - // - // JobId is a required field - JobId *string `min:"36" type:"string" required:"true"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *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 GetServiceLastAccessedDetailsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetServiceLastAccessedDetailsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetServiceLastAccessedDetailsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetServiceLastAccessedDetailsInput"} - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.JobId != nil && len(*s.JobId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("JobId", 36)) - } - 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 -} - -// SetJobId sets the JobId field's value. -func (s *GetServiceLastAccessedDetailsInput) SetJobId(v string) *GetServiceLastAccessedDetailsInput { - s.JobId = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *GetServiceLastAccessedDetailsInput) SetMarker(v string) *GetServiceLastAccessedDetailsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *GetServiceLastAccessedDetailsInput) SetMaxItems(v int64) *GetServiceLastAccessedDetailsInput { - s.MaxItems = &v - return s -} - -type GetServiceLastAccessedDetailsOutput struct { - _ struct{} `type:"structure"` - - // An object that contains details about the reason the operation failed. - Error *ErrorDetails `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the generated report job was completed or failed. - // - // This field is null if the job is still in progress, as indicated by a job - // status value of IN_PROGRESS. - // - // JobCompletionDate is a required field - JobCompletionDate *time.Time `type:"timestamp" required:"true"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the report job was created. - // - // JobCreationDate is a required field - JobCreationDate *time.Time `type:"timestamp" required:"true"` - - // The status of the job. - // - // JobStatus is a required field - JobStatus *string `type:"string" required:"true" enum:"JobStatusType"` - - // The type of job. Service jobs return information about when each service - // was last accessed. Action jobs also include information about when tracked - // actions within the service were last accessed. - JobType *string `type:"string" enum:"AccessAdvisorUsageGranularityType"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // A ServiceLastAccessed object that contains details about the most recent - // attempt to access the service. - // - // ServicesLastAccessed is a required field - ServicesLastAccessed []*ServiceLastAccessed `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 GetServiceLastAccessedDetailsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetServiceLastAccessedDetailsOutput) GoString() string { - return s.String() -} - -// SetError sets the Error field's value. -func (s *GetServiceLastAccessedDetailsOutput) SetError(v *ErrorDetails) *GetServiceLastAccessedDetailsOutput { - s.Error = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *GetServiceLastAccessedDetailsOutput) SetIsTruncated(v bool) *GetServiceLastAccessedDetailsOutput { - s.IsTruncated = &v - return s -} - -// SetJobCompletionDate sets the JobCompletionDate field's value. -func (s *GetServiceLastAccessedDetailsOutput) SetJobCompletionDate(v time.Time) *GetServiceLastAccessedDetailsOutput { - s.JobCompletionDate = &v - return s -} - -// SetJobCreationDate sets the JobCreationDate field's value. -func (s *GetServiceLastAccessedDetailsOutput) SetJobCreationDate(v time.Time) *GetServiceLastAccessedDetailsOutput { - s.JobCreationDate = &v - return s -} - -// SetJobStatus sets the JobStatus field's value. -func (s *GetServiceLastAccessedDetailsOutput) SetJobStatus(v string) *GetServiceLastAccessedDetailsOutput { - s.JobStatus = &v - return s -} - -// SetJobType sets the JobType field's value. -func (s *GetServiceLastAccessedDetailsOutput) SetJobType(v string) *GetServiceLastAccessedDetailsOutput { - s.JobType = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *GetServiceLastAccessedDetailsOutput) SetMarker(v string) *GetServiceLastAccessedDetailsOutput { - s.Marker = &v - return s -} - -// SetServicesLastAccessed sets the ServicesLastAccessed field's value. -func (s *GetServiceLastAccessedDetailsOutput) SetServicesLastAccessed(v []*ServiceLastAccessed) *GetServiceLastAccessedDetailsOutput { - s.ServicesLastAccessed = v - return s -} - -type GetServiceLastAccessedDetailsWithEntitiesInput struct { - _ struct{} `type:"structure"` - - // The ID of the request generated by the GenerateServiceLastAccessedDetails - // operation. - // - // JobId is a required field - JobId *string `min:"36" type:"string" required:"true"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The service namespace for an Amazon Web Services service. Provide the service - // namespace to learn when the IAM entity last attempted to access the specified - // service. - // - // To learn the service namespace for a service, see Actions, resources, and - // condition keys for Amazon Web Services services (https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html) - // in the IAM User Guide. Choose the name of the service to view details for - // that service. In the first paragraph, find the service prefix. For example, - // (service prefix: a4b). For more information about service namespaces, see - // Amazon Web Services service namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. - // - // ServiceNamespace is a required field - ServiceNamespace *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 GetServiceLastAccessedDetailsWithEntitiesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetServiceLastAccessedDetailsWithEntitiesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetServiceLastAccessedDetailsWithEntitiesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetServiceLastAccessedDetailsWithEntitiesInput"} - if s.JobId == nil { - invalidParams.Add(request.NewErrParamRequired("JobId")) - } - if s.JobId != nil && len(*s.JobId) < 36 { - invalidParams.Add(request.NewErrParamMinLen("JobId", 36)) - } - 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.ServiceNamespace == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceNamespace")) - } - if s.ServiceNamespace != nil && len(*s.ServiceNamespace) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServiceNamespace", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetJobId sets the JobId field's value. -func (s *GetServiceLastAccessedDetailsWithEntitiesInput) SetJobId(v string) *GetServiceLastAccessedDetailsWithEntitiesInput { - s.JobId = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *GetServiceLastAccessedDetailsWithEntitiesInput) SetMarker(v string) *GetServiceLastAccessedDetailsWithEntitiesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *GetServiceLastAccessedDetailsWithEntitiesInput) SetMaxItems(v int64) *GetServiceLastAccessedDetailsWithEntitiesInput { - s.MaxItems = &v - return s -} - -// SetServiceNamespace sets the ServiceNamespace field's value. -func (s *GetServiceLastAccessedDetailsWithEntitiesInput) SetServiceNamespace(v string) *GetServiceLastAccessedDetailsWithEntitiesInput { - s.ServiceNamespace = &v - return s -} - -type GetServiceLastAccessedDetailsWithEntitiesOutput struct { - _ struct{} `type:"structure"` - - // An EntityDetailsList object that contains details about when an IAM entity - // (user or role) used group or policy permissions in an attempt to access the - // specified Amazon Web Services service. - // - // EntityDetailsList is a required field - EntityDetailsList []*EntityDetails `type:"list" required:"true"` - - // An object that contains details about the reason the operation failed. - Error *ErrorDetails `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the generated report job was completed or failed. - // - // This field is null if the job is still in progress, as indicated by a job - // status value of IN_PROGRESS. - // - // JobCompletionDate is a required field - JobCompletionDate *time.Time `type:"timestamp" required:"true"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the report job was created. - // - // JobCreationDate is a required field - JobCreationDate *time.Time `type:"timestamp" required:"true"` - - // The status of the job. - // - // JobStatus is a required field - JobStatus *string `type:"string" required:"true" enum:"JobStatusType"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *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 GetServiceLastAccessedDetailsWithEntitiesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetServiceLastAccessedDetailsWithEntitiesOutput) GoString() string { - return s.String() -} - -// SetEntityDetailsList sets the EntityDetailsList field's value. -func (s *GetServiceLastAccessedDetailsWithEntitiesOutput) SetEntityDetailsList(v []*EntityDetails) *GetServiceLastAccessedDetailsWithEntitiesOutput { - s.EntityDetailsList = v - return s -} - -// SetError sets the Error field's value. -func (s *GetServiceLastAccessedDetailsWithEntitiesOutput) SetError(v *ErrorDetails) *GetServiceLastAccessedDetailsWithEntitiesOutput { - s.Error = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *GetServiceLastAccessedDetailsWithEntitiesOutput) SetIsTruncated(v bool) *GetServiceLastAccessedDetailsWithEntitiesOutput { - s.IsTruncated = &v - return s -} - -// SetJobCompletionDate sets the JobCompletionDate field's value. -func (s *GetServiceLastAccessedDetailsWithEntitiesOutput) SetJobCompletionDate(v time.Time) *GetServiceLastAccessedDetailsWithEntitiesOutput { - s.JobCompletionDate = &v - return s -} - -// SetJobCreationDate sets the JobCreationDate field's value. -func (s *GetServiceLastAccessedDetailsWithEntitiesOutput) SetJobCreationDate(v time.Time) *GetServiceLastAccessedDetailsWithEntitiesOutput { - s.JobCreationDate = &v - return s -} - -// SetJobStatus sets the JobStatus field's value. -func (s *GetServiceLastAccessedDetailsWithEntitiesOutput) SetJobStatus(v string) *GetServiceLastAccessedDetailsWithEntitiesOutput { - s.JobStatus = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *GetServiceLastAccessedDetailsWithEntitiesOutput) SetMarker(v string) *GetServiceLastAccessedDetailsWithEntitiesOutput { - s.Marker = &v - return s -} - -type GetServiceLinkedRoleDeletionStatusInput struct { - _ struct{} `type:"structure"` - - // The deletion task identifier. This identifier is returned by the DeleteServiceLinkedRole - // operation in the format task/aws-service-role///. - // - // DeletionTaskId is a required field - DeletionTaskId *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 GetServiceLinkedRoleDeletionStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetServiceLinkedRoleDeletionStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetServiceLinkedRoleDeletionStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetServiceLinkedRoleDeletionStatusInput"} - if s.DeletionTaskId == nil { - invalidParams.Add(request.NewErrParamRequired("DeletionTaskId")) - } - if s.DeletionTaskId != nil && len(*s.DeletionTaskId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("DeletionTaskId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeletionTaskId sets the DeletionTaskId field's value. -func (s *GetServiceLinkedRoleDeletionStatusInput) SetDeletionTaskId(v string) *GetServiceLinkedRoleDeletionStatusInput { - s.DeletionTaskId = &v - return s -} - -type GetServiceLinkedRoleDeletionStatusOutput struct { - _ struct{} `type:"structure"` - - // An object that contains details about the reason the deletion failed. - Reason *DeletionTaskFailureReasonType `type:"structure"` - - // The status of the deletion. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"DeletionTaskStatusType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetServiceLinkedRoleDeletionStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetServiceLinkedRoleDeletionStatusOutput) GoString() string { - return s.String() -} - -// SetReason sets the Reason field's value. -func (s *GetServiceLinkedRoleDeletionStatusOutput) SetReason(v *DeletionTaskFailureReasonType) *GetServiceLinkedRoleDeletionStatusOutput { - s.Reason = v - return s -} - -// SetStatus sets the Status field's value. -func (s *GetServiceLinkedRoleDeletionStatusOutput) SetStatus(v string) *GetServiceLinkedRoleDeletionStatusOutput { - s.Status = &v - return s -} - -type GetUserInput struct { - _ struct{} `type:"structure"` - - // The name of the user to get information about. - // - // This parameter is optional. If it is not included, it defaults to the user - // making the request. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - UserName *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 GetUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetUserInput"} - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetUserName sets the UserName field's value. -func (s *GetUserInput) SetUserName(v string) *GetUserInput { - s.UserName = &v - return s -} - -// Contains the response to a successful GetUser request. -type GetUserOutput struct { - _ struct{} `type:"structure"` - - // A structure containing details about the IAM user. - // - // Due to a service issue, password last used data does not include password - // use from May 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last - // sign-in (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_finding-unused.html) - // dates shown in the IAM console and password last used dates in the IAM credential - // report (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html), - // and returned by this operation. If users signed in during the affected time, - // the password last used date that is returned is the date the user last signed - // in before May 3, 2018. For users that signed in after May 23, 2018 14:08 - // PDT, the returned password last used date is accurate. - // - // You can use password last used information to identify unused credentials - // for deletion. For example, you might delete users who did not sign in to - // Amazon Web Services in the last 90 days. In cases like this, we recommend - // that you adjust your evaluation window to include dates after May 23, 2018. - // Alternatively, if your users use access keys to access Amazon Web Services - // programmatically you can refer to access key last used information because - // it is accurate for all dates. - // - // User is a required field - User *User `type:"structure" 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 GetUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetUserOutput) GoString() string { - return s.String() -} - -// SetUser sets the User field's value. -func (s *GetUserOutput) SetUser(v *User) *GetUserOutput { - s.User = v - return s -} - -type GetUserPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the policy document to get. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` - - // The name of the user who the policy is associated with. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *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 GetUserPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetUserPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetUserPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetUserPolicyInput"} - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyName sets the PolicyName field's value. -func (s *GetUserPolicyInput) SetPolicyName(v string) *GetUserPolicyInput { - s.PolicyName = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *GetUserPolicyInput) SetUserName(v string) *GetUserPolicyInput { - s.UserName = &v - return s -} - -// Contains the response to a successful GetUserPolicy request. -type GetUserPolicyOutput struct { - _ struct{} `type:"structure"` - - // The policy document. - // - // IAM stores policies in JSON format. However, resources that were created - // using CloudFormation templates can be formatted in YAML. CloudFormation always - // converts a YAML policy to JSON format before submitting it to IAM. - // - // PolicyDocument is a required field - PolicyDocument *string `min:"1" type:"string" required:"true"` - - // The name of the policy. - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` - - // The user the policy is associated with. - // - // UserName is a required field - UserName *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 GetUserPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetUserPolicyOutput) GoString() string { - return s.String() -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *GetUserPolicyOutput) SetPolicyDocument(v string) *GetUserPolicyOutput { - s.PolicyDocument = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *GetUserPolicyOutput) SetPolicyName(v string) *GetUserPolicyOutput { - s.PolicyName = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *GetUserPolicyOutput) SetUserName(v string) *GetUserPolicyOutput { - s.UserName = &v - return s -} - -// Contains information about an IAM group entity. -// -// This data type is used as a response element in the following operations: -// -// - CreateGroup -// -// - GetGroup -// -// - ListGroups -type Group struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) specifying the group. For more information - // about ARNs and how to use them in policies, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // Arn is a required field - Arn *string `min:"20" type:"string" required:"true"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the group was created. - // - // CreateDate is a required field - CreateDate *time.Time `type:"timestamp" required:"true"` - - // The stable and unique string identifying the group. For more information - // about IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // GroupId is a required field - GroupId *string `min:"16" type:"string" required:"true"` - - // The friendly name that identifies the group. - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // The path to the group. For more information about paths, see IAM identifiers - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // Path is a required field - Path *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 Group) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Group) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Group) SetArn(v string) *Group { - s.Arn = &v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *Group) SetCreateDate(v time.Time) *Group { - s.CreateDate = &v - return s -} - -// SetGroupId sets the GroupId field's value. -func (s *Group) SetGroupId(v string) *Group { - s.GroupId = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *Group) SetGroupName(v string) *Group { - s.GroupName = &v - return s -} - -// SetPath sets the Path field's value. -func (s *Group) SetPath(v string) *Group { - s.Path = &v - return s -} - -// Contains information about an IAM group, including all of the group's policies. -// -// This data type is used as a response element in the GetAccountAuthorizationDetails -// operation. -type GroupDetail struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web - // Services resources. - // - // For more information about ARNs, go to Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - Arn *string `min:"20" type:"string"` - - // A list of the managed policies attached to the group. - AttachedManagedPolicies []*AttachedPolicy `type:"list"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the group was created. - CreateDate *time.Time `type:"timestamp"` - - // The stable and unique string identifying the group. For more information - // about IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - GroupId *string `min:"16" type:"string"` - - // The friendly name that identifies the group. - GroupName *string `min:"1" type:"string"` - - // A list of the inline policies embedded in the group. - GroupPolicyList []*PolicyDetail `type:"list"` - - // The path to the group. For more information about paths, see IAM identifiers - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - 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 GroupDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GroupDetail) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *GroupDetail) SetArn(v string) *GroupDetail { - s.Arn = &v - return s -} - -// SetAttachedManagedPolicies sets the AttachedManagedPolicies field's value. -func (s *GroupDetail) SetAttachedManagedPolicies(v []*AttachedPolicy) *GroupDetail { - s.AttachedManagedPolicies = v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *GroupDetail) SetCreateDate(v time.Time) *GroupDetail { - s.CreateDate = &v - return s -} - -// SetGroupId sets the GroupId field's value. -func (s *GroupDetail) SetGroupId(v string) *GroupDetail { - s.GroupId = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *GroupDetail) SetGroupName(v string) *GroupDetail { - s.GroupName = &v - return s -} - -// SetGroupPolicyList sets the GroupPolicyList field's value. -func (s *GroupDetail) SetGroupPolicyList(v []*PolicyDetail) *GroupDetail { - s.GroupPolicyList = v - return s -} - -// SetPath sets the Path field's value. -func (s *GroupDetail) SetPath(v string) *GroupDetail { - s.Path = &v - return s -} - -// Contains information about an instance profile. -// -// This data type is used as a response element in the following operations: -// -// - CreateInstanceProfile -// -// - GetInstanceProfile -// -// - ListInstanceProfiles -// -// - ListInstanceProfilesForRole -type InstanceProfile struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) specifying the instance profile. For more - // information about ARNs and how to use them in policies, see IAM identifiers - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // Arn is a required field - Arn *string `min:"20" type:"string" required:"true"` - - // The date when the instance profile was created. - // - // CreateDate is a required field - CreateDate *time.Time `type:"timestamp" required:"true"` - - // The stable and unique string identifying the instance profile. For more information - // about IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // InstanceProfileId is a required field - InstanceProfileId *string `min:"16" type:"string" required:"true"` - - // The name identifying the instance profile. - // - // InstanceProfileName is a required field - InstanceProfileName *string `min:"1" type:"string" required:"true"` - - // The path to the instance profile. For more information about paths, see IAM - // identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // Path is a required field - Path *string `min:"1" type:"string" required:"true"` - - // The role associated with the instance profile. - // - // Roles is a required field - Roles []*Role `type:"list" required:"true"` - - // A list of tags that are attached to the instance profile. For more information - // about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User 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 InstanceProfile) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s InstanceProfile) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *InstanceProfile) SetArn(v string) *InstanceProfile { - s.Arn = &v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *InstanceProfile) SetCreateDate(v time.Time) *InstanceProfile { - s.CreateDate = &v - return s -} - -// SetInstanceProfileId sets the InstanceProfileId field's value. -func (s *InstanceProfile) SetInstanceProfileId(v string) *InstanceProfile { - s.InstanceProfileId = &v - return s -} - -// SetInstanceProfileName sets the InstanceProfileName field's value. -func (s *InstanceProfile) SetInstanceProfileName(v string) *InstanceProfile { - s.InstanceProfileName = &v - return s -} - -// SetPath sets the Path field's value. -func (s *InstanceProfile) SetPath(v string) *InstanceProfile { - s.Path = &v - return s -} - -// SetRoles sets the Roles field's value. -func (s *InstanceProfile) SetRoles(v []*Role) *InstanceProfile { - s.Roles = v - return s -} - -// SetTags sets the Tags field's value. -func (s *InstanceProfile) SetTags(v []*Tag) *InstanceProfile { - s.Tags = v - return s -} - -type ListAccessKeysInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The name of the user. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - UserName *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 ListAccessKeysInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListAccessKeysInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAccessKeysInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAccessKeysInput"} - 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.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListAccessKeysInput) SetMarker(v string) *ListAccessKeysInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListAccessKeysInput) SetMaxItems(v int64) *ListAccessKeysInput { - s.MaxItems = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *ListAccessKeysInput) SetUserName(v string) *ListAccessKeysInput { - s.UserName = &v - return s -} - -// Contains the response to a successful ListAccessKeys request. -type ListAccessKeysOutput struct { - _ struct{} `type:"structure"` - - // A list of objects containing metadata about the access keys. - // - // AccessKeyMetadata is a required field - AccessKeyMetadata []*AccessKeyMetadata `type:"list" required:"true"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *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 ListAccessKeysOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListAccessKeysOutput) GoString() string { - return s.String() -} - -// SetAccessKeyMetadata sets the AccessKeyMetadata field's value. -func (s *ListAccessKeysOutput) SetAccessKeyMetadata(v []*AccessKeyMetadata) *ListAccessKeysOutput { - s.AccessKeyMetadata = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListAccessKeysOutput) SetIsTruncated(v bool) *ListAccessKeysOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListAccessKeysOutput) SetMarker(v string) *ListAccessKeysOutput { - s.Marker = &v - return s -} - -type ListAccountAliasesInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *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 ListAccountAliasesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListAccountAliasesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAccountAliasesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAccountAliasesInput"} - 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 -} - -// SetMarker sets the Marker field's value. -func (s *ListAccountAliasesInput) SetMarker(v string) *ListAccountAliasesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListAccountAliasesInput) SetMaxItems(v int64) *ListAccountAliasesInput { - s.MaxItems = &v - return s -} - -// Contains the response to a successful ListAccountAliases request. -type ListAccountAliasesOutput struct { - _ struct{} `type:"structure"` - - // A list of aliases associated with the account. Amazon Web Services supports - // only one alias per account. - // - // AccountAliases is a required field - AccountAliases []*string `type:"list" required:"true"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *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 ListAccountAliasesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListAccountAliasesOutput) GoString() string { - return s.String() -} - -// SetAccountAliases sets the AccountAliases field's value. -func (s *ListAccountAliasesOutput) SetAccountAliases(v []*string) *ListAccountAliasesOutput { - s.AccountAliases = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListAccountAliasesOutput) SetIsTruncated(v bool) *ListAccountAliasesOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListAccountAliasesOutput) SetMarker(v string) *ListAccountAliasesOutput { - s.Marker = &v - return s -} - -type ListAttachedGroupPoliciesInput struct { - _ struct{} `type:"structure"` - - // The name (friendly name, not ARN) of the group to list attached policies - // for. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The path prefix for filtering the results. This parameter is optional. If - // it is not included, it defaults to a slash (/), listing all policies. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. - PathPrefix *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 ListAttachedGroupPoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListAttachedGroupPoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAttachedGroupPoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAttachedGroupPoliciesInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 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 s.PathPrefix != nil && len(*s.PathPrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PathPrefix", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *ListAttachedGroupPoliciesInput) SetGroupName(v string) *ListAttachedGroupPoliciesInput { - s.GroupName = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListAttachedGroupPoliciesInput) SetMarker(v string) *ListAttachedGroupPoliciesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListAttachedGroupPoliciesInput) SetMaxItems(v int64) *ListAttachedGroupPoliciesInput { - s.MaxItems = &v - return s -} - -// SetPathPrefix sets the PathPrefix field's value. -func (s *ListAttachedGroupPoliciesInput) SetPathPrefix(v string) *ListAttachedGroupPoliciesInput { - s.PathPrefix = &v - return s -} - -// Contains the response to a successful ListAttachedGroupPolicies request. -type ListAttachedGroupPoliciesOutput struct { - _ struct{} `type:"structure"` - - // A list of the attached policies. - AttachedPolicies []*AttachedPolicy `type:"list"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *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 ListAttachedGroupPoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListAttachedGroupPoliciesOutput) GoString() string { - return s.String() -} - -// SetAttachedPolicies sets the AttachedPolicies field's value. -func (s *ListAttachedGroupPoliciesOutput) SetAttachedPolicies(v []*AttachedPolicy) *ListAttachedGroupPoliciesOutput { - s.AttachedPolicies = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListAttachedGroupPoliciesOutput) SetIsTruncated(v bool) *ListAttachedGroupPoliciesOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListAttachedGroupPoliciesOutput) SetMarker(v string) *ListAttachedGroupPoliciesOutput { - s.Marker = &v - return s -} - -type ListAttachedRolePoliciesInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The path prefix for filtering the results. This parameter is optional. If - // it is not included, it defaults to a slash (/), listing all policies. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. - PathPrefix *string `min:"1" type:"string"` - - // The name (friendly name, not ARN) of the role to list attached policies for. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *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 ListAttachedRolePoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListAttachedRolePoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAttachedRolePoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAttachedRolePoliciesInput"} - 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.PathPrefix != nil && len(*s.PathPrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PathPrefix", 1)) - } - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListAttachedRolePoliciesInput) SetMarker(v string) *ListAttachedRolePoliciesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListAttachedRolePoliciesInput) SetMaxItems(v int64) *ListAttachedRolePoliciesInput { - s.MaxItems = &v - return s -} - -// SetPathPrefix sets the PathPrefix field's value. -func (s *ListAttachedRolePoliciesInput) SetPathPrefix(v string) *ListAttachedRolePoliciesInput { - s.PathPrefix = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *ListAttachedRolePoliciesInput) SetRoleName(v string) *ListAttachedRolePoliciesInput { - s.RoleName = &v - return s -} - -// Contains the response to a successful ListAttachedRolePolicies request. -type ListAttachedRolePoliciesOutput struct { - _ struct{} `type:"structure"` - - // A list of the attached policies. - AttachedPolicies []*AttachedPolicy `type:"list"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *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 ListAttachedRolePoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListAttachedRolePoliciesOutput) GoString() string { - return s.String() -} - -// SetAttachedPolicies sets the AttachedPolicies field's value. -func (s *ListAttachedRolePoliciesOutput) SetAttachedPolicies(v []*AttachedPolicy) *ListAttachedRolePoliciesOutput { - s.AttachedPolicies = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListAttachedRolePoliciesOutput) SetIsTruncated(v bool) *ListAttachedRolePoliciesOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListAttachedRolePoliciesOutput) SetMarker(v string) *ListAttachedRolePoliciesOutput { - s.Marker = &v - return s -} - -type ListAttachedUserPoliciesInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The path prefix for filtering the results. This parameter is optional. If - // it is not included, it defaults to a slash (/), listing all policies. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. - PathPrefix *string `min:"1" type:"string"` - - // The name (friendly name, not ARN) of the user to list attached policies for. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *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 ListAttachedUserPoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListAttachedUserPoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAttachedUserPoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAttachedUserPoliciesInput"} - 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.PathPrefix != nil && len(*s.PathPrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PathPrefix", 1)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListAttachedUserPoliciesInput) SetMarker(v string) *ListAttachedUserPoliciesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListAttachedUserPoliciesInput) SetMaxItems(v int64) *ListAttachedUserPoliciesInput { - s.MaxItems = &v - return s -} - -// SetPathPrefix sets the PathPrefix field's value. -func (s *ListAttachedUserPoliciesInput) SetPathPrefix(v string) *ListAttachedUserPoliciesInput { - s.PathPrefix = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *ListAttachedUserPoliciesInput) SetUserName(v string) *ListAttachedUserPoliciesInput { - s.UserName = &v - return s -} - -// Contains the response to a successful ListAttachedUserPolicies request. -type ListAttachedUserPoliciesOutput struct { - _ struct{} `type:"structure"` - - // A list of the attached policies. - AttachedPolicies []*AttachedPolicy `type:"list"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *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 ListAttachedUserPoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListAttachedUserPoliciesOutput) GoString() string { - return s.String() -} - -// SetAttachedPolicies sets the AttachedPolicies field's value. -func (s *ListAttachedUserPoliciesOutput) SetAttachedPolicies(v []*AttachedPolicy) *ListAttachedUserPoliciesOutput { - s.AttachedPolicies = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListAttachedUserPoliciesOutput) SetIsTruncated(v bool) *ListAttachedUserPoliciesOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListAttachedUserPoliciesOutput) SetMarker(v string) *ListAttachedUserPoliciesOutput { - s.Marker = &v - return s -} - -type ListEntitiesForPolicyInput struct { - _ struct{} `type:"structure"` - - // The entity type to use for filtering the results. - // - // For example, when EntityFilter is Role, only the roles that are attached - // to the specified policy are returned. This parameter is optional. If it is - // not included, all attached entities (users, groups, and roles) are returned. - // The argument for this parameter must be one of the valid values listed below. - EntityFilter *string `type:"string" enum:"EntityType"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The path prefix for filtering the results. This parameter is optional. If - // it is not included, it defaults to a slash (/), listing all entities. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. - PathPrefix *string `min:"1" type:"string"` - - // The Amazon Resource Name (ARN) of the IAM policy for which you want the versions. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicyArn is a required field - PolicyArn *string `min:"20" type:"string" required:"true"` - - // The policy usage method to use for filtering the results. - // - // To list only permissions policies, set PolicyUsageFilter to PermissionsPolicy. - // To list only the policies used to set permissions boundaries, set the value - // to PermissionsBoundary. - // - // This parameter is optional. If it is not included, all policies are returned. - PolicyUsageFilter *string `type:"string" enum:"PolicyUsageType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListEntitiesForPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListEntitiesForPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListEntitiesForPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListEntitiesForPolicyInput"} - 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.PathPrefix != nil && len(*s.PathPrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PathPrefix", 1)) - } - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEntityFilter sets the EntityFilter field's value. -func (s *ListEntitiesForPolicyInput) SetEntityFilter(v string) *ListEntitiesForPolicyInput { - s.EntityFilter = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListEntitiesForPolicyInput) SetMarker(v string) *ListEntitiesForPolicyInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListEntitiesForPolicyInput) SetMaxItems(v int64) *ListEntitiesForPolicyInput { - s.MaxItems = &v - return s -} - -// SetPathPrefix sets the PathPrefix field's value. -func (s *ListEntitiesForPolicyInput) SetPathPrefix(v string) *ListEntitiesForPolicyInput { - s.PathPrefix = &v - return s -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *ListEntitiesForPolicyInput) SetPolicyArn(v string) *ListEntitiesForPolicyInput { - s.PolicyArn = &v - return s -} - -// SetPolicyUsageFilter sets the PolicyUsageFilter field's value. -func (s *ListEntitiesForPolicyInput) SetPolicyUsageFilter(v string) *ListEntitiesForPolicyInput { - s.PolicyUsageFilter = &v - return s -} - -// Contains the response to a successful ListEntitiesForPolicy request. -type ListEntitiesForPolicyOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // A list of IAM groups that the policy is attached to. - PolicyGroups []*PolicyGroup `type:"list"` - - // A list of IAM roles that the policy is attached to. - PolicyRoles []*PolicyRole `type:"list"` - - // A list of IAM users that the policy is attached to. - PolicyUsers []*PolicyUser `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 ListEntitiesForPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListEntitiesForPolicyOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListEntitiesForPolicyOutput) SetIsTruncated(v bool) *ListEntitiesForPolicyOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListEntitiesForPolicyOutput) SetMarker(v string) *ListEntitiesForPolicyOutput { - s.Marker = &v - return s -} - -// SetPolicyGroups sets the PolicyGroups field's value. -func (s *ListEntitiesForPolicyOutput) SetPolicyGroups(v []*PolicyGroup) *ListEntitiesForPolicyOutput { - s.PolicyGroups = v - return s -} - -// SetPolicyRoles sets the PolicyRoles field's value. -func (s *ListEntitiesForPolicyOutput) SetPolicyRoles(v []*PolicyRole) *ListEntitiesForPolicyOutput { - s.PolicyRoles = v - return s -} - -// SetPolicyUsers sets the PolicyUsers field's value. -func (s *ListEntitiesForPolicyOutput) SetPolicyUsers(v []*PolicyUser) *ListEntitiesForPolicyOutput { - s.PolicyUsers = v - return s -} - -type ListGroupPoliciesInput struct { - _ struct{} `type:"structure"` - - // The name of the group to list policies for. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *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 ListGroupPoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListGroupPoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListGroupPoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListGroupPoliciesInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 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 -} - -// SetGroupName sets the GroupName field's value. -func (s *ListGroupPoliciesInput) SetGroupName(v string) *ListGroupPoliciesInput { - s.GroupName = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListGroupPoliciesInput) SetMarker(v string) *ListGroupPoliciesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListGroupPoliciesInput) SetMaxItems(v int64) *ListGroupPoliciesInput { - s.MaxItems = &v - return s -} - -// Contains the response to a successful ListGroupPolicies request. -type ListGroupPoliciesOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // A list of policy names. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // 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 ListGroupPoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListGroupPoliciesOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListGroupPoliciesOutput) SetIsTruncated(v bool) *ListGroupPoliciesOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListGroupPoliciesOutput) SetMarker(v string) *ListGroupPoliciesOutput { - s.Marker = &v - return s -} - -// SetPolicyNames sets the PolicyNames field's value. -func (s *ListGroupPoliciesOutput) SetPolicyNames(v []*string) *ListGroupPoliciesOutput { - s.PolicyNames = v - return s -} - -type ListGroupsForUserInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The name of the user to list groups for. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *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 ListGroupsForUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListGroupsForUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListGroupsForUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListGroupsForUserInput"} - 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.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListGroupsForUserInput) SetMarker(v string) *ListGroupsForUserInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListGroupsForUserInput) SetMaxItems(v int64) *ListGroupsForUserInput { - s.MaxItems = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *ListGroupsForUserInput) SetUserName(v string) *ListGroupsForUserInput { - s.UserName = &v - return s -} - -// Contains the response to a successful ListGroupsForUser request. -type ListGroupsForUserOutput struct { - _ struct{} `type:"structure"` - - // A list of groups. - // - // Groups is a required field - Groups []*Group `type:"list" required:"true"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *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 ListGroupsForUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListGroupsForUserOutput) GoString() string { - return s.String() -} - -// SetGroups sets the Groups field's value. -func (s *ListGroupsForUserOutput) SetGroups(v []*Group) *ListGroupsForUserOutput { - s.Groups = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListGroupsForUserOutput) SetIsTruncated(v bool) *ListGroupsForUserOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListGroupsForUserOutput) SetMarker(v string) *ListGroupsForUserOutput { - s.Marker = &v - return s -} - -type ListGroupsInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The path prefix for filtering the results. For example, the prefix /division_abc/subdivision_xyz/ - // gets all groups whose path starts with /division_abc/subdivision_xyz/. - // - // This parameter is optional. If it is not included, it defaults to a slash - // (/), listing all groups. This parameter allows (through its regex pattern - // (http://wikipedia.org/wiki/regex)) a string of characters consisting of either - // a forward slash (/) by itself or a string that must begin and end with forward - // slashes. In addition, it can contain any ASCII character from the ! (\u0021) - // through the DEL character (\u007F), including most punctuation characters, - // digits, and upper and lowercased letters. - PathPrefix *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 ListGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListGroupsInput"} - 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.PathPrefix != nil && len(*s.PathPrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PathPrefix", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListGroupsInput) SetMarker(v string) *ListGroupsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListGroupsInput) SetMaxItems(v int64) *ListGroupsInput { - s.MaxItems = &v - return s -} - -// SetPathPrefix sets the PathPrefix field's value. -func (s *ListGroupsInput) SetPathPrefix(v string) *ListGroupsInput { - s.PathPrefix = &v - return s -} - -// Contains the response to a successful ListGroups request. -type ListGroupsOutput struct { - _ struct{} `type:"structure"` - - // A list of groups. - // - // Groups is a required field - Groups []*Group `type:"list" required:"true"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *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 ListGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListGroupsOutput) GoString() string { - return s.String() -} - -// SetGroups sets the Groups field's value. -func (s *ListGroupsOutput) SetGroups(v []*Group) *ListGroupsOutput { - s.Groups = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListGroupsOutput) SetIsTruncated(v bool) *ListGroupsOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListGroupsOutput) SetMarker(v string) *ListGroupsOutput { - s.Marker = &v - return s -} - -type ListInstanceProfileTagsInput struct { - _ struct{} `type:"structure"` - - // The name of the IAM instance profile whose tags you want to see. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // InstanceProfileName is a required field - InstanceProfileName *string `min:"1" type:"string" required:"true"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *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 ListInstanceProfileTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListInstanceProfileTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListInstanceProfileTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListInstanceProfileTagsInput"} - if s.InstanceProfileName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceProfileName")) - } - if s.InstanceProfileName != nil && len(*s.InstanceProfileName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InstanceProfileName", 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 -} - -// SetInstanceProfileName sets the InstanceProfileName field's value. -func (s *ListInstanceProfileTagsInput) SetInstanceProfileName(v string) *ListInstanceProfileTagsInput { - s.InstanceProfileName = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListInstanceProfileTagsInput) SetMarker(v string) *ListInstanceProfileTagsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListInstanceProfileTagsInput) SetMaxItems(v int64) *ListInstanceProfileTagsInput { - s.MaxItems = &v - return s -} - -type ListInstanceProfileTagsOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // The list of tags that are currently attached to the IAM instance profile. - // Each tag consists of a key name and an associated value. If no tags are attached - // to the specified resource, the response contains an empty list. - // - // 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 ListInstanceProfileTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListInstanceProfileTagsOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListInstanceProfileTagsOutput) SetIsTruncated(v bool) *ListInstanceProfileTagsOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListInstanceProfileTagsOutput) SetMarker(v string) *ListInstanceProfileTagsOutput { - s.Marker = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListInstanceProfileTagsOutput) SetTags(v []*Tag) *ListInstanceProfileTagsOutput { - s.Tags = v - return s -} - -type ListInstanceProfilesForRoleInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The name of the role to list instance profiles for. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *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 ListInstanceProfilesForRoleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListInstanceProfilesForRoleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListInstanceProfilesForRoleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListInstanceProfilesForRoleInput"} - 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.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListInstanceProfilesForRoleInput) SetMarker(v string) *ListInstanceProfilesForRoleInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListInstanceProfilesForRoleInput) SetMaxItems(v int64) *ListInstanceProfilesForRoleInput { - s.MaxItems = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *ListInstanceProfilesForRoleInput) SetRoleName(v string) *ListInstanceProfilesForRoleInput { - s.RoleName = &v - return s -} - -// Contains the response to a successful ListInstanceProfilesForRole request. -type ListInstanceProfilesForRoleOutput struct { - _ struct{} `type:"structure"` - - // A list of instance profiles. - // - // InstanceProfiles is a required field - InstanceProfiles []*InstanceProfile `type:"list" required:"true"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *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 ListInstanceProfilesForRoleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListInstanceProfilesForRoleOutput) GoString() string { - return s.String() -} - -// SetInstanceProfiles sets the InstanceProfiles field's value. -func (s *ListInstanceProfilesForRoleOutput) SetInstanceProfiles(v []*InstanceProfile) *ListInstanceProfilesForRoleOutput { - s.InstanceProfiles = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListInstanceProfilesForRoleOutput) SetIsTruncated(v bool) *ListInstanceProfilesForRoleOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListInstanceProfilesForRoleOutput) SetMarker(v string) *ListInstanceProfilesForRoleOutput { - s.Marker = &v - return s -} - -type ListInstanceProfilesInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The path prefix for filtering the results. For example, the prefix /application_abc/component_xyz/ - // gets all instance profiles whose path starts with /application_abc/component_xyz/. - // - // This parameter is optional. If it is not included, it defaults to a slash - // (/), listing all instance profiles. This parameter allows (through its regex - // pattern (http://wikipedia.org/wiki/regex)) a string of characters consisting - // of either a forward slash (/) by itself or a string that must begin and end - // with forward slashes. In addition, it can contain any ASCII character from - // the ! (\u0021) through the DEL character (\u007F), including most punctuation - // characters, digits, and upper and lowercased letters. - PathPrefix *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 ListInstanceProfilesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListInstanceProfilesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListInstanceProfilesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListInstanceProfilesInput"} - 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.PathPrefix != nil && len(*s.PathPrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PathPrefix", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListInstanceProfilesInput) SetMarker(v string) *ListInstanceProfilesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListInstanceProfilesInput) SetMaxItems(v int64) *ListInstanceProfilesInput { - s.MaxItems = &v - return s -} - -// SetPathPrefix sets the PathPrefix field's value. -func (s *ListInstanceProfilesInput) SetPathPrefix(v string) *ListInstanceProfilesInput { - s.PathPrefix = &v - return s -} - -// Contains the response to a successful ListInstanceProfiles request. -type ListInstanceProfilesOutput struct { - _ struct{} `type:"structure"` - - // A list of instance profiles. - // - // InstanceProfiles is a required field - InstanceProfiles []*InstanceProfile `type:"list" required:"true"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *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 ListInstanceProfilesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListInstanceProfilesOutput) GoString() string { - return s.String() -} - -// SetInstanceProfiles sets the InstanceProfiles field's value. -func (s *ListInstanceProfilesOutput) SetInstanceProfiles(v []*InstanceProfile) *ListInstanceProfilesOutput { - s.InstanceProfiles = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListInstanceProfilesOutput) SetIsTruncated(v bool) *ListInstanceProfilesOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListInstanceProfilesOutput) SetMarker(v string) *ListInstanceProfilesOutput { - s.Marker = &v - return s -} - -type ListMFADeviceTagsInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The unique identifier for the IAM virtual MFA device whose tags you want - // to see. For virtual MFA devices, the serial number is the same as the ARN. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // SerialNumber is a required field - SerialNumber *string `min:"9" 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 ListMFADeviceTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListMFADeviceTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListMFADeviceTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListMFADeviceTagsInput"} - 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.SerialNumber == nil { - invalidParams.Add(request.NewErrParamRequired("SerialNumber")) - } - if s.SerialNumber != nil && len(*s.SerialNumber) < 9 { - invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListMFADeviceTagsInput) SetMarker(v string) *ListMFADeviceTagsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListMFADeviceTagsInput) SetMaxItems(v int64) *ListMFADeviceTagsInput { - s.MaxItems = &v - return s -} - -// SetSerialNumber sets the SerialNumber field's value. -func (s *ListMFADeviceTagsInput) SetSerialNumber(v string) *ListMFADeviceTagsInput { - s.SerialNumber = &v - return s -} - -type ListMFADeviceTagsOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // The list of tags that are currently attached to the virtual MFA device. Each - // tag consists of a key name and an associated value. If no tags are attached - // to the specified resource, the response contains an empty list. - // - // 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 ListMFADeviceTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListMFADeviceTagsOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListMFADeviceTagsOutput) SetIsTruncated(v bool) *ListMFADeviceTagsOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListMFADeviceTagsOutput) SetMarker(v string) *ListMFADeviceTagsOutput { - s.Marker = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListMFADeviceTagsOutput) SetTags(v []*Tag) *ListMFADeviceTagsOutput { - s.Tags = v - return s -} - -type ListMFADevicesInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The name of the user whose MFA devices you want to list. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - UserName *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 ListMFADevicesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListMFADevicesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListMFADevicesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListMFADevicesInput"} - 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.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListMFADevicesInput) SetMarker(v string) *ListMFADevicesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListMFADevicesInput) SetMaxItems(v int64) *ListMFADevicesInput { - s.MaxItems = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *ListMFADevicesInput) SetUserName(v string) *ListMFADevicesInput { - s.UserName = &v - return s -} - -// Contains the response to a successful ListMFADevices request. -type ListMFADevicesOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // A list of MFA devices. - // - // MFADevices is a required field - MFADevices []*MFADevice `type:"list" required:"true"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *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 ListMFADevicesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListMFADevicesOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListMFADevicesOutput) SetIsTruncated(v bool) *ListMFADevicesOutput { - s.IsTruncated = &v - return s -} - -// SetMFADevices sets the MFADevices field's value. -func (s *ListMFADevicesOutput) SetMFADevices(v []*MFADevice) *ListMFADevicesOutput { - s.MFADevices = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListMFADevicesOutput) SetMarker(v string) *ListMFADevicesOutput { - s.Marker = &v - return s -} - -type ListOpenIDConnectProviderTagsInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The ARN of the OpenID Connect (OIDC) identity provider whose tags you want - // to see. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // OpenIDConnectProviderArn is a required field - OpenIDConnectProviderArn *string `min:"20" 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 ListOpenIDConnectProviderTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListOpenIDConnectProviderTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListOpenIDConnectProviderTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListOpenIDConnectProviderTagsInput"} - 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.OpenIDConnectProviderArn == nil { - invalidParams.Add(request.NewErrParamRequired("OpenIDConnectProviderArn")) - } - if s.OpenIDConnectProviderArn != nil && len(*s.OpenIDConnectProviderArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("OpenIDConnectProviderArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListOpenIDConnectProviderTagsInput) SetMarker(v string) *ListOpenIDConnectProviderTagsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListOpenIDConnectProviderTagsInput) SetMaxItems(v int64) *ListOpenIDConnectProviderTagsInput { - s.MaxItems = &v - return s -} - -// SetOpenIDConnectProviderArn sets the OpenIDConnectProviderArn field's value. -func (s *ListOpenIDConnectProviderTagsInput) SetOpenIDConnectProviderArn(v string) *ListOpenIDConnectProviderTagsInput { - s.OpenIDConnectProviderArn = &v - return s -} - -type ListOpenIDConnectProviderTagsOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // The list of tags that are currently attached to the OpenID Connect (OIDC) - // identity provider. Each tag consists of a key name and an associated value. - // If no tags are attached to the specified resource, the response contains - // an empty list. - // - // 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 ListOpenIDConnectProviderTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListOpenIDConnectProviderTagsOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListOpenIDConnectProviderTagsOutput) SetIsTruncated(v bool) *ListOpenIDConnectProviderTagsOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListOpenIDConnectProviderTagsOutput) SetMarker(v string) *ListOpenIDConnectProviderTagsOutput { - s.Marker = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListOpenIDConnectProviderTagsOutput) SetTags(v []*Tag) *ListOpenIDConnectProviderTagsOutput { - s.Tags = v - return s -} - -type ListOpenIDConnectProvidersInput 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 ListOpenIDConnectProvidersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListOpenIDConnectProvidersInput) GoString() string { - return s.String() -} - -// Contains the response to a successful ListOpenIDConnectProviders request. -type ListOpenIDConnectProvidersOutput struct { - _ struct{} `type:"structure"` - - // The list of IAM OIDC provider resource objects defined in the Amazon Web - // Services account. - OpenIDConnectProviderList []*OpenIDConnectProviderListEntry `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 ListOpenIDConnectProvidersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListOpenIDConnectProvidersOutput) GoString() string { - return s.String() -} - -// SetOpenIDConnectProviderList sets the OpenIDConnectProviderList field's value. -func (s *ListOpenIDConnectProvidersOutput) SetOpenIDConnectProviderList(v []*OpenIDConnectProviderListEntry) *ListOpenIDConnectProvidersOutput { - s.OpenIDConnectProviderList = v - return s -} - -// Contains details about the permissions policies that are attached to the -// specified identity (user, group, or role). -// -// This data type is used as a response element in the ListPoliciesGrantingServiceAccess -// operation. -type ListPoliciesGrantingServiceAccessEntry struct { - _ struct{} `type:"structure"` - - // The PoliciesGrantingServiceAccess object that contains details about the - // policy. - Policies []*PolicyGrantingServiceAccess `type:"list"` - - // The namespace of the service that was accessed. - // - // To learn the service namespace of a service, see Actions, resources, and - // condition keys for Amazon Web Services services (https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html) - // in the Service Authorization Reference. Choose the name of the service to - // view details for that service. In the first paragraph, find the service prefix. - // For example, (service prefix: a4b). For more information about service namespaces, - // see Amazon Web Services service namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. - ServiceNamespace *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 ListPoliciesGrantingServiceAccessEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPoliciesGrantingServiceAccessEntry) GoString() string { - return s.String() -} - -// SetPolicies sets the Policies field's value. -func (s *ListPoliciesGrantingServiceAccessEntry) SetPolicies(v []*PolicyGrantingServiceAccess) *ListPoliciesGrantingServiceAccessEntry { - s.Policies = v - return s -} - -// SetServiceNamespace sets the ServiceNamespace field's value. -func (s *ListPoliciesGrantingServiceAccessEntry) SetServiceNamespace(v string) *ListPoliciesGrantingServiceAccessEntry { - s.ServiceNamespace = &v - return s -} - -type ListPoliciesGrantingServiceAccessInput struct { - _ struct{} `type:"structure"` - - // The ARN of the IAM identity (user, group, or role) whose policies you want - // to list. - // - // Arn is a required field - Arn *string `min:"20" type:"string" required:"true"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // The service namespace for the Amazon Web Services services whose policies - // you want to list. - // - // To learn the service namespace for a service, see Actions, resources, and - // condition keys for Amazon Web Services services (https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html) - // in the IAM User Guide. Choose the name of the service to view details for - // that service. In the first paragraph, find the service prefix. For example, - // (service prefix: a4b). For more information about service namespaces, see - // Amazon Web Services service namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. - // - // ServiceNamespaces is a required field - ServiceNamespaces []*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 ListPoliciesGrantingServiceAccessInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPoliciesGrantingServiceAccessInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListPoliciesGrantingServiceAccessInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListPoliciesGrantingServiceAccessInput"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - if s.Arn != nil && len(*s.Arn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("Arn", 20)) - } - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.ServiceNamespaces == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceNamespaces")) - } - if s.ServiceNamespaces != nil && len(s.ServiceNamespaces) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServiceNamespaces", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetArn sets the Arn field's value. -func (s *ListPoliciesGrantingServiceAccessInput) SetArn(v string) *ListPoliciesGrantingServiceAccessInput { - s.Arn = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListPoliciesGrantingServiceAccessInput) SetMarker(v string) *ListPoliciesGrantingServiceAccessInput { - s.Marker = &v - return s -} - -// SetServiceNamespaces sets the ServiceNamespaces field's value. -func (s *ListPoliciesGrantingServiceAccessInput) SetServiceNamespaces(v []*string) *ListPoliciesGrantingServiceAccessInput { - s.ServiceNamespaces = v - return s -} - -type ListPoliciesGrantingServiceAccessOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. We recommend that you check IsTruncated - // after every call to ensure that you receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // A ListPoliciesGrantingServiceAccess object that contains details about the - // permissions policies attached to the specified identity (user, group, or - // role). - // - // PoliciesGrantingServiceAccess is a required field - PoliciesGrantingServiceAccess []*ListPoliciesGrantingServiceAccessEntry `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 ListPoliciesGrantingServiceAccessOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPoliciesGrantingServiceAccessOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListPoliciesGrantingServiceAccessOutput) SetIsTruncated(v bool) *ListPoliciesGrantingServiceAccessOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListPoliciesGrantingServiceAccessOutput) SetMarker(v string) *ListPoliciesGrantingServiceAccessOutput { - s.Marker = &v - return s -} - -// SetPoliciesGrantingServiceAccess sets the PoliciesGrantingServiceAccess field's value. -func (s *ListPoliciesGrantingServiceAccessOutput) SetPoliciesGrantingServiceAccess(v []*ListPoliciesGrantingServiceAccessEntry) *ListPoliciesGrantingServiceAccessOutput { - s.PoliciesGrantingServiceAccess = v - return s -} - -type ListPoliciesInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // A flag to filter the results to only the attached policies. - // - // When OnlyAttached is true, the returned list contains only the policies that - // are attached to an IAM user, group, or role. When OnlyAttached is false, - // or when the parameter is not included, all policies are returned. - OnlyAttached *bool `type:"boolean"` - - // The path prefix for filtering the results. This parameter is optional. If - // it is not included, it defaults to a slash (/), listing all policies. This - // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. - PathPrefix *string `min:"1" type:"string"` - - // The policy usage method to use for filtering the results. - // - // To list only permissions policies, set PolicyUsageFilter to PermissionsPolicy. - // To list only the policies used to set permissions boundaries, set the value - // to PermissionsBoundary. - // - // This parameter is optional. If it is not included, all policies are returned. - PolicyUsageFilter *string `type:"string" enum:"PolicyUsageType"` - - // The scope to use for filtering the results. - // - // To list only Amazon Web Services managed policies, set Scope to AWS. To list - // only the customer managed policies in your Amazon Web Services account, set - // Scope to Local. - // - // This parameter is optional. If it is not included, or if it is set to All, - // all policies are returned. - Scope *string `type:"string" enum:"PolicyScopeType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListPoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListPoliciesInput"} - 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.PathPrefix != nil && len(*s.PathPrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PathPrefix", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListPoliciesInput) SetMarker(v string) *ListPoliciesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListPoliciesInput) SetMaxItems(v int64) *ListPoliciesInput { - s.MaxItems = &v - return s -} - -// SetOnlyAttached sets the OnlyAttached field's value. -func (s *ListPoliciesInput) SetOnlyAttached(v bool) *ListPoliciesInput { - s.OnlyAttached = &v - return s -} - -// SetPathPrefix sets the PathPrefix field's value. -func (s *ListPoliciesInput) SetPathPrefix(v string) *ListPoliciesInput { - s.PathPrefix = &v - return s -} - -// SetPolicyUsageFilter sets the PolicyUsageFilter field's value. -func (s *ListPoliciesInput) SetPolicyUsageFilter(v string) *ListPoliciesInput { - s.PolicyUsageFilter = &v - return s -} - -// SetScope sets the Scope field's value. -func (s *ListPoliciesInput) SetScope(v string) *ListPoliciesInput { - s.Scope = &v - return s -} - -// Contains the response to a successful ListPolicies request. -type ListPoliciesOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // A list of policies. - Policies []*Policy `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 ListPoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPoliciesOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListPoliciesOutput) SetIsTruncated(v bool) *ListPoliciesOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListPoliciesOutput) SetMarker(v string) *ListPoliciesOutput { - s.Marker = &v - return s -} - -// SetPolicies sets the Policies field's value. -func (s *ListPoliciesOutput) SetPolicies(v []*Policy) *ListPoliciesOutput { - s.Policies = v - return s -} - -type ListPolicyTagsInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The ARN of the IAM customer managed policy whose tags you want to see. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // PolicyArn is a required field - PolicyArn *string `min:"20" 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 ListPolicyTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPolicyTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListPolicyTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListPolicyTagsInput"} - 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.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListPolicyTagsInput) SetMarker(v string) *ListPolicyTagsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListPolicyTagsInput) SetMaxItems(v int64) *ListPolicyTagsInput { - s.MaxItems = &v - return s -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *ListPolicyTagsInput) SetPolicyArn(v string) *ListPolicyTagsInput { - s.PolicyArn = &v - return s -} - -type ListPolicyTagsOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // The list of tags that are currently attached to the IAM customer managed - // policy. Each tag consists of a key name and an associated value. If no tags - // are attached to the specified resource, the response contains an empty list. - // - // 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 ListPolicyTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPolicyTagsOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListPolicyTagsOutput) SetIsTruncated(v bool) *ListPolicyTagsOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListPolicyTagsOutput) SetMarker(v string) *ListPolicyTagsOutput { - s.Marker = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListPolicyTagsOutput) SetTags(v []*Tag) *ListPolicyTagsOutput { - s.Tags = v - return s -} - -type ListPolicyVersionsInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The Amazon Resource Name (ARN) of the IAM policy for which you want the versions. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicyArn is a required field - PolicyArn *string `min:"20" 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 ListPolicyVersionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPolicyVersionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListPolicyVersionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListPolicyVersionsInput"} - 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.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListPolicyVersionsInput) SetMarker(v string) *ListPolicyVersionsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListPolicyVersionsInput) SetMaxItems(v int64) *ListPolicyVersionsInput { - s.MaxItems = &v - return s -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *ListPolicyVersionsInput) SetPolicyArn(v string) *ListPolicyVersionsInput { - s.PolicyArn = &v - return s -} - -// Contains the response to a successful ListPolicyVersions request. -type ListPolicyVersionsOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // A list of policy versions. - // - // For more information about managed policy versions, see Versioning for managed - // policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) - // in the IAM User Guide. - Versions []*PolicyVersion `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 ListPolicyVersionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPolicyVersionsOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListPolicyVersionsOutput) SetIsTruncated(v bool) *ListPolicyVersionsOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListPolicyVersionsOutput) SetMarker(v string) *ListPolicyVersionsOutput { - s.Marker = &v - return s -} - -// SetVersions sets the Versions field's value. -func (s *ListPolicyVersionsOutput) SetVersions(v []*PolicyVersion) *ListPolicyVersionsOutput { - s.Versions = v - return s -} - -type ListRolePoliciesInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The name of the role to list policies for. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *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 ListRolePoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListRolePoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListRolePoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListRolePoliciesInput"} - 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.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListRolePoliciesInput) SetMarker(v string) *ListRolePoliciesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListRolePoliciesInput) SetMaxItems(v int64) *ListRolePoliciesInput { - s.MaxItems = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *ListRolePoliciesInput) SetRoleName(v string) *ListRolePoliciesInput { - s.RoleName = &v - return s -} - -// Contains the response to a successful ListRolePolicies request. -type ListRolePoliciesOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // A list of policy names. - // - // 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 ListRolePoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListRolePoliciesOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListRolePoliciesOutput) SetIsTruncated(v bool) *ListRolePoliciesOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListRolePoliciesOutput) SetMarker(v string) *ListRolePoliciesOutput { - s.Marker = &v - return s -} - -// SetPolicyNames sets the PolicyNames field's value. -func (s *ListRolePoliciesOutput) SetPolicyNames(v []*string) *ListRolePoliciesOutput { - s.PolicyNames = v - return s -} - -type ListRoleTagsInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The name of the IAM role for which you want to see the list of tags. - // - // This parameter accepts (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters that consist of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *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 ListRoleTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListRoleTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListRoleTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListRoleTagsInput"} - 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.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListRoleTagsInput) SetMarker(v string) *ListRoleTagsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListRoleTagsInput) SetMaxItems(v int64) *ListRoleTagsInput { - s.MaxItems = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *ListRoleTagsInput) SetRoleName(v string) *ListRoleTagsInput { - s.RoleName = &v - return s -} - -type ListRoleTagsOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // The list of tags that are currently attached to the role. Each tag consists - // of a key name and an associated value. If no tags are attached to the specified - // resource, the response contains an empty list. - // - // 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 ListRoleTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListRoleTagsOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListRoleTagsOutput) SetIsTruncated(v bool) *ListRoleTagsOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListRoleTagsOutput) SetMarker(v string) *ListRoleTagsOutput { - s.Marker = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListRoleTagsOutput) SetTags(v []*Tag) *ListRoleTagsOutput { - s.Tags = v - return s -} - -type ListRolesInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The path prefix for filtering the results. For example, the prefix /application_abc/component_xyz/ - // gets all roles whose path starts with /application_abc/component_xyz/. - // - // This parameter is optional. If it is not included, it defaults to a slash - // (/), listing all roles. This parameter allows (through its regex pattern - // (http://wikipedia.org/wiki/regex)) a string of characters consisting of either - // a forward slash (/) by itself or a string that must begin and end with forward - // slashes. In addition, it can contain any ASCII character from the ! (\u0021) - // through the DEL character (\u007F), including most punctuation characters, - // digits, and upper and lowercased letters. - PathPrefix *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 ListRolesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListRolesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListRolesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListRolesInput"} - 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.PathPrefix != nil && len(*s.PathPrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PathPrefix", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListRolesInput) SetMarker(v string) *ListRolesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListRolesInput) SetMaxItems(v int64) *ListRolesInput { - s.MaxItems = &v - return s -} - -// SetPathPrefix sets the PathPrefix field's value. -func (s *ListRolesInput) SetPathPrefix(v string) *ListRolesInput { - s.PathPrefix = &v - return s -} - -// Contains the response to a successful ListRoles request. -type ListRolesOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // A list of roles. - // - // Roles is a required field - Roles []*Role `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 ListRolesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListRolesOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListRolesOutput) SetIsTruncated(v bool) *ListRolesOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListRolesOutput) SetMarker(v string) *ListRolesOutput { - s.Marker = &v - return s -} - -// SetRoles sets the Roles field's value. -func (s *ListRolesOutput) SetRoles(v []*Role) *ListRolesOutput { - s.Roles = v - return s -} - -type ListSAMLProviderTagsInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The ARN of the Security Assertion Markup Language (SAML) identity provider - // whose tags you want to see. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // SAMLProviderArn is a required field - SAMLProviderArn *string `min:"20" 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 ListSAMLProviderTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListSAMLProviderTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListSAMLProviderTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListSAMLProviderTagsInput"} - 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.SAMLProviderArn == nil { - invalidParams.Add(request.NewErrParamRequired("SAMLProviderArn")) - } - if s.SAMLProviderArn != nil && len(*s.SAMLProviderArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("SAMLProviderArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListSAMLProviderTagsInput) SetMarker(v string) *ListSAMLProviderTagsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListSAMLProviderTagsInput) SetMaxItems(v int64) *ListSAMLProviderTagsInput { - s.MaxItems = &v - return s -} - -// SetSAMLProviderArn sets the SAMLProviderArn field's value. -func (s *ListSAMLProviderTagsInput) SetSAMLProviderArn(v string) *ListSAMLProviderTagsInput { - s.SAMLProviderArn = &v - return s -} - -type ListSAMLProviderTagsOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // The list of tags that are currently attached to the Security Assertion Markup - // Language (SAML) identity provider. Each tag consists of a key name and an - // associated value. If no tags are attached to the specified resource, the - // response contains an empty list. - // - // 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 ListSAMLProviderTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListSAMLProviderTagsOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListSAMLProviderTagsOutput) SetIsTruncated(v bool) *ListSAMLProviderTagsOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListSAMLProviderTagsOutput) SetMarker(v string) *ListSAMLProviderTagsOutput { - s.Marker = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListSAMLProviderTagsOutput) SetTags(v []*Tag) *ListSAMLProviderTagsOutput { - s.Tags = v - return s -} - -type ListSAMLProvidersInput 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 ListSAMLProvidersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListSAMLProvidersInput) GoString() string { - return s.String() -} - -// Contains the response to a successful ListSAMLProviders request. -type ListSAMLProvidersOutput struct { - _ struct{} `type:"structure"` - - // The list of SAML provider resource objects defined in IAM for this Amazon - // Web Services account. - SAMLProviderList []*SAMLProviderListEntry `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 ListSAMLProvidersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListSAMLProvidersOutput) GoString() string { - return s.String() -} - -// SetSAMLProviderList sets the SAMLProviderList field's value. -func (s *ListSAMLProvidersOutput) SetSAMLProviderList(v []*SAMLProviderListEntry) *ListSAMLProvidersOutput { - s.SAMLProviderList = v - return s -} - -type ListSSHPublicKeysInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The name of the IAM user to list SSH public keys for. If none is specified, - // the UserName field is determined implicitly based on the Amazon Web Services - // access key used to sign the request. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - UserName *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 ListSSHPublicKeysInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListSSHPublicKeysInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListSSHPublicKeysInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListSSHPublicKeysInput"} - 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.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListSSHPublicKeysInput) SetMarker(v string) *ListSSHPublicKeysInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListSSHPublicKeysInput) SetMaxItems(v int64) *ListSSHPublicKeysInput { - s.MaxItems = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *ListSSHPublicKeysInput) SetUserName(v string) *ListSSHPublicKeysInput { - s.UserName = &v - return s -} - -// Contains the response to a successful ListSSHPublicKeys request. -type ListSSHPublicKeysOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // A list of the SSH public keys assigned to IAM user. - SSHPublicKeys []*SSHPublicKeyMetadata `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 ListSSHPublicKeysOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListSSHPublicKeysOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListSSHPublicKeysOutput) SetIsTruncated(v bool) *ListSSHPublicKeysOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListSSHPublicKeysOutput) SetMarker(v string) *ListSSHPublicKeysOutput { - s.Marker = &v - return s -} - -// SetSSHPublicKeys sets the SSHPublicKeys field's value. -func (s *ListSSHPublicKeysOutput) SetSSHPublicKeys(v []*SSHPublicKeyMetadata) *ListSSHPublicKeysOutput { - s.SSHPublicKeys = v - return s -} - -type ListServerCertificateTagsInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The name of the IAM server certificate whose tags you want to see. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // ServerCertificateName is a required field - ServerCertificateName *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 ListServerCertificateTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListServerCertificateTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListServerCertificateTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListServerCertificateTagsInput"} - 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.ServerCertificateName == nil { - invalidParams.Add(request.NewErrParamRequired("ServerCertificateName")) - } - if s.ServerCertificateName != nil && len(*s.ServerCertificateName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServerCertificateName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListServerCertificateTagsInput) SetMarker(v string) *ListServerCertificateTagsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListServerCertificateTagsInput) SetMaxItems(v int64) *ListServerCertificateTagsInput { - s.MaxItems = &v - return s -} - -// SetServerCertificateName sets the ServerCertificateName field's value. -func (s *ListServerCertificateTagsInput) SetServerCertificateName(v string) *ListServerCertificateTagsInput { - s.ServerCertificateName = &v - return s -} - -type ListServerCertificateTagsOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // The list of tags that are currently attached to the IAM server certificate. - // Each tag consists of a key name and an associated value. If no tags are attached - // to the specified resource, the response contains an empty list. - // - // 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 ListServerCertificateTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListServerCertificateTagsOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListServerCertificateTagsOutput) SetIsTruncated(v bool) *ListServerCertificateTagsOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListServerCertificateTagsOutput) SetMarker(v string) *ListServerCertificateTagsOutput { - s.Marker = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListServerCertificateTagsOutput) SetTags(v []*Tag) *ListServerCertificateTagsOutput { - s.Tags = v - return s -} - -type ListServerCertificatesInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The path prefix for filtering the results. For example: /company/servercerts - // would get all server certificates for which the path starts with /company/servercerts. - // - // This parameter is optional. If it is not included, it defaults to a slash - // (/), listing all server certificates. This parameter allows (through its - // regex pattern (http://wikipedia.org/wiki/regex)) a string of characters consisting - // of either a forward slash (/) by itself or a string that must begin and end - // with forward slashes. In addition, it can contain any ASCII character from - // the ! (\u0021) through the DEL character (\u007F), including most punctuation - // characters, digits, and upper and lowercased letters. - PathPrefix *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 ListServerCertificatesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListServerCertificatesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListServerCertificatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListServerCertificatesInput"} - 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.PathPrefix != nil && len(*s.PathPrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PathPrefix", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListServerCertificatesInput) SetMarker(v string) *ListServerCertificatesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListServerCertificatesInput) SetMaxItems(v int64) *ListServerCertificatesInput { - s.MaxItems = &v - return s -} - -// SetPathPrefix sets the PathPrefix field's value. -func (s *ListServerCertificatesInput) SetPathPrefix(v string) *ListServerCertificatesInput { - s.PathPrefix = &v - return s -} - -// Contains the response to a successful ListServerCertificates request. -type ListServerCertificatesOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // A list of server certificates. - // - // ServerCertificateMetadataList is a required field - ServerCertificateMetadataList []*ServerCertificateMetadata `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 ListServerCertificatesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListServerCertificatesOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListServerCertificatesOutput) SetIsTruncated(v bool) *ListServerCertificatesOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListServerCertificatesOutput) SetMarker(v string) *ListServerCertificatesOutput { - s.Marker = &v - return s -} - -// SetServerCertificateMetadataList sets the ServerCertificateMetadataList field's value. -func (s *ListServerCertificatesOutput) SetServerCertificateMetadataList(v []*ServerCertificateMetadata) *ListServerCertificatesOutput { - s.ServerCertificateMetadataList = v - return s -} - -type ListServiceSpecificCredentialsInput struct { - _ struct{} `type:"structure"` - - // Filters the returned results to only those for the specified Amazon Web Services - // service. If not specified, then Amazon Web Services returns service-specific - // credentials for all services. - ServiceName *string `type:"string"` - - // The name of the user whose service-specific credentials you want information - // about. If this value is not specified, then the operation assumes the user - // whose credentials are used to call the operation. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - UserName *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 ListServiceSpecificCredentialsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListServiceSpecificCredentialsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListServiceSpecificCredentialsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListServiceSpecificCredentialsInput"} - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServiceName sets the ServiceName field's value. -func (s *ListServiceSpecificCredentialsInput) SetServiceName(v string) *ListServiceSpecificCredentialsInput { - s.ServiceName = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *ListServiceSpecificCredentialsInput) SetUserName(v string) *ListServiceSpecificCredentialsInput { - s.UserName = &v - return s -} - -type ListServiceSpecificCredentialsOutput struct { - _ struct{} `type:"structure"` - - // A list of structures that each contain details about a service-specific credential. - ServiceSpecificCredentials []*ServiceSpecificCredentialMetadata `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 ListServiceSpecificCredentialsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListServiceSpecificCredentialsOutput) GoString() string { - return s.String() -} - -// SetServiceSpecificCredentials sets the ServiceSpecificCredentials field's value. -func (s *ListServiceSpecificCredentialsOutput) SetServiceSpecificCredentials(v []*ServiceSpecificCredentialMetadata) *ListServiceSpecificCredentialsOutput { - s.ServiceSpecificCredentials = v - return s -} - -type ListSigningCertificatesInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The name of the IAM user whose signing certificates you want to examine. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - UserName *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 ListSigningCertificatesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListSigningCertificatesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListSigningCertificatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListSigningCertificatesInput"} - 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.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListSigningCertificatesInput) SetMarker(v string) *ListSigningCertificatesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListSigningCertificatesInput) SetMaxItems(v int64) *ListSigningCertificatesInput { - s.MaxItems = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *ListSigningCertificatesInput) SetUserName(v string) *ListSigningCertificatesInput { - s.UserName = &v - return s -} - -// Contains the response to a successful ListSigningCertificates request. -type ListSigningCertificatesOutput struct { - _ struct{} `type:"structure"` - - // A list of the user's signing certificate information. - // - // Certificates is a required field - Certificates []*SigningCertificate `type:"list" required:"true"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *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 ListSigningCertificatesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListSigningCertificatesOutput) GoString() string { - return s.String() -} - -// SetCertificates sets the Certificates field's value. -func (s *ListSigningCertificatesOutput) SetCertificates(v []*SigningCertificate) *ListSigningCertificatesOutput { - s.Certificates = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListSigningCertificatesOutput) SetIsTruncated(v bool) *ListSigningCertificatesOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListSigningCertificatesOutput) SetMarker(v string) *ListSigningCertificatesOutput { - s.Marker = &v - return s -} - -type ListUserPoliciesInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The name of the user to list policies for. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *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 ListUserPoliciesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListUserPoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListUserPoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListUserPoliciesInput"} - 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.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListUserPoliciesInput) SetMarker(v string) *ListUserPoliciesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListUserPoliciesInput) SetMaxItems(v int64) *ListUserPoliciesInput { - s.MaxItems = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *ListUserPoliciesInput) SetUserName(v string) *ListUserPoliciesInput { - s.UserName = &v - return s -} - -// Contains the response to a successful ListUserPolicies request. -type ListUserPoliciesOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // A list of policy names. - // - // 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 ListUserPoliciesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListUserPoliciesOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListUserPoliciesOutput) SetIsTruncated(v bool) *ListUserPoliciesOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListUserPoliciesOutput) SetMarker(v string) *ListUserPoliciesOutput { - s.Marker = &v - return s -} - -// SetPolicyNames sets the PolicyNames field's value. -func (s *ListUserPoliciesOutput) SetPolicyNames(v []*string) *ListUserPoliciesOutput { - s.PolicyNames = v - return s -} - -type ListUserTagsInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The name of the IAM user whose tags you want to see. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *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 ListUserTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListUserTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListUserTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListUserTagsInput"} - 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.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListUserTagsInput) SetMarker(v string) *ListUserTagsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListUserTagsInput) SetMaxItems(v int64) *ListUserTagsInput { - s.MaxItems = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *ListUserTagsInput) SetUserName(v string) *ListUserTagsInput { - s.UserName = &v - return s -} - -type ListUserTagsOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // The list of tags that are currently attached to the user. Each tag consists - // of a key name and an associated value. If no tags are attached to the specified - // resource, the response contains an empty list. - // - // 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 ListUserTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListUserTagsOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListUserTagsOutput) SetIsTruncated(v bool) *ListUserTagsOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListUserTagsOutput) SetMarker(v string) *ListUserTagsOutput { - s.Marker = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListUserTagsOutput) SetTags(v []*Tag) *ListUserTagsOutput { - s.Tags = v - return s -} - -type ListUsersInput struct { - _ struct{} `type:"structure"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The path prefix for filtering the results. For example: /division_abc/subdivision_xyz/, - // which would get all user names whose path starts with /division_abc/subdivision_xyz/. - // - // This parameter is optional. If it is not included, it defaults to a slash - // (/), listing all user names. This parameter allows (through its regex pattern - // (http://wikipedia.org/wiki/regex)) a string of characters consisting of either - // a forward slash (/) by itself or a string that must begin and end with forward - // slashes. In addition, it can contain any ASCII character from the ! (\u0021) - // through the DEL character (\u007F), including most punctuation characters, - // digits, and upper and lowercased letters. - PathPrefix *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 ListUsersInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListUsersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListUsersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListUsersInput"} - 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.PathPrefix != nil && len(*s.PathPrefix) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PathPrefix", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *ListUsersInput) SetMarker(v string) *ListUsersInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListUsersInput) SetMaxItems(v int64) *ListUsersInput { - s.MaxItems = &v - return s -} - -// SetPathPrefix sets the PathPrefix field's value. -func (s *ListUsersInput) SetPathPrefix(v string) *ListUsersInput { - s.PathPrefix = &v - return s -} - -// Contains the response to a successful ListUsers request. -type ListUsersOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // A list of users. - // - // Users is a required field - Users []*User `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 ListUsersOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListUsersOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListUsersOutput) SetIsTruncated(v bool) *ListUsersOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListUsersOutput) SetMarker(v string) *ListUsersOutput { - s.Marker = &v - return s -} - -// SetUsers sets the Users field's value. -func (s *ListUsersOutput) SetUsers(v []*User) *ListUsersOutput { - s.Users = v - return s -} - -type ListVirtualMFADevicesInput struct { - _ struct{} `type:"structure"` - - // The status (Unassigned or Assigned) of the devices to list. If you do not - // specify an AssignmentStatus, the operation defaults to Any, which lists both - // assigned and unassigned virtual MFA devices., - AssignmentStatus *string `type:"string" enum:"AssignmentStatusType"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *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 ListVirtualMFADevicesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListVirtualMFADevicesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListVirtualMFADevicesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListVirtualMFADevicesInput"} - 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 -} - -// SetAssignmentStatus sets the AssignmentStatus field's value. -func (s *ListVirtualMFADevicesInput) SetAssignmentStatus(v string) *ListVirtualMFADevicesInput { - s.AssignmentStatus = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListVirtualMFADevicesInput) SetMarker(v string) *ListVirtualMFADevicesInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *ListVirtualMFADevicesInput) SetMaxItems(v int64) *ListVirtualMFADevicesInput { - s.MaxItems = &v - return s -} - -// Contains the response to a successful ListVirtualMFADevices request. -type ListVirtualMFADevicesOutput struct { - _ struct{} `type:"structure"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *string `type:"string"` - - // The list of virtual MFA devices in the current account that match the AssignmentStatus - // value that was passed in the request. - // - // VirtualMFADevices is a required field - VirtualMFADevices []*VirtualMFADevice `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 ListVirtualMFADevicesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListVirtualMFADevicesOutput) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListVirtualMFADevicesOutput) SetIsTruncated(v bool) *ListVirtualMFADevicesOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListVirtualMFADevicesOutput) SetMarker(v string) *ListVirtualMFADevicesOutput { - s.Marker = &v - return s -} - -// SetVirtualMFADevices sets the VirtualMFADevices field's value. -func (s *ListVirtualMFADevicesOutput) SetVirtualMFADevices(v []*VirtualMFADevice) *ListVirtualMFADevicesOutput { - s.VirtualMFADevices = v - return s -} - -// Contains the user name and password create date for a user. -// -// This data type is used as a response element in the CreateLoginProfile and -// GetLoginProfile operations. -type LoginProfile struct { - _ struct{} `type:"structure"` - - // The date when the password for the user was created. - // - // CreateDate is a required field - CreateDate *time.Time `type:"timestamp" required:"true"` - - // Specifies whether the user is required to set a new password on next sign-in. - PasswordResetRequired *bool `type:"boolean"` - - // The name of the user, which can be used for signing in to the Amazon Web - // Services Management Console. - // - // UserName is a required field - UserName *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 LoginProfile) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s LoginProfile) GoString() string { - return s.String() -} - -// SetCreateDate sets the CreateDate field's value. -func (s *LoginProfile) SetCreateDate(v time.Time) *LoginProfile { - s.CreateDate = &v - return s -} - -// SetPasswordResetRequired sets the PasswordResetRequired field's value. -func (s *LoginProfile) SetPasswordResetRequired(v bool) *LoginProfile { - s.PasswordResetRequired = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *LoginProfile) SetUserName(v string) *LoginProfile { - s.UserName = &v - return s -} - -// Contains information about an MFA device. -// -// This data type is used as a response element in the ListMFADevices operation. -type MFADevice struct { - _ struct{} `type:"structure"` - - // The date when the MFA device was enabled for the user. - // - // EnableDate is a required field - EnableDate *time.Time `type:"timestamp" required:"true"` - - // The serial number that uniquely identifies the MFA device. For virtual MFA - // devices, the serial number is the device ARN. - // - // SerialNumber is a required field - SerialNumber *string `min:"9" type:"string" required:"true"` - - // The user with whom the MFA device is associated. - // - // UserName is a required field - UserName *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 MFADevice) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s MFADevice) GoString() string { - return s.String() -} - -// SetEnableDate sets the EnableDate field's value. -func (s *MFADevice) SetEnableDate(v time.Time) *MFADevice { - s.EnableDate = &v - return s -} - -// SetSerialNumber sets the SerialNumber field's value. -func (s *MFADevice) SetSerialNumber(v string) *MFADevice { - s.SerialNumber = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *MFADevice) SetUserName(v string) *MFADevice { - s.UserName = &v - return s -} - -// Contains information about a managed policy, including the policy's ARN, -// versions, and the number of principal entities (users, groups, and roles) -// that the policy is attached to. -// -// This data type is used as a response element in the GetAccountAuthorizationDetails -// operation. -// -// For more information about managed policies, see Managed policies and inline -// policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -type ManagedPolicyDetail struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web - // Services resources. - // - // For more information about ARNs, go to Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - Arn *string `min:"20" type:"string"` - - // The number of principal entities (users, groups, and roles) that the policy - // is attached to. - AttachmentCount *int64 `type:"integer"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the policy was created. - CreateDate *time.Time `type:"timestamp"` - - // The identifier for the version of the policy that is set as the default (operative) - // version. - // - // For more information about policy versions, see Versioning for managed policies - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) - // in the IAM User Guide. - DefaultVersionId *string `type:"string"` - - // A friendly description of the policy. - Description *string `type:"string"` - - // Specifies whether the policy can be attached to an IAM user, group, or role. - IsAttachable *bool `type:"boolean"` - - // The path to the policy. - // - // For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - Path *string `min:"1" type:"string"` - - // The number of entities (users and roles) for which the policy is used as - // the permissions boundary. - // - // For more information about permissions boundaries, see Permissions boundaries - // for IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. - PermissionsBoundaryUsageCount *int64 `type:"integer"` - - // The stable and unique string identifying the policy. - // - // For more information about IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - PolicyId *string `min:"16" type:"string"` - - // The friendly name (not ARN) identifying the policy. - PolicyName *string `min:"1" type:"string"` - - // A list containing information about the versions of the policy. - PolicyVersionList []*PolicyVersion `type:"list"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the policy was last updated. - // - // When a policy has only one version, this field contains the date and time - // when the policy was created. When a policy has more than one version, this - // field contains the date and time when the most recent policy version was - // created. - UpdateDate *time.Time `type:"timestamp"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ManagedPolicyDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ManagedPolicyDetail) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *ManagedPolicyDetail) SetArn(v string) *ManagedPolicyDetail { - s.Arn = &v - return s -} - -// SetAttachmentCount sets the AttachmentCount field's value. -func (s *ManagedPolicyDetail) SetAttachmentCount(v int64) *ManagedPolicyDetail { - s.AttachmentCount = &v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *ManagedPolicyDetail) SetCreateDate(v time.Time) *ManagedPolicyDetail { - s.CreateDate = &v - return s -} - -// SetDefaultVersionId sets the DefaultVersionId field's value. -func (s *ManagedPolicyDetail) SetDefaultVersionId(v string) *ManagedPolicyDetail { - s.DefaultVersionId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ManagedPolicyDetail) SetDescription(v string) *ManagedPolicyDetail { - s.Description = &v - return s -} - -// SetIsAttachable sets the IsAttachable field's value. -func (s *ManagedPolicyDetail) SetIsAttachable(v bool) *ManagedPolicyDetail { - s.IsAttachable = &v - return s -} - -// SetPath sets the Path field's value. -func (s *ManagedPolicyDetail) SetPath(v string) *ManagedPolicyDetail { - s.Path = &v - return s -} - -// SetPermissionsBoundaryUsageCount sets the PermissionsBoundaryUsageCount field's value. -func (s *ManagedPolicyDetail) SetPermissionsBoundaryUsageCount(v int64) *ManagedPolicyDetail { - s.PermissionsBoundaryUsageCount = &v - return s -} - -// SetPolicyId sets the PolicyId field's value. -func (s *ManagedPolicyDetail) SetPolicyId(v string) *ManagedPolicyDetail { - s.PolicyId = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *ManagedPolicyDetail) SetPolicyName(v string) *ManagedPolicyDetail { - s.PolicyName = &v - return s -} - -// SetPolicyVersionList sets the PolicyVersionList field's value. -func (s *ManagedPolicyDetail) SetPolicyVersionList(v []*PolicyVersion) *ManagedPolicyDetail { - s.PolicyVersionList = v - return s -} - -// SetUpdateDate sets the UpdateDate field's value. -func (s *ManagedPolicyDetail) SetUpdateDate(v time.Time) *ManagedPolicyDetail { - s.UpdateDate = &v - return s -} - -// Contains the Amazon Resource Name (ARN) for an IAM OpenID Connect provider. -type OpenIDConnectProviderListEntry struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web - // Services resources. - // - // For more information about ARNs, go to Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - Arn *string `min:"20" 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 OpenIDConnectProviderListEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OpenIDConnectProviderListEntry) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *OpenIDConnectProviderListEntry) SetArn(v string) *OpenIDConnectProviderListEntry { - s.Arn = &v - return s -} - -// Contains information about the effect that Organizations has on a policy -// simulation. -type OrganizationsDecisionDetail struct { - _ struct{} `type:"structure"` - - // Specifies whether the simulated operation is allowed by the Organizations - // service control policies that impact the simulated user's account. - AllowedByOrganizations *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 OrganizationsDecisionDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OrganizationsDecisionDetail) GoString() string { - return s.String() -} - -// SetAllowedByOrganizations sets the AllowedByOrganizations field's value. -func (s *OrganizationsDecisionDetail) SetAllowedByOrganizations(v bool) *OrganizationsDecisionDetail { - s.AllowedByOrganizations = &v - return s -} - -// Contains information about the account password policy. -// -// This data type is used as a response element in the GetAccountPasswordPolicy -// operation. -type PasswordPolicy struct { - _ struct{} `type:"structure"` - - // Specifies whether IAM users are allowed to change their own password. Gives - // IAM users permissions to iam:ChangePassword for only their user and to the - // iam:GetAccountPasswordPolicy action. This option does not attach a permissions - // policy to each user, rather the permissions are applied at the account-level - // for all users by IAM. - AllowUsersToChangePassword *bool `type:"boolean"` - - // Indicates whether passwords in the account expire. Returns true if MaxPasswordAge - // contains a value greater than 0. Returns false if MaxPasswordAge is 0 or - // not present. - ExpirePasswords *bool `type:"boolean"` - - // Specifies whether IAM users are prevented from setting a new password via - // the Amazon Web Services Management Console after their password has expired. - // The IAM user cannot access the console until an administrator resets the - // password. IAM users with iam:ChangePassword permission and active access - // keys can reset their own expired console password using the CLI or API. - HardExpiry *bool `type:"boolean"` - - // The number of days that an IAM user password is valid. - MaxPasswordAge *int64 `min:"1" type:"integer"` - - // Minimum length to require for IAM user passwords. - MinimumPasswordLength *int64 `min:"6" type:"integer"` - - // Specifies the number of previous passwords that IAM users are prevented from - // reusing. - PasswordReusePrevention *int64 `min:"1" type:"integer"` - - // Specifies whether IAM user passwords must contain at least one lowercase - // character (a to z). - RequireLowercaseCharacters *bool `type:"boolean"` - - // Specifies whether IAM user passwords must contain at least one numeric character - // (0 to 9). - RequireNumbers *bool `type:"boolean"` - - // Specifies whether IAM user passwords must contain at least one of the following - // symbols: - // - // ! @ # $ % ^ & * ( ) _ + - = [ ] { } | ' - RequireSymbols *bool `type:"boolean"` - - // Specifies whether IAM user passwords must contain at least one uppercase - // character (A to Z). - RequireUppercaseCharacters *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 PasswordPolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PasswordPolicy) GoString() string { - return s.String() -} - -// SetAllowUsersToChangePassword sets the AllowUsersToChangePassword field's value. -func (s *PasswordPolicy) SetAllowUsersToChangePassword(v bool) *PasswordPolicy { - s.AllowUsersToChangePassword = &v - return s -} - -// SetExpirePasswords sets the ExpirePasswords field's value. -func (s *PasswordPolicy) SetExpirePasswords(v bool) *PasswordPolicy { - s.ExpirePasswords = &v - return s -} - -// SetHardExpiry sets the HardExpiry field's value. -func (s *PasswordPolicy) SetHardExpiry(v bool) *PasswordPolicy { - s.HardExpiry = &v - return s -} - -// SetMaxPasswordAge sets the MaxPasswordAge field's value. -func (s *PasswordPolicy) SetMaxPasswordAge(v int64) *PasswordPolicy { - s.MaxPasswordAge = &v - return s -} - -// SetMinimumPasswordLength sets the MinimumPasswordLength field's value. -func (s *PasswordPolicy) SetMinimumPasswordLength(v int64) *PasswordPolicy { - s.MinimumPasswordLength = &v - return s -} - -// SetPasswordReusePrevention sets the PasswordReusePrevention field's value. -func (s *PasswordPolicy) SetPasswordReusePrevention(v int64) *PasswordPolicy { - s.PasswordReusePrevention = &v - return s -} - -// SetRequireLowercaseCharacters sets the RequireLowercaseCharacters field's value. -func (s *PasswordPolicy) SetRequireLowercaseCharacters(v bool) *PasswordPolicy { - s.RequireLowercaseCharacters = &v - return s -} - -// SetRequireNumbers sets the RequireNumbers field's value. -func (s *PasswordPolicy) SetRequireNumbers(v bool) *PasswordPolicy { - s.RequireNumbers = &v - return s -} - -// SetRequireSymbols sets the RequireSymbols field's value. -func (s *PasswordPolicy) SetRequireSymbols(v bool) *PasswordPolicy { - s.RequireSymbols = &v - return s -} - -// SetRequireUppercaseCharacters sets the RequireUppercaseCharacters field's value. -func (s *PasswordPolicy) SetRequireUppercaseCharacters(v bool) *PasswordPolicy { - s.RequireUppercaseCharacters = &v - return s -} - -// Contains information about the effect that a permissions boundary has on -// a policy simulation when the boundary is applied to an IAM entity. -type PermissionsBoundaryDecisionDetail struct { - _ struct{} `type:"structure"` - - // Specifies whether an action is allowed by a permissions boundary that is - // applied to an IAM entity (user or role). A value of true means that the permissions - // boundary does not deny the action. This means that the policy includes an - // Allow statement that matches the request. In this case, if an identity-based - // policy also allows the action, the request is allowed. A value of false means - // that either the requested action is not allowed (implicitly denied) or that - // the action is explicitly denied by the permissions boundary. In both of these - // cases, the action is not allowed, regardless of the identity-based policy. - AllowedByPermissionsBoundary *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 PermissionsBoundaryDecisionDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PermissionsBoundaryDecisionDetail) GoString() string { - return s.String() -} - -// SetAllowedByPermissionsBoundary sets the AllowedByPermissionsBoundary field's value. -func (s *PermissionsBoundaryDecisionDetail) SetAllowedByPermissionsBoundary(v bool) *PermissionsBoundaryDecisionDetail { - s.AllowedByPermissionsBoundary = &v - return s -} - -// Contains information about a managed policy. -// -// This data type is used as a response element in the CreatePolicy, GetPolicy, -// and ListPolicies operations. -// -// For more information about managed policies, refer to Managed policies and -// inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -type Policy struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web - // Services resources. - // - // For more information about ARNs, go to Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - Arn *string `min:"20" type:"string"` - - // The number of entities (users, groups, and roles) that the policy is attached - // to. - AttachmentCount *int64 `type:"integer"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the policy was created. - CreateDate *time.Time `type:"timestamp"` - - // The identifier for the version of the policy that is set as the default version. - DefaultVersionId *string `type:"string"` - - // A friendly description of the policy. - // - // This element is included in the response to the GetPolicy operation. It is - // not included in the response to the ListPolicies operation. - Description *string `type:"string"` - - // Specifies whether the policy can be attached to an IAM user, group, or role. - IsAttachable *bool `type:"boolean"` - - // The path to the policy. - // - // For more information about paths, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - Path *string `min:"1" type:"string"` - - // The number of entities (users and roles) for which the policy is used to - // set the permissions boundary. - // - // For more information about permissions boundaries, see Permissions boundaries - // for IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. - PermissionsBoundaryUsageCount *int64 `type:"integer"` - - // The stable and unique string identifying the policy. - // - // For more information about IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - PolicyId *string `min:"16" type:"string"` - - // The friendly name (not ARN) identifying the policy. - PolicyName *string `min:"1" type:"string"` - - // A list of tags that are attached to the instance profile. For more information - // about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - Tags []*Tag `type:"list"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the policy was last updated. - // - // When a policy has only one version, this field contains the date and time - // when the policy was created. When a policy has more than one version, this - // field contains the date and time when the most recent policy version was - // created. - UpdateDate *time.Time `type:"timestamp"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Policy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Policy) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Policy) SetArn(v string) *Policy { - s.Arn = &v - return s -} - -// SetAttachmentCount sets the AttachmentCount field's value. -func (s *Policy) SetAttachmentCount(v int64) *Policy { - s.AttachmentCount = &v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *Policy) SetCreateDate(v time.Time) *Policy { - s.CreateDate = &v - return s -} - -// SetDefaultVersionId sets the DefaultVersionId field's value. -func (s *Policy) SetDefaultVersionId(v string) *Policy { - s.DefaultVersionId = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Policy) SetDescription(v string) *Policy { - s.Description = &v - return s -} - -// SetIsAttachable sets the IsAttachable field's value. -func (s *Policy) SetIsAttachable(v bool) *Policy { - s.IsAttachable = &v - return s -} - -// SetPath sets the Path field's value. -func (s *Policy) SetPath(v string) *Policy { - s.Path = &v - return s -} - -// SetPermissionsBoundaryUsageCount sets the PermissionsBoundaryUsageCount field's value. -func (s *Policy) SetPermissionsBoundaryUsageCount(v int64) *Policy { - s.PermissionsBoundaryUsageCount = &v - return s -} - -// SetPolicyId sets the PolicyId field's value. -func (s *Policy) SetPolicyId(v string) *Policy { - s.PolicyId = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *Policy) SetPolicyName(v string) *Policy { - s.PolicyName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *Policy) SetTags(v []*Tag) *Policy { - s.Tags = v - return s -} - -// SetUpdateDate sets the UpdateDate field's value. -func (s *Policy) SetUpdateDate(v time.Time) *Policy { - s.UpdateDate = &v - return s -} - -// Contains information about an IAM policy, including the policy document. -// -// This data type is used as a response element in the GetAccountAuthorizationDetails -// operation. -type PolicyDetail struct { - _ struct{} `type:"structure"` - - // The policy document. - PolicyDocument *string `min:"1" type:"string"` - - // The name of the policy. - PolicyName *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 PolicyDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PolicyDetail) GoString() string { - return s.String() -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *PolicyDetail) SetPolicyDocument(v string) *PolicyDetail { - s.PolicyDocument = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *PolicyDetail) SetPolicyName(v string) *PolicyDetail { - s.PolicyName = &v - return s -} - -// Contains details about the permissions policies that are attached to the -// specified identity (user, group, or role). -// -// This data type is an element of the ListPoliciesGrantingServiceAccessEntry -// object. -type PolicyGrantingServiceAccess struct { - _ struct{} `type:"structure"` - - // The name of the entity (user or role) to which the inline policy is attached. - // - // This field is null for managed policies. For more information about these - // policy types, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html) - // in the IAM User Guide. - EntityName *string `min:"1" type:"string"` - - // The type of entity (user or role) that used the policy to access the service - // to which the inline policy is attached. - // - // This field is null for managed policies. For more information about these - // policy types, see Managed policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html) - // in the IAM User Guide. - EntityType *string `type:"string" enum:"PolicyOwnerEntityType"` - - // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web - // Services resources. - // - // For more information about ARNs, go to Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - PolicyArn *string `min:"20" type:"string"` - - // The policy name. - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` - - // The policy type. For more information about these policy types, see Managed - // policies and inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html) - // in the IAM User Guide. - // - // PolicyType is a required field - PolicyType *string `type:"string" required:"true" enum:"PolicyType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PolicyGrantingServiceAccess) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PolicyGrantingServiceAccess) GoString() string { - return s.String() -} - -// SetEntityName sets the EntityName field's value. -func (s *PolicyGrantingServiceAccess) SetEntityName(v string) *PolicyGrantingServiceAccess { - s.EntityName = &v - return s -} - -// SetEntityType sets the EntityType field's value. -func (s *PolicyGrantingServiceAccess) SetEntityType(v string) *PolicyGrantingServiceAccess { - s.EntityType = &v - return s -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *PolicyGrantingServiceAccess) SetPolicyArn(v string) *PolicyGrantingServiceAccess { - s.PolicyArn = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *PolicyGrantingServiceAccess) SetPolicyName(v string) *PolicyGrantingServiceAccess { - s.PolicyName = &v - return s -} - -// SetPolicyType sets the PolicyType field's value. -func (s *PolicyGrantingServiceAccess) SetPolicyType(v string) *PolicyGrantingServiceAccess { - s.PolicyType = &v - return s -} - -// Contains information about a group that a managed policy is attached to. -// -// This data type is used as a response element in the ListEntitiesForPolicy -// operation. -// -// For more information about managed policies, refer to Managed policies and -// inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -type PolicyGroup struct { - _ struct{} `type:"structure"` - - // The stable and unique string identifying the group. For more information - // about IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) - // in the IAM User Guide. - GroupId *string `min:"16" type:"string"` - - // The name (friendly name, not ARN) identifying the group. - GroupName *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 PolicyGroup) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PolicyGroup) GoString() string { - return s.String() -} - -// SetGroupId sets the GroupId field's value. -func (s *PolicyGroup) SetGroupId(v string) *PolicyGroup { - s.GroupId = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *PolicyGroup) SetGroupName(v string) *PolicyGroup { - s.GroupName = &v - return s -} - -// Contains information about a role that a managed policy is attached to. -// -// This data type is used as a response element in the ListEntitiesForPolicy -// operation. -// -// For more information about managed policies, refer to Managed policies and -// inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -type PolicyRole struct { - _ struct{} `type:"structure"` - - // The stable and unique string identifying the role. For more information about - // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) - // in the IAM User Guide. - RoleId *string `min:"16" type:"string"` - - // The name (friendly name, not ARN) identifying the role. - RoleName *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 PolicyRole) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PolicyRole) GoString() string { - return s.String() -} - -// SetRoleId sets the RoleId field's value. -func (s *PolicyRole) SetRoleId(v string) *PolicyRole { - s.RoleId = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *PolicyRole) SetRoleName(v string) *PolicyRole { - s.RoleName = &v - return s -} - -// Contains information about a user that a managed policy is attached to. -// -// This data type is used as a response element in the ListEntitiesForPolicy -// operation. -// -// For more information about managed policies, refer to Managed policies and -// inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -type PolicyUser struct { - _ struct{} `type:"structure"` - - // The stable and unique string identifying the user. For more information about - // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) - // in the IAM User Guide. - UserId *string `min:"16" type:"string"` - - // The name (friendly name, not ARN) identifying the user. - UserName *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 PolicyUser) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PolicyUser) GoString() string { - return s.String() -} - -// SetUserId sets the UserId field's value. -func (s *PolicyUser) SetUserId(v string) *PolicyUser { - s.UserId = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *PolicyUser) SetUserName(v string) *PolicyUser { - s.UserName = &v - return s -} - -// Contains information about a version of a managed policy. -// -// This data type is used as a response element in the CreatePolicyVersion, -// GetPolicyVersion, ListPolicyVersions, and GetAccountAuthorizationDetails -// operations. -// -// For more information about managed policies, refer to Managed policies and -// inline policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) -// in the IAM User Guide. -type PolicyVersion struct { - _ struct{} `type:"structure"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the policy version was created. - CreateDate *time.Time `type:"timestamp"` - - // The policy document. - // - // The policy document is returned in the response to the GetPolicyVersion and - // GetAccountAuthorizationDetails operations. It is not returned in the response - // to the CreatePolicyVersion or ListPolicyVersions operations. - // - // The policy document returned in this structure is URL-encoded compliant with - // RFC 3986 (https://tools.ietf.org/html/rfc3986). You can use a URL decoding - // method to convert the policy back to plain JSON text. For example, if you - // use Java, you can use the decode method of the java.net.URLDecoder utility - // class in the Java SDK. Other languages and SDKs provide similar functionality. - Document *string `min:"1" type:"string"` - - // Specifies whether the policy version is set as the policy's default version. - IsDefaultVersion *bool `type:"boolean"` - - // The identifier for the policy version. - // - // Policy version identifiers always begin with v (always lowercase). When a - // policy is created, the first policy version is v1. - VersionId *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 PolicyVersion) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PolicyVersion) GoString() string { - return s.String() -} - -// SetCreateDate sets the CreateDate field's value. -func (s *PolicyVersion) SetCreateDate(v time.Time) *PolicyVersion { - s.CreateDate = &v - return s -} - -// SetDocument sets the Document field's value. -func (s *PolicyVersion) SetDocument(v string) *PolicyVersion { - s.Document = &v - return s -} - -// SetIsDefaultVersion sets the IsDefaultVersion field's value. -func (s *PolicyVersion) SetIsDefaultVersion(v bool) *PolicyVersion { - s.IsDefaultVersion = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *PolicyVersion) SetVersionId(v string) *PolicyVersion { - s.VersionId = &v - return s -} - -// Contains the row and column of a location of a Statement element in a policy -// document. -// -// This data type is used as a member of the Statement type. -type Position struct { - _ struct{} `type:"structure"` - - // The column in the line containing the specified position in the document. - Column *int64 `type:"integer"` - - // The line containing the specified position in the document. - Line *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 Position) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Position) GoString() string { - return s.String() -} - -// SetColumn sets the Column field's value. -func (s *Position) SetColumn(v int64) *Position { - s.Column = &v - return s -} - -// SetLine sets the Line field's value. -func (s *Position) SetLine(v int64) *Position { - s.Line = &v - return s -} - -type PutGroupPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the group to associate the policy with. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@-. - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // The policy document. - // - // You must provide policies in JSON format in IAM. However, for CloudFormation - // templates formatted in YAML, you can provide the policy in JSON or YAML format. - // CloudFormation always converts a YAML policy to JSON format before submitting - // it to IAM. - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // PolicyDocument is a required field - PolicyDocument *string `min:"1" type:"string" required:"true"` - - // The name of the policy document. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // PolicyName is a required field - PolicyName *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 PutGroupPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutGroupPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutGroupPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutGroupPolicyInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.PolicyDocument == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyDocument")) - } - if s.PolicyDocument != nil && len(*s.PolicyDocument) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyDocument", 1)) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *PutGroupPolicyInput) SetGroupName(v string) *PutGroupPolicyInput { - s.GroupName = &v - return s -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *PutGroupPolicyInput) SetPolicyDocument(v string) *PutGroupPolicyInput { - s.PolicyDocument = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *PutGroupPolicyInput) SetPolicyName(v string) *PutGroupPolicyInput { - s.PolicyName = &v - return s -} - -type PutGroupPolicyOutput 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 PutGroupPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutGroupPolicyOutput) GoString() string { - return s.String() -} - -type PutRolePermissionsBoundaryInput struct { - _ struct{} `type:"structure"` - - // The ARN of the managed policy that is used to set the permissions boundary - // for the role. - // - // A permissions boundary policy defines the maximum permissions that identity-based - // policies can grant to an entity, but does not grant permissions. Permissions - // boundaries do not define the maximum permissions that a resource-based policy - // can grant to an entity. To learn more, see Permissions boundaries for IAM - // entities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. - // - // For more information about policy types, see Policy types (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types) - // in the IAM User Guide. - // - // PermissionsBoundary is a required field - PermissionsBoundary *string `min:"20" type:"string" required:"true"` - - // The name (friendly name, not ARN) of the IAM role for which you want to set - // the permissions boundary. - // - // RoleName is a required field - RoleName *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 PutRolePermissionsBoundaryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutRolePermissionsBoundaryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutRolePermissionsBoundaryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutRolePermissionsBoundaryInput"} - if s.PermissionsBoundary == nil { - invalidParams.Add(request.NewErrParamRequired("PermissionsBoundary")) - } - if s.PermissionsBoundary != nil && len(*s.PermissionsBoundary) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PermissionsBoundary", 20)) - } - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPermissionsBoundary sets the PermissionsBoundary field's value. -func (s *PutRolePermissionsBoundaryInput) SetPermissionsBoundary(v string) *PutRolePermissionsBoundaryInput { - s.PermissionsBoundary = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *PutRolePermissionsBoundaryInput) SetRoleName(v string) *PutRolePermissionsBoundaryInput { - s.RoleName = &v - return s -} - -type PutRolePermissionsBoundaryOutput 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 PutRolePermissionsBoundaryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutRolePermissionsBoundaryOutput) GoString() string { - return s.String() -} - -type PutRolePolicyInput struct { - _ struct{} `type:"structure"` - - // The policy document. - // - // You must provide policies in JSON format in IAM. However, for CloudFormation - // templates formatted in YAML, you can provide the policy in JSON or YAML format. - // CloudFormation always converts a YAML policy to JSON format before submitting - // it to IAM. - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // PolicyDocument is a required field - PolicyDocument *string `min:"1" type:"string" required:"true"` - - // The name of the policy document. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` - - // The name of the role to associate the policy with. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *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 PutRolePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutRolePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutRolePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutRolePolicyInput"} - if s.PolicyDocument == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyDocument")) - } - if s.PolicyDocument != nil && len(*s.PolicyDocument) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyDocument", 1)) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *PutRolePolicyInput) SetPolicyDocument(v string) *PutRolePolicyInput { - s.PolicyDocument = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *PutRolePolicyInput) SetPolicyName(v string) *PutRolePolicyInput { - s.PolicyName = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *PutRolePolicyInput) SetRoleName(v string) *PutRolePolicyInput { - s.RoleName = &v - return s -} - -type PutRolePolicyOutput 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 PutRolePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutRolePolicyOutput) GoString() string { - return s.String() -} - -type PutUserPermissionsBoundaryInput struct { - _ struct{} `type:"structure"` - - // The ARN of the managed policy that is used to set the permissions boundary - // for the user. - // - // A permissions boundary policy defines the maximum permissions that identity-based - // policies can grant to an entity, but does not grant permissions. Permissions - // boundaries do not define the maximum permissions that a resource-based policy - // can grant to an entity. To learn more, see Permissions boundaries for IAM - // entities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. - // - // For more information about policy types, see Policy types (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types) - // in the IAM User Guide. - // - // PermissionsBoundary is a required field - PermissionsBoundary *string `min:"20" type:"string" required:"true"` - - // The name (friendly name, not ARN) of the IAM user for which you want to set - // the permissions boundary. - // - // UserName is a required field - UserName *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 PutUserPermissionsBoundaryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutUserPermissionsBoundaryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutUserPermissionsBoundaryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutUserPermissionsBoundaryInput"} - if s.PermissionsBoundary == nil { - invalidParams.Add(request.NewErrParamRequired("PermissionsBoundary")) - } - if s.PermissionsBoundary != nil && len(*s.PermissionsBoundary) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PermissionsBoundary", 20)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPermissionsBoundary sets the PermissionsBoundary field's value. -func (s *PutUserPermissionsBoundaryInput) SetPermissionsBoundary(v string) *PutUserPermissionsBoundaryInput { - s.PermissionsBoundary = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *PutUserPermissionsBoundaryInput) SetUserName(v string) *PutUserPermissionsBoundaryInput { - s.UserName = &v - return s -} - -type PutUserPermissionsBoundaryOutput 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 PutUserPermissionsBoundaryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutUserPermissionsBoundaryOutput) GoString() string { - return s.String() -} - -type PutUserPolicyInput struct { - _ struct{} `type:"structure"` - - // The policy document. - // - // You must provide policies in JSON format in IAM. However, for CloudFormation - // templates formatted in YAML, you can provide the policy in JSON or YAML format. - // CloudFormation always converts a YAML policy to JSON format before submitting - // it to IAM. - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // PolicyDocument is a required field - PolicyDocument *string `min:"1" type:"string" required:"true"` - - // The name of the policy document. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // PolicyName is a required field - PolicyName *string `min:"1" type:"string" required:"true"` - - // The name of the user to associate the policy with. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *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 PutUserPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutUserPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutUserPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutUserPolicyInput"} - if s.PolicyDocument == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyDocument")) - } - if s.PolicyDocument != nil && len(*s.PolicyDocument) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyDocument", 1)) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyName != nil && len(*s.PolicyName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *PutUserPolicyInput) SetPolicyDocument(v string) *PutUserPolicyInput { - s.PolicyDocument = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *PutUserPolicyInput) SetPolicyName(v string) *PutUserPolicyInput { - s.PolicyName = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *PutUserPolicyInput) SetUserName(v string) *PutUserPolicyInput { - s.UserName = &v - return s -} - -type PutUserPolicyOutput 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 PutUserPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutUserPolicyOutput) GoString() string { - return s.String() -} - -type RemoveClientIDFromOpenIDConnectProviderInput struct { - _ struct{} `type:"structure"` - - // The client ID (also known as audience) to remove from the IAM OIDC provider - // resource. For more information about client IDs, see CreateOpenIDConnectProvider. - // - // ClientID is a required field - ClientID *string `min:"1" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the IAM OIDC provider resource to remove - // the client ID from. You can get a list of OIDC provider ARNs by using the - // ListOpenIDConnectProviders operation. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // OpenIDConnectProviderArn is a required field - OpenIDConnectProviderArn *string `min:"20" 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 RemoveClientIDFromOpenIDConnectProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RemoveClientIDFromOpenIDConnectProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveClientIDFromOpenIDConnectProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveClientIDFromOpenIDConnectProviderInput"} - if s.ClientID == nil { - invalidParams.Add(request.NewErrParamRequired("ClientID")) - } - if s.ClientID != nil && len(*s.ClientID) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientID", 1)) - } - if s.OpenIDConnectProviderArn == nil { - invalidParams.Add(request.NewErrParamRequired("OpenIDConnectProviderArn")) - } - if s.OpenIDConnectProviderArn != nil && len(*s.OpenIDConnectProviderArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("OpenIDConnectProviderArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientID sets the ClientID field's value. -func (s *RemoveClientIDFromOpenIDConnectProviderInput) SetClientID(v string) *RemoveClientIDFromOpenIDConnectProviderInput { - s.ClientID = &v - return s -} - -// SetOpenIDConnectProviderArn sets the OpenIDConnectProviderArn field's value. -func (s *RemoveClientIDFromOpenIDConnectProviderInput) SetOpenIDConnectProviderArn(v string) *RemoveClientIDFromOpenIDConnectProviderInput { - s.OpenIDConnectProviderArn = &v - return s -} - -type RemoveClientIDFromOpenIDConnectProviderOutput 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 RemoveClientIDFromOpenIDConnectProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RemoveClientIDFromOpenIDConnectProviderOutput) GoString() string { - return s.String() -} - -type RemoveRoleFromInstanceProfileInput struct { - _ struct{} `type:"structure"` - - // The name of the instance profile to update. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // InstanceProfileName is a required field - InstanceProfileName *string `min:"1" type:"string" required:"true"` - - // The name of the role to remove. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *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 RemoveRoleFromInstanceProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RemoveRoleFromInstanceProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveRoleFromInstanceProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveRoleFromInstanceProfileInput"} - if s.InstanceProfileName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceProfileName")) - } - if s.InstanceProfileName != nil && len(*s.InstanceProfileName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InstanceProfileName", 1)) - } - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceProfileName sets the InstanceProfileName field's value. -func (s *RemoveRoleFromInstanceProfileInput) SetInstanceProfileName(v string) *RemoveRoleFromInstanceProfileInput { - s.InstanceProfileName = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *RemoveRoleFromInstanceProfileInput) SetRoleName(v string) *RemoveRoleFromInstanceProfileInput { - s.RoleName = &v - return s -} - -type RemoveRoleFromInstanceProfileOutput 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 RemoveRoleFromInstanceProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RemoveRoleFromInstanceProfileOutput) GoString() string { - return s.String() -} - -type RemoveUserFromGroupInput struct { - _ struct{} `type:"structure"` - - // The name of the group to update. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // The name of the user to remove. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *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 RemoveUserFromGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RemoveUserFromGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveUserFromGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveUserFromGroupInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *RemoveUserFromGroupInput) SetGroupName(v string) *RemoveUserFromGroupInput { - s.GroupName = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *RemoveUserFromGroupInput) SetUserName(v string) *RemoveUserFromGroupInput { - s.UserName = &v - return s -} - -type RemoveUserFromGroupOutput 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 RemoveUserFromGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RemoveUserFromGroupOutput) GoString() string { - return s.String() -} - -type ResetServiceSpecificCredentialInput struct { - _ struct{} `type:"structure"` - - // The unique identifier of the service-specific credential. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters that can consist of any upper or lowercased letter - // or digit. - // - // ServiceSpecificCredentialId is a required field - ServiceSpecificCredentialId *string `min:"20" type:"string" required:"true"` - - // The name of the IAM user associated with the service-specific credential. - // If this value is not specified, then the operation assumes the user whose - // credentials are used to call the operation. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - UserName *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 ResetServiceSpecificCredentialInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResetServiceSpecificCredentialInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResetServiceSpecificCredentialInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResetServiceSpecificCredentialInput"} - if s.ServiceSpecificCredentialId == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceSpecificCredentialId")) - } - if s.ServiceSpecificCredentialId != nil && len(*s.ServiceSpecificCredentialId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("ServiceSpecificCredentialId", 20)) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServiceSpecificCredentialId sets the ServiceSpecificCredentialId field's value. -func (s *ResetServiceSpecificCredentialInput) SetServiceSpecificCredentialId(v string) *ResetServiceSpecificCredentialInput { - s.ServiceSpecificCredentialId = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *ResetServiceSpecificCredentialInput) SetUserName(v string) *ResetServiceSpecificCredentialInput { - s.UserName = &v - return s -} - -type ResetServiceSpecificCredentialOutput struct { - _ struct{} `type:"structure"` - - // A structure with details about the updated service-specific credential, including - // the new password. - // - // This is the only time that you can access the password. You cannot recover - // the password later, but you can reset it again. - ServiceSpecificCredential *ServiceSpecificCredential `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 ResetServiceSpecificCredentialOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResetServiceSpecificCredentialOutput) GoString() string { - return s.String() -} - -// SetServiceSpecificCredential sets the ServiceSpecificCredential field's value. -func (s *ResetServiceSpecificCredentialOutput) SetServiceSpecificCredential(v *ServiceSpecificCredential) *ResetServiceSpecificCredentialOutput { - s.ServiceSpecificCredential = v - return s -} - -// Contains the result of the simulation of a single API operation call on a -// single resource. -// -// This data type is used by a member of the EvaluationResult data type. -type ResourceSpecificResult struct { - _ struct{} `type:"structure"` - - // Additional details about the results of the evaluation decision on a single - // resource. This parameter is returned only for cross-account simulations. - // This parameter explains how each policy type contributes to the resource-specific - // evaluation decision. - EvalDecisionDetails map[string]*string `type:"map"` - - // The result of the simulation of the simulated API operation on the resource - // specified in EvalResourceName. - // - // EvalResourceDecision is a required field - EvalResourceDecision *string `type:"string" required:"true" enum:"PolicyEvaluationDecisionType"` - - // The name of the simulated resource, in Amazon Resource Name (ARN) format. - // - // EvalResourceName is a required field - EvalResourceName *string `min:"1" type:"string" required:"true"` - - // A list of the statements in the input policies that determine the result - // for this part of the simulation. Remember that even if multiple statements - // allow the operation on the resource, if any statement denies that operation, - // then the explicit deny overrides any allow. In addition, the deny statement - // is the only entry included in the result. - MatchedStatements []*Statement `type:"list"` - - // A list of context keys that are required by the included input policies but - // that were not provided by one of the input parameters. This list is used - // when a list of ARNs is included in the ResourceArns parameter instead of - // "*". If you do not specify individual resources, by setting ResourceArns - // to "*" or by not including the ResourceArns parameter, then any missing context - // values are instead included under the EvaluationResults section. To discover - // the context keys used by a set of policies, you can call GetContextKeysForCustomPolicy - // or GetContextKeysForPrincipalPolicy. - MissingContextValues []*string `type:"list"` - - // Contains information about the effect that a permissions boundary has on - // a policy simulation when that boundary is applied to an IAM entity. - PermissionsBoundaryDecisionDetail *PermissionsBoundaryDecisionDetail `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 ResourceSpecificResult) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResourceSpecificResult) GoString() string { - return s.String() -} - -// SetEvalDecisionDetails sets the EvalDecisionDetails field's value. -func (s *ResourceSpecificResult) SetEvalDecisionDetails(v map[string]*string) *ResourceSpecificResult { - s.EvalDecisionDetails = v - return s -} - -// SetEvalResourceDecision sets the EvalResourceDecision field's value. -func (s *ResourceSpecificResult) SetEvalResourceDecision(v string) *ResourceSpecificResult { - s.EvalResourceDecision = &v - return s -} - -// SetEvalResourceName sets the EvalResourceName field's value. -func (s *ResourceSpecificResult) SetEvalResourceName(v string) *ResourceSpecificResult { - s.EvalResourceName = &v - return s -} - -// SetMatchedStatements sets the MatchedStatements field's value. -func (s *ResourceSpecificResult) SetMatchedStatements(v []*Statement) *ResourceSpecificResult { - s.MatchedStatements = v - return s -} - -// SetMissingContextValues sets the MissingContextValues field's value. -func (s *ResourceSpecificResult) SetMissingContextValues(v []*string) *ResourceSpecificResult { - s.MissingContextValues = v - return s -} - -// SetPermissionsBoundaryDecisionDetail sets the PermissionsBoundaryDecisionDetail field's value. -func (s *ResourceSpecificResult) SetPermissionsBoundaryDecisionDetail(v *PermissionsBoundaryDecisionDetail) *ResourceSpecificResult { - s.PermissionsBoundaryDecisionDetail = v - return s -} - -type ResyncMFADeviceInput struct { - _ struct{} `type:"structure"` - - // An authentication code emitted by the device. - // - // The format for this parameter is a sequence of six digits. - // - // AuthenticationCode1 is a required field - AuthenticationCode1 *string `min:"6" type:"string" required:"true"` - - // A subsequent authentication code emitted by the device. - // - // The format for this parameter is a sequence of six digits. - // - // AuthenticationCode2 is a required field - AuthenticationCode2 *string `min:"6" type:"string" required:"true"` - - // Serial number that uniquely identifies the MFA device. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // SerialNumber is a required field - SerialNumber *string `min:"9" type:"string" required:"true"` - - // The name of the user whose MFA device you want to resynchronize. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *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 ResyncMFADeviceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResyncMFADeviceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResyncMFADeviceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResyncMFADeviceInput"} - if s.AuthenticationCode1 == nil { - invalidParams.Add(request.NewErrParamRequired("AuthenticationCode1")) - } - if s.AuthenticationCode1 != nil && len(*s.AuthenticationCode1) < 6 { - invalidParams.Add(request.NewErrParamMinLen("AuthenticationCode1", 6)) - } - if s.AuthenticationCode2 == nil { - invalidParams.Add(request.NewErrParamRequired("AuthenticationCode2")) - } - if s.AuthenticationCode2 != nil && len(*s.AuthenticationCode2) < 6 { - invalidParams.Add(request.NewErrParamMinLen("AuthenticationCode2", 6)) - } - if s.SerialNumber == nil { - invalidParams.Add(request.NewErrParamRequired("SerialNumber")) - } - if s.SerialNumber != nil && len(*s.SerialNumber) < 9 { - invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthenticationCode1 sets the AuthenticationCode1 field's value. -func (s *ResyncMFADeviceInput) SetAuthenticationCode1(v string) *ResyncMFADeviceInput { - s.AuthenticationCode1 = &v - return s -} - -// SetAuthenticationCode2 sets the AuthenticationCode2 field's value. -func (s *ResyncMFADeviceInput) SetAuthenticationCode2(v string) *ResyncMFADeviceInput { - s.AuthenticationCode2 = &v - return s -} - -// SetSerialNumber sets the SerialNumber field's value. -func (s *ResyncMFADeviceInput) SetSerialNumber(v string) *ResyncMFADeviceInput { - s.SerialNumber = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *ResyncMFADeviceInput) SetUserName(v string) *ResyncMFADeviceInput { - s.UserName = &v - return s -} - -type ResyncMFADeviceOutput 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 ResyncMFADeviceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResyncMFADeviceOutput) GoString() string { - return s.String() -} - -// Contains information about an IAM role. This structure is returned as a response -// element in several API operations that interact with roles. -type Role struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) specifying the role. For more information - // about ARNs and how to use them in policies, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide guide. - // - // Arn is a required field - Arn *string `min:"20" type:"string" required:"true"` - - // The policy that grants an entity permission to assume the role. - AssumeRolePolicyDocument *string `min:"1" type:"string"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the role was created. - // - // CreateDate is a required field - CreateDate *time.Time `type:"timestamp" required:"true"` - - // A description of the role that you provide. - Description *string `type:"string"` - - // The maximum session duration (in seconds) for the specified role. Anyone - // who uses the CLI, or API to assume the role can specify the duration using - // the optional DurationSeconds API parameter or duration-seconds CLI parameter. - MaxSessionDuration *int64 `min:"3600" type:"integer"` - - // The path to the role. For more information about paths, see IAM identifiers - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // Path is a required field - Path *string `min:"1" type:"string" required:"true"` - - // The ARN of the policy used to set the permissions boundary for the role. - // - // For more information about permissions boundaries, see Permissions boundaries - // for IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. - PermissionsBoundary *AttachedPermissionsBoundary `type:"structure"` - - // The stable and unique string identifying the role. For more information about - // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // RoleId is a required field - RoleId *string `min:"16" type:"string" required:"true"` - - // Contains information about the last time that an IAM role was used. This - // includes the date and time and the Region in which the role was last used. - // Activity is only reported for the trailing 400 days. This period can be shorter - // if your Region began supporting these features within the last year. The - // role might have been used more than 400 days ago. For more information, see - // Regions where data is tracked (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period) - // in the IAM user Guide. - RoleLastUsed *RoleLastUsed `type:"structure"` - - // The friendly name that identifies the role. - // - // RoleName is a required field - RoleName *string `min:"1" type:"string" required:"true"` - - // A list of tags that are attached to the role. For more information about - // tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User 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 Role) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Role) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *Role) SetArn(v string) *Role { - s.Arn = &v - return s -} - -// SetAssumeRolePolicyDocument sets the AssumeRolePolicyDocument field's value. -func (s *Role) SetAssumeRolePolicyDocument(v string) *Role { - s.AssumeRolePolicyDocument = &v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *Role) SetCreateDate(v time.Time) *Role { - s.CreateDate = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *Role) SetDescription(v string) *Role { - s.Description = &v - return s -} - -// SetMaxSessionDuration sets the MaxSessionDuration field's value. -func (s *Role) SetMaxSessionDuration(v int64) *Role { - s.MaxSessionDuration = &v - return s -} - -// SetPath sets the Path field's value. -func (s *Role) SetPath(v string) *Role { - s.Path = &v - return s -} - -// SetPermissionsBoundary sets the PermissionsBoundary field's value. -func (s *Role) SetPermissionsBoundary(v *AttachedPermissionsBoundary) *Role { - s.PermissionsBoundary = v - return s -} - -// SetRoleId sets the RoleId field's value. -func (s *Role) SetRoleId(v string) *Role { - s.RoleId = &v - return s -} - -// SetRoleLastUsed sets the RoleLastUsed field's value. -func (s *Role) SetRoleLastUsed(v *RoleLastUsed) *Role { - s.RoleLastUsed = v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *Role) SetRoleName(v string) *Role { - s.RoleName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *Role) SetTags(v []*Tag) *Role { - s.Tags = v - return s -} - -// Contains information about an IAM role, including all of the role's policies. -// -// This data type is used as a response element in the GetAccountAuthorizationDetails -// operation. -type RoleDetail struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web - // Services resources. - // - // For more information about ARNs, go to Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - Arn *string `min:"20" type:"string"` - - // The trust policy that grants permission to assume the role. - AssumeRolePolicyDocument *string `min:"1" type:"string"` - - // A list of managed policies attached to the role. These policies are the role's - // access (permissions) policies. - AttachedManagedPolicies []*AttachedPolicy `type:"list"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the role was created. - CreateDate *time.Time `type:"timestamp"` - - // A list of instance profiles that contain this role. - InstanceProfileList []*InstanceProfile `type:"list"` - - // The path to the role. For more information about paths, see IAM identifiers - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - Path *string `min:"1" type:"string"` - - // The ARN of the policy used to set the permissions boundary for the role. - // - // For more information about permissions boundaries, see Permissions boundaries - // for IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. - PermissionsBoundary *AttachedPermissionsBoundary `type:"structure"` - - // The stable and unique string identifying the role. For more information about - // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - RoleId *string `min:"16" type:"string"` - - // Contains information about the last time that an IAM role was used. This - // includes the date and time and the Region in which the role was last used. - // Activity is only reported for the trailing 400 days. This period can be shorter - // if your Region began supporting these features within the last year. The - // role might have been used more than 400 days ago. For more information, see - // Regions where data is tracked (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period) - // in the IAM User Guide. - RoleLastUsed *RoleLastUsed `type:"structure"` - - // The friendly name that identifies the role. - RoleName *string `min:"1" type:"string"` - - // A list of inline policies embedded in the role. These policies are the role's - // access (permissions) policies. - RolePolicyList []*PolicyDetail `type:"list"` - - // A list of tags that are attached to the role. For more information about - // tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User 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 RoleDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RoleDetail) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *RoleDetail) SetArn(v string) *RoleDetail { - s.Arn = &v - return s -} - -// SetAssumeRolePolicyDocument sets the AssumeRolePolicyDocument field's value. -func (s *RoleDetail) SetAssumeRolePolicyDocument(v string) *RoleDetail { - s.AssumeRolePolicyDocument = &v - return s -} - -// SetAttachedManagedPolicies sets the AttachedManagedPolicies field's value. -func (s *RoleDetail) SetAttachedManagedPolicies(v []*AttachedPolicy) *RoleDetail { - s.AttachedManagedPolicies = v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *RoleDetail) SetCreateDate(v time.Time) *RoleDetail { - s.CreateDate = &v - return s -} - -// SetInstanceProfileList sets the InstanceProfileList field's value. -func (s *RoleDetail) SetInstanceProfileList(v []*InstanceProfile) *RoleDetail { - s.InstanceProfileList = v - return s -} - -// SetPath sets the Path field's value. -func (s *RoleDetail) SetPath(v string) *RoleDetail { - s.Path = &v - return s -} - -// SetPermissionsBoundary sets the PermissionsBoundary field's value. -func (s *RoleDetail) SetPermissionsBoundary(v *AttachedPermissionsBoundary) *RoleDetail { - s.PermissionsBoundary = v - return s -} - -// SetRoleId sets the RoleId field's value. -func (s *RoleDetail) SetRoleId(v string) *RoleDetail { - s.RoleId = &v - return s -} - -// SetRoleLastUsed sets the RoleLastUsed field's value. -func (s *RoleDetail) SetRoleLastUsed(v *RoleLastUsed) *RoleDetail { - s.RoleLastUsed = v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *RoleDetail) SetRoleName(v string) *RoleDetail { - s.RoleName = &v - return s -} - -// SetRolePolicyList sets the RolePolicyList field's value. -func (s *RoleDetail) SetRolePolicyList(v []*PolicyDetail) *RoleDetail { - s.RolePolicyList = v - return s -} - -// SetTags sets the Tags field's value. -func (s *RoleDetail) SetTags(v []*Tag) *RoleDetail { - s.Tags = v - return s -} - -// Contains information about the last time that an IAM role was used. This -// includes the date and time and the Region in which the role was last used. -// Activity is only reported for the trailing 400 days. This period can be shorter -// if your Region began supporting these features within the last year. The -// role might have been used more than 400 days ago. For more information, see -// Regions where data is tracked (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period) -// in the IAM user Guide. -// -// This data type is returned as a response element in the GetRole and GetAccountAuthorizationDetails -// operations. -type RoleLastUsed struct { - _ struct{} `type:"structure"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // that the role was last used. - // - // This field is null if the role has not been used within the IAM tracking - // period. For more information about the tracking period, see Regions where - // data is tracked (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period) - // in the IAM User Guide. - LastUsedDate *time.Time `type:"timestamp"` - - // The name of the Amazon Web Services Region in which the role was last used. - Region *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 RoleLastUsed) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RoleLastUsed) GoString() string { - return s.String() -} - -// SetLastUsedDate sets the LastUsedDate field's value. -func (s *RoleLastUsed) SetLastUsedDate(v time.Time) *RoleLastUsed { - s.LastUsedDate = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *RoleLastUsed) SetRegion(v string) *RoleLastUsed { - s.Region = &v - return s -} - -// An object that contains details about how a service-linked role is used, -// if that information is returned by the service. -// -// This data type is used as a response element in the GetServiceLinkedRoleDeletionStatus -// operation. -type RoleUsageType struct { - _ struct{} `type:"structure"` - - // The name of the Region where the service-linked role is being used. - Region *string `min:"1" type:"string"` - - // The name of the resource that is using the service-linked role. - Resources []*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 RoleUsageType) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RoleUsageType) GoString() string { - return s.String() -} - -// SetRegion sets the Region field's value. -func (s *RoleUsageType) SetRegion(v string) *RoleUsageType { - s.Region = &v - return s -} - -// SetResources sets the Resources field's value. -func (s *RoleUsageType) SetResources(v []*string) *RoleUsageType { - s.Resources = v - return s -} - -// Contains the list of SAML providers for this account. -type SAMLProviderListEntry struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the SAML provider. - Arn *string `min:"20" type:"string"` - - // The date and time when the SAML provider was created. - CreateDate *time.Time `type:"timestamp"` - - // The expiration date and time for the SAML provider. - ValidUntil *time.Time `type:"timestamp"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SAMLProviderListEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SAMLProviderListEntry) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *SAMLProviderListEntry) SetArn(v string) *SAMLProviderListEntry { - s.Arn = &v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *SAMLProviderListEntry) SetCreateDate(v time.Time) *SAMLProviderListEntry { - s.CreateDate = &v - return s -} - -// SetValidUntil sets the ValidUntil field's value. -func (s *SAMLProviderListEntry) SetValidUntil(v time.Time) *SAMLProviderListEntry { - s.ValidUntil = &v - return s -} - -// Contains information about an SSH public key. -// -// This data type is used as a response element in the GetSSHPublicKey and UploadSSHPublicKey -// operations. -type SSHPublicKey struct { - _ struct{} `type:"structure"` - - // The MD5 message digest of the SSH public key. - // - // Fingerprint is a required field - Fingerprint *string `min:"48" type:"string" required:"true"` - - // The SSH public key. - // - // SSHPublicKeyBody is a required field - SSHPublicKeyBody *string `min:"1" type:"string" required:"true"` - - // The unique identifier for the SSH public key. - // - // SSHPublicKeyId is a required field - SSHPublicKeyId *string `min:"20" type:"string" required:"true"` - - // The status of the SSH public key. Active means that the key can be used for - // authentication with an CodeCommit repository. Inactive means that the key - // cannot be used. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"StatusType"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the SSH public key was uploaded. - UploadDate *time.Time `type:"timestamp"` - - // The name of the IAM user associated with the SSH public key. - // - // UserName is a required field - UserName *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 SSHPublicKey) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SSHPublicKey) GoString() string { - return s.String() -} - -// SetFingerprint sets the Fingerprint field's value. -func (s *SSHPublicKey) SetFingerprint(v string) *SSHPublicKey { - s.Fingerprint = &v - return s -} - -// SetSSHPublicKeyBody sets the SSHPublicKeyBody field's value. -func (s *SSHPublicKey) SetSSHPublicKeyBody(v string) *SSHPublicKey { - s.SSHPublicKeyBody = &v - return s -} - -// SetSSHPublicKeyId sets the SSHPublicKeyId field's value. -func (s *SSHPublicKey) SetSSHPublicKeyId(v string) *SSHPublicKey { - s.SSHPublicKeyId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *SSHPublicKey) SetStatus(v string) *SSHPublicKey { - s.Status = &v - return s -} - -// SetUploadDate sets the UploadDate field's value. -func (s *SSHPublicKey) SetUploadDate(v time.Time) *SSHPublicKey { - s.UploadDate = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *SSHPublicKey) SetUserName(v string) *SSHPublicKey { - s.UserName = &v - return s -} - -// Contains information about an SSH public key, without the key's body or fingerprint. -// -// This data type is used as a response element in the ListSSHPublicKeys operation. -type SSHPublicKeyMetadata struct { - _ struct{} `type:"structure"` - - // The unique identifier for the SSH public key. - // - // SSHPublicKeyId is a required field - SSHPublicKeyId *string `min:"20" type:"string" required:"true"` - - // The status of the SSH public key. Active means that the key can be used for - // authentication with an CodeCommit repository. Inactive means that the key - // cannot be used. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"StatusType"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the SSH public key was uploaded. - // - // UploadDate is a required field - UploadDate *time.Time `type:"timestamp" required:"true"` - - // The name of the IAM user associated with the SSH public key. - // - // UserName is a required field - UserName *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 SSHPublicKeyMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SSHPublicKeyMetadata) GoString() string { - return s.String() -} - -// SetSSHPublicKeyId sets the SSHPublicKeyId field's value. -func (s *SSHPublicKeyMetadata) SetSSHPublicKeyId(v string) *SSHPublicKeyMetadata { - s.SSHPublicKeyId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *SSHPublicKeyMetadata) SetStatus(v string) *SSHPublicKeyMetadata { - s.Status = &v - return s -} - -// SetUploadDate sets the UploadDate field's value. -func (s *SSHPublicKeyMetadata) SetUploadDate(v time.Time) *SSHPublicKeyMetadata { - s.UploadDate = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *SSHPublicKeyMetadata) SetUserName(v string) *SSHPublicKeyMetadata { - s.UserName = &v - return s -} - -// Contains information about a server certificate. -// -// This data type is used as a response element in the GetServerCertificate -// operation. -type ServerCertificate struct { - _ struct{} `type:"structure"` - - // The contents of the public key certificate. - // - // CertificateBody is a required field - CertificateBody *string `min:"1" type:"string" required:"true"` - - // The contents of the public key certificate chain. - CertificateChain *string `min:"1" type:"string"` - - // The meta information of the server certificate, such as its name, path, ID, - // and ARN. - // - // ServerCertificateMetadata is a required field - ServerCertificateMetadata *ServerCertificateMetadata `type:"structure" required:"true"` - - // A list of tags that are attached to the server certificate. For more information - // about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User 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 ServerCertificate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ServerCertificate) GoString() string { - return s.String() -} - -// SetCertificateBody sets the CertificateBody field's value. -func (s *ServerCertificate) SetCertificateBody(v string) *ServerCertificate { - s.CertificateBody = &v - return s -} - -// SetCertificateChain sets the CertificateChain field's value. -func (s *ServerCertificate) SetCertificateChain(v string) *ServerCertificate { - s.CertificateChain = &v - return s -} - -// SetServerCertificateMetadata sets the ServerCertificateMetadata field's value. -func (s *ServerCertificate) SetServerCertificateMetadata(v *ServerCertificateMetadata) *ServerCertificate { - s.ServerCertificateMetadata = v - return s -} - -// SetTags sets the Tags field's value. -func (s *ServerCertificate) SetTags(v []*Tag) *ServerCertificate { - s.Tags = v - return s -} - -// Contains information about a server certificate without its certificate body, -// certificate chain, and private key. -// -// This data type is used as a response element in the UploadServerCertificate -// and ListServerCertificates operations. -type ServerCertificateMetadata struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) specifying the server certificate. For more - // information about ARNs and how to use them in policies, see IAM identifiers - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // Arn is a required field - Arn *string `min:"20" type:"string" required:"true"` - - // The date on which the certificate is set to expire. - Expiration *time.Time `type:"timestamp"` - - // The path to the server certificate. For more information about paths, see - // IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // Path is a required field - Path *string `min:"1" type:"string" required:"true"` - - // The stable and unique string identifying the server certificate. For more - // information about IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // ServerCertificateId is a required field - ServerCertificateId *string `min:"16" type:"string" required:"true"` - - // The name that identifies the server certificate. - // - // ServerCertificateName is a required field - ServerCertificateName *string `min:"1" type:"string" required:"true"` - - // The date when the server certificate was uploaded. - UploadDate *time.Time `type:"timestamp"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ServerCertificateMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ServerCertificateMetadata) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *ServerCertificateMetadata) SetArn(v string) *ServerCertificateMetadata { - s.Arn = &v - return s -} - -// SetExpiration sets the Expiration field's value. -func (s *ServerCertificateMetadata) SetExpiration(v time.Time) *ServerCertificateMetadata { - s.Expiration = &v - return s -} - -// SetPath sets the Path field's value. -func (s *ServerCertificateMetadata) SetPath(v string) *ServerCertificateMetadata { - s.Path = &v - return s -} - -// SetServerCertificateId sets the ServerCertificateId field's value. -func (s *ServerCertificateMetadata) SetServerCertificateId(v string) *ServerCertificateMetadata { - s.ServerCertificateId = &v - return s -} - -// SetServerCertificateName sets the ServerCertificateName field's value. -func (s *ServerCertificateMetadata) SetServerCertificateName(v string) *ServerCertificateMetadata { - s.ServerCertificateName = &v - return s -} - -// SetUploadDate sets the UploadDate field's value. -func (s *ServerCertificateMetadata) SetUploadDate(v time.Time) *ServerCertificateMetadata { - s.UploadDate = &v - return s -} - -// Contains details about the most recent attempt to access the service. -// -// This data type is used as a response element in the GetServiceLastAccessedDetails -// operation. -type ServiceLastAccessed struct { - _ struct{} `type:"structure"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when an authenticated entity most recently attempted to access the service. - // Amazon Web Services does not report unauthenticated requests. - // - // This field is null if no IAM entities attempted to access the service within - // the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). - LastAuthenticated *time.Time `type:"timestamp"` - - // The ARN of the authenticated entity (user or role) that last attempted to - // access the service. Amazon Web Services does not report unauthenticated requests. - // - // This field is null if no IAM entities attempted to access the service within - // the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). - LastAuthenticatedEntity *string `min:"20" type:"string"` - - // The Region from which the authenticated entity (user or role) last attempted - // to access the service. Amazon Web Services does not report unauthenticated - // requests. - // - // This field is null if no IAM entities attempted to access the service within - // the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). - LastAuthenticatedRegion *string `type:"string"` - - // The name of the service in which access was attempted. - // - // ServiceName is a required field - ServiceName *string `type:"string" required:"true"` - - // The namespace of the service in which access was attempted. - // - // To learn the service namespace of a service, see Actions, resources, and - // condition keys for Amazon Web Services services (https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html) - // in the Service Authorization Reference. Choose the name of the service to - // view details for that service. In the first paragraph, find the service prefix. - // For example, (service prefix: a4b). For more information about service namespaces, - // see Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) - // in the Amazon Web Services General Reference. - // - // ServiceNamespace is a required field - ServiceNamespace *string `min:"1" type:"string" required:"true"` - - // The total number of authenticated principals (root user, IAM users, or IAM - // roles) that have attempted to access the service. - // - // This field is null if no principals attempted to access the service within - // the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). - TotalAuthenticatedEntities *int64 `type:"integer"` - - // An object that contains details about the most recent attempt to access a - // tracked action within the service. - // - // This field is null if there no tracked actions or if the principal did not - // use the tracked actions within the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). - // This field is also null if the report was generated at the service level - // and not the action level. For more information, see the Granularity field - // in GenerateServiceLastAccessedDetails. - TrackedActionsLastAccessed []*TrackedActionLastAccessed `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 ServiceLastAccessed) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ServiceLastAccessed) GoString() string { - return s.String() -} - -// SetLastAuthenticated sets the LastAuthenticated field's value. -func (s *ServiceLastAccessed) SetLastAuthenticated(v time.Time) *ServiceLastAccessed { - s.LastAuthenticated = &v - return s -} - -// SetLastAuthenticatedEntity sets the LastAuthenticatedEntity field's value. -func (s *ServiceLastAccessed) SetLastAuthenticatedEntity(v string) *ServiceLastAccessed { - s.LastAuthenticatedEntity = &v - return s -} - -// SetLastAuthenticatedRegion sets the LastAuthenticatedRegion field's value. -func (s *ServiceLastAccessed) SetLastAuthenticatedRegion(v string) *ServiceLastAccessed { - s.LastAuthenticatedRegion = &v - return s -} - -// SetServiceName sets the ServiceName field's value. -func (s *ServiceLastAccessed) SetServiceName(v string) *ServiceLastAccessed { - s.ServiceName = &v - return s -} - -// SetServiceNamespace sets the ServiceNamespace field's value. -func (s *ServiceLastAccessed) SetServiceNamespace(v string) *ServiceLastAccessed { - s.ServiceNamespace = &v - return s -} - -// SetTotalAuthenticatedEntities sets the TotalAuthenticatedEntities field's value. -func (s *ServiceLastAccessed) SetTotalAuthenticatedEntities(v int64) *ServiceLastAccessed { - s.TotalAuthenticatedEntities = &v - return s -} - -// SetTrackedActionsLastAccessed sets the TrackedActionsLastAccessed field's value. -func (s *ServiceLastAccessed) SetTrackedActionsLastAccessed(v []*TrackedActionLastAccessed) *ServiceLastAccessed { - s.TrackedActionsLastAccessed = v - return s -} - -// Contains the details of a service-specific credential. -type ServiceSpecificCredential struct { - _ struct{} `type:"structure"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the service-specific credential were created. - // - // CreateDate is a required field - CreateDate *time.Time `type:"timestamp" required:"true"` - - // The name of the service associated with the service-specific credential. - // - // ServiceName is a required field - ServiceName *string `type:"string" required:"true"` - - // The generated password for the service-specific credential. - // - // ServicePassword is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by ServiceSpecificCredential's - // String and GoString methods. - // - // ServicePassword is a required field - ServicePassword *string `type:"string" required:"true" sensitive:"true"` - - // The unique identifier for the service-specific credential. - // - // ServiceSpecificCredentialId is a required field - ServiceSpecificCredentialId *string `min:"20" type:"string" required:"true"` - - // The generated user name for the service-specific credential. This value is - // generated by combining the IAM user's name combined with the ID number of - // the Amazon Web Services account, as in jane-at-123456789012, for example. - // This value cannot be configured by the user. - // - // ServiceUserName is a required field - ServiceUserName *string `min:"17" type:"string" required:"true"` - - // The status of the service-specific credential. Active means that the key - // is valid for API calls, while Inactive means it is not. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"StatusType"` - - // The name of the IAM user associated with the service-specific credential. - // - // UserName is a required field - UserName *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 ServiceSpecificCredential) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ServiceSpecificCredential) GoString() string { - return s.String() -} - -// SetCreateDate sets the CreateDate field's value. -func (s *ServiceSpecificCredential) SetCreateDate(v time.Time) *ServiceSpecificCredential { - s.CreateDate = &v - return s -} - -// SetServiceName sets the ServiceName field's value. -func (s *ServiceSpecificCredential) SetServiceName(v string) *ServiceSpecificCredential { - s.ServiceName = &v - return s -} - -// SetServicePassword sets the ServicePassword field's value. -func (s *ServiceSpecificCredential) SetServicePassword(v string) *ServiceSpecificCredential { - s.ServicePassword = &v - return s -} - -// SetServiceSpecificCredentialId sets the ServiceSpecificCredentialId field's value. -func (s *ServiceSpecificCredential) SetServiceSpecificCredentialId(v string) *ServiceSpecificCredential { - s.ServiceSpecificCredentialId = &v - return s -} - -// SetServiceUserName sets the ServiceUserName field's value. -func (s *ServiceSpecificCredential) SetServiceUserName(v string) *ServiceSpecificCredential { - s.ServiceUserName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ServiceSpecificCredential) SetStatus(v string) *ServiceSpecificCredential { - s.Status = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *ServiceSpecificCredential) SetUserName(v string) *ServiceSpecificCredential { - s.UserName = &v - return s -} - -// Contains additional details about a service-specific credential. -type ServiceSpecificCredentialMetadata struct { - _ struct{} `type:"structure"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the service-specific credential were created. - // - // CreateDate is a required field - CreateDate *time.Time `type:"timestamp" required:"true"` - - // The name of the service associated with the service-specific credential. - // - // ServiceName is a required field - ServiceName *string `type:"string" required:"true"` - - // The unique identifier for the service-specific credential. - // - // ServiceSpecificCredentialId is a required field - ServiceSpecificCredentialId *string `min:"20" type:"string" required:"true"` - - // The generated user name for the service-specific credential. - // - // ServiceUserName is a required field - ServiceUserName *string `min:"17" type:"string" required:"true"` - - // The status of the service-specific credential. Active means that the key - // is valid for API calls, while Inactive means it is not. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"StatusType"` - - // The name of the IAM user associated with the service-specific credential. - // - // UserName is a required field - UserName *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 ServiceSpecificCredentialMetadata) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ServiceSpecificCredentialMetadata) GoString() string { - return s.String() -} - -// SetCreateDate sets the CreateDate field's value. -func (s *ServiceSpecificCredentialMetadata) SetCreateDate(v time.Time) *ServiceSpecificCredentialMetadata { - s.CreateDate = &v - return s -} - -// SetServiceName sets the ServiceName field's value. -func (s *ServiceSpecificCredentialMetadata) SetServiceName(v string) *ServiceSpecificCredentialMetadata { - s.ServiceName = &v - return s -} - -// SetServiceSpecificCredentialId sets the ServiceSpecificCredentialId field's value. -func (s *ServiceSpecificCredentialMetadata) SetServiceSpecificCredentialId(v string) *ServiceSpecificCredentialMetadata { - s.ServiceSpecificCredentialId = &v - return s -} - -// SetServiceUserName sets the ServiceUserName field's value. -func (s *ServiceSpecificCredentialMetadata) SetServiceUserName(v string) *ServiceSpecificCredentialMetadata { - s.ServiceUserName = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *ServiceSpecificCredentialMetadata) SetStatus(v string) *ServiceSpecificCredentialMetadata { - s.Status = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *ServiceSpecificCredentialMetadata) SetUserName(v string) *ServiceSpecificCredentialMetadata { - s.UserName = &v - return s -} - -type SetDefaultPolicyVersionInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the IAM policy whose default version you - // want to set. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicyArn is a required field - PolicyArn *string `min:"20" type:"string" required:"true"` - - // The version of the policy to set as the default (operative) version. - // - // For more information about managed policy versions, see Versioning for managed - // policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html) - // in the IAM User Guide. - // - // VersionId is a required field - VersionId *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 SetDefaultPolicyVersionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SetDefaultPolicyVersionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetDefaultPolicyVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetDefaultPolicyVersionInput"} - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - if s.VersionId == nil { - invalidParams.Add(request.NewErrParamRequired("VersionId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *SetDefaultPolicyVersionInput) SetPolicyArn(v string) *SetDefaultPolicyVersionInput { - s.PolicyArn = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *SetDefaultPolicyVersionInput) SetVersionId(v string) *SetDefaultPolicyVersionInput { - s.VersionId = &v - return s -} - -type SetDefaultPolicyVersionOutput 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 SetDefaultPolicyVersionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SetDefaultPolicyVersionOutput) GoString() string { - return s.String() -} - -type SetSecurityTokenServicePreferencesInput struct { - _ struct{} `type:"structure"` - - // The version of the global endpoint token. Version 1 tokens are valid only - // in Amazon Web Services Regions that are available by default. These tokens - // do not work in manually enabled Regions, such as Asia Pacific (Hong Kong). - // Version 2 tokens are valid in all Regions. However, version 2 tokens are - // longer and might affect systems where you temporarily store tokens. - // - // For information, see Activating and deactivating STS in an Amazon Web Services - // Region (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) - // in the IAM User Guide. - // - // GlobalEndpointTokenVersion is a required field - GlobalEndpointTokenVersion *string `type:"string" required:"true" enum:"GlobalEndpointTokenVersion"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SetSecurityTokenServicePreferencesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SetSecurityTokenServicePreferencesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetSecurityTokenServicePreferencesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetSecurityTokenServicePreferencesInput"} - if s.GlobalEndpointTokenVersion == nil { - invalidParams.Add(request.NewErrParamRequired("GlobalEndpointTokenVersion")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGlobalEndpointTokenVersion sets the GlobalEndpointTokenVersion field's value. -func (s *SetSecurityTokenServicePreferencesInput) SetGlobalEndpointTokenVersion(v string) *SetSecurityTokenServicePreferencesInput { - s.GlobalEndpointTokenVersion = &v - return s -} - -type SetSecurityTokenServicePreferencesOutput 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 SetSecurityTokenServicePreferencesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SetSecurityTokenServicePreferencesOutput) GoString() string { - return s.String() -} - -// Contains information about an X.509 signing certificate. -// -// This data type is used as a response element in the UploadSigningCertificate -// and ListSigningCertificates operations. -type SigningCertificate struct { - _ struct{} `type:"structure"` - - // The contents of the signing certificate. - // - // CertificateBody is a required field - CertificateBody *string `min:"1" type:"string" required:"true"` - - // The ID for the signing certificate. - // - // CertificateId is a required field - CertificateId *string `min:"24" type:"string" required:"true"` - - // The status of the signing certificate. Active means that the key is valid - // for API calls, while Inactive means it is not. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"StatusType"` - - // The date when the signing certificate was uploaded. - UploadDate *time.Time `type:"timestamp"` - - // The name of the user the signing certificate is associated with. - // - // UserName is a required field - UserName *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 SigningCertificate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SigningCertificate) GoString() string { - return s.String() -} - -// SetCertificateBody sets the CertificateBody field's value. -func (s *SigningCertificate) SetCertificateBody(v string) *SigningCertificate { - s.CertificateBody = &v - return s -} - -// SetCertificateId sets the CertificateId field's value. -func (s *SigningCertificate) SetCertificateId(v string) *SigningCertificate { - s.CertificateId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *SigningCertificate) SetStatus(v string) *SigningCertificate { - s.Status = &v - return s -} - -// SetUploadDate sets the UploadDate field's value. -func (s *SigningCertificate) SetUploadDate(v time.Time) *SigningCertificate { - s.UploadDate = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *SigningCertificate) SetUserName(v string) *SigningCertificate { - s.UserName = &v - return s -} - -type SimulateCustomPolicyInput struct { - _ struct{} `type:"structure"` - - // A list of names of API operations to evaluate in the simulation. Each operation - // is evaluated against each resource. Each operation must include the service - // identifier, such as iam:CreateUser. This operation does not support using - // wildcards (*) in an action name. - // - // ActionNames is a required field - ActionNames []*string `type:"list" required:"true"` - - // The ARN of the IAM user that you want to use as the simulated caller of the - // API operations. CallerArn is required if you include a ResourcePolicy so - // that the policy's Principal element has a value to use in evaluating the - // policy. - // - // You can specify only the ARN of an IAM user. You cannot specify the ARN of - // an assumed role, federated user, or a service principal. - CallerArn *string `min:"1" type:"string"` - - // A list of context keys and corresponding values for the simulation to use. - // Whenever a context key is evaluated in one of the simulated IAM permissions - // policies, the corresponding value is supplied. - ContextEntries []*ContextEntry `type:"list"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The IAM permissions boundary policy to simulate. The permissions boundary - // sets the maximum permissions that an IAM entity can have. You can input only - // one permissions boundary when you pass a policy to this operation. For more - // information about permissions boundaries, see Permissions boundaries for - // IAM entities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. The policy input is specified as a string that contains - // the complete, valid JSON text of a permissions boundary policy. - // - // The maximum length of the policy document that you can pass in this operation, - // including whitespace, is listed below. To view the maximum character counts - // of a managed policy with no whitespaces, see IAM and STS character quotas - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length). - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - PermissionsBoundaryPolicyInputList []*string `type:"list"` - - // A list of policy documents to include in the simulation. Each document is - // specified as a string containing the complete, valid JSON text of an IAM - // policy. Do not include any resource-based policies in this parameter. Any - // resource-based policy must be submitted with the ResourcePolicy parameter. - // The policies cannot be "scope-down" policies, such as you could include in - // a call to GetFederationToken (https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetFederationToken.html) - // or one of the AssumeRole (https://docs.aws.amazon.com/IAM/latest/APIReference/API_AssumeRole.html) - // API operations. In other words, do not use policies designed to restrict - // what a user can do while using the temporary credentials. - // - // The maximum length of the policy document that you can pass in this operation, - // including whitespace, is listed below. To view the maximum character counts - // of a managed policy with no whitespaces, see IAM and STS character quotas - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length). - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // PolicyInputList is a required field - PolicyInputList []*string `type:"list" required:"true"` - - // A list of ARNs of Amazon Web Services resources to include in the simulation. - // If this parameter is not provided, then the value defaults to * (all resources). - // Each API in the ActionNames parameter is evaluated for each resource in this - // list. The simulation determines the access result (allowed or denied) of - // each combination and reports it in the response. You can simulate resources - // that don't exist in your account. - // - // The simulation does not automatically retrieve policies for the specified - // resources. If you want to include a resource policy in the simulation, then - // you must include the policy as a string in the ResourcePolicy parameter. - // - // If you include a ResourcePolicy, then it must be applicable to all of the - // resources included in the simulation or you receive an invalid input error. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // Simulation of resource-based policies isn't supported for IAM roles. - ResourceArns []*string `type:"list"` - - // Specifies the type of simulation to run. Different API operations that support - // resource-based policies require different combinations of resources. By specifying - // the type of simulation to run, you enable the policy simulator to enforce - // the presence of the required resources to ensure reliable simulation results. - // If your simulation does not match one of the following scenarios, then you - // can omit this parameter. The following list shows each of the supported scenario - // values and the resources that you must define to run the simulation. - // - // Each of the Amazon EC2 scenarios requires that you specify instance, image, - // and security group resources. If your scenario includes an EBS volume, then - // you must specify that volume as a resource. If the Amazon EC2 scenario includes - // VPC, then you must supply the network interface resource. If it includes - // an IP subnet, then you must specify the subnet resource. For more information - // on the Amazon EC2 scenario options, see Supported platforms (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html) - // in the Amazon EC2 User Guide. - // - // * EC2-VPC-InstanceStore instance, image, security group, network interface - // - // * EC2-VPC-InstanceStore-Subnet instance, image, security group, network - // interface, subnet - // - // * EC2-VPC-EBS instance, image, security group, network interface, volume - // - // * EC2-VPC-EBS-Subnet instance, image, security group, network interface, - // subnet, volume - ResourceHandlingOption *string `min:"1" type:"string"` - - // An ARN representing the Amazon Web Services account ID that specifies the - // owner of any simulated resource that does not identify its owner in the resource - // ARN. Examples of resource ARNs include an S3 bucket or object. If ResourceOwner - // is specified, it is also used as the account owner of any ResourcePolicy - // included in the simulation. If the ResourceOwner parameter is not specified, - // then the owner of the resources and the resource policy defaults to the account - // of the identity provided in CallerArn. This parameter is required only if - // you specify a resource-based policy and account that owns the resource is - // different from the account that owns the simulated calling user CallerArn. - // - // The ARN for an account uses the following syntax: arn:aws:iam::AWS-account-ID:root. - // For example, to represent the account with the 112233445566 ID, use the following - // ARN: arn:aws:iam::112233445566-ID:root. - ResourceOwner *string `min:"1" type:"string"` - - // A resource-based policy to include in the simulation provided as a string. - // Each resource in the simulation is treated as if it had this policy attached. - // You can include only one resource-based policy in a simulation. - // - // The maximum length of the policy document that you can pass in this operation, - // including whitespace, is listed below. To view the maximum character counts - // of a managed policy with no whitespaces, see IAM and STS character quotas - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length). - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // Simulation of resource-based policies isn't supported for IAM roles. - ResourcePolicy *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 SimulateCustomPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SimulateCustomPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SimulateCustomPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SimulateCustomPolicyInput"} - if s.ActionNames == nil { - invalidParams.Add(request.NewErrParamRequired("ActionNames")) - } - if s.CallerArn != nil && len(*s.CallerArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CallerArn", 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 s.PolicyInputList == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyInputList")) - } - if s.ResourceHandlingOption != nil && len(*s.ResourceHandlingOption) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceHandlingOption", 1)) - } - if s.ResourceOwner != nil && len(*s.ResourceOwner) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceOwner", 1)) - } - if s.ResourcePolicy != nil && len(*s.ResourcePolicy) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourcePolicy", 1)) - } - if s.ContextEntries != nil { - for i, v := range s.ContextEntries { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ContextEntries", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActionNames sets the ActionNames field's value. -func (s *SimulateCustomPolicyInput) SetActionNames(v []*string) *SimulateCustomPolicyInput { - s.ActionNames = v - return s -} - -// SetCallerArn sets the CallerArn field's value. -func (s *SimulateCustomPolicyInput) SetCallerArn(v string) *SimulateCustomPolicyInput { - s.CallerArn = &v - return s -} - -// SetContextEntries sets the ContextEntries field's value. -func (s *SimulateCustomPolicyInput) SetContextEntries(v []*ContextEntry) *SimulateCustomPolicyInput { - s.ContextEntries = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *SimulateCustomPolicyInput) SetMarker(v string) *SimulateCustomPolicyInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *SimulateCustomPolicyInput) SetMaxItems(v int64) *SimulateCustomPolicyInput { - s.MaxItems = &v - return s -} - -// SetPermissionsBoundaryPolicyInputList sets the PermissionsBoundaryPolicyInputList field's value. -func (s *SimulateCustomPolicyInput) SetPermissionsBoundaryPolicyInputList(v []*string) *SimulateCustomPolicyInput { - s.PermissionsBoundaryPolicyInputList = v - return s -} - -// SetPolicyInputList sets the PolicyInputList field's value. -func (s *SimulateCustomPolicyInput) SetPolicyInputList(v []*string) *SimulateCustomPolicyInput { - s.PolicyInputList = v - return s -} - -// SetResourceArns sets the ResourceArns field's value. -func (s *SimulateCustomPolicyInput) SetResourceArns(v []*string) *SimulateCustomPolicyInput { - s.ResourceArns = v - return s -} - -// SetResourceHandlingOption sets the ResourceHandlingOption field's value. -func (s *SimulateCustomPolicyInput) SetResourceHandlingOption(v string) *SimulateCustomPolicyInput { - s.ResourceHandlingOption = &v - return s -} - -// SetResourceOwner sets the ResourceOwner field's value. -func (s *SimulateCustomPolicyInput) SetResourceOwner(v string) *SimulateCustomPolicyInput { - s.ResourceOwner = &v - return s -} - -// SetResourcePolicy sets the ResourcePolicy field's value. -func (s *SimulateCustomPolicyInput) SetResourcePolicy(v string) *SimulateCustomPolicyInput { - s.ResourcePolicy = &v - return s -} - -// Contains the response to a successful SimulatePrincipalPolicy or SimulateCustomPolicy -// request. -type SimulatePolicyResponse struct { - _ struct{} `type:"structure"` - - // The results of the simulation. - EvaluationResults []*EvaluationResult `type:"list"` - - // A flag that indicates whether there are more items to return. If your results - // were truncated, you can make a subsequent pagination request using the Marker - // request parameter to retrieve more items. Note that IAM might return fewer - // than the MaxItems number of results even when there are more results available. - // We recommend that you check IsTruncated after every call to ensure that you - // receive all your results. - IsTruncated *bool `type:"boolean"` - - // When IsTruncated is true, this element is present and contains the value - // to use for the Marker parameter in a subsequent pagination request. - Marker *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 SimulatePolicyResponse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SimulatePolicyResponse) GoString() string { - return s.String() -} - -// SetEvaluationResults sets the EvaluationResults field's value. -func (s *SimulatePolicyResponse) SetEvaluationResults(v []*EvaluationResult) *SimulatePolicyResponse { - s.EvaluationResults = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *SimulatePolicyResponse) SetIsTruncated(v bool) *SimulatePolicyResponse { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *SimulatePolicyResponse) SetMarker(v string) *SimulatePolicyResponse { - s.Marker = &v - return s -} - -type SimulatePrincipalPolicyInput struct { - _ struct{} `type:"structure"` - - // A list of names of API operations to evaluate in the simulation. Each operation - // is evaluated for each resource. Each operation must include the service identifier, - // such as iam:CreateUser. - // - // ActionNames is a required field - ActionNames []*string `type:"list" required:"true"` - - // The ARN of the IAM user that you want to specify as the simulated caller - // of the API operations. If you do not specify a CallerArn, it defaults to - // the ARN of the user that you specify in PolicySourceArn, if you specified - // a user. If you include both a PolicySourceArn (for example, arn:aws:iam::123456789012:user/David) - // and a CallerArn (for example, arn:aws:iam::123456789012:user/Bob), the result - // is that you simulate calling the API operations as Bob, as if Bob had David's - // policies. - // - // You can specify only the ARN of an IAM user. You cannot specify the ARN of - // an assumed role, federated user, or a service principal. - // - // CallerArn is required if you include a ResourcePolicy and the PolicySourceArn - // is not the ARN for an IAM user. This is required so that the resource-based - // policy's Principal element has a value to use in evaluating the policy. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - CallerArn *string `min:"1" type:"string"` - - // A list of context keys and corresponding values for the simulation to use. - // Whenever a context key is evaluated in one of the simulated IAM permissions - // policies, the corresponding value is supplied. - ContextEntries []*ContextEntry `type:"list"` - - // Use this parameter only when paginating results and only after you receive - // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. - Marker *string `min:"1" type:"string"` - - // Use this only when paginating results to indicate the maximum number of items - // you want in the response. If additional items exist beyond the maximum you - // specify, the IsTruncated response element is true. - // - // If you do not include this parameter, the number of items defaults to 100. - // Note that IAM might return fewer results, even when there are more results - // available. In that case, the IsTruncated response element returns true, and - // Marker contains a value to include in the subsequent call that tells the - // service where to continue from. - MaxItems *int64 `min:"1" type:"integer"` - - // The IAM permissions boundary policy to simulate. The permissions boundary - // sets the maximum permissions that the entity can have. You can input only - // one permissions boundary when you pass a policy to this operation. An IAM - // entity can only have one permissions boundary in effect at a time. For example, - // if a permissions boundary is attached to an entity and you pass in a different - // permissions boundary policy using this parameter, then the new permissions - // boundary policy is used for the simulation. For more information about permissions - // boundaries, see Permissions boundaries for IAM entities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. The policy input is specified as a string containing - // the complete, valid JSON text of a permissions boundary policy. - // - // The maximum length of the policy document that you can pass in this operation, - // including whitespace, is listed below. To view the maximum character counts - // of a managed policy with no whitespaces, see IAM and STS character quotas - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length). - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - PermissionsBoundaryPolicyInputList []*string `type:"list"` - - // An optional list of additional policy documents to include in the simulation. - // Each document is specified as a string containing the complete, valid JSON - // text of an IAM policy. - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - PolicyInputList []*string `type:"list"` - - // The Amazon Resource Name (ARN) of a user, group, or role whose policies you - // want to include in the simulation. If you specify a user, group, or role, - // the simulation includes all policies that are associated with that entity. - // If you specify a user, the simulation also includes all policies that are - // attached to any groups the user belongs to. - // - // The maximum length of the policy document that you can pass in this operation, - // including whitespace, is listed below. To view the maximum character counts - // of a managed policy with no whitespaces, see IAM and STS character quotas - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length). - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // PolicySourceArn is a required field - PolicySourceArn *string `min:"20" type:"string" required:"true"` - - // A list of ARNs of Amazon Web Services resources to include in the simulation. - // If this parameter is not provided, then the value defaults to * (all resources). - // Each API in the ActionNames parameter is evaluated for each resource in this - // list. The simulation determines the access result (allowed or denied) of - // each combination and reports it in the response. You can simulate resources - // that don't exist in your account. - // - // The simulation does not automatically retrieve policies for the specified - // resources. If you want to include a resource policy in the simulation, then - // you must include the policy as a string in the ResourcePolicy parameter. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // Simulation of resource-based policies isn't supported for IAM roles. - ResourceArns []*string `type:"list"` - - // Specifies the type of simulation to run. Different API operations that support - // resource-based policies require different combinations of resources. By specifying - // the type of simulation to run, you enable the policy simulator to enforce - // the presence of the required resources to ensure reliable simulation results. - // If your simulation does not match one of the following scenarios, then you - // can omit this parameter. The following list shows each of the supported scenario - // values and the resources that you must define to run the simulation. - // - // Each of the Amazon EC2 scenarios requires that you specify instance, image, - // and security group resources. If your scenario includes an EBS volume, then - // you must specify that volume as a resource. If the Amazon EC2 scenario includes - // VPC, then you must supply the network interface resource. If it includes - // an IP subnet, then you must specify the subnet resource. For more information - // on the Amazon EC2 scenario options, see Supported platforms (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html) - // in the Amazon EC2 User Guide. - // - // * EC2-VPC-InstanceStore instance, image, security group, network interface - // - // * EC2-VPC-InstanceStore-Subnet instance, image, security group, network - // interface, subnet - // - // * EC2-VPC-EBS instance, image, security group, network interface, volume - // - // * EC2-VPC-EBS-Subnet instance, image, security group, network interface, - // subnet, volume - ResourceHandlingOption *string `min:"1" type:"string"` - - // An Amazon Web Services account ID that specifies the owner of any simulated - // resource that does not identify its owner in the resource ARN. Examples of - // resource ARNs include an S3 bucket or object. If ResourceOwner is specified, - // it is also used as the account owner of any ResourcePolicy included in the - // simulation. If the ResourceOwner parameter is not specified, then the owner - // of the resources and the resource policy defaults to the account of the identity - // provided in CallerArn. This parameter is required only if you specify a resource-based - // policy and account that owns the resource is different from the account that - // owns the simulated calling user CallerArn. - ResourceOwner *string `min:"1" type:"string"` - - // A resource-based policy to include in the simulation provided as a string. - // Each resource in the simulation is treated as if it had this policy attached. - // You can include only one resource-based policy in a simulation. - // - // The maximum length of the policy document that you can pass in this operation, - // including whitespace, is listed below. To view the maximum character counts - // of a managed policy with no whitespaces, see IAM and STS character quotas - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-quotas-entity-length). - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // Simulation of resource-based policies isn't supported for IAM roles. - ResourcePolicy *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 SimulatePrincipalPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SimulatePrincipalPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SimulatePrincipalPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SimulatePrincipalPolicyInput"} - if s.ActionNames == nil { - invalidParams.Add(request.NewErrParamRequired("ActionNames")) - } - if s.CallerArn != nil && len(*s.CallerArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CallerArn", 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 s.PolicySourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicySourceArn")) - } - if s.PolicySourceArn != nil && len(*s.PolicySourceArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicySourceArn", 20)) - } - if s.ResourceHandlingOption != nil && len(*s.ResourceHandlingOption) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceHandlingOption", 1)) - } - if s.ResourceOwner != nil && len(*s.ResourceOwner) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceOwner", 1)) - } - if s.ResourcePolicy != nil && len(*s.ResourcePolicy) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourcePolicy", 1)) - } - if s.ContextEntries != nil { - for i, v := range s.ContextEntries { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ContextEntries", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActionNames sets the ActionNames field's value. -func (s *SimulatePrincipalPolicyInput) SetActionNames(v []*string) *SimulatePrincipalPolicyInput { - s.ActionNames = v - return s -} - -// SetCallerArn sets the CallerArn field's value. -func (s *SimulatePrincipalPolicyInput) SetCallerArn(v string) *SimulatePrincipalPolicyInput { - s.CallerArn = &v - return s -} - -// SetContextEntries sets the ContextEntries field's value. -func (s *SimulatePrincipalPolicyInput) SetContextEntries(v []*ContextEntry) *SimulatePrincipalPolicyInput { - s.ContextEntries = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *SimulatePrincipalPolicyInput) SetMarker(v string) *SimulatePrincipalPolicyInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *SimulatePrincipalPolicyInput) SetMaxItems(v int64) *SimulatePrincipalPolicyInput { - s.MaxItems = &v - return s -} - -// SetPermissionsBoundaryPolicyInputList sets the PermissionsBoundaryPolicyInputList field's value. -func (s *SimulatePrincipalPolicyInput) SetPermissionsBoundaryPolicyInputList(v []*string) *SimulatePrincipalPolicyInput { - s.PermissionsBoundaryPolicyInputList = v - return s -} - -// SetPolicyInputList sets the PolicyInputList field's value. -func (s *SimulatePrincipalPolicyInput) SetPolicyInputList(v []*string) *SimulatePrincipalPolicyInput { - s.PolicyInputList = v - return s -} - -// SetPolicySourceArn sets the PolicySourceArn field's value. -func (s *SimulatePrincipalPolicyInput) SetPolicySourceArn(v string) *SimulatePrincipalPolicyInput { - s.PolicySourceArn = &v - return s -} - -// SetResourceArns sets the ResourceArns field's value. -func (s *SimulatePrincipalPolicyInput) SetResourceArns(v []*string) *SimulatePrincipalPolicyInput { - s.ResourceArns = v - return s -} - -// SetResourceHandlingOption sets the ResourceHandlingOption field's value. -func (s *SimulatePrincipalPolicyInput) SetResourceHandlingOption(v string) *SimulatePrincipalPolicyInput { - s.ResourceHandlingOption = &v - return s -} - -// SetResourceOwner sets the ResourceOwner field's value. -func (s *SimulatePrincipalPolicyInput) SetResourceOwner(v string) *SimulatePrincipalPolicyInput { - s.ResourceOwner = &v - return s -} - -// SetResourcePolicy sets the ResourcePolicy field's value. -func (s *SimulatePrincipalPolicyInput) SetResourcePolicy(v string) *SimulatePrincipalPolicyInput { - s.ResourcePolicy = &v - return s -} - -// Contains a reference to a Statement element in a policy document that determines -// the result of the simulation. -// -// This data type is used by the MatchedStatements member of the EvaluationResult -// type. -type Statement struct { - _ struct{} `type:"structure"` - - // The row and column of the end of a Statement in an IAM policy. - EndPosition *Position `type:"structure"` - - // The identifier of the policy that was provided as an input. - SourcePolicyId *string `type:"string"` - - // The type of the policy. - SourcePolicyType *string `type:"string" enum:"PolicySourceType"` - - // The row and column of the beginning of the Statement in an IAM policy. - StartPosition *Position `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 Statement) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Statement) GoString() string { - return s.String() -} - -// SetEndPosition sets the EndPosition field's value. -func (s *Statement) SetEndPosition(v *Position) *Statement { - s.EndPosition = v - return s -} - -// SetSourcePolicyId sets the SourcePolicyId field's value. -func (s *Statement) SetSourcePolicyId(v string) *Statement { - s.SourcePolicyId = &v - return s -} - -// SetSourcePolicyType sets the SourcePolicyType field's value. -func (s *Statement) SetSourcePolicyType(v string) *Statement { - s.SourcePolicyType = &v - return s -} - -// SetStartPosition sets the StartPosition field's value. -func (s *Statement) SetStartPosition(v *Position) *Statement { - s.StartPosition = v - return s -} - -// A structure that represents user-provided metadata that can be associated -// with an IAM resource. For more information about tagging, see Tagging IAM -// resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) -// in the IAM User Guide. -type Tag struct { - _ struct{} `type:"structure"` - - // The key name that can be used to look up or retrieve the associated value. - // For example, Department or Cost Center are common choices. - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // The value associated with this tag. For example, tags with a key name of - // Department could have values such as Human Resources, Accounting, and Support. - // Tags with a key name of Cost Center might have values that consist of the - // number associated with the different cost centers in your company. Typically, - // many resources have tags with the same key name but with different values. - // - // Amazon Web Services always interprets the tag Value as a single string. If - // you need to store an array, you can store comma-separated values in the string. - // However, you must interpret the value in your code. - // - // 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 TagInstanceProfileInput struct { - _ struct{} `type:"structure"` - - // The name of the IAM instance profile to which you want to add tags. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // InstanceProfileName is a required field - InstanceProfileName *string `min:"1" type:"string" required:"true"` - - // The list of tags that you want to attach to the IAM instance profile. Each - // tag consists of a key name and an associated value. - // - // 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 TagInstanceProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagInstanceProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagInstanceProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagInstanceProfileInput"} - if s.InstanceProfileName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceProfileName")) - } - if s.InstanceProfileName != nil && len(*s.InstanceProfileName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InstanceProfileName", 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 -} - -// SetInstanceProfileName sets the InstanceProfileName field's value. -func (s *TagInstanceProfileInput) SetInstanceProfileName(v string) *TagInstanceProfileInput { - s.InstanceProfileName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagInstanceProfileInput) SetTags(v []*Tag) *TagInstanceProfileInput { - s.Tags = v - return s -} - -type TagInstanceProfileOutput 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 TagInstanceProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagInstanceProfileOutput) GoString() string { - return s.String() -} - -type TagMFADeviceInput struct { - _ struct{} `type:"structure"` - - // The unique identifier for the IAM virtual MFA device to which you want to - // add tags. For virtual MFA devices, the serial number is the same as the ARN. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // SerialNumber is a required field - SerialNumber *string `min:"9" type:"string" required:"true"` - - // The list of tags that you want to attach to the IAM virtual MFA device. Each - // tag consists of a key name and an associated value. - // - // 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 TagMFADeviceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagMFADeviceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagMFADeviceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagMFADeviceInput"} - if s.SerialNumber == nil { - invalidParams.Add(request.NewErrParamRequired("SerialNumber")) - } - if s.SerialNumber != nil && len(*s.SerialNumber) < 9 { - invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9)) - } - 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 -} - -// SetSerialNumber sets the SerialNumber field's value. -func (s *TagMFADeviceInput) SetSerialNumber(v string) *TagMFADeviceInput { - s.SerialNumber = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagMFADeviceInput) SetTags(v []*Tag) *TagMFADeviceInput { - s.Tags = v - return s -} - -type TagMFADeviceOutput 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 TagMFADeviceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagMFADeviceOutput) GoString() string { - return s.String() -} - -type TagOpenIDConnectProviderInput struct { - _ struct{} `type:"structure"` - - // The ARN of the OIDC identity provider in IAM to which you want to add tags. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // OpenIDConnectProviderArn is a required field - OpenIDConnectProviderArn *string `min:"20" type:"string" required:"true"` - - // The list of tags that you want to attach to the OIDC identity provider in - // IAM. Each tag consists of a key name and an associated value. - // - // 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 TagOpenIDConnectProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagOpenIDConnectProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagOpenIDConnectProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagOpenIDConnectProviderInput"} - if s.OpenIDConnectProviderArn == nil { - invalidParams.Add(request.NewErrParamRequired("OpenIDConnectProviderArn")) - } - if s.OpenIDConnectProviderArn != nil && len(*s.OpenIDConnectProviderArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("OpenIDConnectProviderArn", 20)) - } - 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 -} - -// SetOpenIDConnectProviderArn sets the OpenIDConnectProviderArn field's value. -func (s *TagOpenIDConnectProviderInput) SetOpenIDConnectProviderArn(v string) *TagOpenIDConnectProviderInput { - s.OpenIDConnectProviderArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagOpenIDConnectProviderInput) SetTags(v []*Tag) *TagOpenIDConnectProviderInput { - s.Tags = v - return s -} - -type TagOpenIDConnectProviderOutput 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 TagOpenIDConnectProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagOpenIDConnectProviderOutput) GoString() string { - return s.String() -} - -type TagPolicyInput struct { - _ struct{} `type:"structure"` - - // The ARN of the IAM customer managed policy to which you want to add tags. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // PolicyArn is a required field - PolicyArn *string `min:"20" type:"string" required:"true"` - - // The list of tags that you want to attach to the IAM customer managed policy. - // Each tag consists of a key name and an associated value. - // - // 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 TagPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagPolicyInput"} - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - 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 -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *TagPolicyInput) SetPolicyArn(v string) *TagPolicyInput { - s.PolicyArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagPolicyInput) SetTags(v []*Tag) *TagPolicyInput { - s.Tags = v - return s -} - -type TagPolicyOutput 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 TagPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagPolicyOutput) GoString() string { - return s.String() -} - -type TagRoleInput struct { - _ struct{} `type:"structure"` - - // The name of the IAM role to which you want to add tags. - // - // This parameter accepts (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters that consist of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *string `min:"1" type:"string" required:"true"` - - // The list of tags that you want to attach to the IAM role. Each tag consists - // of a key name and an associated value. - // - // 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 TagRoleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagRoleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagRoleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagRoleInput"} - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 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 -} - -// SetRoleName sets the RoleName field's value. -func (s *TagRoleInput) SetRoleName(v string) *TagRoleInput { - s.RoleName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagRoleInput) SetTags(v []*Tag) *TagRoleInput { - s.Tags = v - return s -} - -type TagRoleOutput 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 TagRoleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagRoleOutput) GoString() string { - return s.String() -} - -type TagSAMLProviderInput struct { - _ struct{} `type:"structure"` - - // The ARN of the SAML identity provider in IAM to which you want to add tags. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // SAMLProviderArn is a required field - SAMLProviderArn *string `min:"20" type:"string" required:"true"` - - // The list of tags that you want to attach to the SAML identity provider in - // IAM. Each tag consists of a key name and an associated value. - // - // 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 TagSAMLProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagSAMLProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagSAMLProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagSAMLProviderInput"} - if s.SAMLProviderArn == nil { - invalidParams.Add(request.NewErrParamRequired("SAMLProviderArn")) - } - if s.SAMLProviderArn != nil && len(*s.SAMLProviderArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("SAMLProviderArn", 20)) - } - 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 -} - -// SetSAMLProviderArn sets the SAMLProviderArn field's value. -func (s *TagSAMLProviderInput) SetSAMLProviderArn(v string) *TagSAMLProviderInput { - s.SAMLProviderArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagSAMLProviderInput) SetTags(v []*Tag) *TagSAMLProviderInput { - s.Tags = v - return s -} - -type TagSAMLProviderOutput 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 TagSAMLProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagSAMLProviderOutput) GoString() string { - return s.String() -} - -type TagServerCertificateInput struct { - _ struct{} `type:"structure"` - - // The name of the IAM server certificate to which you want to add tags. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // ServerCertificateName is a required field - ServerCertificateName *string `min:"1" type:"string" required:"true"` - - // The list of tags that you want to attach to the IAM server certificate. Each - // tag consists of a key name and an associated value. - // - // 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 TagServerCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagServerCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagServerCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagServerCertificateInput"} - if s.ServerCertificateName == nil { - invalidParams.Add(request.NewErrParamRequired("ServerCertificateName")) - } - if s.ServerCertificateName != nil && len(*s.ServerCertificateName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServerCertificateName", 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 -} - -// SetServerCertificateName sets the ServerCertificateName field's value. -func (s *TagServerCertificateInput) SetServerCertificateName(v string) *TagServerCertificateInput { - s.ServerCertificateName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagServerCertificateInput) SetTags(v []*Tag) *TagServerCertificateInput { - s.Tags = v - return s -} - -type TagServerCertificateOutput 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 TagServerCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagServerCertificateOutput) GoString() string { - return s.String() -} - -type TagUserInput struct { - _ struct{} `type:"structure"` - - // The list of tags that you want to attach to the IAM user. Each tag consists - // of a key name and an associated value. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` - - // The name of the IAM user to which you want to add tags. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *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 TagUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagUserInput"} - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 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 -} - -// SetTags sets the Tags field's value. -func (s *TagUserInput) SetTags(v []*Tag) *TagUserInput { - s.Tags = v - return s -} - -// SetUserName sets the UserName field's value. -func (s *TagUserInput) SetUserName(v string) *TagUserInput { - s.UserName = &v - return s -} - -type TagUserOutput 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 TagUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagUserOutput) GoString() string { - return s.String() -} - -// Contains details about the most recent attempt to access an action within -// the service. -// -// This data type is used as a response element in the GetServiceLastAccessedDetails -// operation. -type TrackedActionLastAccessed struct { - _ struct{} `type:"structure"` - - // The name of the tracked action to which access was attempted. Tracked actions - // are actions that report activity to IAM. - ActionName *string `type:"string"` - - // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web - // Services resources. - // - // For more information about ARNs, go to Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - LastAccessedEntity *string `min:"20" type:"string"` - - // The Region from which the authenticated entity (user or role) last attempted - // to access the tracked action. Amazon Web Services does not report unauthenticated - // requests. - // - // This field is null if no IAM entities attempted to access the service within - // the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). - LastAccessedRegion *string `type:"string"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when an authenticated entity most recently attempted to access the tracked - // service. Amazon Web Services does not report unauthenticated requests. - // - // This field is null if no IAM entities attempted to access the service within - // the tracking period (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). - LastAccessedTime *time.Time `type:"timestamp"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TrackedActionLastAccessed) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TrackedActionLastAccessed) GoString() string { - return s.String() -} - -// SetActionName sets the ActionName field's value. -func (s *TrackedActionLastAccessed) SetActionName(v string) *TrackedActionLastAccessed { - s.ActionName = &v - return s -} - -// SetLastAccessedEntity sets the LastAccessedEntity field's value. -func (s *TrackedActionLastAccessed) SetLastAccessedEntity(v string) *TrackedActionLastAccessed { - s.LastAccessedEntity = &v - return s -} - -// SetLastAccessedRegion sets the LastAccessedRegion field's value. -func (s *TrackedActionLastAccessed) SetLastAccessedRegion(v string) *TrackedActionLastAccessed { - s.LastAccessedRegion = &v - return s -} - -// SetLastAccessedTime sets the LastAccessedTime field's value. -func (s *TrackedActionLastAccessed) SetLastAccessedTime(v time.Time) *TrackedActionLastAccessed { - s.LastAccessedTime = &v - return s -} - -type UntagInstanceProfileInput struct { - _ struct{} `type:"structure"` - - // The name of the IAM instance profile from which you want to remove tags. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // InstanceProfileName is a required field - InstanceProfileName *string `min:"1" type:"string" required:"true"` - - // A list of key names as a simple array of strings. The tags with matching - // keys are removed from the specified instance profile. - // - // 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 UntagInstanceProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagInstanceProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagInstanceProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagInstanceProfileInput"} - if s.InstanceProfileName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceProfileName")) - } - if s.InstanceProfileName != nil && len(*s.InstanceProfileName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("InstanceProfileName", 1)) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceProfileName sets the InstanceProfileName field's value. -func (s *UntagInstanceProfileInput) SetInstanceProfileName(v string) *UntagInstanceProfileInput { - s.InstanceProfileName = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagInstanceProfileInput) SetTagKeys(v []*string) *UntagInstanceProfileInput { - s.TagKeys = v - return s -} - -type UntagInstanceProfileOutput 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 UntagInstanceProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagInstanceProfileOutput) GoString() string { - return s.String() -} - -type UntagMFADeviceInput struct { - _ struct{} `type:"structure"` - - // The unique identifier for the IAM virtual MFA device from which you want - // to remove tags. For virtual MFA devices, the serial number is the same as - // the ARN. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // SerialNumber is a required field - SerialNumber *string `min:"9" type:"string" required:"true"` - - // A list of key names as a simple array of strings. The tags with matching - // keys are removed from the specified instance profile. - // - // 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 UntagMFADeviceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagMFADeviceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagMFADeviceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagMFADeviceInput"} - if s.SerialNumber == nil { - invalidParams.Add(request.NewErrParamRequired("SerialNumber")) - } - if s.SerialNumber != nil && len(*s.SerialNumber) < 9 { - invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9)) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSerialNumber sets the SerialNumber field's value. -func (s *UntagMFADeviceInput) SetSerialNumber(v string) *UntagMFADeviceInput { - s.SerialNumber = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagMFADeviceInput) SetTagKeys(v []*string) *UntagMFADeviceInput { - s.TagKeys = v - return s -} - -type UntagMFADeviceOutput 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 UntagMFADeviceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagMFADeviceOutput) GoString() string { - return s.String() -} - -type UntagOpenIDConnectProviderInput struct { - _ struct{} `type:"structure"` - - // The ARN of the OIDC provider in IAM from which you want to remove tags. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // OpenIDConnectProviderArn is a required field - OpenIDConnectProviderArn *string `min:"20" type:"string" required:"true"` - - // A list of key names as a simple array of strings. The tags with matching - // keys are removed from the specified OIDC provider. - // - // 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 UntagOpenIDConnectProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagOpenIDConnectProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagOpenIDConnectProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagOpenIDConnectProviderInput"} - if s.OpenIDConnectProviderArn == nil { - invalidParams.Add(request.NewErrParamRequired("OpenIDConnectProviderArn")) - } - if s.OpenIDConnectProviderArn != nil && len(*s.OpenIDConnectProviderArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("OpenIDConnectProviderArn", 20)) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOpenIDConnectProviderArn sets the OpenIDConnectProviderArn field's value. -func (s *UntagOpenIDConnectProviderInput) SetOpenIDConnectProviderArn(v string) *UntagOpenIDConnectProviderInput { - s.OpenIDConnectProviderArn = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagOpenIDConnectProviderInput) SetTagKeys(v []*string) *UntagOpenIDConnectProviderInput { - s.TagKeys = v - return s -} - -type UntagOpenIDConnectProviderOutput 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 UntagOpenIDConnectProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagOpenIDConnectProviderOutput) GoString() string { - return s.String() -} - -type UntagPolicyInput struct { - _ struct{} `type:"structure"` - - // The ARN of the IAM customer managed policy from which you want to remove - // tags. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // PolicyArn is a required field - PolicyArn *string `min:"20" type:"string" required:"true"` - - // A list of key names as a simple array of strings. The tags with matching - // keys are removed from the specified policy. - // - // 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 UntagPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagPolicyInput"} - if s.PolicyArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyArn")) - } - if s.PolicyArn != nil && len(*s.PolicyArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicyArn", 20)) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyArn sets the PolicyArn field's value. -func (s *UntagPolicyInput) SetPolicyArn(v string) *UntagPolicyInput { - s.PolicyArn = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagPolicyInput) SetTagKeys(v []*string) *UntagPolicyInput { - s.TagKeys = v - return s -} - -type UntagPolicyOutput 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 UntagPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagPolicyOutput) GoString() string { - return s.String() -} - -type UntagRoleInput struct { - _ struct{} `type:"structure"` - - // The name of the IAM role from which you want to remove tags. - // - // This parameter accepts (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters that consist of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *string `min:"1" type:"string" required:"true"` - - // A list of key names as a simple array of strings. The tags with matching - // keys are removed from the specified role. - // - // 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 UntagRoleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagRoleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagRoleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagRoleInput"} - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRoleName sets the RoleName field's value. -func (s *UntagRoleInput) SetRoleName(v string) *UntagRoleInput { - s.RoleName = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagRoleInput) SetTagKeys(v []*string) *UntagRoleInput { - s.TagKeys = v - return s -} - -type UntagRoleOutput 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 UntagRoleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagRoleOutput) GoString() string { - return s.String() -} - -type UntagSAMLProviderInput struct { - _ struct{} `type:"structure"` - - // The ARN of the SAML identity provider in IAM from which you want to remove - // tags. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // SAMLProviderArn is a required field - SAMLProviderArn *string `min:"20" type:"string" required:"true"` - - // A list of key names as a simple array of strings. The tags with matching - // keys are removed from the specified SAML identity provider. - // - // 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 UntagSAMLProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagSAMLProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagSAMLProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagSAMLProviderInput"} - if s.SAMLProviderArn == nil { - invalidParams.Add(request.NewErrParamRequired("SAMLProviderArn")) - } - if s.SAMLProviderArn != nil && len(*s.SAMLProviderArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("SAMLProviderArn", 20)) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSAMLProviderArn sets the SAMLProviderArn field's value. -func (s *UntagSAMLProviderInput) SetSAMLProviderArn(v string) *UntagSAMLProviderInput { - s.SAMLProviderArn = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagSAMLProviderInput) SetTagKeys(v []*string) *UntagSAMLProviderInput { - s.TagKeys = v - return s -} - -type UntagSAMLProviderOutput 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 UntagSAMLProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagSAMLProviderOutput) GoString() string { - return s.String() -} - -type UntagServerCertificateInput struct { - _ struct{} `type:"structure"` - - // The name of the IAM server certificate from which you want to remove tags. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // ServerCertificateName is a required field - ServerCertificateName *string `min:"1" type:"string" required:"true"` - - // A list of key names as a simple array of strings. The tags with matching - // keys are removed from the specified IAM server certificate. - // - // 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 UntagServerCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagServerCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagServerCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagServerCertificateInput"} - if s.ServerCertificateName == nil { - invalidParams.Add(request.NewErrParamRequired("ServerCertificateName")) - } - if s.ServerCertificateName != nil && len(*s.ServerCertificateName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServerCertificateName", 1)) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServerCertificateName sets the ServerCertificateName field's value. -func (s *UntagServerCertificateInput) SetServerCertificateName(v string) *UntagServerCertificateInput { - s.ServerCertificateName = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagServerCertificateInput) SetTagKeys(v []*string) *UntagServerCertificateInput { - s.TagKeys = v - return s -} - -type UntagServerCertificateOutput 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 UntagServerCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagServerCertificateOutput) GoString() string { - return s.String() -} - -type UntagUserInput struct { - _ struct{} `type:"structure"` - - // A list of key names as a simple array of strings. The tags with matching - // keys are removed from the specified user. - // - // TagKeys is a required field - TagKeys []*string `type:"list" required:"true"` - - // The name of the IAM user from which you want to remove tags. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *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 UntagUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagUserInput"} - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagUserInput) SetTagKeys(v []*string) *UntagUserInput { - s.TagKeys = v - return s -} - -// SetUserName sets the UserName field's value. -func (s *UntagUserInput) SetUserName(v string) *UntagUserInput { - s.UserName = &v - return s -} - -type UntagUserOutput 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 UntagUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagUserOutput) GoString() string { - return s.String() -} - -type UpdateAccessKeyInput struct { - _ struct{} `type:"structure"` - - // The access key ID of the secret access key you want to update. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters that can consist of any upper or lowercased letter - // or digit. - // - // AccessKeyId is a required field - AccessKeyId *string `min:"16" type:"string" required:"true"` - - // The status you want to assign to the secret access key. Active means that - // the key can be used for programmatic calls to Amazon Web Services, while - // Inactive means that the key cannot be used. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"StatusType"` - - // The name of the user whose key you want to update. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - UserName *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 UpdateAccessKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateAccessKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateAccessKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateAccessKeyInput"} - if s.AccessKeyId == nil { - invalidParams.Add(request.NewErrParamRequired("AccessKeyId")) - } - if s.AccessKeyId != nil && len(*s.AccessKeyId) < 16 { - invalidParams.Add(request.NewErrParamMinLen("AccessKeyId", 16)) - } - if s.Status == nil { - invalidParams.Add(request.NewErrParamRequired("Status")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessKeyId sets the AccessKeyId field's value. -func (s *UpdateAccessKeyInput) SetAccessKeyId(v string) *UpdateAccessKeyInput { - s.AccessKeyId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *UpdateAccessKeyInput) SetStatus(v string) *UpdateAccessKeyInput { - s.Status = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *UpdateAccessKeyInput) SetUserName(v string) *UpdateAccessKeyInput { - s.UserName = &v - return s -} - -type UpdateAccessKeyOutput 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 UpdateAccessKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateAccessKeyOutput) GoString() string { - return s.String() -} - -type UpdateAccountPasswordPolicyInput struct { - _ struct{} `type:"structure"` - - // Allows all IAM users in your account to use the Amazon Web Services Management - // Console to change their own passwords. For more information, see Permitting - // IAM users to change their own passwords (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_passwords_enable-user-change.html) - // in the IAM User Guide. - // - // If you do not specify a value for this parameter, then the operation uses - // the default value of false. The result is that IAM users in the account do - // not automatically have permissions to change their own password. - AllowUsersToChangePassword *bool `type:"boolean"` - - // Prevents IAM users who are accessing the account via the Amazon Web Services - // Management Console from setting a new console password after their password - // has expired. The IAM user cannot access the console until an administrator - // resets the password. - // - // If you do not specify a value for this parameter, then the operation uses - // the default value of false. The result is that IAM users can change their - // passwords after they expire and continue to sign in as the user. - // - // In the Amazon Web Services Management Console, the custom password policy - // option Allow users to change their own password gives IAM users permissions - // to iam:ChangePassword for only their user and to the iam:GetAccountPasswordPolicy - // action. This option does not attach a permissions policy to each user, rather - // the permissions are applied at the account-level for all users by IAM. IAM - // users with iam:ChangePassword permission and active access keys can reset - // their own expired console password using the CLI or API. - HardExpiry *bool `type:"boolean"` - - // The number of days that an IAM user password is valid. - // - // If you do not specify a value for this parameter, then the operation uses - // the default value of 0. The result is that IAM user passwords never expire. - MaxPasswordAge *int64 `min:"1" type:"integer"` - - // The minimum number of characters allowed in an IAM user password. - // - // If you do not specify a value for this parameter, then the operation uses - // the default value of 6. - MinimumPasswordLength *int64 `min:"6" type:"integer"` - - // Specifies the number of previous passwords that IAM users are prevented from - // reusing. - // - // If you do not specify a value for this parameter, then the operation uses - // the default value of 0. The result is that IAM users are not prevented from - // reusing previous passwords. - PasswordReusePrevention *int64 `min:"1" type:"integer"` - - // Specifies whether IAM user passwords must contain at least one lowercase - // character from the ISO basic Latin alphabet (a to z). - // - // If you do not specify a value for this parameter, then the operation uses - // the default value of false. The result is that passwords do not require at - // least one lowercase character. - RequireLowercaseCharacters *bool `type:"boolean"` - - // Specifies whether IAM user passwords must contain at least one numeric character - // (0 to 9). - // - // If you do not specify a value for this parameter, then the operation uses - // the default value of false. The result is that passwords do not require at - // least one numeric character. - RequireNumbers *bool `type:"boolean"` - - // Specifies whether IAM user passwords must contain at least one of the following - // non-alphanumeric characters: - // - // ! @ # $ % ^ & * ( ) _ + - = [ ] { } | ' - // - // If you do not specify a value for this parameter, then the operation uses - // the default value of false. The result is that passwords do not require at - // least one symbol character. - RequireSymbols *bool `type:"boolean"` - - // Specifies whether IAM user passwords must contain at least one uppercase - // character from the ISO basic Latin alphabet (A to Z). - // - // If you do not specify a value for this parameter, then the operation uses - // the default value of false. The result is that passwords do not require at - // least one uppercase character. - RequireUppercaseCharacters *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 UpdateAccountPasswordPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateAccountPasswordPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateAccountPasswordPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateAccountPasswordPolicyInput"} - if s.MaxPasswordAge != nil && *s.MaxPasswordAge < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxPasswordAge", 1)) - } - if s.MinimumPasswordLength != nil && *s.MinimumPasswordLength < 6 { - invalidParams.Add(request.NewErrParamMinValue("MinimumPasswordLength", 6)) - } - if s.PasswordReusePrevention != nil && *s.PasswordReusePrevention < 1 { - invalidParams.Add(request.NewErrParamMinValue("PasswordReusePrevention", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllowUsersToChangePassword sets the AllowUsersToChangePassword field's value. -func (s *UpdateAccountPasswordPolicyInput) SetAllowUsersToChangePassword(v bool) *UpdateAccountPasswordPolicyInput { - s.AllowUsersToChangePassword = &v - return s -} - -// SetHardExpiry sets the HardExpiry field's value. -func (s *UpdateAccountPasswordPolicyInput) SetHardExpiry(v bool) *UpdateAccountPasswordPolicyInput { - s.HardExpiry = &v - return s -} - -// SetMaxPasswordAge sets the MaxPasswordAge field's value. -func (s *UpdateAccountPasswordPolicyInput) SetMaxPasswordAge(v int64) *UpdateAccountPasswordPolicyInput { - s.MaxPasswordAge = &v - return s -} - -// SetMinimumPasswordLength sets the MinimumPasswordLength field's value. -func (s *UpdateAccountPasswordPolicyInput) SetMinimumPasswordLength(v int64) *UpdateAccountPasswordPolicyInput { - s.MinimumPasswordLength = &v - return s -} - -// SetPasswordReusePrevention sets the PasswordReusePrevention field's value. -func (s *UpdateAccountPasswordPolicyInput) SetPasswordReusePrevention(v int64) *UpdateAccountPasswordPolicyInput { - s.PasswordReusePrevention = &v - return s -} - -// SetRequireLowercaseCharacters sets the RequireLowercaseCharacters field's value. -func (s *UpdateAccountPasswordPolicyInput) SetRequireLowercaseCharacters(v bool) *UpdateAccountPasswordPolicyInput { - s.RequireLowercaseCharacters = &v - return s -} - -// SetRequireNumbers sets the RequireNumbers field's value. -func (s *UpdateAccountPasswordPolicyInput) SetRequireNumbers(v bool) *UpdateAccountPasswordPolicyInput { - s.RequireNumbers = &v - return s -} - -// SetRequireSymbols sets the RequireSymbols field's value. -func (s *UpdateAccountPasswordPolicyInput) SetRequireSymbols(v bool) *UpdateAccountPasswordPolicyInput { - s.RequireSymbols = &v - return s -} - -// SetRequireUppercaseCharacters sets the RequireUppercaseCharacters field's value. -func (s *UpdateAccountPasswordPolicyInput) SetRequireUppercaseCharacters(v bool) *UpdateAccountPasswordPolicyInput { - s.RequireUppercaseCharacters = &v - return s -} - -type UpdateAccountPasswordPolicyOutput 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 UpdateAccountPasswordPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateAccountPasswordPolicyOutput) GoString() string { - return s.String() -} - -type UpdateAssumeRolePolicyInput struct { - _ struct{} `type:"structure"` - - // The policy that grants an entity permission to assume the role. - // - // You must provide policies in JSON format in IAM. However, for CloudFormation - // templates formatted in YAML, you can provide the policy in JSON or YAML format. - // CloudFormation always converts a YAML policy to JSON format before submitting - // it to IAM. - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // PolicyDocument is a required field - PolicyDocument *string `min:"1" type:"string" required:"true"` - - // The name of the role to update with the new policy. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // RoleName is a required field - RoleName *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 UpdateAssumeRolePolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateAssumeRolePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateAssumeRolePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateAssumeRolePolicyInput"} - if s.PolicyDocument == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyDocument")) - } - if s.PolicyDocument != nil && len(*s.PolicyDocument) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PolicyDocument", 1)) - } - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *UpdateAssumeRolePolicyInput) SetPolicyDocument(v string) *UpdateAssumeRolePolicyInput { - s.PolicyDocument = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *UpdateAssumeRolePolicyInput) SetRoleName(v string) *UpdateAssumeRolePolicyInput { - s.RoleName = &v - return s -} - -type UpdateAssumeRolePolicyOutput 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 UpdateAssumeRolePolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateAssumeRolePolicyOutput) GoString() string { - return s.String() -} - -type UpdateGroupInput struct { - _ struct{} `type:"structure"` - - // Name of the IAM group to update. If you're changing the name of the group, - // this is the original name. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // GroupName is a required field - GroupName *string `min:"1" type:"string" required:"true"` - - // New name for the IAM group. Only include this if changing the group's name. - // - // IAM user, group, role, and policy names must be unique within the account. - // Names are not distinguished by case. For example, you cannot create resources - // named both "MyResource" and "myresource". - NewGroupName *string `min:"1" type:"string"` - - // New path for the IAM group. Only include this if changing the group's path. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. - NewPath *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 UpdateGroupInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateGroupInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.GroupName != nil && len(*s.GroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) - } - if s.NewGroupName != nil && len(*s.NewGroupName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NewGroupName", 1)) - } - if s.NewPath != nil && len(*s.NewPath) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NewPath", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupName sets the GroupName field's value. -func (s *UpdateGroupInput) SetGroupName(v string) *UpdateGroupInput { - s.GroupName = &v - return s -} - -// SetNewGroupName sets the NewGroupName field's value. -func (s *UpdateGroupInput) SetNewGroupName(v string) *UpdateGroupInput { - s.NewGroupName = &v - return s -} - -// SetNewPath sets the NewPath field's value. -func (s *UpdateGroupInput) SetNewPath(v string) *UpdateGroupInput { - s.NewPath = &v - return s -} - -type UpdateGroupOutput 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 UpdateGroupOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateGroupOutput) GoString() string { - return s.String() -} - -type UpdateLoginProfileInput struct { - _ struct{} `type:"structure"` - - // The new password for the specified IAM user. - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // However, the format can be further restricted by the account administrator - // by setting a password policy on the Amazon Web Services account. For more - // information, see UpdateAccountPasswordPolicy. - // - // Password is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by UpdateLoginProfileInput's - // String and GoString methods. - Password *string `min:"1" type:"string" sensitive:"true"` - - // Allows this new password to be used only once by requiring the specified - // IAM user to set a new password on next sign-in. - PasswordResetRequired *bool `type:"boolean"` - - // The name of the user whose password you want to update. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *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 UpdateLoginProfileInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateLoginProfileInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateLoginProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateLoginProfileInput"} - if s.Password != nil && len(*s.Password) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Password", 1)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPassword sets the Password field's value. -func (s *UpdateLoginProfileInput) SetPassword(v string) *UpdateLoginProfileInput { - s.Password = &v - return s -} - -// SetPasswordResetRequired sets the PasswordResetRequired field's value. -func (s *UpdateLoginProfileInput) SetPasswordResetRequired(v bool) *UpdateLoginProfileInput { - s.PasswordResetRequired = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *UpdateLoginProfileInput) SetUserName(v string) *UpdateLoginProfileInput { - s.UserName = &v - return s -} - -type UpdateLoginProfileOutput 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 UpdateLoginProfileOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateLoginProfileOutput) GoString() string { - return s.String() -} - -type UpdateOpenIDConnectProviderThumbprintInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the IAM OIDC provider resource object for - // which you want to update the thumbprint. You can get a list of OIDC provider - // ARNs by using the ListOpenIDConnectProviders operation. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // OpenIDConnectProviderArn is a required field - OpenIDConnectProviderArn *string `min:"20" type:"string" required:"true"` - - // A list of certificate thumbprints that are associated with the specified - // IAM OpenID Connect provider. For more information, see CreateOpenIDConnectProvider. - // - // ThumbprintList is a required field - ThumbprintList []*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 UpdateOpenIDConnectProviderThumbprintInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateOpenIDConnectProviderThumbprintInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateOpenIDConnectProviderThumbprintInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateOpenIDConnectProviderThumbprintInput"} - if s.OpenIDConnectProviderArn == nil { - invalidParams.Add(request.NewErrParamRequired("OpenIDConnectProviderArn")) - } - if s.OpenIDConnectProviderArn != nil && len(*s.OpenIDConnectProviderArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("OpenIDConnectProviderArn", 20)) - } - if s.ThumbprintList == nil { - invalidParams.Add(request.NewErrParamRequired("ThumbprintList")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOpenIDConnectProviderArn sets the OpenIDConnectProviderArn field's value. -func (s *UpdateOpenIDConnectProviderThumbprintInput) SetOpenIDConnectProviderArn(v string) *UpdateOpenIDConnectProviderThumbprintInput { - s.OpenIDConnectProviderArn = &v - return s -} - -// SetThumbprintList sets the ThumbprintList field's value. -func (s *UpdateOpenIDConnectProviderThumbprintInput) SetThumbprintList(v []*string) *UpdateOpenIDConnectProviderThumbprintInput { - s.ThumbprintList = v - return s -} - -type UpdateOpenIDConnectProviderThumbprintOutput 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 UpdateOpenIDConnectProviderThumbprintOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateOpenIDConnectProviderThumbprintOutput) GoString() string { - return s.String() -} - -type UpdateRoleDescriptionInput struct { - _ struct{} `type:"structure"` - - // The new description that you want to apply to the specified role. - // - // Description is a required field - Description *string `type:"string" required:"true"` - - // The name of the role that you want to modify. - // - // RoleName is a required field - RoleName *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 UpdateRoleDescriptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateRoleDescriptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateRoleDescriptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateRoleDescriptionInput"} - if s.Description == nil { - invalidParams.Add(request.NewErrParamRequired("Description")) - } - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *UpdateRoleDescriptionInput) SetDescription(v string) *UpdateRoleDescriptionInput { - s.Description = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *UpdateRoleDescriptionInput) SetRoleName(v string) *UpdateRoleDescriptionInput { - s.RoleName = &v - return s -} - -type UpdateRoleDescriptionOutput struct { - _ struct{} `type:"structure"` - - // A structure that contains details about the modified role. - Role *Role `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 UpdateRoleDescriptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateRoleDescriptionOutput) GoString() string { - return s.String() -} - -// SetRole sets the Role field's value. -func (s *UpdateRoleDescriptionOutput) SetRole(v *Role) *UpdateRoleDescriptionOutput { - s.Role = v - return s -} - -type UpdateRoleInput struct { - _ struct{} `type:"structure"` - - // The new description that you want to apply to the specified role. - Description *string `type:"string"` - - // The maximum session duration (in seconds) that you want to set for the specified - // role. If you do not specify a value for this setting, the default value of - // one hour is applied. This setting can have a value from 1 hour to 12 hours. - // - // Anyone who assumes the role from the CLI or API can use the DurationSeconds - // API parameter or the duration-seconds CLI parameter to request a longer session. - // The MaxSessionDuration setting determines the maximum duration that can be - // requested using the DurationSeconds parameter. If users don't specify a value - // for the DurationSeconds parameter, their security credentials are valid for - // one hour by default. This applies when you use the AssumeRole* API operations - // or the assume-role* CLI operations but does not apply when you use those - // operations to create a console URL. For more information, see Using IAM roles - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html) in the - // IAM User Guide. - // - // IAM role credentials provided by Amazon EC2 instances assigned to the role - // are not subject to the specified maximum session duration. - MaxSessionDuration *int64 `min:"3600" type:"integer"` - - // The name of the role that you want to modify. - // - // RoleName is a required field - RoleName *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 UpdateRoleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateRoleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateRoleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateRoleInput"} - if s.MaxSessionDuration != nil && *s.MaxSessionDuration < 3600 { - invalidParams.Add(request.NewErrParamMinValue("MaxSessionDuration", 3600)) - } - if s.RoleName == nil { - invalidParams.Add(request.NewErrParamRequired("RoleName")) - } - if s.RoleName != nil && len(*s.RoleName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *UpdateRoleInput) SetDescription(v string) *UpdateRoleInput { - s.Description = &v - return s -} - -// SetMaxSessionDuration sets the MaxSessionDuration field's value. -func (s *UpdateRoleInput) SetMaxSessionDuration(v int64) *UpdateRoleInput { - s.MaxSessionDuration = &v - return s -} - -// SetRoleName sets the RoleName field's value. -func (s *UpdateRoleInput) SetRoleName(v string) *UpdateRoleInput { - s.RoleName = &v - return s -} - -type UpdateRoleOutput 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 UpdateRoleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateRoleOutput) GoString() string { - return s.String() -} - -type UpdateSAMLProviderInput struct { - _ struct{} `type:"structure"` - - // An XML document generated by an identity provider (IdP) that supports SAML - // 2.0. The document includes the issuer's name, expiration information, and - // keys that can be used to validate the SAML authentication response (assertions) - // that are received from the IdP. You must generate the metadata document using - // the identity management software that is used as your organization's IdP. - // - // SAMLMetadataDocument is a required field - SAMLMetadataDocument *string `min:"1000" type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the SAML provider to update. - // - // For more information about ARNs, see Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // SAMLProviderArn is a required field - SAMLProviderArn *string `min:"20" 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 UpdateSAMLProviderInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateSAMLProviderInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateSAMLProviderInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateSAMLProviderInput"} - if s.SAMLMetadataDocument == nil { - invalidParams.Add(request.NewErrParamRequired("SAMLMetadataDocument")) - } - if s.SAMLMetadataDocument != nil && len(*s.SAMLMetadataDocument) < 1000 { - invalidParams.Add(request.NewErrParamMinLen("SAMLMetadataDocument", 1000)) - } - if s.SAMLProviderArn == nil { - invalidParams.Add(request.NewErrParamRequired("SAMLProviderArn")) - } - if s.SAMLProviderArn != nil && len(*s.SAMLProviderArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("SAMLProviderArn", 20)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSAMLMetadataDocument sets the SAMLMetadataDocument field's value. -func (s *UpdateSAMLProviderInput) SetSAMLMetadataDocument(v string) *UpdateSAMLProviderInput { - s.SAMLMetadataDocument = &v - return s -} - -// SetSAMLProviderArn sets the SAMLProviderArn field's value. -func (s *UpdateSAMLProviderInput) SetSAMLProviderArn(v string) *UpdateSAMLProviderInput { - s.SAMLProviderArn = &v - return s -} - -// Contains the response to a successful UpdateSAMLProvider request. -type UpdateSAMLProviderOutput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the SAML provider that was updated. - SAMLProviderArn *string `min:"20" 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 UpdateSAMLProviderOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateSAMLProviderOutput) GoString() string { - return s.String() -} - -// SetSAMLProviderArn sets the SAMLProviderArn field's value. -func (s *UpdateSAMLProviderOutput) SetSAMLProviderArn(v string) *UpdateSAMLProviderOutput { - s.SAMLProviderArn = &v - return s -} - -type UpdateSSHPublicKeyInput struct { - _ struct{} `type:"structure"` - - // The unique identifier for the SSH public key. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters that can consist of any upper or lowercased letter - // or digit. - // - // SSHPublicKeyId is a required field - SSHPublicKeyId *string `min:"20" type:"string" required:"true"` - - // The status to assign to the SSH public key. Active means that the key can - // be used for authentication with an CodeCommit repository. Inactive means - // that the key cannot be used. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"StatusType"` - - // The name of the IAM user associated with the SSH public key. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *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 UpdateSSHPublicKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateSSHPublicKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateSSHPublicKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateSSHPublicKeyInput"} - if s.SSHPublicKeyId == nil { - invalidParams.Add(request.NewErrParamRequired("SSHPublicKeyId")) - } - if s.SSHPublicKeyId != nil && len(*s.SSHPublicKeyId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("SSHPublicKeyId", 20)) - } - if s.Status == nil { - invalidParams.Add(request.NewErrParamRequired("Status")) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSSHPublicKeyId sets the SSHPublicKeyId field's value. -func (s *UpdateSSHPublicKeyInput) SetSSHPublicKeyId(v string) *UpdateSSHPublicKeyInput { - s.SSHPublicKeyId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *UpdateSSHPublicKeyInput) SetStatus(v string) *UpdateSSHPublicKeyInput { - s.Status = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *UpdateSSHPublicKeyInput) SetUserName(v string) *UpdateSSHPublicKeyInput { - s.UserName = &v - return s -} - -type UpdateSSHPublicKeyOutput 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 UpdateSSHPublicKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateSSHPublicKeyOutput) GoString() string { - return s.String() -} - -type UpdateServerCertificateInput struct { - _ struct{} `type:"structure"` - - // The new path for the server certificate. Include this only if you are updating - // the server certificate's path. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. - NewPath *string `min:"1" type:"string"` - - // The new name for the server certificate. Include this only if you are updating - // the server certificate's name. The name of the certificate cannot contain - // any spaces. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - NewServerCertificateName *string `min:"1" type:"string"` - - // The name of the server certificate that you want to update. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // ServerCertificateName is a required field - ServerCertificateName *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 UpdateServerCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateServerCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateServerCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateServerCertificateInput"} - if s.NewPath != nil && len(*s.NewPath) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NewPath", 1)) - } - if s.NewServerCertificateName != nil && len(*s.NewServerCertificateName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NewServerCertificateName", 1)) - } - if s.ServerCertificateName == nil { - invalidParams.Add(request.NewErrParamRequired("ServerCertificateName")) - } - if s.ServerCertificateName != nil && len(*s.ServerCertificateName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServerCertificateName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNewPath sets the NewPath field's value. -func (s *UpdateServerCertificateInput) SetNewPath(v string) *UpdateServerCertificateInput { - s.NewPath = &v - return s -} - -// SetNewServerCertificateName sets the NewServerCertificateName field's value. -func (s *UpdateServerCertificateInput) SetNewServerCertificateName(v string) *UpdateServerCertificateInput { - s.NewServerCertificateName = &v - return s -} - -// SetServerCertificateName sets the ServerCertificateName field's value. -func (s *UpdateServerCertificateInput) SetServerCertificateName(v string) *UpdateServerCertificateInput { - s.ServerCertificateName = &v - return s -} - -type UpdateServerCertificateOutput 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 UpdateServerCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateServerCertificateOutput) GoString() string { - return s.String() -} - -type UpdateServiceSpecificCredentialInput struct { - _ struct{} `type:"structure"` - - // The unique identifier of the service-specific credential. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters that can consist of any upper or lowercased letter - // or digit. - // - // ServiceSpecificCredentialId is a required field - ServiceSpecificCredentialId *string `min:"20" type:"string" required:"true"` - - // The status to be assigned to the service-specific credential. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"StatusType"` - - // The name of the IAM user associated with the service-specific credential. - // If you do not specify this value, then the operation assumes the user whose - // credentials are used to call the operation. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - UserName *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 UpdateServiceSpecificCredentialInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateServiceSpecificCredentialInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateServiceSpecificCredentialInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateServiceSpecificCredentialInput"} - if s.ServiceSpecificCredentialId == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceSpecificCredentialId")) - } - if s.ServiceSpecificCredentialId != nil && len(*s.ServiceSpecificCredentialId) < 20 { - invalidParams.Add(request.NewErrParamMinLen("ServiceSpecificCredentialId", 20)) - } - if s.Status == nil { - invalidParams.Add(request.NewErrParamRequired("Status")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetServiceSpecificCredentialId sets the ServiceSpecificCredentialId field's value. -func (s *UpdateServiceSpecificCredentialInput) SetServiceSpecificCredentialId(v string) *UpdateServiceSpecificCredentialInput { - s.ServiceSpecificCredentialId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *UpdateServiceSpecificCredentialInput) SetStatus(v string) *UpdateServiceSpecificCredentialInput { - s.Status = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *UpdateServiceSpecificCredentialInput) SetUserName(v string) *UpdateServiceSpecificCredentialInput { - s.UserName = &v - return s -} - -type UpdateServiceSpecificCredentialOutput 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 UpdateServiceSpecificCredentialOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateServiceSpecificCredentialOutput) GoString() string { - return s.String() -} - -type UpdateSigningCertificateInput struct { - _ struct{} `type:"structure"` - - // The ID of the signing certificate you want to update. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters that can consist of any upper or lowercased letter - // or digit. - // - // CertificateId is a required field - CertificateId *string `min:"24" type:"string" required:"true"` - - // The status you want to assign to the certificate. Active means that the certificate - // can be used for programmatic calls to Amazon Web Services Inactive means - // that the certificate cannot be used. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"StatusType"` - - // The name of the IAM user the signing certificate belongs to. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - UserName *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 UpdateSigningCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateSigningCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateSigningCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateSigningCertificateInput"} - if s.CertificateId == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateId")) - } - if s.CertificateId != nil && len(*s.CertificateId) < 24 { - invalidParams.Add(request.NewErrParamMinLen("CertificateId", 24)) - } - if s.Status == nil { - invalidParams.Add(request.NewErrParamRequired("Status")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateId sets the CertificateId field's value. -func (s *UpdateSigningCertificateInput) SetCertificateId(v string) *UpdateSigningCertificateInput { - s.CertificateId = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *UpdateSigningCertificateInput) SetStatus(v string) *UpdateSigningCertificateInput { - s.Status = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *UpdateSigningCertificateInput) SetUserName(v string) *UpdateSigningCertificateInput { - s.UserName = &v - return s -} - -type UpdateSigningCertificateOutput 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 UpdateSigningCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateSigningCertificateOutput) GoString() string { - return s.String() -} - -type UpdateUserInput struct { - _ struct{} `type:"structure"` - - // New path for the IAM user. Include this parameter only if you're changing - // the user's path. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. - NewPath *string `min:"1" type:"string"` - - // New name for the user. Include this parameter only if you're changing the - // user's name. - // - // IAM user, group, role, and policy names must be unique within the account. - // Names are not distinguished by case. For example, you cannot create resources - // named both "MyResource" and "myresource". - NewUserName *string `min:"1" type:"string"` - - // Name of the user to update. If you're changing the name of the user, this - // is the original user name. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *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 UpdateUserInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateUserInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateUserInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateUserInput"} - if s.NewPath != nil && len(*s.NewPath) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NewPath", 1)) - } - if s.NewUserName != nil && len(*s.NewUserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NewUserName", 1)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetNewPath sets the NewPath field's value. -func (s *UpdateUserInput) SetNewPath(v string) *UpdateUserInput { - s.NewPath = &v - return s -} - -// SetNewUserName sets the NewUserName field's value. -func (s *UpdateUserInput) SetNewUserName(v string) *UpdateUserInput { - s.NewUserName = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *UpdateUserInput) SetUserName(v string) *UpdateUserInput { - s.UserName = &v - return s -} - -type UpdateUserOutput 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 UpdateUserOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateUserOutput) GoString() string { - return s.String() -} - -type UploadSSHPublicKeyInput struct { - _ struct{} `type:"structure"` - - // The SSH public key. The public key must be encoded in ssh-rsa format or PEM - // format. The minimum bit-length of the public key is 2048 bits. For example, - // you can generate a 2048-bit key, and the resulting PEM file is 1679 bytes - // long. - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // SSHPublicKeyBody is a required field - SSHPublicKeyBody *string `min:"1" type:"string" required:"true"` - - // The name of the IAM user to associate the SSH public key with. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // UserName is a required field - UserName *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 UploadSSHPublicKeyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UploadSSHPublicKeyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UploadSSHPublicKeyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UploadSSHPublicKeyInput"} - if s.SSHPublicKeyBody == nil { - invalidParams.Add(request.NewErrParamRequired("SSHPublicKeyBody")) - } - if s.SSHPublicKeyBody != nil && len(*s.SSHPublicKeyBody) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SSHPublicKeyBody", 1)) - } - if s.UserName == nil { - invalidParams.Add(request.NewErrParamRequired("UserName")) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSSHPublicKeyBody sets the SSHPublicKeyBody field's value. -func (s *UploadSSHPublicKeyInput) SetSSHPublicKeyBody(v string) *UploadSSHPublicKeyInput { - s.SSHPublicKeyBody = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *UploadSSHPublicKeyInput) SetUserName(v string) *UploadSSHPublicKeyInput { - s.UserName = &v - return s -} - -// Contains the response to a successful UploadSSHPublicKey request. -type UploadSSHPublicKeyOutput struct { - _ struct{} `type:"structure"` - - // Contains information about the SSH public key. - SSHPublicKey *SSHPublicKey `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 UploadSSHPublicKeyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UploadSSHPublicKeyOutput) GoString() string { - return s.String() -} - -// SetSSHPublicKey sets the SSHPublicKey field's value. -func (s *UploadSSHPublicKeyOutput) SetSSHPublicKey(v *SSHPublicKey) *UploadSSHPublicKeyOutput { - s.SSHPublicKey = v - return s -} - -type UploadServerCertificateInput struct { - _ struct{} `type:"structure"` - - // The contents of the public key certificate in PEM-encoded format. - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // CertificateBody is a required field - CertificateBody *string `min:"1" type:"string" required:"true"` - - // The contents of the certificate chain. This is typically a concatenation - // of the PEM-encoded public key certificates of the chain. - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - CertificateChain *string `min:"1" type:"string"` - - // The path for the server certificate. For more information about paths, see - // IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // This parameter is optional. If it is not included, it defaults to a slash - // (/). This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. - // - // If you are uploading a server certificate specifically for use with Amazon - // CloudFront distributions, you must specify a path using the path parameter. - // The path must begin with /cloudfront and must include a trailing slash (for - // example, /cloudfront/test/). - Path *string `min:"1" type:"string"` - - // The contents of the private key in PEM-encoded format. - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // PrivateKey is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by UploadServerCertificateInput's - // String and GoString methods. - // - // PrivateKey is a required field - PrivateKey *string `min:"1" type:"string" required:"true" sensitive:"true"` - - // The name for the server certificate. Do not include the path in this value. - // The name of the certificate cannot contain any spaces. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - // - // ServerCertificateName is a required field - ServerCertificateName *string `min:"1" type:"string" required:"true"` - - // A list of tags that you want to attach to the new IAM server certificate - // resource. Each tag consists of a key name and an associated value. For more - // information about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - // - // If any one of the tags is invalid or if you exceed the allowed maximum number - // of tags, then the entire request fails and the resource is not created. - 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 UploadServerCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UploadServerCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UploadServerCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UploadServerCertificateInput"} - if s.CertificateBody == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateBody")) - } - if s.CertificateBody != nil && len(*s.CertificateBody) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CertificateBody", 1)) - } - if s.CertificateChain != nil && len(*s.CertificateChain) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CertificateChain", 1)) - } - if s.Path != nil && len(*s.Path) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Path", 1)) - } - if s.PrivateKey == nil { - invalidParams.Add(request.NewErrParamRequired("PrivateKey")) - } - if s.PrivateKey != nil && len(*s.PrivateKey) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PrivateKey", 1)) - } - if s.ServerCertificateName == nil { - invalidParams.Add(request.NewErrParamRequired("ServerCertificateName")) - } - if s.ServerCertificateName != nil && len(*s.ServerCertificateName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ServerCertificateName", 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 -} - -// SetCertificateBody sets the CertificateBody field's value. -func (s *UploadServerCertificateInput) SetCertificateBody(v string) *UploadServerCertificateInput { - s.CertificateBody = &v - return s -} - -// SetCertificateChain sets the CertificateChain field's value. -func (s *UploadServerCertificateInput) SetCertificateChain(v string) *UploadServerCertificateInput { - s.CertificateChain = &v - return s -} - -// SetPath sets the Path field's value. -func (s *UploadServerCertificateInput) SetPath(v string) *UploadServerCertificateInput { - s.Path = &v - return s -} - -// SetPrivateKey sets the PrivateKey field's value. -func (s *UploadServerCertificateInput) SetPrivateKey(v string) *UploadServerCertificateInput { - s.PrivateKey = &v - return s -} - -// SetServerCertificateName sets the ServerCertificateName field's value. -func (s *UploadServerCertificateInput) SetServerCertificateName(v string) *UploadServerCertificateInput { - s.ServerCertificateName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *UploadServerCertificateInput) SetTags(v []*Tag) *UploadServerCertificateInput { - s.Tags = v - return s -} - -// Contains the response to a successful UploadServerCertificate request. -type UploadServerCertificateOutput struct { - _ struct{} `type:"structure"` - - // The meta information of the uploaded server certificate without its certificate - // body, certificate chain, and private key. - ServerCertificateMetadata *ServerCertificateMetadata `type:"structure"` - - // A list of tags that are attached to the new IAM server certificate. The returned - // list of tags is sorted by tag key. For more information about tagging, see - // Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User 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 UploadServerCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UploadServerCertificateOutput) GoString() string { - return s.String() -} - -// SetServerCertificateMetadata sets the ServerCertificateMetadata field's value. -func (s *UploadServerCertificateOutput) SetServerCertificateMetadata(v *ServerCertificateMetadata) *UploadServerCertificateOutput { - s.ServerCertificateMetadata = v - return s -} - -// SetTags sets the Tags field's value. -func (s *UploadServerCertificateOutput) SetTags(v []*Tag) *UploadServerCertificateOutput { - s.Tags = v - return s -} - -type UploadSigningCertificateInput struct { - _ struct{} `type:"structure"` - - // The contents of the signing certificate. - // - // The regex pattern (http://wikipedia.org/wiki/regex) used to validate this - // parameter is a string of characters consisting of the following: - // - // * Any printable ASCII character ranging from the space character (\u0020) - // through the end of the ASCII character range - // - // * The printable characters in the Basic Latin and Latin-1 Supplement character - // set (through \u00FF) - // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - // - // CertificateBody is a required field - CertificateBody *string `min:"1" type:"string" required:"true"` - - // The name of the user the signing certificate is for. - // - // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of upper and lowercase alphanumeric characters - // with no spaces. You can also include any of the following characters: _+=,.@- - UserName *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 UploadSigningCertificateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UploadSigningCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UploadSigningCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UploadSigningCertificateInput"} - if s.CertificateBody == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateBody")) - } - if s.CertificateBody != nil && len(*s.CertificateBody) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CertificateBody", 1)) - } - if s.UserName != nil && len(*s.UserName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificateBody sets the CertificateBody field's value. -func (s *UploadSigningCertificateInput) SetCertificateBody(v string) *UploadSigningCertificateInput { - s.CertificateBody = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *UploadSigningCertificateInput) SetUserName(v string) *UploadSigningCertificateInput { - s.UserName = &v - return s -} - -// Contains the response to a successful UploadSigningCertificate request. -type UploadSigningCertificateOutput struct { - _ struct{} `type:"structure"` - - // Information about the certificate. - // - // Certificate is a required field - Certificate *SigningCertificate `type:"structure" 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 UploadSigningCertificateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UploadSigningCertificateOutput) GoString() string { - return s.String() -} - -// SetCertificate sets the Certificate field's value. -func (s *UploadSigningCertificateOutput) SetCertificate(v *SigningCertificate) *UploadSigningCertificateOutput { - s.Certificate = v - return s -} - -// Contains information about an IAM user entity. -// -// This data type is used as a response element in the following operations: -// -// - CreateUser -// -// - GetUser -// -// - ListUsers -type User struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) that identifies the user. For more information - // about ARNs and how to use ARNs in policies, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // Arn is a required field - Arn *string `min:"20" type:"string" required:"true"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the user was created. - // - // CreateDate is a required field - CreateDate *time.Time `type:"timestamp" required:"true"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the user's password was last used to sign in to an Amazon Web Services - // website. For a list of Amazon Web Services websites that capture a user's - // last sign-in time, see the Credential reports (https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html) - // topic in the IAM User Guide. If a password is used more than once in a five-minute - // span, only the first use is returned in this field. If the field is null - // (no value), then it indicates that they never signed in with a password. - // This can be because: - // - // * The user never had a password. - // - // * A password exists but has not been used since IAM started tracking this - // information on October 20, 2014. - // - // A null value does not mean that the user never had a password. Also, if the - // user does not currently have a password but had one in the past, then this - // field contains the date and time the most recent password was used. - // - // This value is returned only in the GetUser and ListUsers operations. - PasswordLastUsed *time.Time `type:"timestamp"` - - // The path to the user. For more information about paths, see IAM identifiers - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // The ARN of the policy used to set the permissions boundary for the user. - // - // Path is a required field - Path *string `min:"1" type:"string" required:"true"` - - // For more information about permissions boundaries, see Permissions boundaries - // for IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. - PermissionsBoundary *AttachedPermissionsBoundary `type:"structure"` - - // A list of tags that are associated with the user. For more information about - // tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - Tags []*Tag `type:"list"` - - // The stable and unique string identifying the user. For more information about - // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - // - // UserId is a required field - UserId *string `min:"16" type:"string" required:"true"` - - // The friendly name identifying the user. - // - // UserName is a required field - UserName *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 User) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s User) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *User) SetArn(v string) *User { - s.Arn = &v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *User) SetCreateDate(v time.Time) *User { - s.CreateDate = &v - return s -} - -// SetPasswordLastUsed sets the PasswordLastUsed field's value. -func (s *User) SetPasswordLastUsed(v time.Time) *User { - s.PasswordLastUsed = &v - return s -} - -// SetPath sets the Path field's value. -func (s *User) SetPath(v string) *User { - s.Path = &v - return s -} - -// SetPermissionsBoundary sets the PermissionsBoundary field's value. -func (s *User) SetPermissionsBoundary(v *AttachedPermissionsBoundary) *User { - s.PermissionsBoundary = v - return s -} - -// SetTags sets the Tags field's value. -func (s *User) SetTags(v []*Tag) *User { - s.Tags = v - return s -} - -// SetUserId sets the UserId field's value. -func (s *User) SetUserId(v string) *User { - s.UserId = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *User) SetUserName(v string) *User { - s.UserName = &v - return s -} - -// Contains information about an IAM user, including all the user's policies -// and all the IAM groups the user is in. -// -// This data type is used as a response element in the GetAccountAuthorizationDetails -// operation. -type UserDetail struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web - // Services resources. - // - // For more information about ARNs, go to Amazon Resource Names (ARNs) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - Arn *string `min:"20" type:"string"` - - // A list of the managed policies attached to the user. - AttachedManagedPolicies []*AttachedPolicy `type:"list"` - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), - // when the user was created. - CreateDate *time.Time `type:"timestamp"` - - // A list of IAM groups that the user is in. - GroupList []*string `type:"list"` - - // The path to the user. For more information about paths, see IAM identifiers - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - Path *string `min:"1" type:"string"` - - // The ARN of the policy used to set the permissions boundary for the user. - // - // For more information about permissions boundaries, see Permissions boundaries - // for IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) - // in the IAM User Guide. - PermissionsBoundary *AttachedPermissionsBoundary `type:"structure"` - - // A list of tags that are associated with the user. For more information about - // tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - Tags []*Tag `type:"list"` - - // The stable and unique string identifying the user. For more information about - // IDs, see IAM identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) - // in the IAM User Guide. - UserId *string `min:"16" type:"string"` - - // The friendly name identifying the user. - UserName *string `min:"1" type:"string"` - - // A list of the inline policies embedded in the user. - UserPolicyList []*PolicyDetail `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 UserDetail) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UserDetail) GoString() string { - return s.String() -} - -// SetArn sets the Arn field's value. -func (s *UserDetail) SetArn(v string) *UserDetail { - s.Arn = &v - return s -} - -// SetAttachedManagedPolicies sets the AttachedManagedPolicies field's value. -func (s *UserDetail) SetAttachedManagedPolicies(v []*AttachedPolicy) *UserDetail { - s.AttachedManagedPolicies = v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *UserDetail) SetCreateDate(v time.Time) *UserDetail { - s.CreateDate = &v - return s -} - -// SetGroupList sets the GroupList field's value. -func (s *UserDetail) SetGroupList(v []*string) *UserDetail { - s.GroupList = v - return s -} - -// SetPath sets the Path field's value. -func (s *UserDetail) SetPath(v string) *UserDetail { - s.Path = &v - return s -} - -// SetPermissionsBoundary sets the PermissionsBoundary field's value. -func (s *UserDetail) SetPermissionsBoundary(v *AttachedPermissionsBoundary) *UserDetail { - s.PermissionsBoundary = v - return s -} - -// SetTags sets the Tags field's value. -func (s *UserDetail) SetTags(v []*Tag) *UserDetail { - s.Tags = v - return s -} - -// SetUserId sets the UserId field's value. -func (s *UserDetail) SetUserId(v string) *UserDetail { - s.UserId = &v - return s -} - -// SetUserName sets the UserName field's value. -func (s *UserDetail) SetUserName(v string) *UserDetail { - s.UserName = &v - return s -} - -// SetUserPolicyList sets the UserPolicyList field's value. -func (s *UserDetail) SetUserPolicyList(v []*PolicyDetail) *UserDetail { - s.UserPolicyList = v - return s -} - -// Contains information about a virtual MFA device. -type VirtualMFADevice struct { - _ struct{} `type:"structure"` - - // The base32 seed defined as specified in RFC3548 (https://tools.ietf.org/html/rfc3548.txt). - // The Base32StringSeed is base32-encoded. - // - // Base32StringSeed is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by VirtualMFADevice's - // String and GoString methods. - // - // Base32StringSeed is automatically base64 encoded/decoded by the SDK. - Base32StringSeed []byte `type:"blob" sensitive:"true"` - - // The date and time on which the virtual MFA device was enabled. - EnableDate *time.Time `type:"timestamp"` - - // A QR code PNG image that encodes otpauth://totp/$virtualMFADeviceName@$AccountName?secret=$Base32String - // where $virtualMFADeviceName is one of the create call arguments. AccountName - // is the user name if set (otherwise, the account ID otherwise), and Base32String - // is the seed in base32 format. The Base32String value is base64-encoded. - // - // QRCodePNG is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by VirtualMFADevice's - // String and GoString methods. - // - // QRCodePNG is automatically base64 encoded/decoded by the SDK. - QRCodePNG []byte `type:"blob" sensitive:"true"` - - // The serial number associated with VirtualMFADevice. - // - // SerialNumber is a required field - SerialNumber *string `min:"9" type:"string" required:"true"` - - // A list of tags that are attached to the virtual MFA device. For more information - // about tagging, see Tagging IAM resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) - // in the IAM User Guide. - Tags []*Tag `type:"list"` - - // The IAM user associated with this virtual MFA device. - User *User `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 VirtualMFADevice) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s VirtualMFADevice) GoString() string { - return s.String() -} - -// SetBase32StringSeed sets the Base32StringSeed field's value. -func (s *VirtualMFADevice) SetBase32StringSeed(v []byte) *VirtualMFADevice { - s.Base32StringSeed = v - return s -} - -// SetEnableDate sets the EnableDate field's value. -func (s *VirtualMFADevice) SetEnableDate(v time.Time) *VirtualMFADevice { - s.EnableDate = &v - return s -} - -// SetQRCodePNG sets the QRCodePNG field's value. -func (s *VirtualMFADevice) SetQRCodePNG(v []byte) *VirtualMFADevice { - s.QRCodePNG = v - return s -} - -// SetSerialNumber sets the SerialNumber field's value. -func (s *VirtualMFADevice) SetSerialNumber(v string) *VirtualMFADevice { - s.SerialNumber = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *VirtualMFADevice) SetTags(v []*Tag) *VirtualMFADevice { - s.Tags = v - return s -} - -// SetUser sets the User field's value. -func (s *VirtualMFADevice) SetUser(v *User) *VirtualMFADevice { - s.User = v - return s -} - -const ( - // AccessAdvisorUsageGranularityTypeServiceLevel is a AccessAdvisorUsageGranularityType enum value - AccessAdvisorUsageGranularityTypeServiceLevel = "SERVICE_LEVEL" - - // AccessAdvisorUsageGranularityTypeActionLevel is a AccessAdvisorUsageGranularityType enum value - AccessAdvisorUsageGranularityTypeActionLevel = "ACTION_LEVEL" -) - -// AccessAdvisorUsageGranularityType_Values returns all elements of the AccessAdvisorUsageGranularityType enum -func AccessAdvisorUsageGranularityType_Values() []string { - return []string{ - AccessAdvisorUsageGranularityTypeServiceLevel, - AccessAdvisorUsageGranularityTypeActionLevel, - } -} - -const ( - // AssignmentStatusTypeAssigned is a AssignmentStatusType enum value - AssignmentStatusTypeAssigned = "Assigned" - - // AssignmentStatusTypeUnassigned is a AssignmentStatusType enum value - AssignmentStatusTypeUnassigned = "Unassigned" - - // AssignmentStatusTypeAny is a AssignmentStatusType enum value - AssignmentStatusTypeAny = "Any" -) - -// AssignmentStatusType_Values returns all elements of the AssignmentStatusType enum -func AssignmentStatusType_Values() []string { - return []string{ - AssignmentStatusTypeAssigned, - AssignmentStatusTypeUnassigned, - AssignmentStatusTypeAny, - } -} - -const ( - // ContextKeyTypeEnumString is a ContextKeyTypeEnum enum value - ContextKeyTypeEnumString = "string" - - // ContextKeyTypeEnumStringList is a ContextKeyTypeEnum enum value - ContextKeyTypeEnumStringList = "stringList" - - // ContextKeyTypeEnumNumeric is a ContextKeyTypeEnum enum value - ContextKeyTypeEnumNumeric = "numeric" - - // ContextKeyTypeEnumNumericList is a ContextKeyTypeEnum enum value - ContextKeyTypeEnumNumericList = "numericList" - - // ContextKeyTypeEnumBoolean is a ContextKeyTypeEnum enum value - ContextKeyTypeEnumBoolean = "boolean" - - // ContextKeyTypeEnumBooleanList is a ContextKeyTypeEnum enum value - ContextKeyTypeEnumBooleanList = "booleanList" - - // ContextKeyTypeEnumIp is a ContextKeyTypeEnum enum value - ContextKeyTypeEnumIp = "ip" - - // ContextKeyTypeEnumIpList is a ContextKeyTypeEnum enum value - ContextKeyTypeEnumIpList = "ipList" - - // ContextKeyTypeEnumBinary is a ContextKeyTypeEnum enum value - ContextKeyTypeEnumBinary = "binary" - - // ContextKeyTypeEnumBinaryList is a ContextKeyTypeEnum enum value - ContextKeyTypeEnumBinaryList = "binaryList" - - // ContextKeyTypeEnumDate is a ContextKeyTypeEnum enum value - ContextKeyTypeEnumDate = "date" - - // ContextKeyTypeEnumDateList is a ContextKeyTypeEnum enum value - ContextKeyTypeEnumDateList = "dateList" -) - -// ContextKeyTypeEnum_Values returns all elements of the ContextKeyTypeEnum enum -func ContextKeyTypeEnum_Values() []string { - return []string{ - ContextKeyTypeEnumString, - ContextKeyTypeEnumStringList, - ContextKeyTypeEnumNumeric, - ContextKeyTypeEnumNumericList, - ContextKeyTypeEnumBoolean, - ContextKeyTypeEnumBooleanList, - ContextKeyTypeEnumIp, - ContextKeyTypeEnumIpList, - ContextKeyTypeEnumBinary, - ContextKeyTypeEnumBinaryList, - ContextKeyTypeEnumDate, - ContextKeyTypeEnumDateList, - } -} - -const ( - // DeletionTaskStatusTypeSucceeded is a DeletionTaskStatusType enum value - DeletionTaskStatusTypeSucceeded = "SUCCEEDED" - - // DeletionTaskStatusTypeInProgress is a DeletionTaskStatusType enum value - DeletionTaskStatusTypeInProgress = "IN_PROGRESS" - - // DeletionTaskStatusTypeFailed is a DeletionTaskStatusType enum value - DeletionTaskStatusTypeFailed = "FAILED" - - // DeletionTaskStatusTypeNotStarted is a DeletionTaskStatusType enum value - DeletionTaskStatusTypeNotStarted = "NOT_STARTED" -) - -// DeletionTaskStatusType_Values returns all elements of the DeletionTaskStatusType enum -func DeletionTaskStatusType_Values() []string { - return []string{ - DeletionTaskStatusTypeSucceeded, - DeletionTaskStatusTypeInProgress, - DeletionTaskStatusTypeFailed, - DeletionTaskStatusTypeNotStarted, - } -} - -const ( - // EncodingTypeSsh is a EncodingType enum value - EncodingTypeSsh = "SSH" - - // EncodingTypePem is a EncodingType enum value - EncodingTypePem = "PEM" -) - -// EncodingType_Values returns all elements of the EncodingType enum -func EncodingType_Values() []string { - return []string{ - EncodingTypeSsh, - EncodingTypePem, - } -} - -const ( - // EntityTypeUser is a EntityType enum value - EntityTypeUser = "User" - - // EntityTypeRole is a EntityType enum value - EntityTypeRole = "Role" - - // EntityTypeGroup is a EntityType enum value - EntityTypeGroup = "Group" - - // EntityTypeLocalManagedPolicy is a EntityType enum value - EntityTypeLocalManagedPolicy = "LocalManagedPolicy" - - // EntityTypeAwsmanagedPolicy is a EntityType enum value - EntityTypeAwsmanagedPolicy = "AWSManagedPolicy" -) - -// EntityType_Values returns all elements of the EntityType enum -func EntityType_Values() []string { - return []string{ - EntityTypeUser, - EntityTypeRole, - EntityTypeGroup, - EntityTypeLocalManagedPolicy, - EntityTypeAwsmanagedPolicy, - } -} - -const ( - // GlobalEndpointTokenVersionV1token is a GlobalEndpointTokenVersion enum value - GlobalEndpointTokenVersionV1token = "v1Token" - - // GlobalEndpointTokenVersionV2token is a GlobalEndpointTokenVersion enum value - GlobalEndpointTokenVersionV2token = "v2Token" -) - -// GlobalEndpointTokenVersion_Values returns all elements of the GlobalEndpointTokenVersion enum -func GlobalEndpointTokenVersion_Values() []string { - return []string{ - GlobalEndpointTokenVersionV1token, - GlobalEndpointTokenVersionV2token, - } -} - -const ( - // JobStatusTypeInProgress is a JobStatusType enum value - JobStatusTypeInProgress = "IN_PROGRESS" - - // JobStatusTypeCompleted is a JobStatusType enum value - JobStatusTypeCompleted = "COMPLETED" - - // JobStatusTypeFailed is a JobStatusType enum value - JobStatusTypeFailed = "FAILED" -) - -// JobStatusType_Values returns all elements of the JobStatusType enum -func JobStatusType_Values() []string { - return []string{ - JobStatusTypeInProgress, - JobStatusTypeCompleted, - JobStatusTypeFailed, - } -} - -const ( - // PermissionsBoundaryAttachmentTypePermissionsBoundaryPolicy is a PermissionsBoundaryAttachmentType enum value - PermissionsBoundaryAttachmentTypePermissionsBoundaryPolicy = "PermissionsBoundaryPolicy" -) - -// PermissionsBoundaryAttachmentType_Values returns all elements of the PermissionsBoundaryAttachmentType enum -func PermissionsBoundaryAttachmentType_Values() []string { - return []string{ - PermissionsBoundaryAttachmentTypePermissionsBoundaryPolicy, - } -} - -const ( - // PolicyEvaluationDecisionTypeAllowed is a PolicyEvaluationDecisionType enum value - PolicyEvaluationDecisionTypeAllowed = "allowed" - - // PolicyEvaluationDecisionTypeExplicitDeny is a PolicyEvaluationDecisionType enum value - PolicyEvaluationDecisionTypeExplicitDeny = "explicitDeny" - - // PolicyEvaluationDecisionTypeImplicitDeny is a PolicyEvaluationDecisionType enum value - PolicyEvaluationDecisionTypeImplicitDeny = "implicitDeny" -) - -// PolicyEvaluationDecisionType_Values returns all elements of the PolicyEvaluationDecisionType enum -func PolicyEvaluationDecisionType_Values() []string { - return []string{ - PolicyEvaluationDecisionTypeAllowed, - PolicyEvaluationDecisionTypeExplicitDeny, - PolicyEvaluationDecisionTypeImplicitDeny, - } -} - -const ( - // PolicyOwnerEntityTypeUser is a PolicyOwnerEntityType enum value - PolicyOwnerEntityTypeUser = "USER" - - // PolicyOwnerEntityTypeRole is a PolicyOwnerEntityType enum value - PolicyOwnerEntityTypeRole = "ROLE" - - // PolicyOwnerEntityTypeGroup is a PolicyOwnerEntityType enum value - PolicyOwnerEntityTypeGroup = "GROUP" -) - -// PolicyOwnerEntityType_Values returns all elements of the PolicyOwnerEntityType enum -func PolicyOwnerEntityType_Values() []string { - return []string{ - PolicyOwnerEntityTypeUser, - PolicyOwnerEntityTypeRole, - PolicyOwnerEntityTypeGroup, - } -} - -const ( - // PolicyScopeTypeAll is a PolicyScopeType enum value - PolicyScopeTypeAll = "All" - - // PolicyScopeTypeAws is a PolicyScopeType enum value - PolicyScopeTypeAws = "AWS" - - // PolicyScopeTypeLocal is a PolicyScopeType enum value - PolicyScopeTypeLocal = "Local" -) - -// PolicyScopeType_Values returns all elements of the PolicyScopeType enum -func PolicyScopeType_Values() []string { - return []string{ - PolicyScopeTypeAll, - PolicyScopeTypeAws, - PolicyScopeTypeLocal, - } -} - -const ( - // PolicySourceTypeUser is a PolicySourceType enum value - PolicySourceTypeUser = "user" - - // PolicySourceTypeGroup is a PolicySourceType enum value - PolicySourceTypeGroup = "group" - - // PolicySourceTypeRole is a PolicySourceType enum value - PolicySourceTypeRole = "role" - - // PolicySourceTypeAwsManaged is a PolicySourceType enum value - PolicySourceTypeAwsManaged = "aws-managed" - - // PolicySourceTypeUserManaged is a PolicySourceType enum value - PolicySourceTypeUserManaged = "user-managed" - - // PolicySourceTypeResource is a PolicySourceType enum value - PolicySourceTypeResource = "resource" - - // PolicySourceTypeNone is a PolicySourceType enum value - PolicySourceTypeNone = "none" -) - -// PolicySourceType_Values returns all elements of the PolicySourceType enum -func PolicySourceType_Values() []string { - return []string{ - PolicySourceTypeUser, - PolicySourceTypeGroup, - PolicySourceTypeRole, - PolicySourceTypeAwsManaged, - PolicySourceTypeUserManaged, - PolicySourceTypeResource, - PolicySourceTypeNone, - } -} - -const ( - // PolicyTypeInline is a PolicyType enum value - PolicyTypeInline = "INLINE" - - // PolicyTypeManaged is a PolicyType enum value - PolicyTypeManaged = "MANAGED" -) - -// PolicyType_Values returns all elements of the PolicyType enum -func PolicyType_Values() []string { - return []string{ - PolicyTypeInline, - PolicyTypeManaged, - } -} - -// The policy usage type that indicates whether the policy is used as a permissions -// policy or as the permissions boundary for an entity. -// -// For more information about permissions boundaries, see Permissions boundaries -// for IAM identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) -// in the IAM User Guide. -const ( - // PolicyUsageTypePermissionsPolicy is a PolicyUsageType enum value - PolicyUsageTypePermissionsPolicy = "PermissionsPolicy" - - // PolicyUsageTypePermissionsBoundary is a PolicyUsageType enum value - PolicyUsageTypePermissionsBoundary = "PermissionsBoundary" -) - -// PolicyUsageType_Values returns all elements of the PolicyUsageType enum -func PolicyUsageType_Values() []string { - return []string{ - PolicyUsageTypePermissionsPolicy, - PolicyUsageTypePermissionsBoundary, - } -} - -const ( - // ReportFormatTypeTextCsv is a ReportFormatType enum value - ReportFormatTypeTextCsv = "text/csv" -) - -// ReportFormatType_Values returns all elements of the ReportFormatType enum -func ReportFormatType_Values() []string { - return []string{ - ReportFormatTypeTextCsv, - } -} - -const ( - // ReportStateTypeStarted is a ReportStateType enum value - ReportStateTypeStarted = "STARTED" - - // ReportStateTypeInprogress is a ReportStateType enum value - ReportStateTypeInprogress = "INPROGRESS" - - // ReportStateTypeComplete is a ReportStateType enum value - ReportStateTypeComplete = "COMPLETE" -) - -// ReportStateType_Values returns all elements of the ReportStateType enum -func ReportStateType_Values() []string { - return []string{ - ReportStateTypeStarted, - ReportStateTypeInprogress, - ReportStateTypeComplete, - } -} - -const ( - // SortKeyTypeServiceNamespaceAscending is a SortKeyType enum value - SortKeyTypeServiceNamespaceAscending = "SERVICE_NAMESPACE_ASCENDING" - - // SortKeyTypeServiceNamespaceDescending is a SortKeyType enum value - SortKeyTypeServiceNamespaceDescending = "SERVICE_NAMESPACE_DESCENDING" - - // SortKeyTypeLastAuthenticatedTimeAscending is a SortKeyType enum value - SortKeyTypeLastAuthenticatedTimeAscending = "LAST_AUTHENTICATED_TIME_ASCENDING" - - // SortKeyTypeLastAuthenticatedTimeDescending is a SortKeyType enum value - SortKeyTypeLastAuthenticatedTimeDescending = "LAST_AUTHENTICATED_TIME_DESCENDING" -) - -// SortKeyType_Values returns all elements of the SortKeyType enum -func SortKeyType_Values() []string { - return []string{ - SortKeyTypeServiceNamespaceAscending, - SortKeyTypeServiceNamespaceDescending, - SortKeyTypeLastAuthenticatedTimeAscending, - SortKeyTypeLastAuthenticatedTimeDescending, - } -} - -const ( - // StatusTypeActive is a StatusType enum value - StatusTypeActive = "Active" - - // StatusTypeInactive is a StatusType enum value - StatusTypeInactive = "Inactive" -) - -// StatusType_Values returns all elements of the StatusType enum -func StatusType_Values() []string { - return []string{ - StatusTypeActive, - StatusTypeInactive, - } -} - -const ( - // SummaryKeyTypeUsers is a SummaryKeyType enum value - SummaryKeyTypeUsers = "Users" - - // SummaryKeyTypeUsersQuota is a SummaryKeyType enum value - SummaryKeyTypeUsersQuota = "UsersQuota" - - // SummaryKeyTypeGroups is a SummaryKeyType enum value - SummaryKeyTypeGroups = "Groups" - - // SummaryKeyTypeGroupsQuota is a SummaryKeyType enum value - SummaryKeyTypeGroupsQuota = "GroupsQuota" - - // SummaryKeyTypeServerCertificates is a SummaryKeyType enum value - SummaryKeyTypeServerCertificates = "ServerCertificates" - - // SummaryKeyTypeServerCertificatesQuota is a SummaryKeyType enum value - SummaryKeyTypeServerCertificatesQuota = "ServerCertificatesQuota" - - // SummaryKeyTypeUserPolicySizeQuota is a SummaryKeyType enum value - SummaryKeyTypeUserPolicySizeQuota = "UserPolicySizeQuota" - - // SummaryKeyTypeGroupPolicySizeQuota is a SummaryKeyType enum value - SummaryKeyTypeGroupPolicySizeQuota = "GroupPolicySizeQuota" - - // SummaryKeyTypeGroupsPerUserQuota is a SummaryKeyType enum value - SummaryKeyTypeGroupsPerUserQuota = "GroupsPerUserQuota" - - // SummaryKeyTypeSigningCertificatesPerUserQuota is a SummaryKeyType enum value - SummaryKeyTypeSigningCertificatesPerUserQuota = "SigningCertificatesPerUserQuota" - - // SummaryKeyTypeAccessKeysPerUserQuota is a SummaryKeyType enum value - SummaryKeyTypeAccessKeysPerUserQuota = "AccessKeysPerUserQuota" - - // SummaryKeyTypeMfadevices is a SummaryKeyType enum value - SummaryKeyTypeMfadevices = "MFADevices" - - // SummaryKeyTypeMfadevicesInUse is a SummaryKeyType enum value - SummaryKeyTypeMfadevicesInUse = "MFADevicesInUse" - - // SummaryKeyTypeAccountMfaenabled is a SummaryKeyType enum value - SummaryKeyTypeAccountMfaenabled = "AccountMFAEnabled" - - // SummaryKeyTypeAccountAccessKeysPresent is a SummaryKeyType enum value - SummaryKeyTypeAccountAccessKeysPresent = "AccountAccessKeysPresent" - - // SummaryKeyTypeAccountSigningCertificatesPresent is a SummaryKeyType enum value - SummaryKeyTypeAccountSigningCertificatesPresent = "AccountSigningCertificatesPresent" - - // SummaryKeyTypeAttachedPoliciesPerGroupQuota is a SummaryKeyType enum value - SummaryKeyTypeAttachedPoliciesPerGroupQuota = "AttachedPoliciesPerGroupQuota" - - // SummaryKeyTypeAttachedPoliciesPerRoleQuota is a SummaryKeyType enum value - SummaryKeyTypeAttachedPoliciesPerRoleQuota = "AttachedPoliciesPerRoleQuota" - - // SummaryKeyTypeAttachedPoliciesPerUserQuota is a SummaryKeyType enum value - SummaryKeyTypeAttachedPoliciesPerUserQuota = "AttachedPoliciesPerUserQuota" - - // SummaryKeyTypePolicies is a SummaryKeyType enum value - SummaryKeyTypePolicies = "Policies" - - // SummaryKeyTypePoliciesQuota is a SummaryKeyType enum value - SummaryKeyTypePoliciesQuota = "PoliciesQuota" - - // SummaryKeyTypePolicySizeQuota is a SummaryKeyType enum value - SummaryKeyTypePolicySizeQuota = "PolicySizeQuota" - - // SummaryKeyTypePolicyVersionsInUse is a SummaryKeyType enum value - SummaryKeyTypePolicyVersionsInUse = "PolicyVersionsInUse" - - // SummaryKeyTypePolicyVersionsInUseQuota is a SummaryKeyType enum value - SummaryKeyTypePolicyVersionsInUseQuota = "PolicyVersionsInUseQuota" - - // SummaryKeyTypeVersionsPerPolicyQuota is a SummaryKeyType enum value - SummaryKeyTypeVersionsPerPolicyQuota = "VersionsPerPolicyQuota" - - // SummaryKeyTypeGlobalEndpointTokenVersion is a SummaryKeyType enum value - SummaryKeyTypeGlobalEndpointTokenVersion = "GlobalEndpointTokenVersion" -) - -// SummaryKeyType_Values returns all elements of the SummaryKeyType enum -func SummaryKeyType_Values() []string { - return []string{ - SummaryKeyTypeUsers, - SummaryKeyTypeUsersQuota, - SummaryKeyTypeGroups, - SummaryKeyTypeGroupsQuota, - SummaryKeyTypeServerCertificates, - SummaryKeyTypeServerCertificatesQuota, - SummaryKeyTypeUserPolicySizeQuota, - SummaryKeyTypeGroupPolicySizeQuota, - SummaryKeyTypeGroupsPerUserQuota, - SummaryKeyTypeSigningCertificatesPerUserQuota, - SummaryKeyTypeAccessKeysPerUserQuota, - SummaryKeyTypeMfadevices, - SummaryKeyTypeMfadevicesInUse, - SummaryKeyTypeAccountMfaenabled, - SummaryKeyTypeAccountAccessKeysPresent, - SummaryKeyTypeAccountSigningCertificatesPresent, - SummaryKeyTypeAttachedPoliciesPerGroupQuota, - SummaryKeyTypeAttachedPoliciesPerRoleQuota, - SummaryKeyTypeAttachedPoliciesPerUserQuota, - SummaryKeyTypePolicies, - SummaryKeyTypePoliciesQuota, - SummaryKeyTypePolicySizeQuota, - SummaryKeyTypePolicyVersionsInUse, - SummaryKeyTypePolicyVersionsInUseQuota, - SummaryKeyTypeVersionsPerPolicyQuota, - SummaryKeyTypeGlobalEndpointTokenVersion, - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/iam/doc.go b/vendor/github.com/aws/aws-sdk-go/service/iam/doc.go deleted file mode 100644 index e87adfc6b1..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/iam/doc.go +++ /dev/null @@ -1,33 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package iam provides the client and types for making API -// requests to AWS Identity and Access Management. -// -// Identity and Access Management (IAM) is a web service for securely controlling -// access to Amazon Web Services services. With IAM, you can centrally manage -// users, security credentials such as access keys, and permissions that control -// which Amazon Web Services resources users and applications can access. For -// more information about IAM, see Identity and Access Management (IAM) (http://aws.amazon.com/iam/) -// and the Identity and Access Management User Guide (https://docs.aws.amazon.com/IAM/latest/UserGuide/). -// -// See https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08 for more information on this service. -// -// See iam package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/iam/ -// -// # Using the Client -// -// To contact AWS Identity and Access Management with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the AWS Identity and Access Management client IAM for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/iam/#New -package iam diff --git a/vendor/github.com/aws/aws-sdk-go/service/iam/errors.go b/vendor/github.com/aws/aws-sdk-go/service/iam/errors.go deleted file mode 100644 index c46f6dfc60..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/iam/errors.go +++ /dev/null @@ -1,209 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package iam - -const ( - - // ErrCodeConcurrentModificationException for service response error code - // "ConcurrentModification". - // - // The request was rejected because multiple requests to change this object - // were submitted simultaneously. Wait a few minutes and submit your request - // again. - ErrCodeConcurrentModificationException = "ConcurrentModification" - - // ErrCodeCredentialReportExpiredException for service response error code - // "ReportExpired". - // - // The request was rejected because the most recent credential report has expired. - // To generate a new credential report, use GenerateCredentialReport. For more - // information about credential report expiration, see Getting credential reports - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html) - // in the IAM User Guide. - ErrCodeCredentialReportExpiredException = "ReportExpired" - - // ErrCodeCredentialReportNotPresentException for service response error code - // "ReportNotPresent". - // - // The request was rejected because the credential report does not exist. To - // generate a credential report, use GenerateCredentialReport. - ErrCodeCredentialReportNotPresentException = "ReportNotPresent" - - // ErrCodeCredentialReportNotReadyException for service response error code - // "ReportInProgress". - // - // The request was rejected because the credential report is still being generated. - ErrCodeCredentialReportNotReadyException = "ReportInProgress" - - // ErrCodeDeleteConflictException for service response error code - // "DeleteConflict". - // - // The request was rejected because it attempted to delete a resource that has - // attached subordinate entities. The error message describes these entities. - ErrCodeDeleteConflictException = "DeleteConflict" - - // ErrCodeDuplicateCertificateException for service response error code - // "DuplicateCertificate". - // - // The request was rejected because the same certificate is associated with - // an IAM user in the account. - ErrCodeDuplicateCertificateException = "DuplicateCertificate" - - // ErrCodeDuplicateSSHPublicKeyException for service response error code - // "DuplicateSSHPublicKey". - // - // The request was rejected because the SSH public key is already associated - // with the specified IAM user. - ErrCodeDuplicateSSHPublicKeyException = "DuplicateSSHPublicKey" - - // ErrCodeEntityAlreadyExistsException for service response error code - // "EntityAlreadyExists". - // - // The request was rejected because it attempted to create a resource that already - // exists. - ErrCodeEntityAlreadyExistsException = "EntityAlreadyExists" - - // ErrCodeEntityTemporarilyUnmodifiableException for service response error code - // "EntityTemporarilyUnmodifiable". - // - // The request was rejected because it referenced an entity that is temporarily - // unmodifiable, such as a user name that was deleted and then recreated. The - // error indicates that the request is likely to succeed if you try again after - // waiting several minutes. The error message describes the entity. - ErrCodeEntityTemporarilyUnmodifiableException = "EntityTemporarilyUnmodifiable" - - // ErrCodeInvalidAuthenticationCodeException for service response error code - // "InvalidAuthenticationCode". - // - // The request was rejected because the authentication code was not recognized. - // The error message describes the specific error. - ErrCodeInvalidAuthenticationCodeException = "InvalidAuthenticationCode" - - // ErrCodeInvalidCertificateException for service response error code - // "InvalidCertificate". - // - // The request was rejected because the certificate is invalid. - ErrCodeInvalidCertificateException = "InvalidCertificate" - - // ErrCodeInvalidInputException for service response error code - // "InvalidInput". - // - // The request was rejected because an invalid or out-of-range value was supplied - // for an input parameter. - ErrCodeInvalidInputException = "InvalidInput" - - // ErrCodeInvalidPublicKeyException for service response error code - // "InvalidPublicKey". - // - // The request was rejected because the public key is malformed or otherwise - // invalid. - ErrCodeInvalidPublicKeyException = "InvalidPublicKey" - - // ErrCodeInvalidUserTypeException for service response error code - // "InvalidUserType". - // - // The request was rejected because the type of user for the transaction was - // incorrect. - ErrCodeInvalidUserTypeException = "InvalidUserType" - - // ErrCodeKeyPairMismatchException for service response error code - // "KeyPairMismatch". - // - // The request was rejected because the public key certificate and the private - // key do not match. - ErrCodeKeyPairMismatchException = "KeyPairMismatch" - - // ErrCodeLimitExceededException for service response error code - // "LimitExceeded". - // - // The request was rejected because it attempted to create resources beyond - // the current Amazon Web Services account limits. The error message describes - // the limit exceeded. - ErrCodeLimitExceededException = "LimitExceeded" - - // ErrCodeMalformedCertificateException for service response error code - // "MalformedCertificate". - // - // The request was rejected because the certificate was malformed or expired. - // The error message describes the specific error. - ErrCodeMalformedCertificateException = "MalformedCertificate" - - // ErrCodeMalformedPolicyDocumentException for service response error code - // "MalformedPolicyDocument". - // - // The request was rejected because the policy document was malformed. The error - // message describes the specific error. - ErrCodeMalformedPolicyDocumentException = "MalformedPolicyDocument" - - // ErrCodeNoSuchEntityException for service response error code - // "NoSuchEntity". - // - // The request was rejected because it referenced a resource entity that does - // not exist. The error message describes the resource. - ErrCodeNoSuchEntityException = "NoSuchEntity" - - // ErrCodeOpenIdIdpCommunicationErrorException for service response error code - // "OpenIdIdpCommunicationError". - // - // The request failed because IAM cannot connect to the OpenID Connect identity - // provider URL. - ErrCodeOpenIdIdpCommunicationErrorException = "OpenIdIdpCommunicationError" - - // ErrCodePasswordPolicyViolationException for service response error code - // "PasswordPolicyViolation". - // - // The request was rejected because the provided password did not meet the requirements - // imposed by the account password policy. - ErrCodePasswordPolicyViolationException = "PasswordPolicyViolation" - - // ErrCodePolicyEvaluationException for service response error code - // "PolicyEvaluation". - // - // The request failed because a provided policy could not be successfully evaluated. - // An additional detailed message indicates the source of the failure. - ErrCodePolicyEvaluationException = "PolicyEvaluation" - - // ErrCodePolicyNotAttachableException for service response error code - // "PolicyNotAttachable". - // - // The request failed because Amazon Web Services service role policies can - // only be attached to the service-linked role for that service. - ErrCodePolicyNotAttachableException = "PolicyNotAttachable" - - // ErrCodeReportGenerationLimitExceededException for service response error code - // "ReportGenerationLimitExceeded". - // - // The request failed because the maximum number of concurrent requests for - // this account are already running. - ErrCodeReportGenerationLimitExceededException = "ReportGenerationLimitExceeded" - - // ErrCodeServiceFailureException for service response error code - // "ServiceFailure". - // - // The request processing has failed because of an unknown error, exception - // or failure. - ErrCodeServiceFailureException = "ServiceFailure" - - // ErrCodeServiceNotSupportedException for service response error code - // "NotSupportedService". - // - // The specified service does not support service-specific credentials. - ErrCodeServiceNotSupportedException = "NotSupportedService" - - // ErrCodeUnmodifiableEntityException for service response error code - // "UnmodifiableEntity". - // - // The request was rejected because service-linked roles are protected Amazon - // Web Services resources. Only the service that depends on the service-linked - // role can modify or delete the role on your behalf. The error message includes - // the name of the service that depends on this service-linked role. You must - // request the change through that service. - ErrCodeUnmodifiableEntityException = "UnmodifiableEntity" - - // ErrCodeUnrecognizedPublicKeyEncodingException for service response error code - // "UnrecognizedPublicKeyEncoding". - // - // The request was rejected because the public key encoding format is unsupported - // or unrecognized. - ErrCodeUnrecognizedPublicKeyEncodingException = "UnrecognizedPublicKeyEncoding" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/iam/iamiface/interface.go b/vendor/github.com/aws/aws-sdk-go/service/iam/iamiface/interface.go deleted file mode 100644 index 4d8e8ec02f..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/iam/iamiface/interface.go +++ /dev/null @@ -1,814 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package iamiface provides an interface to enable mocking the AWS Identity and Access Management service client -// for testing your code. -// -// It is important to note that this interface will have breaking changes -// when the service model is updated and adds new API operations, paginators, -// and waiters. -package iamiface - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/service/iam" -) - -// IAMAPI provides an interface to enable mocking the -// iam.IAM service client's API operation, -// paginators, and waiters. This make unit testing your code that calls out -// to the SDK's service client's calls easier. -// -// The best way to use this interface is so the SDK's service client's calls -// can be stubbed out for unit testing your code with the SDK without needing -// to inject custom request handlers into the SDK's request pipeline. -// -// // myFunc uses an SDK service client to make a request to -// // AWS Identity and Access Management. -// func myFunc(svc iamiface.IAMAPI) bool { -// // Make svc.AddClientIDToOpenIDConnectProvider request -// } -// -// func main() { -// sess := session.New() -// svc := iam.New(sess) -// -// myFunc(svc) -// } -// -// In your _test.go file: -// -// // Define a mock struct to be used in your unit tests of myFunc. -// type mockIAMClient struct { -// iamiface.IAMAPI -// } -// func (m *mockIAMClient) AddClientIDToOpenIDConnectProvider(input *iam.AddClientIDToOpenIDConnectProviderInput) (*iam.AddClientIDToOpenIDConnectProviderOutput, error) { -// // mock response/functionality -// } -// -// func TestMyFunc(t *testing.T) { -// // Setup Test -// mockSvc := &mockIAMClient{} -// -// myfunc(mockSvc) -// -// // Verify myFunc's functionality -// } -// -// It is important to note that this interface will have breaking changes -// when the service model is updated and adds new API operations, paginators, -// and waiters. Its suggested to use the pattern above for testing, or using -// tooling to generate mocks to satisfy the interfaces. -type IAMAPI interface { - AddClientIDToOpenIDConnectProvider(*iam.AddClientIDToOpenIDConnectProviderInput) (*iam.AddClientIDToOpenIDConnectProviderOutput, error) - AddClientIDToOpenIDConnectProviderWithContext(aws.Context, *iam.AddClientIDToOpenIDConnectProviderInput, ...request.Option) (*iam.AddClientIDToOpenIDConnectProviderOutput, error) - AddClientIDToOpenIDConnectProviderRequest(*iam.AddClientIDToOpenIDConnectProviderInput) (*request.Request, *iam.AddClientIDToOpenIDConnectProviderOutput) - - AddRoleToInstanceProfile(*iam.AddRoleToInstanceProfileInput) (*iam.AddRoleToInstanceProfileOutput, error) - AddRoleToInstanceProfileWithContext(aws.Context, *iam.AddRoleToInstanceProfileInput, ...request.Option) (*iam.AddRoleToInstanceProfileOutput, error) - AddRoleToInstanceProfileRequest(*iam.AddRoleToInstanceProfileInput) (*request.Request, *iam.AddRoleToInstanceProfileOutput) - - AddUserToGroup(*iam.AddUserToGroupInput) (*iam.AddUserToGroupOutput, error) - AddUserToGroupWithContext(aws.Context, *iam.AddUserToGroupInput, ...request.Option) (*iam.AddUserToGroupOutput, error) - AddUserToGroupRequest(*iam.AddUserToGroupInput) (*request.Request, *iam.AddUserToGroupOutput) - - AttachGroupPolicy(*iam.AttachGroupPolicyInput) (*iam.AttachGroupPolicyOutput, error) - AttachGroupPolicyWithContext(aws.Context, *iam.AttachGroupPolicyInput, ...request.Option) (*iam.AttachGroupPolicyOutput, error) - AttachGroupPolicyRequest(*iam.AttachGroupPolicyInput) (*request.Request, *iam.AttachGroupPolicyOutput) - - AttachRolePolicy(*iam.AttachRolePolicyInput) (*iam.AttachRolePolicyOutput, error) - AttachRolePolicyWithContext(aws.Context, *iam.AttachRolePolicyInput, ...request.Option) (*iam.AttachRolePolicyOutput, error) - AttachRolePolicyRequest(*iam.AttachRolePolicyInput) (*request.Request, *iam.AttachRolePolicyOutput) - - AttachUserPolicy(*iam.AttachUserPolicyInput) (*iam.AttachUserPolicyOutput, error) - AttachUserPolicyWithContext(aws.Context, *iam.AttachUserPolicyInput, ...request.Option) (*iam.AttachUserPolicyOutput, error) - AttachUserPolicyRequest(*iam.AttachUserPolicyInput) (*request.Request, *iam.AttachUserPolicyOutput) - - ChangePassword(*iam.ChangePasswordInput) (*iam.ChangePasswordOutput, error) - ChangePasswordWithContext(aws.Context, *iam.ChangePasswordInput, ...request.Option) (*iam.ChangePasswordOutput, error) - ChangePasswordRequest(*iam.ChangePasswordInput) (*request.Request, *iam.ChangePasswordOutput) - - CreateAccessKey(*iam.CreateAccessKeyInput) (*iam.CreateAccessKeyOutput, error) - CreateAccessKeyWithContext(aws.Context, *iam.CreateAccessKeyInput, ...request.Option) (*iam.CreateAccessKeyOutput, error) - CreateAccessKeyRequest(*iam.CreateAccessKeyInput) (*request.Request, *iam.CreateAccessKeyOutput) - - CreateAccountAlias(*iam.CreateAccountAliasInput) (*iam.CreateAccountAliasOutput, error) - CreateAccountAliasWithContext(aws.Context, *iam.CreateAccountAliasInput, ...request.Option) (*iam.CreateAccountAliasOutput, error) - CreateAccountAliasRequest(*iam.CreateAccountAliasInput) (*request.Request, *iam.CreateAccountAliasOutput) - - CreateGroup(*iam.CreateGroupInput) (*iam.CreateGroupOutput, error) - CreateGroupWithContext(aws.Context, *iam.CreateGroupInput, ...request.Option) (*iam.CreateGroupOutput, error) - CreateGroupRequest(*iam.CreateGroupInput) (*request.Request, *iam.CreateGroupOutput) - - CreateInstanceProfile(*iam.CreateInstanceProfileInput) (*iam.CreateInstanceProfileOutput, error) - CreateInstanceProfileWithContext(aws.Context, *iam.CreateInstanceProfileInput, ...request.Option) (*iam.CreateInstanceProfileOutput, error) - CreateInstanceProfileRequest(*iam.CreateInstanceProfileInput) (*request.Request, *iam.CreateInstanceProfileOutput) - - CreateLoginProfile(*iam.CreateLoginProfileInput) (*iam.CreateLoginProfileOutput, error) - CreateLoginProfileWithContext(aws.Context, *iam.CreateLoginProfileInput, ...request.Option) (*iam.CreateLoginProfileOutput, error) - CreateLoginProfileRequest(*iam.CreateLoginProfileInput) (*request.Request, *iam.CreateLoginProfileOutput) - - CreateOpenIDConnectProvider(*iam.CreateOpenIDConnectProviderInput) (*iam.CreateOpenIDConnectProviderOutput, error) - CreateOpenIDConnectProviderWithContext(aws.Context, *iam.CreateOpenIDConnectProviderInput, ...request.Option) (*iam.CreateOpenIDConnectProviderOutput, error) - CreateOpenIDConnectProviderRequest(*iam.CreateOpenIDConnectProviderInput) (*request.Request, *iam.CreateOpenIDConnectProviderOutput) - - CreatePolicy(*iam.CreatePolicyInput) (*iam.CreatePolicyOutput, error) - CreatePolicyWithContext(aws.Context, *iam.CreatePolicyInput, ...request.Option) (*iam.CreatePolicyOutput, error) - CreatePolicyRequest(*iam.CreatePolicyInput) (*request.Request, *iam.CreatePolicyOutput) - - CreatePolicyVersion(*iam.CreatePolicyVersionInput) (*iam.CreatePolicyVersionOutput, error) - CreatePolicyVersionWithContext(aws.Context, *iam.CreatePolicyVersionInput, ...request.Option) (*iam.CreatePolicyVersionOutput, error) - CreatePolicyVersionRequest(*iam.CreatePolicyVersionInput) (*request.Request, *iam.CreatePolicyVersionOutput) - - CreateRole(*iam.CreateRoleInput) (*iam.CreateRoleOutput, error) - CreateRoleWithContext(aws.Context, *iam.CreateRoleInput, ...request.Option) (*iam.CreateRoleOutput, error) - CreateRoleRequest(*iam.CreateRoleInput) (*request.Request, *iam.CreateRoleOutput) - - CreateSAMLProvider(*iam.CreateSAMLProviderInput) (*iam.CreateSAMLProviderOutput, error) - CreateSAMLProviderWithContext(aws.Context, *iam.CreateSAMLProviderInput, ...request.Option) (*iam.CreateSAMLProviderOutput, error) - CreateSAMLProviderRequest(*iam.CreateSAMLProviderInput) (*request.Request, *iam.CreateSAMLProviderOutput) - - CreateServiceLinkedRole(*iam.CreateServiceLinkedRoleInput) (*iam.CreateServiceLinkedRoleOutput, error) - CreateServiceLinkedRoleWithContext(aws.Context, *iam.CreateServiceLinkedRoleInput, ...request.Option) (*iam.CreateServiceLinkedRoleOutput, error) - CreateServiceLinkedRoleRequest(*iam.CreateServiceLinkedRoleInput) (*request.Request, *iam.CreateServiceLinkedRoleOutput) - - CreateServiceSpecificCredential(*iam.CreateServiceSpecificCredentialInput) (*iam.CreateServiceSpecificCredentialOutput, error) - CreateServiceSpecificCredentialWithContext(aws.Context, *iam.CreateServiceSpecificCredentialInput, ...request.Option) (*iam.CreateServiceSpecificCredentialOutput, error) - CreateServiceSpecificCredentialRequest(*iam.CreateServiceSpecificCredentialInput) (*request.Request, *iam.CreateServiceSpecificCredentialOutput) - - CreateUser(*iam.CreateUserInput) (*iam.CreateUserOutput, error) - CreateUserWithContext(aws.Context, *iam.CreateUserInput, ...request.Option) (*iam.CreateUserOutput, error) - CreateUserRequest(*iam.CreateUserInput) (*request.Request, *iam.CreateUserOutput) - - CreateVirtualMFADevice(*iam.CreateVirtualMFADeviceInput) (*iam.CreateVirtualMFADeviceOutput, error) - CreateVirtualMFADeviceWithContext(aws.Context, *iam.CreateVirtualMFADeviceInput, ...request.Option) (*iam.CreateVirtualMFADeviceOutput, error) - CreateVirtualMFADeviceRequest(*iam.CreateVirtualMFADeviceInput) (*request.Request, *iam.CreateVirtualMFADeviceOutput) - - DeactivateMFADevice(*iam.DeactivateMFADeviceInput) (*iam.DeactivateMFADeviceOutput, error) - DeactivateMFADeviceWithContext(aws.Context, *iam.DeactivateMFADeviceInput, ...request.Option) (*iam.DeactivateMFADeviceOutput, error) - DeactivateMFADeviceRequest(*iam.DeactivateMFADeviceInput) (*request.Request, *iam.DeactivateMFADeviceOutput) - - DeleteAccessKey(*iam.DeleteAccessKeyInput) (*iam.DeleteAccessKeyOutput, error) - DeleteAccessKeyWithContext(aws.Context, *iam.DeleteAccessKeyInput, ...request.Option) (*iam.DeleteAccessKeyOutput, error) - DeleteAccessKeyRequest(*iam.DeleteAccessKeyInput) (*request.Request, *iam.DeleteAccessKeyOutput) - - DeleteAccountAlias(*iam.DeleteAccountAliasInput) (*iam.DeleteAccountAliasOutput, error) - DeleteAccountAliasWithContext(aws.Context, *iam.DeleteAccountAliasInput, ...request.Option) (*iam.DeleteAccountAliasOutput, error) - DeleteAccountAliasRequest(*iam.DeleteAccountAliasInput) (*request.Request, *iam.DeleteAccountAliasOutput) - - DeleteAccountPasswordPolicy(*iam.DeleteAccountPasswordPolicyInput) (*iam.DeleteAccountPasswordPolicyOutput, error) - DeleteAccountPasswordPolicyWithContext(aws.Context, *iam.DeleteAccountPasswordPolicyInput, ...request.Option) (*iam.DeleteAccountPasswordPolicyOutput, error) - DeleteAccountPasswordPolicyRequest(*iam.DeleteAccountPasswordPolicyInput) (*request.Request, *iam.DeleteAccountPasswordPolicyOutput) - - DeleteGroup(*iam.DeleteGroupInput) (*iam.DeleteGroupOutput, error) - DeleteGroupWithContext(aws.Context, *iam.DeleteGroupInput, ...request.Option) (*iam.DeleteGroupOutput, error) - DeleteGroupRequest(*iam.DeleteGroupInput) (*request.Request, *iam.DeleteGroupOutput) - - DeleteGroupPolicy(*iam.DeleteGroupPolicyInput) (*iam.DeleteGroupPolicyOutput, error) - DeleteGroupPolicyWithContext(aws.Context, *iam.DeleteGroupPolicyInput, ...request.Option) (*iam.DeleteGroupPolicyOutput, error) - DeleteGroupPolicyRequest(*iam.DeleteGroupPolicyInput) (*request.Request, *iam.DeleteGroupPolicyOutput) - - DeleteInstanceProfile(*iam.DeleteInstanceProfileInput) (*iam.DeleteInstanceProfileOutput, error) - DeleteInstanceProfileWithContext(aws.Context, *iam.DeleteInstanceProfileInput, ...request.Option) (*iam.DeleteInstanceProfileOutput, error) - DeleteInstanceProfileRequest(*iam.DeleteInstanceProfileInput) (*request.Request, *iam.DeleteInstanceProfileOutput) - - DeleteLoginProfile(*iam.DeleteLoginProfileInput) (*iam.DeleteLoginProfileOutput, error) - DeleteLoginProfileWithContext(aws.Context, *iam.DeleteLoginProfileInput, ...request.Option) (*iam.DeleteLoginProfileOutput, error) - DeleteLoginProfileRequest(*iam.DeleteLoginProfileInput) (*request.Request, *iam.DeleteLoginProfileOutput) - - DeleteOpenIDConnectProvider(*iam.DeleteOpenIDConnectProviderInput) (*iam.DeleteOpenIDConnectProviderOutput, error) - DeleteOpenIDConnectProviderWithContext(aws.Context, *iam.DeleteOpenIDConnectProviderInput, ...request.Option) (*iam.DeleteOpenIDConnectProviderOutput, error) - DeleteOpenIDConnectProviderRequest(*iam.DeleteOpenIDConnectProviderInput) (*request.Request, *iam.DeleteOpenIDConnectProviderOutput) - - DeletePolicy(*iam.DeletePolicyInput) (*iam.DeletePolicyOutput, error) - DeletePolicyWithContext(aws.Context, *iam.DeletePolicyInput, ...request.Option) (*iam.DeletePolicyOutput, error) - DeletePolicyRequest(*iam.DeletePolicyInput) (*request.Request, *iam.DeletePolicyOutput) - - DeletePolicyVersion(*iam.DeletePolicyVersionInput) (*iam.DeletePolicyVersionOutput, error) - DeletePolicyVersionWithContext(aws.Context, *iam.DeletePolicyVersionInput, ...request.Option) (*iam.DeletePolicyVersionOutput, error) - DeletePolicyVersionRequest(*iam.DeletePolicyVersionInput) (*request.Request, *iam.DeletePolicyVersionOutput) - - DeleteRole(*iam.DeleteRoleInput) (*iam.DeleteRoleOutput, error) - DeleteRoleWithContext(aws.Context, *iam.DeleteRoleInput, ...request.Option) (*iam.DeleteRoleOutput, error) - DeleteRoleRequest(*iam.DeleteRoleInput) (*request.Request, *iam.DeleteRoleOutput) - - DeleteRolePermissionsBoundary(*iam.DeleteRolePermissionsBoundaryInput) (*iam.DeleteRolePermissionsBoundaryOutput, error) - DeleteRolePermissionsBoundaryWithContext(aws.Context, *iam.DeleteRolePermissionsBoundaryInput, ...request.Option) (*iam.DeleteRolePermissionsBoundaryOutput, error) - DeleteRolePermissionsBoundaryRequest(*iam.DeleteRolePermissionsBoundaryInput) (*request.Request, *iam.DeleteRolePermissionsBoundaryOutput) - - DeleteRolePolicy(*iam.DeleteRolePolicyInput) (*iam.DeleteRolePolicyOutput, error) - DeleteRolePolicyWithContext(aws.Context, *iam.DeleteRolePolicyInput, ...request.Option) (*iam.DeleteRolePolicyOutput, error) - DeleteRolePolicyRequest(*iam.DeleteRolePolicyInput) (*request.Request, *iam.DeleteRolePolicyOutput) - - DeleteSAMLProvider(*iam.DeleteSAMLProviderInput) (*iam.DeleteSAMLProviderOutput, error) - DeleteSAMLProviderWithContext(aws.Context, *iam.DeleteSAMLProviderInput, ...request.Option) (*iam.DeleteSAMLProviderOutput, error) - DeleteSAMLProviderRequest(*iam.DeleteSAMLProviderInput) (*request.Request, *iam.DeleteSAMLProviderOutput) - - DeleteSSHPublicKey(*iam.DeleteSSHPublicKeyInput) (*iam.DeleteSSHPublicKeyOutput, error) - DeleteSSHPublicKeyWithContext(aws.Context, *iam.DeleteSSHPublicKeyInput, ...request.Option) (*iam.DeleteSSHPublicKeyOutput, error) - DeleteSSHPublicKeyRequest(*iam.DeleteSSHPublicKeyInput) (*request.Request, *iam.DeleteSSHPublicKeyOutput) - - DeleteServerCertificate(*iam.DeleteServerCertificateInput) (*iam.DeleteServerCertificateOutput, error) - DeleteServerCertificateWithContext(aws.Context, *iam.DeleteServerCertificateInput, ...request.Option) (*iam.DeleteServerCertificateOutput, error) - DeleteServerCertificateRequest(*iam.DeleteServerCertificateInput) (*request.Request, *iam.DeleteServerCertificateOutput) - - DeleteServiceLinkedRole(*iam.DeleteServiceLinkedRoleInput) (*iam.DeleteServiceLinkedRoleOutput, error) - DeleteServiceLinkedRoleWithContext(aws.Context, *iam.DeleteServiceLinkedRoleInput, ...request.Option) (*iam.DeleteServiceLinkedRoleOutput, error) - DeleteServiceLinkedRoleRequest(*iam.DeleteServiceLinkedRoleInput) (*request.Request, *iam.DeleteServiceLinkedRoleOutput) - - DeleteServiceSpecificCredential(*iam.DeleteServiceSpecificCredentialInput) (*iam.DeleteServiceSpecificCredentialOutput, error) - DeleteServiceSpecificCredentialWithContext(aws.Context, *iam.DeleteServiceSpecificCredentialInput, ...request.Option) (*iam.DeleteServiceSpecificCredentialOutput, error) - DeleteServiceSpecificCredentialRequest(*iam.DeleteServiceSpecificCredentialInput) (*request.Request, *iam.DeleteServiceSpecificCredentialOutput) - - DeleteSigningCertificate(*iam.DeleteSigningCertificateInput) (*iam.DeleteSigningCertificateOutput, error) - DeleteSigningCertificateWithContext(aws.Context, *iam.DeleteSigningCertificateInput, ...request.Option) (*iam.DeleteSigningCertificateOutput, error) - DeleteSigningCertificateRequest(*iam.DeleteSigningCertificateInput) (*request.Request, *iam.DeleteSigningCertificateOutput) - - DeleteUser(*iam.DeleteUserInput) (*iam.DeleteUserOutput, error) - DeleteUserWithContext(aws.Context, *iam.DeleteUserInput, ...request.Option) (*iam.DeleteUserOutput, error) - DeleteUserRequest(*iam.DeleteUserInput) (*request.Request, *iam.DeleteUserOutput) - - DeleteUserPermissionsBoundary(*iam.DeleteUserPermissionsBoundaryInput) (*iam.DeleteUserPermissionsBoundaryOutput, error) - DeleteUserPermissionsBoundaryWithContext(aws.Context, *iam.DeleteUserPermissionsBoundaryInput, ...request.Option) (*iam.DeleteUserPermissionsBoundaryOutput, error) - DeleteUserPermissionsBoundaryRequest(*iam.DeleteUserPermissionsBoundaryInput) (*request.Request, *iam.DeleteUserPermissionsBoundaryOutput) - - DeleteUserPolicy(*iam.DeleteUserPolicyInput) (*iam.DeleteUserPolicyOutput, error) - DeleteUserPolicyWithContext(aws.Context, *iam.DeleteUserPolicyInput, ...request.Option) (*iam.DeleteUserPolicyOutput, error) - DeleteUserPolicyRequest(*iam.DeleteUserPolicyInput) (*request.Request, *iam.DeleteUserPolicyOutput) - - DeleteVirtualMFADevice(*iam.DeleteVirtualMFADeviceInput) (*iam.DeleteVirtualMFADeviceOutput, error) - DeleteVirtualMFADeviceWithContext(aws.Context, *iam.DeleteVirtualMFADeviceInput, ...request.Option) (*iam.DeleteVirtualMFADeviceOutput, error) - DeleteVirtualMFADeviceRequest(*iam.DeleteVirtualMFADeviceInput) (*request.Request, *iam.DeleteVirtualMFADeviceOutput) - - DetachGroupPolicy(*iam.DetachGroupPolicyInput) (*iam.DetachGroupPolicyOutput, error) - DetachGroupPolicyWithContext(aws.Context, *iam.DetachGroupPolicyInput, ...request.Option) (*iam.DetachGroupPolicyOutput, error) - DetachGroupPolicyRequest(*iam.DetachGroupPolicyInput) (*request.Request, *iam.DetachGroupPolicyOutput) - - DetachRolePolicy(*iam.DetachRolePolicyInput) (*iam.DetachRolePolicyOutput, error) - DetachRolePolicyWithContext(aws.Context, *iam.DetachRolePolicyInput, ...request.Option) (*iam.DetachRolePolicyOutput, error) - DetachRolePolicyRequest(*iam.DetachRolePolicyInput) (*request.Request, *iam.DetachRolePolicyOutput) - - DetachUserPolicy(*iam.DetachUserPolicyInput) (*iam.DetachUserPolicyOutput, error) - DetachUserPolicyWithContext(aws.Context, *iam.DetachUserPolicyInput, ...request.Option) (*iam.DetachUserPolicyOutput, error) - DetachUserPolicyRequest(*iam.DetachUserPolicyInput) (*request.Request, *iam.DetachUserPolicyOutput) - - EnableMFADevice(*iam.EnableMFADeviceInput) (*iam.EnableMFADeviceOutput, error) - EnableMFADeviceWithContext(aws.Context, *iam.EnableMFADeviceInput, ...request.Option) (*iam.EnableMFADeviceOutput, error) - EnableMFADeviceRequest(*iam.EnableMFADeviceInput) (*request.Request, *iam.EnableMFADeviceOutput) - - GenerateCredentialReport(*iam.GenerateCredentialReportInput) (*iam.GenerateCredentialReportOutput, error) - GenerateCredentialReportWithContext(aws.Context, *iam.GenerateCredentialReportInput, ...request.Option) (*iam.GenerateCredentialReportOutput, error) - GenerateCredentialReportRequest(*iam.GenerateCredentialReportInput) (*request.Request, *iam.GenerateCredentialReportOutput) - - GenerateOrganizationsAccessReport(*iam.GenerateOrganizationsAccessReportInput) (*iam.GenerateOrganizationsAccessReportOutput, error) - GenerateOrganizationsAccessReportWithContext(aws.Context, *iam.GenerateOrganizationsAccessReportInput, ...request.Option) (*iam.GenerateOrganizationsAccessReportOutput, error) - GenerateOrganizationsAccessReportRequest(*iam.GenerateOrganizationsAccessReportInput) (*request.Request, *iam.GenerateOrganizationsAccessReportOutput) - - GenerateServiceLastAccessedDetails(*iam.GenerateServiceLastAccessedDetailsInput) (*iam.GenerateServiceLastAccessedDetailsOutput, error) - GenerateServiceLastAccessedDetailsWithContext(aws.Context, *iam.GenerateServiceLastAccessedDetailsInput, ...request.Option) (*iam.GenerateServiceLastAccessedDetailsOutput, error) - GenerateServiceLastAccessedDetailsRequest(*iam.GenerateServiceLastAccessedDetailsInput) (*request.Request, *iam.GenerateServiceLastAccessedDetailsOutput) - - GetAccessKeyLastUsed(*iam.GetAccessKeyLastUsedInput) (*iam.GetAccessKeyLastUsedOutput, error) - GetAccessKeyLastUsedWithContext(aws.Context, *iam.GetAccessKeyLastUsedInput, ...request.Option) (*iam.GetAccessKeyLastUsedOutput, error) - GetAccessKeyLastUsedRequest(*iam.GetAccessKeyLastUsedInput) (*request.Request, *iam.GetAccessKeyLastUsedOutput) - - GetAccountAuthorizationDetails(*iam.GetAccountAuthorizationDetailsInput) (*iam.GetAccountAuthorizationDetailsOutput, error) - GetAccountAuthorizationDetailsWithContext(aws.Context, *iam.GetAccountAuthorizationDetailsInput, ...request.Option) (*iam.GetAccountAuthorizationDetailsOutput, error) - GetAccountAuthorizationDetailsRequest(*iam.GetAccountAuthorizationDetailsInput) (*request.Request, *iam.GetAccountAuthorizationDetailsOutput) - - GetAccountAuthorizationDetailsPages(*iam.GetAccountAuthorizationDetailsInput, func(*iam.GetAccountAuthorizationDetailsOutput, bool) bool) error - GetAccountAuthorizationDetailsPagesWithContext(aws.Context, *iam.GetAccountAuthorizationDetailsInput, func(*iam.GetAccountAuthorizationDetailsOutput, bool) bool, ...request.Option) error - - GetAccountPasswordPolicy(*iam.GetAccountPasswordPolicyInput) (*iam.GetAccountPasswordPolicyOutput, error) - GetAccountPasswordPolicyWithContext(aws.Context, *iam.GetAccountPasswordPolicyInput, ...request.Option) (*iam.GetAccountPasswordPolicyOutput, error) - GetAccountPasswordPolicyRequest(*iam.GetAccountPasswordPolicyInput) (*request.Request, *iam.GetAccountPasswordPolicyOutput) - - GetAccountSummary(*iam.GetAccountSummaryInput) (*iam.GetAccountSummaryOutput, error) - GetAccountSummaryWithContext(aws.Context, *iam.GetAccountSummaryInput, ...request.Option) (*iam.GetAccountSummaryOutput, error) - GetAccountSummaryRequest(*iam.GetAccountSummaryInput) (*request.Request, *iam.GetAccountSummaryOutput) - - GetContextKeysForCustomPolicy(*iam.GetContextKeysForCustomPolicyInput) (*iam.GetContextKeysForPolicyResponse, error) - GetContextKeysForCustomPolicyWithContext(aws.Context, *iam.GetContextKeysForCustomPolicyInput, ...request.Option) (*iam.GetContextKeysForPolicyResponse, error) - GetContextKeysForCustomPolicyRequest(*iam.GetContextKeysForCustomPolicyInput) (*request.Request, *iam.GetContextKeysForPolicyResponse) - - GetContextKeysForPrincipalPolicy(*iam.GetContextKeysForPrincipalPolicyInput) (*iam.GetContextKeysForPolicyResponse, error) - GetContextKeysForPrincipalPolicyWithContext(aws.Context, *iam.GetContextKeysForPrincipalPolicyInput, ...request.Option) (*iam.GetContextKeysForPolicyResponse, error) - GetContextKeysForPrincipalPolicyRequest(*iam.GetContextKeysForPrincipalPolicyInput) (*request.Request, *iam.GetContextKeysForPolicyResponse) - - GetCredentialReport(*iam.GetCredentialReportInput) (*iam.GetCredentialReportOutput, error) - GetCredentialReportWithContext(aws.Context, *iam.GetCredentialReportInput, ...request.Option) (*iam.GetCredentialReportOutput, error) - GetCredentialReportRequest(*iam.GetCredentialReportInput) (*request.Request, *iam.GetCredentialReportOutput) - - GetGroup(*iam.GetGroupInput) (*iam.GetGroupOutput, error) - GetGroupWithContext(aws.Context, *iam.GetGroupInput, ...request.Option) (*iam.GetGroupOutput, error) - GetGroupRequest(*iam.GetGroupInput) (*request.Request, *iam.GetGroupOutput) - - GetGroupPages(*iam.GetGroupInput, func(*iam.GetGroupOutput, bool) bool) error - GetGroupPagesWithContext(aws.Context, *iam.GetGroupInput, func(*iam.GetGroupOutput, bool) bool, ...request.Option) error - - GetGroupPolicy(*iam.GetGroupPolicyInput) (*iam.GetGroupPolicyOutput, error) - GetGroupPolicyWithContext(aws.Context, *iam.GetGroupPolicyInput, ...request.Option) (*iam.GetGroupPolicyOutput, error) - GetGroupPolicyRequest(*iam.GetGroupPolicyInput) (*request.Request, *iam.GetGroupPolicyOutput) - - GetInstanceProfile(*iam.GetInstanceProfileInput) (*iam.GetInstanceProfileOutput, error) - GetInstanceProfileWithContext(aws.Context, *iam.GetInstanceProfileInput, ...request.Option) (*iam.GetInstanceProfileOutput, error) - GetInstanceProfileRequest(*iam.GetInstanceProfileInput) (*request.Request, *iam.GetInstanceProfileOutput) - - GetLoginProfile(*iam.GetLoginProfileInput) (*iam.GetLoginProfileOutput, error) - GetLoginProfileWithContext(aws.Context, *iam.GetLoginProfileInput, ...request.Option) (*iam.GetLoginProfileOutput, error) - GetLoginProfileRequest(*iam.GetLoginProfileInput) (*request.Request, *iam.GetLoginProfileOutput) - - GetMFADevice(*iam.GetMFADeviceInput) (*iam.GetMFADeviceOutput, error) - GetMFADeviceWithContext(aws.Context, *iam.GetMFADeviceInput, ...request.Option) (*iam.GetMFADeviceOutput, error) - GetMFADeviceRequest(*iam.GetMFADeviceInput) (*request.Request, *iam.GetMFADeviceOutput) - - GetOpenIDConnectProvider(*iam.GetOpenIDConnectProviderInput) (*iam.GetOpenIDConnectProviderOutput, error) - GetOpenIDConnectProviderWithContext(aws.Context, *iam.GetOpenIDConnectProviderInput, ...request.Option) (*iam.GetOpenIDConnectProviderOutput, error) - GetOpenIDConnectProviderRequest(*iam.GetOpenIDConnectProviderInput) (*request.Request, *iam.GetOpenIDConnectProviderOutput) - - GetOrganizationsAccessReport(*iam.GetOrganizationsAccessReportInput) (*iam.GetOrganizationsAccessReportOutput, error) - GetOrganizationsAccessReportWithContext(aws.Context, *iam.GetOrganizationsAccessReportInput, ...request.Option) (*iam.GetOrganizationsAccessReportOutput, error) - GetOrganizationsAccessReportRequest(*iam.GetOrganizationsAccessReportInput) (*request.Request, *iam.GetOrganizationsAccessReportOutput) - - GetPolicy(*iam.GetPolicyInput) (*iam.GetPolicyOutput, error) - GetPolicyWithContext(aws.Context, *iam.GetPolicyInput, ...request.Option) (*iam.GetPolicyOutput, error) - GetPolicyRequest(*iam.GetPolicyInput) (*request.Request, *iam.GetPolicyOutput) - - GetPolicyVersion(*iam.GetPolicyVersionInput) (*iam.GetPolicyVersionOutput, error) - GetPolicyVersionWithContext(aws.Context, *iam.GetPolicyVersionInput, ...request.Option) (*iam.GetPolicyVersionOutput, error) - GetPolicyVersionRequest(*iam.GetPolicyVersionInput) (*request.Request, *iam.GetPolicyVersionOutput) - - GetRole(*iam.GetRoleInput) (*iam.GetRoleOutput, error) - GetRoleWithContext(aws.Context, *iam.GetRoleInput, ...request.Option) (*iam.GetRoleOutput, error) - GetRoleRequest(*iam.GetRoleInput) (*request.Request, *iam.GetRoleOutput) - - GetRolePolicy(*iam.GetRolePolicyInput) (*iam.GetRolePolicyOutput, error) - GetRolePolicyWithContext(aws.Context, *iam.GetRolePolicyInput, ...request.Option) (*iam.GetRolePolicyOutput, error) - GetRolePolicyRequest(*iam.GetRolePolicyInput) (*request.Request, *iam.GetRolePolicyOutput) - - GetSAMLProvider(*iam.GetSAMLProviderInput) (*iam.GetSAMLProviderOutput, error) - GetSAMLProviderWithContext(aws.Context, *iam.GetSAMLProviderInput, ...request.Option) (*iam.GetSAMLProviderOutput, error) - GetSAMLProviderRequest(*iam.GetSAMLProviderInput) (*request.Request, *iam.GetSAMLProviderOutput) - - GetSSHPublicKey(*iam.GetSSHPublicKeyInput) (*iam.GetSSHPublicKeyOutput, error) - GetSSHPublicKeyWithContext(aws.Context, *iam.GetSSHPublicKeyInput, ...request.Option) (*iam.GetSSHPublicKeyOutput, error) - GetSSHPublicKeyRequest(*iam.GetSSHPublicKeyInput) (*request.Request, *iam.GetSSHPublicKeyOutput) - - GetServerCertificate(*iam.GetServerCertificateInput) (*iam.GetServerCertificateOutput, error) - GetServerCertificateWithContext(aws.Context, *iam.GetServerCertificateInput, ...request.Option) (*iam.GetServerCertificateOutput, error) - GetServerCertificateRequest(*iam.GetServerCertificateInput) (*request.Request, *iam.GetServerCertificateOutput) - - GetServiceLastAccessedDetails(*iam.GetServiceLastAccessedDetailsInput) (*iam.GetServiceLastAccessedDetailsOutput, error) - GetServiceLastAccessedDetailsWithContext(aws.Context, *iam.GetServiceLastAccessedDetailsInput, ...request.Option) (*iam.GetServiceLastAccessedDetailsOutput, error) - GetServiceLastAccessedDetailsRequest(*iam.GetServiceLastAccessedDetailsInput) (*request.Request, *iam.GetServiceLastAccessedDetailsOutput) - - GetServiceLastAccessedDetailsWithEntities(*iam.GetServiceLastAccessedDetailsWithEntitiesInput) (*iam.GetServiceLastAccessedDetailsWithEntitiesOutput, error) - GetServiceLastAccessedDetailsWithEntitiesWithContext(aws.Context, *iam.GetServiceLastAccessedDetailsWithEntitiesInput, ...request.Option) (*iam.GetServiceLastAccessedDetailsWithEntitiesOutput, error) - GetServiceLastAccessedDetailsWithEntitiesRequest(*iam.GetServiceLastAccessedDetailsWithEntitiesInput) (*request.Request, *iam.GetServiceLastAccessedDetailsWithEntitiesOutput) - - GetServiceLinkedRoleDeletionStatus(*iam.GetServiceLinkedRoleDeletionStatusInput) (*iam.GetServiceLinkedRoleDeletionStatusOutput, error) - GetServiceLinkedRoleDeletionStatusWithContext(aws.Context, *iam.GetServiceLinkedRoleDeletionStatusInput, ...request.Option) (*iam.GetServiceLinkedRoleDeletionStatusOutput, error) - GetServiceLinkedRoleDeletionStatusRequest(*iam.GetServiceLinkedRoleDeletionStatusInput) (*request.Request, *iam.GetServiceLinkedRoleDeletionStatusOutput) - - GetUser(*iam.GetUserInput) (*iam.GetUserOutput, error) - GetUserWithContext(aws.Context, *iam.GetUserInput, ...request.Option) (*iam.GetUserOutput, error) - GetUserRequest(*iam.GetUserInput) (*request.Request, *iam.GetUserOutput) - - GetUserPolicy(*iam.GetUserPolicyInput) (*iam.GetUserPolicyOutput, error) - GetUserPolicyWithContext(aws.Context, *iam.GetUserPolicyInput, ...request.Option) (*iam.GetUserPolicyOutput, error) - GetUserPolicyRequest(*iam.GetUserPolicyInput) (*request.Request, *iam.GetUserPolicyOutput) - - ListAccessKeys(*iam.ListAccessKeysInput) (*iam.ListAccessKeysOutput, error) - ListAccessKeysWithContext(aws.Context, *iam.ListAccessKeysInput, ...request.Option) (*iam.ListAccessKeysOutput, error) - ListAccessKeysRequest(*iam.ListAccessKeysInput) (*request.Request, *iam.ListAccessKeysOutput) - - ListAccessKeysPages(*iam.ListAccessKeysInput, func(*iam.ListAccessKeysOutput, bool) bool) error - ListAccessKeysPagesWithContext(aws.Context, *iam.ListAccessKeysInput, func(*iam.ListAccessKeysOutput, bool) bool, ...request.Option) error - - ListAccountAliases(*iam.ListAccountAliasesInput) (*iam.ListAccountAliasesOutput, error) - ListAccountAliasesWithContext(aws.Context, *iam.ListAccountAliasesInput, ...request.Option) (*iam.ListAccountAliasesOutput, error) - ListAccountAliasesRequest(*iam.ListAccountAliasesInput) (*request.Request, *iam.ListAccountAliasesOutput) - - ListAccountAliasesPages(*iam.ListAccountAliasesInput, func(*iam.ListAccountAliasesOutput, bool) bool) error - ListAccountAliasesPagesWithContext(aws.Context, *iam.ListAccountAliasesInput, func(*iam.ListAccountAliasesOutput, bool) bool, ...request.Option) error - - ListAttachedGroupPolicies(*iam.ListAttachedGroupPoliciesInput) (*iam.ListAttachedGroupPoliciesOutput, error) - ListAttachedGroupPoliciesWithContext(aws.Context, *iam.ListAttachedGroupPoliciesInput, ...request.Option) (*iam.ListAttachedGroupPoliciesOutput, error) - ListAttachedGroupPoliciesRequest(*iam.ListAttachedGroupPoliciesInput) (*request.Request, *iam.ListAttachedGroupPoliciesOutput) - - ListAttachedGroupPoliciesPages(*iam.ListAttachedGroupPoliciesInput, func(*iam.ListAttachedGroupPoliciesOutput, bool) bool) error - ListAttachedGroupPoliciesPagesWithContext(aws.Context, *iam.ListAttachedGroupPoliciesInput, func(*iam.ListAttachedGroupPoliciesOutput, bool) bool, ...request.Option) error - - ListAttachedRolePolicies(*iam.ListAttachedRolePoliciesInput) (*iam.ListAttachedRolePoliciesOutput, error) - ListAttachedRolePoliciesWithContext(aws.Context, *iam.ListAttachedRolePoliciesInput, ...request.Option) (*iam.ListAttachedRolePoliciesOutput, error) - ListAttachedRolePoliciesRequest(*iam.ListAttachedRolePoliciesInput) (*request.Request, *iam.ListAttachedRolePoliciesOutput) - - ListAttachedRolePoliciesPages(*iam.ListAttachedRolePoliciesInput, func(*iam.ListAttachedRolePoliciesOutput, bool) bool) error - ListAttachedRolePoliciesPagesWithContext(aws.Context, *iam.ListAttachedRolePoliciesInput, func(*iam.ListAttachedRolePoliciesOutput, bool) bool, ...request.Option) error - - ListAttachedUserPolicies(*iam.ListAttachedUserPoliciesInput) (*iam.ListAttachedUserPoliciesOutput, error) - ListAttachedUserPoliciesWithContext(aws.Context, *iam.ListAttachedUserPoliciesInput, ...request.Option) (*iam.ListAttachedUserPoliciesOutput, error) - ListAttachedUserPoliciesRequest(*iam.ListAttachedUserPoliciesInput) (*request.Request, *iam.ListAttachedUserPoliciesOutput) - - ListAttachedUserPoliciesPages(*iam.ListAttachedUserPoliciesInput, func(*iam.ListAttachedUserPoliciesOutput, bool) bool) error - ListAttachedUserPoliciesPagesWithContext(aws.Context, *iam.ListAttachedUserPoliciesInput, func(*iam.ListAttachedUserPoliciesOutput, bool) bool, ...request.Option) error - - ListEntitiesForPolicy(*iam.ListEntitiesForPolicyInput) (*iam.ListEntitiesForPolicyOutput, error) - ListEntitiesForPolicyWithContext(aws.Context, *iam.ListEntitiesForPolicyInput, ...request.Option) (*iam.ListEntitiesForPolicyOutput, error) - ListEntitiesForPolicyRequest(*iam.ListEntitiesForPolicyInput) (*request.Request, *iam.ListEntitiesForPolicyOutput) - - ListEntitiesForPolicyPages(*iam.ListEntitiesForPolicyInput, func(*iam.ListEntitiesForPolicyOutput, bool) bool) error - ListEntitiesForPolicyPagesWithContext(aws.Context, *iam.ListEntitiesForPolicyInput, func(*iam.ListEntitiesForPolicyOutput, bool) bool, ...request.Option) error - - ListGroupPolicies(*iam.ListGroupPoliciesInput) (*iam.ListGroupPoliciesOutput, error) - ListGroupPoliciesWithContext(aws.Context, *iam.ListGroupPoliciesInput, ...request.Option) (*iam.ListGroupPoliciesOutput, error) - ListGroupPoliciesRequest(*iam.ListGroupPoliciesInput) (*request.Request, *iam.ListGroupPoliciesOutput) - - ListGroupPoliciesPages(*iam.ListGroupPoliciesInput, func(*iam.ListGroupPoliciesOutput, bool) bool) error - ListGroupPoliciesPagesWithContext(aws.Context, *iam.ListGroupPoliciesInput, func(*iam.ListGroupPoliciesOutput, bool) bool, ...request.Option) error - - ListGroups(*iam.ListGroupsInput) (*iam.ListGroupsOutput, error) - ListGroupsWithContext(aws.Context, *iam.ListGroupsInput, ...request.Option) (*iam.ListGroupsOutput, error) - ListGroupsRequest(*iam.ListGroupsInput) (*request.Request, *iam.ListGroupsOutput) - - ListGroupsPages(*iam.ListGroupsInput, func(*iam.ListGroupsOutput, bool) bool) error - ListGroupsPagesWithContext(aws.Context, *iam.ListGroupsInput, func(*iam.ListGroupsOutput, bool) bool, ...request.Option) error - - ListGroupsForUser(*iam.ListGroupsForUserInput) (*iam.ListGroupsForUserOutput, error) - ListGroupsForUserWithContext(aws.Context, *iam.ListGroupsForUserInput, ...request.Option) (*iam.ListGroupsForUserOutput, error) - ListGroupsForUserRequest(*iam.ListGroupsForUserInput) (*request.Request, *iam.ListGroupsForUserOutput) - - ListGroupsForUserPages(*iam.ListGroupsForUserInput, func(*iam.ListGroupsForUserOutput, bool) bool) error - ListGroupsForUserPagesWithContext(aws.Context, *iam.ListGroupsForUserInput, func(*iam.ListGroupsForUserOutput, bool) bool, ...request.Option) error - - ListInstanceProfileTags(*iam.ListInstanceProfileTagsInput) (*iam.ListInstanceProfileTagsOutput, error) - ListInstanceProfileTagsWithContext(aws.Context, *iam.ListInstanceProfileTagsInput, ...request.Option) (*iam.ListInstanceProfileTagsOutput, error) - ListInstanceProfileTagsRequest(*iam.ListInstanceProfileTagsInput) (*request.Request, *iam.ListInstanceProfileTagsOutput) - - ListInstanceProfileTagsPages(*iam.ListInstanceProfileTagsInput, func(*iam.ListInstanceProfileTagsOutput, bool) bool) error - ListInstanceProfileTagsPagesWithContext(aws.Context, *iam.ListInstanceProfileTagsInput, func(*iam.ListInstanceProfileTagsOutput, bool) bool, ...request.Option) error - - ListInstanceProfiles(*iam.ListInstanceProfilesInput) (*iam.ListInstanceProfilesOutput, error) - ListInstanceProfilesWithContext(aws.Context, *iam.ListInstanceProfilesInput, ...request.Option) (*iam.ListInstanceProfilesOutput, error) - ListInstanceProfilesRequest(*iam.ListInstanceProfilesInput) (*request.Request, *iam.ListInstanceProfilesOutput) - - ListInstanceProfilesPages(*iam.ListInstanceProfilesInput, func(*iam.ListInstanceProfilesOutput, bool) bool) error - ListInstanceProfilesPagesWithContext(aws.Context, *iam.ListInstanceProfilesInput, func(*iam.ListInstanceProfilesOutput, bool) bool, ...request.Option) error - - ListInstanceProfilesForRole(*iam.ListInstanceProfilesForRoleInput) (*iam.ListInstanceProfilesForRoleOutput, error) - ListInstanceProfilesForRoleWithContext(aws.Context, *iam.ListInstanceProfilesForRoleInput, ...request.Option) (*iam.ListInstanceProfilesForRoleOutput, error) - ListInstanceProfilesForRoleRequest(*iam.ListInstanceProfilesForRoleInput) (*request.Request, *iam.ListInstanceProfilesForRoleOutput) - - ListInstanceProfilesForRolePages(*iam.ListInstanceProfilesForRoleInput, func(*iam.ListInstanceProfilesForRoleOutput, bool) bool) error - ListInstanceProfilesForRolePagesWithContext(aws.Context, *iam.ListInstanceProfilesForRoleInput, func(*iam.ListInstanceProfilesForRoleOutput, bool) bool, ...request.Option) error - - ListMFADeviceTags(*iam.ListMFADeviceTagsInput) (*iam.ListMFADeviceTagsOutput, error) - ListMFADeviceTagsWithContext(aws.Context, *iam.ListMFADeviceTagsInput, ...request.Option) (*iam.ListMFADeviceTagsOutput, error) - ListMFADeviceTagsRequest(*iam.ListMFADeviceTagsInput) (*request.Request, *iam.ListMFADeviceTagsOutput) - - ListMFADeviceTagsPages(*iam.ListMFADeviceTagsInput, func(*iam.ListMFADeviceTagsOutput, bool) bool) error - ListMFADeviceTagsPagesWithContext(aws.Context, *iam.ListMFADeviceTagsInput, func(*iam.ListMFADeviceTagsOutput, bool) bool, ...request.Option) error - - ListMFADevices(*iam.ListMFADevicesInput) (*iam.ListMFADevicesOutput, error) - ListMFADevicesWithContext(aws.Context, *iam.ListMFADevicesInput, ...request.Option) (*iam.ListMFADevicesOutput, error) - ListMFADevicesRequest(*iam.ListMFADevicesInput) (*request.Request, *iam.ListMFADevicesOutput) - - ListMFADevicesPages(*iam.ListMFADevicesInput, func(*iam.ListMFADevicesOutput, bool) bool) error - ListMFADevicesPagesWithContext(aws.Context, *iam.ListMFADevicesInput, func(*iam.ListMFADevicesOutput, bool) bool, ...request.Option) error - - ListOpenIDConnectProviderTags(*iam.ListOpenIDConnectProviderTagsInput) (*iam.ListOpenIDConnectProviderTagsOutput, error) - ListOpenIDConnectProviderTagsWithContext(aws.Context, *iam.ListOpenIDConnectProviderTagsInput, ...request.Option) (*iam.ListOpenIDConnectProviderTagsOutput, error) - ListOpenIDConnectProviderTagsRequest(*iam.ListOpenIDConnectProviderTagsInput) (*request.Request, *iam.ListOpenIDConnectProviderTagsOutput) - - ListOpenIDConnectProviderTagsPages(*iam.ListOpenIDConnectProviderTagsInput, func(*iam.ListOpenIDConnectProviderTagsOutput, bool) bool) error - ListOpenIDConnectProviderTagsPagesWithContext(aws.Context, *iam.ListOpenIDConnectProviderTagsInput, func(*iam.ListOpenIDConnectProviderTagsOutput, bool) bool, ...request.Option) error - - ListOpenIDConnectProviders(*iam.ListOpenIDConnectProvidersInput) (*iam.ListOpenIDConnectProvidersOutput, error) - ListOpenIDConnectProvidersWithContext(aws.Context, *iam.ListOpenIDConnectProvidersInput, ...request.Option) (*iam.ListOpenIDConnectProvidersOutput, error) - ListOpenIDConnectProvidersRequest(*iam.ListOpenIDConnectProvidersInput) (*request.Request, *iam.ListOpenIDConnectProvidersOutput) - - ListPolicies(*iam.ListPoliciesInput) (*iam.ListPoliciesOutput, error) - ListPoliciesWithContext(aws.Context, *iam.ListPoliciesInput, ...request.Option) (*iam.ListPoliciesOutput, error) - ListPoliciesRequest(*iam.ListPoliciesInput) (*request.Request, *iam.ListPoliciesOutput) - - ListPoliciesPages(*iam.ListPoliciesInput, func(*iam.ListPoliciesOutput, bool) bool) error - ListPoliciesPagesWithContext(aws.Context, *iam.ListPoliciesInput, func(*iam.ListPoliciesOutput, bool) bool, ...request.Option) error - - ListPoliciesGrantingServiceAccess(*iam.ListPoliciesGrantingServiceAccessInput) (*iam.ListPoliciesGrantingServiceAccessOutput, error) - ListPoliciesGrantingServiceAccessWithContext(aws.Context, *iam.ListPoliciesGrantingServiceAccessInput, ...request.Option) (*iam.ListPoliciesGrantingServiceAccessOutput, error) - ListPoliciesGrantingServiceAccessRequest(*iam.ListPoliciesGrantingServiceAccessInput) (*request.Request, *iam.ListPoliciesGrantingServiceAccessOutput) - - ListPolicyTags(*iam.ListPolicyTagsInput) (*iam.ListPolicyTagsOutput, error) - ListPolicyTagsWithContext(aws.Context, *iam.ListPolicyTagsInput, ...request.Option) (*iam.ListPolicyTagsOutput, error) - ListPolicyTagsRequest(*iam.ListPolicyTagsInput) (*request.Request, *iam.ListPolicyTagsOutput) - - ListPolicyTagsPages(*iam.ListPolicyTagsInput, func(*iam.ListPolicyTagsOutput, bool) bool) error - ListPolicyTagsPagesWithContext(aws.Context, *iam.ListPolicyTagsInput, func(*iam.ListPolicyTagsOutput, bool) bool, ...request.Option) error - - ListPolicyVersions(*iam.ListPolicyVersionsInput) (*iam.ListPolicyVersionsOutput, error) - ListPolicyVersionsWithContext(aws.Context, *iam.ListPolicyVersionsInput, ...request.Option) (*iam.ListPolicyVersionsOutput, error) - ListPolicyVersionsRequest(*iam.ListPolicyVersionsInput) (*request.Request, *iam.ListPolicyVersionsOutput) - - ListPolicyVersionsPages(*iam.ListPolicyVersionsInput, func(*iam.ListPolicyVersionsOutput, bool) bool) error - ListPolicyVersionsPagesWithContext(aws.Context, *iam.ListPolicyVersionsInput, func(*iam.ListPolicyVersionsOutput, bool) bool, ...request.Option) error - - ListRolePolicies(*iam.ListRolePoliciesInput) (*iam.ListRolePoliciesOutput, error) - ListRolePoliciesWithContext(aws.Context, *iam.ListRolePoliciesInput, ...request.Option) (*iam.ListRolePoliciesOutput, error) - ListRolePoliciesRequest(*iam.ListRolePoliciesInput) (*request.Request, *iam.ListRolePoliciesOutput) - - ListRolePoliciesPages(*iam.ListRolePoliciesInput, func(*iam.ListRolePoliciesOutput, bool) bool) error - ListRolePoliciesPagesWithContext(aws.Context, *iam.ListRolePoliciesInput, func(*iam.ListRolePoliciesOutput, bool) bool, ...request.Option) error - - ListRoleTags(*iam.ListRoleTagsInput) (*iam.ListRoleTagsOutput, error) - ListRoleTagsWithContext(aws.Context, *iam.ListRoleTagsInput, ...request.Option) (*iam.ListRoleTagsOutput, error) - ListRoleTagsRequest(*iam.ListRoleTagsInput) (*request.Request, *iam.ListRoleTagsOutput) - - ListRoleTagsPages(*iam.ListRoleTagsInput, func(*iam.ListRoleTagsOutput, bool) bool) error - ListRoleTagsPagesWithContext(aws.Context, *iam.ListRoleTagsInput, func(*iam.ListRoleTagsOutput, bool) bool, ...request.Option) error - - ListRoles(*iam.ListRolesInput) (*iam.ListRolesOutput, error) - ListRolesWithContext(aws.Context, *iam.ListRolesInput, ...request.Option) (*iam.ListRolesOutput, error) - ListRolesRequest(*iam.ListRolesInput) (*request.Request, *iam.ListRolesOutput) - - ListRolesPages(*iam.ListRolesInput, func(*iam.ListRolesOutput, bool) bool) error - ListRolesPagesWithContext(aws.Context, *iam.ListRolesInput, func(*iam.ListRolesOutput, bool) bool, ...request.Option) error - - ListSAMLProviderTags(*iam.ListSAMLProviderTagsInput) (*iam.ListSAMLProviderTagsOutput, error) - ListSAMLProviderTagsWithContext(aws.Context, *iam.ListSAMLProviderTagsInput, ...request.Option) (*iam.ListSAMLProviderTagsOutput, error) - ListSAMLProviderTagsRequest(*iam.ListSAMLProviderTagsInput) (*request.Request, *iam.ListSAMLProviderTagsOutput) - - ListSAMLProviderTagsPages(*iam.ListSAMLProviderTagsInput, func(*iam.ListSAMLProviderTagsOutput, bool) bool) error - ListSAMLProviderTagsPagesWithContext(aws.Context, *iam.ListSAMLProviderTagsInput, func(*iam.ListSAMLProviderTagsOutput, bool) bool, ...request.Option) error - - ListSAMLProviders(*iam.ListSAMLProvidersInput) (*iam.ListSAMLProvidersOutput, error) - ListSAMLProvidersWithContext(aws.Context, *iam.ListSAMLProvidersInput, ...request.Option) (*iam.ListSAMLProvidersOutput, error) - ListSAMLProvidersRequest(*iam.ListSAMLProvidersInput) (*request.Request, *iam.ListSAMLProvidersOutput) - - ListSSHPublicKeys(*iam.ListSSHPublicKeysInput) (*iam.ListSSHPublicKeysOutput, error) - ListSSHPublicKeysWithContext(aws.Context, *iam.ListSSHPublicKeysInput, ...request.Option) (*iam.ListSSHPublicKeysOutput, error) - ListSSHPublicKeysRequest(*iam.ListSSHPublicKeysInput) (*request.Request, *iam.ListSSHPublicKeysOutput) - - ListSSHPublicKeysPages(*iam.ListSSHPublicKeysInput, func(*iam.ListSSHPublicKeysOutput, bool) bool) error - ListSSHPublicKeysPagesWithContext(aws.Context, *iam.ListSSHPublicKeysInput, func(*iam.ListSSHPublicKeysOutput, bool) bool, ...request.Option) error - - ListServerCertificateTags(*iam.ListServerCertificateTagsInput) (*iam.ListServerCertificateTagsOutput, error) - ListServerCertificateTagsWithContext(aws.Context, *iam.ListServerCertificateTagsInput, ...request.Option) (*iam.ListServerCertificateTagsOutput, error) - ListServerCertificateTagsRequest(*iam.ListServerCertificateTagsInput) (*request.Request, *iam.ListServerCertificateTagsOutput) - - ListServerCertificateTagsPages(*iam.ListServerCertificateTagsInput, func(*iam.ListServerCertificateTagsOutput, bool) bool) error - ListServerCertificateTagsPagesWithContext(aws.Context, *iam.ListServerCertificateTagsInput, func(*iam.ListServerCertificateTagsOutput, bool) bool, ...request.Option) error - - ListServerCertificates(*iam.ListServerCertificatesInput) (*iam.ListServerCertificatesOutput, error) - ListServerCertificatesWithContext(aws.Context, *iam.ListServerCertificatesInput, ...request.Option) (*iam.ListServerCertificatesOutput, error) - ListServerCertificatesRequest(*iam.ListServerCertificatesInput) (*request.Request, *iam.ListServerCertificatesOutput) - - ListServerCertificatesPages(*iam.ListServerCertificatesInput, func(*iam.ListServerCertificatesOutput, bool) bool) error - ListServerCertificatesPagesWithContext(aws.Context, *iam.ListServerCertificatesInput, func(*iam.ListServerCertificatesOutput, bool) bool, ...request.Option) error - - ListServiceSpecificCredentials(*iam.ListServiceSpecificCredentialsInput) (*iam.ListServiceSpecificCredentialsOutput, error) - ListServiceSpecificCredentialsWithContext(aws.Context, *iam.ListServiceSpecificCredentialsInput, ...request.Option) (*iam.ListServiceSpecificCredentialsOutput, error) - ListServiceSpecificCredentialsRequest(*iam.ListServiceSpecificCredentialsInput) (*request.Request, *iam.ListServiceSpecificCredentialsOutput) - - ListSigningCertificates(*iam.ListSigningCertificatesInput) (*iam.ListSigningCertificatesOutput, error) - ListSigningCertificatesWithContext(aws.Context, *iam.ListSigningCertificatesInput, ...request.Option) (*iam.ListSigningCertificatesOutput, error) - ListSigningCertificatesRequest(*iam.ListSigningCertificatesInput) (*request.Request, *iam.ListSigningCertificatesOutput) - - ListSigningCertificatesPages(*iam.ListSigningCertificatesInput, func(*iam.ListSigningCertificatesOutput, bool) bool) error - ListSigningCertificatesPagesWithContext(aws.Context, *iam.ListSigningCertificatesInput, func(*iam.ListSigningCertificatesOutput, bool) bool, ...request.Option) error - - ListUserPolicies(*iam.ListUserPoliciesInput) (*iam.ListUserPoliciesOutput, error) - ListUserPoliciesWithContext(aws.Context, *iam.ListUserPoliciesInput, ...request.Option) (*iam.ListUserPoliciesOutput, error) - ListUserPoliciesRequest(*iam.ListUserPoliciesInput) (*request.Request, *iam.ListUserPoliciesOutput) - - ListUserPoliciesPages(*iam.ListUserPoliciesInput, func(*iam.ListUserPoliciesOutput, bool) bool) error - ListUserPoliciesPagesWithContext(aws.Context, *iam.ListUserPoliciesInput, func(*iam.ListUserPoliciesOutput, bool) bool, ...request.Option) error - - ListUserTags(*iam.ListUserTagsInput) (*iam.ListUserTagsOutput, error) - ListUserTagsWithContext(aws.Context, *iam.ListUserTagsInput, ...request.Option) (*iam.ListUserTagsOutput, error) - ListUserTagsRequest(*iam.ListUserTagsInput) (*request.Request, *iam.ListUserTagsOutput) - - ListUserTagsPages(*iam.ListUserTagsInput, func(*iam.ListUserTagsOutput, bool) bool) error - ListUserTagsPagesWithContext(aws.Context, *iam.ListUserTagsInput, func(*iam.ListUserTagsOutput, bool) bool, ...request.Option) error - - ListUsers(*iam.ListUsersInput) (*iam.ListUsersOutput, error) - ListUsersWithContext(aws.Context, *iam.ListUsersInput, ...request.Option) (*iam.ListUsersOutput, error) - ListUsersRequest(*iam.ListUsersInput) (*request.Request, *iam.ListUsersOutput) - - ListUsersPages(*iam.ListUsersInput, func(*iam.ListUsersOutput, bool) bool) error - ListUsersPagesWithContext(aws.Context, *iam.ListUsersInput, func(*iam.ListUsersOutput, bool) bool, ...request.Option) error - - ListVirtualMFADevices(*iam.ListVirtualMFADevicesInput) (*iam.ListVirtualMFADevicesOutput, error) - ListVirtualMFADevicesWithContext(aws.Context, *iam.ListVirtualMFADevicesInput, ...request.Option) (*iam.ListVirtualMFADevicesOutput, error) - ListVirtualMFADevicesRequest(*iam.ListVirtualMFADevicesInput) (*request.Request, *iam.ListVirtualMFADevicesOutput) - - ListVirtualMFADevicesPages(*iam.ListVirtualMFADevicesInput, func(*iam.ListVirtualMFADevicesOutput, bool) bool) error - ListVirtualMFADevicesPagesWithContext(aws.Context, *iam.ListVirtualMFADevicesInput, func(*iam.ListVirtualMFADevicesOutput, bool) bool, ...request.Option) error - - PutGroupPolicy(*iam.PutGroupPolicyInput) (*iam.PutGroupPolicyOutput, error) - PutGroupPolicyWithContext(aws.Context, *iam.PutGroupPolicyInput, ...request.Option) (*iam.PutGroupPolicyOutput, error) - PutGroupPolicyRequest(*iam.PutGroupPolicyInput) (*request.Request, *iam.PutGroupPolicyOutput) - - PutRolePermissionsBoundary(*iam.PutRolePermissionsBoundaryInput) (*iam.PutRolePermissionsBoundaryOutput, error) - PutRolePermissionsBoundaryWithContext(aws.Context, *iam.PutRolePermissionsBoundaryInput, ...request.Option) (*iam.PutRolePermissionsBoundaryOutput, error) - PutRolePermissionsBoundaryRequest(*iam.PutRolePermissionsBoundaryInput) (*request.Request, *iam.PutRolePermissionsBoundaryOutput) - - PutRolePolicy(*iam.PutRolePolicyInput) (*iam.PutRolePolicyOutput, error) - PutRolePolicyWithContext(aws.Context, *iam.PutRolePolicyInput, ...request.Option) (*iam.PutRolePolicyOutput, error) - PutRolePolicyRequest(*iam.PutRolePolicyInput) (*request.Request, *iam.PutRolePolicyOutput) - - PutUserPermissionsBoundary(*iam.PutUserPermissionsBoundaryInput) (*iam.PutUserPermissionsBoundaryOutput, error) - PutUserPermissionsBoundaryWithContext(aws.Context, *iam.PutUserPermissionsBoundaryInput, ...request.Option) (*iam.PutUserPermissionsBoundaryOutput, error) - PutUserPermissionsBoundaryRequest(*iam.PutUserPermissionsBoundaryInput) (*request.Request, *iam.PutUserPermissionsBoundaryOutput) - - PutUserPolicy(*iam.PutUserPolicyInput) (*iam.PutUserPolicyOutput, error) - PutUserPolicyWithContext(aws.Context, *iam.PutUserPolicyInput, ...request.Option) (*iam.PutUserPolicyOutput, error) - PutUserPolicyRequest(*iam.PutUserPolicyInput) (*request.Request, *iam.PutUserPolicyOutput) - - RemoveClientIDFromOpenIDConnectProvider(*iam.RemoveClientIDFromOpenIDConnectProviderInput) (*iam.RemoveClientIDFromOpenIDConnectProviderOutput, error) - RemoveClientIDFromOpenIDConnectProviderWithContext(aws.Context, *iam.RemoveClientIDFromOpenIDConnectProviderInput, ...request.Option) (*iam.RemoveClientIDFromOpenIDConnectProviderOutput, error) - RemoveClientIDFromOpenIDConnectProviderRequest(*iam.RemoveClientIDFromOpenIDConnectProviderInput) (*request.Request, *iam.RemoveClientIDFromOpenIDConnectProviderOutput) - - RemoveRoleFromInstanceProfile(*iam.RemoveRoleFromInstanceProfileInput) (*iam.RemoveRoleFromInstanceProfileOutput, error) - RemoveRoleFromInstanceProfileWithContext(aws.Context, *iam.RemoveRoleFromInstanceProfileInput, ...request.Option) (*iam.RemoveRoleFromInstanceProfileOutput, error) - RemoveRoleFromInstanceProfileRequest(*iam.RemoveRoleFromInstanceProfileInput) (*request.Request, *iam.RemoveRoleFromInstanceProfileOutput) - - RemoveUserFromGroup(*iam.RemoveUserFromGroupInput) (*iam.RemoveUserFromGroupOutput, error) - RemoveUserFromGroupWithContext(aws.Context, *iam.RemoveUserFromGroupInput, ...request.Option) (*iam.RemoveUserFromGroupOutput, error) - RemoveUserFromGroupRequest(*iam.RemoveUserFromGroupInput) (*request.Request, *iam.RemoveUserFromGroupOutput) - - ResetServiceSpecificCredential(*iam.ResetServiceSpecificCredentialInput) (*iam.ResetServiceSpecificCredentialOutput, error) - ResetServiceSpecificCredentialWithContext(aws.Context, *iam.ResetServiceSpecificCredentialInput, ...request.Option) (*iam.ResetServiceSpecificCredentialOutput, error) - ResetServiceSpecificCredentialRequest(*iam.ResetServiceSpecificCredentialInput) (*request.Request, *iam.ResetServiceSpecificCredentialOutput) - - ResyncMFADevice(*iam.ResyncMFADeviceInput) (*iam.ResyncMFADeviceOutput, error) - ResyncMFADeviceWithContext(aws.Context, *iam.ResyncMFADeviceInput, ...request.Option) (*iam.ResyncMFADeviceOutput, error) - ResyncMFADeviceRequest(*iam.ResyncMFADeviceInput) (*request.Request, *iam.ResyncMFADeviceOutput) - - SetDefaultPolicyVersion(*iam.SetDefaultPolicyVersionInput) (*iam.SetDefaultPolicyVersionOutput, error) - SetDefaultPolicyVersionWithContext(aws.Context, *iam.SetDefaultPolicyVersionInput, ...request.Option) (*iam.SetDefaultPolicyVersionOutput, error) - SetDefaultPolicyVersionRequest(*iam.SetDefaultPolicyVersionInput) (*request.Request, *iam.SetDefaultPolicyVersionOutput) - - SetSecurityTokenServicePreferences(*iam.SetSecurityTokenServicePreferencesInput) (*iam.SetSecurityTokenServicePreferencesOutput, error) - SetSecurityTokenServicePreferencesWithContext(aws.Context, *iam.SetSecurityTokenServicePreferencesInput, ...request.Option) (*iam.SetSecurityTokenServicePreferencesOutput, error) - SetSecurityTokenServicePreferencesRequest(*iam.SetSecurityTokenServicePreferencesInput) (*request.Request, *iam.SetSecurityTokenServicePreferencesOutput) - - SimulateCustomPolicy(*iam.SimulateCustomPolicyInput) (*iam.SimulatePolicyResponse, error) - SimulateCustomPolicyWithContext(aws.Context, *iam.SimulateCustomPolicyInput, ...request.Option) (*iam.SimulatePolicyResponse, error) - SimulateCustomPolicyRequest(*iam.SimulateCustomPolicyInput) (*request.Request, *iam.SimulatePolicyResponse) - - SimulateCustomPolicyPages(*iam.SimulateCustomPolicyInput, func(*iam.SimulatePolicyResponse, bool) bool) error - SimulateCustomPolicyPagesWithContext(aws.Context, *iam.SimulateCustomPolicyInput, func(*iam.SimulatePolicyResponse, bool) bool, ...request.Option) error - - SimulatePrincipalPolicy(*iam.SimulatePrincipalPolicyInput) (*iam.SimulatePolicyResponse, error) - SimulatePrincipalPolicyWithContext(aws.Context, *iam.SimulatePrincipalPolicyInput, ...request.Option) (*iam.SimulatePolicyResponse, error) - SimulatePrincipalPolicyRequest(*iam.SimulatePrincipalPolicyInput) (*request.Request, *iam.SimulatePolicyResponse) - - SimulatePrincipalPolicyPages(*iam.SimulatePrincipalPolicyInput, func(*iam.SimulatePolicyResponse, bool) bool) error - SimulatePrincipalPolicyPagesWithContext(aws.Context, *iam.SimulatePrincipalPolicyInput, func(*iam.SimulatePolicyResponse, bool) bool, ...request.Option) error - - TagInstanceProfile(*iam.TagInstanceProfileInput) (*iam.TagInstanceProfileOutput, error) - TagInstanceProfileWithContext(aws.Context, *iam.TagInstanceProfileInput, ...request.Option) (*iam.TagInstanceProfileOutput, error) - TagInstanceProfileRequest(*iam.TagInstanceProfileInput) (*request.Request, *iam.TagInstanceProfileOutput) - - TagMFADevice(*iam.TagMFADeviceInput) (*iam.TagMFADeviceOutput, error) - TagMFADeviceWithContext(aws.Context, *iam.TagMFADeviceInput, ...request.Option) (*iam.TagMFADeviceOutput, error) - TagMFADeviceRequest(*iam.TagMFADeviceInput) (*request.Request, *iam.TagMFADeviceOutput) - - TagOpenIDConnectProvider(*iam.TagOpenIDConnectProviderInput) (*iam.TagOpenIDConnectProviderOutput, error) - TagOpenIDConnectProviderWithContext(aws.Context, *iam.TagOpenIDConnectProviderInput, ...request.Option) (*iam.TagOpenIDConnectProviderOutput, error) - TagOpenIDConnectProviderRequest(*iam.TagOpenIDConnectProviderInput) (*request.Request, *iam.TagOpenIDConnectProviderOutput) - - TagPolicy(*iam.TagPolicyInput) (*iam.TagPolicyOutput, error) - TagPolicyWithContext(aws.Context, *iam.TagPolicyInput, ...request.Option) (*iam.TagPolicyOutput, error) - TagPolicyRequest(*iam.TagPolicyInput) (*request.Request, *iam.TagPolicyOutput) - - TagRole(*iam.TagRoleInput) (*iam.TagRoleOutput, error) - TagRoleWithContext(aws.Context, *iam.TagRoleInput, ...request.Option) (*iam.TagRoleOutput, error) - TagRoleRequest(*iam.TagRoleInput) (*request.Request, *iam.TagRoleOutput) - - TagSAMLProvider(*iam.TagSAMLProviderInput) (*iam.TagSAMLProviderOutput, error) - TagSAMLProviderWithContext(aws.Context, *iam.TagSAMLProviderInput, ...request.Option) (*iam.TagSAMLProviderOutput, error) - TagSAMLProviderRequest(*iam.TagSAMLProviderInput) (*request.Request, *iam.TagSAMLProviderOutput) - - TagServerCertificate(*iam.TagServerCertificateInput) (*iam.TagServerCertificateOutput, error) - TagServerCertificateWithContext(aws.Context, *iam.TagServerCertificateInput, ...request.Option) (*iam.TagServerCertificateOutput, error) - TagServerCertificateRequest(*iam.TagServerCertificateInput) (*request.Request, *iam.TagServerCertificateOutput) - - TagUser(*iam.TagUserInput) (*iam.TagUserOutput, error) - TagUserWithContext(aws.Context, *iam.TagUserInput, ...request.Option) (*iam.TagUserOutput, error) - TagUserRequest(*iam.TagUserInput) (*request.Request, *iam.TagUserOutput) - - UntagInstanceProfile(*iam.UntagInstanceProfileInput) (*iam.UntagInstanceProfileOutput, error) - UntagInstanceProfileWithContext(aws.Context, *iam.UntagInstanceProfileInput, ...request.Option) (*iam.UntagInstanceProfileOutput, error) - UntagInstanceProfileRequest(*iam.UntagInstanceProfileInput) (*request.Request, *iam.UntagInstanceProfileOutput) - - UntagMFADevice(*iam.UntagMFADeviceInput) (*iam.UntagMFADeviceOutput, error) - UntagMFADeviceWithContext(aws.Context, *iam.UntagMFADeviceInput, ...request.Option) (*iam.UntagMFADeviceOutput, error) - UntagMFADeviceRequest(*iam.UntagMFADeviceInput) (*request.Request, *iam.UntagMFADeviceOutput) - - UntagOpenIDConnectProvider(*iam.UntagOpenIDConnectProviderInput) (*iam.UntagOpenIDConnectProviderOutput, error) - UntagOpenIDConnectProviderWithContext(aws.Context, *iam.UntagOpenIDConnectProviderInput, ...request.Option) (*iam.UntagOpenIDConnectProviderOutput, error) - UntagOpenIDConnectProviderRequest(*iam.UntagOpenIDConnectProviderInput) (*request.Request, *iam.UntagOpenIDConnectProviderOutput) - - UntagPolicy(*iam.UntagPolicyInput) (*iam.UntagPolicyOutput, error) - UntagPolicyWithContext(aws.Context, *iam.UntagPolicyInput, ...request.Option) (*iam.UntagPolicyOutput, error) - UntagPolicyRequest(*iam.UntagPolicyInput) (*request.Request, *iam.UntagPolicyOutput) - - UntagRole(*iam.UntagRoleInput) (*iam.UntagRoleOutput, error) - UntagRoleWithContext(aws.Context, *iam.UntagRoleInput, ...request.Option) (*iam.UntagRoleOutput, error) - UntagRoleRequest(*iam.UntagRoleInput) (*request.Request, *iam.UntagRoleOutput) - - UntagSAMLProvider(*iam.UntagSAMLProviderInput) (*iam.UntagSAMLProviderOutput, error) - UntagSAMLProviderWithContext(aws.Context, *iam.UntagSAMLProviderInput, ...request.Option) (*iam.UntagSAMLProviderOutput, error) - UntagSAMLProviderRequest(*iam.UntagSAMLProviderInput) (*request.Request, *iam.UntagSAMLProviderOutput) - - UntagServerCertificate(*iam.UntagServerCertificateInput) (*iam.UntagServerCertificateOutput, error) - UntagServerCertificateWithContext(aws.Context, *iam.UntagServerCertificateInput, ...request.Option) (*iam.UntagServerCertificateOutput, error) - UntagServerCertificateRequest(*iam.UntagServerCertificateInput) (*request.Request, *iam.UntagServerCertificateOutput) - - UntagUser(*iam.UntagUserInput) (*iam.UntagUserOutput, error) - UntagUserWithContext(aws.Context, *iam.UntagUserInput, ...request.Option) (*iam.UntagUserOutput, error) - UntagUserRequest(*iam.UntagUserInput) (*request.Request, *iam.UntagUserOutput) - - UpdateAccessKey(*iam.UpdateAccessKeyInput) (*iam.UpdateAccessKeyOutput, error) - UpdateAccessKeyWithContext(aws.Context, *iam.UpdateAccessKeyInput, ...request.Option) (*iam.UpdateAccessKeyOutput, error) - UpdateAccessKeyRequest(*iam.UpdateAccessKeyInput) (*request.Request, *iam.UpdateAccessKeyOutput) - - UpdateAccountPasswordPolicy(*iam.UpdateAccountPasswordPolicyInput) (*iam.UpdateAccountPasswordPolicyOutput, error) - UpdateAccountPasswordPolicyWithContext(aws.Context, *iam.UpdateAccountPasswordPolicyInput, ...request.Option) (*iam.UpdateAccountPasswordPolicyOutput, error) - UpdateAccountPasswordPolicyRequest(*iam.UpdateAccountPasswordPolicyInput) (*request.Request, *iam.UpdateAccountPasswordPolicyOutput) - - UpdateAssumeRolePolicy(*iam.UpdateAssumeRolePolicyInput) (*iam.UpdateAssumeRolePolicyOutput, error) - UpdateAssumeRolePolicyWithContext(aws.Context, *iam.UpdateAssumeRolePolicyInput, ...request.Option) (*iam.UpdateAssumeRolePolicyOutput, error) - UpdateAssumeRolePolicyRequest(*iam.UpdateAssumeRolePolicyInput) (*request.Request, *iam.UpdateAssumeRolePolicyOutput) - - UpdateGroup(*iam.UpdateGroupInput) (*iam.UpdateGroupOutput, error) - UpdateGroupWithContext(aws.Context, *iam.UpdateGroupInput, ...request.Option) (*iam.UpdateGroupOutput, error) - UpdateGroupRequest(*iam.UpdateGroupInput) (*request.Request, *iam.UpdateGroupOutput) - - UpdateLoginProfile(*iam.UpdateLoginProfileInput) (*iam.UpdateLoginProfileOutput, error) - UpdateLoginProfileWithContext(aws.Context, *iam.UpdateLoginProfileInput, ...request.Option) (*iam.UpdateLoginProfileOutput, error) - UpdateLoginProfileRequest(*iam.UpdateLoginProfileInput) (*request.Request, *iam.UpdateLoginProfileOutput) - - UpdateOpenIDConnectProviderThumbprint(*iam.UpdateOpenIDConnectProviderThumbprintInput) (*iam.UpdateOpenIDConnectProviderThumbprintOutput, error) - UpdateOpenIDConnectProviderThumbprintWithContext(aws.Context, *iam.UpdateOpenIDConnectProviderThumbprintInput, ...request.Option) (*iam.UpdateOpenIDConnectProviderThumbprintOutput, error) - UpdateOpenIDConnectProviderThumbprintRequest(*iam.UpdateOpenIDConnectProviderThumbprintInput) (*request.Request, *iam.UpdateOpenIDConnectProviderThumbprintOutput) - - UpdateRole(*iam.UpdateRoleInput) (*iam.UpdateRoleOutput, error) - UpdateRoleWithContext(aws.Context, *iam.UpdateRoleInput, ...request.Option) (*iam.UpdateRoleOutput, error) - UpdateRoleRequest(*iam.UpdateRoleInput) (*request.Request, *iam.UpdateRoleOutput) - - UpdateRoleDescription(*iam.UpdateRoleDescriptionInput) (*iam.UpdateRoleDescriptionOutput, error) - UpdateRoleDescriptionWithContext(aws.Context, *iam.UpdateRoleDescriptionInput, ...request.Option) (*iam.UpdateRoleDescriptionOutput, error) - UpdateRoleDescriptionRequest(*iam.UpdateRoleDescriptionInput) (*request.Request, *iam.UpdateRoleDescriptionOutput) - - UpdateSAMLProvider(*iam.UpdateSAMLProviderInput) (*iam.UpdateSAMLProviderOutput, error) - UpdateSAMLProviderWithContext(aws.Context, *iam.UpdateSAMLProviderInput, ...request.Option) (*iam.UpdateSAMLProviderOutput, error) - UpdateSAMLProviderRequest(*iam.UpdateSAMLProviderInput) (*request.Request, *iam.UpdateSAMLProviderOutput) - - UpdateSSHPublicKey(*iam.UpdateSSHPublicKeyInput) (*iam.UpdateSSHPublicKeyOutput, error) - UpdateSSHPublicKeyWithContext(aws.Context, *iam.UpdateSSHPublicKeyInput, ...request.Option) (*iam.UpdateSSHPublicKeyOutput, error) - UpdateSSHPublicKeyRequest(*iam.UpdateSSHPublicKeyInput) (*request.Request, *iam.UpdateSSHPublicKeyOutput) - - UpdateServerCertificate(*iam.UpdateServerCertificateInput) (*iam.UpdateServerCertificateOutput, error) - UpdateServerCertificateWithContext(aws.Context, *iam.UpdateServerCertificateInput, ...request.Option) (*iam.UpdateServerCertificateOutput, error) - UpdateServerCertificateRequest(*iam.UpdateServerCertificateInput) (*request.Request, *iam.UpdateServerCertificateOutput) - - UpdateServiceSpecificCredential(*iam.UpdateServiceSpecificCredentialInput) (*iam.UpdateServiceSpecificCredentialOutput, error) - UpdateServiceSpecificCredentialWithContext(aws.Context, *iam.UpdateServiceSpecificCredentialInput, ...request.Option) (*iam.UpdateServiceSpecificCredentialOutput, error) - UpdateServiceSpecificCredentialRequest(*iam.UpdateServiceSpecificCredentialInput) (*request.Request, *iam.UpdateServiceSpecificCredentialOutput) - - UpdateSigningCertificate(*iam.UpdateSigningCertificateInput) (*iam.UpdateSigningCertificateOutput, error) - UpdateSigningCertificateWithContext(aws.Context, *iam.UpdateSigningCertificateInput, ...request.Option) (*iam.UpdateSigningCertificateOutput, error) - UpdateSigningCertificateRequest(*iam.UpdateSigningCertificateInput) (*request.Request, *iam.UpdateSigningCertificateOutput) - - UpdateUser(*iam.UpdateUserInput) (*iam.UpdateUserOutput, error) - UpdateUserWithContext(aws.Context, *iam.UpdateUserInput, ...request.Option) (*iam.UpdateUserOutput, error) - UpdateUserRequest(*iam.UpdateUserInput) (*request.Request, *iam.UpdateUserOutput) - - UploadSSHPublicKey(*iam.UploadSSHPublicKeyInput) (*iam.UploadSSHPublicKeyOutput, error) - UploadSSHPublicKeyWithContext(aws.Context, *iam.UploadSSHPublicKeyInput, ...request.Option) (*iam.UploadSSHPublicKeyOutput, error) - UploadSSHPublicKeyRequest(*iam.UploadSSHPublicKeyInput) (*request.Request, *iam.UploadSSHPublicKeyOutput) - - UploadServerCertificate(*iam.UploadServerCertificateInput) (*iam.UploadServerCertificateOutput, error) - UploadServerCertificateWithContext(aws.Context, *iam.UploadServerCertificateInput, ...request.Option) (*iam.UploadServerCertificateOutput, error) - UploadServerCertificateRequest(*iam.UploadServerCertificateInput) (*request.Request, *iam.UploadServerCertificateOutput) - - UploadSigningCertificate(*iam.UploadSigningCertificateInput) (*iam.UploadSigningCertificateOutput, error) - UploadSigningCertificateWithContext(aws.Context, *iam.UploadSigningCertificateInput, ...request.Option) (*iam.UploadSigningCertificateOutput, error) - UploadSigningCertificateRequest(*iam.UploadSigningCertificateInput) (*request.Request, *iam.UploadSigningCertificateOutput) - - WaitUntilInstanceProfileExists(*iam.GetInstanceProfileInput) error - WaitUntilInstanceProfileExistsWithContext(aws.Context, *iam.GetInstanceProfileInput, ...request.WaiterOption) error - - WaitUntilPolicyExists(*iam.GetPolicyInput) error - WaitUntilPolicyExistsWithContext(aws.Context, *iam.GetPolicyInput, ...request.WaiterOption) error - - WaitUntilRoleExists(*iam.GetRoleInput) error - WaitUntilRoleExistsWithContext(aws.Context, *iam.GetRoleInput, ...request.WaiterOption) error - - WaitUntilUserExists(*iam.GetUserInput) error - WaitUntilUserExistsWithContext(aws.Context, *iam.GetUserInput, ...request.WaiterOption) error -} - -var _ IAMAPI = (*iam.IAM)(nil) diff --git a/vendor/github.com/aws/aws-sdk-go/service/iam/service.go b/vendor/github.com/aws/aws-sdk-go/service/iam/service.go deleted file mode 100644 index e4f49a9b8c..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/iam/service.go +++ /dev/null @@ -1,104 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package iam - -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" -) - -// IAM provides the API operation methods for making requests to -// AWS Identity and Access Management. See this package's package overview docs -// for details on the service. -// -// IAM methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type IAM 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 = "iam" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "IAM" // ServiceID is a unique identifier of a specific service. -) - -// New creates a new instance of the IAM 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 IAM client from just a session. -// svc := iam.New(mySession) -// -// // Create a IAM client with additional configuration -// svc := iam.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *IAM { - 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) *IAM { - svc := &IAM{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - PartitionID: partitionID, - Endpoint: endpoint, - APIVersion: "2010-05-08", - 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 IAM operation and runs any -// custom request initialization. -func (c *IAM) 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/iam/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/iam/waiters.go deleted file mode 100644 index 4331ba37b9..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/iam/waiters.go +++ /dev/null @@ -1,214 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package iam - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilInstanceProfileExists uses the IAM API operation -// GetInstanceProfile 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 *IAM) WaitUntilInstanceProfileExists(input *GetInstanceProfileInput) error { - return c.WaitUntilInstanceProfileExistsWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilInstanceProfileExistsWithContext is an extended version of WaitUntilInstanceProfileExists. -// 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 *IAM) WaitUntilInstanceProfileExistsWithContext(ctx aws.Context, input *GetInstanceProfileInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilInstanceProfileExists", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(1 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.StatusWaiterMatch, - Expected: 200, - }, - { - State: request.RetryWaiterState, - Matcher: request.StatusWaiterMatch, - Expected: 404, - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *GetInstanceProfileInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetInstanceProfileRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilPolicyExists uses the IAM API operation -// GetPolicy 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 *IAM) WaitUntilPolicyExists(input *GetPolicyInput) error { - return c.WaitUntilPolicyExistsWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilPolicyExistsWithContext is an extended version of WaitUntilPolicyExists. -// 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 *IAM) WaitUntilPolicyExistsWithContext(ctx aws.Context, input *GetPolicyInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilPolicyExists", - MaxAttempts: 20, - Delay: request.ConstantWaiterDelay(1 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.StatusWaiterMatch, - Expected: 200, - }, - { - State: request.RetryWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "NoSuchEntity", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *GetPolicyInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetPolicyRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilRoleExists uses the IAM API operation -// GetRole 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 *IAM) WaitUntilRoleExists(input *GetRoleInput) error { - return c.WaitUntilRoleExistsWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilRoleExistsWithContext is an extended version of WaitUntilRoleExists. -// 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 *IAM) WaitUntilRoleExistsWithContext(ctx aws.Context, input *GetRoleInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilRoleExists", - MaxAttempts: 20, - Delay: request.ConstantWaiterDelay(1 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.StatusWaiterMatch, - Expected: 200, - }, - { - State: request.RetryWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "NoSuchEntity", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *GetRoleInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetRoleRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilUserExists uses the IAM API operation -// GetUser 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 *IAM) WaitUntilUserExists(input *GetUserInput) error { - return c.WaitUntilUserExistsWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilUserExistsWithContext is an extended version of WaitUntilUserExists. -// 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 *IAM) WaitUntilUserExistsWithContext(ctx aws.Context, input *GetUserInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilUserExists", - MaxAttempts: 20, - Delay: request.ConstantWaiterDelay(1 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.StatusWaiterMatch, - Expected: 200, - }, - { - State: request.RetryWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "NoSuchEntity", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *GetUserInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetUserRequest(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/s3/api.go b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go deleted file mode 100644 index f1fa8dcf0c..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go +++ /dev/null @@ -1,45973 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package s3 - -import ( - "bytes" - "fmt" - "io" - "sync" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/internal/s3shared/arn" - "github.com/aws/aws-sdk-go/private/checksum" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/eventstream" - "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi" - "github.com/aws/aws-sdk-go/private/protocol/rest" - "github.com/aws/aws-sdk-go/private/protocol/restxml" -) - -const opAbortMultipartUpload = "AbortMultipartUpload" - -// AbortMultipartUploadRequest generates a "aws/request.Request" representing the -// client's request for the AbortMultipartUpload 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 AbortMultipartUpload for more information on using the AbortMultipartUpload -// 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 AbortMultipartUploadRequest method. -// req, resp := client.AbortMultipartUploadRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload -func (c *S3) AbortMultipartUploadRequest(input *AbortMultipartUploadInput) (req *request.Request, output *AbortMultipartUploadOutput) { - op := &request.Operation{ - Name: opAbortMultipartUpload, - HTTPMethod: "DELETE", - HTTPPath: "/{Bucket}/{Key+}", - } - - if input == nil { - input = &AbortMultipartUploadInput{} - } - - output = &AbortMultipartUploadOutput{} - req = c.newRequest(op, input, output) - return -} - -// AbortMultipartUpload API operation for Amazon Simple Storage Service. -// -// This operation aborts a multipart upload. After a multipart upload is aborted, -// no additional parts can be uploaded using that upload ID. The storage consumed -// by any previously uploaded parts will be freed. However, if any part uploads -// are currently in progress, those part uploads might or might not succeed. -// As a result, it might be necessary to abort a given multipart upload multiple -// times in order to completely free all storage consumed by all parts. -// -// To verify that all parts have been removed and prevent getting charged for -// the part storage, you should call the ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html) -// API operation and ensure that the parts list is empty. -// -// Directory buckets - For directory buckets, you must make requests for this -// API operation to the Zonal endpoint. These endpoints support virtual-hosted-style -// requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name -// . Path-style requests are not supported. For more information, see Regional -// and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html) -// in the Amazon S3 User Guide. -// -// Permissions -// -// - General purpose bucket permissions - For information about permissions -// required to use the multipart upload, see Multipart Upload and Permissions -// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html) -// in the Amazon S3 User Guide. -// -// - Directory bucket permissions - To grant access to this API operation -// on a directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html) -// API operation for session-based authorization. Specifically, you grant -// the s3express:CreateSession permission to the directory bucket in a bucket -// policy or an IAM identity-based policy. Then, you make the CreateSession -// API call on the bucket to obtain a session token. With the session token -// in your request header, you can make API requests to this operation. After -// the session token expires, you make another CreateSession API call to -// generate a new session token for use. Amazon Web Services CLI or SDKs -// create session and refresh the session token automatically to avoid service -// interruptions when a session expires. For more information about authorization, -// see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html). -// -// # HTTP Host header syntax -// -// Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. -// -// The following operations are related to AbortMultipartUpload: -// -// - CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html) -// -// - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) -// -// - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html) -// -// - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html) -// -// - ListMultipartUploads (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.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 Simple Storage Service's -// API operation AbortMultipartUpload for usage and error information. -// -// Returned Error Codes: -// - ErrCodeNoSuchUpload "NoSuchUpload" -// The specified multipart upload does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload -func (c *S3) AbortMultipartUpload(input *AbortMultipartUploadInput) (*AbortMultipartUploadOutput, error) { - req, out := c.AbortMultipartUploadRequest(input) - return out, req.Send() -} - -// AbortMultipartUploadWithContext is the same as AbortMultipartUpload with the addition of -// the ability to pass a context and additional request options. -// -// See AbortMultipartUpload 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 *S3) AbortMultipartUploadWithContext(ctx aws.Context, input *AbortMultipartUploadInput, opts ...request.Option) (*AbortMultipartUploadOutput, error) { - req, out := c.AbortMultipartUploadRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCompleteMultipartUpload = "CompleteMultipartUpload" - -// CompleteMultipartUploadRequest generates a "aws/request.Request" representing the -// client's request for the CompleteMultipartUpload 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 CompleteMultipartUpload for more information on using the CompleteMultipartUpload -// 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 CompleteMultipartUploadRequest method. -// req, resp := client.CompleteMultipartUploadRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload -func (c *S3) CompleteMultipartUploadRequest(input *CompleteMultipartUploadInput) (req *request.Request, output *CompleteMultipartUploadOutput) { - op := &request.Operation{ - Name: opCompleteMultipartUpload, - HTTPMethod: "POST", - HTTPPath: "/{Bucket}/{Key+}", - } - - if input == nil { - input = &CompleteMultipartUploadInput{} - } - - output = &CompleteMultipartUploadOutput{} - req = c.newRequest(op, input, output) - return -} - -// CompleteMultipartUpload API operation for Amazon Simple Storage Service. -// -// Completes a multipart upload by assembling previously uploaded parts. -// -// You first initiate the multipart upload and then upload all parts using the -// UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) -// operation or the UploadPartCopy (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html) -// operation. After successfully uploading all relevant parts of an upload, -// you call this CompleteMultipartUpload operation to complete the upload. Upon -// receiving this request, Amazon S3 concatenates all the parts in ascending -// order by part number to create a new object. In the CompleteMultipartUpload -// request, you must provide the parts list and ensure that the parts list is -// complete. The CompleteMultipartUpload API operation concatenates the parts -// that you provide in the list. For each part in the list, you must provide -// the PartNumber value and the ETag value that are returned after that part -// was uploaded. -// -// The processing of a CompleteMultipartUpload request could take several minutes -// to finalize. After Amazon S3 begins processing the request, it sends an HTTP -// response header that specifies a 200 OK response. While processing is in -// progress, Amazon S3 periodically sends white space characters to keep the -// connection from timing out. A request could fail after the initial 200 OK -// response has been sent. This means that a 200 OK response can contain either -// a success or an error. The error response might be embedded in the 200 OK -// response. If you call this API operation directly, make sure to design your -// application to parse the contents of the response and handle it appropriately. -// If you use Amazon Web Services SDKs, SDKs handle this condition. The SDKs -// detect the embedded error and apply error handling per your configuration -// settings (including automatically retrying the request as appropriate). If -// the condition persists, the SDKs throw an exception (or, for the SDKs that -// don't use exceptions, they return an error). -// -// Note that if CompleteMultipartUpload fails, applications should be prepared -// to retry any failed requests (including 500 error responses). For more information, -// see Amazon S3 Error Best Practices (https://docs.aws.amazon.com/AmazonS3/latest/dev/ErrorBestPractices.html). -// -// You can't use Content-Type: application/x-www-form-urlencoded for the CompleteMultipartUpload -// requests. Also, if you don't provide a Content-Type header, CompleteMultipartUpload -// can still return a 200 OK response. -// -// For more information about multipart uploads, see Uploading Objects Using -// Multipart Upload (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html) -// in the Amazon S3 User Guide. -// -// Directory buckets - For directory buckets, you must make requests for this -// API operation to the Zonal endpoint. These endpoints support virtual-hosted-style -// requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name -// . Path-style requests are not supported. For more information, see Regional -// and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html) -// in the Amazon S3 User Guide. -// -// Permissions -// -// - General purpose bucket permissions - For information about permissions -// required to use the multipart upload API, see Multipart Upload and Permissions -// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html) -// in the Amazon S3 User Guide. -// -// - Directory bucket permissions - To grant access to this API operation -// on a directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html) -// API operation for session-based authorization. Specifically, you grant -// the s3express:CreateSession permission to the directory bucket in a bucket -// policy or an IAM identity-based policy. Then, you make the CreateSession -// API call on the bucket to obtain a session token. With the session token -// in your request header, you can make API requests to this operation. After -// the session token expires, you make another CreateSession API call to -// generate a new session token for use. Amazon Web Services CLI or SDKs -// create session and refresh the session token automatically to avoid service -// interruptions when a session expires. For more information about authorization, -// see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html). -// -// Special errors -// -// - Error Code: EntityTooSmall Description: Your proposed upload is smaller -// than the minimum allowed object size. Each part must be at least 5 MB -// in size, except the last part. HTTP Status Code: 400 Bad Request -// -// - Error Code: InvalidPart Description: One or more of the specified parts -// could not be found. The part might not have been uploaded, or the specified -// ETag might not have matched the uploaded part's ETag. HTTP Status Code: -// 400 Bad Request -// -// - Error Code: InvalidPartOrder Description: The list of parts was not -// in ascending order. The parts list must be specified in order by part -// number. HTTP Status Code: 400 Bad Request -// -// - Error Code: NoSuchUpload Description: The specified multipart upload -// does not exist. The upload ID might be invalid, or the multipart upload -// might have been aborted or completed. HTTP Status Code: 404 Not Found -// -// # HTTP Host header syntax -// -// Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. -// -// The following operations are related to CompleteMultipartUpload: -// -// - CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html) -// -// - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) -// -// - AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html) -// -// - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html) -// -// - ListMultipartUploads (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.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 Simple Storage Service's -// API operation CompleteMultipartUpload for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload -func (c *S3) CompleteMultipartUpload(input *CompleteMultipartUploadInput) (*CompleteMultipartUploadOutput, error) { - req, out := c.CompleteMultipartUploadRequest(input) - return out, req.Send() -} - -// CompleteMultipartUploadWithContext is the same as CompleteMultipartUpload with the addition of -// the ability to pass a context and additional request options. -// -// See CompleteMultipartUpload 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 *S3) CompleteMultipartUploadWithContext(ctx aws.Context, input *CompleteMultipartUploadInput, opts ...request.Option) (*CompleteMultipartUploadOutput, error) { - req, out := c.CompleteMultipartUploadRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCopyObject = "CopyObject" - -// CopyObjectRequest generates a "aws/request.Request" representing the -// client's request for the CopyObject 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 CopyObject for more information on using the CopyObject -// 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 CopyObjectRequest method. -// req, resp := client.CopyObjectRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject -func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, output *CopyObjectOutput) { - op := &request.Operation{ - Name: opCopyObject, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}/{Key+}", - } - - if input == nil { - input = &CopyObjectInput{} - } - - output = &CopyObjectOutput{} - req = c.newRequest(op, input, output) - return -} - -// CopyObject API operation for Amazon Simple Storage Service. -// -// Creates a copy of an object that is already stored in Amazon S3. -// -// You can store individual objects of up to 5 TB in Amazon S3. You create a -// copy of your object up to 5 GB in size in a single atomic action using this -// API. However, to copy an object greater than 5 GB, you must use the multipart -// upload Upload Part - Copy (UploadPartCopy) API. For more information, see -// Copy Object Using the REST Multipart Upload API (https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjctsUsingRESTMPUapi.html). -// -// You can copy individual objects between general purpose buckets, between -// directory buckets, and between general purpose buckets and directory buckets. -// -// Directory buckets - For directory buckets, you must make requests for this -// API operation to the Zonal endpoint. These endpoints support virtual-hosted-style -// requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name -// . Path-style requests are not supported. For more information, see Regional -// and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html) -// in the Amazon S3 User Guide. -// -// Both the Region that you want to copy the object from and the Region that -// you want to copy the object to must be enabled for your account. For more -// information about how to enable a Region for your account, see Enable or -// disable a Region for standalone accounts (https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-regions.html#manage-acct-regions-enable-standalone) -// in the Amazon Web Services Account Management Guide. -// -// Amazon S3 transfer acceleration does not support cross-Region copies. If -// you request a cross-Region copy using a transfer acceleration endpoint, you -// get a 400 Bad Request error. For more information, see Transfer Acceleration -// (https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html). -// -// # Authentication and authorization -// -// All CopyObject requests must be authenticated and signed by using IAM credentials -// (access key ID and secret access key for the IAM identities). All headers -// with the x-amz- prefix, including x-amz-copy-source, must be signed. For -// more information, see REST Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html). -// -// Directory buckets - You must use the IAM credentials to authenticate and -// authorize your access to the CopyObject API operation, instead of using the -// temporary security credentials through the CreateSession API operation. -// -// Amazon Web Services CLI or SDKs handles authentication and authorization -// on your behalf. -// -// # Permissions -// -// You must have read access to the source object and write access to the destination -// bucket. -// -// - General purpose bucket permissions - You must have permissions in an -// IAM policy based on the source and destination bucket types in a CopyObject -// operation. If the source object is in a general purpose bucket, you must -// have s3:GetObject permission to read the source object that is being copied. -// If the destination bucket is a general purpose bucket, you must have s3:PutObject -// permission to write the object copy to the destination bucket. -// -// - Directory bucket permissions - You must have permissions in a bucket -// policy or an IAM identity-based policy based on the source and destination -// bucket types in a CopyObject operation. If the source object that you -// want to copy is in a directory bucket, you must have the s3express:CreateSession -// permission in the Action element of a policy to read the object. By default, -// the session is in the ReadWrite mode. If you want to restrict the access, -// you can explicitly set the s3express:SessionMode condition key to ReadOnly -// on the copy source bucket. If the copy destination is a directory bucket, -// you must have the s3express:CreateSession permission in the Action element -// of a policy to write the object to the destination. The s3express:SessionMode -// condition key can't be set to ReadOnly on the copy destination bucket. -// For example policies, see Example bucket policies for S3 Express One Zone -// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html) -// and Amazon Web Services Identity and Access Management (IAM) identity-based -// policies for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html) -// in the Amazon S3 User Guide. -// -// # Response and special errors -// -// When the request is an HTTP 1.1 request, the response is chunk encoded. When -// the request is not an HTTP 1.1 request, the response would not contain the -// Content-Length. You always need to read the entire response body to check -// if the copy succeeds. -// -// - If the copy is successful, you receive a response with information about -// the copied object. -// -// - A copy request might return an error when Amazon S3 receives the copy -// request or while Amazon S3 is copying the files. A 200 OK response can -// contain either a success or an error. If the error occurs before the copy -// action starts, you receive a standard Amazon S3 error. If the error occurs -// during the copy operation, the error response is embedded in the 200 OK -// response. For example, in a cross-region copy, you may encounter throttling -// and receive a 200 OK response. For more information, see Resolve the Error -// 200 response when copying objects to Amazon S3 (https://repost.aws/knowledge-center/s3-resolve-200-internalerror). -// The 200 OK status code means the copy was accepted, but it doesn't mean -// the copy is complete. Another example is when you disconnect from Amazon -// S3 before the copy is complete, Amazon S3 might cancel the copy and you -// may receive a 200 OK response. You must stay connected to Amazon S3 until -// the entire response is successfully received and processed. If you call -// this API operation directly, make sure to design your application to parse -// the content of the response and handle it appropriately. If you use Amazon -// Web Services SDKs, SDKs handle this condition. The SDKs detect the embedded -// error and apply error handling per your configuration settings (including -// automatically retrying the request as appropriate). If the condition persists, -// the SDKs throw an exception (or, for the SDKs that don't use exceptions, -// they return an error). -// -// # Charge -// -// The copy request charge is based on the storage class and Region that you -// specify for the destination object. The request can also result in a data -// retrieval charge for the source if the source storage class bills for data -// retrieval. If the copy source is in a different region, the data transfer -// is billed to the copy source account. For pricing information, see Amazon -// S3 pricing (http://aws.amazon.com/s3/pricing/). -// -// # HTTP Host header syntax -// -// Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. -// -// The following operations are related to CopyObject: -// -// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html) -// -// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.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 Simple Storage Service's -// API operation CopyObject for usage and error information. -// -// Returned Error Codes: -// - ErrCodeObjectNotInActiveTierError "ObjectNotInActiveTierError" -// The source object of the COPY action is not in the active tier and is only -// stored in Amazon S3 Glacier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject -func (c *S3) CopyObject(input *CopyObjectInput) (*CopyObjectOutput, error) { - req, out := c.CopyObjectRequest(input) - return out, req.Send() -} - -// CopyObjectWithContext is the same as CopyObject with the addition of -// the ability to pass a context and additional request options. -// -// See CopyObject 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 *S3) CopyObjectWithContext(ctx aws.Context, input *CopyObjectInput, opts ...request.Option) (*CopyObjectOutput, error) { - req, out := c.CopyObjectRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateBucket = "CreateBucket" - -// CreateBucketRequest generates a "aws/request.Request" representing the -// client's request for the CreateBucket 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 CreateBucket for more information on using the CreateBucket -// 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 CreateBucketRequest method. -// req, resp := client.CreateBucketRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket -func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *request.Request, output *CreateBucketOutput) { - op := &request.Operation{ - Name: opCreateBucket, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}", - } - - if input == nil { - input = &CreateBucketInput{} - } - - output = &CreateBucketOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateBucket API operation for Amazon Simple Storage Service. -// -// This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts -// bucket, see CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateBucket.html). -// -// Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and -// have a valid Amazon Web Services Access Key ID to authenticate requests. -// Anonymous requests are never allowed to create buckets. By creating the bucket, -// you become the bucket owner. -// -// There are two types of buckets: general purpose buckets and directory buckets. -// For more information about these bucket types, see Creating, configuring, -// and working with Amazon S3 buckets (https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html) -// in the Amazon S3 User Guide. -// -// - General purpose buckets - If you send your CreateBucket request to the -// s3.amazonaws.com global endpoint, the request goes to the us-east-1 Region. -// So the signature calculations in Signature Version 4 must use us-east-1 -// as the Region, even if the location constraint in the request specifies -// another Region where the bucket is to be created. If you create a bucket -// in a Region other than US East (N. Virginia), your application must be -// able to handle 307 redirect. For more information, see Virtual hosting -// of buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html) -// in the Amazon S3 User Guide. -// -// - Directory buckets - For directory buckets, you must make requests for -// this API operation to the Regional endpoint. These endpoints support path-style -// requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name -// . Virtual-hosted-style requests aren't supported. For more information, -// see Regional and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html) -// in the Amazon S3 User Guide. -// -// Permissions -// -// - General purpose bucket permissions - In addition to the s3:CreateBucket -// permission, the following permissions are required in a policy when your -// CreateBucket request includes specific headers: Access control lists (ACLs) -// -// - In your CreateBucket request, if you specify an access control list -// (ACL) and set it to public-read, public-read-write, authenticated-read, -// or if you explicitly specify any other custom ACLs, both s3:CreateBucket -// and s3:PutBucketAcl permissions are required. In your CreateBucket request, -// if you set the ACL to private, or if you don't specify any ACLs, only -// the s3:CreateBucket permission is required. Object Lock - In your CreateBucket -// request, if you set x-amz-bucket-object-lock-enabled to true, the s3:PutBucketObjectLockConfiguration -// and s3:PutBucketVersioning permissions are required. S3 Object Ownership -// -// - If your CreateBucket request includes the x-amz-object-ownership header, -// then the s3:PutBucketOwnershipControls permission is required. To set -// an ACL on a bucket as part of a CreateBucket request, you must explicitly -// set S3 Object Ownership for the bucket to a different value than the default, -// BucketOwnerEnforced. Additionally, if your desired bucket ACL grants public -// access, you must first create the bucket (without the bucket ACL) and -// then explicitly disable Block Public Access on the bucket before using -// PutBucketAcl to set the ACL. If you try to create a bucket with a public -// ACL, the request will fail. For the majority of modern use cases in S3, -// we recommend that you keep all Block Public Access settings enabled and -// keep ACLs disabled. If you would like to share data with users outside -// of your account, you can use bucket policies as needed. For more information, -// see Controlling ownership of objects and disabling ACLs for your bucket -// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html) -// and Blocking public access to your Amazon S3 storage (https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-control-block-public-access.html) -// in the Amazon S3 User Guide. S3 Block Public Access - If your specific -// use case requires granting public access to your S3 resources, you can -// disable Block Public Access. Specifically, you can create a new bucket -// with Block Public Access enabled, then separately call the DeletePublicAccessBlock -// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html) -// API. To use this operation, you must have the s3:PutBucketPublicAccessBlock -// permission. For more information about S3 Block Public Access, see Blocking -// public access to your Amazon S3 storage (https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-control-block-public-access.html) -// in the Amazon S3 User Guide. -// -// - Directory bucket permissions - You must have the s3express:CreateBucket -// permission in an IAM identity-based policy instead of a bucket policy. -// Cross-account access to this API operation isn't supported. This operation -// can only be performed by the Amazon Web Services account that owns the -// resource. For more information about directory bucket policies and permissions, -// see Amazon Web Services Identity and Access Management (IAM) for S3 Express -// One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html) -// in the Amazon S3 User Guide. The permissions for ACLs, Object Lock, S3 -// Object Ownership, and S3 Block Public Access are not supported for directory -// buckets. For directory buckets, all Block Public Access settings are enabled -// at the bucket level and S3 Object Ownership is set to Bucket owner enforced -// (ACLs disabled). These settings can't be modified. For more information -// about permissions for creating and working with directory buckets, see -// Directory buckets (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-overview.html) -// in the Amazon S3 User Guide. For more information about supported S3 features -// for directory buckets, see Features of S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-one-zone.html#s3-express-features) -// in the Amazon S3 User Guide. -// -// # HTTP Host header syntax -// -// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. -// -// The following operations are related to CreateBucket: -// -// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html) -// -// - DeleteBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.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 Simple Storage Service's -// API operation CreateBucket for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeBucketAlreadyExists "BucketAlreadyExists" -// The requested bucket name is not available. The bucket namespace is shared -// by all users of the system. Select a different name and try again. -// -// - ErrCodeBucketAlreadyOwnedByYou "BucketAlreadyOwnedByYou" -// The bucket you tried to create already exists, and you own it. Amazon S3 -// returns this error in all Amazon Web Services Regions except in the North -// Virginia Region. For legacy compatibility, if you re-create an existing bucket -// that you already own in the North Virginia Region, Amazon S3 returns 200 -// OK and resets the bucket access control lists (ACLs). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket -func (c *S3) CreateBucket(input *CreateBucketInput) (*CreateBucketOutput, error) { - req, out := c.CreateBucketRequest(input) - return out, req.Send() -} - -// CreateBucketWithContext is the same as CreateBucket with the addition of -// the ability to pass a context and additional request options. -// -// See CreateBucket 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 *S3) CreateBucketWithContext(ctx aws.Context, input *CreateBucketInput, opts ...request.Option) (*CreateBucketOutput, error) { - req, out := c.CreateBucketRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateMultipartUpload = "CreateMultipartUpload" - -// CreateMultipartUploadRequest generates a "aws/request.Request" representing the -// client's request for the CreateMultipartUpload 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 CreateMultipartUpload for more information on using the CreateMultipartUpload -// 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 CreateMultipartUploadRequest method. -// req, resp := client.CreateMultipartUploadRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload -func (c *S3) CreateMultipartUploadRequest(input *CreateMultipartUploadInput) (req *request.Request, output *CreateMultipartUploadOutput) { - op := &request.Operation{ - Name: opCreateMultipartUpload, - HTTPMethod: "POST", - HTTPPath: "/{Bucket}/{Key+}?uploads", - } - - if input == nil { - input = &CreateMultipartUploadInput{} - } - - output = &CreateMultipartUploadOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateMultipartUpload API operation for Amazon Simple Storage Service. -// -// This action initiates a multipart upload and returns an upload ID. This upload -// ID is used to associate all of the parts in the specific multipart upload. -// You specify this upload ID in each of your subsequent upload part requests -// (see UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)). -// You also include this upload ID in the final request to either complete or -// abort the multipart upload request. For more information about multipart -// uploads, see Multipart Upload Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html) -// in the Amazon S3 User Guide. -// -// After you initiate a multipart upload and upload one or more parts, to stop -// being charged for storing the uploaded parts, you must either complete or -// abort the multipart upload. Amazon S3 frees up the space used to store the -// parts and stops charging you for storing them only after you either complete -// or abort a multipart upload. -// -// If you have configured a lifecycle rule to abort incomplete multipart uploads, -// the created multipart upload must be completed within the number of days -// specified in the bucket lifecycle configuration. Otherwise, the incomplete -// multipart upload becomes eligible for an abort action and Amazon S3 aborts -// the multipart upload. For more information, see Aborting Incomplete Multipart -// Uploads Using a Bucket Lifecycle Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config). -// -// - Directory buckets - S3 Lifecycle is not supported by directory buckets. -// -// - Directory buckets - For directory buckets, you must make requests for -// this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style -// requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name -// . Path-style requests are not supported. For more information, see Regional -// and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html) -// in the Amazon S3 User Guide. -// -// # Request signing -// -// For request signing, multipart upload is just a series of regular requests. -// You initiate a multipart upload, send one or more requests to upload parts, -// and then complete the multipart upload process. You sign each request individually. -// There is nothing special about signing multipart upload requests. For more -// information about signing, see Authenticating Requests (Amazon Web Services -// Signature Version 4) (https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html) -// in the Amazon S3 User Guide. -// -// Permissions -// -// - General purpose bucket permissions - For information about the permissions -// required to use the multipart upload API, see Multipart upload and permissions -// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html) -// in the Amazon S3 User Guide. To perform a multipart upload with encryption -// by using an Amazon Web Services KMS key, the requester must have permission -// to the kms:Decrypt and kms:GenerateDataKey* actions on the key. These -// permissions are required because Amazon S3 must decrypt and read data -// from the encrypted file parts before it completes the multipart upload. -// For more information, see Multipart upload API and permissions (https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions) -// and Protecting data using server-side encryption with Amazon Web Services -// KMS (https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html) -// in the Amazon S3 User Guide. -// -// - Directory bucket permissions - To grant access to this API operation -// on a directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html) -// API operation for session-based authorization. Specifically, you grant -// the s3express:CreateSession permission to the directory bucket in a bucket -// policy or an IAM identity-based policy. Then, you make the CreateSession -// API call on the bucket to obtain a session token. With the session token -// in your request header, you can make API requests to this operation. After -// the session token expires, you make another CreateSession API call to -// generate a new session token for use. Amazon Web Services CLI or SDKs -// create session and refresh the session token automatically to avoid service -// interruptions when a session expires. For more information about authorization, -// see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html). -// -// Encryption -// -// - General purpose buckets - Server-side encryption is for data encryption -// at rest. Amazon S3 encrypts your data as it writes it to disks in its -// data centers and decrypts it when you access it. Amazon S3 automatically -// encrypts all new objects that are uploaded to an S3 bucket. When doing -// a multipart upload, if you don't specify encryption information in your -// request, the encryption setting of the uploaded parts is set to the default -// encryption configuration of the destination bucket. By default, all buckets -// have a base level of encryption configuration that uses server-side encryption -// with Amazon S3 managed keys (SSE-S3). If the destination bucket has a -// default encryption configuration that uses server-side encryption with -// an Key Management Service (KMS) key (SSE-KMS), or a customer-provided -// encryption key (SSE-C), Amazon S3 uses the corresponding KMS key, or a -// customer-provided key to encrypt the uploaded parts. When you perform -// a CreateMultipartUpload operation, if you want to use a different type -// of encryption setting for the uploaded parts, you can request that Amazon -// S3 encrypts the object with a different encryption key (such as an Amazon -// S3 managed key, a KMS key, or a customer-provided key). When the encryption -// setting in your request is different from the default encryption configuration -// of the destination bucket, the encryption setting in your request takes -// precedence. If you choose to provide your own encryption key, the request -// headers you provide in UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) -// and UploadPartCopy (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html) -// requests must match the headers you used in the CreateMultipartUpload -// request. Use KMS keys (SSE-KMS) that include the Amazon Web Services managed -// key (aws/s3) and KMS customer managed keys stored in Key Management Service -// (KMS) – If you want Amazon Web Services to manage the keys used to encrypt -// data, specify the following headers in the request. x-amz-server-side-encryption -// x-amz-server-side-encryption-aws-kms-key-id x-amz-server-side-encryption-context -// If you specify x-amz-server-side-encryption:aws:kms, but don't provide -// x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon -// Web Services managed key (aws/s3 key) in KMS to protect the data. To perform -// a multipart upload with encryption by using an Amazon Web Services KMS -// key, the requester must have permission to the kms:Decrypt and kms:GenerateDataKey* -// actions on the key. These permissions are required because Amazon S3 must -// decrypt and read data from the encrypted file parts before it completes -// the multipart upload. For more information, see Multipart upload API and -// permissions (https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions) -// and Protecting data using server-side encryption with Amazon Web Services -// KMS (https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html) -// in the Amazon S3 User Guide. If your Identity and Access Management (IAM) -// user or role is in the same Amazon Web Services account as the KMS key, -// then you must have these permissions on the key policy. If your IAM user -// or role is in a different account from the key, then you must have the -// permissions on both the key policy and your IAM user or role. All GET -// and PUT requests for an object protected by KMS fail if you don't make -// them by using Secure Sockets Layer (SSL), Transport Layer Security (TLS), -// or Signature Version 4. For information about configuring any of the officially -// supported Amazon Web Services SDKs and Amazon Web Services CLI, see Specifying -// the Signature Version in Request Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version) -// in the Amazon S3 User Guide. For more information about server-side encryption -// with KMS keys (SSE-KMS), see Protecting Data Using Server-Side Encryption -// with KMS keys (https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html) -// in the Amazon S3 User Guide. Use customer-provided encryption keys (SSE-C) -// – If you want to manage your own encryption keys, provide all the following -// headers in the request. x-amz-server-side-encryption-customer-algorithm -// x-amz-server-side-encryption-customer-key x-amz-server-side-encryption-customer-key-MD5 -// For more information about server-side encryption with customer-provided -// encryption keys (SSE-C), see Protecting data using server-side encryption -// with customer-provided encryption keys (SSE-C) (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html) -// in the Amazon S3 User Guide. -// -// - Directory buckets -For directory buckets, only server-side encryption -// with Amazon S3 managed keys (SSE-S3) (AES256) is supported. -// -// # HTTP Host header syntax -// -// Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. -// -// The following operations are related to CreateMultipartUpload: -// -// - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) -// -// - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html) -// -// - AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html) -// -// - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html) -// -// - ListMultipartUploads (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.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 Simple Storage Service's -// API operation CreateMultipartUpload for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload -func (c *S3) CreateMultipartUpload(input *CreateMultipartUploadInput) (*CreateMultipartUploadOutput, error) { - req, out := c.CreateMultipartUploadRequest(input) - return out, req.Send() -} - -// CreateMultipartUploadWithContext is the same as CreateMultipartUpload with the addition of -// the ability to pass a context and additional request options. -// -// See CreateMultipartUpload 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 *S3) CreateMultipartUploadWithContext(ctx aws.Context, input *CreateMultipartUploadInput, opts ...request.Option) (*CreateMultipartUploadOutput, error) { - req, out := c.CreateMultipartUploadRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateSession = "CreateSession" - -// CreateSessionRequest generates a "aws/request.Request" representing the -// client's request for the CreateSession 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 CreateSession for more information on using the CreateSession -// 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 CreateSessionRequest method. -// req, resp := client.CreateSessionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateSession -func (c *S3) CreateSessionRequest(input *CreateSessionInput) (req *request.Request, output *CreateSessionOutput) { - op := &request.Operation{ - Name: opCreateSession, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?session", - } - - if input == nil { - input = &CreateSessionInput{} - } - - output = &CreateSessionOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateSession API operation for Amazon Simple Storage Service. -// -// Creates a session that establishes temporary security credentials to support -// fast authentication and authorization for the Zonal endpoint APIs on directory -// buckets. For more information about Zonal endpoint APIs that include the -// Availability Zone in the request endpoint, see S3 Express One Zone APIs (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-APIs.html) -// in the Amazon S3 User Guide. -// -// To make Zonal endpoint API requests on a directory bucket, use the CreateSession -// API operation. Specifically, you grant s3express:CreateSession permission -// to a bucket in a bucket policy or an IAM identity-based policy. Then, you -// use IAM credentials to make the CreateSession API request on the bucket, -// which returns temporary security credentials that include the access key -// ID, secret access key, session token, and expiration. These credentials have -// associated permissions to access the Zonal endpoint APIs. After the session -// is created, you don’t need to use other policies to grant permissions to -// each Zonal endpoint API individually. Instead, in your Zonal endpoint API -// requests, you sign your requests by applying the temporary security credentials -// of the session to the request headers and following the SigV4 protocol for -// authentication. You also apply the session token to the x-amz-s3session-token -// request header for authorization. Temporary security credentials are scoped -// to the bucket and expire after 5 minutes. After the expiration time, any -// calls that you make with those credentials will fail. You must use IAM credentials -// again to make a CreateSession API request that generates a new set of temporary -// credentials for use. Temporary credentials cannot be extended or refreshed -// beyond the original specified interval. -// -// If you use Amazon Web Services SDKs, SDKs handle the session token refreshes -// automatically to avoid service interruptions when a session expires. We recommend -// that you use the Amazon Web Services SDKs to initiate and manage requests -// to the CreateSession API. For more information, see Performance guidelines -// and design patterns (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-optimizing-performance-guidelines-design-patterns.html#s3-express-optimizing-performance-session-authentication) -// in the Amazon S3 User Guide. -// -// - You must make requests for this API operation to the Zonal endpoint. -// These endpoints support virtual-hosted-style requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com. -// Path-style requests are not supported. For more information, see Regional -// and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html) -// in the Amazon S3 User Guide. -// -// - CopyObject API operation - Unlike other Zonal endpoint APIs, the CopyObject -// API operation doesn't use the temporary security credentials returned -// from the CreateSession API operation for authentication and authorization. -// For information about authentication and authorization of the CopyObject -// API operation on directory buckets, see CopyObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html). -// -// - HeadBucket API operation - Unlike other Zonal endpoint APIs, the HeadBucket -// API operation doesn't use the temporary security credentials returned -// from the CreateSession API operation for authentication and authorization. -// For information about authentication and authorization of the HeadBucket -// API operation on directory buckets, see HeadBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadBucket.html). -// -// # Permissions -// -// To obtain temporary security credentials, you must create a bucket policy -// or an IAM identity-based policy that grants s3express:CreateSession permission -// to the bucket. In a policy, you can have the s3express:SessionMode condition -// key to control who can create a ReadWrite or ReadOnly session. For more information -// about ReadWrite or ReadOnly sessions, see x-amz-create-session-mode (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html#API_CreateSession_RequestParameters). -// For example policies, see Example bucket policies for S3 Express One Zone -// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html) -// and Amazon Web Services Identity and Access Management (IAM) identity-based -// policies for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html) -// in the Amazon S3 User Guide. -// -// To grant cross-account access to Zonal endpoint APIs, the bucket policy should -// also grant both accounts the s3express:CreateSession permission. -// -// # HTTP Host header syntax -// -// Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. -// -// 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 Simple Storage Service's -// API operation CreateSession for usage and error information. -// -// Returned Error Codes: -// - ErrCodeNoSuchBucket "NoSuchBucket" -// The specified bucket does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateSession -func (c *S3) CreateSession(input *CreateSessionInput) (*CreateSessionOutput, error) { - req, out := c.CreateSessionRequest(input) - return out, req.Send() -} - -// CreateSessionWithContext is the same as CreateSession with the addition of -// the ability to pass a context and additional request options. -// -// See CreateSession 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 *S3) CreateSessionWithContext(ctx aws.Context, input *CreateSessionInput, opts ...request.Option) (*CreateSessionOutput, error) { - req, out := c.CreateSessionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBucket = "DeleteBucket" - -// DeleteBucketRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBucket 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 DeleteBucket for more information on using the DeleteBucket -// 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 DeleteBucketRequest method. -// req, resp := client.DeleteBucketRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket -func (c *S3) DeleteBucketRequest(input *DeleteBucketInput) (req *request.Request, output *DeleteBucketOutput) { - op := &request.Operation{ - Name: opDeleteBucket, - HTTPMethod: "DELETE", - HTTPPath: "/{Bucket}", - } - - if input == nil { - input = &DeleteBucketInput{} - } - - output = &DeleteBucketOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteBucket API operation for Amazon Simple Storage Service. -// -// Deletes the S3 bucket. All objects (including all object versions and delete -// markers) in the bucket must be deleted before the bucket itself can be deleted. -// -// - Directory buckets - If multipart uploads in a directory bucket are in -// progress, you can't delete the bucket until all the in-progress multipart -// uploads are aborted or completed. -// -// - Directory buckets - For directory buckets, you must make requests for -// this API operation to the Regional endpoint. These endpoints support path-style -// requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name -// . Virtual-hosted-style requests aren't supported. For more information, -// see Regional and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html) -// in the Amazon S3 User Guide. -// -// Permissions -// -// - General purpose bucket permissions - You must have the s3:DeleteBucket -// permission on the specified bucket in a policy. -// -// - Directory bucket permissions - You must have the s3express:DeleteBucket -// permission in an IAM identity-based policy instead of a bucket policy. -// Cross-account access to this API operation isn't supported. This operation -// can only be performed by the Amazon Web Services account that owns the -// resource. For more information about directory bucket policies and permissions, -// see Amazon Web Services Identity and Access Management (IAM) for S3 Express -// One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html) -// in the Amazon S3 User Guide. -// -// # HTTP Host header syntax -// -// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. -// -// The following operations are related to DeleteBucket: -// -// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html) -// -// - DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.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 Simple Storage Service's -// API operation DeleteBucket for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket -func (c *S3) DeleteBucket(input *DeleteBucketInput) (*DeleteBucketOutput, error) { - req, out := c.DeleteBucketRequest(input) - return out, req.Send() -} - -// DeleteBucketWithContext is the same as DeleteBucket with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBucket 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 *S3) DeleteBucketWithContext(ctx aws.Context, input *DeleteBucketInput, opts ...request.Option) (*DeleteBucketOutput, error) { - req, out := c.DeleteBucketRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBucketAnalyticsConfiguration = "DeleteBucketAnalyticsConfiguration" - -// DeleteBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBucketAnalyticsConfiguration 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 DeleteBucketAnalyticsConfiguration for more information on using the DeleteBucketAnalyticsConfiguration -// 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 DeleteBucketAnalyticsConfigurationRequest method. -// req, resp := client.DeleteBucketAnalyticsConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration -func (c *S3) DeleteBucketAnalyticsConfigurationRequest(input *DeleteBucketAnalyticsConfigurationInput) (req *request.Request, output *DeleteBucketAnalyticsConfigurationOutput) { - op := &request.Operation{ - Name: opDeleteBucketAnalyticsConfiguration, - HTTPMethod: "DELETE", - HTTPPath: "/{Bucket}?analytics", - } - - if input == nil { - input = &DeleteBucketAnalyticsConfigurationInput{} - } - - output = &DeleteBucketAnalyticsConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Deletes an analytics configuration for the bucket (specified by the analytics -// configuration ID). -// -// To use this operation, you must have permissions to perform the s3:PutAnalyticsConfiguration -// action. The bucket owner has this permission by default. The bucket owner -// can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). -// -// For information about the Amazon S3 analytics feature, see Amazon S3 Analytics -// – Storage Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html). -// -// The following operations are related to DeleteBucketAnalyticsConfiguration: -// -// - GetBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAnalyticsConfiguration.html) -// -// - ListBucketAnalyticsConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.html) -// -// - PutBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.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 Simple Storage Service's -// API operation DeleteBucketAnalyticsConfiguration for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration -func (c *S3) DeleteBucketAnalyticsConfiguration(input *DeleteBucketAnalyticsConfigurationInput) (*DeleteBucketAnalyticsConfigurationOutput, error) { - req, out := c.DeleteBucketAnalyticsConfigurationRequest(input) - return out, req.Send() -} - -// DeleteBucketAnalyticsConfigurationWithContext is the same as DeleteBucketAnalyticsConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBucketAnalyticsConfiguration 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 *S3) DeleteBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *DeleteBucketAnalyticsConfigurationInput, opts ...request.Option) (*DeleteBucketAnalyticsConfigurationOutput, error) { - req, out := c.DeleteBucketAnalyticsConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBucketCors = "DeleteBucketCors" - -// DeleteBucketCorsRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBucketCors 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 DeleteBucketCors for more information on using the DeleteBucketCors -// 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 DeleteBucketCorsRequest method. -// req, resp := client.DeleteBucketCorsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors -func (c *S3) DeleteBucketCorsRequest(input *DeleteBucketCorsInput) (req *request.Request, output *DeleteBucketCorsOutput) { - op := &request.Operation{ - Name: opDeleteBucketCors, - HTTPMethod: "DELETE", - HTTPPath: "/{Bucket}?cors", - } - - if input == nil { - input = &DeleteBucketCorsInput{} - } - - output = &DeleteBucketCorsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteBucketCors API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Deletes the cors configuration information set for the bucket. -// -// To use this operation, you must have permission to perform the s3:PutBucketCORS -// action. The bucket owner has this permission by default and can grant this -// permission to others. -// -// For information about cors, see Enabling Cross-Origin Resource Sharing (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) -// in the Amazon S3 User Guide. -// -// Related Resources -// -// - PutBucketCors (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketCors.html) -// -// - RESTOPTIONSobject (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTOPTIONSobject.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 Simple Storage Service's -// API operation DeleteBucketCors for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors -func (c *S3) DeleteBucketCors(input *DeleteBucketCorsInput) (*DeleteBucketCorsOutput, error) { - req, out := c.DeleteBucketCorsRequest(input) - return out, req.Send() -} - -// DeleteBucketCorsWithContext is the same as DeleteBucketCors with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBucketCors 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 *S3) DeleteBucketCorsWithContext(ctx aws.Context, input *DeleteBucketCorsInput, opts ...request.Option) (*DeleteBucketCorsOutput, error) { - req, out := c.DeleteBucketCorsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBucketEncryption = "DeleteBucketEncryption" - -// DeleteBucketEncryptionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBucketEncryption 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 DeleteBucketEncryption for more information on using the DeleteBucketEncryption -// 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 DeleteBucketEncryptionRequest method. -// req, resp := client.DeleteBucketEncryptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryption -func (c *S3) DeleteBucketEncryptionRequest(input *DeleteBucketEncryptionInput) (req *request.Request, output *DeleteBucketEncryptionOutput) { - op := &request.Operation{ - Name: opDeleteBucketEncryption, - HTTPMethod: "DELETE", - HTTPPath: "/{Bucket}?encryption", - } - - if input == nil { - input = &DeleteBucketEncryptionInput{} - } - - output = &DeleteBucketEncryptionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteBucketEncryption API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// This implementation of the DELETE action resets the default encryption for -// the bucket as server-side encryption with Amazon S3 managed keys (SSE-S3). -// For information about the bucket default encryption feature, see Amazon S3 -// Bucket Default Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html) -// in the Amazon S3 User Guide. -// -// To use this operation, you must have permissions to perform the s3:PutEncryptionConfiguration -// action. The bucket owner has this permission by default. The bucket owner -// can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html) -// in the Amazon S3 User Guide. -// -// The following operations are related to DeleteBucketEncryption: -// -// - PutBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html) -// -// - GetBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.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 Simple Storage Service's -// API operation DeleteBucketEncryption for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryption -func (c *S3) DeleteBucketEncryption(input *DeleteBucketEncryptionInput) (*DeleteBucketEncryptionOutput, error) { - req, out := c.DeleteBucketEncryptionRequest(input) - return out, req.Send() -} - -// DeleteBucketEncryptionWithContext is the same as DeleteBucketEncryption with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBucketEncryption 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 *S3) DeleteBucketEncryptionWithContext(ctx aws.Context, input *DeleteBucketEncryptionInput, opts ...request.Option) (*DeleteBucketEncryptionOutput, error) { - req, out := c.DeleteBucketEncryptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBucketIntelligentTieringConfiguration = "DeleteBucketIntelligentTieringConfiguration" - -// DeleteBucketIntelligentTieringConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBucketIntelligentTieringConfiguration 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 DeleteBucketIntelligentTieringConfiguration for more information on using the DeleteBucketIntelligentTieringConfiguration -// 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 DeleteBucketIntelligentTieringConfigurationRequest method. -// req, resp := client.DeleteBucketIntelligentTieringConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketIntelligentTieringConfiguration -func (c *S3) DeleteBucketIntelligentTieringConfigurationRequest(input *DeleteBucketIntelligentTieringConfigurationInput) (req *request.Request, output *DeleteBucketIntelligentTieringConfigurationOutput) { - op := &request.Operation{ - Name: opDeleteBucketIntelligentTieringConfiguration, - HTTPMethod: "DELETE", - HTTPPath: "/{Bucket}?intelligent-tiering", - } - - if input == nil { - input = &DeleteBucketIntelligentTieringConfigurationInput{} - } - - output = &DeleteBucketIntelligentTieringConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteBucketIntelligentTieringConfiguration API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Deletes the S3 Intelligent-Tiering configuration from the specified bucket. -// -// The S3 Intelligent-Tiering storage class is designed to optimize storage -// costs by automatically moving data to the most cost-effective storage access -// tier, without performance impact or operational overhead. S3 Intelligent-Tiering -// delivers automatic cost savings in three low latency and high throughput -// access tiers. To get the lowest storage cost on data that can be accessed -// in minutes to hours, you can choose to activate additional archiving capabilities. -// -// The S3 Intelligent-Tiering storage class is the ideal storage class for data -// with unknown, changing, or unpredictable access patterns, independent of -// object size or retention period. If the size of an object is less than 128 -// KB, it is not monitored and not eligible for auto-tiering. Smaller objects -// can be stored, but they are always charged at the Frequent Access tier rates -// in the S3 Intelligent-Tiering storage class. -// -// For more information, see Storage class for automatically optimizing frequently -// and infrequently accessed objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access). -// -// Operations related to DeleteBucketIntelligentTieringConfiguration include: -// -// - GetBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.html) -// -// - PutBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html) -// -// - ListBucketIntelligentTieringConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.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 Simple Storage Service's -// API operation DeleteBucketIntelligentTieringConfiguration for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketIntelligentTieringConfiguration -func (c *S3) DeleteBucketIntelligentTieringConfiguration(input *DeleteBucketIntelligentTieringConfigurationInput) (*DeleteBucketIntelligentTieringConfigurationOutput, error) { - req, out := c.DeleteBucketIntelligentTieringConfigurationRequest(input) - return out, req.Send() -} - -// DeleteBucketIntelligentTieringConfigurationWithContext is the same as DeleteBucketIntelligentTieringConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBucketIntelligentTieringConfiguration 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 *S3) DeleteBucketIntelligentTieringConfigurationWithContext(ctx aws.Context, input *DeleteBucketIntelligentTieringConfigurationInput, opts ...request.Option) (*DeleteBucketIntelligentTieringConfigurationOutput, error) { - req, out := c.DeleteBucketIntelligentTieringConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBucketInventoryConfiguration = "DeleteBucketInventoryConfiguration" - -// DeleteBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBucketInventoryConfiguration 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 DeleteBucketInventoryConfiguration for more information on using the DeleteBucketInventoryConfiguration -// 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 DeleteBucketInventoryConfigurationRequest method. -// req, resp := client.DeleteBucketInventoryConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration -func (c *S3) DeleteBucketInventoryConfigurationRequest(input *DeleteBucketInventoryConfigurationInput) (req *request.Request, output *DeleteBucketInventoryConfigurationOutput) { - op := &request.Operation{ - Name: opDeleteBucketInventoryConfiguration, - HTTPMethod: "DELETE", - HTTPPath: "/{Bucket}?inventory", - } - - if input == nil { - input = &DeleteBucketInventoryConfigurationInput{} - } - - output = &DeleteBucketInventoryConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteBucketInventoryConfiguration API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Deletes an inventory configuration (identified by the inventory ID) from -// the bucket. -// -// To use this operation, you must have permissions to perform the s3:PutInventoryConfiguration -// action. The bucket owner has this permission by default. The bucket owner -// can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). -// -// For information about the Amazon S3 inventory feature, see Amazon S3 Inventory -// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html). -// -// Operations related to DeleteBucketInventoryConfiguration include: -// -// - GetBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html) -// -// - PutBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html) -// -// - ListBucketInventoryConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.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 Simple Storage Service's -// API operation DeleteBucketInventoryConfiguration for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration -func (c *S3) DeleteBucketInventoryConfiguration(input *DeleteBucketInventoryConfigurationInput) (*DeleteBucketInventoryConfigurationOutput, error) { - req, out := c.DeleteBucketInventoryConfigurationRequest(input) - return out, req.Send() -} - -// DeleteBucketInventoryConfigurationWithContext is the same as DeleteBucketInventoryConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBucketInventoryConfiguration 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 *S3) DeleteBucketInventoryConfigurationWithContext(ctx aws.Context, input *DeleteBucketInventoryConfigurationInput, opts ...request.Option) (*DeleteBucketInventoryConfigurationOutput, error) { - req, out := c.DeleteBucketInventoryConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBucketLifecycle = "DeleteBucketLifecycle" - -// DeleteBucketLifecycleRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBucketLifecycle 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 DeleteBucketLifecycle for more information on using the DeleteBucketLifecycle -// 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 DeleteBucketLifecycleRequest method. -// req, resp := client.DeleteBucketLifecycleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle -func (c *S3) DeleteBucketLifecycleRequest(input *DeleteBucketLifecycleInput) (req *request.Request, output *DeleteBucketLifecycleOutput) { - op := &request.Operation{ - Name: opDeleteBucketLifecycle, - HTTPMethod: "DELETE", - HTTPPath: "/{Bucket}?lifecycle", - } - - if input == nil { - input = &DeleteBucketLifecycleInput{} - } - - output = &DeleteBucketLifecycleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteBucketLifecycle API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Deletes the lifecycle configuration from the specified bucket. Amazon S3 -// removes all the lifecycle configuration rules in the lifecycle subresource -// associated with the bucket. Your objects never expire, and Amazon S3 no longer -// automatically deletes any objects on the basis of rules contained in the -// deleted lifecycle configuration. -// -// To use this operation, you must have permission to perform the s3:PutLifecycleConfiguration -// action. By default, the bucket owner has this permission and the bucket owner -// can grant this permission to others. -// -// There is usually some time lag before lifecycle configuration deletion is -// fully propagated to all the Amazon S3 systems. -// -// For more information about the object expiration, see Elements to Describe -// Lifecycle Actions (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#intro-lifecycle-rules-actions). -// -// Related actions include: -// -// - PutBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html) -// -// - GetBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.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 Simple Storage Service's -// API operation DeleteBucketLifecycle for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle -func (c *S3) DeleteBucketLifecycle(input *DeleteBucketLifecycleInput) (*DeleteBucketLifecycleOutput, error) { - req, out := c.DeleteBucketLifecycleRequest(input) - return out, req.Send() -} - -// DeleteBucketLifecycleWithContext is the same as DeleteBucketLifecycle with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBucketLifecycle 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 *S3) DeleteBucketLifecycleWithContext(ctx aws.Context, input *DeleteBucketLifecycleInput, opts ...request.Option) (*DeleteBucketLifecycleOutput, error) { - req, out := c.DeleteBucketLifecycleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBucketMetricsConfiguration = "DeleteBucketMetricsConfiguration" - -// DeleteBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBucketMetricsConfiguration 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 DeleteBucketMetricsConfiguration for more information on using the DeleteBucketMetricsConfiguration -// 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 DeleteBucketMetricsConfigurationRequest method. -// req, resp := client.DeleteBucketMetricsConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration -func (c *S3) DeleteBucketMetricsConfigurationRequest(input *DeleteBucketMetricsConfigurationInput) (req *request.Request, output *DeleteBucketMetricsConfigurationOutput) { - op := &request.Operation{ - Name: opDeleteBucketMetricsConfiguration, - HTTPMethod: "DELETE", - HTTPPath: "/{Bucket}?metrics", - } - - if input == nil { - input = &DeleteBucketMetricsConfigurationInput{} - } - - output = &DeleteBucketMetricsConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteBucketMetricsConfiguration API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Deletes a metrics configuration for the Amazon CloudWatch request metrics -// (specified by the metrics configuration ID) from the bucket. Note that this -// doesn't include the daily storage metrics. -// -// To use this operation, you must have permissions to perform the s3:PutMetricsConfiguration -// action. The bucket owner has this permission by default. The bucket owner -// can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). -// -// For information about CloudWatch request metrics for Amazon S3, see Monitoring -// Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html). -// -// The following operations are related to DeleteBucketMetricsConfiguration: -// -// - GetBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetricsConfiguration.html) -// -// - PutBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html) -// -// - ListBucketMetricsConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html) -// -// - Monitoring Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.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 Simple Storage Service's -// API operation DeleteBucketMetricsConfiguration for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration -func (c *S3) DeleteBucketMetricsConfiguration(input *DeleteBucketMetricsConfigurationInput) (*DeleteBucketMetricsConfigurationOutput, error) { - req, out := c.DeleteBucketMetricsConfigurationRequest(input) - return out, req.Send() -} - -// DeleteBucketMetricsConfigurationWithContext is the same as DeleteBucketMetricsConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBucketMetricsConfiguration 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 *S3) DeleteBucketMetricsConfigurationWithContext(ctx aws.Context, input *DeleteBucketMetricsConfigurationInput, opts ...request.Option) (*DeleteBucketMetricsConfigurationOutput, error) { - req, out := c.DeleteBucketMetricsConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBucketOwnershipControls = "DeleteBucketOwnershipControls" - -// DeleteBucketOwnershipControlsRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBucketOwnershipControls 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 DeleteBucketOwnershipControls for more information on using the DeleteBucketOwnershipControls -// 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 DeleteBucketOwnershipControlsRequest method. -// req, resp := client.DeleteBucketOwnershipControlsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketOwnershipControls -func (c *S3) DeleteBucketOwnershipControlsRequest(input *DeleteBucketOwnershipControlsInput) (req *request.Request, output *DeleteBucketOwnershipControlsOutput) { - op := &request.Operation{ - Name: opDeleteBucketOwnershipControls, - HTTPMethod: "DELETE", - HTTPPath: "/{Bucket}?ownershipControls", - } - - if input == nil { - input = &DeleteBucketOwnershipControlsInput{} - } - - output = &DeleteBucketOwnershipControlsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteBucketOwnershipControls API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Removes OwnershipControls for an Amazon S3 bucket. To use this operation, -// you must have the s3:PutBucketOwnershipControls permission. For more information -// about Amazon S3 permissions, see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html). -// -// For information about Amazon S3 Object Ownership, see Using Object Ownership -// (https://docs.aws.amazon.com/AmazonS3/latest/dev/about-object-ownership.html). -// -// The following operations are related to DeleteBucketOwnershipControls: -// -// - GetBucketOwnershipControls -// -// - PutBucketOwnershipControls -// -// 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 Simple Storage Service's -// API operation DeleteBucketOwnershipControls for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketOwnershipControls -func (c *S3) DeleteBucketOwnershipControls(input *DeleteBucketOwnershipControlsInput) (*DeleteBucketOwnershipControlsOutput, error) { - req, out := c.DeleteBucketOwnershipControlsRequest(input) - return out, req.Send() -} - -// DeleteBucketOwnershipControlsWithContext is the same as DeleteBucketOwnershipControls with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBucketOwnershipControls 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 *S3) DeleteBucketOwnershipControlsWithContext(ctx aws.Context, input *DeleteBucketOwnershipControlsInput, opts ...request.Option) (*DeleteBucketOwnershipControlsOutput, error) { - req, out := c.DeleteBucketOwnershipControlsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBucketPolicy = "DeleteBucketPolicy" - -// DeleteBucketPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBucketPolicy 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 DeleteBucketPolicy for more information on using the DeleteBucketPolicy -// 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 DeleteBucketPolicyRequest method. -// req, resp := client.DeleteBucketPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy -func (c *S3) DeleteBucketPolicyRequest(input *DeleteBucketPolicyInput) (req *request.Request, output *DeleteBucketPolicyOutput) { - op := &request.Operation{ - Name: opDeleteBucketPolicy, - HTTPMethod: "DELETE", - HTTPPath: "/{Bucket}?policy", - } - - if input == nil { - input = &DeleteBucketPolicyInput{} - } - - output = &DeleteBucketPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteBucketPolicy API operation for Amazon Simple Storage Service. -// -// Deletes the policy of a specified bucket. -// -// Directory buckets - For directory buckets, you must make requests for this -// API operation to the Regional endpoint. These endpoints support path-style -// requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name -// . Virtual-hosted-style requests aren't supported. For more information, see -// Regional and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html) -// in the Amazon S3 User Guide. -// -// # Permissions -// -// If you are using an identity other than the root user of the Amazon Web Services -// account that owns the bucket, the calling identity must both have the DeleteBucketPolicy -// permissions on the specified bucket and belong to the bucket owner's account -// in order to use this operation. -// -// If you don't have DeleteBucketPolicy permissions, Amazon S3 returns a 403 -// Access Denied error. If you have the correct permissions, but you're not -// using an identity that belongs to the bucket owner's account, Amazon S3 returns -// a 405 Method Not Allowed error. -// -// To ensure that bucket owners don't inadvertently lock themselves out of their -// own buckets, the root principal in a bucket owner's Amazon Web Services account -// can perform the GetBucketPolicy, PutBucketPolicy, and DeleteBucketPolicy -// API actions, even if their bucket policy explicitly denies the root principal's -// access. Bucket owner root principals can only be blocked from performing -// these API actions by VPC endpoint policies and Amazon Web Services Organizations -// policies. -// -// - General purpose bucket permissions - The s3:DeleteBucketPolicy permission -// is required in a policy. For more information about general purpose buckets -// bucket policies, see Using Bucket Policies and User Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html) -// in the Amazon S3 User Guide. -// -// - Directory bucket permissions - To grant access to this API operation, -// you must have the s3express:DeleteBucketPolicy permission in an IAM identity-based -// policy instead of a bucket policy. Cross-account access to this API operation -// isn't supported. This operation can only be performed by the Amazon Web -// Services account that owns the resource. For more information about directory -// bucket policies and permissions, see Amazon Web Services Identity and -// Access Management (IAM) for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html) -// in the Amazon S3 User Guide. -// -// # HTTP Host header syntax -// -// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. -// -// The following operations are related to DeleteBucketPolicy -// -// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html) -// -// - DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.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 Simple Storage Service's -// API operation DeleteBucketPolicy for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy -func (c *S3) DeleteBucketPolicy(input *DeleteBucketPolicyInput) (*DeleteBucketPolicyOutput, error) { - req, out := c.DeleteBucketPolicyRequest(input) - return out, req.Send() -} - -// DeleteBucketPolicyWithContext is the same as DeleteBucketPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBucketPolicy 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 *S3) DeleteBucketPolicyWithContext(ctx aws.Context, input *DeleteBucketPolicyInput, opts ...request.Option) (*DeleteBucketPolicyOutput, error) { - req, out := c.DeleteBucketPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBucketReplication = "DeleteBucketReplication" - -// DeleteBucketReplicationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBucketReplication 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 DeleteBucketReplication for more information on using the DeleteBucketReplication -// 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 DeleteBucketReplicationRequest method. -// req, resp := client.DeleteBucketReplicationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication -func (c *S3) DeleteBucketReplicationRequest(input *DeleteBucketReplicationInput) (req *request.Request, output *DeleteBucketReplicationOutput) { - op := &request.Operation{ - Name: opDeleteBucketReplication, - HTTPMethod: "DELETE", - HTTPPath: "/{Bucket}?replication", - } - - if input == nil { - input = &DeleteBucketReplicationInput{} - } - - output = &DeleteBucketReplicationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteBucketReplication API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Deletes the replication configuration from the bucket. -// -// To use this operation, you must have permissions to perform the s3:PutReplicationConfiguration -// action. The bucket owner has these permissions by default and can grant it -// to others. For more information about permissions, see Permissions Related -// to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). -// -// It can take a while for the deletion of a replication configuration to fully -// propagate. -// -// For information about replication configuration, see Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html) -// in the Amazon S3 User Guide. -// -// The following operations are related to DeleteBucketReplication: -// -// - PutBucketReplication (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketReplication.html) -// -// - GetBucketReplication (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketReplication.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 Simple Storage Service's -// API operation DeleteBucketReplication for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication -func (c *S3) DeleteBucketReplication(input *DeleteBucketReplicationInput) (*DeleteBucketReplicationOutput, error) { - req, out := c.DeleteBucketReplicationRequest(input) - return out, req.Send() -} - -// DeleteBucketReplicationWithContext is the same as DeleteBucketReplication with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBucketReplication 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 *S3) DeleteBucketReplicationWithContext(ctx aws.Context, input *DeleteBucketReplicationInput, opts ...request.Option) (*DeleteBucketReplicationOutput, error) { - req, out := c.DeleteBucketReplicationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBucketTagging = "DeleteBucketTagging" - -// DeleteBucketTaggingRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBucketTagging 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 DeleteBucketTagging for more information on using the DeleteBucketTagging -// 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 DeleteBucketTaggingRequest method. -// req, resp := client.DeleteBucketTaggingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging -func (c *S3) DeleteBucketTaggingRequest(input *DeleteBucketTaggingInput) (req *request.Request, output *DeleteBucketTaggingOutput) { - op := &request.Operation{ - Name: opDeleteBucketTagging, - HTTPMethod: "DELETE", - HTTPPath: "/{Bucket}?tagging", - } - - if input == nil { - input = &DeleteBucketTaggingInput{} - } - - output = &DeleteBucketTaggingOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteBucketTagging API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Deletes the tags from the bucket. -// -// To use this operation, you must have permission to perform the s3:PutBucketTagging -// action. By default, the bucket owner has this permission and can grant this -// permission to others. -// -// The following operations are related to DeleteBucketTagging: -// -// - GetBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketTagging.html) -// -// - PutBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketTagging.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 Simple Storage Service's -// API operation DeleteBucketTagging for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging -func (c *S3) DeleteBucketTagging(input *DeleteBucketTaggingInput) (*DeleteBucketTaggingOutput, error) { - req, out := c.DeleteBucketTaggingRequest(input) - return out, req.Send() -} - -// DeleteBucketTaggingWithContext is the same as DeleteBucketTagging with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBucketTagging 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 *S3) DeleteBucketTaggingWithContext(ctx aws.Context, input *DeleteBucketTaggingInput, opts ...request.Option) (*DeleteBucketTaggingOutput, error) { - req, out := c.DeleteBucketTaggingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteBucketWebsite = "DeleteBucketWebsite" - -// DeleteBucketWebsiteRequest generates a "aws/request.Request" representing the -// client's request for the DeleteBucketWebsite 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 DeleteBucketWebsite for more information on using the DeleteBucketWebsite -// 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 DeleteBucketWebsiteRequest method. -// req, resp := client.DeleteBucketWebsiteRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite -func (c *S3) DeleteBucketWebsiteRequest(input *DeleteBucketWebsiteInput) (req *request.Request, output *DeleteBucketWebsiteOutput) { - op := &request.Operation{ - Name: opDeleteBucketWebsite, - HTTPMethod: "DELETE", - HTTPPath: "/{Bucket}?website", - } - - if input == nil { - input = &DeleteBucketWebsiteInput{} - } - - output = &DeleteBucketWebsiteOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteBucketWebsite API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// This action removes the website configuration for a bucket. Amazon S3 returns -// a 200 OK response upon successfully deleting a website configuration on the -// specified bucket. You will get a 200 OK response if the website configuration -// you are trying to delete does not exist on the bucket. Amazon S3 returns -// a 404 response if the bucket specified in the request does not exist. -// -// This DELETE action requires the S3:DeleteBucketWebsite permission. By default, -// only the bucket owner can delete the website configuration attached to a -// bucket. However, bucket owners can grant other users permission to delete -// the website configuration by writing a bucket policy granting them the S3:DeleteBucketWebsite -// permission. -// -// For more information about hosting websites, see Hosting Websites on Amazon -// S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html). -// -// The following operations are related to DeleteBucketWebsite: -// -// - GetBucketWebsite (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketWebsite.html) -// -// - PutBucketWebsite (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketWebsite.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 Simple Storage Service's -// API operation DeleteBucketWebsite for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite -func (c *S3) DeleteBucketWebsite(input *DeleteBucketWebsiteInput) (*DeleteBucketWebsiteOutput, error) { - req, out := c.DeleteBucketWebsiteRequest(input) - return out, req.Send() -} - -// DeleteBucketWebsiteWithContext is the same as DeleteBucketWebsite with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteBucketWebsite 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 *S3) DeleteBucketWebsiteWithContext(ctx aws.Context, input *DeleteBucketWebsiteInput, opts ...request.Option) (*DeleteBucketWebsiteOutput, error) { - req, out := c.DeleteBucketWebsiteRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteObject = "DeleteObject" - -// DeleteObjectRequest generates a "aws/request.Request" representing the -// client's request for the DeleteObject 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 DeleteObject for more information on using the DeleteObject -// 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 DeleteObjectRequest method. -// req, resp := client.DeleteObjectRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject -func (c *S3) DeleteObjectRequest(input *DeleteObjectInput) (req *request.Request, output *DeleteObjectOutput) { - op := &request.Operation{ - Name: opDeleteObject, - HTTPMethod: "DELETE", - HTTPPath: "/{Bucket}/{Key+}", - } - - if input == nil { - input = &DeleteObjectInput{} - } - - output = &DeleteObjectOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteObject API operation for Amazon Simple Storage Service. -// -// Removes an object from a bucket. The behavior depends on the bucket's versioning -// state: -// -// - If bucket versioning is not enabled, the operation permanently deletes -// the object. -// -// - If bucket versioning is enabled, the operation inserts a delete marker, -// which becomes the current version of the object. To permanently delete -// an object in a versioned bucket, you must include the object’s versionId -// in the request. For more information about versioning-enabled buckets, -// see Deleting object versions from a versioning-enabled bucket (https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeletingObjectVersions.html). -// -// - If bucket versioning is suspended, the operation removes the object -// that has a null versionId, if there is one, and inserts a delete marker -// that becomes the current version of the object. If there isn't an object -// with a null versionId, and all versions of the object have a versionId, -// Amazon S3 does not remove the object and only inserts a delete marker. -// To permanently delete an object that has a versionId, you must include -// the object’s versionId in the request. For more information about versioning-suspended -// buckets, see Deleting objects from versioning-suspended buckets (https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeletingObjectsfromVersioningSuspendedBuckets.html). -// -// - Directory buckets - S3 Versioning isn't enabled and supported for directory -// buckets. For this API operation, only the null value of the version ID -// is supported by directory buckets. You can only specify null to the versionId -// query parameter in the request. -// -// - Directory buckets - For directory buckets, you must make requests for -// this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style -// requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name -// . Path-style requests are not supported. For more information, see Regional -// and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html) -// in the Amazon S3 User Guide. -// -// To remove a specific version, you must use the versionId query parameter. -// Using this query parameter permanently deletes the version. If the object -// deleted is a delete marker, Amazon S3 sets the response header x-amz-delete-marker -// to true. -// -// If the object you want to delete is in a bucket where the bucket versioning -// configuration is MFA Delete enabled, you must include the x-amz-mfa request -// header in the DELETE versionId request. Requests that include x-amz-mfa must -// use HTTPS. For more information about MFA Delete, see Using MFA Delete (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMFADelete.html) -// in the Amazon S3 User Guide. To see sample requests that use versioning, -// see Sample Request (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html#ExampleVersionObjectDelete). -// -// Directory buckets - MFA delete is not supported by directory buckets. -// -// You can delete objects by explicitly calling DELETE Object or calling (PutBucketLifecycle -// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html)) -// to enable Amazon S3 to remove them for you. If you want to block users or -// accounts from removing or deleting objects from your bucket, you must deny -// them the s3:DeleteObject, s3:DeleteObjectVersion, and s3:PutLifeCycleConfiguration -// actions. -// -// Directory buckets - S3 Lifecycle is not supported by directory buckets. -// -// Permissions -// -// - General purpose bucket permissions - The following permissions are required -// in your policies when your DeleteObjects request includes specific headers. -// s3:DeleteObject - To delete an object from a bucket, you must always have -// the s3:DeleteObject permission. s3:DeleteObjectVersion - To delete a specific -// version of an object from a versioning-enabled bucket, you must have the -// s3:DeleteObjectVersion permission. -// -// - Directory bucket permissions - To grant access to this API operation -// on a directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html) -// API operation for session-based authorization. Specifically, you grant -// the s3express:CreateSession permission to the directory bucket in a bucket -// policy or an IAM identity-based policy. Then, you make the CreateSession -// API call on the bucket to obtain a session token. With the session token -// in your request header, you can make API requests to this operation. After -// the session token expires, you make another CreateSession API call to -// generate a new session token for use. Amazon Web Services CLI or SDKs -// create session and refresh the session token automatically to avoid service -// interruptions when a session expires. For more information about authorization, -// see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html). -// -// # HTTP Host header syntax -// -// Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. -// -// The following action is related to DeleteObject: -// -// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.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 Simple Storage Service's -// API operation DeleteObject for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject -func (c *S3) DeleteObject(input *DeleteObjectInput) (*DeleteObjectOutput, error) { - req, out := c.DeleteObjectRequest(input) - return out, req.Send() -} - -// DeleteObjectWithContext is the same as DeleteObject with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteObject 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 *S3) DeleteObjectWithContext(ctx aws.Context, input *DeleteObjectInput, opts ...request.Option) (*DeleteObjectOutput, error) { - req, out := c.DeleteObjectRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteObjectTagging = "DeleteObjectTagging" - -// DeleteObjectTaggingRequest generates a "aws/request.Request" representing the -// client's request for the DeleteObjectTagging 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 DeleteObjectTagging for more information on using the DeleteObjectTagging -// 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 DeleteObjectTaggingRequest method. -// req, resp := client.DeleteObjectTaggingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging -func (c *S3) DeleteObjectTaggingRequest(input *DeleteObjectTaggingInput) (req *request.Request, output *DeleteObjectTaggingOutput) { - op := &request.Operation{ - Name: opDeleteObjectTagging, - HTTPMethod: "DELETE", - HTTPPath: "/{Bucket}/{Key+}?tagging", - } - - if input == nil { - input = &DeleteObjectTaggingInput{} - } - - output = &DeleteObjectTaggingOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeleteObjectTagging API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Removes the entire tag set from the specified object. For more information -// about managing object tags, see Object Tagging (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html). -// -// To use this operation, you must have permission to perform the s3:DeleteObjectTagging -// action. -// -// To delete tags of a specific object version, add the versionId query parameter -// in the request. You will need permission for the s3:DeleteObjectVersionTagging -// action. -// -// The following operations are related to DeleteObjectTagging: -// -// - PutObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html) -// -// - GetObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.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 Simple Storage Service's -// API operation DeleteObjectTagging for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging -func (c *S3) DeleteObjectTagging(input *DeleteObjectTaggingInput) (*DeleteObjectTaggingOutput, error) { - req, out := c.DeleteObjectTaggingRequest(input) - return out, req.Send() -} - -// DeleteObjectTaggingWithContext is the same as DeleteObjectTagging with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteObjectTagging 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 *S3) DeleteObjectTaggingWithContext(ctx aws.Context, input *DeleteObjectTaggingInput, opts ...request.Option) (*DeleteObjectTaggingOutput, error) { - req, out := c.DeleteObjectTaggingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteObjects = "DeleteObjects" - -// DeleteObjectsRequest generates a "aws/request.Request" representing the -// client's request for the DeleteObjects 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 DeleteObjects for more information on using the DeleteObjects -// 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 DeleteObjectsRequest method. -// req, resp := client.DeleteObjectsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects -func (c *S3) DeleteObjectsRequest(input *DeleteObjectsInput) (req *request.Request, output *DeleteObjectsOutput) { - op := &request.Operation{ - Name: opDeleteObjects, - HTTPMethod: "POST", - HTTPPath: "/{Bucket}?delete", - } - - if input == nil { - input = &DeleteObjectsInput{} - } - - output = &DeleteObjectsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Build.PushBackNamed(request.NamedHandler{ - Name: "contentMd5Handler", - Fn: checksum.AddBodyContentMD5Handler, - }) - return -} - -// DeleteObjects API operation for Amazon Simple Storage Service. -// -// This operation enables you to delete multiple objects from a bucket using -// a single HTTP request. If you know the object keys that you want to delete, -// then this operation provides a suitable alternative to sending individual -// delete requests, reducing per-request overhead. -// -// The request can contain a list of up to 1000 keys that you want to delete. -// In the XML, you provide the object key names, and optionally, version IDs -// if you want to delete a specific version of the object from a versioning-enabled -// bucket. For each key, Amazon S3 performs a delete operation and returns the -// result of that delete, success or failure, in the response. Note that if -// the object specified in the request is not found, Amazon S3 returns the result -// as deleted. -// -// - Directory buckets - S3 Versioning isn't enabled and supported for directory -// buckets. -// -// - Directory buckets - For directory buckets, you must make requests for -// this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style -// requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name -// . Path-style requests are not supported. For more information, see Regional -// and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html) -// in the Amazon S3 User Guide. -// -// The operation supports two modes for the response: verbose and quiet. By -// default, the operation uses verbose mode in which the response includes the -// result of deletion of each key in your request. In quiet mode the response -// includes only keys where the delete operation encountered an error. For a -// successful deletion in a quiet mode, the operation does not return any information -// about the delete in the response body. -// -// When performing this action on an MFA Delete enabled bucket, that attempts -// to delete any versioned objects, you must include an MFA token. If you do -// not provide one, the entire request will fail, even if there are non-versioned -// objects you are trying to delete. If you provide an invalid token, whether -// there are versioned keys in the request or not, the entire Multi-Object Delete -// request will fail. For information about MFA Delete, see MFA Delete (https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete) -// in the Amazon S3 User Guide. -// -// Directory buckets - MFA delete is not supported by directory buckets. -// -// Permissions -// -// - General purpose bucket permissions - The following permissions are required -// in your policies when your DeleteObjects request includes specific headers. -// s3:DeleteObject - To delete an object from a bucket, you must always specify -// the s3:DeleteObject permission. s3:DeleteObjectVersion - To delete a specific -// version of an object from a versioning-enabled bucket, you must specify -// the s3:DeleteObjectVersion permission. -// -// - Directory bucket permissions - To grant access to this API operation -// on a directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html) -// API operation for session-based authorization. Specifically, you grant -// the s3express:CreateSession permission to the directory bucket in a bucket -// policy or an IAM identity-based policy. Then, you make the CreateSession -// API call on the bucket to obtain a session token. With the session token -// in your request header, you can make API requests to this operation. After -// the session token expires, you make another CreateSession API call to -// generate a new session token for use. Amazon Web Services CLI or SDKs -// create session and refresh the session token automatically to avoid service -// interruptions when a session expires. For more information about authorization, -// see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html). -// -// Content-MD5 request header -// -// - General purpose bucket - The Content-MD5 request header is required -// for all Multi-Object Delete requests. Amazon S3 uses the header value -// to ensure that your request body has not been altered in transit. -// -// - Directory bucket - The Content-MD5 request header or a additional checksum -// request header (including x-amz-checksum-crc32, x-amz-checksum-crc32c, -// x-amz-checksum-sha1, or x-amz-checksum-sha256) is required for all Multi-Object -// Delete requests. -// -// # HTTP Host header syntax -// -// Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. -// -// The following operations are related to DeleteObjects: -// -// - CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html) -// -// - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) -// -// - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html) -// -// - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html) -// -// - AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.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 Simple Storage Service's -// API operation DeleteObjects for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects -func (c *S3) DeleteObjects(input *DeleteObjectsInput) (*DeleteObjectsOutput, error) { - req, out := c.DeleteObjectsRequest(input) - return out, req.Send() -} - -// DeleteObjectsWithContext is the same as DeleteObjects with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteObjects 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 *S3) DeleteObjectsWithContext(ctx aws.Context, input *DeleteObjectsInput, opts ...request.Option) (*DeleteObjectsOutput, error) { - req, out := c.DeleteObjectsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeletePublicAccessBlock = "DeletePublicAccessBlock" - -// DeletePublicAccessBlockRequest generates a "aws/request.Request" representing the -// client's request for the DeletePublicAccessBlock 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 DeletePublicAccessBlock for more information on using the DeletePublicAccessBlock -// 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 DeletePublicAccessBlockRequest method. -// req, resp := client.DeletePublicAccessBlockRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeletePublicAccessBlock -func (c *S3) DeletePublicAccessBlockRequest(input *DeletePublicAccessBlockInput) (req *request.Request, output *DeletePublicAccessBlockOutput) { - op := &request.Operation{ - Name: opDeletePublicAccessBlock, - HTTPMethod: "DELETE", - HTTPPath: "/{Bucket}?publicAccessBlock", - } - - if input == nil { - input = &DeletePublicAccessBlockInput{} - } - - output = &DeletePublicAccessBlockOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeletePublicAccessBlock API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Removes the PublicAccessBlock configuration for an Amazon S3 bucket. To use -// this operation, you must have the s3:PutBucketPublicAccessBlock permission. -// For more information about permissions, see Permissions Related to Bucket -// Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). -// -// The following operations are related to DeletePublicAccessBlock: -// -// - Using Amazon S3 Block Public Access (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html) -// -// - GetPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html) -// -// - PutPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html) -// -// - GetBucketPolicyStatus (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketPolicyStatus.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 Simple Storage Service's -// API operation DeletePublicAccessBlock for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeletePublicAccessBlock -func (c *S3) DeletePublicAccessBlock(input *DeletePublicAccessBlockInput) (*DeletePublicAccessBlockOutput, error) { - req, out := c.DeletePublicAccessBlockRequest(input) - return out, req.Send() -} - -// DeletePublicAccessBlockWithContext is the same as DeletePublicAccessBlock with the addition of -// the ability to pass a context and additional request options. -// -// See DeletePublicAccessBlock 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 *S3) DeletePublicAccessBlockWithContext(ctx aws.Context, input *DeletePublicAccessBlockInput, opts ...request.Option) (*DeletePublicAccessBlockOutput, error) { - req, out := c.DeletePublicAccessBlockRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBucketAccelerateConfiguration = "GetBucketAccelerateConfiguration" - -// GetBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the GetBucketAccelerateConfiguration 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 GetBucketAccelerateConfiguration for more information on using the GetBucketAccelerateConfiguration -// 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 GetBucketAccelerateConfigurationRequest method. -// req, resp := client.GetBucketAccelerateConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration -func (c *S3) GetBucketAccelerateConfigurationRequest(input *GetBucketAccelerateConfigurationInput) (req *request.Request, output *GetBucketAccelerateConfigurationOutput) { - op := &request.Operation{ - Name: opGetBucketAccelerateConfiguration, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?accelerate", - } - - if input == nil { - input = &GetBucketAccelerateConfigurationInput{} - } - - output = &GetBucketAccelerateConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBucketAccelerateConfiguration API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// This implementation of the GET action uses the accelerate subresource to -// return the Transfer Acceleration state of a bucket, which is either Enabled -// or Suspended. Amazon S3 Transfer Acceleration is a bucket-level feature that -// enables you to perform faster data transfers to and from Amazon S3. -// -// To use this operation, you must have permission to perform the s3:GetAccelerateConfiguration -// action. The bucket owner has this permission by default. The bucket owner -// can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html) -// in the Amazon S3 User Guide. -// -// You set the Transfer Acceleration state of an existing bucket to Enabled -// or Suspended by using the PutBucketAccelerateConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAccelerateConfiguration.html) -// operation. -// -// A GET accelerate request does not return a state value for a bucket that -// has no transfer acceleration state. A bucket has no Transfer Acceleration -// state if a state has never been set on the bucket. -// -// For more information about transfer acceleration, see Transfer Acceleration -// (https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html) -// in the Amazon S3 User Guide. -// -// The following operations are related to GetBucketAccelerateConfiguration: -// -// - PutBucketAccelerateConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAccelerateConfiguration.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 Simple Storage Service's -// API operation GetBucketAccelerateConfiguration for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration -func (c *S3) GetBucketAccelerateConfiguration(input *GetBucketAccelerateConfigurationInput) (*GetBucketAccelerateConfigurationOutput, error) { - req, out := c.GetBucketAccelerateConfigurationRequest(input) - return out, req.Send() -} - -// GetBucketAccelerateConfigurationWithContext is the same as GetBucketAccelerateConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See GetBucketAccelerateConfiguration 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 *S3) GetBucketAccelerateConfigurationWithContext(ctx aws.Context, input *GetBucketAccelerateConfigurationInput, opts ...request.Option) (*GetBucketAccelerateConfigurationOutput, error) { - req, out := c.GetBucketAccelerateConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBucketAcl = "GetBucketAcl" - -// GetBucketAclRequest generates a "aws/request.Request" representing the -// client's request for the GetBucketAcl 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 GetBucketAcl for more information on using the GetBucketAcl -// 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 GetBucketAclRequest method. -// req, resp := client.GetBucketAclRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl -func (c *S3) GetBucketAclRequest(input *GetBucketAclInput) (req *request.Request, output *GetBucketAclOutput) { - op := &request.Operation{ - Name: opGetBucketAcl, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?acl", - } - - if input == nil { - input = &GetBucketAclInput{} - } - - output = &GetBucketAclOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBucketAcl API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// This implementation of the GET action uses the acl subresource to return -// the access control list (ACL) of a bucket. To use GET to return the ACL of -// the bucket, you must have the READ_ACP access to the bucket. If READ_ACP -// permission is granted to the anonymous user, you can return the ACL of the -// bucket without using an authorization header. -// -// When you use this API operation with an access point, provide the alias of -// the access point in place of the bucket name. -// -// When you use this API operation with an Object Lambda access point, provide -// the alias of the Object Lambda access point in place of the bucket name. -// If the Object Lambda access point alias in a request is not valid, the error -// code InvalidAccessPointAliasError is returned. For more information about -// InvalidAccessPointAliasError, see List of Error Codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList). -// -// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, -// requests to read ACLs are still supported and return the bucket-owner-full-control -// ACL with the owner being the account that created the bucket. For more information, -// see Controlling object ownership and disabling ACLs (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html) -// in the Amazon S3 User Guide. -// -// The following operations are related to GetBucketAcl: -// -// - ListObjects (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.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 Simple Storage Service's -// API operation GetBucketAcl for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl -func (c *S3) GetBucketAcl(input *GetBucketAclInput) (*GetBucketAclOutput, error) { - req, out := c.GetBucketAclRequest(input) - return out, req.Send() -} - -// GetBucketAclWithContext is the same as GetBucketAcl with the addition of -// the ability to pass a context and additional request options. -// -// See GetBucketAcl 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 *S3) GetBucketAclWithContext(ctx aws.Context, input *GetBucketAclInput, opts ...request.Option) (*GetBucketAclOutput, error) { - req, out := c.GetBucketAclRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBucketAnalyticsConfiguration = "GetBucketAnalyticsConfiguration" - -// GetBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the GetBucketAnalyticsConfiguration 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 GetBucketAnalyticsConfiguration for more information on using the GetBucketAnalyticsConfiguration -// 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 GetBucketAnalyticsConfigurationRequest method. -// req, resp := client.GetBucketAnalyticsConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration -func (c *S3) GetBucketAnalyticsConfigurationRequest(input *GetBucketAnalyticsConfigurationInput) (req *request.Request, output *GetBucketAnalyticsConfigurationOutput) { - op := &request.Operation{ - Name: opGetBucketAnalyticsConfiguration, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?analytics", - } - - if input == nil { - input = &GetBucketAnalyticsConfigurationInput{} - } - - output = &GetBucketAnalyticsConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// This implementation of the GET action returns an analytics configuration -// (identified by the analytics configuration ID) from the bucket. -// -// To use this operation, you must have permissions to perform the s3:GetAnalyticsConfiguration -// action. The bucket owner has this permission by default. The bucket owner -// can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html) -// in the Amazon S3 User Guide. -// -// For information about Amazon S3 analytics feature, see Amazon S3 Analytics -// – Storage Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html) -// in the Amazon S3 User Guide. -// -// The following operations are related to GetBucketAnalyticsConfiguration: -// -// - DeleteBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketAnalyticsConfiguration.html) -// -// - ListBucketAnalyticsConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.html) -// -// - PutBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.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 Simple Storage Service's -// API operation GetBucketAnalyticsConfiguration for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration -func (c *S3) GetBucketAnalyticsConfiguration(input *GetBucketAnalyticsConfigurationInput) (*GetBucketAnalyticsConfigurationOutput, error) { - req, out := c.GetBucketAnalyticsConfigurationRequest(input) - return out, req.Send() -} - -// GetBucketAnalyticsConfigurationWithContext is the same as GetBucketAnalyticsConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See GetBucketAnalyticsConfiguration 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 *S3) GetBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *GetBucketAnalyticsConfigurationInput, opts ...request.Option) (*GetBucketAnalyticsConfigurationOutput, error) { - req, out := c.GetBucketAnalyticsConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBucketCors = "GetBucketCors" - -// GetBucketCorsRequest generates a "aws/request.Request" representing the -// client's request for the GetBucketCors 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 GetBucketCors for more information on using the GetBucketCors -// 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 GetBucketCorsRequest method. -// req, resp := client.GetBucketCorsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors -func (c *S3) GetBucketCorsRequest(input *GetBucketCorsInput) (req *request.Request, output *GetBucketCorsOutput) { - op := &request.Operation{ - Name: opGetBucketCors, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?cors", - } - - if input == nil { - input = &GetBucketCorsInput{} - } - - output = &GetBucketCorsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBucketCors API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Returns the Cross-Origin Resource Sharing (CORS) configuration information -// set for the bucket. -// -// To use this operation, you must have permission to perform the s3:GetBucketCORS -// action. By default, the bucket owner has this permission and can grant it -// to others. -// -// When you use this API operation with an access point, provide the alias of -// the access point in place of the bucket name. -// -// When you use this API operation with an Object Lambda access point, provide -// the alias of the Object Lambda access point in place of the bucket name. -// If the Object Lambda access point alias in a request is not valid, the error -// code InvalidAccessPointAliasError is returned. For more information about -// InvalidAccessPointAliasError, see List of Error Codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList). -// -// For more information about CORS, see Enabling Cross-Origin Resource Sharing -// (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html). -// -// The following operations are related to GetBucketCors: -// -// - PutBucketCors (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketCors.html) -// -// - DeleteBucketCors (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketCors.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 Simple Storage Service's -// API operation GetBucketCors for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors -func (c *S3) GetBucketCors(input *GetBucketCorsInput) (*GetBucketCorsOutput, error) { - req, out := c.GetBucketCorsRequest(input) - return out, req.Send() -} - -// GetBucketCorsWithContext is the same as GetBucketCors with the addition of -// the ability to pass a context and additional request options. -// -// See GetBucketCors 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 *S3) GetBucketCorsWithContext(ctx aws.Context, input *GetBucketCorsInput, opts ...request.Option) (*GetBucketCorsOutput, error) { - req, out := c.GetBucketCorsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBucketEncryption = "GetBucketEncryption" - -// GetBucketEncryptionRequest generates a "aws/request.Request" representing the -// client's request for the GetBucketEncryption 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 GetBucketEncryption for more information on using the GetBucketEncryption -// 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 GetBucketEncryptionRequest method. -// req, resp := client.GetBucketEncryptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryption -func (c *S3) GetBucketEncryptionRequest(input *GetBucketEncryptionInput) (req *request.Request, output *GetBucketEncryptionOutput) { - op := &request.Operation{ - Name: opGetBucketEncryption, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?encryption", - } - - if input == nil { - input = &GetBucketEncryptionInput{} - } - - output = &GetBucketEncryptionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBucketEncryption API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Returns the default encryption configuration for an Amazon S3 bucket. By -// default, all buckets have a default encryption configuration that uses server-side -// encryption with Amazon S3 managed keys (SSE-S3). For information about the -// bucket default encryption feature, see Amazon S3 Bucket Default Encryption -// (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html) -// in the Amazon S3 User Guide. -// -// To use this operation, you must have permission to perform the s3:GetEncryptionConfiguration -// action. The bucket owner has this permission by default. The bucket owner -// can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). -// -// The following operations are related to GetBucketEncryption: -// -// - PutBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html) -// -// - DeleteBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.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 Simple Storage Service's -// API operation GetBucketEncryption for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryption -func (c *S3) GetBucketEncryption(input *GetBucketEncryptionInput) (*GetBucketEncryptionOutput, error) { - req, out := c.GetBucketEncryptionRequest(input) - return out, req.Send() -} - -// GetBucketEncryptionWithContext is the same as GetBucketEncryption with the addition of -// the ability to pass a context and additional request options. -// -// See GetBucketEncryption 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 *S3) GetBucketEncryptionWithContext(ctx aws.Context, input *GetBucketEncryptionInput, opts ...request.Option) (*GetBucketEncryptionOutput, error) { - req, out := c.GetBucketEncryptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBucketIntelligentTieringConfiguration = "GetBucketIntelligentTieringConfiguration" - -// GetBucketIntelligentTieringConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the GetBucketIntelligentTieringConfiguration 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 GetBucketIntelligentTieringConfiguration for more information on using the GetBucketIntelligentTieringConfiguration -// 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 GetBucketIntelligentTieringConfigurationRequest method. -// req, resp := client.GetBucketIntelligentTieringConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketIntelligentTieringConfiguration -func (c *S3) GetBucketIntelligentTieringConfigurationRequest(input *GetBucketIntelligentTieringConfigurationInput) (req *request.Request, output *GetBucketIntelligentTieringConfigurationOutput) { - op := &request.Operation{ - Name: opGetBucketIntelligentTieringConfiguration, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?intelligent-tiering", - } - - if input == nil { - input = &GetBucketIntelligentTieringConfigurationInput{} - } - - output = &GetBucketIntelligentTieringConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBucketIntelligentTieringConfiguration API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Gets the S3 Intelligent-Tiering configuration from the specified bucket. -// -// The S3 Intelligent-Tiering storage class is designed to optimize storage -// costs by automatically moving data to the most cost-effective storage access -// tier, without performance impact or operational overhead. S3 Intelligent-Tiering -// delivers automatic cost savings in three low latency and high throughput -// access tiers. To get the lowest storage cost on data that can be accessed -// in minutes to hours, you can choose to activate additional archiving capabilities. -// -// The S3 Intelligent-Tiering storage class is the ideal storage class for data -// with unknown, changing, or unpredictable access patterns, independent of -// object size or retention period. If the size of an object is less than 128 -// KB, it is not monitored and not eligible for auto-tiering. Smaller objects -// can be stored, but they are always charged at the Frequent Access tier rates -// in the S3 Intelligent-Tiering storage class. -// -// For more information, see Storage class for automatically optimizing frequently -// and infrequently accessed objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access). -// -// Operations related to GetBucketIntelligentTieringConfiguration include: -// -// - DeleteBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html) -// -// - PutBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html) -// -// - ListBucketIntelligentTieringConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.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 Simple Storage Service's -// API operation GetBucketIntelligentTieringConfiguration for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketIntelligentTieringConfiguration -func (c *S3) GetBucketIntelligentTieringConfiguration(input *GetBucketIntelligentTieringConfigurationInput) (*GetBucketIntelligentTieringConfigurationOutput, error) { - req, out := c.GetBucketIntelligentTieringConfigurationRequest(input) - return out, req.Send() -} - -// GetBucketIntelligentTieringConfigurationWithContext is the same as GetBucketIntelligentTieringConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See GetBucketIntelligentTieringConfiguration 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 *S3) GetBucketIntelligentTieringConfigurationWithContext(ctx aws.Context, input *GetBucketIntelligentTieringConfigurationInput, opts ...request.Option) (*GetBucketIntelligentTieringConfigurationOutput, error) { - req, out := c.GetBucketIntelligentTieringConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBucketInventoryConfiguration = "GetBucketInventoryConfiguration" - -// GetBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the GetBucketInventoryConfiguration 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 GetBucketInventoryConfiguration for more information on using the GetBucketInventoryConfiguration -// 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 GetBucketInventoryConfigurationRequest method. -// req, resp := client.GetBucketInventoryConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration -func (c *S3) GetBucketInventoryConfigurationRequest(input *GetBucketInventoryConfigurationInput) (req *request.Request, output *GetBucketInventoryConfigurationOutput) { - op := &request.Operation{ - Name: opGetBucketInventoryConfiguration, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?inventory", - } - - if input == nil { - input = &GetBucketInventoryConfigurationInput{} - } - - output = &GetBucketInventoryConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBucketInventoryConfiguration API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Returns an inventory configuration (identified by the inventory configuration -// ID) from the bucket. -// -// To use this operation, you must have permissions to perform the s3:GetInventoryConfiguration -// action. The bucket owner has this permission by default and can grant this -// permission to others. For more information about permissions, see Permissions -// Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). -// -// For information about the Amazon S3 inventory feature, see Amazon S3 Inventory -// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html). -// -// The following operations are related to GetBucketInventoryConfiguration: -// -// - DeleteBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html) -// -// - ListBucketInventoryConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.html) -// -// - PutBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.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 Simple Storage Service's -// API operation GetBucketInventoryConfiguration for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration -func (c *S3) GetBucketInventoryConfiguration(input *GetBucketInventoryConfigurationInput) (*GetBucketInventoryConfigurationOutput, error) { - req, out := c.GetBucketInventoryConfigurationRequest(input) - return out, req.Send() -} - -// GetBucketInventoryConfigurationWithContext is the same as GetBucketInventoryConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See GetBucketInventoryConfiguration 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 *S3) GetBucketInventoryConfigurationWithContext(ctx aws.Context, input *GetBucketInventoryConfigurationInput, opts ...request.Option) (*GetBucketInventoryConfigurationOutput, error) { - req, out := c.GetBucketInventoryConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBucketLifecycle = "GetBucketLifecycle" - -// GetBucketLifecycleRequest generates a "aws/request.Request" representing the -// client's request for the GetBucketLifecycle 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 GetBucketLifecycle for more information on using the GetBucketLifecycle -// 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 GetBucketLifecycleRequest method. -// req, resp := client.GetBucketLifecycleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle -// -// Deprecated: GetBucketLifecycle has been deprecated -func (c *S3) GetBucketLifecycleRequest(input *GetBucketLifecycleInput) (req *request.Request, output *GetBucketLifecycleOutput) { - if c.Client.Config.Logger != nil { - c.Client.Config.Logger.Log("This operation, GetBucketLifecycle, has been deprecated") - } - op := &request.Operation{ - Name: opGetBucketLifecycle, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?lifecycle", - } - - if input == nil { - input = &GetBucketLifecycleInput{} - } - - output = &GetBucketLifecycleOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBucketLifecycle API operation for Amazon Simple Storage Service. -// -// For an updated version of this API, see GetBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html). -// If you configured a bucket lifecycle using the filter element, you should -// see the updated version of this topic. This topic is provided for backward -// compatibility. -// -// This operation is not supported by directory buckets. -// -// Returns the lifecycle configuration information set on the bucket. For information -// about lifecycle configuration, see Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html). -// -// To use this operation, you must have permission to perform the s3:GetLifecycleConfiguration -// action. The bucket owner has this permission by default. The bucket owner -// can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). -// -// GetBucketLifecycle has the following special error: -// -// - Error code: NoSuchLifecycleConfiguration Description: The lifecycle -// configuration does not exist. HTTP Status Code: 404 Not Found SOAP Fault -// Code Prefix: Client -// -// The following operations are related to GetBucketLifecycle: -// -// - GetBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html) -// -// - PutBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html) -// -// - DeleteBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.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 Simple Storage Service's -// API operation GetBucketLifecycle for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle -// -// Deprecated: GetBucketLifecycle has been deprecated -func (c *S3) GetBucketLifecycle(input *GetBucketLifecycleInput) (*GetBucketLifecycleOutput, error) { - req, out := c.GetBucketLifecycleRequest(input) - return out, req.Send() -} - -// GetBucketLifecycleWithContext is the same as GetBucketLifecycle with the addition of -// the ability to pass a context and additional request options. -// -// See GetBucketLifecycle 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: GetBucketLifecycleWithContext has been deprecated -func (c *S3) GetBucketLifecycleWithContext(ctx aws.Context, input *GetBucketLifecycleInput, opts ...request.Option) (*GetBucketLifecycleOutput, error) { - req, out := c.GetBucketLifecycleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBucketLifecycleConfiguration = "GetBucketLifecycleConfiguration" - -// GetBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the GetBucketLifecycleConfiguration 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 GetBucketLifecycleConfiguration for more information on using the GetBucketLifecycleConfiguration -// 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 GetBucketLifecycleConfigurationRequest method. -// req, resp := client.GetBucketLifecycleConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration -func (c *S3) GetBucketLifecycleConfigurationRequest(input *GetBucketLifecycleConfigurationInput) (req *request.Request, output *GetBucketLifecycleConfigurationOutput) { - op := &request.Operation{ - Name: opGetBucketLifecycleConfiguration, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?lifecycle", - } - - if input == nil { - input = &GetBucketLifecycleConfigurationInput{} - } - - output = &GetBucketLifecycleConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBucketLifecycleConfiguration API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Bucket lifecycle configuration now supports specifying a lifecycle rule using -// an object key name prefix, one or more object tags, object size, or any combination -// of these. Accordingly, this section describes the latest API. The previous -// version of the API supported filtering based only on an object key name prefix, -// which is supported for backward compatibility. For the related API description, -// see GetBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html). -// Accordingly, this section describes the latest API. The response describes -// the new filter element that you can use to specify a filter to select a subset -// of objects to which the rule applies. If you are using a previous version -// of the lifecycle configuration, it still works. For the earlier action, -// -// Returns the lifecycle configuration information set on the bucket. For information -// about lifecycle configuration, see Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html). -// -// To use this operation, you must have permission to perform the s3:GetLifecycleConfiguration -// action. The bucket owner has this permission, by default. The bucket owner -// can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). -// -// GetBucketLifecycleConfiguration has the following special error: -// -// - Error code: NoSuchLifecycleConfiguration Description: The lifecycle -// configuration does not exist. HTTP Status Code: 404 Not Found SOAP Fault -// Code Prefix: Client -// -// The following operations are related to GetBucketLifecycleConfiguration: -// -// - GetBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html) -// -// - PutBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html) -// -// - DeleteBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.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 Simple Storage Service's -// API operation GetBucketLifecycleConfiguration for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration -func (c *S3) GetBucketLifecycleConfiguration(input *GetBucketLifecycleConfigurationInput) (*GetBucketLifecycleConfigurationOutput, error) { - req, out := c.GetBucketLifecycleConfigurationRequest(input) - return out, req.Send() -} - -// GetBucketLifecycleConfigurationWithContext is the same as GetBucketLifecycleConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See GetBucketLifecycleConfiguration 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 *S3) GetBucketLifecycleConfigurationWithContext(ctx aws.Context, input *GetBucketLifecycleConfigurationInput, opts ...request.Option) (*GetBucketLifecycleConfigurationOutput, error) { - req, out := c.GetBucketLifecycleConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBucketLocation = "GetBucketLocation" - -// GetBucketLocationRequest generates a "aws/request.Request" representing the -// client's request for the GetBucketLocation 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 GetBucketLocation for more information on using the GetBucketLocation -// 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 GetBucketLocationRequest method. -// req, resp := client.GetBucketLocationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation -func (c *S3) GetBucketLocationRequest(input *GetBucketLocationInput) (req *request.Request, output *GetBucketLocationOutput) { - op := &request.Operation{ - Name: opGetBucketLocation, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?location", - } - - if input == nil { - input = &GetBucketLocationInput{} - } - - output = &GetBucketLocationOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBucketLocation API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Returns the Region the bucket resides in. You set the bucket's Region using -// the LocationConstraint request parameter in a CreateBucket request. For more -// information, see CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html). -// -// When you use this API operation with an access point, provide the alias of -// the access point in place of the bucket name. -// -// When you use this API operation with an Object Lambda access point, provide -// the alias of the Object Lambda access point in place of the bucket name. -// If the Object Lambda access point alias in a request is not valid, the error -// code InvalidAccessPointAliasError is returned. For more information about -// InvalidAccessPointAliasError, see List of Error Codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList). -// -// We recommend that you use HeadBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadBucket.html) -// to return the Region that a bucket resides in. For backward compatibility, -// Amazon S3 continues to support GetBucketLocation. -// -// The following operations are related to GetBucketLocation: -// -// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html) -// -// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.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 Simple Storage Service's -// API operation GetBucketLocation for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation -func (c *S3) GetBucketLocation(input *GetBucketLocationInput) (*GetBucketLocationOutput, error) { - req, out := c.GetBucketLocationRequest(input) - return out, req.Send() -} - -// GetBucketLocationWithContext is the same as GetBucketLocation with the addition of -// the ability to pass a context and additional request options. -// -// See GetBucketLocation 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 *S3) GetBucketLocationWithContext(ctx aws.Context, input *GetBucketLocationInput, opts ...request.Option) (*GetBucketLocationOutput, error) { - req, out := c.GetBucketLocationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBucketLogging = "GetBucketLogging" - -// GetBucketLoggingRequest generates a "aws/request.Request" representing the -// client's request for the GetBucketLogging 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 GetBucketLogging for more information on using the GetBucketLogging -// 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 GetBucketLoggingRequest method. -// req, resp := client.GetBucketLoggingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging -func (c *S3) GetBucketLoggingRequest(input *GetBucketLoggingInput) (req *request.Request, output *GetBucketLoggingOutput) { - op := &request.Operation{ - Name: opGetBucketLogging, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?logging", - } - - if input == nil { - input = &GetBucketLoggingInput{} - } - - output = &GetBucketLoggingOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBucketLogging API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Returns the logging status of a bucket and the permissions users have to -// view and modify that status. -// -// The following operations are related to GetBucketLogging: -// -// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html) -// -// - PutBucketLogging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLogging.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 Simple Storage Service's -// API operation GetBucketLogging for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging -func (c *S3) GetBucketLogging(input *GetBucketLoggingInput) (*GetBucketLoggingOutput, error) { - req, out := c.GetBucketLoggingRequest(input) - return out, req.Send() -} - -// GetBucketLoggingWithContext is the same as GetBucketLogging with the addition of -// the ability to pass a context and additional request options. -// -// See GetBucketLogging 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 *S3) GetBucketLoggingWithContext(ctx aws.Context, input *GetBucketLoggingInput, opts ...request.Option) (*GetBucketLoggingOutput, error) { - req, out := c.GetBucketLoggingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBucketMetricsConfiguration = "GetBucketMetricsConfiguration" - -// GetBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the GetBucketMetricsConfiguration 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 GetBucketMetricsConfiguration for more information on using the GetBucketMetricsConfiguration -// 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 GetBucketMetricsConfigurationRequest method. -// req, resp := client.GetBucketMetricsConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration -func (c *S3) GetBucketMetricsConfigurationRequest(input *GetBucketMetricsConfigurationInput) (req *request.Request, output *GetBucketMetricsConfigurationOutput) { - op := &request.Operation{ - Name: opGetBucketMetricsConfiguration, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?metrics", - } - - if input == nil { - input = &GetBucketMetricsConfigurationInput{} - } - - output = &GetBucketMetricsConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBucketMetricsConfiguration API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Gets a metrics configuration (specified by the metrics configuration ID) -// from the bucket. Note that this doesn't include the daily storage metrics. -// -// To use this operation, you must have permissions to perform the s3:GetMetricsConfiguration -// action. The bucket owner has this permission by default. The bucket owner -// can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). -// -// For information about CloudWatch request metrics for Amazon S3, see Monitoring -// Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html). -// -// The following operations are related to GetBucketMetricsConfiguration: -// -// - PutBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html) -// -// - DeleteBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.html) -// -// - ListBucketMetricsConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html) -// -// - Monitoring Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.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 Simple Storage Service's -// API operation GetBucketMetricsConfiguration for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration -func (c *S3) GetBucketMetricsConfiguration(input *GetBucketMetricsConfigurationInput) (*GetBucketMetricsConfigurationOutput, error) { - req, out := c.GetBucketMetricsConfigurationRequest(input) - return out, req.Send() -} - -// GetBucketMetricsConfigurationWithContext is the same as GetBucketMetricsConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See GetBucketMetricsConfiguration 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 *S3) GetBucketMetricsConfigurationWithContext(ctx aws.Context, input *GetBucketMetricsConfigurationInput, opts ...request.Option) (*GetBucketMetricsConfigurationOutput, error) { - req, out := c.GetBucketMetricsConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBucketNotification = "GetBucketNotification" - -// GetBucketNotificationRequest generates a "aws/request.Request" representing the -// client's request for the GetBucketNotification 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 GetBucketNotification for more information on using the GetBucketNotification -// 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 GetBucketNotificationRequest method. -// req, resp := client.GetBucketNotificationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification -// -// Deprecated: GetBucketNotification has been deprecated -func (c *S3) GetBucketNotificationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfigurationDeprecated) { - if c.Client.Config.Logger != nil { - c.Client.Config.Logger.Log("This operation, GetBucketNotification, has been deprecated") - } - op := &request.Operation{ - Name: opGetBucketNotification, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?notification", - } - - if input == nil { - input = &GetBucketNotificationConfigurationRequest{} - } - - output = &NotificationConfigurationDeprecated{} - req = c.newRequest(op, input, output) - return -} - -// GetBucketNotification API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// No longer used, see GetBucketNotificationConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketNotificationConfiguration.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 Simple Storage Service's -// API operation GetBucketNotification for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification -// -// Deprecated: GetBucketNotification has been deprecated -func (c *S3) GetBucketNotification(input *GetBucketNotificationConfigurationRequest) (*NotificationConfigurationDeprecated, error) { - req, out := c.GetBucketNotificationRequest(input) - return out, req.Send() -} - -// GetBucketNotificationWithContext is the same as GetBucketNotification with the addition of -// the ability to pass a context and additional request options. -// -// See GetBucketNotification 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: GetBucketNotificationWithContext has been deprecated -func (c *S3) GetBucketNotificationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfigurationDeprecated, error) { - req, out := c.GetBucketNotificationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBucketNotificationConfiguration = "GetBucketNotificationConfiguration" - -// GetBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the GetBucketNotificationConfiguration 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 GetBucketNotificationConfiguration for more information on using the GetBucketNotificationConfiguration -// 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 GetBucketNotificationConfigurationRequest method. -// req, resp := client.GetBucketNotificationConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration -func (c *S3) GetBucketNotificationConfigurationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfiguration) { - op := &request.Operation{ - Name: opGetBucketNotificationConfiguration, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?notification", - } - - if input == nil { - input = &GetBucketNotificationConfigurationRequest{} - } - - output = &NotificationConfiguration{} - req = c.newRequest(op, input, output) - return -} - -// GetBucketNotificationConfiguration API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Returns the notification configuration of a bucket. -// -// If notifications are not enabled on the bucket, the action returns an empty -// NotificationConfiguration element. -// -// By default, you must be the bucket owner to read the notification configuration -// of a bucket. However, the bucket owner can use a bucket policy to grant permission -// to other users to read this configuration with the s3:GetBucketNotification -// permission. -// -// When you use this API operation with an access point, provide the alias of -// the access point in place of the bucket name. -// -// When you use this API operation with an Object Lambda access point, provide -// the alias of the Object Lambda access point in place of the bucket name. -// If the Object Lambda access point alias in a request is not valid, the error -// code InvalidAccessPointAliasError is returned. For more information about -// InvalidAccessPointAliasError, see List of Error Codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList). -// -// For more information about setting and reading the notification configuration -// on a bucket, see Setting Up Notification of Bucket Events (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html). -// For more information about bucket policies, see Using Bucket Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html). -// -// The following action is related to GetBucketNotification: -// -// - PutBucketNotification (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketNotification.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 Simple Storage Service's -// API operation GetBucketNotificationConfiguration for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration -func (c *S3) GetBucketNotificationConfiguration(input *GetBucketNotificationConfigurationRequest) (*NotificationConfiguration, error) { - req, out := c.GetBucketNotificationConfigurationRequest(input) - return out, req.Send() -} - -// GetBucketNotificationConfigurationWithContext is the same as GetBucketNotificationConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See GetBucketNotificationConfiguration 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 *S3) GetBucketNotificationConfigurationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfiguration, error) { - req, out := c.GetBucketNotificationConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBucketOwnershipControls = "GetBucketOwnershipControls" - -// GetBucketOwnershipControlsRequest generates a "aws/request.Request" representing the -// client's request for the GetBucketOwnershipControls 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 GetBucketOwnershipControls for more information on using the GetBucketOwnershipControls -// 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 GetBucketOwnershipControlsRequest method. -// req, resp := client.GetBucketOwnershipControlsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketOwnershipControls -func (c *S3) GetBucketOwnershipControlsRequest(input *GetBucketOwnershipControlsInput) (req *request.Request, output *GetBucketOwnershipControlsOutput) { - op := &request.Operation{ - Name: opGetBucketOwnershipControls, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?ownershipControls", - } - - if input == nil { - input = &GetBucketOwnershipControlsInput{} - } - - output = &GetBucketOwnershipControlsOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBucketOwnershipControls API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Retrieves OwnershipControls for an Amazon S3 bucket. To use this operation, -// you must have the s3:GetBucketOwnershipControls permission. For more information -// about Amazon S3 permissions, see Specifying permissions in a policy (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html). -// -// For information about Amazon S3 Object Ownership, see Using Object Ownership -// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html). -// -// The following operations are related to GetBucketOwnershipControls: -// -// - PutBucketOwnershipControls -// -// - DeleteBucketOwnershipControls -// -// 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 Simple Storage Service's -// API operation GetBucketOwnershipControls for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketOwnershipControls -func (c *S3) GetBucketOwnershipControls(input *GetBucketOwnershipControlsInput) (*GetBucketOwnershipControlsOutput, error) { - req, out := c.GetBucketOwnershipControlsRequest(input) - return out, req.Send() -} - -// GetBucketOwnershipControlsWithContext is the same as GetBucketOwnershipControls with the addition of -// the ability to pass a context and additional request options. -// -// See GetBucketOwnershipControls 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 *S3) GetBucketOwnershipControlsWithContext(ctx aws.Context, input *GetBucketOwnershipControlsInput, opts ...request.Option) (*GetBucketOwnershipControlsOutput, error) { - req, out := c.GetBucketOwnershipControlsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBucketPolicy = "GetBucketPolicy" - -// GetBucketPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetBucketPolicy 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 GetBucketPolicy for more information on using the GetBucketPolicy -// 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 GetBucketPolicyRequest method. -// req, resp := client.GetBucketPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy -func (c *S3) GetBucketPolicyRequest(input *GetBucketPolicyInput) (req *request.Request, output *GetBucketPolicyOutput) { - op := &request.Operation{ - Name: opGetBucketPolicy, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?policy", - } - - if input == nil { - input = &GetBucketPolicyInput{} - } - - output = &GetBucketPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBucketPolicy API operation for Amazon Simple Storage Service. -// -// Returns the policy of a specified bucket. -// -// Directory buckets - For directory buckets, you must make requests for this -// API operation to the Regional endpoint. These endpoints support path-style -// requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name -// . Virtual-hosted-style requests aren't supported. For more information, see -// Regional and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html) -// in the Amazon S3 User Guide. -// -// # Permissions -// -// If you are using an identity other than the root user of the Amazon Web Services -// account that owns the bucket, the calling identity must both have the GetBucketPolicy -// permissions on the specified bucket and belong to the bucket owner's account -// in order to use this operation. -// -// If you don't have GetBucketPolicy permissions, Amazon S3 returns a 403 Access -// Denied error. If you have the correct permissions, but you're not using an -// identity that belongs to the bucket owner's account, Amazon S3 returns a -// 405 Method Not Allowed error. -// -// To ensure that bucket owners don't inadvertently lock themselves out of their -// own buckets, the root principal in a bucket owner's Amazon Web Services account -// can perform the GetBucketPolicy, PutBucketPolicy, and DeleteBucketPolicy -// API actions, even if their bucket policy explicitly denies the root principal's -// access. Bucket owner root principals can only be blocked from performing -// these API actions by VPC endpoint policies and Amazon Web Services Organizations -// policies. -// -// - General purpose bucket permissions - The s3:GetBucketPolicy permission -// is required in a policy. For more information about general purpose buckets -// bucket policies, see Using Bucket Policies and User Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html) -// in the Amazon S3 User Guide. -// -// - Directory bucket permissions - To grant access to this API operation, -// you must have the s3express:GetBucketPolicy permission in an IAM identity-based -// policy instead of a bucket policy. Cross-account access to this API operation -// isn't supported. This operation can only be performed by the Amazon Web -// Services account that owns the resource. For more information about directory -// bucket policies and permissions, see Amazon Web Services Identity and -// Access Management (IAM) for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html) -// in the Amazon S3 User Guide. -// -// # Example bucket policies -// -// General purpose buckets example bucket policies - See Bucket policy examples -// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html) -// in the Amazon S3 User Guide. -// -// Directory bucket example bucket policies - See Example bucket policies for -// S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html) -// in the Amazon S3 User Guide. -// -// # HTTP Host header syntax -// -// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. -// -// The following action is related to GetBucketPolicy: -// -// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.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 Simple Storage Service's -// API operation GetBucketPolicy for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy -func (c *S3) GetBucketPolicy(input *GetBucketPolicyInput) (*GetBucketPolicyOutput, error) { - req, out := c.GetBucketPolicyRequest(input) - return out, req.Send() -} - -// GetBucketPolicyWithContext is the same as GetBucketPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetBucketPolicy 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 *S3) GetBucketPolicyWithContext(ctx aws.Context, input *GetBucketPolicyInput, opts ...request.Option) (*GetBucketPolicyOutput, error) { - req, out := c.GetBucketPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBucketPolicyStatus = "GetBucketPolicyStatus" - -// GetBucketPolicyStatusRequest generates a "aws/request.Request" representing the -// client's request for the GetBucketPolicyStatus 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 GetBucketPolicyStatus for more information on using the GetBucketPolicyStatus -// 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 GetBucketPolicyStatusRequest method. -// req, resp := client.GetBucketPolicyStatusRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyStatus -func (c *S3) GetBucketPolicyStatusRequest(input *GetBucketPolicyStatusInput) (req *request.Request, output *GetBucketPolicyStatusOutput) { - op := &request.Operation{ - Name: opGetBucketPolicyStatus, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?policyStatus", - } - - if input == nil { - input = &GetBucketPolicyStatusInput{} - } - - output = &GetBucketPolicyStatusOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBucketPolicyStatus API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Retrieves the policy status for an Amazon S3 bucket, indicating whether the -// bucket is public. In order to use this operation, you must have the s3:GetBucketPolicyStatus -// permission. For more information about Amazon S3 permissions, see Specifying -// Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html). -// -// For more information about when Amazon S3 considers a bucket public, see -// The Meaning of "Public" (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status). -// -// The following operations are related to GetBucketPolicyStatus: -// -// - Using Amazon S3 Block Public Access (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html) -// -// - GetPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html) -// -// - PutPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html) -// -// - DeletePublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.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 Simple Storage Service's -// API operation GetBucketPolicyStatus for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyStatus -func (c *S3) GetBucketPolicyStatus(input *GetBucketPolicyStatusInput) (*GetBucketPolicyStatusOutput, error) { - req, out := c.GetBucketPolicyStatusRequest(input) - return out, req.Send() -} - -// GetBucketPolicyStatusWithContext is the same as GetBucketPolicyStatus with the addition of -// the ability to pass a context and additional request options. -// -// See GetBucketPolicyStatus 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 *S3) GetBucketPolicyStatusWithContext(ctx aws.Context, input *GetBucketPolicyStatusInput, opts ...request.Option) (*GetBucketPolicyStatusOutput, error) { - req, out := c.GetBucketPolicyStatusRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBucketReplication = "GetBucketReplication" - -// GetBucketReplicationRequest generates a "aws/request.Request" representing the -// client's request for the GetBucketReplication 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 GetBucketReplication for more information on using the GetBucketReplication -// 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 GetBucketReplicationRequest method. -// req, resp := client.GetBucketReplicationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication -func (c *S3) GetBucketReplicationRequest(input *GetBucketReplicationInput) (req *request.Request, output *GetBucketReplicationOutput) { - op := &request.Operation{ - Name: opGetBucketReplication, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?replication", - } - - if input == nil { - input = &GetBucketReplicationInput{} - } - - output = &GetBucketReplicationOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBucketReplication API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Returns the replication configuration of a bucket. -// -// It can take a while to propagate the put or delete a replication configuration -// to all Amazon S3 systems. Therefore, a get request soon after put or delete -// can return a wrong result. -// -// For information about replication configuration, see Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html) -// in the Amazon S3 User Guide. -// -// This action requires permissions for the s3:GetReplicationConfiguration action. -// For more information about permissions, see Using Bucket Policies and User -// Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html). -// -// If you include the Filter element in a replication configuration, you must -// also include the DeleteMarkerReplication and Priority elements. The response -// also returns those elements. -// -// For information about GetBucketReplication errors, see List of replication-related -// error codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ReplicationErrorCodeList) -// -// The following operations are related to GetBucketReplication: -// -// - PutBucketReplication (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketReplication.html) -// -// - DeleteBucketReplication (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketReplication.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 Simple Storage Service's -// API operation GetBucketReplication for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication -func (c *S3) GetBucketReplication(input *GetBucketReplicationInput) (*GetBucketReplicationOutput, error) { - req, out := c.GetBucketReplicationRequest(input) - return out, req.Send() -} - -// GetBucketReplicationWithContext is the same as GetBucketReplication with the addition of -// the ability to pass a context and additional request options. -// -// See GetBucketReplication 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 *S3) GetBucketReplicationWithContext(ctx aws.Context, input *GetBucketReplicationInput, opts ...request.Option) (*GetBucketReplicationOutput, error) { - req, out := c.GetBucketReplicationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBucketRequestPayment = "GetBucketRequestPayment" - -// GetBucketRequestPaymentRequest generates a "aws/request.Request" representing the -// client's request for the GetBucketRequestPayment 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 GetBucketRequestPayment for more information on using the GetBucketRequestPayment -// 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 GetBucketRequestPaymentRequest method. -// req, resp := client.GetBucketRequestPaymentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment -func (c *S3) GetBucketRequestPaymentRequest(input *GetBucketRequestPaymentInput) (req *request.Request, output *GetBucketRequestPaymentOutput) { - op := &request.Operation{ - Name: opGetBucketRequestPayment, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?requestPayment", - } - - if input == nil { - input = &GetBucketRequestPaymentInput{} - } - - output = &GetBucketRequestPaymentOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBucketRequestPayment API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Returns the request payment configuration of a bucket. To use this version -// of the operation, you must be the bucket owner. For more information, see -// Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html). -// -// The following operations are related to GetBucketRequestPayment: -// -// - ListObjects (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.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 Simple Storage Service's -// API operation GetBucketRequestPayment for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment -func (c *S3) GetBucketRequestPayment(input *GetBucketRequestPaymentInput) (*GetBucketRequestPaymentOutput, error) { - req, out := c.GetBucketRequestPaymentRequest(input) - return out, req.Send() -} - -// GetBucketRequestPaymentWithContext is the same as GetBucketRequestPayment with the addition of -// the ability to pass a context and additional request options. -// -// See GetBucketRequestPayment 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 *S3) GetBucketRequestPaymentWithContext(ctx aws.Context, input *GetBucketRequestPaymentInput, opts ...request.Option) (*GetBucketRequestPaymentOutput, error) { - req, out := c.GetBucketRequestPaymentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBucketTagging = "GetBucketTagging" - -// GetBucketTaggingRequest generates a "aws/request.Request" representing the -// client's request for the GetBucketTagging 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 GetBucketTagging for more information on using the GetBucketTagging -// 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 GetBucketTaggingRequest method. -// req, resp := client.GetBucketTaggingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging -func (c *S3) GetBucketTaggingRequest(input *GetBucketTaggingInput) (req *request.Request, output *GetBucketTaggingOutput) { - op := &request.Operation{ - Name: opGetBucketTagging, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?tagging", - } - - if input == nil { - input = &GetBucketTaggingInput{} - } - - output = &GetBucketTaggingOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBucketTagging API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Returns the tag set associated with the bucket. -// -// To use this operation, you must have permission to perform the s3:GetBucketTagging -// action. By default, the bucket owner has this permission and can grant this -// permission to others. -// -// GetBucketTagging has the following special error: -// -// - Error code: NoSuchTagSet Description: There is no tag set associated -// with the bucket. -// -// The following operations are related to GetBucketTagging: -// -// - PutBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketTagging.html) -// -// - DeleteBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketTagging.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 Simple Storage Service's -// API operation GetBucketTagging for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging -func (c *S3) GetBucketTagging(input *GetBucketTaggingInput) (*GetBucketTaggingOutput, error) { - req, out := c.GetBucketTaggingRequest(input) - return out, req.Send() -} - -// GetBucketTaggingWithContext is the same as GetBucketTagging with the addition of -// the ability to pass a context and additional request options. -// -// See GetBucketTagging 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 *S3) GetBucketTaggingWithContext(ctx aws.Context, input *GetBucketTaggingInput, opts ...request.Option) (*GetBucketTaggingOutput, error) { - req, out := c.GetBucketTaggingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBucketVersioning = "GetBucketVersioning" - -// GetBucketVersioningRequest generates a "aws/request.Request" representing the -// client's request for the GetBucketVersioning 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 GetBucketVersioning for more information on using the GetBucketVersioning -// 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 GetBucketVersioningRequest method. -// req, resp := client.GetBucketVersioningRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning -func (c *S3) GetBucketVersioningRequest(input *GetBucketVersioningInput) (req *request.Request, output *GetBucketVersioningOutput) { - op := &request.Operation{ - Name: opGetBucketVersioning, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?versioning", - } - - if input == nil { - input = &GetBucketVersioningInput{} - } - - output = &GetBucketVersioningOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBucketVersioning API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Returns the versioning state of a bucket. -// -// To retrieve the versioning state of a bucket, you must be the bucket owner. -// -// This implementation also returns the MFA Delete status of the versioning -// state. If the MFA Delete status is enabled, the bucket owner must use an -// authentication device to change the versioning state of the bucket. -// -// The following operations are related to GetBucketVersioning: -// -// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html) -// -// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html) -// -// - DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.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 Simple Storage Service's -// API operation GetBucketVersioning for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning -func (c *S3) GetBucketVersioning(input *GetBucketVersioningInput) (*GetBucketVersioningOutput, error) { - req, out := c.GetBucketVersioningRequest(input) - return out, req.Send() -} - -// GetBucketVersioningWithContext is the same as GetBucketVersioning with the addition of -// the ability to pass a context and additional request options. -// -// See GetBucketVersioning 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 *S3) GetBucketVersioningWithContext(ctx aws.Context, input *GetBucketVersioningInput, opts ...request.Option) (*GetBucketVersioningOutput, error) { - req, out := c.GetBucketVersioningRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetBucketWebsite = "GetBucketWebsite" - -// GetBucketWebsiteRequest generates a "aws/request.Request" representing the -// client's request for the GetBucketWebsite 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 GetBucketWebsite for more information on using the GetBucketWebsite -// 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 GetBucketWebsiteRequest method. -// req, resp := client.GetBucketWebsiteRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite -func (c *S3) GetBucketWebsiteRequest(input *GetBucketWebsiteInput) (req *request.Request, output *GetBucketWebsiteOutput) { - op := &request.Operation{ - Name: opGetBucketWebsite, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?website", - } - - if input == nil { - input = &GetBucketWebsiteInput{} - } - - output = &GetBucketWebsiteOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetBucketWebsite API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Returns the website configuration for a bucket. To host website on Amazon -// S3, you can configure a bucket as website by adding a website configuration. -// For more information about hosting websites, see Hosting Websites on Amazon -// S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html). -// -// This GET action requires the S3:GetBucketWebsite permission. By default, -// only the bucket owner can read the bucket website configuration. However, -// bucket owners can allow other users to read the website configuration by -// writing a bucket policy granting them the S3:GetBucketWebsite permission. -// -// The following operations are related to GetBucketWebsite: -// -// - DeleteBucketWebsite (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketWebsite.html) -// -// - PutBucketWebsite (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketWebsite.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 Simple Storage Service's -// API operation GetBucketWebsite for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite -func (c *S3) GetBucketWebsite(input *GetBucketWebsiteInput) (*GetBucketWebsiteOutput, error) { - req, out := c.GetBucketWebsiteRequest(input) - return out, req.Send() -} - -// GetBucketWebsiteWithContext is the same as GetBucketWebsite with the addition of -// the ability to pass a context and additional request options. -// -// See GetBucketWebsite 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 *S3) GetBucketWebsiteWithContext(ctx aws.Context, input *GetBucketWebsiteInput, opts ...request.Option) (*GetBucketWebsiteOutput, error) { - req, out := c.GetBucketWebsiteRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetObject = "GetObject" - -// GetObjectRequest generates a "aws/request.Request" representing the -// client's request for the GetObject 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 GetObject for more information on using the GetObject -// 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 GetObjectRequest method. -// req, resp := client.GetObjectRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject -func (c *S3) GetObjectRequest(input *GetObjectInput) (req *request.Request, output *GetObjectOutput) { - op := &request.Operation{ - Name: opGetObject, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}/{Key+}", - } - - if input == nil { - input = &GetObjectInput{} - } - - output = &GetObjectOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetObject API operation for Amazon Simple Storage Service. -// -// Retrieves an object from Amazon S3. -// -// In the GetObject request, specify the full key name for the object. -// -// General purpose buckets - Both the virtual-hosted-style requests and the -// path-style requests are supported. For a virtual hosted-style request example, -// if you have the object photos/2006/February/sample.jpg, specify the object -// key name as /photos/2006/February/sample.jpg. For a path-style request example, -// if you have the object photos/2006/February/sample.jpg in the bucket named -// examplebucket, specify the object key name as /examplebucket/photos/2006/February/sample.jpg. -// For more information about request types, see HTTP Host Header Bucket Specification -// (https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html#VirtualHostingSpecifyBucket) -// in the Amazon S3 User Guide. -// -// Directory buckets - Only virtual-hosted-style requests are supported. For -// a virtual hosted-style request example, if you have the object photos/2006/February/sample.jpg -// in the bucket named examplebucket--use1-az5--x-s3, specify the object key -// name as /photos/2006/February/sample.jpg. Also, when you make requests to -// this API operation, your requests are sent to the Zonal endpoint. These endpoints -// support virtual-hosted-style requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name -// . Path-style requests are not supported. For more information, see Regional -// and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html) -// in the Amazon S3 User Guide. -// -// Permissions -// -// - General purpose bucket permissions - You must have the required permissions -// in a policy. To use GetObject, you must have the READ access to the object -// (or version). If you grant READ access to the anonymous user, the GetObject -// operation returns the object without using an authorization header. For -// more information, see Specifying permissions in a policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html) -// in the Amazon S3 User Guide. If you include a versionId in your request -// header, you must have the s3:GetObjectVersion permission to access a specific -// version of an object. The s3:GetObject permission is not required in this -// scenario. If you request the current version of an object without a specific -// versionId in the request header, only the s3:GetObject permission is required. -// The s3:GetObjectVersion permission is not required in this scenario. If -// the object that you request doesn’t exist, the error that Amazon S3 -// returns depends on whether you also have the s3:ListBucket permission. -// If you have the s3:ListBucket permission on the bucket, Amazon S3 returns -// an HTTP status code 404 Not Found error. If you don’t have the s3:ListBucket -// permission, Amazon S3 returns an HTTP status code 403 Access Denied error. -// -// - Directory bucket permissions - To grant access to this API operation -// on a directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html) -// API operation for session-based authorization. Specifically, you grant -// the s3express:CreateSession permission to the directory bucket in a bucket -// policy or an IAM identity-based policy. Then, you make the CreateSession -// API call on the bucket to obtain a session token. With the session token -// in your request header, you can make API requests to this operation. After -// the session token expires, you make another CreateSession API call to -// generate a new session token for use. Amazon Web Services CLI or SDKs -// create session and refresh the session token automatically to avoid service -// interruptions when a session expires. For more information about authorization, -// see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html). -// -// # Storage classes -// -// If the object you are retrieving is stored in the S3 Glacier Flexible Retrieval -// storage class, the S3 Glacier Deep Archive storage class, the S3 Intelligent-Tiering -// Archive Access tier, or the S3 Intelligent-Tiering Deep Archive Access tier, -// before you can retrieve the object you must first restore a copy using RestoreObject -// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html). -// Otherwise, this operation returns an InvalidObjectState error. For information -// about restoring archived objects, see Restoring Archived Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html) -// in the Amazon S3 User Guide. -// -// Directory buckets - For directory buckets, only the S3 Express One Zone storage -// class is supported to store newly created objects. Unsupported storage class -// values won't write a destination object and will respond with the HTTP status -// code 400 Bad Request. -// -// # Encryption -// -// Encryption request headers, like x-amz-server-side-encryption, should not -// be sent for the GetObject requests, if your object uses server-side encryption -// with Amazon S3 managed encryption keys (SSE-S3), server-side encryption with -// Key Management Service (KMS) keys (SSE-KMS), or dual-layer server-side encryption -// with Amazon Web Services KMS keys (DSSE-KMS). If you include the header in -// your GetObject requests for the object that uses these types of keys, you’ll -// get an HTTP 400 Bad Request error. -// -// # Overriding response header values through the request -// -// There are times when you want to override certain response header values -// of a GetObject response. For example, you might override the Content-Disposition -// response header value through your GetObject request. -// -// You can override values for a set of response headers. These modified response -// header values are included only in a successful response, that is, when the -// HTTP status code 200 OK is returned. The headers you can override using the -// following query parameters in the request are a subset of the headers that -// Amazon S3 accepts when you create an object. -// -// The response headers that you can override for the GetObject response are -// Cache-Control, Content-Disposition, Content-Encoding, Content-Language, Content-Type, -// and Expires. -// -// To override values for a set of response headers in the GetObject response, -// you can use the following query parameters in the request. -// -// - response-cache-control -// -// - response-content-disposition -// -// - response-content-encoding -// -// - response-content-language -// -// - response-content-type -// -// - response-expires -// -// When you use these parameters, you must sign the request by using either -// an Authorization header or a presigned URL. These parameters cannot be used -// with an unsigned (anonymous) request. -// -// # HTTP Host header syntax -// -// Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. -// -// The following operations are related to GetObject: -// -// - ListBuckets (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html) -// -// - GetObjectAcl (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.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 Simple Storage Service's -// API operation GetObject for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeNoSuchKey "NoSuchKey" -// The specified key does not exist. -// -// - ErrCodeInvalidObjectState "InvalidObjectState" -// Object is archived and inaccessible until restored. -// -// If the object you are retrieving is stored in the S3 Glacier Flexible Retrieval -// storage class, the S3 Glacier Deep Archive storage class, the S3 Intelligent-Tiering -// Archive Access tier, or the S3 Intelligent-Tiering Deep Archive Access tier, -// before you can retrieve the object you must first restore a copy using RestoreObject -// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html). -// Otherwise, this operation returns an InvalidObjectState error. For information -// about restoring archived objects, see Restoring Archived Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html) -// in the Amazon S3 User Guide. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject -func (c *S3) GetObject(input *GetObjectInput) (*GetObjectOutput, error) { - req, out := c.GetObjectRequest(input) - return out, req.Send() -} - -// GetObjectWithContext is the same as GetObject with the addition of -// the ability to pass a context and additional request options. -// -// See GetObject 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 *S3) GetObjectWithContext(ctx aws.Context, input *GetObjectInput, opts ...request.Option) (*GetObjectOutput, error) { - req, out := c.GetObjectRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetObjectAcl = "GetObjectAcl" - -// GetObjectAclRequest generates a "aws/request.Request" representing the -// client's request for the GetObjectAcl 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 GetObjectAcl for more information on using the GetObjectAcl -// 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 GetObjectAclRequest method. -// req, resp := client.GetObjectAclRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl -func (c *S3) GetObjectAclRequest(input *GetObjectAclInput) (req *request.Request, output *GetObjectAclOutput) { - op := &request.Operation{ - Name: opGetObjectAcl, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}/{Key+}?acl", - } - - if input == nil { - input = &GetObjectAclInput{} - } - - output = &GetObjectAclOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetObjectAcl API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Returns the access control list (ACL) of an object. To use this operation, -// you must have s3:GetObjectAcl permissions or READ_ACP access to the object. -// For more information, see Mapping of ACL permissions and access policy permissions -// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#acl-access-policy-permission-mapping) -// in the Amazon S3 User Guide -// -// This functionality is not supported for Amazon S3 on Outposts. -// -// By default, GET returns ACL information about the current version of an object. -// To return ACL information about a different version, use the versionId subresource. -// -// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, -// requests to read ACLs are still supported and return the bucket-owner-full-control -// ACL with the owner being the account that created the bucket. For more information, -// see Controlling object ownership and disabling ACLs (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html) -// in the Amazon S3 User Guide. -// -// The following operations are related to GetObjectAcl: -// -// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html) -// -// - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html) -// -// - DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html) -// -// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.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 Simple Storage Service's -// API operation GetObjectAcl for usage and error information. -// -// Returned Error Codes: -// - ErrCodeNoSuchKey "NoSuchKey" -// The specified key does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl -func (c *S3) GetObjectAcl(input *GetObjectAclInput) (*GetObjectAclOutput, error) { - req, out := c.GetObjectAclRequest(input) - return out, req.Send() -} - -// GetObjectAclWithContext is the same as GetObjectAcl with the addition of -// the ability to pass a context and additional request options. -// -// See GetObjectAcl 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 *S3) GetObjectAclWithContext(ctx aws.Context, input *GetObjectAclInput, opts ...request.Option) (*GetObjectAclOutput, error) { - req, out := c.GetObjectAclRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetObjectAttributes = "GetObjectAttributes" - -// GetObjectAttributesRequest generates a "aws/request.Request" representing the -// client's request for the GetObjectAttributes 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 GetObjectAttributes for more information on using the GetObjectAttributes -// 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 GetObjectAttributesRequest method. -// req, resp := client.GetObjectAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAttributes -func (c *S3) GetObjectAttributesRequest(input *GetObjectAttributesInput) (req *request.Request, output *GetObjectAttributesOutput) { - op := &request.Operation{ - Name: opGetObjectAttributes, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}/{Key+}?attributes", - } - - if input == nil { - input = &GetObjectAttributesInput{} - } - - output = &GetObjectAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetObjectAttributes API operation for Amazon Simple Storage Service. -// -// Retrieves all the metadata from an object without returning the object itself. -// This operation is useful if you're interested only in an object's metadata. -// -// GetObjectAttributes combines the functionality of HeadObject and ListParts. -// All of the data returned with each of those individual calls can be returned -// with a single call to GetObjectAttributes. -// -// Directory buckets - For directory buckets, you must make requests for this -// API operation to the Zonal endpoint. These endpoints support virtual-hosted-style -// requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name -// . Path-style requests are not supported. For more information, see Regional -// and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html) -// in the Amazon S3 User Guide. -// -// Permissions -// -// - General purpose bucket permissions - To use GetObjectAttributes, you -// must have READ access to the object. The permissions that you need to -// use this operation with depend on whether the bucket is versioned. If -// the bucket is versioned, you need both the s3:GetObjectVersion and s3:GetObjectVersionAttributes -// permissions for this operation. If the bucket is not versioned, you need -// the s3:GetObject and s3:GetObjectAttributes permissions. For more information, -// see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html) -// in the Amazon S3 User Guide. If the object that you request does not exist, -// the error Amazon S3 returns depends on whether you also have the s3:ListBucket -// permission. If you have the s3:ListBucket permission on the bucket, Amazon -// S3 returns an HTTP status code 404 Not Found ("no such key") error. If -// you don't have the s3:ListBucket permission, Amazon S3 returns an HTTP -// status code 403 Forbidden ("access denied") error. -// -// - Directory bucket permissions - To grant access to this API operation -// on a directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html) -// API operation for session-based authorization. Specifically, you grant -// the s3express:CreateSession permission to the directory bucket in a bucket -// policy or an IAM identity-based policy. Then, you make the CreateSession -// API call on the bucket to obtain a session token. With the session token -// in your request header, you can make API requests to this operation. After -// the session token expires, you make another CreateSession API call to -// generate a new session token for use. Amazon Web Services CLI or SDKs -// create session and refresh the session token automatically to avoid service -// interruptions when a session expires. For more information about authorization, -// see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html). -// -// # Encryption -// -// Encryption request headers, like x-amz-server-side-encryption, should not -// be sent for HEAD requests if your object uses server-side encryption with -// Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption -// with Amazon Web Services KMS keys (DSSE-KMS), or server-side encryption with -// Amazon S3 managed encryption keys (SSE-S3). The x-amz-server-side-encryption -// header is used when you PUT an object to S3 and want to specify the encryption -// method. If you include this header in a GET request for an object that uses -// these types of keys, you’ll get an HTTP 400 Bad Request error. It's because -// the encryption method can't be changed when you retrieve the object. -// -// If you encrypt an object by using server-side encryption with customer-provided -// encryption keys (SSE-C) when you store the object in Amazon S3, then when -// you retrieve the metadata from the object, you must use the following headers -// to provide the encryption key for the server to be able to retrieve the object's -// metadata. The headers are: -// -// - x-amz-server-side-encryption-customer-algorithm -// -// - x-amz-server-side-encryption-customer-key -// -// - x-amz-server-side-encryption-customer-key-MD5 -// -// For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided -// Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html) -// in the Amazon S3 User Guide. -// -// Directory bucket permissions - For directory buckets, only server-side encryption -// with Amazon S3 managed keys (SSE-S3) (AES256) is supported. -// -// # Versioning -// -// Directory buckets - S3 Versioning isn't enabled and supported for directory -// buckets. For this API operation, only the null value of the version ID is -// supported by directory buckets. You can only specify null to the versionId -// query parameter in the request. -// -// # Conditional request headers -// -// Consider the following when using request headers: -// -// - If both of the If-Match and If-Unmodified-Since headers are present -// in the request as follows, then Amazon S3 returns the HTTP status code -// 200 OK and the data requested: If-Match condition evaluates to true. If-Unmodified-Since -// condition evaluates to false. For more information about conditional requests, -// see RFC 7232 (https://tools.ietf.org/html/rfc7232). -// -// - If both of the If-None-Match and If-Modified-Since headers are present -// in the request as follows, then Amazon S3 returns the HTTP status code -// 304 Not Modified: If-None-Match condition evaluates to false. If-Modified-Since -// condition evaluates to true. For more information about conditional requests, -// see RFC 7232 (https://tools.ietf.org/html/rfc7232). -// -// # HTTP Host header syntax -// -// Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. -// -// The following actions are related to GetObjectAttributes: -// -// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html) -// -// - GetObjectAcl (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html) -// -// - GetObjectLegalHold (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectLegalHold.html) -// -// - GetObjectLockConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectLockConfiguration.html) -// -// - GetObjectRetention (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectRetention.html) -// -// - GetObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html) -// -// - HeadObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadObject.html) -// -// - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.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 Simple Storage Service's -// API operation GetObjectAttributes for usage and error information. -// -// Returned Error Codes: -// - ErrCodeNoSuchKey "NoSuchKey" -// The specified key does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAttributes -func (c *S3) GetObjectAttributes(input *GetObjectAttributesInput) (*GetObjectAttributesOutput, error) { - req, out := c.GetObjectAttributesRequest(input) - return out, req.Send() -} - -// GetObjectAttributesWithContext is the same as GetObjectAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See GetObjectAttributes 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 *S3) GetObjectAttributesWithContext(ctx aws.Context, input *GetObjectAttributesInput, opts ...request.Option) (*GetObjectAttributesOutput, error) { - req, out := c.GetObjectAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetObjectLegalHold = "GetObjectLegalHold" - -// GetObjectLegalHoldRequest generates a "aws/request.Request" representing the -// client's request for the GetObjectLegalHold 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 GetObjectLegalHold for more information on using the GetObjectLegalHold -// 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 GetObjectLegalHoldRequest method. -// req, resp := client.GetObjectLegalHoldRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLegalHold -func (c *S3) GetObjectLegalHoldRequest(input *GetObjectLegalHoldInput) (req *request.Request, output *GetObjectLegalHoldOutput) { - op := &request.Operation{ - Name: opGetObjectLegalHold, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}/{Key+}?legal-hold", - } - - if input == nil { - input = &GetObjectLegalHoldInput{} - } - - output = &GetObjectLegalHoldOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetObjectLegalHold API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Gets an object's current legal hold status. For more information, see Locking -// Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html). -// -// This functionality is not supported for Amazon S3 on Outposts. -// -// The following action is related to GetObjectLegalHold: -// -// - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.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 Simple Storage Service's -// API operation GetObjectLegalHold for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLegalHold -func (c *S3) GetObjectLegalHold(input *GetObjectLegalHoldInput) (*GetObjectLegalHoldOutput, error) { - req, out := c.GetObjectLegalHoldRequest(input) - return out, req.Send() -} - -// GetObjectLegalHoldWithContext is the same as GetObjectLegalHold with the addition of -// the ability to pass a context and additional request options. -// -// See GetObjectLegalHold 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 *S3) GetObjectLegalHoldWithContext(ctx aws.Context, input *GetObjectLegalHoldInput, opts ...request.Option) (*GetObjectLegalHoldOutput, error) { - req, out := c.GetObjectLegalHoldRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetObjectLockConfiguration = "GetObjectLockConfiguration" - -// GetObjectLockConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the GetObjectLockConfiguration 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 GetObjectLockConfiguration for more information on using the GetObjectLockConfiguration -// 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 GetObjectLockConfigurationRequest method. -// req, resp := client.GetObjectLockConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLockConfiguration -func (c *S3) GetObjectLockConfigurationRequest(input *GetObjectLockConfigurationInput) (req *request.Request, output *GetObjectLockConfigurationOutput) { - op := &request.Operation{ - Name: opGetObjectLockConfiguration, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?object-lock", - } - - if input == nil { - input = &GetObjectLockConfigurationInput{} - } - - output = &GetObjectLockConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetObjectLockConfiguration API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Gets the Object Lock configuration for a bucket. The rule specified in the -// Object Lock configuration will be applied by default to every new object -// placed in the specified bucket. For more information, see Locking Objects -// (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html). -// -// The following action is related to GetObjectLockConfiguration: -// -// - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.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 Simple Storage Service's -// API operation GetObjectLockConfiguration for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLockConfiguration -func (c *S3) GetObjectLockConfiguration(input *GetObjectLockConfigurationInput) (*GetObjectLockConfigurationOutput, error) { - req, out := c.GetObjectLockConfigurationRequest(input) - return out, req.Send() -} - -// GetObjectLockConfigurationWithContext is the same as GetObjectLockConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See GetObjectLockConfiguration 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 *S3) GetObjectLockConfigurationWithContext(ctx aws.Context, input *GetObjectLockConfigurationInput, opts ...request.Option) (*GetObjectLockConfigurationOutput, error) { - req, out := c.GetObjectLockConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetObjectRetention = "GetObjectRetention" - -// GetObjectRetentionRequest generates a "aws/request.Request" representing the -// client's request for the GetObjectRetention 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 GetObjectRetention for more information on using the GetObjectRetention -// 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 GetObjectRetentionRequest method. -// req, resp := client.GetObjectRetentionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectRetention -func (c *S3) GetObjectRetentionRequest(input *GetObjectRetentionInput) (req *request.Request, output *GetObjectRetentionOutput) { - op := &request.Operation{ - Name: opGetObjectRetention, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}/{Key+}?retention", - } - - if input == nil { - input = &GetObjectRetentionInput{} - } - - output = &GetObjectRetentionOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetObjectRetention API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Retrieves an object's retention settings. For more information, see Locking -// Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html). -// -// This functionality is not supported for Amazon S3 on Outposts. -// -// The following action is related to GetObjectRetention: -// -// - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.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 Simple Storage Service's -// API operation GetObjectRetention for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectRetention -func (c *S3) GetObjectRetention(input *GetObjectRetentionInput) (*GetObjectRetentionOutput, error) { - req, out := c.GetObjectRetentionRequest(input) - return out, req.Send() -} - -// GetObjectRetentionWithContext is the same as GetObjectRetention with the addition of -// the ability to pass a context and additional request options. -// -// See GetObjectRetention 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 *S3) GetObjectRetentionWithContext(ctx aws.Context, input *GetObjectRetentionInput, opts ...request.Option) (*GetObjectRetentionOutput, error) { - req, out := c.GetObjectRetentionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetObjectTagging = "GetObjectTagging" - -// GetObjectTaggingRequest generates a "aws/request.Request" representing the -// client's request for the GetObjectTagging 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 GetObjectTagging for more information on using the GetObjectTagging -// 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 GetObjectTaggingRequest method. -// req, resp := client.GetObjectTaggingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging -func (c *S3) GetObjectTaggingRequest(input *GetObjectTaggingInput) (req *request.Request, output *GetObjectTaggingOutput) { - op := &request.Operation{ - Name: opGetObjectTagging, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}/{Key+}?tagging", - } - - if input == nil { - input = &GetObjectTaggingInput{} - } - - output = &GetObjectTaggingOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetObjectTagging API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Returns the tag-set of an object. You send the GET request against the tagging -// subresource associated with the object. -// -// To use this operation, you must have permission to perform the s3:GetObjectTagging -// action. By default, the GET action returns information about current version -// of an object. For a versioned bucket, you can have multiple versions of an -// object in your bucket. To retrieve tags of any other version, use the versionId -// query parameter. You also need permission for the s3:GetObjectVersionTagging -// action. -// -// By default, the bucket owner has this permission and can grant this permission -// to others. -// -// For information about the Amazon S3 object tagging feature, see Object Tagging -// (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html). -// -// The following actions are related to GetObjectTagging: -// -// - DeleteObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjectTagging.html) -// -// - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html) -// -// - PutObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.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 Simple Storage Service's -// API operation GetObjectTagging for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging -func (c *S3) GetObjectTagging(input *GetObjectTaggingInput) (*GetObjectTaggingOutput, error) { - req, out := c.GetObjectTaggingRequest(input) - return out, req.Send() -} - -// GetObjectTaggingWithContext is the same as GetObjectTagging with the addition of -// the ability to pass a context and additional request options. -// -// See GetObjectTagging 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 *S3) GetObjectTaggingWithContext(ctx aws.Context, input *GetObjectTaggingInput, opts ...request.Option) (*GetObjectTaggingOutput, error) { - req, out := c.GetObjectTaggingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetObjectTorrent = "GetObjectTorrent" - -// GetObjectTorrentRequest generates a "aws/request.Request" representing the -// client's request for the GetObjectTorrent 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 GetObjectTorrent for more information on using the GetObjectTorrent -// 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 GetObjectTorrentRequest method. -// req, resp := client.GetObjectTorrentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent -func (c *S3) GetObjectTorrentRequest(input *GetObjectTorrentInput) (req *request.Request, output *GetObjectTorrentOutput) { - op := &request.Operation{ - Name: opGetObjectTorrent, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}/{Key+}?torrent", - } - - if input == nil { - input = &GetObjectTorrentInput{} - } - - output = &GetObjectTorrentOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetObjectTorrent API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Returns torrent files from a bucket. BitTorrent can save you bandwidth when -// you're distributing large files. -// -// You can get torrent only for objects that are less than 5 GB in size, and -// that are not encrypted using server-side encryption with a customer-provided -// encryption key. -// -// To use GET, you must have READ access to the object. -// -// This functionality is not supported for Amazon S3 on Outposts. -// -// The following action is related to GetObjectTorrent: -// -// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.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 Simple Storage Service's -// API operation GetObjectTorrent for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent -func (c *S3) GetObjectTorrent(input *GetObjectTorrentInput) (*GetObjectTorrentOutput, error) { - req, out := c.GetObjectTorrentRequest(input) - return out, req.Send() -} - -// GetObjectTorrentWithContext is the same as GetObjectTorrent with the addition of -// the ability to pass a context and additional request options. -// -// See GetObjectTorrent 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 *S3) GetObjectTorrentWithContext(ctx aws.Context, input *GetObjectTorrentInput, opts ...request.Option) (*GetObjectTorrentOutput, error) { - req, out := c.GetObjectTorrentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetPublicAccessBlock = "GetPublicAccessBlock" - -// GetPublicAccessBlockRequest generates a "aws/request.Request" representing the -// client's request for the GetPublicAccessBlock 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 GetPublicAccessBlock for more information on using the GetPublicAccessBlock -// 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 GetPublicAccessBlockRequest method. -// req, resp := client.GetPublicAccessBlockRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetPublicAccessBlock -func (c *S3) GetPublicAccessBlockRequest(input *GetPublicAccessBlockInput) (req *request.Request, output *GetPublicAccessBlockOutput) { - op := &request.Operation{ - Name: opGetPublicAccessBlock, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?publicAccessBlock", - } - - if input == nil { - input = &GetPublicAccessBlockInput{} - } - - output = &GetPublicAccessBlockOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetPublicAccessBlock API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Retrieves the PublicAccessBlock configuration for an Amazon S3 bucket. To -// use this operation, you must have the s3:GetBucketPublicAccessBlock permission. -// For more information about Amazon S3 permissions, see Specifying Permissions -// in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html). -// -// When Amazon S3 evaluates the PublicAccessBlock configuration for a bucket -// or an object, it checks the PublicAccessBlock configuration for both the -// bucket (or the bucket that contains the object) and the bucket owner's account. -// If the PublicAccessBlock settings are different between the bucket and the -// account, Amazon S3 uses the most restrictive combination of the bucket-level -// and account-level settings. -// -// For more information about when Amazon S3 considers a bucket or an object -// public, see The Meaning of "Public" (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status). -// -// The following operations are related to GetPublicAccessBlock: -// -// - Using Amazon S3 Block Public Access (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html) -// -// - PutPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html) -// -// - GetPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html) -// -// - DeletePublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.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 Simple Storage Service's -// API operation GetPublicAccessBlock for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetPublicAccessBlock -func (c *S3) GetPublicAccessBlock(input *GetPublicAccessBlockInput) (*GetPublicAccessBlockOutput, error) { - req, out := c.GetPublicAccessBlockRequest(input) - return out, req.Send() -} - -// GetPublicAccessBlockWithContext is the same as GetPublicAccessBlock with the addition of -// the ability to pass a context and additional request options. -// -// See GetPublicAccessBlock 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 *S3) GetPublicAccessBlockWithContext(ctx aws.Context, input *GetPublicAccessBlockInput, opts ...request.Option) (*GetPublicAccessBlockOutput, error) { - req, out := c.GetPublicAccessBlockRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opHeadBucket = "HeadBucket" - -// HeadBucketRequest generates a "aws/request.Request" representing the -// client's request for the HeadBucket 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 HeadBucket for more information on using the HeadBucket -// 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 HeadBucketRequest method. -// req, resp := client.HeadBucketRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket -func (c *S3) HeadBucketRequest(input *HeadBucketInput) (req *request.Request, output *HeadBucketOutput) { - op := &request.Operation{ - Name: opHeadBucket, - HTTPMethod: "HEAD", - HTTPPath: "/{Bucket}", - } - - if input == nil { - input = &HeadBucketInput{} - } - - output = &HeadBucketOutput{} - req = c.newRequest(op, input, output) - return -} - -// HeadBucket API operation for Amazon Simple Storage Service. -// -// You can use this operation to determine if a bucket exists and if you have -// permission to access it. The action returns a 200 OK if the bucket exists -// and you have permission to access it. -// -// If the bucket does not exist or you do not have permission to access it, -// the HEAD request returns a generic 400 Bad Request, 403 Forbidden or 404 -// Not Found code. A message body is not included, so you cannot determine the -// exception beyond these HTTP response codes. -// -// Directory buckets - You must make requests for this API operation to the -// Zonal endpoint. These endpoints support virtual-hosted-style requests in -// the format https://bucket_name.s3express-az_id.region.amazonaws.com. Path-style -// requests are not supported. For more information, see Regional and Zonal -// endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html) -// in the Amazon S3 User Guide. -// -// # Authentication and authorization -// -// All HeadBucket requests must be authenticated and signed by using IAM credentials -// (access key ID and secret access key for the IAM identities). All headers -// with the x-amz- prefix, including x-amz-copy-source, must be signed. For -// more information, see REST Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html). -// -// Directory bucket - You must use IAM credentials to authenticate and authorize -// your access to the HeadBucket API operation, instead of using the temporary -// security credentials through the CreateSession API operation. -// -// Amazon Web Services CLI or SDKs handles authentication and authorization -// on your behalf. -// -// Permissions -// -// - General purpose bucket permissions - To use this operation, you must -// have permissions to perform the s3:ListBucket action. The bucket owner -// has this permission by default and can grant this permission to others. -// For more information about permissions, see Managing access permissions -// to your Amazon S3 resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html) -// in the Amazon S3 User Guide. -// -// - Directory bucket permissions - You must have the s3express:CreateSession -// permission in the Action element of a policy. By default, the session -// is in the ReadWrite mode. If you want to restrict the access, you can -// explicitly set the s3express:SessionMode condition key to ReadOnly on -// the bucket. For more information about example bucket policies, see Example -// bucket policies for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html) -// and Amazon Web Services Identity and Access Management (IAM) identity-based -// policies for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html) -// in the Amazon S3 User Guide. -// -// # HTTP Host header syntax -// -// Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. -// -// 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 Simple Storage Service's -// API operation HeadBucket for usage and error information. -// -// Returned Error Codes: -// - ErrCodeNoSuchBucket "NoSuchBucket" -// The specified bucket does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket -func (c *S3) HeadBucket(input *HeadBucketInput) (*HeadBucketOutput, error) { - req, out := c.HeadBucketRequest(input) - return out, req.Send() -} - -// HeadBucketWithContext is the same as HeadBucket with the addition of -// the ability to pass a context and additional request options. -// -// See HeadBucket 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 *S3) HeadBucketWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.Option) (*HeadBucketOutput, error) { - req, out := c.HeadBucketRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opHeadObject = "HeadObject" - -// HeadObjectRequest generates a "aws/request.Request" representing the -// client's request for the HeadObject 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 HeadObject for more information on using the HeadObject -// 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 HeadObjectRequest method. -// req, resp := client.HeadObjectRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject -func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, output *HeadObjectOutput) { - op := &request.Operation{ - Name: opHeadObject, - HTTPMethod: "HEAD", - HTTPPath: "/{Bucket}/{Key+}", - } - - if input == nil { - input = &HeadObjectInput{} - } - - output = &HeadObjectOutput{} - req = c.newRequest(op, input, output) - return -} - -// HeadObject API operation for Amazon Simple Storage Service. -// -// The HEAD operation retrieves metadata from an object without returning the -// object itself. This operation is useful if you're interested only in an object's -// metadata. -// -// A HEAD request has the same options as a GET operation on an object. The -// response is identical to the GET response except that there is no response -// body. Because of this, if the HEAD request generates an error, it returns -// a generic code, such as 400 Bad Request, 403 Forbidden, 404 Not Found, 405 -// Method Not Allowed, 412 Precondition Failed, or 304 Not Modified. It's not -// possible to retrieve the exact exception of these error codes. -// -// Request headers are limited to 8 KB in size. For more information, see Common -// Request Headers (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonRequestHeaders.html). -// -// Directory buckets - For directory buckets, you must make requests for this -// API operation to the Zonal endpoint. These endpoints support virtual-hosted-style -// requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name -// . Path-style requests are not supported. For more information, see Regional -// and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html) -// in the Amazon S3 User Guide. -// -// Permissions -// -// - General purpose bucket permissions - To use HEAD, you must have the -// s3:GetObject permission. You need the relevant read object (or version) -// permission for this operation. For more information, see Actions, resources, -// and condition keys for Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html) -// in the Amazon S3 User Guide. If the object you request doesn't exist, -// the error that Amazon S3 returns depends on whether you also have the -// s3:ListBucket permission. If you have the s3:ListBucket permission on -// the bucket, Amazon S3 returns an HTTP status code 404 Not Found error. -// If you don’t have the s3:ListBucket permission, Amazon S3 returns an -// HTTP status code 403 Forbidden error. -// -// - Directory bucket permissions - To grant access to this API operation -// on a directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html) -// API operation for session-based authorization. Specifically, you grant -// the s3express:CreateSession permission to the directory bucket in a bucket -// policy or an IAM identity-based policy. Then, you make the CreateSession -// API call on the bucket to obtain a session token. With the session token -// in your request header, you can make API requests to this operation. After -// the session token expires, you make another CreateSession API call to -// generate a new session token for use. Amazon Web Services CLI or SDKs -// create session and refresh the session token automatically to avoid service -// interruptions when a session expires. For more information about authorization, -// see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html). -// -// # Encryption -// -// Encryption request headers, like x-amz-server-side-encryption, should not -// be sent for HEAD requests if your object uses server-side encryption with -// Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption -// with Amazon Web Services KMS keys (DSSE-KMS), or server-side encryption with -// Amazon S3 managed encryption keys (SSE-S3). The x-amz-server-side-encryption -// header is used when you PUT an object to S3 and want to specify the encryption -// method. If you include this header in a HEAD request for an object that uses -// these types of keys, you’ll get an HTTP 400 Bad Request error. It's because -// the encryption method can't be changed when you retrieve the object. -// -// If you encrypt an object by using server-side encryption with customer-provided -// encryption keys (SSE-C) when you store the object in Amazon S3, then when -// you retrieve the metadata from the object, you must use the following headers -// to provide the encryption key for the server to be able to retrieve the object's -// metadata. The headers are: -// -// - x-amz-server-side-encryption-customer-algorithm -// -// - x-amz-server-side-encryption-customer-key -// -// - x-amz-server-side-encryption-customer-key-MD5 -// -// For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided -// Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html) -// in the Amazon S3 User Guide. -// -// Directory bucket permissions - For directory buckets, only server-side encryption -// with Amazon S3 managed keys (SSE-S3) (AES256) is supported. -// -// Versioning -// -// - If the current version of the object is a delete marker, Amazon S3 behaves -// as if the object was deleted and includes x-amz-delete-marker: true in -// the response. -// -// - If the specified version is a delete marker, the response returns a -// 405 Method Not Allowed error and the Last-Modified: timestamp response -// header. -// -// - Directory buckets - Delete marker is not supported by directory buckets. -// -// - Directory buckets - S3 Versioning isn't enabled and supported for directory -// buckets. For this API operation, only the null value of the version ID -// is supported by directory buckets. You can only specify null to the versionId -// query parameter in the request. -// -// # HTTP Host header syntax -// -// Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. -// -// The following actions are related to HeadObject: -// -// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html) -// -// - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html) -// -// See http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#RESTErrorResponses -// for more information on returned errors. -// -// 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 Simple Storage Service's -// API operation HeadObject for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject -func (c *S3) HeadObject(input *HeadObjectInput) (*HeadObjectOutput, error) { - req, out := c.HeadObjectRequest(input) - return out, req.Send() -} - -// HeadObjectWithContext is the same as HeadObject with the addition of -// the ability to pass a context and additional request options. -// -// See HeadObject 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 *S3) HeadObjectWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.Option) (*HeadObjectOutput, error) { - req, out := c.HeadObjectRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListBucketAnalyticsConfigurations = "ListBucketAnalyticsConfigurations" - -// ListBucketAnalyticsConfigurationsRequest generates a "aws/request.Request" representing the -// client's request for the ListBucketAnalyticsConfigurations 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 ListBucketAnalyticsConfigurations for more information on using the ListBucketAnalyticsConfigurations -// 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 ListBucketAnalyticsConfigurationsRequest method. -// req, resp := client.ListBucketAnalyticsConfigurationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations -func (c *S3) ListBucketAnalyticsConfigurationsRequest(input *ListBucketAnalyticsConfigurationsInput) (req *request.Request, output *ListBucketAnalyticsConfigurationsOutput) { - op := &request.Operation{ - Name: opListBucketAnalyticsConfigurations, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?analytics", - } - - if input == nil { - input = &ListBucketAnalyticsConfigurationsInput{} - } - - output = &ListBucketAnalyticsConfigurationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListBucketAnalyticsConfigurations API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Lists the analytics configurations for the bucket. You can have up to 1,000 -// analytics configurations per bucket. -// -// This action supports list pagination and does not return more than 100 configurations -// at a time. You should always check the IsTruncated element in the response. -// If there are no more configurations to list, IsTruncated is set to false. -// If there are more configurations to list, IsTruncated is set to true, and -// there will be a value in NextContinuationToken. You use the NextContinuationToken -// value to continue the pagination of the list by passing the value in continuation-token -// in the request to GET the next page. -// -// To use this operation, you must have permissions to perform the s3:GetAnalyticsConfiguration -// action. The bucket owner has this permission by default. The bucket owner -// can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). -// -// For information about Amazon S3 analytics feature, see Amazon S3 Analytics -// – Storage Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html). -// -// The following operations are related to ListBucketAnalyticsConfigurations: -// -// - GetBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAnalyticsConfiguration.html) -// -// - DeleteBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketAnalyticsConfiguration.html) -// -// - PutBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.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 Simple Storage Service's -// API operation ListBucketAnalyticsConfigurations for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations -func (c *S3) ListBucketAnalyticsConfigurations(input *ListBucketAnalyticsConfigurationsInput) (*ListBucketAnalyticsConfigurationsOutput, error) { - req, out := c.ListBucketAnalyticsConfigurationsRequest(input) - return out, req.Send() -} - -// ListBucketAnalyticsConfigurationsWithContext is the same as ListBucketAnalyticsConfigurations with the addition of -// the ability to pass a context and additional request options. -// -// See ListBucketAnalyticsConfigurations 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 *S3) ListBucketAnalyticsConfigurationsWithContext(ctx aws.Context, input *ListBucketAnalyticsConfigurationsInput, opts ...request.Option) (*ListBucketAnalyticsConfigurationsOutput, error) { - req, out := c.ListBucketAnalyticsConfigurationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListBucketIntelligentTieringConfigurations = "ListBucketIntelligentTieringConfigurations" - -// ListBucketIntelligentTieringConfigurationsRequest generates a "aws/request.Request" representing the -// client's request for the ListBucketIntelligentTieringConfigurations 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 ListBucketIntelligentTieringConfigurations for more information on using the ListBucketIntelligentTieringConfigurations -// 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 ListBucketIntelligentTieringConfigurationsRequest method. -// req, resp := client.ListBucketIntelligentTieringConfigurationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketIntelligentTieringConfigurations -func (c *S3) ListBucketIntelligentTieringConfigurationsRequest(input *ListBucketIntelligentTieringConfigurationsInput) (req *request.Request, output *ListBucketIntelligentTieringConfigurationsOutput) { - op := &request.Operation{ - Name: opListBucketIntelligentTieringConfigurations, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?intelligent-tiering", - } - - if input == nil { - input = &ListBucketIntelligentTieringConfigurationsInput{} - } - - output = &ListBucketIntelligentTieringConfigurationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListBucketIntelligentTieringConfigurations API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Lists the S3 Intelligent-Tiering configuration from the specified bucket. -// -// The S3 Intelligent-Tiering storage class is designed to optimize storage -// costs by automatically moving data to the most cost-effective storage access -// tier, without performance impact or operational overhead. S3 Intelligent-Tiering -// delivers automatic cost savings in three low latency and high throughput -// access tiers. To get the lowest storage cost on data that can be accessed -// in minutes to hours, you can choose to activate additional archiving capabilities. -// -// The S3 Intelligent-Tiering storage class is the ideal storage class for data -// with unknown, changing, or unpredictable access patterns, independent of -// object size or retention period. If the size of an object is less than 128 -// KB, it is not monitored and not eligible for auto-tiering. Smaller objects -// can be stored, but they are always charged at the Frequent Access tier rates -// in the S3 Intelligent-Tiering storage class. -// -// For more information, see Storage class for automatically optimizing frequently -// and infrequently accessed objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access). -// -// Operations related to ListBucketIntelligentTieringConfigurations include: -// -// - DeleteBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html) -// -// - PutBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html) -// -// - GetBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.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 Simple Storage Service's -// API operation ListBucketIntelligentTieringConfigurations for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketIntelligentTieringConfigurations -func (c *S3) ListBucketIntelligentTieringConfigurations(input *ListBucketIntelligentTieringConfigurationsInput) (*ListBucketIntelligentTieringConfigurationsOutput, error) { - req, out := c.ListBucketIntelligentTieringConfigurationsRequest(input) - return out, req.Send() -} - -// ListBucketIntelligentTieringConfigurationsWithContext is the same as ListBucketIntelligentTieringConfigurations with the addition of -// the ability to pass a context and additional request options. -// -// See ListBucketIntelligentTieringConfigurations 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 *S3) ListBucketIntelligentTieringConfigurationsWithContext(ctx aws.Context, input *ListBucketIntelligentTieringConfigurationsInput, opts ...request.Option) (*ListBucketIntelligentTieringConfigurationsOutput, error) { - req, out := c.ListBucketIntelligentTieringConfigurationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListBucketInventoryConfigurations = "ListBucketInventoryConfigurations" - -// ListBucketInventoryConfigurationsRequest generates a "aws/request.Request" representing the -// client's request for the ListBucketInventoryConfigurations 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 ListBucketInventoryConfigurations for more information on using the ListBucketInventoryConfigurations -// 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 ListBucketInventoryConfigurationsRequest method. -// req, resp := client.ListBucketInventoryConfigurationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations -func (c *S3) ListBucketInventoryConfigurationsRequest(input *ListBucketInventoryConfigurationsInput) (req *request.Request, output *ListBucketInventoryConfigurationsOutput) { - op := &request.Operation{ - Name: opListBucketInventoryConfigurations, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?inventory", - } - - if input == nil { - input = &ListBucketInventoryConfigurationsInput{} - } - - output = &ListBucketInventoryConfigurationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListBucketInventoryConfigurations API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Returns a list of inventory configurations for the bucket. You can have up -// to 1,000 analytics configurations per bucket. -// -// This action supports list pagination and does not return more than 100 configurations -// at a time. Always check the IsTruncated element in the response. If there -// are no more configurations to list, IsTruncated is set to false. If there -// are more configurations to list, IsTruncated is set to true, and there is -// a value in NextContinuationToken. You use the NextContinuationToken value -// to continue the pagination of the list by passing the value in continuation-token -// in the request to GET the next page. -// -// To use this operation, you must have permissions to perform the s3:GetInventoryConfiguration -// action. The bucket owner has this permission by default. The bucket owner -// can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). -// -// For information about the Amazon S3 inventory feature, see Amazon S3 Inventory -// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html) -// -// The following operations are related to ListBucketInventoryConfigurations: -// -// - GetBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html) -// -// - DeleteBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html) -// -// - PutBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.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 Simple Storage Service's -// API operation ListBucketInventoryConfigurations for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations -func (c *S3) ListBucketInventoryConfigurations(input *ListBucketInventoryConfigurationsInput) (*ListBucketInventoryConfigurationsOutput, error) { - req, out := c.ListBucketInventoryConfigurationsRequest(input) - return out, req.Send() -} - -// ListBucketInventoryConfigurationsWithContext is the same as ListBucketInventoryConfigurations with the addition of -// the ability to pass a context and additional request options. -// -// See ListBucketInventoryConfigurations 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 *S3) ListBucketInventoryConfigurationsWithContext(ctx aws.Context, input *ListBucketInventoryConfigurationsInput, opts ...request.Option) (*ListBucketInventoryConfigurationsOutput, error) { - req, out := c.ListBucketInventoryConfigurationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListBucketMetricsConfigurations = "ListBucketMetricsConfigurations" - -// ListBucketMetricsConfigurationsRequest generates a "aws/request.Request" representing the -// client's request for the ListBucketMetricsConfigurations 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 ListBucketMetricsConfigurations for more information on using the ListBucketMetricsConfigurations -// 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 ListBucketMetricsConfigurationsRequest method. -// req, resp := client.ListBucketMetricsConfigurationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations -func (c *S3) ListBucketMetricsConfigurationsRequest(input *ListBucketMetricsConfigurationsInput) (req *request.Request, output *ListBucketMetricsConfigurationsOutput) { - op := &request.Operation{ - Name: opListBucketMetricsConfigurations, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?metrics", - } - - if input == nil { - input = &ListBucketMetricsConfigurationsInput{} - } - - output = &ListBucketMetricsConfigurationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListBucketMetricsConfigurations API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Lists the metrics configurations for the bucket. The metrics configurations -// are only for the request metrics of the bucket and do not provide information -// on daily storage metrics. You can have up to 1,000 configurations per bucket. -// -// This action supports list pagination and does not return more than 100 configurations -// at a time. Always check the IsTruncated element in the response. If there -// are no more configurations to list, IsTruncated is set to false. If there -// are more configurations to list, IsTruncated is set to true, and there is -// a value in NextContinuationToken. You use the NextContinuationToken value -// to continue the pagination of the list by passing the value in continuation-token -// in the request to GET the next page. -// -// To use this operation, you must have permissions to perform the s3:GetMetricsConfiguration -// action. The bucket owner has this permission by default. The bucket owner -// can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). -// -// For more information about metrics configurations and CloudWatch request -// metrics, see Monitoring Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html). -// -// The following operations are related to ListBucketMetricsConfigurations: -// -// - PutBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html) -// -// - GetBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetricsConfiguration.html) -// -// - DeleteBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.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 Simple Storage Service's -// API operation ListBucketMetricsConfigurations for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations -func (c *S3) ListBucketMetricsConfigurations(input *ListBucketMetricsConfigurationsInput) (*ListBucketMetricsConfigurationsOutput, error) { - req, out := c.ListBucketMetricsConfigurationsRequest(input) - return out, req.Send() -} - -// ListBucketMetricsConfigurationsWithContext is the same as ListBucketMetricsConfigurations with the addition of -// the ability to pass a context and additional request options. -// -// See ListBucketMetricsConfigurations 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 *S3) ListBucketMetricsConfigurationsWithContext(ctx aws.Context, input *ListBucketMetricsConfigurationsInput, opts ...request.Option) (*ListBucketMetricsConfigurationsOutput, error) { - req, out := c.ListBucketMetricsConfigurationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListBuckets = "ListBuckets" - -// ListBucketsRequest generates a "aws/request.Request" representing the -// client's request for the ListBuckets 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 ListBuckets for more information on using the ListBuckets -// 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 ListBucketsRequest method. -// req, resp := client.ListBucketsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets -func (c *S3) ListBucketsRequest(input *ListBucketsInput) (req *request.Request, output *ListBucketsOutput) { - op := &request.Operation{ - Name: opListBuckets, - HTTPMethod: "GET", - HTTPPath: "/", - } - - if input == nil { - input = &ListBucketsInput{} - } - - output = &ListBucketsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListBuckets API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Returns a list of all buckets owned by the authenticated sender of the request. -// To use this operation, you must have the s3:ListAllMyBuckets permission. -// -// For information about Amazon S3 buckets, see Creating, configuring, and working -// with Amazon S3 buckets (https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.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 Simple Storage Service's -// API operation ListBuckets for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets -func (c *S3) ListBuckets(input *ListBucketsInput) (*ListBucketsOutput, error) { - req, out := c.ListBucketsRequest(input) - return out, req.Send() -} - -// ListBucketsWithContext is the same as ListBuckets with the addition of -// the ability to pass a context and additional request options. -// -// See ListBuckets 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 *S3) ListBucketsWithContext(ctx aws.Context, input *ListBucketsInput, opts ...request.Option) (*ListBucketsOutput, error) { - req, out := c.ListBucketsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opListDirectoryBuckets = "ListDirectoryBuckets" - -// ListDirectoryBucketsRequest generates a "aws/request.Request" representing the -// client's request for the ListDirectoryBuckets 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 ListDirectoryBuckets for more information on using the ListDirectoryBuckets -// 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 ListDirectoryBucketsRequest method. -// req, resp := client.ListDirectoryBucketsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListDirectoryBuckets -func (c *S3) ListDirectoryBucketsRequest(input *ListDirectoryBucketsInput) (req *request.Request, output *ListDirectoryBucketsOutput) { - op := &request.Operation{ - Name: opListDirectoryBuckets, - HTTPMethod: "GET", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"ContinuationToken"}, - OutputTokens: []string{"ContinuationToken"}, - LimitToken: "MaxDirectoryBuckets", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListDirectoryBucketsInput{} - } - - output = &ListDirectoryBucketsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListDirectoryBuckets API operation for Amazon Simple Storage Service. -// -// Returns a list of all Amazon S3 directory buckets owned by the authenticated -// sender of the request. For more information about directory buckets, see -// Directory buckets (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-overview.html) -// in the Amazon S3 User Guide. -// -// Directory buckets - For directory buckets, you must make requests for this -// API operation to the Regional endpoint. These endpoints support path-style -// requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name -// . Virtual-hosted-style requests aren't supported. For more information, see -// Regional and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html) -// in the Amazon S3 User Guide. -// -// # Permissions -// -// You must have the s3express:ListAllMyDirectoryBuckets permission in an IAM -// identity-based policy instead of a bucket policy. Cross-account access to -// this API operation isn't supported. This operation can only be performed -// by the Amazon Web Services account that owns the resource. For more information -// about directory bucket policies and permissions, see Amazon Web Services -// Identity and Access Management (IAM) for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html) -// in the Amazon S3 User Guide. -// -// # HTTP Host header syntax -// -// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. -// -// 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 Simple Storage Service's -// API operation ListDirectoryBuckets for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListDirectoryBuckets -func (c *S3) ListDirectoryBuckets(input *ListDirectoryBucketsInput) (*ListDirectoryBucketsOutput, error) { - req, out := c.ListDirectoryBucketsRequest(input) - return out, req.Send() -} - -// ListDirectoryBucketsWithContext is the same as ListDirectoryBuckets with the addition of -// the ability to pass a context and additional request options. -// -// See ListDirectoryBuckets 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 *S3) ListDirectoryBucketsWithContext(ctx aws.Context, input *ListDirectoryBucketsInput, opts ...request.Option) (*ListDirectoryBucketsOutput, error) { - req, out := c.ListDirectoryBucketsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListDirectoryBucketsPages iterates over the pages of a ListDirectoryBuckets operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListDirectoryBuckets 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 ListDirectoryBuckets operation. -// pageNum := 0 -// err := client.ListDirectoryBucketsPages(params, -// func(page *s3.ListDirectoryBucketsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *S3) ListDirectoryBucketsPages(input *ListDirectoryBucketsInput, fn func(*ListDirectoryBucketsOutput, bool) bool) error { - return c.ListDirectoryBucketsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListDirectoryBucketsPagesWithContext same as ListDirectoryBucketsPages 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 *S3) ListDirectoryBucketsPagesWithContext(ctx aws.Context, input *ListDirectoryBucketsInput, fn func(*ListDirectoryBucketsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListDirectoryBucketsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListDirectoryBucketsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListDirectoryBucketsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListMultipartUploads = "ListMultipartUploads" - -// ListMultipartUploadsRequest generates a "aws/request.Request" representing the -// client's request for the ListMultipartUploads 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 ListMultipartUploads for more information on using the ListMultipartUploads -// 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 ListMultipartUploadsRequest method. -// req, resp := client.ListMultipartUploadsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads -func (c *S3) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) (req *request.Request, output *ListMultipartUploadsOutput) { - op := &request.Operation{ - Name: opListMultipartUploads, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?uploads", - Paginator: &request.Paginator{ - InputTokens: []string{"KeyMarker", "UploadIdMarker"}, - OutputTokens: []string{"NextKeyMarker", "NextUploadIdMarker"}, - LimitToken: "MaxUploads", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListMultipartUploadsInput{} - } - - output = &ListMultipartUploadsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListMultipartUploads API operation for Amazon Simple Storage Service. -// -// This operation lists in-progress multipart uploads in a bucket. An in-progress -// multipart upload is a multipart upload that has been initiated by the CreateMultipartUpload -// request, but has not yet been completed or aborted. -// -// Directory buckets - If multipart uploads in a directory bucket are in progress, -// you can't delete the bucket until all the in-progress multipart uploads are -// aborted or completed. -// -// The ListMultipartUploads operation returns a maximum of 1,000 multipart uploads -// in the response. The limit of 1,000 multipart uploads is also the default -// value. You can further limit the number of uploads in a response by specifying -// the max-uploads request parameter. If there are more than 1,000 multipart -// uploads that satisfy your ListMultipartUploads request, the response returns -// an IsTruncated element with the value of true, a NextKeyMarker element, and -// a NextUploadIdMarker element. To list the remaining multipart uploads, you -// need to make subsequent ListMultipartUploads requests. In these requests, -// include two query parameters: key-marker and upload-id-marker. Set the value -// of key-marker to the NextKeyMarker value from the previous response. Similarly, -// set the value of upload-id-marker to the NextUploadIdMarker value from the -// previous response. -// -// Directory buckets - The upload-id-marker element and the NextUploadIdMarker -// element aren't supported by directory buckets. To list the additional multipart -// uploads, you only need to set the value of key-marker to the NextKeyMarker -// value from the previous response. -// -// For more information about multipart uploads, see Uploading Objects Using -// Multipart Upload (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html) -// in the Amazon S3 User Guide. -// -// Directory buckets - For directory buckets, you must make requests for this -// API operation to the Zonal endpoint. These endpoints support virtual-hosted-style -// requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name -// . Path-style requests are not supported. For more information, see Regional -// and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html) -// in the Amazon S3 User Guide. -// -// Permissions -// -// - General purpose bucket permissions - For information about permissions -// required to use the multipart upload API, see Multipart Upload and Permissions -// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html) -// in the Amazon S3 User Guide. -// -// - Directory bucket permissions - To grant access to this API operation -// on a directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html) -// API operation for session-based authorization. Specifically, you grant -// the s3express:CreateSession permission to the directory bucket in a bucket -// policy or an IAM identity-based policy. Then, you make the CreateSession -// API call on the bucket to obtain a session token. With the session token -// in your request header, you can make API requests to this operation. After -// the session token expires, you make another CreateSession API call to -// generate a new session token for use. Amazon Web Services CLI or SDKs -// create session and refresh the session token automatically to avoid service -// interruptions when a session expires. For more information about authorization, -// see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html). -// -// Sorting of multipart uploads in response -// -// - General purpose bucket - In the ListMultipartUploads response, the multipart -// uploads are sorted based on two criteria: Key-based sorting - Multipart -// uploads are initially sorted in ascending order based on their object -// keys. Time-based sorting - For uploads that share the same object key, -// they are further sorted in ascending order based on the upload initiation -// time. Among uploads with the same key, the one that was initiated first -// will appear before the ones that were initiated later. -// -// - Directory bucket - In the ListMultipartUploads response, the multipart -// uploads aren't sorted lexicographically based on the object keys. -// -// # HTTP Host header syntax -// -// Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. -// -// The following operations are related to ListMultipartUploads: -// -// - CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html) -// -// - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) -// -// - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html) -// -// - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html) -// -// - AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.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 Simple Storage Service's -// API operation ListMultipartUploads for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads -func (c *S3) ListMultipartUploads(input *ListMultipartUploadsInput) (*ListMultipartUploadsOutput, error) { - req, out := c.ListMultipartUploadsRequest(input) - return out, req.Send() -} - -// ListMultipartUploadsWithContext is the same as ListMultipartUploads with the addition of -// the ability to pass a context and additional request options. -// -// See ListMultipartUploads 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 *S3) ListMultipartUploadsWithContext(ctx aws.Context, input *ListMultipartUploadsInput, opts ...request.Option) (*ListMultipartUploadsOutput, error) { - req, out := c.ListMultipartUploadsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListMultipartUploadsPages iterates over the pages of a ListMultipartUploads operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListMultipartUploads 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 ListMultipartUploads operation. -// pageNum := 0 -// err := client.ListMultipartUploadsPages(params, -// func(page *s3.ListMultipartUploadsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *S3) ListMultipartUploadsPages(input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool) error { - return c.ListMultipartUploadsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListMultipartUploadsPagesWithContext same as ListMultipartUploadsPages 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 *S3) ListMultipartUploadsPagesWithContext(ctx aws.Context, input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListMultipartUploadsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListMultipartUploadsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListMultipartUploadsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListObjectVersions = "ListObjectVersions" - -// ListObjectVersionsRequest generates a "aws/request.Request" representing the -// client's request for the ListObjectVersions 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 ListObjectVersions for more information on using the ListObjectVersions -// 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 ListObjectVersionsRequest method. -// req, resp := client.ListObjectVersionsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions -func (c *S3) ListObjectVersionsRequest(input *ListObjectVersionsInput) (req *request.Request, output *ListObjectVersionsOutput) { - op := &request.Operation{ - Name: opListObjectVersions, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?versions", - Paginator: &request.Paginator{ - InputTokens: []string{"KeyMarker", "VersionIdMarker"}, - OutputTokens: []string{"NextKeyMarker", "NextVersionIdMarker"}, - LimitToken: "MaxKeys", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListObjectVersionsInput{} - } - - output = &ListObjectVersionsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListObjectVersions API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Returns metadata about all versions of the objects in a bucket. You can also -// use request parameters as selection criteria to return metadata about a subset -// of all the object versions. -// -// To use this operation, you must have permission to perform the s3:ListBucketVersions -// action. Be aware of the name difference. -// -// A 200 OK response can contain valid or invalid XML. Make sure to design your -// application to parse the contents of the response and handle it appropriately. -// -// To use this operation, you must have READ access to the bucket. -// -// The following operations are related to ListObjectVersions: -// -// - ListObjectsV2 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html) -// -// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html) -// -// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html) -// -// - DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.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 Simple Storage Service's -// API operation ListObjectVersions for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions -func (c *S3) ListObjectVersions(input *ListObjectVersionsInput) (*ListObjectVersionsOutput, error) { - req, out := c.ListObjectVersionsRequest(input) - return out, req.Send() -} - -// ListObjectVersionsWithContext is the same as ListObjectVersions with the addition of -// the ability to pass a context and additional request options. -// -// See ListObjectVersions 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 *S3) ListObjectVersionsWithContext(ctx aws.Context, input *ListObjectVersionsInput, opts ...request.Option) (*ListObjectVersionsOutput, error) { - req, out := c.ListObjectVersionsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListObjectVersionsPages iterates over the pages of a ListObjectVersions operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListObjectVersions 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 ListObjectVersions operation. -// pageNum := 0 -// err := client.ListObjectVersionsPages(params, -// func(page *s3.ListObjectVersionsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *S3) ListObjectVersionsPages(input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool) error { - return c.ListObjectVersionsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListObjectVersionsPagesWithContext same as ListObjectVersionsPages 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 *S3) ListObjectVersionsPagesWithContext(ctx aws.Context, input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListObjectVersionsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListObjectVersionsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListObjectVersionsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListObjects = "ListObjects" - -// ListObjectsRequest generates a "aws/request.Request" representing the -// client's request for the ListObjects 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 ListObjects for more information on using the ListObjects -// 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 ListObjectsRequest method. -// req, resp := client.ListObjectsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects -func (c *S3) ListObjectsRequest(input *ListObjectsInput) (req *request.Request, output *ListObjectsOutput) { - op := &request.Operation{ - Name: opListObjects, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"NextMarker || Contents[-1].Key"}, - LimitToken: "MaxKeys", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListObjectsInput{} - } - - output = &ListObjectsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListObjects API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Returns some or all (up to 1,000) of the objects in a bucket. You can use -// the request parameters as selection criteria to return a subset of the objects -// in a bucket. A 200 OK response can contain valid or invalid XML. Be sure -// to design your application to parse the contents of the response and handle -// it appropriately. -// -// This action has been revised. We recommend that you use the newer version, -// ListObjectsV2 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html), -// when developing applications. For backward compatibility, Amazon S3 continues -// to support ListObjects. -// -// The following operations are related to ListObjects: -// -// - ListObjectsV2 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html) -// -// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html) -// -// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html) -// -// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html) -// -// - ListBuckets (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.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 Simple Storage Service's -// API operation ListObjects for usage and error information. -// -// Returned Error Codes: -// - ErrCodeNoSuchBucket "NoSuchBucket" -// The specified bucket does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects -func (c *S3) ListObjects(input *ListObjectsInput) (*ListObjectsOutput, error) { - req, out := c.ListObjectsRequest(input) - return out, req.Send() -} - -// ListObjectsWithContext is the same as ListObjects with the addition of -// the ability to pass a context and additional request options. -// -// See ListObjects 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 *S3) ListObjectsWithContext(ctx aws.Context, input *ListObjectsInput, opts ...request.Option) (*ListObjectsOutput, error) { - req, out := c.ListObjectsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListObjectsPages iterates over the pages of a ListObjects operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListObjects 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 ListObjects operation. -// pageNum := 0 -// err := client.ListObjectsPages(params, -// func(page *s3.ListObjectsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *S3) ListObjectsPages(input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool) error { - return c.ListObjectsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListObjectsPagesWithContext same as ListObjectsPages 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 *S3) ListObjectsPagesWithContext(ctx aws.Context, input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListObjectsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListObjectsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListObjectsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListObjectsV2 = "ListObjectsV2" - -// ListObjectsV2Request generates a "aws/request.Request" representing the -// client's request for the ListObjectsV2 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 ListObjectsV2 for more information on using the ListObjectsV2 -// 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 ListObjectsV2Request method. -// req, resp := client.ListObjectsV2Request(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2 -func (c *S3) ListObjectsV2Request(input *ListObjectsV2Input) (req *request.Request, output *ListObjectsV2Output) { - op := &request.Operation{ - Name: opListObjectsV2, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?list-type=2", - Paginator: &request.Paginator{ - InputTokens: []string{"ContinuationToken"}, - OutputTokens: []string{"NextContinuationToken"}, - LimitToken: "MaxKeys", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListObjectsV2Input{} - } - - output = &ListObjectsV2Output{} - req = c.newRequest(op, input, output) - return -} - -// ListObjectsV2 API operation for Amazon Simple Storage Service. -// -// Returns some or all (up to 1,000) of the objects in a bucket with each request. -// You can use the request parameters as selection criteria to return a subset -// of the objects in a bucket. A 200 OK response can contain valid or invalid -// XML. Make sure to design your application to parse the contents of the response -// and handle it appropriately. For more information about listing objects, -// see Listing object keys programmatically (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ListingKeysUsingAPIs.html) -// in the Amazon S3 User Guide. To get a list of your buckets, see ListBuckets -// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html). -// -// Directory buckets - For directory buckets, you must make requests for this -// API operation to the Zonal endpoint. These endpoints support virtual-hosted-style -// requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name -// . Path-style requests are not supported. For more information, see Regional -// and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html) -// in the Amazon S3 User Guide. -// -// Permissions -// -// - General purpose bucket permissions - To use this operation, you must -// have READ access to the bucket. You must have permission to perform the -// s3:ListBucket action. The bucket owner has this permission by default -// and can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html) -// in the Amazon S3 User Guide. -// -// - Directory bucket permissions - To grant access to this API operation -// on a directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html) -// API operation for session-based authorization. Specifically, you grant -// the s3express:CreateSession permission to the directory bucket in a bucket -// policy or an IAM identity-based policy. Then, you make the CreateSession -// API call on the bucket to obtain a session token. With the session token -// in your request header, you can make API requests to this operation. After -// the session token expires, you make another CreateSession API call to -// generate a new session token for use. Amazon Web Services CLI or SDKs -// create session and refresh the session token automatically to avoid service -// interruptions when a session expires. For more information about authorization, -// see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html). -// -// Sorting order of returned objects -// -// - General purpose bucket - For general purpose buckets, ListObjectsV2 -// returns objects in lexicographical order based on their key names. -// -// - Directory bucket - For directory buckets, ListObjectsV2 does not return -// objects in lexicographical order. -// -// # HTTP Host header syntax -// -// Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. -// -// This section describes the latest revision of this action. We recommend that -// you use this revised API operation for application development. For backward -// compatibility, Amazon S3 continues to support the prior version of this API -// operation, ListObjects (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html). -// -// The following operations are related to ListObjectsV2: -// -// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html) -// -// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html) -// -// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.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 Simple Storage Service's -// API operation ListObjectsV2 for usage and error information. -// -// Returned Error Codes: -// - ErrCodeNoSuchBucket "NoSuchBucket" -// The specified bucket does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2 -func (c *S3) ListObjectsV2(input *ListObjectsV2Input) (*ListObjectsV2Output, error) { - req, out := c.ListObjectsV2Request(input) - return out, req.Send() -} - -// ListObjectsV2WithContext is the same as ListObjectsV2 with the addition of -// the ability to pass a context and additional request options. -// -// See ListObjectsV2 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 *S3) ListObjectsV2WithContext(ctx aws.Context, input *ListObjectsV2Input, opts ...request.Option) (*ListObjectsV2Output, error) { - req, out := c.ListObjectsV2Request(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListObjectsV2Pages iterates over the pages of a ListObjectsV2 operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListObjectsV2 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 ListObjectsV2 operation. -// pageNum := 0 -// err := client.ListObjectsV2Pages(params, -// func(page *s3.ListObjectsV2Output, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *S3) ListObjectsV2Pages(input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool) error { - return c.ListObjectsV2PagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListObjectsV2PagesWithContext same as ListObjectsV2Pages 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 *S3) ListObjectsV2PagesWithContext(ctx aws.Context, input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListObjectsV2Input - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListObjectsV2Request(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListObjectsV2Output), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListParts = "ListParts" - -// ListPartsRequest generates a "aws/request.Request" representing the -// client's request for the ListParts 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 ListParts for more information on using the ListParts -// 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 ListPartsRequest method. -// req, resp := client.ListPartsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts -func (c *S3) ListPartsRequest(input *ListPartsInput) (req *request.Request, output *ListPartsOutput) { - op := &request.Operation{ - Name: opListParts, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}/{Key+}", - Paginator: &request.Paginator{ - InputTokens: []string{"PartNumberMarker"}, - OutputTokens: []string{"NextPartNumberMarker"}, - LimitToken: "MaxParts", - TruncationToken: "IsTruncated", - }, - } - - if input == nil { - input = &ListPartsInput{} - } - - output = &ListPartsOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListParts API operation for Amazon Simple Storage Service. -// -// Lists the parts that have been uploaded for a specific multipart upload. -// -// To use this operation, you must provide the upload ID in the request. You -// obtain this uploadID by sending the initiate multipart upload request through -// CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html). -// -// The ListParts request returns a maximum of 1,000 uploaded parts. The limit -// of 1,000 parts is also the default value. You can restrict the number of -// parts in a response by specifying the max-parts request parameter. If your -// multipart upload consists of more than 1,000 parts, the response returns -// an IsTruncated field with the value of true, and a NextPartNumberMarker element. -// To list remaining uploaded parts, in subsequent ListParts requests, include -// the part-number-marker query string parameter and set its value to the NextPartNumberMarker -// field value from the previous response. -// -// For more information on multipart uploads, see Uploading Objects Using Multipart -// Upload (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html) -// in the Amazon S3 User Guide. -// -// Directory buckets - For directory buckets, you must make requests for this -// API operation to the Zonal endpoint. These endpoints support virtual-hosted-style -// requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name -// . Path-style requests are not supported. For more information, see Regional -// and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html) -// in the Amazon S3 User Guide. -// -// Permissions -// -// - General purpose bucket permissions - For information about permissions -// required to use the multipart upload API, see Multipart Upload and Permissions -// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html) -// in the Amazon S3 User Guide. If the upload was created using server-side -// encryption with Key Management Service (KMS) keys (SSE-KMS) or dual-layer -// server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), you -// must have permission to the kms:Decrypt action for the ListParts request -// to succeed. -// -// - Directory bucket permissions - To grant access to this API operation -// on a directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html) -// API operation for session-based authorization. Specifically, you grant -// the s3express:CreateSession permission to the directory bucket in a bucket -// policy or an IAM identity-based policy. Then, you make the CreateSession -// API call on the bucket to obtain a session token. With the session token -// in your request header, you can make API requests to this operation. After -// the session token expires, you make another CreateSession API call to -// generate a new session token for use. Amazon Web Services CLI or SDKs -// create session and refresh the session token automatically to avoid service -// interruptions when a session expires. For more information about authorization, -// see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html). -// -// # HTTP Host header syntax -// -// Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. -// -// The following operations are related to ListParts: -// -// - CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html) -// -// - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) -// -// - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html) -// -// - AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html) -// -// - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html) -// -// - ListMultipartUploads (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.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 Simple Storage Service's -// API operation ListParts for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts -func (c *S3) ListParts(input *ListPartsInput) (*ListPartsOutput, error) { - req, out := c.ListPartsRequest(input) - return out, req.Send() -} - -// ListPartsWithContext is the same as ListParts with the addition of -// the ability to pass a context and additional request options. -// -// See ListParts 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 *S3) ListPartsWithContext(ctx aws.Context, input *ListPartsInput, opts ...request.Option) (*ListPartsOutput, error) { - req, out := c.ListPartsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListPartsPages iterates over the pages of a ListParts operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListParts 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 ListParts operation. -// pageNum := 0 -// err := client.ListPartsPages(params, -// func(page *s3.ListPartsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *S3) ListPartsPages(input *ListPartsInput, fn func(*ListPartsOutput, bool) bool) error { - return c.ListPartsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListPartsPagesWithContext same as ListPartsPages 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 *S3) ListPartsPagesWithContext(ctx aws.Context, input *ListPartsInput, fn func(*ListPartsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListPartsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListPartsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListPartsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opPutBucketAccelerateConfiguration = "PutBucketAccelerateConfiguration" - -// PutBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the PutBucketAccelerateConfiguration 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 PutBucketAccelerateConfiguration for more information on using the PutBucketAccelerateConfiguration -// 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 PutBucketAccelerateConfigurationRequest method. -// req, resp := client.PutBucketAccelerateConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration -func (c *S3) PutBucketAccelerateConfigurationRequest(input *PutBucketAccelerateConfigurationInput) (req *request.Request, output *PutBucketAccelerateConfigurationOutput) { - op := &request.Operation{ - Name: opPutBucketAccelerateConfiguration, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}?accelerate", - } - - if input == nil { - input = &PutBucketAccelerateConfigurationInput{} - } - - output = &PutBucketAccelerateConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutBucketAccelerateConfiguration API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Sets the accelerate configuration of an existing bucket. Amazon S3 Transfer -// Acceleration is a bucket-level feature that enables you to perform faster -// data transfers to Amazon S3. -// -// To use this operation, you must have permission to perform the s3:PutAccelerateConfiguration -// action. The bucket owner has this permission by default. The bucket owner -// can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). -// -// The Transfer Acceleration state of a bucket can be set to one of the following -// two values: -// -// - Enabled – Enables accelerated data transfers to the bucket. -// -// - Suspended – Disables accelerated data transfers to the bucket. -// -// The GetBucketAccelerateConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAccelerateConfiguration.html) -// action returns the transfer acceleration state of a bucket. -// -// After setting the Transfer Acceleration state of a bucket to Enabled, it -// might take up to thirty minutes before the data transfer rates to the bucket -// increase. -// -// The name of the bucket used for Transfer Acceleration must be DNS-compliant -// and must not contain periods ("."). -// -// For more information about transfer acceleration, see Transfer Acceleration -// (https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html). -// -// The following operations are related to PutBucketAccelerateConfiguration: -// -// - GetBucketAccelerateConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAccelerateConfiguration.html) -// -// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.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 Simple Storage Service's -// API operation PutBucketAccelerateConfiguration for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration -func (c *S3) PutBucketAccelerateConfiguration(input *PutBucketAccelerateConfigurationInput) (*PutBucketAccelerateConfigurationOutput, error) { - req, out := c.PutBucketAccelerateConfigurationRequest(input) - return out, req.Send() -} - -// PutBucketAccelerateConfigurationWithContext is the same as PutBucketAccelerateConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See PutBucketAccelerateConfiguration 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 *S3) PutBucketAccelerateConfigurationWithContext(ctx aws.Context, input *PutBucketAccelerateConfigurationInput, opts ...request.Option) (*PutBucketAccelerateConfigurationOutput, error) { - req, out := c.PutBucketAccelerateConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutBucketAcl = "PutBucketAcl" - -// PutBucketAclRequest generates a "aws/request.Request" representing the -// client's request for the PutBucketAcl 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 PutBucketAcl for more information on using the PutBucketAcl -// 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 PutBucketAclRequest method. -// req, resp := client.PutBucketAclRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl -func (c *S3) PutBucketAclRequest(input *PutBucketAclInput) (req *request.Request, output *PutBucketAclOutput) { - op := &request.Operation{ - Name: opPutBucketAcl, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}?acl", - } - - if input == nil { - input = &PutBucketAclInput{} - } - - output = &PutBucketAclOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - req.Handlers.Build.PushBackNamed(request.NamedHandler{ - Name: "contentMd5Handler", - Fn: checksum.AddBodyContentMD5Handler, - }) - return -} - -// PutBucketAcl API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Sets the permissions on an existing bucket using access control lists (ACL). -// For more information, see Using ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html). -// To set the ACL of a bucket, you must have the WRITE_ACP permission. -// -// You can use one of the following two ways to set a bucket's permissions: -// -// - Specify the ACL in the request body -// -// - Specify permissions using request headers -// -// You cannot specify access permission using both the body and the request -// headers. -// -// Depending on your application needs, you may choose to set the ACL on a bucket -// using either the request body or the headers. For example, if you have an -// existing application that updates a bucket ACL using the request body, then -// you can continue to use that approach. -// -// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, -// ACLs are disabled and no longer affect permissions. You must use policies -// to grant access to your bucket and the objects in it. Requests to set ACLs -// or update ACLs fail and return the AccessControlListNotSupported error code. -// Requests to read ACLs are still supported. For more information, see Controlling -// object ownership (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html) -// in the Amazon S3 User Guide. -// -// # Permissions -// -// You can set access permissions by using one of the following methods: -// -// - Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports -// a set of predefined ACLs, known as canned ACLs. Each canned ACL has a -// predefined set of grantees and permissions. Specify the canned ACL name -// as the value of x-amz-acl. If you use this header, you cannot use other -// access control-specific headers in your request. For more information, -// see Canned ACL (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL). -// -// - Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, -// x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using -// these headers, you specify explicit access permissions and grantees (Amazon -// Web Services accounts or Amazon S3 groups) who will receive the permission. -// If you use these ACL-specific headers, you cannot use the x-amz-acl header -// to set a canned ACL. These parameters map to the set of permissions that -// Amazon S3 supports in an ACL. For more information, see Access Control -// List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html). -// You specify each grantee as a type=value pair, where the type is one of -// the following: id – if the value specified is the canonical user ID -// of an Amazon Web Services account uri – if you are granting permissions -// to a predefined group emailAddress – if the value specified is the email -// address of an Amazon Web Services account Using email addresses to specify -// a grantee is only supported in the following Amazon Web Services Regions: -// US East (N. Virginia) US West (N. California) US West (Oregon) Asia Pacific -// (Singapore) Asia Pacific (Sydney) Asia Pacific (Tokyo) Europe (Ireland) -// South America (São Paulo) For a list of all the Amazon S3 supported Regions -// and endpoints, see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) -// in the Amazon Web Services General Reference. For example, the following -// x-amz-grant-write header grants create, overwrite, and delete objects -// permission to LogDelivery group predefined by Amazon S3 and two Amazon -// Web Services accounts identified by their email addresses. x-amz-grant-write: -// uri="http://acs.amazonaws.com/groups/s3/LogDelivery", id="111122223333", -// id="555566667777" -// -// You can use either a canned ACL or specify access permissions explicitly. -// You cannot do both. -// -// # Grantee Values -// -// You can specify the person (grantee) to whom you're assigning access rights -// (using request elements) in the following ways: -// -// - By the person's ID: <>ID<><>GranteesEmail<> -// DisplayName is optional and ignored in the request -// -// - By URI: <>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<> -// -// - By Email address: <>Grantees@email.com<>& -// The grantee is resolved to the CanonicalUser and, in a response to a GET -// Object acl request, appears as the CanonicalUser. Using email addresses -// to specify a grantee is only supported in the following Amazon Web Services -// Regions: US East (N. Virginia) US West (N. California) US West (Oregon) -// Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific (Tokyo) Europe -// (Ireland) South America (São Paulo) For a list of all the Amazon S3 supported -// Regions and endpoints, see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) -// in the Amazon Web Services General Reference. -// -// The following operations are related to PutBucketAcl: -// -// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html) -// -// - DeleteBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html) -// -// - GetObjectAcl (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.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 Simple Storage Service's -// API operation PutBucketAcl for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl -func (c *S3) PutBucketAcl(input *PutBucketAclInput) (*PutBucketAclOutput, error) { - req, out := c.PutBucketAclRequest(input) - return out, req.Send() -} - -// PutBucketAclWithContext is the same as PutBucketAcl with the addition of -// the ability to pass a context and additional request options. -// -// See PutBucketAcl 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 *S3) PutBucketAclWithContext(ctx aws.Context, input *PutBucketAclInput, opts ...request.Option) (*PutBucketAclOutput, error) { - req, out := c.PutBucketAclRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutBucketAnalyticsConfiguration = "PutBucketAnalyticsConfiguration" - -// PutBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the PutBucketAnalyticsConfiguration 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 PutBucketAnalyticsConfiguration for more information on using the PutBucketAnalyticsConfiguration -// 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 PutBucketAnalyticsConfigurationRequest method. -// req, resp := client.PutBucketAnalyticsConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration -func (c *S3) PutBucketAnalyticsConfigurationRequest(input *PutBucketAnalyticsConfigurationInput) (req *request.Request, output *PutBucketAnalyticsConfigurationOutput) { - op := &request.Operation{ - Name: opPutBucketAnalyticsConfiguration, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}?analytics", - } - - if input == nil { - input = &PutBucketAnalyticsConfigurationInput{} - } - - output = &PutBucketAnalyticsConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Sets an analytics configuration for the bucket (specified by the analytics -// configuration ID). You can have up to 1,000 analytics configurations per -// bucket. -// -// You can choose to have storage class analysis export analysis reports sent -// to a comma-separated values (CSV) flat file. See the DataExport request element. -// Reports are updated daily and are based on the object filters that you configure. -// When selecting data export, you specify a destination bucket and an optional -// destination prefix where the file is written. You can export the data to -// a destination bucket in a different account. However, the destination bucket -// must be in the same Region as the bucket that you are making the PUT analytics -// configuration to. For more information, see Amazon S3 Analytics – Storage -// Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html). -// -// You must create a bucket policy on the destination bucket where the exported -// file is written to grant permissions to Amazon S3 to write objects to the -// bucket. For an example policy, see Granting Permissions for Amazon S3 Inventory -// and Storage Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html#example-bucket-policies-use-case-9). -// -// To use this operation, you must have permissions to perform the s3:PutAnalyticsConfiguration -// action. The bucket owner has this permission by default. The bucket owner -// can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). -// -// PutBucketAnalyticsConfiguration has the following special errors: -// -// - HTTP Error: HTTP 400 Bad Request Code: InvalidArgument Cause: Invalid -// argument. -// -// - HTTP Error: HTTP 400 Bad Request Code: TooManyConfigurations Cause: -// You are attempting to create a new configuration but have already reached -// the 1,000-configuration limit. -// -// - HTTP Error: HTTP 403 Forbidden Code: AccessDenied Cause: You are not -// the owner of the specified bucket, or you do not have the s3:PutAnalyticsConfiguration -// bucket permission to set the configuration on the bucket. -// -// The following operations are related to PutBucketAnalyticsConfiguration: -// -// - GetBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAnalyticsConfiguration.html) -// -// - DeleteBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketAnalyticsConfiguration.html) -// -// - ListBucketAnalyticsConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.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 Simple Storage Service's -// API operation PutBucketAnalyticsConfiguration for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration -func (c *S3) PutBucketAnalyticsConfiguration(input *PutBucketAnalyticsConfigurationInput) (*PutBucketAnalyticsConfigurationOutput, error) { - req, out := c.PutBucketAnalyticsConfigurationRequest(input) - return out, req.Send() -} - -// PutBucketAnalyticsConfigurationWithContext is the same as PutBucketAnalyticsConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See PutBucketAnalyticsConfiguration 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 *S3) PutBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *PutBucketAnalyticsConfigurationInput, opts ...request.Option) (*PutBucketAnalyticsConfigurationOutput, error) { - req, out := c.PutBucketAnalyticsConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutBucketCors = "PutBucketCors" - -// PutBucketCorsRequest generates a "aws/request.Request" representing the -// client's request for the PutBucketCors 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 PutBucketCors for more information on using the PutBucketCors -// 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 PutBucketCorsRequest method. -// req, resp := client.PutBucketCorsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors -func (c *S3) PutBucketCorsRequest(input *PutBucketCorsInput) (req *request.Request, output *PutBucketCorsOutput) { - op := &request.Operation{ - Name: opPutBucketCors, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}?cors", - } - - if input == nil { - input = &PutBucketCorsInput{} - } - - output = &PutBucketCorsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - req.Handlers.Build.PushBackNamed(request.NamedHandler{ - Name: "contentMd5Handler", - Fn: checksum.AddBodyContentMD5Handler, - }) - return -} - -// PutBucketCors API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Sets the cors configuration for your bucket. If the configuration exists, -// Amazon S3 replaces it. -// -// To use this operation, you must be allowed to perform the s3:PutBucketCORS -// action. By default, the bucket owner has this permission and can grant it -// to others. -// -// You set this configuration on a bucket so that the bucket can service cross-origin -// requests. For example, you might want to enable a request whose origin is -// http://www.example.com to access your Amazon S3 bucket at my.example.bucket.com -// by using the browser's XMLHttpRequest capability. -// -// To enable cross-origin resource sharing (CORS) on a bucket, you add the cors -// subresource to the bucket. The cors subresource is an XML document in which -// you configure rules that identify origins and the HTTP methods that can be -// executed on your bucket. The document is limited to 64 KB in size. -// -// When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request) -// against a bucket, it evaluates the cors configuration on the bucket and uses -// the first CORSRule rule that matches the incoming browser request to enable -// a cross-origin request. For a rule to match, the following conditions must -// be met: -// -// - The request's Origin header must match AllowedOrigin elements. -// -// - The request method (for example, GET, PUT, HEAD, and so on) or the Access-Control-Request-Method -// header in case of a pre-flight OPTIONS request must be one of the AllowedMethod -// elements. -// -// - Every header specified in the Access-Control-Request-Headers request -// header of a pre-flight request must match an AllowedHeader element. -// -// For more information about CORS, go to Enabling Cross-Origin Resource Sharing -// (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) in the Amazon -// S3 User Guide. -// -// The following operations are related to PutBucketCors: -// -// - GetBucketCors (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketCors.html) -// -// - DeleteBucketCors (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketCors.html) -// -// - RESTOPTIONSobject (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTOPTIONSobject.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 Simple Storage Service's -// API operation PutBucketCors for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors -func (c *S3) PutBucketCors(input *PutBucketCorsInput) (*PutBucketCorsOutput, error) { - req, out := c.PutBucketCorsRequest(input) - return out, req.Send() -} - -// PutBucketCorsWithContext is the same as PutBucketCors with the addition of -// the ability to pass a context and additional request options. -// -// See PutBucketCors 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 *S3) PutBucketCorsWithContext(ctx aws.Context, input *PutBucketCorsInput, opts ...request.Option) (*PutBucketCorsOutput, error) { - req, out := c.PutBucketCorsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutBucketEncryption = "PutBucketEncryption" - -// PutBucketEncryptionRequest generates a "aws/request.Request" representing the -// client's request for the PutBucketEncryption 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 PutBucketEncryption for more information on using the PutBucketEncryption -// 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 PutBucketEncryptionRequest method. -// req, resp := client.PutBucketEncryptionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryption -func (c *S3) PutBucketEncryptionRequest(input *PutBucketEncryptionInput) (req *request.Request, output *PutBucketEncryptionOutput) { - op := &request.Operation{ - Name: opPutBucketEncryption, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}?encryption", - } - - if input == nil { - input = &PutBucketEncryptionInput{} - } - - output = &PutBucketEncryptionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - req.Handlers.Build.PushBackNamed(request.NamedHandler{ - Name: "contentMd5Handler", - Fn: checksum.AddBodyContentMD5Handler, - }) - return -} - -// PutBucketEncryption API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// This action uses the encryption subresource to configure default encryption -// and Amazon S3 Bucket Keys for an existing bucket. -// -// By default, all buckets have a default encryption configuration that uses -// server-side encryption with Amazon S3 managed keys (SSE-S3). You can optionally -// configure default encryption for a bucket by using server-side encryption -// with Key Management Service (KMS) keys (SSE-KMS) or dual-layer server-side -// encryption with Amazon Web Services KMS keys (DSSE-KMS). If you specify default -// encryption by using SSE-KMS, you can also configure Amazon S3 Bucket Keys -// (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html). If you -// use PutBucketEncryption to set your default bucket encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html) -// to SSE-KMS, you should verify that your KMS key ID is correct. Amazon S3 -// does not validate the KMS key ID provided in PutBucketEncryption requests. -// -// This action requires Amazon Web Services Signature Version 4. For more information, -// see Authenticating Requests (Amazon Web Services Signature Version 4) (https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html). -// -// To use this operation, you must have permission to perform the s3:PutEncryptionConfiguration -// action. The bucket owner has this permission by default. The bucket owner -// can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html) -// in the Amazon S3 User Guide. -// -// The following operations are related to PutBucketEncryption: -// -// - GetBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html) -// -// - DeleteBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.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 Simple Storage Service's -// API operation PutBucketEncryption for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryption -func (c *S3) PutBucketEncryption(input *PutBucketEncryptionInput) (*PutBucketEncryptionOutput, error) { - req, out := c.PutBucketEncryptionRequest(input) - return out, req.Send() -} - -// PutBucketEncryptionWithContext is the same as PutBucketEncryption with the addition of -// the ability to pass a context and additional request options. -// -// See PutBucketEncryption 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 *S3) PutBucketEncryptionWithContext(ctx aws.Context, input *PutBucketEncryptionInput, opts ...request.Option) (*PutBucketEncryptionOutput, error) { - req, out := c.PutBucketEncryptionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutBucketIntelligentTieringConfiguration = "PutBucketIntelligentTieringConfiguration" - -// PutBucketIntelligentTieringConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the PutBucketIntelligentTieringConfiguration 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 PutBucketIntelligentTieringConfiguration for more information on using the PutBucketIntelligentTieringConfiguration -// 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 PutBucketIntelligentTieringConfigurationRequest method. -// req, resp := client.PutBucketIntelligentTieringConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketIntelligentTieringConfiguration -func (c *S3) PutBucketIntelligentTieringConfigurationRequest(input *PutBucketIntelligentTieringConfigurationInput) (req *request.Request, output *PutBucketIntelligentTieringConfigurationOutput) { - op := &request.Operation{ - Name: opPutBucketIntelligentTieringConfiguration, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}?intelligent-tiering", - } - - if input == nil { - input = &PutBucketIntelligentTieringConfigurationInput{} - } - - output = &PutBucketIntelligentTieringConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutBucketIntelligentTieringConfiguration API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Puts a S3 Intelligent-Tiering configuration to the specified bucket. You -// can have up to 1,000 S3 Intelligent-Tiering configurations per bucket. -// -// The S3 Intelligent-Tiering storage class is designed to optimize storage -// costs by automatically moving data to the most cost-effective storage access -// tier, without performance impact or operational overhead. S3 Intelligent-Tiering -// delivers automatic cost savings in three low latency and high throughput -// access tiers. To get the lowest storage cost on data that can be accessed -// in minutes to hours, you can choose to activate additional archiving capabilities. -// -// The S3 Intelligent-Tiering storage class is the ideal storage class for data -// with unknown, changing, or unpredictable access patterns, independent of -// object size or retention period. If the size of an object is less than 128 -// KB, it is not monitored and not eligible for auto-tiering. Smaller objects -// can be stored, but they are always charged at the Frequent Access tier rates -// in the S3 Intelligent-Tiering storage class. -// -// For more information, see Storage class for automatically optimizing frequently -// and infrequently accessed objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access). -// -// Operations related to PutBucketIntelligentTieringConfiguration include: -// -// - DeleteBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html) -// -// - GetBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.html) -// -// - ListBucketIntelligentTieringConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html) -// -// You only need S3 Intelligent-Tiering enabled on a bucket if you want to automatically -// move objects stored in the S3 Intelligent-Tiering storage class to the Archive -// Access or Deep Archive Access tier. -// -// PutBucketIntelligentTieringConfiguration has the following special errors: -// -// # HTTP 400 Bad Request Error -// -// Code: InvalidArgument -// -// Cause: Invalid Argument -// -// # HTTP 400 Bad Request Error -// -// Code: TooManyConfigurations -// -// Cause: You are attempting to create a new configuration but have already -// reached the 1,000-configuration limit. -// -// # HTTP 403 Forbidden Error -// -// Cause: You are not the owner of the specified bucket, or you do not have -// the s3:PutIntelligentTieringConfiguration bucket permission to set the configuration -// on the bucket. -// -// 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 Simple Storage Service's -// API operation PutBucketIntelligentTieringConfiguration for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketIntelligentTieringConfiguration -func (c *S3) PutBucketIntelligentTieringConfiguration(input *PutBucketIntelligentTieringConfigurationInput) (*PutBucketIntelligentTieringConfigurationOutput, error) { - req, out := c.PutBucketIntelligentTieringConfigurationRequest(input) - return out, req.Send() -} - -// PutBucketIntelligentTieringConfigurationWithContext is the same as PutBucketIntelligentTieringConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See PutBucketIntelligentTieringConfiguration 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 *S3) PutBucketIntelligentTieringConfigurationWithContext(ctx aws.Context, input *PutBucketIntelligentTieringConfigurationInput, opts ...request.Option) (*PutBucketIntelligentTieringConfigurationOutput, error) { - req, out := c.PutBucketIntelligentTieringConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutBucketInventoryConfiguration = "PutBucketInventoryConfiguration" - -// PutBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the PutBucketInventoryConfiguration 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 PutBucketInventoryConfiguration for more information on using the PutBucketInventoryConfiguration -// 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 PutBucketInventoryConfigurationRequest method. -// req, resp := client.PutBucketInventoryConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration -func (c *S3) PutBucketInventoryConfigurationRequest(input *PutBucketInventoryConfigurationInput) (req *request.Request, output *PutBucketInventoryConfigurationOutput) { - op := &request.Operation{ - Name: opPutBucketInventoryConfiguration, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}?inventory", - } - - if input == nil { - input = &PutBucketInventoryConfigurationInput{} - } - - output = &PutBucketInventoryConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutBucketInventoryConfiguration API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// This implementation of the PUT action adds an inventory configuration (identified -// by the inventory ID) to the bucket. You can have up to 1,000 inventory configurations -// per bucket. -// -// Amazon S3 inventory generates inventories of the objects in the bucket on -// a daily or weekly basis, and the results are published to a flat file. The -// bucket that is inventoried is called the source bucket, and the bucket where -// the inventory flat file is stored is called the destination bucket. The destination -// bucket must be in the same Amazon Web Services Region as the source bucket. -// -// When you configure an inventory for a source bucket, you specify the destination -// bucket where you want the inventory to be stored, and whether to generate -// the inventory daily or weekly. You can also configure what object metadata -// to include and whether to inventory all object versions or only current versions. -// For more information, see Amazon S3 Inventory (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html) -// in the Amazon S3 User Guide. -// -// You must create a bucket policy on the destination bucket to grant permissions -// to Amazon S3 to write objects to the bucket in the defined location. For -// an example policy, see Granting Permissions for Amazon S3 Inventory and Storage -// Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html#example-bucket-policies-use-case-9). -// -// # Permissions -// -// To use this operation, you must have permission to perform the s3:PutInventoryConfiguration -// action. The bucket owner has this permission by default and can grant this -// permission to others. -// -// The s3:PutInventoryConfiguration permission allows a user to create an S3 -// Inventory (https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-inventory.html) -// report that includes all object metadata fields available and to specify -// the destination bucket to store the inventory. A user with read access to -// objects in the destination bucket can also access all object metadata fields -// that are available in the inventory report. -// -// To restrict access to an inventory report, see Restricting access to an Amazon -// S3 Inventory report (https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html#example-bucket-policies-use-case-10) -// in the Amazon S3 User Guide. For more information about the metadata fields -// available in S3 Inventory, see Amazon S3 Inventory lists (https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-inventory.html#storage-inventory-contents) -// in the Amazon S3 User Guide. For more information about permissions, see -// Permissions related to bucket subresource operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Identity and access management in Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html) -// in the Amazon S3 User Guide. -// -// PutBucketInventoryConfiguration has the following special errors: -// -// # HTTP 400 Bad Request Error -// -// Code: InvalidArgument -// -// Cause: Invalid Argument -// -// # HTTP 400 Bad Request Error -// -// Code: TooManyConfigurations -// -// Cause: You are attempting to create a new configuration but have already -// reached the 1,000-configuration limit. -// -// # HTTP 403 Forbidden Error -// -// Cause: You are not the owner of the specified bucket, or you do not have -// the s3:PutInventoryConfiguration bucket permission to set the configuration -// on the bucket. -// -// The following operations are related to PutBucketInventoryConfiguration: -// -// - GetBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html) -// -// - DeleteBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html) -// -// - ListBucketInventoryConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.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 Simple Storage Service's -// API operation PutBucketInventoryConfiguration for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration -func (c *S3) PutBucketInventoryConfiguration(input *PutBucketInventoryConfigurationInput) (*PutBucketInventoryConfigurationOutput, error) { - req, out := c.PutBucketInventoryConfigurationRequest(input) - return out, req.Send() -} - -// PutBucketInventoryConfigurationWithContext is the same as PutBucketInventoryConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See PutBucketInventoryConfiguration 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 *S3) PutBucketInventoryConfigurationWithContext(ctx aws.Context, input *PutBucketInventoryConfigurationInput, opts ...request.Option) (*PutBucketInventoryConfigurationOutput, error) { - req, out := c.PutBucketInventoryConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutBucketLifecycle = "PutBucketLifecycle" - -// PutBucketLifecycleRequest generates a "aws/request.Request" representing the -// client's request for the PutBucketLifecycle 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 PutBucketLifecycle for more information on using the PutBucketLifecycle -// 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 PutBucketLifecycleRequest method. -// req, resp := client.PutBucketLifecycleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle -// -// Deprecated: PutBucketLifecycle has been deprecated -func (c *S3) PutBucketLifecycleRequest(input *PutBucketLifecycleInput) (req *request.Request, output *PutBucketLifecycleOutput) { - if c.Client.Config.Logger != nil { - c.Client.Config.Logger.Log("This operation, PutBucketLifecycle, has been deprecated") - } - op := &request.Operation{ - Name: opPutBucketLifecycle, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}?lifecycle", - } - - if input == nil { - input = &PutBucketLifecycleInput{} - } - - output = &PutBucketLifecycleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - req.Handlers.Build.PushBackNamed(request.NamedHandler{ - Name: "contentMd5Handler", - Fn: checksum.AddBodyContentMD5Handler, - }) - return -} - -// PutBucketLifecycle API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// For an updated version of this API, see PutBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html). -// This version has been deprecated. Existing lifecycle configurations will -// work. For new lifecycle configurations, use the updated API. -// -// Creates a new lifecycle configuration for the bucket or replaces an existing -// lifecycle configuration. For information about lifecycle configuration, see -// Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html) -// in the Amazon S3 User Guide. -// -// By default, all Amazon S3 resources, including buckets, objects, and related -// subresources (for example, lifecycle configuration and website configuration) -// are private. Only the resource owner, the Amazon Web Services account that -// created the resource, can access it. The resource owner can optionally grant -// access permissions to others by writing an access policy. For this operation, -// users must get the s3:PutLifecycleConfiguration permission. -// -// You can also explicitly deny permissions. Explicit denial also supersedes -// any other permissions. If you want to prevent users or accounts from removing -// or deleting objects from your bucket, you must deny them permissions for -// the following actions: -// -// - s3:DeleteObject -// -// - s3:DeleteObjectVersion -// -// - s3:PutLifecycleConfiguration -// -// For more information about permissions, see Managing Access Permissions to -// your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html) -// in the Amazon S3 User Guide. -// -// For more examples of transitioning objects to storage classes such as STANDARD_IA -// or ONEZONE_IA, see Examples of Lifecycle Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#lifecycle-configuration-examples). -// -// The following operations are related to PutBucketLifecycle: -// -// - GetBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html)(Deprecated) -// -// - GetBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html) -// -// - RestoreObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html) -// -// - By default, a resource owner—in this case, a bucket owner, which is -// the Amazon Web Services account that created the bucket—can perform -// any of the operations. A resource owner can also grant others permission -// to perform the operation. For more information, see the following topics -// in the Amazon S3 User Guide: Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html) -// Managing Access Permissions to your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.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 Simple Storage Service's -// API operation PutBucketLifecycle for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle -// -// Deprecated: PutBucketLifecycle has been deprecated -func (c *S3) PutBucketLifecycle(input *PutBucketLifecycleInput) (*PutBucketLifecycleOutput, error) { - req, out := c.PutBucketLifecycleRequest(input) - return out, req.Send() -} - -// PutBucketLifecycleWithContext is the same as PutBucketLifecycle with the addition of -// the ability to pass a context and additional request options. -// -// See PutBucketLifecycle 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: PutBucketLifecycleWithContext has been deprecated -func (c *S3) PutBucketLifecycleWithContext(ctx aws.Context, input *PutBucketLifecycleInput, opts ...request.Option) (*PutBucketLifecycleOutput, error) { - req, out := c.PutBucketLifecycleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutBucketLifecycleConfiguration = "PutBucketLifecycleConfiguration" - -// PutBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the PutBucketLifecycleConfiguration 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 PutBucketLifecycleConfiguration for more information on using the PutBucketLifecycleConfiguration -// 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 PutBucketLifecycleConfigurationRequest method. -// req, resp := client.PutBucketLifecycleConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration -func (c *S3) PutBucketLifecycleConfigurationRequest(input *PutBucketLifecycleConfigurationInput) (req *request.Request, output *PutBucketLifecycleConfigurationOutput) { - op := &request.Operation{ - Name: opPutBucketLifecycleConfiguration, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}?lifecycle", - } - - if input == nil { - input = &PutBucketLifecycleConfigurationInput{} - } - - output = &PutBucketLifecycleConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - req.Handlers.Build.PushBackNamed(request.NamedHandler{ - Name: "contentMd5Handler", - Fn: checksum.AddBodyContentMD5Handler, - }) - return -} - -// PutBucketLifecycleConfiguration API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Creates a new lifecycle configuration for the bucket or replaces an existing -// lifecycle configuration. Keep in mind that this will overwrite an existing -// lifecycle configuration, so if you want to retain any configuration details, -// they must be included in the new lifecycle configuration. For information -// about lifecycle configuration, see Managing your storage lifecycle (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html). -// -// Bucket lifecycle configuration now supports specifying a lifecycle rule using -// an object key name prefix, one or more object tags, object size, or any combination -// of these. Accordingly, this section describes the latest API. The previous -// version of the API supported filtering based only on an object key name prefix, -// which is supported for backward compatibility. For the related API description, -// see PutBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html). -// -// # Rules -// -// You specify the lifecycle configuration in your request body. The lifecycle -// configuration is specified as XML consisting of one or more rules. An Amazon -// S3 Lifecycle configuration can have up to 1,000 rules. This limit is not -// adjustable. Each rule consists of the following: -// -// - A filter identifying a subset of objects to which the rule applies. -// The filter can be based on a key name prefix, object tags, object size, -// or any combination of these. -// -// - A status indicating whether the rule is in effect. -// -// - One or more lifecycle transition and expiration actions that you want -// Amazon S3 to perform on the objects identified by the filter. If the state -// of your bucket is versioning-enabled or versioning-suspended, you can -// have many versions of the same object (one current version and zero or -// more noncurrent versions). Amazon S3 provides predefined actions that -// you can specify for current and noncurrent object versions. -// -// For more information, see Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html) -// and Lifecycle Configuration Elements (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html). -// -// # Permissions -// -// By default, all Amazon S3 resources are private, including buckets, objects, -// and related subresources (for example, lifecycle configuration and website -// configuration). Only the resource owner (that is, the Amazon Web Services -// account that created it) can access the resource. The resource owner can -// optionally grant access permissions to others by writing an access policy. -// For this operation, a user must get the s3:PutLifecycleConfiguration permission. -// -// You can also explicitly deny permissions. An explicit deny also supersedes -// any other permissions. If you want to block users or accounts from removing -// or deleting objects from your bucket, you must deny them permissions for -// the following actions: -// -// - s3:DeleteObject -// -// - s3:DeleteObjectVersion -// -// - s3:PutLifecycleConfiguration -// -// For more information about permissions, see Managing Access Permissions to -// Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). -// -// The following operations are related to PutBucketLifecycleConfiguration: -// -// - Examples of Lifecycle Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-configuration-examples.html) -// -// - GetBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html) -// -// - DeleteBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.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 Simple Storage Service's -// API operation PutBucketLifecycleConfiguration for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration -func (c *S3) PutBucketLifecycleConfiguration(input *PutBucketLifecycleConfigurationInput) (*PutBucketLifecycleConfigurationOutput, error) { - req, out := c.PutBucketLifecycleConfigurationRequest(input) - return out, req.Send() -} - -// PutBucketLifecycleConfigurationWithContext is the same as PutBucketLifecycleConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See PutBucketLifecycleConfiguration 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 *S3) PutBucketLifecycleConfigurationWithContext(ctx aws.Context, input *PutBucketLifecycleConfigurationInput, opts ...request.Option) (*PutBucketLifecycleConfigurationOutput, error) { - req, out := c.PutBucketLifecycleConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutBucketLogging = "PutBucketLogging" - -// PutBucketLoggingRequest generates a "aws/request.Request" representing the -// client's request for the PutBucketLogging 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 PutBucketLogging for more information on using the PutBucketLogging -// 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 PutBucketLoggingRequest method. -// req, resp := client.PutBucketLoggingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging -func (c *S3) PutBucketLoggingRequest(input *PutBucketLoggingInput) (req *request.Request, output *PutBucketLoggingOutput) { - op := &request.Operation{ - Name: opPutBucketLogging, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}?logging", - } - - if input == nil { - input = &PutBucketLoggingInput{} - } - - output = &PutBucketLoggingOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - req.Handlers.Build.PushBackNamed(request.NamedHandler{ - Name: "contentMd5Handler", - Fn: checksum.AddBodyContentMD5Handler, - }) - return -} - -// PutBucketLogging API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Set the logging parameters for a bucket and to specify permissions for who -// can view and modify the logging parameters. All logs are saved to buckets -// in the same Amazon Web Services Region as the source bucket. To set the logging -// status of a bucket, you must be the bucket owner. -// -// The bucket owner is automatically granted FULL_CONTROL to all logs. You use -// the Grantee request element to grant access to other people. The Permissions -// request element specifies the kind of access the grantee has to the logs. -// -// If the target bucket for log delivery uses the bucket owner enforced setting -// for S3 Object Ownership, you can't use the Grantee request element to grant -// access to others. Permissions can only be granted using policies. For more -// information, see Permissions for server access log delivery (https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-server-access-logging.html#grant-log-delivery-permissions-general) -// in the Amazon S3 User Guide. -// -// # Grantee Values -// -// You can specify the person (grantee) to whom you're assigning access rights -// (by using request elements) in the following ways: -// -// - By the person's ID: <>ID<><>GranteesEmail<> -// DisplayName is optional and ignored in the request. -// -// - By Email address: <>Grantees@email.com<> -// The grantee is resolved to the CanonicalUser and, in a response to a GETObjectAcl -// request, appears as the CanonicalUser. -// -// - By URI: <>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<> -// -// To enable logging, you use LoggingEnabled and its children request elements. -// To disable logging, you use an empty BucketLoggingStatus request element: -// -// -// -// For more information about server access logging, see Server Access Logging -// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerLogs.html) in -// the Amazon S3 User Guide. -// -// For more information about creating a bucket, see CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html). -// For more information about returning the logging status of a bucket, see -// GetBucketLogging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLogging.html). -// -// The following operations are related to PutBucketLogging: -// -// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html) -// -// - DeleteBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html) -// -// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html) -// -// - GetBucketLogging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLogging.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 Simple Storage Service's -// API operation PutBucketLogging for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging -func (c *S3) PutBucketLogging(input *PutBucketLoggingInput) (*PutBucketLoggingOutput, error) { - req, out := c.PutBucketLoggingRequest(input) - return out, req.Send() -} - -// PutBucketLoggingWithContext is the same as PutBucketLogging with the addition of -// the ability to pass a context and additional request options. -// -// See PutBucketLogging 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 *S3) PutBucketLoggingWithContext(ctx aws.Context, input *PutBucketLoggingInput, opts ...request.Option) (*PutBucketLoggingOutput, error) { - req, out := c.PutBucketLoggingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutBucketMetricsConfiguration = "PutBucketMetricsConfiguration" - -// PutBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the PutBucketMetricsConfiguration 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 PutBucketMetricsConfiguration for more information on using the PutBucketMetricsConfiguration -// 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 PutBucketMetricsConfigurationRequest method. -// req, resp := client.PutBucketMetricsConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration -func (c *S3) PutBucketMetricsConfigurationRequest(input *PutBucketMetricsConfigurationInput) (req *request.Request, output *PutBucketMetricsConfigurationOutput) { - op := &request.Operation{ - Name: opPutBucketMetricsConfiguration, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}?metrics", - } - - if input == nil { - input = &PutBucketMetricsConfigurationInput{} - } - - output = &PutBucketMetricsConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutBucketMetricsConfiguration API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Sets a metrics configuration (specified by the metrics configuration ID) -// for the bucket. You can have up to 1,000 metrics configurations per bucket. -// If you're updating an existing metrics configuration, note that this is a -// full replacement of the existing metrics configuration. If you don't include -// the elements you want to keep, they are erased. -// -// To use this operation, you must have permissions to perform the s3:PutMetricsConfiguration -// action. The bucket owner has this permission by default. The bucket owner -// can grant this permission to others. For more information about permissions, -// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). -// -// For information about CloudWatch request metrics for Amazon S3, see Monitoring -// Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html). -// -// The following operations are related to PutBucketMetricsConfiguration: -// -// - DeleteBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.html) -// -// - GetBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetricsConfiguration.html) -// -// - ListBucketMetricsConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html) -// -// PutBucketMetricsConfiguration has the following special error: -// -// - Error code: TooManyConfigurations Description: You are attempting to -// create a new configuration but have already reached the 1,000-configuration -// limit. HTTP Status Code: HTTP 400 Bad Request -// -// 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 Simple Storage Service's -// API operation PutBucketMetricsConfiguration for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration -func (c *S3) PutBucketMetricsConfiguration(input *PutBucketMetricsConfigurationInput) (*PutBucketMetricsConfigurationOutput, error) { - req, out := c.PutBucketMetricsConfigurationRequest(input) - return out, req.Send() -} - -// PutBucketMetricsConfigurationWithContext is the same as PutBucketMetricsConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See PutBucketMetricsConfiguration 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 *S3) PutBucketMetricsConfigurationWithContext(ctx aws.Context, input *PutBucketMetricsConfigurationInput, opts ...request.Option) (*PutBucketMetricsConfigurationOutput, error) { - req, out := c.PutBucketMetricsConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutBucketNotification = "PutBucketNotification" - -// PutBucketNotificationRequest generates a "aws/request.Request" representing the -// client's request for the PutBucketNotification 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 PutBucketNotification for more information on using the PutBucketNotification -// 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 PutBucketNotificationRequest method. -// req, resp := client.PutBucketNotificationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification -// -// Deprecated: PutBucketNotification has been deprecated -func (c *S3) PutBucketNotificationRequest(input *PutBucketNotificationInput) (req *request.Request, output *PutBucketNotificationOutput) { - if c.Client.Config.Logger != nil { - c.Client.Config.Logger.Log("This operation, PutBucketNotification, has been deprecated") - } - op := &request.Operation{ - Name: opPutBucketNotification, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}?notification", - } - - if input == nil { - input = &PutBucketNotificationInput{} - } - - output = &PutBucketNotificationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - req.Handlers.Build.PushBackNamed(request.NamedHandler{ - Name: "contentMd5Handler", - Fn: checksum.AddBodyContentMD5Handler, - }) - return -} - -// PutBucketNotification API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// No longer used, see the PutBucketNotificationConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketNotificationConfiguration.html) -// 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 Simple Storage Service's -// API operation PutBucketNotification for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification -// -// Deprecated: PutBucketNotification has been deprecated -func (c *S3) PutBucketNotification(input *PutBucketNotificationInput) (*PutBucketNotificationOutput, error) { - req, out := c.PutBucketNotificationRequest(input) - return out, req.Send() -} - -// PutBucketNotificationWithContext is the same as PutBucketNotification with the addition of -// the ability to pass a context and additional request options. -// -// See PutBucketNotification 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: PutBucketNotificationWithContext has been deprecated -func (c *S3) PutBucketNotificationWithContext(ctx aws.Context, input *PutBucketNotificationInput, opts ...request.Option) (*PutBucketNotificationOutput, error) { - req, out := c.PutBucketNotificationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutBucketNotificationConfiguration = "PutBucketNotificationConfiguration" - -// PutBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the PutBucketNotificationConfiguration 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 PutBucketNotificationConfiguration for more information on using the PutBucketNotificationConfiguration -// 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 PutBucketNotificationConfigurationRequest method. -// req, resp := client.PutBucketNotificationConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration -func (c *S3) PutBucketNotificationConfigurationRequest(input *PutBucketNotificationConfigurationInput) (req *request.Request, output *PutBucketNotificationConfigurationOutput) { - op := &request.Operation{ - Name: opPutBucketNotificationConfiguration, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}?notification", - } - - if input == nil { - input = &PutBucketNotificationConfigurationInput{} - } - - output = &PutBucketNotificationConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// PutBucketNotificationConfiguration API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Enables notifications of specified events for a bucket. For more information -// about event notifications, see Configuring Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html). -// -// Using this API, you can replace an existing notification configuration. The -// configuration is an XML file that defines the event types that you want Amazon -// S3 to publish and the destination where you want Amazon S3 to publish an -// event notification when it detects an event of the specified type. -// -// By default, your bucket has no event notifications configured. That is, the -// notification configuration will be an empty NotificationConfiguration. -// -// -// -// -// -// This action replaces the existing notification configuration with the configuration -// you include in the request body. -// -// After Amazon S3 receives this request, it first verifies that any Amazon -// Simple Notification Service (Amazon SNS) or Amazon Simple Queue Service (Amazon -// SQS) destination exists, and that the bucket owner has permission to publish -// to it by sending a test notification. In the case of Lambda destinations, -// Amazon S3 verifies that the Lambda function permissions grant Amazon S3 permission -// to invoke the function from the Amazon S3 bucket. For more information, see -// Configuring Notifications for Amazon S3 Events (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html). -// -// You can disable notifications by adding the empty NotificationConfiguration -// element. -// -// For more information about the number of event notification configurations -// that you can create per bucket, see Amazon S3 service quotas (https://docs.aws.amazon.com/general/latest/gr/s3.html#limits_s3) -// in Amazon Web Services General Reference. -// -// By default, only the bucket owner can configure notifications on a bucket. -// However, bucket owners can use a bucket policy to grant permission to other -// users to set this configuration with the required s3:PutBucketNotification -// permission. -// -// The PUT notification is an atomic operation. For example, suppose your notification -// configuration includes SNS topic, SQS queue, and Lambda function configurations. -// When you send a PUT request with this configuration, Amazon S3 sends test -// messages to your SNS topic. If the message fails, the entire PUT action will -// fail, and Amazon S3 will not add the configuration to your bucket. -// -// If the configuration in the request body includes only one TopicConfiguration -// specifying only the s3:ReducedRedundancyLostObject event type, the response -// will also include the x-amz-sns-test-message-id header containing the message -// ID of the test notification sent to the topic. -// -// The following action is related to PutBucketNotificationConfiguration: -// -// - GetBucketNotificationConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketNotificationConfiguration.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 Simple Storage Service's -// API operation PutBucketNotificationConfiguration for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration -func (c *S3) PutBucketNotificationConfiguration(input *PutBucketNotificationConfigurationInput) (*PutBucketNotificationConfigurationOutput, error) { - req, out := c.PutBucketNotificationConfigurationRequest(input) - return out, req.Send() -} - -// PutBucketNotificationConfigurationWithContext is the same as PutBucketNotificationConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See PutBucketNotificationConfiguration 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 *S3) PutBucketNotificationConfigurationWithContext(ctx aws.Context, input *PutBucketNotificationConfigurationInput, opts ...request.Option) (*PutBucketNotificationConfigurationOutput, error) { - req, out := c.PutBucketNotificationConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutBucketOwnershipControls = "PutBucketOwnershipControls" - -// PutBucketOwnershipControlsRequest generates a "aws/request.Request" representing the -// client's request for the PutBucketOwnershipControls 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 PutBucketOwnershipControls for more information on using the PutBucketOwnershipControls -// 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 PutBucketOwnershipControlsRequest method. -// req, resp := client.PutBucketOwnershipControlsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketOwnershipControls -func (c *S3) PutBucketOwnershipControlsRequest(input *PutBucketOwnershipControlsInput) (req *request.Request, output *PutBucketOwnershipControlsOutput) { - op := &request.Operation{ - Name: opPutBucketOwnershipControls, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}?ownershipControls", - } - - if input == nil { - input = &PutBucketOwnershipControlsInput{} - } - - output = &PutBucketOwnershipControlsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - req.Handlers.Build.PushBackNamed(request.NamedHandler{ - Name: "contentMd5Handler", - Fn: checksum.AddBodyContentMD5Handler, - }) - return -} - -// PutBucketOwnershipControls API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Creates or modifies OwnershipControls for an Amazon S3 bucket. To use this -// operation, you must have the s3:PutBucketOwnershipControls permission. For -// more information about Amazon S3 permissions, see Specifying permissions -// in a policy (https://docs.aws.amazon.com/AmazonS3/latest/user-guide/using-with-s3-actions.html). -// -// For information about Amazon S3 Object Ownership, see Using object ownership -// (https://docs.aws.amazon.com/AmazonS3/latest/user-guide/about-object-ownership.html). -// -// The following operations are related to PutBucketOwnershipControls: -// -// - GetBucketOwnershipControls -// -// - DeleteBucketOwnershipControls -// -// 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 Simple Storage Service's -// API operation PutBucketOwnershipControls for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketOwnershipControls -func (c *S3) PutBucketOwnershipControls(input *PutBucketOwnershipControlsInput) (*PutBucketOwnershipControlsOutput, error) { - req, out := c.PutBucketOwnershipControlsRequest(input) - return out, req.Send() -} - -// PutBucketOwnershipControlsWithContext is the same as PutBucketOwnershipControls with the addition of -// the ability to pass a context and additional request options. -// -// See PutBucketOwnershipControls 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 *S3) PutBucketOwnershipControlsWithContext(ctx aws.Context, input *PutBucketOwnershipControlsInput, opts ...request.Option) (*PutBucketOwnershipControlsOutput, error) { - req, out := c.PutBucketOwnershipControlsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutBucketPolicy = "PutBucketPolicy" - -// PutBucketPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutBucketPolicy 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 PutBucketPolicy for more information on using the PutBucketPolicy -// 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 PutBucketPolicyRequest method. -// req, resp := client.PutBucketPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy -func (c *S3) PutBucketPolicyRequest(input *PutBucketPolicyInput) (req *request.Request, output *PutBucketPolicyOutput) { - op := &request.Operation{ - Name: opPutBucketPolicy, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}?policy", - } - - if input == nil { - input = &PutBucketPolicyInput{} - } - - output = &PutBucketPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - req.Handlers.Build.PushBackNamed(request.NamedHandler{ - Name: "contentMd5Handler", - Fn: checksum.AddBodyContentMD5Handler, - }) - return -} - -// PutBucketPolicy API operation for Amazon Simple Storage Service. -// -// Applies an Amazon S3 bucket policy to an Amazon S3 bucket. -// -// Directory buckets - For directory buckets, you must make requests for this -// API operation to the Regional endpoint. These endpoints support path-style -// requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name -// . Virtual-hosted-style requests aren't supported. For more information, see -// Regional and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html) -// in the Amazon S3 User Guide. -// -// # Permissions -// -// If you are using an identity other than the root user of the Amazon Web Services -// account that owns the bucket, the calling identity must both have the PutBucketPolicy -// permissions on the specified bucket and belong to the bucket owner's account -// in order to use this operation. -// -// If you don't have PutBucketPolicy permissions, Amazon S3 returns a 403 Access -// Denied error. If you have the correct permissions, but you're not using an -// identity that belongs to the bucket owner's account, Amazon S3 returns a -// 405 Method Not Allowed error. -// -// To ensure that bucket owners don't inadvertently lock themselves out of their -// own buckets, the root principal in a bucket owner's Amazon Web Services account -// can perform the GetBucketPolicy, PutBucketPolicy, and DeleteBucketPolicy -// API actions, even if their bucket policy explicitly denies the root principal's -// access. Bucket owner root principals can only be blocked from performing -// these API actions by VPC endpoint policies and Amazon Web Services Organizations -// policies. -// -// - General purpose bucket permissions - The s3:PutBucketPolicy permission -// is required in a policy. For more information about general purpose buckets -// bucket policies, see Using Bucket Policies and User Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html) -// in the Amazon S3 User Guide. -// -// - Directory bucket permissions - To grant access to this API operation, -// you must have the s3express:PutBucketPolicy permission in an IAM identity-based -// policy instead of a bucket policy. Cross-account access to this API operation -// isn't supported. This operation can only be performed by the Amazon Web -// Services account that owns the resource. For more information about directory -// bucket policies and permissions, see Amazon Web Services Identity and -// Access Management (IAM) for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html) -// in the Amazon S3 User Guide. -// -// # Example bucket policies -// -// General purpose buckets example bucket policies - See Bucket policy examples -// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html) -// in the Amazon S3 User Guide. -// -// Directory bucket example bucket policies - See Example bucket policies for -// S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html) -// in the Amazon S3 User Guide. -// -// # HTTP Host header syntax -// -// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. -// -// The following operations are related to PutBucketPolicy: -// -// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html) -// -// - DeleteBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.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 Simple Storage Service's -// API operation PutBucketPolicy for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy -func (c *S3) PutBucketPolicy(input *PutBucketPolicyInput) (*PutBucketPolicyOutput, error) { - req, out := c.PutBucketPolicyRequest(input) - return out, req.Send() -} - -// PutBucketPolicyWithContext is the same as PutBucketPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutBucketPolicy 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 *S3) PutBucketPolicyWithContext(ctx aws.Context, input *PutBucketPolicyInput, opts ...request.Option) (*PutBucketPolicyOutput, error) { - req, out := c.PutBucketPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutBucketReplication = "PutBucketReplication" - -// PutBucketReplicationRequest generates a "aws/request.Request" representing the -// client's request for the PutBucketReplication 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 PutBucketReplication for more information on using the PutBucketReplication -// 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 PutBucketReplicationRequest method. -// req, resp := client.PutBucketReplicationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication -func (c *S3) PutBucketReplicationRequest(input *PutBucketReplicationInput) (req *request.Request, output *PutBucketReplicationOutput) { - op := &request.Operation{ - Name: opPutBucketReplication, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}?replication", - } - - if input == nil { - input = &PutBucketReplicationInput{} - } - - output = &PutBucketReplicationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - req.Handlers.Build.PushBackNamed(request.NamedHandler{ - Name: "contentMd5Handler", - Fn: checksum.AddBodyContentMD5Handler, - }) - return -} - -// PutBucketReplication API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Creates a replication configuration or replaces an existing one. For more -// information, see Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html) -// in the Amazon S3 User Guide. -// -// Specify the replication configuration in the request body. In the replication -// configuration, you provide the name of the destination bucket or buckets -// where you want Amazon S3 to replicate objects, the IAM role that Amazon S3 -// can assume to replicate objects on your behalf, and other relevant information. -// You can invoke this request for a specific Amazon Web Services Region by -// using the aws:RequestedRegion (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-requestedregion) -// condition key. -// -// A replication configuration must include at least one rule, and can contain -// a maximum of 1,000. Each rule identifies a subset of objects to replicate -// by filtering the objects in the source bucket. To choose additional subsets -// of objects to replicate, add a rule for each subset. -// -// To specify a subset of the objects in the source bucket to apply a replication -// rule to, add the Filter element as a child of the Rule element. You can filter -// objects based on an object key prefix, one or more object tags, or both. -// When you add the Filter element in the configuration, you must also add the -// following elements: DeleteMarkerReplication, Status, and Priority. -// -// If you are using an earlier version of the replication configuration, Amazon -// S3 handles replication of delete markers differently. For more information, -// see Backward Compatibility (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-backward-compat-considerations). -// -// For information about enabling versioning on a bucket, see Using Versioning -// (https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html). -// -// # Handling Replication of Encrypted Objects -// -// By default, Amazon S3 doesn't replicate objects that are stored at rest using -// server-side encryption with KMS keys. To replicate Amazon Web Services KMS-encrypted -// objects, add the following: SourceSelectionCriteria, SseKmsEncryptedObjects, -// Status, EncryptionConfiguration, and ReplicaKmsKeyID. For information about -// replication configuration, see Replicating Objects Created with SSE Using -// KMS keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-config-for-kms-objects.html). -// -// For information on PutBucketReplication errors, see List of replication-related -// error codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ReplicationErrorCodeList) -// -// # Permissions -// -// To create a PutBucketReplication request, you must have s3:PutReplicationConfiguration -// permissions for the bucket. -// -// By default, a resource owner, in this case the Amazon Web Services account -// that created the bucket, can perform this operation. The resource owner can -// also grant others permissions to perform the operation. For more information -// about permissions, see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). -// -// To perform this operation, the user or role performing the action must have -// the iam:PassRole (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html) -// permission. -// -// The following operations are related to PutBucketReplication: -// -// - GetBucketReplication (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketReplication.html) -// -// - DeleteBucketReplication (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketReplication.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 Simple Storage Service's -// API operation PutBucketReplication for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication -func (c *S3) PutBucketReplication(input *PutBucketReplicationInput) (*PutBucketReplicationOutput, error) { - req, out := c.PutBucketReplicationRequest(input) - return out, req.Send() -} - -// PutBucketReplicationWithContext is the same as PutBucketReplication with the addition of -// the ability to pass a context and additional request options. -// -// See PutBucketReplication 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 *S3) PutBucketReplicationWithContext(ctx aws.Context, input *PutBucketReplicationInput, opts ...request.Option) (*PutBucketReplicationOutput, error) { - req, out := c.PutBucketReplicationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutBucketRequestPayment = "PutBucketRequestPayment" - -// PutBucketRequestPaymentRequest generates a "aws/request.Request" representing the -// client's request for the PutBucketRequestPayment 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 PutBucketRequestPayment for more information on using the PutBucketRequestPayment -// 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 PutBucketRequestPaymentRequest method. -// req, resp := client.PutBucketRequestPaymentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment -func (c *S3) PutBucketRequestPaymentRequest(input *PutBucketRequestPaymentInput) (req *request.Request, output *PutBucketRequestPaymentOutput) { - op := &request.Operation{ - Name: opPutBucketRequestPayment, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}?requestPayment", - } - - if input == nil { - input = &PutBucketRequestPaymentInput{} - } - - output = &PutBucketRequestPaymentOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - req.Handlers.Build.PushBackNamed(request.NamedHandler{ - Name: "contentMd5Handler", - Fn: checksum.AddBodyContentMD5Handler, - }) - return -} - -// PutBucketRequestPayment API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Sets the request payment configuration for a bucket. By default, the bucket -// owner pays for downloads from the bucket. This configuration parameter enables -// the bucket owner (only) to specify that the person requesting the download -// will be charged for the download. For more information, see Requester Pays -// Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html). -// -// The following operations are related to PutBucketRequestPayment: -// -// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html) -// -// - GetBucketRequestPayment (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketRequestPayment.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 Simple Storage Service's -// API operation PutBucketRequestPayment for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment -func (c *S3) PutBucketRequestPayment(input *PutBucketRequestPaymentInput) (*PutBucketRequestPaymentOutput, error) { - req, out := c.PutBucketRequestPaymentRequest(input) - return out, req.Send() -} - -// PutBucketRequestPaymentWithContext is the same as PutBucketRequestPayment with the addition of -// the ability to pass a context and additional request options. -// -// See PutBucketRequestPayment 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 *S3) PutBucketRequestPaymentWithContext(ctx aws.Context, input *PutBucketRequestPaymentInput, opts ...request.Option) (*PutBucketRequestPaymentOutput, error) { - req, out := c.PutBucketRequestPaymentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutBucketTagging = "PutBucketTagging" - -// PutBucketTaggingRequest generates a "aws/request.Request" representing the -// client's request for the PutBucketTagging 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 PutBucketTagging for more information on using the PutBucketTagging -// 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 PutBucketTaggingRequest method. -// req, resp := client.PutBucketTaggingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging -func (c *S3) PutBucketTaggingRequest(input *PutBucketTaggingInput) (req *request.Request, output *PutBucketTaggingOutput) { - op := &request.Operation{ - Name: opPutBucketTagging, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}?tagging", - } - - if input == nil { - input = &PutBucketTaggingInput{} - } - - output = &PutBucketTaggingOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - req.Handlers.Build.PushBackNamed(request.NamedHandler{ - Name: "contentMd5Handler", - Fn: checksum.AddBodyContentMD5Handler, - }) - return -} - -// PutBucketTagging API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Sets the tags for a bucket. -// -// Use tags to organize your Amazon Web Services bill to reflect your own cost -// structure. To do this, sign up to get your Amazon Web Services account bill -// with tag key values included. Then, to see the cost of combined resources, -// organize your billing information according to resources with the same tag -// key values. For example, you can tag several resources with a specific application -// name, and then organize your billing information to see the total cost of -// that application across several services. For more information, see Cost -// Allocation and Tagging (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html) -// and Using Cost Allocation in Amazon S3 Bucket Tags (https://docs.aws.amazon.com/AmazonS3/latest/userguide/CostAllocTagging.html). -// -// When this operation sets the tags for a bucket, it will overwrite any current -// tags the bucket already has. You cannot use this operation to add tags to -// an existing list of tags. -// -// To use this operation, you must have permissions to perform the s3:PutBucketTagging -// action. The bucket owner has this permission by default and can grant this -// permission to others. For more information about permissions, see Permissions -// Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html). -// -// PutBucketTagging has the following special errors. For more Amazon S3 errors -// see, Error Responses (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html). -// -// - InvalidTag - The tag provided was not a valid tag. This error can occur -// if the tag did not pass input validation. For more information, see Using -// Cost Allocation in Amazon S3 Bucket Tags (https://docs.aws.amazon.com/AmazonS3/latest/userguide/CostAllocTagging.html). -// -// - MalformedXML - The XML provided does not match the schema. -// -// - OperationAborted - A conflicting conditional action is currently in -// progress against this resource. Please try again. -// -// - InternalError - The service was unable to apply the provided tag to -// the bucket. -// -// The following operations are related to PutBucketTagging: -// -// - GetBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketTagging.html) -// -// - DeleteBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketTagging.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 Simple Storage Service's -// API operation PutBucketTagging for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging -func (c *S3) PutBucketTagging(input *PutBucketTaggingInput) (*PutBucketTaggingOutput, error) { - req, out := c.PutBucketTaggingRequest(input) - return out, req.Send() -} - -// PutBucketTaggingWithContext is the same as PutBucketTagging with the addition of -// the ability to pass a context and additional request options. -// -// See PutBucketTagging 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 *S3) PutBucketTaggingWithContext(ctx aws.Context, input *PutBucketTaggingInput, opts ...request.Option) (*PutBucketTaggingOutput, error) { - req, out := c.PutBucketTaggingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutBucketVersioning = "PutBucketVersioning" - -// PutBucketVersioningRequest generates a "aws/request.Request" representing the -// client's request for the PutBucketVersioning 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 PutBucketVersioning for more information on using the PutBucketVersioning -// 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 PutBucketVersioningRequest method. -// req, resp := client.PutBucketVersioningRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning -func (c *S3) PutBucketVersioningRequest(input *PutBucketVersioningInput) (req *request.Request, output *PutBucketVersioningOutput) { - op := &request.Operation{ - Name: opPutBucketVersioning, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}?versioning", - } - - if input == nil { - input = &PutBucketVersioningInput{} - } - - output = &PutBucketVersioningOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - req.Handlers.Build.PushBackNamed(request.NamedHandler{ - Name: "contentMd5Handler", - Fn: checksum.AddBodyContentMD5Handler, - }) - return -} - -// PutBucketVersioning API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Sets the versioning state of an existing bucket. -// -// You can set the versioning state with one of the following values: -// -// Enabled—Enables versioning for the objects in the bucket. All objects added -// to the bucket receive a unique version ID. -// -// Suspended—Disables versioning for the objects in the bucket. All objects -// added to the bucket receive the version ID null. -// -// If the versioning state has never been set on a bucket, it has no versioning -// state; a GetBucketVersioning (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html) -// request does not return a versioning state value. -// -// In order to enable MFA Delete, you must be the bucket owner. If you are the -// bucket owner and want to enable MFA Delete in the bucket versioning configuration, -// you must include the x-amz-mfa request header and the Status and the MfaDelete -// request elements in a request to set the versioning state of the bucket. -// -// If you have an object expiration lifecycle configuration in your non-versioned -// bucket and you want to maintain the same permanent delete behavior when you -// enable versioning, you must add a noncurrent expiration policy. The noncurrent -// expiration lifecycle configuration will manage the deletes of the noncurrent -// object versions in the version-enabled bucket. (A version-enabled bucket -// maintains one current and zero or more noncurrent object versions.) For more -// information, see Lifecycle and Versioning (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html#lifecycle-and-other-bucket-config). -// -// The following operations are related to PutBucketVersioning: -// -// - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html) -// -// - DeleteBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html) -// -// - GetBucketVersioning (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.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 Simple Storage Service's -// API operation PutBucketVersioning for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning -func (c *S3) PutBucketVersioning(input *PutBucketVersioningInput) (*PutBucketVersioningOutput, error) { - req, out := c.PutBucketVersioningRequest(input) - return out, req.Send() -} - -// PutBucketVersioningWithContext is the same as PutBucketVersioning with the addition of -// the ability to pass a context and additional request options. -// -// See PutBucketVersioning 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 *S3) PutBucketVersioningWithContext(ctx aws.Context, input *PutBucketVersioningInput, opts ...request.Option) (*PutBucketVersioningOutput, error) { - req, out := c.PutBucketVersioningRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutBucketWebsite = "PutBucketWebsite" - -// PutBucketWebsiteRequest generates a "aws/request.Request" representing the -// client's request for the PutBucketWebsite 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 PutBucketWebsite for more information on using the PutBucketWebsite -// 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 PutBucketWebsiteRequest method. -// req, resp := client.PutBucketWebsiteRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite -func (c *S3) PutBucketWebsiteRequest(input *PutBucketWebsiteInput) (req *request.Request, output *PutBucketWebsiteOutput) { - op := &request.Operation{ - Name: opPutBucketWebsite, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}?website", - } - - if input == nil { - input = &PutBucketWebsiteInput{} - } - - output = &PutBucketWebsiteOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - req.Handlers.Build.PushBackNamed(request.NamedHandler{ - Name: "contentMd5Handler", - Fn: checksum.AddBodyContentMD5Handler, - }) - return -} - -// PutBucketWebsite API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Sets the configuration of the website that is specified in the website subresource. -// To configure a bucket as a website, you can add this subresource on the bucket -// with website configuration information such as the file name of the index -// document and any redirect rules. For more information, see Hosting Websites -// on Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html). -// -// This PUT action requires the S3:PutBucketWebsite permission. By default, -// only the bucket owner can configure the website attached to a bucket; however, -// bucket owners can allow other users to set the website configuration by writing -// a bucket policy that grants them the S3:PutBucketWebsite permission. -// -// To redirect all website requests sent to the bucket's website endpoint, you -// add a website configuration with the following elements. Because all requests -// are sent to another website, you don't need to provide index document name -// for the bucket. -// -// - WebsiteConfiguration -// -// - RedirectAllRequestsTo -// -// - HostName -// -// - Protocol -// -// If you want granular control over redirects, you can use the following elements -// to add routing rules that describe conditions for redirecting requests and -// information about the redirect destination. In this case, the website configuration -// must provide an index document for the bucket, because some requests might -// not be redirected. -// -// - WebsiteConfiguration -// -// - IndexDocument -// -// - Suffix -// -// - ErrorDocument -// -// - Key -// -// - RoutingRules -// -// - RoutingRule -// -// - Condition -// -// - HttpErrorCodeReturnedEquals -// -// - KeyPrefixEquals -// -// - Redirect -// -// - Protocol -// -// - HostName -// -// - ReplaceKeyPrefixWith -// -// - ReplaceKeyWith -// -// - HttpRedirectCode -// -// Amazon S3 has a limitation of 50 routing rules per website configuration. -// If you require more than 50 routing rules, you can use object redirect. For -// more information, see Configuring an Object Redirect (https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html) -// in the Amazon S3 User Guide. -// -// The maximum request length is limited to 128 KB. -// -// 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 Simple Storage Service's -// API operation PutBucketWebsite for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite -func (c *S3) PutBucketWebsite(input *PutBucketWebsiteInput) (*PutBucketWebsiteOutput, error) { - req, out := c.PutBucketWebsiteRequest(input) - return out, req.Send() -} - -// PutBucketWebsiteWithContext is the same as PutBucketWebsite with the addition of -// the ability to pass a context and additional request options. -// -// See PutBucketWebsite 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 *S3) PutBucketWebsiteWithContext(ctx aws.Context, input *PutBucketWebsiteInput, opts ...request.Option) (*PutBucketWebsiteOutput, error) { - req, out := c.PutBucketWebsiteRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutObject = "PutObject" - -// PutObjectRequest generates a "aws/request.Request" representing the -// client's request for the PutObject 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 PutObject for more information on using the PutObject -// 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 PutObjectRequest method. -// req, resp := client.PutObjectRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject -func (c *S3) PutObjectRequest(input *PutObjectInput) (req *request.Request, output *PutObjectOutput) { - op := &request.Operation{ - Name: opPutObject, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}/{Key+}", - } - - if input == nil { - input = &PutObjectInput{} - } - - output = &PutObjectOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutObject API operation for Amazon Simple Storage Service. -// -// Adds an object to a bucket. -// -// - Amazon S3 never adds partial objects; if you receive a success response, -// Amazon S3 added the entire object to the bucket. You cannot use PutObject -// to only update a single piece of metadata for an existing object. You -// must put the entire object with updated metadata if you want to update -// some values. -// -// - If your bucket uses the bucket owner enforced setting for Object Ownership, -// ACLs are disabled and no longer affect permissions. All objects written -// to the bucket by any account will be owned by the bucket owner. -// -// - Directory buckets - For directory buckets, you must make requests for -// this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style -// requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name -// . Path-style requests are not supported. For more information, see Regional -// and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html) -// in the Amazon S3 User Guide. -// -// Amazon S3 is a distributed system. If it receives multiple write requests -// for the same object simultaneously, it overwrites all but the last object -// written. However, Amazon S3 provides features that can modify this behavior: -// -// - S3 Object Lock - To prevent objects from being deleted or overwritten, -// you can use Amazon S3 Object Lock (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html) -// in the Amazon S3 User Guide. This functionality is not supported for directory -// buckets. -// -// - S3 Versioning - When you enable versioning for a bucket, if Amazon S3 -// receives multiple write requests for the same object simultaneously, it -// stores all versions of the objects. For each write request that is made -// to the same object, Amazon S3 automatically generates a unique version -// ID of that object being stored in Amazon S3. You can retrieve, replace, -// or delete any version of the object. For more information about versioning, -// see Adding Objects to Versioning-Enabled Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/AddingObjectstoVersioningEnabledBuckets.html) -// in the Amazon S3 User Guide. For information about returning the versioning -// state of a bucket, see GetBucketVersioning (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html). -// This functionality is not supported for directory buckets. -// -// Permissions -// -// - General purpose bucket permissions - The following permissions are required -// in your policies when your PutObject request includes specific headers. -// s3:PutObject - To successfully complete the PutObject request, you must -// always have the s3:PutObject permission on a bucket to add an object to -// it. s3:PutObjectAcl - To successfully change the objects ACL of your PutObject -// request, you must have the s3:PutObjectAcl. s3:PutObjectTagging - To successfully -// set the tag-set with your PutObject request, you must have the s3:PutObjectTagging. -// -// - Directory bucket permissions - To grant access to this API operation -// on a directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html) -// API operation for session-based authorization. Specifically, you grant -// the s3express:CreateSession permission to the directory bucket in a bucket -// policy or an IAM identity-based policy. Then, you make the CreateSession -// API call on the bucket to obtain a session token. With the session token -// in your request header, you can make API requests to this operation. After -// the session token expires, you make another CreateSession API call to -// generate a new session token for use. Amazon Web Services CLI or SDKs -// create session and refresh the session token automatically to avoid service -// interruptions when a session expires. For more information about authorization, -// see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html). -// -// Data integrity with Content-MD5 -// -// - General purpose bucket - To ensure that data is not corrupted traversing -// the network, use the Content-MD5 header. When you use this header, Amazon -// S3 checks the object against the provided MD5 value and, if they do not -// match, Amazon S3 returns an error. Alternatively, when the object's ETag -// is its MD5 digest, you can calculate the MD5 while putting the object -// to Amazon S3 and compare the returned ETag to the calculated MD5 value. -// -// - Directory bucket - This functionality is not supported for directory -// buckets. -// -// # HTTP Host header syntax -// -// Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. -// -// For more information about related Amazon S3 APIs, see the following: -// -// - CopyObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html) -// -// - DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.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 Simple Storage Service's -// API operation PutObject for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject -func (c *S3) PutObject(input *PutObjectInput) (*PutObjectOutput, error) { - req, out := c.PutObjectRequest(input) - return out, req.Send() -} - -// PutObjectWithContext is the same as PutObject with the addition of -// the ability to pass a context and additional request options. -// -// See PutObject 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 *S3) PutObjectWithContext(ctx aws.Context, input *PutObjectInput, opts ...request.Option) (*PutObjectOutput, error) { - req, out := c.PutObjectRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutObjectAcl = "PutObjectAcl" - -// PutObjectAclRequest generates a "aws/request.Request" representing the -// client's request for the PutObjectAcl 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 PutObjectAcl for more information on using the PutObjectAcl -// 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 PutObjectAclRequest method. -// req, resp := client.PutObjectAclRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl -func (c *S3) PutObjectAclRequest(input *PutObjectAclInput) (req *request.Request, output *PutObjectAclOutput) { - op := &request.Operation{ - Name: opPutObjectAcl, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}/{Key+}?acl", - } - - if input == nil { - input = &PutObjectAclInput{} - } - - output = &PutObjectAclOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Build.PushBackNamed(request.NamedHandler{ - Name: "contentMd5Handler", - Fn: checksum.AddBodyContentMD5Handler, - }) - return -} - -// PutObjectAcl API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Uses the acl subresource to set the access control list (ACL) permissions -// for a new or existing object in an S3 bucket. You must have the WRITE_ACP -// permission to set the ACL of an object. For more information, see What permissions -// can I grant? (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#permissions) -// in the Amazon S3 User Guide. -// -// This functionality is not supported for Amazon S3 on Outposts. -// -// Depending on your application needs, you can choose to set the ACL on an -// object using either the request body or the headers. For example, if you -// have an existing application that updates a bucket ACL using the request -// body, you can continue to use that approach. For more information, see Access -// Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html) -// in the Amazon S3 User Guide. -// -// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, -// ACLs are disabled and no longer affect permissions. You must use policies -// to grant access to your bucket and the objects in it. Requests to set ACLs -// or update ACLs fail and return the AccessControlListNotSupported error code. -// Requests to read ACLs are still supported. For more information, see Controlling -// object ownership (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html) -// in the Amazon S3 User Guide. -// -// # Permissions -// -// You can set access permissions using one of the following methods: -// -// - Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports -// a set of predefined ACLs, known as canned ACLs. Each canned ACL has a -// predefined set of grantees and permissions. Specify the canned ACL name -// as the value of x-amz-acl. If you use this header, you cannot use other -// access control-specific headers in your request. For more information, -// see Canned ACL (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL). -// -// - Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, -// x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using -// these headers, you specify explicit access permissions and grantees (Amazon -// Web Services accounts or Amazon S3 groups) who will receive the permission. -// If you use these ACL-specific headers, you cannot use x-amz-acl header -// to set a canned ACL. These parameters map to the set of permissions that -// Amazon S3 supports in an ACL. For more information, see Access Control -// List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html). -// You specify each grantee as a type=value pair, where the type is one of -// the following: id – if the value specified is the canonical user ID -// of an Amazon Web Services account uri – if you are granting permissions -// to a predefined group emailAddress – if the value specified is the email -// address of an Amazon Web Services account Using email addresses to specify -// a grantee is only supported in the following Amazon Web Services Regions: -// US East (N. Virginia) US West (N. California) US West (Oregon) Asia Pacific -// (Singapore) Asia Pacific (Sydney) Asia Pacific (Tokyo) Europe (Ireland) -// South America (São Paulo) For a list of all the Amazon S3 supported Regions -// and endpoints, see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) -// in the Amazon Web Services General Reference. For example, the following -// x-amz-grant-read header grants list objects permission to the two Amazon -// Web Services accounts identified by their email addresses. x-amz-grant-read: -// emailAddress="xyz@amazon.com", emailAddress="abc@amazon.com" -// -// You can use either a canned ACL or specify access permissions explicitly. -// You cannot do both. -// -// # Grantee Values -// -// You can specify the person (grantee) to whom you're assigning access rights -// (using request elements) in the following ways: -// -// - By the person's ID: <>ID<><>GranteesEmail<> -// DisplayName is optional and ignored in the request. -// -// - By URI: <>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<> -// -// - By Email address: <>Grantees@email.com<>lt;/Grantee> -// The grantee is resolved to the CanonicalUser and, in a response to a GET -// Object acl request, appears as the CanonicalUser. Using email addresses -// to specify a grantee is only supported in the following Amazon Web Services -// Regions: US East (N. Virginia) US West (N. California) US West (Oregon) -// Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific (Tokyo) Europe -// (Ireland) South America (São Paulo) For a list of all the Amazon S3 supported -// Regions and endpoints, see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) -// in the Amazon Web Services General Reference. -// -// # Versioning -// -// The ACL of an object is set at the object version level. By default, PUT -// sets the ACL of the current version of an object. To set the ACL of a different -// version, use the versionId subresource. -// -// The following operations are related to PutObjectAcl: -// -// - CopyObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html) -// -// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.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 Simple Storage Service's -// API operation PutObjectAcl for usage and error information. -// -// Returned Error Codes: -// - ErrCodeNoSuchKey "NoSuchKey" -// The specified key does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl -func (c *S3) PutObjectAcl(input *PutObjectAclInput) (*PutObjectAclOutput, error) { - req, out := c.PutObjectAclRequest(input) - return out, req.Send() -} - -// PutObjectAclWithContext is the same as PutObjectAcl with the addition of -// the ability to pass a context and additional request options. -// -// See PutObjectAcl 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 *S3) PutObjectAclWithContext(ctx aws.Context, input *PutObjectAclInput, opts ...request.Option) (*PutObjectAclOutput, error) { - req, out := c.PutObjectAclRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutObjectLegalHold = "PutObjectLegalHold" - -// PutObjectLegalHoldRequest generates a "aws/request.Request" representing the -// client's request for the PutObjectLegalHold 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 PutObjectLegalHold for more information on using the PutObjectLegalHold -// 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 PutObjectLegalHoldRequest method. -// req, resp := client.PutObjectLegalHoldRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLegalHold -func (c *S3) PutObjectLegalHoldRequest(input *PutObjectLegalHoldInput) (req *request.Request, output *PutObjectLegalHoldOutput) { - op := &request.Operation{ - Name: opPutObjectLegalHold, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}/{Key+}?legal-hold", - } - - if input == nil { - input = &PutObjectLegalHoldInput{} - } - - output = &PutObjectLegalHoldOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Build.PushBackNamed(request.NamedHandler{ - Name: "contentMd5Handler", - Fn: checksum.AddBodyContentMD5Handler, - }) - return -} - -// PutObjectLegalHold API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Applies a legal hold configuration to the specified object. For more information, -// see Locking Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html). -// -// This functionality is not supported for Amazon S3 on Outposts. -// -// 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 Simple Storage Service's -// API operation PutObjectLegalHold for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLegalHold -func (c *S3) PutObjectLegalHold(input *PutObjectLegalHoldInput) (*PutObjectLegalHoldOutput, error) { - req, out := c.PutObjectLegalHoldRequest(input) - return out, req.Send() -} - -// PutObjectLegalHoldWithContext is the same as PutObjectLegalHold with the addition of -// the ability to pass a context and additional request options. -// -// See PutObjectLegalHold 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 *S3) PutObjectLegalHoldWithContext(ctx aws.Context, input *PutObjectLegalHoldInput, opts ...request.Option) (*PutObjectLegalHoldOutput, error) { - req, out := c.PutObjectLegalHoldRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutObjectLockConfiguration = "PutObjectLockConfiguration" - -// PutObjectLockConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the PutObjectLockConfiguration 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 PutObjectLockConfiguration for more information on using the PutObjectLockConfiguration -// 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 PutObjectLockConfigurationRequest method. -// req, resp := client.PutObjectLockConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLockConfiguration -func (c *S3) PutObjectLockConfigurationRequest(input *PutObjectLockConfigurationInput) (req *request.Request, output *PutObjectLockConfigurationOutput) { - op := &request.Operation{ - Name: opPutObjectLockConfiguration, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}?object-lock", - } - - if input == nil { - input = &PutObjectLockConfigurationInput{} - } - - output = &PutObjectLockConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Build.PushBackNamed(request.NamedHandler{ - Name: "contentMd5Handler", - Fn: checksum.AddBodyContentMD5Handler, - }) - return -} - -// PutObjectLockConfiguration API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Places an Object Lock configuration on the specified bucket. The rule specified -// in the Object Lock configuration will be applied by default to every new -// object placed in the specified bucket. For more information, see Locking -// Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html). -// -// - The DefaultRetention settings require both a mode and a period. -// -// - The DefaultRetention period can be either Days or Years but you must -// select one. You cannot specify Days and Years at the same time. -// -// - You can enable Object Lock for new or existing buckets. For more information, -// see Configuring Object Lock (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-configure.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 Simple Storage Service's -// API operation PutObjectLockConfiguration for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLockConfiguration -func (c *S3) PutObjectLockConfiguration(input *PutObjectLockConfigurationInput) (*PutObjectLockConfigurationOutput, error) { - req, out := c.PutObjectLockConfigurationRequest(input) - return out, req.Send() -} - -// PutObjectLockConfigurationWithContext is the same as PutObjectLockConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See PutObjectLockConfiguration 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 *S3) PutObjectLockConfigurationWithContext(ctx aws.Context, input *PutObjectLockConfigurationInput, opts ...request.Option) (*PutObjectLockConfigurationOutput, error) { - req, out := c.PutObjectLockConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutObjectRetention = "PutObjectRetention" - -// PutObjectRetentionRequest generates a "aws/request.Request" representing the -// client's request for the PutObjectRetention 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 PutObjectRetention for more information on using the PutObjectRetention -// 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 PutObjectRetentionRequest method. -// req, resp := client.PutObjectRetentionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectRetention -func (c *S3) PutObjectRetentionRequest(input *PutObjectRetentionInput) (req *request.Request, output *PutObjectRetentionOutput) { - op := &request.Operation{ - Name: opPutObjectRetention, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}/{Key+}?retention", - } - - if input == nil { - input = &PutObjectRetentionInput{} - } - - output = &PutObjectRetentionOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Build.PushBackNamed(request.NamedHandler{ - Name: "contentMd5Handler", - Fn: checksum.AddBodyContentMD5Handler, - }) - return -} - -// PutObjectRetention API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Places an Object Retention configuration on an object. For more information, -// see Locking Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html). -// Users or accounts require the s3:PutObjectRetention permission in order to -// place an Object Retention configuration on objects. Bypassing a Governance -// Retention configuration requires the s3:BypassGovernanceRetention permission. -// -// This functionality is not supported for Amazon S3 on Outposts. -// -// 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 Simple Storage Service's -// API operation PutObjectRetention for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectRetention -func (c *S3) PutObjectRetention(input *PutObjectRetentionInput) (*PutObjectRetentionOutput, error) { - req, out := c.PutObjectRetentionRequest(input) - return out, req.Send() -} - -// PutObjectRetentionWithContext is the same as PutObjectRetention with the addition of -// the ability to pass a context and additional request options. -// -// See PutObjectRetention 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 *S3) PutObjectRetentionWithContext(ctx aws.Context, input *PutObjectRetentionInput, opts ...request.Option) (*PutObjectRetentionOutput, error) { - req, out := c.PutObjectRetentionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutObjectTagging = "PutObjectTagging" - -// PutObjectTaggingRequest generates a "aws/request.Request" representing the -// client's request for the PutObjectTagging 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 PutObjectTagging for more information on using the PutObjectTagging -// 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 PutObjectTaggingRequest method. -// req, resp := client.PutObjectTaggingRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging -func (c *S3) PutObjectTaggingRequest(input *PutObjectTaggingInput) (req *request.Request, output *PutObjectTaggingOutput) { - op := &request.Operation{ - Name: opPutObjectTagging, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}/{Key+}?tagging", - } - - if input == nil { - input = &PutObjectTaggingInput{} - } - - output = &PutObjectTaggingOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Build.PushBackNamed(request.NamedHandler{ - Name: "contentMd5Handler", - Fn: checksum.AddBodyContentMD5Handler, - }) - return -} - -// PutObjectTagging API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Sets the supplied tag-set to an object that already exists in a bucket. A -// tag is a key-value pair. For more information, see Object Tagging (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-tagging.html). -// -// You can associate tags with an object by sending a PUT request against the -// tagging subresource that is associated with the object. You can retrieve -// tags by sending a GET request. For more information, see GetObjectTagging -// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html). -// -// For tagging-related restrictions related to characters and encodings, see -// Tag Restrictions (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.html). -// Note that Amazon S3 limits the maximum number of tags to 10 tags per object. -// -// To use this operation, you must have permission to perform the s3:PutObjectTagging -// action. By default, the bucket owner has this permission and can grant this -// permission to others. -// -// To put tags of any other version, use the versionId query parameter. You -// also need permission for the s3:PutObjectVersionTagging action. -// -// PutObjectTagging has the following special errors. For more Amazon S3 errors -// see, Error Responses (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html). -// -// - InvalidTag - The tag provided was not a valid tag. This error can occur -// if the tag did not pass input validation. For more information, see Object -// Tagging (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-tagging.html). -// -// - MalformedXML - The XML provided does not match the schema. -// -// - OperationAborted - A conflicting conditional action is currently in -// progress against this resource. Please try again. -// -// - InternalError - The service was unable to apply the provided tag to -// the object. -// -// The following operations are related to PutObjectTagging: -// -// - GetObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html) -// -// - DeleteObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjectTagging.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 Simple Storage Service's -// API operation PutObjectTagging for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging -func (c *S3) PutObjectTagging(input *PutObjectTaggingInput) (*PutObjectTaggingOutput, error) { - req, out := c.PutObjectTaggingRequest(input) - return out, req.Send() -} - -// PutObjectTaggingWithContext is the same as PutObjectTagging with the addition of -// the ability to pass a context and additional request options. -// -// See PutObjectTagging 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 *S3) PutObjectTaggingWithContext(ctx aws.Context, input *PutObjectTaggingInput, opts ...request.Option) (*PutObjectTaggingOutput, error) { - req, out := c.PutObjectTaggingRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutPublicAccessBlock = "PutPublicAccessBlock" - -// PutPublicAccessBlockRequest generates a "aws/request.Request" representing the -// client's request for the PutPublicAccessBlock 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 PutPublicAccessBlock for more information on using the PutPublicAccessBlock -// 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 PutPublicAccessBlockRequest method. -// req, resp := client.PutPublicAccessBlockRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutPublicAccessBlock -func (c *S3) PutPublicAccessBlockRequest(input *PutPublicAccessBlockInput) (req *request.Request, output *PutPublicAccessBlockOutput) { - op := &request.Operation{ - Name: opPutPublicAccessBlock, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}?publicAccessBlock", - } - - if input == nil { - input = &PutPublicAccessBlockInput{} - } - - output = &PutPublicAccessBlockOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - req.Handlers.Build.PushBackNamed(request.NamedHandler{ - Name: "contentMd5Handler", - Fn: checksum.AddBodyContentMD5Handler, - }) - return -} - -// PutPublicAccessBlock API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Creates or modifies the PublicAccessBlock configuration for an Amazon S3 -// bucket. To use this operation, you must have the s3:PutBucketPublicAccessBlock -// permission. For more information about Amazon S3 permissions, see Specifying -// Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html). -// -// When Amazon S3 evaluates the PublicAccessBlock configuration for a bucket -// or an object, it checks the PublicAccessBlock configuration for both the -// bucket (or the bucket that contains the object) and the bucket owner's account. -// If the PublicAccessBlock configurations are different between the bucket -// and the account, Amazon S3 uses the most restrictive combination of the bucket-level -// and account-level settings. -// -// For more information about when Amazon S3 considers a bucket or an object -// public, see The Meaning of "Public" (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status). -// -// The following operations are related to PutPublicAccessBlock: -// -// - GetPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html) -// -// - DeletePublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html) -// -// - GetBucketPolicyStatus (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketPolicyStatus.html) -// -// - Using Amazon S3 Block Public Access (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.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 Simple Storage Service's -// API operation PutPublicAccessBlock for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutPublicAccessBlock -func (c *S3) PutPublicAccessBlock(input *PutPublicAccessBlockInput) (*PutPublicAccessBlockOutput, error) { - req, out := c.PutPublicAccessBlockRequest(input) - return out, req.Send() -} - -// PutPublicAccessBlockWithContext is the same as PutPublicAccessBlock with the addition of -// the ability to pass a context and additional request options. -// -// See PutPublicAccessBlock 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 *S3) PutPublicAccessBlockWithContext(ctx aws.Context, input *PutPublicAccessBlockInput, opts ...request.Option) (*PutPublicAccessBlockOutput, error) { - req, out := c.PutPublicAccessBlockRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRestoreObject = "RestoreObject" - -// RestoreObjectRequest generates a "aws/request.Request" representing the -// client's request for the RestoreObject 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 RestoreObject for more information on using the RestoreObject -// 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 RestoreObjectRequest method. -// req, resp := client.RestoreObjectRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject -func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Request, output *RestoreObjectOutput) { - op := &request.Operation{ - Name: opRestoreObject, - HTTPMethod: "POST", - HTTPPath: "/{Bucket}/{Key+}?restore", - } - - if input == nil { - input = &RestoreObjectInput{} - } - - output = &RestoreObjectOutput{} - req = c.newRequest(op, input, output) - return -} - -// RestoreObject API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// # Restores an archived copy of an object back into Amazon S3 -// -// This functionality is not supported for Amazon S3 on Outposts. -// -// This action performs the following types of requests: -// -// - restore an archive - Restore an archived object -// -// For more information about the S3 structure in the request body, see the -// following: -// -// - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html) -// -// - Managing Access with ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html) -// in the Amazon S3 User Guide -// -// - Protecting Data Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html) -// in the Amazon S3 User Guide -// -// # Permissions -// -// To use this operation, you must have permissions to perform the s3:RestoreObject -// action. The bucket owner has this permission by default and can grant this -// permission to others. For more information about permissions, see Permissions -// Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources) -// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html) -// in the Amazon S3 User Guide. -// -// # Restoring objects -// -// Objects that you archive to the S3 Glacier Flexible Retrieval Flexible Retrieval -// or S3 Glacier Deep Archive storage class, and S3 Intelligent-Tiering Archive -// or S3 Intelligent-Tiering Deep Archive tiers, are not accessible in real -// time. For objects in the S3 Glacier Flexible Retrieval Flexible Retrieval -// or S3 Glacier Deep Archive storage classes, you must first initiate a restore -// request, and then wait until a temporary copy of the object is available. -// If you want a permanent copy of the object, create a copy of it in the Amazon -// S3 Standard storage class in your S3 bucket. To access an archived object, -// you must restore the object for the duration (number of days) that you specify. -// For objects in the Archive Access or Deep Archive Access tiers of S3 Intelligent-Tiering, -// you must first initiate a restore request, and then wait until the object -// is moved into the Frequent Access tier. -// -// To restore a specific object version, you can provide a version ID. If you -// don't provide a version ID, Amazon S3 restores the current version. -// -// When restoring an archived object, you can specify one of the following data -// access tier options in the Tier element of the request body: -// -// - Expedited - Expedited retrievals allow you to quickly access your data -// stored in the S3 Glacier Flexible Retrieval Flexible Retrieval storage -// class or S3 Intelligent-Tiering Archive tier when occasional urgent requests -// for restoring archives are required. For all but the largest archived -// objects (250 MB+), data accessed using Expedited retrievals is typically -// made available within 1–5 minutes. Provisioned capacity ensures that -// retrieval capacity for Expedited retrievals is available when you need -// it. Expedited retrievals and provisioned capacity are not available for -// objects stored in the S3 Glacier Deep Archive storage class or S3 Intelligent-Tiering -// Deep Archive tier. -// -// - Standard - Standard retrievals allow you to access any of your archived -// objects within several hours. This is the default option for retrieval -// requests that do not specify the retrieval option. Standard retrievals -// typically finish within 3–5 hours for objects stored in the S3 Glacier -// Flexible Retrieval Flexible Retrieval storage class or S3 Intelligent-Tiering -// Archive tier. They typically finish within 12 hours for objects stored -// in the S3 Glacier Deep Archive storage class or S3 Intelligent-Tiering -// Deep Archive tier. Standard retrievals are free for objects stored in -// S3 Intelligent-Tiering. -// -// - Bulk - Bulk retrievals free for objects stored in the S3 Glacier Flexible -// Retrieval and S3 Intelligent-Tiering storage classes, enabling you to -// retrieve large amounts, even petabytes, of data at no cost. Bulk retrievals -// typically finish within 5–12 hours for objects stored in the S3 Glacier -// Flexible Retrieval Flexible Retrieval storage class or S3 Intelligent-Tiering -// Archive tier. Bulk retrievals are also the lowest-cost retrieval option -// when restoring objects from S3 Glacier Deep Archive. They typically finish -// within 48 hours for objects stored in the S3 Glacier Deep Archive storage -// class or S3 Intelligent-Tiering Deep Archive tier. -// -// For more information about archive retrieval options and provisioned capacity -// for Expedited data access, see Restoring Archived Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html) -// in the Amazon S3 User Guide. -// -// You can use Amazon S3 restore speed upgrade to change the restore speed to -// a faster speed while it is in progress. For more information, see Upgrading -// the speed of an in-progress restore (https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html#restoring-objects-upgrade-tier.title.html) -// in the Amazon S3 User Guide. -// -// To get the status of object restoration, you can send a HEAD request. Operations -// return the x-amz-restore header, which provides information about the restoration -// status, in the response. You can use Amazon S3 event notifications to notify -// you when a restore is initiated or completed. For more information, see Configuring -// Amazon S3 Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) -// in the Amazon S3 User Guide. -// -// After restoring an archived object, you can update the restoration period -// by reissuing the request with a new period. Amazon S3 updates the restoration -// period relative to the current time and charges only for the request-there -// are no data transfer charges. You cannot update the restoration period when -// Amazon S3 is actively processing your current restore request for the object. -// -// If your bucket has a lifecycle configuration with a rule that includes an -// expiration action, the object expiration overrides the life span that you -// specify in a restore request. For example, if you restore an object copy -// for 10 days, but the object is scheduled to expire in 3 days, Amazon S3 deletes -// the object in 3 days. For more information about lifecycle configuration, -// see PutBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html) -// and Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html) -// in Amazon S3 User Guide. -// -// # Responses -// -// A successful action returns either the 200 OK or 202 Accepted status code. -// -// - If the object is not previously restored, then Amazon S3 returns 202 -// Accepted in the response. -// -// - If the object is previously restored, Amazon S3 returns 200 OK in the -// response. -// -// - Special errors: Code: RestoreAlreadyInProgress Cause: Object restore -// is already in progress. HTTP Status Code: 409 Conflict SOAP Fault Code -// Prefix: Client -// -// - Code: GlacierExpeditedRetrievalNotAvailable Cause: expedited retrievals -// are currently not available. Try again later. (Returned if there is insufficient -// capacity to process the Expedited request. This error applies only to -// Expedited retrievals and not to S3 Standard or Bulk retrievals.) HTTP -// Status Code: 503 SOAP Fault Code Prefix: N/A -// -// The following operations are related to RestoreObject: -// -// - PutBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html) -// -// - GetBucketNotificationConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketNotificationConfiguration.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 Simple Storage Service's -// API operation RestoreObject for usage and error information. -// -// Returned Error Codes: -// - ErrCodeObjectAlreadyInActiveTierError "ObjectAlreadyInActiveTierError" -// This action is not allowed against this storage tier. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject -func (c *S3) RestoreObject(input *RestoreObjectInput) (*RestoreObjectOutput, error) { - req, out := c.RestoreObjectRequest(input) - return out, req.Send() -} - -// RestoreObjectWithContext is the same as RestoreObject with the addition of -// the ability to pass a context and additional request options. -// -// See RestoreObject 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 *S3) RestoreObjectWithContext(ctx aws.Context, input *RestoreObjectInput, opts ...request.Option) (*RestoreObjectOutput, error) { - req, out := c.RestoreObjectRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSelectObjectContent = "SelectObjectContent" - -// SelectObjectContentRequest generates a "aws/request.Request" representing the -// client's request for the SelectObjectContent 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 SelectObjectContent for more information on using the SelectObjectContent -// 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 SelectObjectContentRequest method. -// req, resp := client.SelectObjectContentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SelectObjectContent -func (c *S3) SelectObjectContentRequest(input *SelectObjectContentInput) (req *request.Request, output *SelectObjectContentOutput) { - op := &request.Operation{ - Name: opSelectObjectContent, - HTTPMethod: "POST", - HTTPPath: "/{Bucket}/{Key+}?select&select-type=2", - } - - if input == nil { - input = &SelectObjectContentInput{} - } - - output = &SelectObjectContentOutput{} - req = c.newRequest(op, input, output) - - es := NewSelectObjectContentEventStream() - req.Handlers.Unmarshal.PushBack(es.setStreamCloser) - output.EventStream = es - - req.Handlers.Send.Swap(client.LogHTTPResponseHandler.Name, client.LogHTTPResponseHeaderHandler) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, rest.UnmarshalHandler) - req.Handlers.Unmarshal.PushBack(es.runOutputStream) - req.Handlers.Unmarshal.PushBack(es.runOnStreamPartClose) - return -} - -// SelectObjectContent API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// This action filters the contents of an Amazon S3 object based on a simple -// structured query language (SQL) statement. In the request, along with the -// SQL expression, you must also specify a data serialization format (JSON, -// CSV, or Apache Parquet) of the object. Amazon S3 uses this format to parse -// object data into records, and returns only records that match the specified -// SQL expression. You must also specify the data serialization format for the -// response. -// -// This functionality is not supported for Amazon S3 on Outposts. -// -// For more information about Amazon S3 Select, see Selecting Content from Objects -// (https://docs.aws.amazon.com/AmazonS3/latest/dev/selecting-content-from-objects.html) -// and SELECT Command (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-glacier-select-sql-reference-select.html) -// in the Amazon S3 User Guide. -// -// # Permissions -// -// You must have the s3:GetObject permission for this operation. Amazon S3 Select -// does not support anonymous access. For more information about permissions, -// see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html) -// in the Amazon S3 User Guide. -// -// # Object Data Formats -// -// You can use Amazon S3 Select to query objects that have the following format -// properties: -// -// - CSV, JSON, and Parquet - Objects must be in CSV, JSON, or Parquet format. -// -// - UTF-8 - UTF-8 is the only encoding type Amazon S3 Select supports. -// -// - GZIP or BZIP2 - CSV and JSON files can be compressed using GZIP or BZIP2. -// GZIP and BZIP2 are the only compression formats that Amazon S3 Select -// supports for CSV and JSON files. Amazon S3 Select supports columnar compression -// for Parquet using GZIP or Snappy. Amazon S3 Select does not support whole-object -// compression for Parquet objects. -// -// - Server-side encryption - Amazon S3 Select supports querying objects -// that are protected with server-side encryption. For objects that are encrypted -// with customer-provided encryption keys (SSE-C), you must use HTTPS, and -// you must use the headers that are documented in the GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html). -// For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided -// Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html) -// in the Amazon S3 User Guide. For objects that are encrypted with Amazon -// S3 managed keys (SSE-S3) and Amazon Web Services KMS keys (SSE-KMS), server-side -// encryption is handled transparently, so you don't need to specify anything. -// For more information about server-side encryption, including SSE-S3 and -// SSE-KMS, see Protecting Data Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html) -// in the Amazon S3 User Guide. -// -// # Working with the Response Body -// -// Given the response size is unknown, Amazon S3 Select streams the response -// as a series of messages and includes a Transfer-Encoding header with chunked -// as its value in the response. For more information, see Appendix: SelectObjectContent -// Response (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTSelectObjectAppendix.html). -// -// # GetObject Support -// -// The SelectObjectContent action does not support the following GetObject functionality. -// For more information, see GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html). -// -// - Range: Although you can specify a scan range for an Amazon S3 Select -// request (see SelectObjectContentRequest - ScanRange (https://docs.aws.amazon.com/AmazonS3/latest/API/API_SelectObjectContent.html#AmazonS3-SelectObjectContent-request-ScanRange) -// in the request parameters), you cannot specify the range of bytes of an -// object to return. -// -// - The GLACIER, DEEP_ARCHIVE, and REDUCED_REDUNDANCY storage classes, or -// the ARCHIVE_ACCESS and DEEP_ARCHIVE_ACCESS access tiers of the INTELLIGENT_TIERING -// storage class: You cannot query objects in the GLACIER, DEEP_ARCHIVE, -// or REDUCED_REDUNDANCY storage classes, nor objects in the ARCHIVE_ACCESS -// or DEEP_ARCHIVE_ACCESS access tiers of the INTELLIGENT_TIERING storage -// class. For more information about storage classes, see Using Amazon S3 -// storage classes (https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-class-intro.html) -// in the Amazon S3 User Guide. -// -// # Special Errors -// -// For a list of special errors for this operation, see List of SELECT Object -// Content Error Codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#SelectObjectContentErrorCodeList) -// -// The following operations are related to SelectObjectContent: -// -// - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html) -// -// - GetBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html) -// -// - PutBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.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 Simple Storage Service's -// API operation SelectObjectContent for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SelectObjectContent -func (c *S3) SelectObjectContent(input *SelectObjectContentInput) (*SelectObjectContentOutput, error) { - req, out := c.SelectObjectContentRequest(input) - return out, req.Send() -} - -// SelectObjectContentWithContext is the same as SelectObjectContent with the addition of -// the ability to pass a context and additional request options. -// -// See SelectObjectContent 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 *S3) SelectObjectContentWithContext(ctx aws.Context, input *SelectObjectContentInput, opts ...request.Option) (*SelectObjectContentOutput, error) { - req, out := c.SelectObjectContentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -var _ awserr.Error -var _ time.Time - -// SelectObjectContentEventStream provides the event stream handling for the SelectObjectContent. -// -// For testing and mocking the event stream this type should be initialized via -// the NewSelectObjectContentEventStream constructor function. Using the functional options -// to pass in nested mock behavior. -type SelectObjectContentEventStream struct { - - // Reader is the EventStream reader for the SelectObjectContentEventStream - // events. This value is automatically set by the SDK when the API call is made - // Use this member when unit testing your code with the SDK to mock out the - // EventStream Reader. - // - // Must not be nil. - Reader SelectObjectContentEventStreamReader - - outputReader io.ReadCloser - - // StreamCloser is the io.Closer for the EventStream connection. For HTTP - // EventStream this is the response Body. The stream will be closed when - // the Close method of the EventStream is called. - StreamCloser io.Closer - - done chan struct{} - closeOnce sync.Once - err *eventstreamapi.OnceError -} - -// NewSelectObjectContentEventStream initializes an SelectObjectContentEventStream. -// This function should only be used for testing and mocking the SelectObjectContentEventStream -// stream within your application. -// -// The Reader member must be set before reading events from the stream. -// -// The StreamCloser member should be set to the underlying io.Closer, -// (e.g. http.Response.Body), that will be closed when the stream Close method -// is called. -// -// es := NewSelectObjectContentEventStream(func(o *SelectObjectContentEventStream){ -// es.Reader = myMockStreamReader -// es.StreamCloser = myMockStreamCloser -// }) -func NewSelectObjectContentEventStream(opts ...func(*SelectObjectContentEventStream)) *SelectObjectContentEventStream { - es := &SelectObjectContentEventStream{ - done: make(chan struct{}), - err: eventstreamapi.NewOnceError(), - } - - for _, fn := range opts { - fn(es) - } - - return es -} - -func (es *SelectObjectContentEventStream) setStreamCloser(r *request.Request) { - es.StreamCloser = r.HTTPResponse.Body -} - -func (es *SelectObjectContentEventStream) runOnStreamPartClose(r *request.Request) { - if es.done == nil { - return - } - go es.waitStreamPartClose() - -} - -func (es *SelectObjectContentEventStream) waitStreamPartClose() { - var outputErrCh <-chan struct{} - if v, ok := es.Reader.(interface{ ErrorSet() <-chan struct{} }); ok { - outputErrCh = v.ErrorSet() - } - var outputClosedCh <-chan struct{} - if v, ok := es.Reader.(interface{ Closed() <-chan struct{} }); ok { - outputClosedCh = v.Closed() - } - - select { - case <-es.done: - case <-outputErrCh: - es.err.SetError(es.Reader.Err()) - es.Close() - case <-outputClosedCh: - if err := es.Reader.Err(); err != nil { - es.err.SetError(es.Reader.Err()) - } - es.Close() - } -} - -// Events returns a channel to read events from. -// -// These events are: -// -// - ContinuationEvent -// - EndEvent -// - ProgressEvent -// - RecordsEvent -// - StatsEvent -// - SelectObjectContentEventStreamUnknownEvent -func (es *SelectObjectContentEventStream) Events() <-chan SelectObjectContentEventStreamEvent { - return es.Reader.Events() -} - -func (es *SelectObjectContentEventStream) runOutputStream(r *request.Request) { - var opts []func(*eventstream.Decoder) - if r.Config.Logger != nil && r.Config.LogLevel.Matches(aws.LogDebugWithEventStreamBody) { - opts = append(opts, eventstream.DecodeWithLogger(r.Config.Logger)) - } - - unmarshalerForEvent := unmarshalerForSelectObjectContentEventStreamEvent{ - metadata: protocol.ResponseMetadata{ - StatusCode: r.HTTPResponse.StatusCode, - RequestID: r.RequestID, - }, - }.UnmarshalerForEventName - - decoder := eventstream.NewDecoder(r.HTTPResponse.Body, opts...) - eventReader := eventstreamapi.NewEventReader(decoder, - protocol.HandlerPayloadUnmarshal{ - Unmarshalers: r.Handlers.UnmarshalStream, - }, - unmarshalerForEvent, - ) - - es.outputReader = r.HTTPResponse.Body - es.Reader = newReadSelectObjectContentEventStream(eventReader) -} - -// Close closes the stream. This will also cause the stream to be closed. -// Close must be called when done using the stream API. Not calling Close -// may result in resource leaks. -// -// You can use the closing of the Reader's Events channel to terminate your -// application's read from the API's stream. -func (es *SelectObjectContentEventStream) Close() (err error) { - es.closeOnce.Do(es.safeClose) - return es.Err() -} - -func (es *SelectObjectContentEventStream) safeClose() { - if es.done != nil { - close(es.done) - } - - es.Reader.Close() - if es.outputReader != nil { - es.outputReader.Close() - } - - es.StreamCloser.Close() -} - -// Err returns any error that occurred while reading or writing EventStream -// Events from the service API's response. Returns nil if there were no errors. -func (es *SelectObjectContentEventStream) Err() error { - if err := es.err.Err(); err != nil { - return err - } - if err := es.Reader.Err(); err != nil { - return err - } - - return nil -} - -const opUploadPart = "UploadPart" - -// UploadPartRequest generates a "aws/request.Request" representing the -// client's request for the UploadPart 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 UploadPart for more information on using the UploadPart -// 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 UploadPartRequest method. -// req, resp := client.UploadPartRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart -func (c *S3) UploadPartRequest(input *UploadPartInput) (req *request.Request, output *UploadPartOutput) { - op := &request.Operation{ - Name: opUploadPart, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}/{Key+}", - } - - if input == nil { - input = &UploadPartInput{} - } - - output = &UploadPartOutput{} - req = c.newRequest(op, input, output) - return -} - -// UploadPart API operation for Amazon Simple Storage Service. -// -// Uploads a part in a multipart upload. -// -// In this operation, you provide new data as a part of an object in your request. -// However, you have an option to specify your existing Amazon S3 object as -// a data source for the part you are uploading. To upload a part from an existing -// object, you use the UploadPartCopy (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html) -// operation. -// -// You must initiate a multipart upload (see CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)) -// before you can upload any part. In response to your initiate request, Amazon -// S3 returns an upload ID, a unique identifier that you must include in your -// upload part request. -// -// Part numbers can be any number from 1 to 10,000, inclusive. A part number -// uniquely identifies a part and also defines its position within the object -// being created. If you upload a new part using the same part number that was -// used with a previous part, the previously uploaded part is overwritten. -// -// For information about maximum and minimum part sizes and other multipart -// upload specifications, see Multipart upload limits (https://docs.aws.amazon.com/AmazonS3/latest/userguide/qfacts.html) -// in the Amazon S3 User Guide. -// -// After you initiate multipart upload and upload one or more parts, you must -// either complete or abort multipart upload in order to stop getting charged -// for storage of the uploaded parts. Only after you either complete or abort -// multipart upload, Amazon S3 frees up the parts storage and stops charging -// you for the parts storage. -// -// For more information on multipart uploads, go to Multipart Upload Overview -// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html) in the -// Amazon S3 User Guide . -// -// Directory buckets - For directory buckets, you must make requests for this -// API operation to the Zonal endpoint. These endpoints support virtual-hosted-style -// requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name -// . Path-style requests are not supported. For more information, see Regional -// and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html) -// in the Amazon S3 User Guide. -// -// Permissions -// -// - General purpose bucket permissions - For information on the permissions -// required to use the multipart upload API, see Multipart Upload and Permissions -// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html) -// in the Amazon S3 User Guide. -// -// - Directory bucket permissions - To grant access to this API operation -// on a directory bucket, we recommend that you use the CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html) -// API operation for session-based authorization. Specifically, you grant -// the s3express:CreateSession permission to the directory bucket in a bucket -// policy or an IAM identity-based policy. Then, you make the CreateSession -// API call on the bucket to obtain a session token. With the session token -// in your request header, you can make API requests to this operation. After -// the session token expires, you make another CreateSession API call to -// generate a new session token for use. Amazon Web Services CLI or SDKs -// create session and refresh the session token automatically to avoid service -// interruptions when a session expires. For more information about authorization, -// see CreateSession (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html). -// -// # Data integrity -// -// General purpose bucket - To ensure that data is not corrupted traversing -// the network, specify the Content-MD5 header in the upload part request. Amazon -// S3 checks the part data against the provided MD5 value. If they do not match, -// Amazon S3 returns an error. If the upload request is signed with Signature -// Version 4, then Amazon Web Services S3 uses the x-amz-content-sha256 header -// as a checksum instead of Content-MD5. For more information see Authenticating -// Requests: Using the Authorization Header (Amazon Web Services Signature Version -// 4) (https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-auth-using-authorization-header.html). -// -// Directory buckets - MD5 is not supported by directory buckets. You can use -// checksum algorithms to check object integrity. -// -// Encryption -// -// - General purpose bucket - Server-side encryption is for data encryption -// at rest. Amazon S3 encrypts your data as it writes it to disks in its -// data centers and decrypts it when you access it. You have mutually exclusive -// options to protect data using server-side encryption in Amazon S3, depending -// on how you choose to manage the encryption keys. Specifically, the encryption -// key options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS -// keys (SSE-KMS), and Customer-Provided Keys (SSE-C). Amazon S3 encrypts -// data with server-side encryption using Amazon S3 managed keys (SSE-S3) -// by default. You can optionally tell Amazon S3 to encrypt data at rest -// using server-side encryption with other key options. The option you use -// depends on whether you want to use KMS keys (SSE-KMS) or provide your -// own encryption key (SSE-C). Server-side encryption is supported by the -// S3 Multipart Upload operations. Unless you are using a customer-provided -// encryption key (SSE-C), you don't need to specify the encryption parameters -// in each UploadPart request. Instead, you only need to specify the server-side -// encryption parameters in the initial Initiate Multipart request. For more -// information, see CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html). -// If you request server-side encryption using a customer-provided encryption -// key (SSE-C) in your initiate multipart upload request, you must provide -// identical encryption information in each part upload using the following -// request headers. x-amz-server-side-encryption-customer-algorithm x-amz-server-side-encryption-customer-key -// x-amz-server-side-encryption-customer-key-MD5 -// -// - Directory bucket - For directory buckets, only server-side encryption -// with Amazon S3 managed keys (SSE-S3) (AES256) is supported. -// -// For more information, see Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html) -// in the Amazon S3 User Guide. -// -// Special errors -// -// - Error Code: NoSuchUpload Description: The specified multipart upload -// does not exist. The upload ID might be invalid, or the multipart upload -// might have been aborted or completed. HTTP Status Code: 404 Not Found -// SOAP Fault Code Prefix: Client -// -// # HTTP Host header syntax -// -// Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. -// -// The following operations are related to UploadPart: -// -// - CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html) -// -// - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html) -// -// - AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html) -// -// - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html) -// -// - ListMultipartUploads (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.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 Simple Storage Service's -// API operation UploadPart for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart -func (c *S3) UploadPart(input *UploadPartInput) (*UploadPartOutput, error) { - req, out := c.UploadPartRequest(input) - return out, req.Send() -} - -// UploadPartWithContext is the same as UploadPart with the addition of -// the ability to pass a context and additional request options. -// -// See UploadPart 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 *S3) UploadPartWithContext(ctx aws.Context, input *UploadPartInput, opts ...request.Option) (*UploadPartOutput, error) { - req, out := c.UploadPartRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUploadPartCopy = "UploadPartCopy" - -// UploadPartCopyRequest generates a "aws/request.Request" representing the -// client's request for the UploadPartCopy 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 UploadPartCopy for more information on using the UploadPartCopy -// 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 UploadPartCopyRequest method. -// req, resp := client.UploadPartCopyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy -func (c *S3) UploadPartCopyRequest(input *UploadPartCopyInput) (req *request.Request, output *UploadPartCopyOutput) { - op := &request.Operation{ - Name: opUploadPartCopy, - HTTPMethod: "PUT", - HTTPPath: "/{Bucket}/{Key+}", - } - - if input == nil { - input = &UploadPartCopyInput{} - } - - output = &UploadPartCopyOutput{} - req = c.newRequest(op, input, output) - return -} - -// UploadPartCopy API operation for Amazon Simple Storage Service. -// -// Uploads a part by copying data from an existing object as data source. To -// specify the data source, you add the request header x-amz-copy-source in -// your request. To specify a byte range, you add the request header x-amz-copy-source-range -// in your request. -// -// For information about maximum and minimum part sizes and other multipart -// upload specifications, see Multipart upload limits (https://docs.aws.amazon.com/AmazonS3/latest/userguide/qfacts.html) -// in the Amazon S3 User Guide. -// -// Instead of copying data from an existing object as part data, you might use -// the UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) -// action to upload new data as a part of an object in your request. -// -// You must initiate a multipart upload before you can upload any part. In response -// to your initiate request, Amazon S3 returns the upload ID, a unique identifier -// that you must include in your upload part request. -// -// For conceptual information about multipart uploads, see Uploading Objects -// Using Multipart Upload (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html) -// in the Amazon S3 User Guide. For information about copying objects using -// a single atomic action vs. a multipart upload, see Operations on Objects -// (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectOperations.html) in -// the Amazon S3 User Guide. -// -// Directory buckets - For directory buckets, you must make requests for this -// API operation to the Zonal endpoint. These endpoints support virtual-hosted-style -// requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name -// . Path-style requests are not supported. For more information, see Regional -// and Zonal endpoints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html) -// in the Amazon S3 User Guide. -// -// # Authentication and authorization -// -// All UploadPartCopy requests must be authenticated and signed by using IAM -// credentials (access key ID and secret access key for the IAM identities). -// All headers with the x-amz- prefix, including x-amz-copy-source, must be -// signed. For more information, see REST Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html). -// -// Directory buckets - You must use IAM credentials to authenticate and authorize -// your access to the UploadPartCopy API operation, instead of using the temporary -// security credentials through the CreateSession API operation. -// -// Amazon Web Services CLI or SDKs handles authentication and authorization -// on your behalf. -// -// # Permissions -// -// You must have READ access to the source object and WRITE access to the destination -// bucket. -// -// - General purpose bucket permissions - You must have the permissions in -// a policy based on the bucket types of your source bucket and destination -// bucket in an UploadPartCopy operation. If the source object is in a general -// purpose bucket, you must have the s3:GetObject permission to read the -// source object that is being copied. If the destination bucket is a general -// purpose bucket, you must have the s3:PutObject permission to write the -// object copy to the destination bucket. For information about permissions -// required to use the multipart upload API, see Multipart upload API and -// permissions (https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions) -// in the Amazon S3 User Guide. -// -// - Directory bucket permissions - You must have permissions in a bucket -// policy or an IAM identity-based policy based on the source and destination -// bucket types in an UploadPartCopy operation. If the source object that -// you want to copy is in a directory bucket, you must have the s3express:CreateSession -// permission in the Action element of a policy to read the object. By default, -// the session is in the ReadWrite mode. If you want to restrict the access, -// you can explicitly set the s3express:SessionMode condition key to ReadOnly -// on the copy source bucket. If the copy destination is a directory bucket, -// you must have the s3express:CreateSession permission in the Action element -// of a policy to write the object to the destination. The s3express:SessionMode -// condition key cannot be set to ReadOnly on the copy destination. For example -// policies, see Example bucket policies for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html) -// and Amazon Web Services Identity and Access Management (IAM) identity-based -// policies for S3 Express One Zone (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html) -// in the Amazon S3 User Guide. -// -// Encryption -// -// - General purpose buckets - For information about using server-side encryption -// with customer-provided encryption keys with the UploadPartCopy operation, -// see CopyObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html) -// and UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html). -// -// - Directory buckets - For directory buckets, only server-side encryption -// with Amazon S3 managed keys (SSE-S3) (AES256) is supported. -// -// Special errors -// -// - Error Code: NoSuchUpload Description: The specified multipart upload -// does not exist. The upload ID might be invalid, or the multipart upload -// might have been aborted or completed. HTTP Status Code: 404 Not Found -// -// - Error Code: InvalidRequest Description: The specified copy source is -// not supported as a byte-range copy source. HTTP Status Code: 400 Bad Request -// -// # HTTP Host header syntax -// -// Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. -// -// The following operations are related to UploadPartCopy: -// -// - CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html) -// -// - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) -// -// - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html) -// -// - AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html) -// -// - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html) -// -// - ListMultipartUploads (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.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 Simple Storage Service's -// API operation UploadPartCopy for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy -func (c *S3) UploadPartCopy(input *UploadPartCopyInput) (*UploadPartCopyOutput, error) { - req, out := c.UploadPartCopyRequest(input) - return out, req.Send() -} - -// UploadPartCopyWithContext is the same as UploadPartCopy with the addition of -// the ability to pass a context and additional request options. -// -// See UploadPartCopy 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 *S3) UploadPartCopyWithContext(ctx aws.Context, input *UploadPartCopyInput, opts ...request.Option) (*UploadPartCopyOutput, error) { - req, out := c.UploadPartCopyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opWriteGetObjectResponse = "WriteGetObjectResponse" - -// WriteGetObjectResponseRequest generates a "aws/request.Request" representing the -// client's request for the WriteGetObjectResponse 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 WriteGetObjectResponse for more information on using the WriteGetObjectResponse -// 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 WriteGetObjectResponseRequest method. -// req, resp := client.WriteGetObjectResponseRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/WriteGetObjectResponse -func (c *S3) WriteGetObjectResponseRequest(input *WriteGetObjectResponseInput) (req *request.Request, output *WriteGetObjectResponseOutput) { - op := &request.Operation{ - Name: opWriteGetObjectResponse, - HTTPMethod: "POST", - HTTPPath: "/WriteGetObjectResponse", - } - - if input == nil { - input = &WriteGetObjectResponseInput{} - } - - output = &WriteGetObjectResponseOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Sign.Remove(v4.SignRequestHandler) - handler := v4.BuildNamedHandler("v4.CustomSignerHandler", v4.WithUnsignedPayload) - req.Handlers.Sign.PushFrontNamed(handler) - req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("{RequestRoute}.", input.hostLabels)) - req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler) - return -} - -// WriteGetObjectResponse API operation for Amazon Simple Storage Service. -// -// This operation is not supported by directory buckets. -// -// Passes transformed objects to a GetObject operation when using Object Lambda -// access points. For information about Object Lambda access points, see Transforming -// objects with Object Lambda access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/transforming-objects.html) -// in the Amazon S3 User Guide. -// -// This operation supports metadata that can be returned by GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html), -// in addition to RequestRoute, RequestToken, StatusCode, ErrorCode, and ErrorMessage. -// The GetObject response metadata is supported so that the WriteGetObjectResponse -// caller, typically an Lambda function, can provide the same metadata when -// it internally invokes GetObject. When WriteGetObjectResponse is called by -// a customer-owned Lambda function, the metadata returned to the end user GetObject -// call might differ from what Amazon S3 would normally return. -// -// You can include any number of metadata headers. When including a metadata -// header, it should be prefaced with x-amz-meta. For example, x-amz-meta-my-custom-header: -// MyCustomValue. The primary use case for this is to forward GetObject metadata. -// -// Amazon Web Services provides some prebuilt Lambda functions that you can -// use with S3 Object Lambda to detect and redact personally identifiable information -// (PII) and decompress S3 objects. These Lambda functions are available in -// the Amazon Web Services Serverless Application Repository, and can be selected -// through the Amazon Web Services Management Console when you create your Object -// Lambda access point. -// -// Example 1: PII Access Control - This Lambda function uses Amazon Comprehend, -// a natural language processing (NLP) service using machine learning to find -// insights and relationships in text. It automatically detects personally identifiable -// information (PII) such as names, addresses, dates, credit card numbers, and -// social security numbers from documents in your Amazon S3 bucket. -// -// Example 2: PII Redaction - This Lambda function uses Amazon Comprehend, a -// natural language processing (NLP) service using machine learning to find -// insights and relationships in text. It automatically redacts personally identifiable -// information (PII) such as names, addresses, dates, credit card numbers, and -// social security numbers from documents in your Amazon S3 bucket. -// -// Example 3: Decompression - The Lambda function S3ObjectLambdaDecompression, -// is equipped to decompress objects stored in S3 in one of six compressed file -// formats including bzip2, gzip, snappy, zlib, zstandard and ZIP. -// -// For information on how to view and use these functions, see Using Amazon -// Web Services built Lambda functions (https://docs.aws.amazon.com/AmazonS3/latest/userguide/olap-examples.html) -// in the Amazon S3 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 Simple Storage Service's -// API operation WriteGetObjectResponse for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/WriteGetObjectResponse -func (c *S3) WriteGetObjectResponse(input *WriteGetObjectResponseInput) (*WriteGetObjectResponseOutput, error) { - req, out := c.WriteGetObjectResponseRequest(input) - return out, req.Send() -} - -// WriteGetObjectResponseWithContext is the same as WriteGetObjectResponse with the addition of -// the ability to pass a context and additional request options. -// -// See WriteGetObjectResponse 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 *S3) WriteGetObjectResponseWithContext(ctx aws.Context, input *WriteGetObjectResponseInput, opts ...request.Option) (*WriteGetObjectResponseOutput, error) { - req, out := c.WriteGetObjectResponseRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Specifies the days since the initiation of an incomplete multipart upload -// that Amazon S3 will wait before permanently removing all parts of the upload. -// For more information, see Aborting Incomplete Multipart Uploads Using a Bucket -// Lifecycle Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config) -// in the Amazon S3 User Guide. -type AbortIncompleteMultipartUpload struct { - _ struct{} `type:"structure"` - - // Specifies the number of days after which Amazon S3 aborts an incomplete multipart - // upload. - DaysAfterInitiation *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 AbortIncompleteMultipartUpload) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AbortIncompleteMultipartUpload) GoString() string { - return s.String() -} - -// SetDaysAfterInitiation sets the DaysAfterInitiation field's value. -func (s *AbortIncompleteMultipartUpload) SetDaysAfterInitiation(v int64) *AbortIncompleteMultipartUpload { - s.DaysAfterInitiation = &v - return s -} - -type AbortMultipartUploadInput struct { - _ struct{} `locationName:"AbortMultipartUploadRequest" type:"structure"` - - // The bucket name to which the upload was taking place. - // - // Directory buckets - When you use this operation with a directory bucket, - // you must use virtual-hosted-style requests in the format Bucket_name.s3express-az_id.region.amazonaws.com. - // Path-style requests are not supported. Directory bucket names must be unique - // in the chosen Availability Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 - // (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about - // bucket naming restrictions, see Directory bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html) - // in the Amazon S3 User Guide. - // - // Access points - When you use this action with an access point, you must provide - // the alias of the access point in place of the bucket name or specify the - // access point ARN. When using the access point ARN, you must direct requests - // to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this action with an access point through the Amazon Web Services - // SDKs, you provide the access point ARN in place of the bucket name. For more - // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. - // - // Access points and Object Lambda access points are not supported by directory - // buckets. - // - // S3 on Outposts - When you use this action with Amazon S3 on Outposts, you - // must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname - // takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. - // When you use this action with S3 on Outposts through the Amazon Web Services - // SDKs, you provide the Outposts access point ARN in place of the bucket name. - // For more information about S3 on Outposts ARNs, see What is S3 on Outposts? - // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) - // in the Amazon S3 User Guide. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // Key of the object for which the multipart upload was initiated. - // - // Key is a required field - Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - - // Confirms that the requester knows that they will be charged for the request. - // Bucket owners need not specify this parameter in their requests. If either - // the source or destination S3 bucket has Requester Pays enabled, the requester - // will pay for corresponding charges to copy the object. For information about - // downloading objects from Requester Pays buckets, see Downloading Objects - // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` - - // Upload ID that identifies the multipart upload. - // - // UploadId is a required field - UploadId *string `location:"querystring" locationName:"uploadId" 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 AbortMultipartUploadInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AbortMultipartUploadInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AbortMultipartUploadInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AbortMultipartUploadInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - 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.UploadId == nil { - invalidParams.Add(request.NewErrParamRequired("UploadId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *AbortMultipartUploadInput) SetBucket(v string) *AbortMultipartUploadInput { - s.Bucket = &v - return s -} - -func (s *AbortMultipartUploadInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *AbortMultipartUploadInput) SetExpectedBucketOwner(v string) *AbortMultipartUploadInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetKey sets the Key field's value. -func (s *AbortMultipartUploadInput) SetKey(v string) *AbortMultipartUploadInput { - s.Key = &v - return s -} - -// SetRequestPayer sets the RequestPayer field's value. -func (s *AbortMultipartUploadInput) SetRequestPayer(v string) *AbortMultipartUploadInput { - s.RequestPayer = &v - return s -} - -// SetUploadId sets the UploadId field's value. -func (s *AbortMultipartUploadInput) SetUploadId(v string) *AbortMultipartUploadInput { - s.UploadId = &v - return s -} - -func (s *AbortMultipartUploadInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *AbortMultipartUploadInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s AbortMultipartUploadInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type AbortMultipartUploadOutput struct { - _ struct{} `type:"structure"` - - // If present, indicates that the requester was successfully charged for the - // request. - // - // This functionality is not supported for directory buckets. - RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AbortMultipartUploadOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AbortMultipartUploadOutput) GoString() string { - return s.String() -} - -// SetRequestCharged sets the RequestCharged field's value. -func (s *AbortMultipartUploadOutput) SetRequestCharged(v string) *AbortMultipartUploadOutput { - s.RequestCharged = &v - return s -} - -// Configures the transfer acceleration state for an Amazon S3 bucket. For more -// information, see Amazon S3 Transfer Acceleration (https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html) -// in the Amazon S3 User Guide. -type AccelerateConfiguration struct { - _ struct{} `type:"structure"` - - // Specifies the transfer acceleration status of the bucket. - Status *string `type:"string" enum:"BucketAccelerateStatus"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccelerateConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccelerateConfiguration) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *AccelerateConfiguration) SetStatus(v string) *AccelerateConfiguration { - s.Status = &v - return s -} - -// Contains the elements that set the ACL permissions for an object per grantee. -type AccessControlPolicy struct { - _ struct{} `type:"structure"` - - // A list of grants. - Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"` - - // Container for the bucket owner's display name and ID. - Owner *Owner `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 AccessControlPolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccessControlPolicy) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AccessControlPolicy) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AccessControlPolicy"} - if s.Grants != nil { - for i, v := range s.Grants { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Grants", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGrants sets the Grants field's value. -func (s *AccessControlPolicy) SetGrants(v []*Grant) *AccessControlPolicy { - s.Grants = v - return s -} - -// SetOwner sets the Owner field's value. -func (s *AccessControlPolicy) SetOwner(v *Owner) *AccessControlPolicy { - s.Owner = v - return s -} - -// A container for information about access control for replicas. -type AccessControlTranslation struct { - _ struct{} `type:"structure"` - - // Specifies the replica ownership. For default and valid values, see PUT bucket - // replication (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTreplication.html) - // in the Amazon S3 API Reference. - // - // Owner is a required field - Owner *string `type:"string" required:"true" enum:"OwnerOverride"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccessControlTranslation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccessControlTranslation) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AccessControlTranslation) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AccessControlTranslation"} - if s.Owner == nil { - invalidParams.Add(request.NewErrParamRequired("Owner")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOwner sets the Owner field's value. -func (s *AccessControlTranslation) SetOwner(v string) *AccessControlTranslation { - s.Owner = &v - return s -} - -// A conjunction (logical AND) of predicates, which is used in evaluating a -// metrics filter. The operator must have at least two predicates in any combination, -// and an object must match all of the predicates for the filter to apply. -type AnalyticsAndOperator struct { - _ struct{} `type:"structure"` - - // The prefix to use when evaluating an AND predicate: The prefix that an object - // must have to be included in the metrics results. - Prefix *string `type:"string"` - - // The list of tags to use when evaluating an AND predicate. - Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"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 AnalyticsAndOperator) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AnalyticsAndOperator) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AnalyticsAndOperator) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AnalyticsAndOperator"} - 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 -} - -// SetPrefix sets the Prefix field's value. -func (s *AnalyticsAndOperator) SetPrefix(v string) *AnalyticsAndOperator { - s.Prefix = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *AnalyticsAndOperator) SetTags(v []*Tag) *AnalyticsAndOperator { - s.Tags = v - return s -} - -// Specifies the configuration and any analyses for the analytics filter of -// an Amazon S3 bucket. -type AnalyticsConfiguration struct { - _ struct{} `type:"structure"` - - // The filter used to describe a set of objects for analyses. A filter must - // have exactly one prefix, one tag, or one conjunction (AnalyticsAndOperator). - // If no filter is provided, all objects will be considered in any analysis. - Filter *AnalyticsFilter `type:"structure"` - - // The ID that identifies the analytics configuration. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // Contains data related to access patterns to be collected and made available - // to analyze the tradeoffs between different storage classes. - // - // StorageClassAnalysis is a required field - StorageClassAnalysis *StorageClassAnalysis `type:"structure" 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 AnalyticsConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AnalyticsConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AnalyticsConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AnalyticsConfiguration"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.StorageClassAnalysis == nil { - invalidParams.Add(request.NewErrParamRequired("StorageClassAnalysis")) - } - if s.Filter != nil { - if err := s.Filter.Validate(); err != nil { - invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) - } - } - if s.StorageClassAnalysis != nil { - if err := s.StorageClassAnalysis.Validate(); err != nil { - invalidParams.AddNested("StorageClassAnalysis", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilter sets the Filter field's value. -func (s *AnalyticsConfiguration) SetFilter(v *AnalyticsFilter) *AnalyticsConfiguration { - s.Filter = v - return s -} - -// SetId sets the Id field's value. -func (s *AnalyticsConfiguration) SetId(v string) *AnalyticsConfiguration { - s.Id = &v - return s -} - -// SetStorageClassAnalysis sets the StorageClassAnalysis field's value. -func (s *AnalyticsConfiguration) SetStorageClassAnalysis(v *StorageClassAnalysis) *AnalyticsConfiguration { - s.StorageClassAnalysis = v - return s -} - -// Where to publish the analytics results. -type AnalyticsExportDestination struct { - _ struct{} `type:"structure"` - - // A destination signifying output to an S3 bucket. - // - // S3BucketDestination is a required field - S3BucketDestination *AnalyticsS3BucketDestination `type:"structure" 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 AnalyticsExportDestination) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AnalyticsExportDestination) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AnalyticsExportDestination) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AnalyticsExportDestination"} - if s.S3BucketDestination == nil { - invalidParams.Add(request.NewErrParamRequired("S3BucketDestination")) - } - if s.S3BucketDestination != nil { - if err := s.S3BucketDestination.Validate(); err != nil { - invalidParams.AddNested("S3BucketDestination", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetS3BucketDestination sets the S3BucketDestination field's value. -func (s *AnalyticsExportDestination) SetS3BucketDestination(v *AnalyticsS3BucketDestination) *AnalyticsExportDestination { - s.S3BucketDestination = v - return s -} - -// The filter used to describe a set of objects for analyses. A filter must -// have exactly one prefix, one tag, or one conjunction (AnalyticsAndOperator). -// If no filter is provided, all objects will be considered in any analysis. -type AnalyticsFilter struct { - _ struct{} `type:"structure"` - - // A conjunction (logical AND) of predicates, which is used in evaluating an - // analytics filter. The operator must have at least two predicates. - And *AnalyticsAndOperator `type:"structure"` - - // The prefix to use when evaluating an analytics filter. - Prefix *string `type:"string"` - - // The tag to use when evaluating an analytics filter. - Tag *Tag `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 AnalyticsFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AnalyticsFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AnalyticsFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AnalyticsFilter"} - if s.And != nil { - if err := s.And.Validate(); err != nil { - invalidParams.AddNested("And", err.(request.ErrInvalidParams)) - } - } - if s.Tag != nil { - if err := s.Tag.Validate(); err != nil { - invalidParams.AddNested("Tag", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAnd sets the And field's value. -func (s *AnalyticsFilter) SetAnd(v *AnalyticsAndOperator) *AnalyticsFilter { - s.And = v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *AnalyticsFilter) SetPrefix(v string) *AnalyticsFilter { - s.Prefix = &v - return s -} - -// SetTag sets the Tag field's value. -func (s *AnalyticsFilter) SetTag(v *Tag) *AnalyticsFilter { - s.Tag = v - return s -} - -// Contains information about where to publish the analytics results. -type AnalyticsS3BucketDestination struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the bucket to which data is exported. - // - // Bucket is a required field - Bucket *string `type:"string" required:"true"` - - // The account ID that owns the destination S3 bucket. If no account ID is provided, - // the owner is not validated before exporting data. - // - // Although this value is optional, we strongly recommend that you set it to - // help prevent problems if the destination bucket ownership changes. - BucketAccountId *string `type:"string"` - - // Specifies the file format used when exporting data to Amazon S3. - // - // Format is a required field - Format *string `type:"string" required:"true" enum:"AnalyticsS3ExportFileFormat"` - - // The prefix to use when exporting data. The prefix is prepended to all results. - Prefix *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 AnalyticsS3BucketDestination) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AnalyticsS3BucketDestination) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AnalyticsS3BucketDestination) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AnalyticsS3BucketDestination"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Format == nil { - invalidParams.Add(request.NewErrParamRequired("Format")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *AnalyticsS3BucketDestination) SetBucket(v string) *AnalyticsS3BucketDestination { - s.Bucket = &v - return s -} - -func (s *AnalyticsS3BucketDestination) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetBucketAccountId sets the BucketAccountId field's value. -func (s *AnalyticsS3BucketDestination) SetBucketAccountId(v string) *AnalyticsS3BucketDestination { - s.BucketAccountId = &v - return s -} - -// SetFormat sets the Format field's value. -func (s *AnalyticsS3BucketDestination) SetFormat(v string) *AnalyticsS3BucketDestination { - s.Format = &v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *AnalyticsS3BucketDestination) SetPrefix(v string) *AnalyticsS3BucketDestination { - s.Prefix = &v - return s -} - -// In terms of implementation, a Bucket is a resource. -type Bucket struct { - _ struct{} `type:"structure"` - - // Date the bucket was created. This date can change when making changes to - // your bucket, such as editing its bucket policy. - CreationDate *time.Time `type:"timestamp"` - - // The name of the bucket. - 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 Bucket) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Bucket) GoString() string { - return s.String() -} - -// SetCreationDate sets the CreationDate field's value. -func (s *Bucket) SetCreationDate(v time.Time) *Bucket { - s.CreationDate = &v - return s -} - -// SetName sets the Name field's value. -func (s *Bucket) SetName(v string) *Bucket { - s.Name = &v - return s -} - -// Specifies the information about the bucket that will be created. For more -// information about directory buckets, see Directory buckets (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-overview.html) -// in the Amazon S3 User Guide. -// -// This functionality is only supported by directory buckets. -type BucketInfo struct { - _ struct{} `type:"structure"` - - // The number of Availability Zone that's used for redundancy for the bucket. - DataRedundancy *string `type:"string" enum:"DataRedundancy"` - - // The type of bucket. - Type *string `type:"string" enum:"BucketType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s BucketInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s BucketInfo) GoString() string { - return s.String() -} - -// SetDataRedundancy sets the DataRedundancy field's value. -func (s *BucketInfo) SetDataRedundancy(v string) *BucketInfo { - s.DataRedundancy = &v - return s -} - -// SetType sets the Type field's value. -func (s *BucketInfo) SetType(v string) *BucketInfo { - s.Type = &v - return s -} - -// Specifies the lifecycle configuration for objects in an Amazon S3 bucket. -// For more information, see Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html) -// in the Amazon S3 User Guide. -type BucketLifecycleConfiguration struct { - _ struct{} `type:"structure"` - - // A lifecycle rule for individual objects in an Amazon S3 bucket. - // - // Rules is a required field - Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true" 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 BucketLifecycleConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s BucketLifecycleConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BucketLifecycleConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BucketLifecycleConfiguration"} - if s.Rules == nil { - invalidParams.Add(request.NewErrParamRequired("Rules")) - } - if s.Rules != nil { - for i, v := range s.Rules { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRules sets the Rules field's value. -func (s *BucketLifecycleConfiguration) SetRules(v []*LifecycleRule) *BucketLifecycleConfiguration { - s.Rules = v - return s -} - -// Container for logging status information. -type BucketLoggingStatus struct { - _ struct{} `type:"structure"` - - // Describes where logs are stored and the prefix that Amazon S3 assigns to - // all log object keys for a bucket. For more information, see PUT Bucket logging - // (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html) - // in the Amazon S3 API Reference. - LoggingEnabled *LoggingEnabled `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 BucketLoggingStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s BucketLoggingStatus) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BucketLoggingStatus) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BucketLoggingStatus"} - if s.LoggingEnabled != nil { - if err := s.LoggingEnabled.Validate(); err != nil { - invalidParams.AddNested("LoggingEnabled", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoggingEnabled sets the LoggingEnabled field's value. -func (s *BucketLoggingStatus) SetLoggingEnabled(v *LoggingEnabled) *BucketLoggingStatus { - s.LoggingEnabled = v - return s -} - -// Describes the cross-origin access configuration for objects in an Amazon -// S3 bucket. For more information, see Enabling Cross-Origin Resource Sharing -// (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) in the Amazon -// S3 User Guide. -type CORSConfiguration struct { - _ struct{} `type:"structure"` - - // A set of origins and methods (cross-origin access that you want to allow). - // You can add up to 100 rules to the configuration. - // - // CORSRules is a required field - CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true" 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 CORSConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CORSConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CORSConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CORSConfiguration"} - if s.CORSRules == nil { - invalidParams.Add(request.NewErrParamRequired("CORSRules")) - } - if s.CORSRules != nil { - for i, v := range s.CORSRules { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CORSRules", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCORSRules sets the CORSRules field's value. -func (s *CORSConfiguration) SetCORSRules(v []*CORSRule) *CORSConfiguration { - s.CORSRules = v - return s -} - -// Specifies a cross-origin access rule for an Amazon S3 bucket. -type CORSRule struct { - _ struct{} `type:"structure"` - - // Headers that are specified in the Access-Control-Request-Headers header. - // These headers are allowed in a preflight OPTIONS request. In response to - // any preflight OPTIONS request, Amazon S3 returns any requested headers that - // are allowed. - AllowedHeaders []*string `locationName:"AllowedHeader" type:"list" flattened:"true"` - - // An HTTP method that you allow the origin to execute. Valid values are GET, - // PUT, HEAD, POST, and DELETE. - // - // AllowedMethods is a required field - AllowedMethods []*string `locationName:"AllowedMethod" type:"list" flattened:"true" required:"true"` - - // One or more origins you want customers to be able to access the bucket from. - // - // AllowedOrigins is a required field - AllowedOrigins []*string `locationName:"AllowedOrigin" type:"list" flattened:"true" required:"true"` - - // One or more headers in the response that you want customers to be able to - // access from their applications (for example, from a JavaScript XMLHttpRequest - // object). - ExposeHeaders []*string `locationName:"ExposeHeader" type:"list" flattened:"true"` - - // Unique identifier for the rule. The value cannot be longer than 255 characters. - ID *string `type:"string"` - - // The time in seconds that your browser is to cache the preflight response - // for the specified resource. - MaxAgeSeconds *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 CORSRule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CORSRule) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CORSRule) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CORSRule"} - if s.AllowedMethods == nil { - invalidParams.Add(request.NewErrParamRequired("AllowedMethods")) - } - if s.AllowedOrigins == nil { - invalidParams.Add(request.NewErrParamRequired("AllowedOrigins")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAllowedHeaders sets the AllowedHeaders field's value. -func (s *CORSRule) SetAllowedHeaders(v []*string) *CORSRule { - s.AllowedHeaders = v - return s -} - -// SetAllowedMethods sets the AllowedMethods field's value. -func (s *CORSRule) SetAllowedMethods(v []*string) *CORSRule { - s.AllowedMethods = v - return s -} - -// SetAllowedOrigins sets the AllowedOrigins field's value. -func (s *CORSRule) SetAllowedOrigins(v []*string) *CORSRule { - s.AllowedOrigins = v - return s -} - -// SetExposeHeaders sets the ExposeHeaders field's value. -func (s *CORSRule) SetExposeHeaders(v []*string) *CORSRule { - s.ExposeHeaders = v - return s -} - -// SetID sets the ID field's value. -func (s *CORSRule) SetID(v string) *CORSRule { - s.ID = &v - return s -} - -// SetMaxAgeSeconds sets the MaxAgeSeconds field's value. -func (s *CORSRule) SetMaxAgeSeconds(v int64) *CORSRule { - s.MaxAgeSeconds = &v - return s -} - -// Describes how an uncompressed comma-separated values (CSV)-formatted input -// object is formatted. -type CSVInput struct { - _ struct{} `type:"structure"` - - // Specifies that CSV field values may contain quoted record delimiters and - // such records should be allowed. Default value is FALSE. Setting this value - // to TRUE may lower performance. - AllowQuotedRecordDelimiter *bool `type:"boolean"` - - // A single character used to indicate that a row should be ignored when the - // character is present at the start of that row. You can specify any character - // to indicate a comment line. The default character is #. - // - // Default: # - Comments *string `type:"string"` - - // A single character used to separate individual fields in a record. You can - // specify an arbitrary delimiter. - FieldDelimiter *string `type:"string"` - - // Describes the first line of input. Valid values are: - // - // * NONE: First line is not a header. - // - // * IGNORE: First line is a header, but you can't use the header values - // to indicate the column in an expression. You can use column position (such - // as _1, _2, …) to indicate the column (SELECT s._1 FROM OBJECT s). - // - // * Use: First line is a header, and you can use the header value to identify - // a column in an expression (SELECT "name" FROM OBJECT). - FileHeaderInfo *string `type:"string" enum:"FileHeaderInfo"` - - // A single character used for escaping when the field delimiter is part of - // the value. For example, if the value is a, b, Amazon S3 wraps this field - // value in quotation marks, as follows: " a , b ". - // - // Type: String - // - // Default: " - // - // Ancestors: CSV - QuoteCharacter *string `type:"string"` - - // A single character used for escaping the quotation mark character inside - // an already escaped value. For example, the value """ a , b """ is parsed - // as " a , b ". - QuoteEscapeCharacter *string `type:"string"` - - // A single character used to separate individual records in the input. Instead - // of the default value, you can specify an arbitrary delimiter. - RecordDelimiter *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 CSVInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CSVInput) GoString() string { - return s.String() -} - -// SetAllowQuotedRecordDelimiter sets the AllowQuotedRecordDelimiter field's value. -func (s *CSVInput) SetAllowQuotedRecordDelimiter(v bool) *CSVInput { - s.AllowQuotedRecordDelimiter = &v - return s -} - -// SetComments sets the Comments field's value. -func (s *CSVInput) SetComments(v string) *CSVInput { - s.Comments = &v - return s -} - -// SetFieldDelimiter sets the FieldDelimiter field's value. -func (s *CSVInput) SetFieldDelimiter(v string) *CSVInput { - s.FieldDelimiter = &v - return s -} - -// SetFileHeaderInfo sets the FileHeaderInfo field's value. -func (s *CSVInput) SetFileHeaderInfo(v string) *CSVInput { - s.FileHeaderInfo = &v - return s -} - -// SetQuoteCharacter sets the QuoteCharacter field's value. -func (s *CSVInput) SetQuoteCharacter(v string) *CSVInput { - s.QuoteCharacter = &v - return s -} - -// SetQuoteEscapeCharacter sets the QuoteEscapeCharacter field's value. -func (s *CSVInput) SetQuoteEscapeCharacter(v string) *CSVInput { - s.QuoteEscapeCharacter = &v - return s -} - -// SetRecordDelimiter sets the RecordDelimiter field's value. -func (s *CSVInput) SetRecordDelimiter(v string) *CSVInput { - s.RecordDelimiter = &v - return s -} - -// Describes how uncompressed comma-separated values (CSV)-formatted results -// are formatted. -type CSVOutput struct { - _ struct{} `type:"structure"` - - // The value used to separate individual fields in a record. You can specify - // an arbitrary delimiter. - FieldDelimiter *string `type:"string"` - - // A single character used for escaping when the field delimiter is part of - // the value. For example, if the value is a, b, Amazon S3 wraps this field - // value in quotation marks, as follows: " a , b ". - QuoteCharacter *string `type:"string"` - - // The single character used for escaping the quote character inside an already - // escaped value. - QuoteEscapeCharacter *string `type:"string"` - - // Indicates whether to use quotation marks around output fields. - // - // * ALWAYS: Always use quotation marks for output fields. - // - // * ASNEEDED: Use quotation marks for output fields when needed. - QuoteFields *string `type:"string" enum:"QuoteFields"` - - // A single character used to separate individual records in the output. Instead - // of the default value, you can specify an arbitrary delimiter. - RecordDelimiter *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 CSVOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CSVOutput) GoString() string { - return s.String() -} - -// SetFieldDelimiter sets the FieldDelimiter field's value. -func (s *CSVOutput) SetFieldDelimiter(v string) *CSVOutput { - s.FieldDelimiter = &v - return s -} - -// SetQuoteCharacter sets the QuoteCharacter field's value. -func (s *CSVOutput) SetQuoteCharacter(v string) *CSVOutput { - s.QuoteCharacter = &v - return s -} - -// SetQuoteEscapeCharacter sets the QuoteEscapeCharacter field's value. -func (s *CSVOutput) SetQuoteEscapeCharacter(v string) *CSVOutput { - s.QuoteEscapeCharacter = &v - return s -} - -// SetQuoteFields sets the QuoteFields field's value. -func (s *CSVOutput) SetQuoteFields(v string) *CSVOutput { - s.QuoteFields = &v - return s -} - -// SetRecordDelimiter sets the RecordDelimiter field's value. -func (s *CSVOutput) SetRecordDelimiter(v string) *CSVOutput { - s.RecordDelimiter = &v - return s -} - -// Contains all the possible checksum or digest values for an object. -type Checksum struct { - _ struct{} `type:"structure"` - - // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be - // present if it was uploaded with the object. When you use an API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumCRC32 *string `type:"string"` - - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only - // be present if it was uploaded with the object. When you use an API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumCRC32C *string `type:"string"` - - // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be - // present if it was uploaded with the object. When you use the API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumSHA1 *string `type:"string"` - - // The base64-encoded, 256-bit SHA-256 digest of the object. This will only - // be present if it was uploaded with the object. When you use an API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumSHA256 *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 Checksum) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Checksum) GoString() string { - return s.String() -} - -// SetChecksumCRC32 sets the ChecksumCRC32 field's value. -func (s *Checksum) SetChecksumCRC32(v string) *Checksum { - s.ChecksumCRC32 = &v - return s -} - -// SetChecksumCRC32C sets the ChecksumCRC32C field's value. -func (s *Checksum) SetChecksumCRC32C(v string) *Checksum { - s.ChecksumCRC32C = &v - return s -} - -// SetChecksumSHA1 sets the ChecksumSHA1 field's value. -func (s *Checksum) SetChecksumSHA1(v string) *Checksum { - s.ChecksumSHA1 = &v - return s -} - -// SetChecksumSHA256 sets the ChecksumSHA256 field's value. -func (s *Checksum) SetChecksumSHA256(v string) *Checksum { - s.ChecksumSHA256 = &v - return s -} - -// Container for specifying the Lambda notification configuration. -type CloudFunctionConfiguration struct { - _ struct{} `type:"structure"` - - // Lambda cloud function ARN that Amazon S3 can invoke when it detects events - // of the specified type. - CloudFunction *string `type:"string"` - - // The bucket event for which to send notifications. - // - // Deprecated: Event has been deprecated - Event *string `deprecated:"true" type:"string" enum:"Event"` - - // Bucket events for which to send notifications. - Events []*string `locationName:"Event" type:"list" flattened:"true" enum:"Event"` - - // An optional unique identifier for configurations in a notification configuration. - // If you don't provide one, Amazon S3 will assign an ID. - Id *string `type:"string"` - - // The role supporting the invocation of the Lambda function - InvocationRole *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 CloudFunctionConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CloudFunctionConfiguration) GoString() string { - return s.String() -} - -// SetCloudFunction sets the CloudFunction field's value. -func (s *CloudFunctionConfiguration) SetCloudFunction(v string) *CloudFunctionConfiguration { - s.CloudFunction = &v - return s -} - -// SetEvent sets the Event field's value. -func (s *CloudFunctionConfiguration) SetEvent(v string) *CloudFunctionConfiguration { - s.Event = &v - return s -} - -// SetEvents sets the Events field's value. -func (s *CloudFunctionConfiguration) SetEvents(v []*string) *CloudFunctionConfiguration { - s.Events = v - return s -} - -// SetId sets the Id field's value. -func (s *CloudFunctionConfiguration) SetId(v string) *CloudFunctionConfiguration { - s.Id = &v - return s -} - -// SetInvocationRole sets the InvocationRole field's value. -func (s *CloudFunctionConfiguration) SetInvocationRole(v string) *CloudFunctionConfiguration { - s.InvocationRole = &v - return s -} - -// Container for all (if there are any) keys between Prefix and the next occurrence -// of the string specified by a delimiter. CommonPrefixes lists keys that act -// like subdirectories in the directory specified by Prefix. For example, if -// the prefix is notes/ and the delimiter is a slash (/) as in notes/summer/july, -// the common prefix is notes/summer/. -type CommonPrefix struct { - _ struct{} `type:"structure"` - - // Container for the specified common prefix. - Prefix *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 CommonPrefix) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CommonPrefix) GoString() string { - return s.String() -} - -// SetPrefix sets the Prefix field's value. -func (s *CommonPrefix) SetPrefix(v string) *CommonPrefix { - s.Prefix = &v - return s -} - -type CompleteMultipartUploadInput struct { - _ struct{} `locationName:"CompleteMultipartUploadRequest" type:"structure" payload:"MultipartUpload"` - - // Name of the bucket to which the multipart upload was initiated. - // - // Directory buckets - When you use this operation with a directory bucket, - // you must use virtual-hosted-style requests in the format Bucket_name.s3express-az_id.region.amazonaws.com. - // Path-style requests are not supported. Directory bucket names must be unique - // in the chosen Availability Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 - // (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about - // bucket naming restrictions, see Directory bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html) - // in the Amazon S3 User Guide. - // - // Access points - When you use this action with an access point, you must provide - // the alias of the access point in place of the bucket name or specify the - // access point ARN. When using the access point ARN, you must direct requests - // to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this action with an access point through the Amazon Web Services - // SDKs, you provide the access point ARN in place of the bucket name. For more - // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. - // - // Access points and Object Lambda access points are not supported by directory - // buckets. - // - // S3 on Outposts - When you use this action with Amazon S3 on Outposts, you - // must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname - // takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. - // When you use this action with S3 on Outposts through the Amazon Web Services - // SDKs, you provide the Outposts access point ARN in place of the bucket name. - // For more information about S3 on Outposts ARNs, see What is S3 on Outposts? - // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) - // in the Amazon S3 User Guide. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // This header can be used as a data integrity check to verify that the data - // received is the same data that was originally sent. This header specifies - // the base64-encoded, 32-bit CRC32 checksum of the object. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - ChecksumCRC32 *string `location:"header" locationName:"x-amz-checksum-crc32" type:"string"` - - // This header can be used as a data integrity check to verify that the data - // received is the same data that was originally sent. This header specifies - // the base64-encoded, 32-bit CRC32C checksum of the object. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - ChecksumCRC32C *string `location:"header" locationName:"x-amz-checksum-crc32c" type:"string"` - - // This header can be used as a data integrity check to verify that the data - // received is the same data that was originally sent. This header specifies - // the base64-encoded, 160-bit SHA-1 digest of the object. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - ChecksumSHA1 *string `location:"header" locationName:"x-amz-checksum-sha1" type:"string"` - - // This header can be used as a data integrity check to verify that the data - // received is the same data that was originally sent. This header specifies - // the base64-encoded, 256-bit SHA-256 digest of the object. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - ChecksumSHA256 *string `location:"header" locationName:"x-amz-checksum-sha256" type:"string"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // Object key for which the multipart upload was initiated. - // - // Key is a required field - Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - - // The container for the multipart upload request information. - MultipartUpload *CompletedMultipartUpload `locationName:"CompleteMultipartUpload" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` - - // Confirms that the requester knows that they will be charged for the request. - // Bucket owners need not specify this parameter in their requests. If either - // the source or destination S3 bucket has Requester Pays enabled, the requester - // will pay for corresponding charges to copy the object. For information about - // downloading objects from Requester Pays buckets, see Downloading Objects - // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` - - // The server-side encryption (SSE) algorithm used to encrypt the object. This - // parameter is required only when the object was created using a checksum algorithm - // or if your bucket policy requires the use of SSE-C. For more information, - // see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html#ssec-require-condition-key) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` - - // The server-side encryption (SSE) customer managed key. This parameter is - // needed only when the object was created using a checksum algorithm. For more - // information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - // - // SSECustomerKey is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by CompleteMultipartUploadInput's - // String and GoString methods. - SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"` - - // The MD5 server-side encryption (SSE) customer managed key. This parameter - // is needed only when the object was created using a checksum algorithm. For - // more information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` - - // ID for the initiated multipart upload. - // - // UploadId is a required field - UploadId *string `location:"querystring" locationName:"uploadId" 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 CompleteMultipartUploadInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CompleteMultipartUploadInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CompleteMultipartUploadInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CompleteMultipartUploadInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - 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.UploadId == nil { - invalidParams.Add(request.NewErrParamRequired("UploadId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *CompleteMultipartUploadInput) SetBucket(v string) *CompleteMultipartUploadInput { - s.Bucket = &v - return s -} - -func (s *CompleteMultipartUploadInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetChecksumCRC32 sets the ChecksumCRC32 field's value. -func (s *CompleteMultipartUploadInput) SetChecksumCRC32(v string) *CompleteMultipartUploadInput { - s.ChecksumCRC32 = &v - return s -} - -// SetChecksumCRC32C sets the ChecksumCRC32C field's value. -func (s *CompleteMultipartUploadInput) SetChecksumCRC32C(v string) *CompleteMultipartUploadInput { - s.ChecksumCRC32C = &v - return s -} - -// SetChecksumSHA1 sets the ChecksumSHA1 field's value. -func (s *CompleteMultipartUploadInput) SetChecksumSHA1(v string) *CompleteMultipartUploadInput { - s.ChecksumSHA1 = &v - return s -} - -// SetChecksumSHA256 sets the ChecksumSHA256 field's value. -func (s *CompleteMultipartUploadInput) SetChecksumSHA256(v string) *CompleteMultipartUploadInput { - s.ChecksumSHA256 = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *CompleteMultipartUploadInput) SetExpectedBucketOwner(v string) *CompleteMultipartUploadInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetKey sets the Key field's value. -func (s *CompleteMultipartUploadInput) SetKey(v string) *CompleteMultipartUploadInput { - s.Key = &v - return s -} - -// SetMultipartUpload sets the MultipartUpload field's value. -func (s *CompleteMultipartUploadInput) SetMultipartUpload(v *CompletedMultipartUpload) *CompleteMultipartUploadInput { - s.MultipartUpload = v - return s -} - -// SetRequestPayer sets the RequestPayer field's value. -func (s *CompleteMultipartUploadInput) SetRequestPayer(v string) *CompleteMultipartUploadInput { - s.RequestPayer = &v - return s -} - -// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. -func (s *CompleteMultipartUploadInput) SetSSECustomerAlgorithm(v string) *CompleteMultipartUploadInput { - s.SSECustomerAlgorithm = &v - return s -} - -// SetSSECustomerKey sets the SSECustomerKey field's value. -func (s *CompleteMultipartUploadInput) SetSSECustomerKey(v string) *CompleteMultipartUploadInput { - s.SSECustomerKey = &v - return s -} - -func (s *CompleteMultipartUploadInput) getSSECustomerKey() (v string) { - if s.SSECustomerKey == nil { - return v - } - return *s.SSECustomerKey -} - -// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. -func (s *CompleteMultipartUploadInput) SetSSECustomerKeyMD5(v string) *CompleteMultipartUploadInput { - s.SSECustomerKeyMD5 = &v - return s -} - -// SetUploadId sets the UploadId field's value. -func (s *CompleteMultipartUploadInput) SetUploadId(v string) *CompleteMultipartUploadInput { - s.UploadId = &v - return s -} - -func (s *CompleteMultipartUploadInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *CompleteMultipartUploadInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s CompleteMultipartUploadInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type CompleteMultipartUploadOutput struct { - _ struct{} `type:"structure"` - - // The name of the bucket that contains the newly created object. Does not return - // the access point ARN or access point alias if used. - // - // Access points are not supported by directory buckets. - Bucket *string `type:"string"` - - // Indicates whether the multipart upload uses an S3 Bucket Key for server-side - // encryption with Key Management Service (KMS) keys (SSE-KMS). - // - // This functionality is not supported for directory buckets. - BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"` - - // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be - // present if it was uploaded with the object. When you use an API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumCRC32 *string `type:"string"` - - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only - // be present if it was uploaded with the object. When you use an API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumCRC32C *string `type:"string"` - - // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be - // present if it was uploaded with the object. When you use the API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumSHA1 *string `type:"string"` - - // The base64-encoded, 256-bit SHA-256 digest of the object. This will only - // be present if it was uploaded with the object. When you use an API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumSHA256 *string `type:"string"` - - // Entity tag that identifies the newly created object's data. Objects with - // different object data will have different entity tags. The entity tag is - // an opaque string. The entity tag may or may not be an MD5 digest of the object - // data. If the entity tag is not an MD5 digest of the object data, it will - // contain one or more nonhexadecimal characters and/or will consist of less - // than 32 or more than 32 hexadecimal digits. For more information about how - // the entity tag is calculated, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - ETag *string `type:"string"` - - // If the object expiration is configured, this will contain the expiration - // date (expiry-date) and rule ID (rule-id). The value of rule-id is URL-encoded. - // - // This functionality is not supported for directory buckets. - Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"` - - // The object key of the newly created object. - Key *string `min:"1" type:"string"` - - // The URI that identifies the newly created object. - Location *string `type:"string"` - - // If present, indicates that the requester was successfully charged for the - // request. - // - // This functionality is not supported for directory buckets. - RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` - - // If present, indicates the ID of the Key Management Service (KMS) symmetric - // encryption customer managed key that was used for the object. - // - // This functionality is not supported for directory buckets. - // - // SSEKMSKeyId is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by CompleteMultipartUploadOutput's - // String and GoString methods. - SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` - - // The server-side encryption algorithm used when storing this object in Amazon - // S3 (for example, AES256, aws:kms). - // - // For directory buckets, only server-side encryption with Amazon S3 managed - // keys (SSE-S3) (AES256) is supported. - ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"` - - // Version ID of the newly created object, in case the bucket has versioning - // turned on. - // - // This functionality is not supported for directory buckets. - VersionId *string `location:"header" locationName:"x-amz-version-id" 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 CompleteMultipartUploadOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CompleteMultipartUploadOutput) GoString() string { - return s.String() -} - -// SetBucket sets the Bucket field's value. -func (s *CompleteMultipartUploadOutput) SetBucket(v string) *CompleteMultipartUploadOutput { - s.Bucket = &v - return s -} - -func (s *CompleteMultipartUploadOutput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetBucketKeyEnabled sets the BucketKeyEnabled field's value. -func (s *CompleteMultipartUploadOutput) SetBucketKeyEnabled(v bool) *CompleteMultipartUploadOutput { - s.BucketKeyEnabled = &v - return s -} - -// SetChecksumCRC32 sets the ChecksumCRC32 field's value. -func (s *CompleteMultipartUploadOutput) SetChecksumCRC32(v string) *CompleteMultipartUploadOutput { - s.ChecksumCRC32 = &v - return s -} - -// SetChecksumCRC32C sets the ChecksumCRC32C field's value. -func (s *CompleteMultipartUploadOutput) SetChecksumCRC32C(v string) *CompleteMultipartUploadOutput { - s.ChecksumCRC32C = &v - return s -} - -// SetChecksumSHA1 sets the ChecksumSHA1 field's value. -func (s *CompleteMultipartUploadOutput) SetChecksumSHA1(v string) *CompleteMultipartUploadOutput { - s.ChecksumSHA1 = &v - return s -} - -// SetChecksumSHA256 sets the ChecksumSHA256 field's value. -func (s *CompleteMultipartUploadOutput) SetChecksumSHA256(v string) *CompleteMultipartUploadOutput { - s.ChecksumSHA256 = &v - return s -} - -// SetETag sets the ETag field's value. -func (s *CompleteMultipartUploadOutput) SetETag(v string) *CompleteMultipartUploadOutput { - s.ETag = &v - return s -} - -// SetExpiration sets the Expiration field's value. -func (s *CompleteMultipartUploadOutput) SetExpiration(v string) *CompleteMultipartUploadOutput { - s.Expiration = &v - return s -} - -// SetKey sets the Key field's value. -func (s *CompleteMultipartUploadOutput) SetKey(v string) *CompleteMultipartUploadOutput { - s.Key = &v - return s -} - -// SetLocation sets the Location field's value. -func (s *CompleteMultipartUploadOutput) SetLocation(v string) *CompleteMultipartUploadOutput { - s.Location = &v - return s -} - -// SetRequestCharged sets the RequestCharged field's value. -func (s *CompleteMultipartUploadOutput) SetRequestCharged(v string) *CompleteMultipartUploadOutput { - s.RequestCharged = &v - return s -} - -// SetSSEKMSKeyId sets the SSEKMSKeyId field's value. -func (s *CompleteMultipartUploadOutput) SetSSEKMSKeyId(v string) *CompleteMultipartUploadOutput { - s.SSEKMSKeyId = &v - return s -} - -// SetServerSideEncryption sets the ServerSideEncryption field's value. -func (s *CompleteMultipartUploadOutput) SetServerSideEncryption(v string) *CompleteMultipartUploadOutput { - s.ServerSideEncryption = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *CompleteMultipartUploadOutput) SetVersionId(v string) *CompleteMultipartUploadOutput { - s.VersionId = &v - return s -} - -// The container for the completed multipart upload details. -type CompletedMultipartUpload struct { - _ struct{} `type:"structure"` - - // Array of CompletedPart data types. - // - // If you do not supply a valid Part with your request, the service sends back - // an HTTP 400 response. - Parts []*CompletedPart `locationName:"Part" type:"list" flattened:"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 CompletedMultipartUpload) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CompletedMultipartUpload) GoString() string { - return s.String() -} - -// SetParts sets the Parts field's value. -func (s *CompletedMultipartUpload) SetParts(v []*CompletedPart) *CompletedMultipartUpload { - s.Parts = v - return s -} - -// Details of the parts that were uploaded. -type CompletedPart struct { - _ struct{} `type:"structure"` - - // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be - // present if it was uploaded with the object. When you use an API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumCRC32 *string `type:"string"` - - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only - // be present if it was uploaded with the object. When you use an API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumCRC32C *string `type:"string"` - - // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be - // present if it was uploaded with the object. When you use the API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumSHA1 *string `type:"string"` - - // The base64-encoded, 256-bit SHA-256 digest of the object. This will only - // be present if it was uploaded with the object. When you use an API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumSHA256 *string `type:"string"` - - // Entity tag returned when the part was uploaded. - ETag *string `type:"string"` - - // Part number that identifies the part. This is a positive integer between - // 1 and 10,000. - // - // * General purpose buckets - In CompleteMultipartUpload, when a additional - // checksum (including x-amz-checksum-crc32, x-amz-checksum-crc32c, x-amz-checksum-sha1, - // or x-amz-checksum-sha256) is applied to each part, the PartNumber must - // start at 1 and the part numbers must be consecutive. Otherwise, Amazon - // S3 generates an HTTP 400 Bad Request status code and an InvalidPartOrder - // error code. - // - // * Directory buckets - In CompleteMultipartUpload, the PartNumber must - // start at 1 and the part numbers must be consecutive. - PartNumber *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 CompletedPart) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CompletedPart) GoString() string { - return s.String() -} - -// SetChecksumCRC32 sets the ChecksumCRC32 field's value. -func (s *CompletedPart) SetChecksumCRC32(v string) *CompletedPart { - s.ChecksumCRC32 = &v - return s -} - -// SetChecksumCRC32C sets the ChecksumCRC32C field's value. -func (s *CompletedPart) SetChecksumCRC32C(v string) *CompletedPart { - s.ChecksumCRC32C = &v - return s -} - -// SetChecksumSHA1 sets the ChecksumSHA1 field's value. -func (s *CompletedPart) SetChecksumSHA1(v string) *CompletedPart { - s.ChecksumSHA1 = &v - return s -} - -// SetChecksumSHA256 sets the ChecksumSHA256 field's value. -func (s *CompletedPart) SetChecksumSHA256(v string) *CompletedPart { - s.ChecksumSHA256 = &v - return s -} - -// SetETag sets the ETag field's value. -func (s *CompletedPart) SetETag(v string) *CompletedPart { - s.ETag = &v - return s -} - -// SetPartNumber sets the PartNumber field's value. -func (s *CompletedPart) SetPartNumber(v int64) *CompletedPart { - s.PartNumber = &v - return s -} - -// A container for describing a condition that must be met for the specified -// redirect to apply. For example, 1. If request is for pages in the /docs folder, -// redirect to the /documents folder. 2. If request results in HTTP error 4xx, -// redirect request to another host where you might process the error. -type Condition struct { - _ struct{} `type:"structure"` - - // The HTTP error code when the redirect is applied. In the event of an error, - // if the error code equals this value, then the specified redirect is applied. - // Required when parent element Condition is specified and sibling KeyPrefixEquals - // is not specified. If both are specified, then both must be true for the redirect - // to be applied. - HttpErrorCodeReturnedEquals *string `type:"string"` - - // The object key name prefix when the redirect is applied. For example, to - // redirect requests for ExamplePage.html, the key prefix will be ExamplePage.html. - // To redirect request for all pages with the prefix docs/, the key prefix will - // be /docs, which identifies all objects in the docs/ folder. Required when - // the parent element Condition is specified and sibling HttpErrorCodeReturnedEquals - // is not specified. If both conditions are specified, both must be true for - // the redirect to be applied. - // - // Replacement must be made for object keys containing special characters (such - // as carriage returns) when using XML requests. For more information, see XML - // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints). - KeyPrefixEquals *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 Condition) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Condition) GoString() string { - return s.String() -} - -// SetHttpErrorCodeReturnedEquals sets the HttpErrorCodeReturnedEquals field's value. -func (s *Condition) SetHttpErrorCodeReturnedEquals(v string) *Condition { - s.HttpErrorCodeReturnedEquals = &v - return s -} - -// SetKeyPrefixEquals sets the KeyPrefixEquals field's value. -func (s *Condition) SetKeyPrefixEquals(v string) *Condition { - s.KeyPrefixEquals = &v - return s -} - -type ContinuationEvent struct { - _ struct{} `locationName:"ContinuationEvent" 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 ContinuationEvent) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ContinuationEvent) GoString() string { - return s.String() -} - -// The ContinuationEvent is and event in the SelectObjectContentEventStream group of events. -func (s *ContinuationEvent) eventSelectObjectContentEventStream() {} - -// UnmarshalEvent unmarshals the EventStream Message into the ContinuationEvent value. -// This method is only used internally within the SDK's EventStream handling. -func (s *ContinuationEvent) UnmarshalEvent( - payloadUnmarshaler protocol.PayloadUnmarshaler, - msg eventstream.Message, -) error { - return nil -} - -// MarshalEvent marshals the type into an stream event value. This method -// should only used internally within the SDK's EventStream handling. -func (s *ContinuationEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { - msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) - return msg, err -} - -type CopyObjectInput struct { - _ struct{} `locationName:"CopyObjectRequest" type:"structure"` - - // The canned access control list (ACL) to apply to the object. - // - // When you copy an object, the ACL metadata is not preserved and is set to - // private by default. Only the owner has full access control. To override the - // default ACL setting, specify a new ACL when you generate a copy request. - // For more information, see Using ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html). - // - // If the destination bucket that you're copying objects to uses the bucket - // owner enforced setting for S3 Object Ownership, ACLs are disabled and no - // longer affect permissions. Buckets that use this setting only accept PUT - // requests that don't specify an ACL or PUT requests that specify bucket owner - // full control ACLs, such as the bucket-owner-full-control canned ACL or an - // equivalent form of this ACL expressed in the XML format. For more information, - // see Controlling ownership of objects and disabling ACLs (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html) - // in the Amazon S3 User Guide. - // - // * If your destination bucket uses the bucket owner enforced setting for - // Object Ownership, all objects written to the bucket by any account will - // be owned by the bucket owner. - // - // * This functionality is not supported for directory buckets. - // - // * This functionality is not supported for Amazon S3 on Outposts. - ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"` - - // The name of the destination bucket. - // - // Directory buckets - When you use this operation with a directory bucket, - // you must use virtual-hosted-style requests in the format Bucket_name.s3express-az_id.region.amazonaws.com. - // Path-style requests are not supported. Directory bucket names must be unique - // in the chosen Availability Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 - // (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about - // bucket naming restrictions, see Directory bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html) - // in the Amazon S3 User Guide. - // - // Access points - When you use this action with an access point, you must provide - // the alias of the access point in place of the bucket name or specify the - // access point ARN. When using the access point ARN, you must direct requests - // to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this action with an access point through the Amazon Web Services - // SDKs, you provide the access point ARN in place of the bucket name. For more - // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. - // - // Access points and Object Lambda access points are not supported by directory - // buckets. - // - // S3 on Outposts - When you use this action with Amazon S3 on Outposts, you - // must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname - // takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. - // When you use this action with S3 on Outposts through the Amazon Web Services - // SDKs, you provide the Outposts access point ARN in place of the bucket name. - // For more information about S3 on Outposts ARNs, see What is S3 on Outposts? - // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) - // in the Amazon S3 User Guide. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption - // with server-side encryption using Key Management Service (KMS) keys (SSE-KMS). - // If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the - // object. - // - // Setting this header to true causes Amazon S3 to use an S3 Bucket Key for - // object encryption with SSE-KMS. Specifying this header with a COPY action - // doesn’t affect bucket-level settings for S3 Bucket Key. - // - // For more information, see Amazon S3 Bucket Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported when the destination bucket is a directory - // bucket. - BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"` - - // Specifies the caching behavior along the request/reply chain. - CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"` - - // Indicates the algorithm that you want Amazon S3 to use to create the checksum - // for the object. For more information, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - // - // When you copy an object, if the source object has a checksum, that checksum - // value will be copied to the new object by default. If the CopyObject request - // does not include this x-amz-checksum-algorithm header, the checksum algorithm - // will be copied from the source object to the destination object (if it's - // present on the source object). You can optionally specify a different checksum - // algorithm to use with the x-amz-checksum-algorithm header. Unrecognized or - // unsupported values will respond with the HTTP status code 400 Bad Request. - // - // For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the - // default checksum algorithm that's used for performance. - ChecksumAlgorithm *string `location:"header" locationName:"x-amz-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"` - - // Specifies presentational information for the object. Indicates whether an - // object should be displayed in a web browser or downloaded as a file. It allows - // specifying the desired filename for the downloaded file. - ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"` - - // Specifies what content encodings have been applied to the object and thus - // what decoding mechanisms must be applied to obtain the media-type referenced - // by the Content-Type header field. - // - // For directory buckets, only the aws-chunked value is supported in this header - // field. - ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"` - - // The language the content is in. - ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"` - - // A standard MIME type that describes the format of the object data. - ContentType *string `location:"header" locationName:"Content-Type" type:"string"` - - // Specifies the source object for the copy operation. The source object can - // be up to 5 GB. If the source object is an object that was uploaded by using - // a multipart upload, the object copy will be a single part object after the - // source object is copied to the destination bucket. - // - // You specify the value of the copy source in one of two formats, depending - // on whether you want to access the source object through an access point (https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html): - // - // * For objects not accessed through an access point, specify the name of - // the source bucket and the key of the source object, separated by a slash - // (/). For example, to copy the object reports/january.pdf from the general - // purpose bucket awsexamplebucket, use awsexamplebucket/reports/january.pdf. - // The value must be URL-encoded. To copy the object reports/january.pdf - // from the directory bucket awsexamplebucket--use1-az5--x-s3, use awsexamplebucket--use1-az5--x-s3/reports/january.pdf. - // The value must be URL-encoded. - // - // * For objects accessed through access points, specify the Amazon Resource - // Name (ARN) of the object as accessed through the access point, in the - // format arn:aws:s3:::accesspoint//object/. - // For example, to copy the object reports/january.pdf through access point - // my-access-point owned by account 123456789012 in Region us-west-2, use - // the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf. - // The value must be URL encoded. Amazon S3 supports copy operations using - // Access points only when the source and destination buckets are in the - // same Amazon Web Services Region. Access points are not supported by directory - // buckets. Alternatively, for objects accessed through Amazon S3 on Outposts, - // specify the ARN of the object as accessed in the format arn:aws:s3-outposts:::outpost//object/. - // For example, to copy the object reports/january.pdf through outpost my-outpost - // owned by account 123456789012 in Region us-west-2, use the URL encoding - // of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf. - // The value must be URL-encoded. - // - // If your source bucket versioning is enabled, the x-amz-copy-source header - // by default identifies the current version of an object to copy. If the current - // version is a delete marker, Amazon S3 behaves as if the object was deleted. - // To copy a different version, use the versionId query parameter. Specifically, - // append ?versionId= to the value (for example, awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893). - // If you don't specify a version ID, Amazon S3 copies the latest version of - // the source object. - // - // If you enable versioning on the destination bucket, Amazon S3 generates a - // unique version ID for the copied object. This version ID is different from - // the version ID of the source object. Amazon S3 returns the version ID of - // the copied object in the x-amz-version-id response header in the response. - // - // If you do not enable versioning or suspend it on the destination bucket, - // the version ID that Amazon S3 generates in the x-amz-version-id response - // header is always null. - // - // Directory buckets - S3 Versioning isn't enabled and supported for directory - // buckets. - // - // CopySource is a required field - CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"` - - // Copies the object if its entity tag (ETag) matches the specified tag. - // - // If both the x-amz-copy-source-if-match and x-amz-copy-source-if-unmodified-since - // headers are present in the request and evaluate as follows, Amazon S3 returns - // 200 OK and copies the data: - // - // * x-amz-copy-source-if-match condition evaluates to true - // - // * x-amz-copy-source-if-unmodified-since condition evaluates to false - CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"` - - // Copies the object if it has been modified since the specified time. - // - // If both the x-amz-copy-source-if-none-match and x-amz-copy-source-if-modified-since - // headers are present in the request and evaluate as follows, Amazon S3 returns - // the 412 Precondition Failed response code: - // - // * x-amz-copy-source-if-none-match condition evaluates to false - // - // * x-amz-copy-source-if-modified-since condition evaluates to true - CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp"` - - // Copies the object if its entity tag (ETag) is different than the specified - // ETag. - // - // If both the x-amz-copy-source-if-none-match and x-amz-copy-source-if-modified-since - // headers are present in the request and evaluate as follows, Amazon S3 returns - // the 412 Precondition Failed response code: - // - // * x-amz-copy-source-if-none-match condition evaluates to false - // - // * x-amz-copy-source-if-modified-since condition evaluates to true - CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"` - - // Copies the object if it hasn't been modified since the specified time. - // - // If both the x-amz-copy-source-if-match and x-amz-copy-source-if-unmodified-since - // headers are present in the request and evaluate as follows, Amazon S3 returns - // 200 OK and copies the data: - // - // * x-amz-copy-source-if-match condition evaluates to true - // - // * x-amz-copy-source-if-unmodified-since condition evaluates to false - CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp"` - - // Specifies the algorithm to use when decrypting the source object (for example, - // AES256). - // - // If the source object for the copy is stored in Amazon S3 using SSE-C, you - // must provide the necessary encryption information in your request so that - // Amazon S3 can decrypt the object for copying. - // - // This functionality is not supported when the source object is in a directory - // bucket. - CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"` - - // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt - // the source object. The encryption key provided in this header must be the - // same one that was used when the source object was created. - // - // If the source object for the copy is stored in Amazon S3 using SSE-C, you - // must provide the necessary encryption information in your request so that - // Amazon S3 can decrypt the object for copying. - // - // This functionality is not supported when the source object is in a directory - // bucket. - // - // CopySourceSSECustomerKey is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by CopyObjectInput's - // String and GoString methods. - CopySourceSSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string" sensitive:"true"` - - // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. - // Amazon S3 uses this header for a message integrity check to ensure that the - // encryption key was transmitted without error. - // - // If the source object for the copy is stored in Amazon S3 using SSE-C, you - // must provide the necessary encryption information in your request so that - // Amazon S3 can decrypt the object for copying. - // - // This functionality is not supported when the source object is in a directory - // bucket. - CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"` - - // The account ID of the expected destination bucket owner. If the account ID - // that you provide does not match the actual owner of the destination bucket, - // the request fails with the HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // The account ID of the expected source bucket owner. If the account ID that - // you provide does not match the actual owner of the source bucket, the request - // fails with the HTTP status code 403 Forbidden (access denied). - ExpectedSourceBucketOwner *string `location:"header" locationName:"x-amz-source-expected-bucket-owner" type:"string"` - - // The date and time at which the object is no longer cacheable. - Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"` - - // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object. - // - // * This functionality is not supported for directory buckets. - // - // * This functionality is not supported for Amazon S3 on Outposts. - GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"` - - // Allows grantee to read the object data and its metadata. - // - // * This functionality is not supported for directory buckets. - // - // * This functionality is not supported for Amazon S3 on Outposts. - GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"` - - // Allows grantee to read the object ACL. - // - // * This functionality is not supported for directory buckets. - // - // * This functionality is not supported for Amazon S3 on Outposts. - GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"` - - // Allows grantee to write the ACL for the applicable object. - // - // * This functionality is not supported for directory buckets. - // - // * This functionality is not supported for Amazon S3 on Outposts. - GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"` - - // The key of the destination object. - // - // Key is a required field - Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - - // A map of metadata to store with the object in S3. - Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"` - - // Specifies whether the metadata is copied from the source object or replaced - // with metadata that's provided in the request. When copying an object, you - // can preserve all metadata (the default) or specify new metadata. If this - // header isn’t specified, COPY is the default behavior. - // - // General purpose bucket - For general purpose buckets, when you grant permissions, - // you can use the s3:x-amz-metadata-directive condition key to enforce certain - // metadata behavior when objects are uploaded. For more information, see Amazon - // S3 condition key examples (https://docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html) - // in the Amazon S3 User Guide. - // - // x-amz-website-redirect-location is unique to each object and is not copied - // when using the x-amz-metadata-directive header. To copy the value, you must - // specify x-amz-website-redirect-location in the request header. - MetadataDirective *string `location:"header" locationName:"x-amz-metadata-directive" type:"string" enum:"MetadataDirective"` - - // Specifies whether you want to apply a legal hold to the object copy. - // - // This functionality is not supported for directory buckets. - ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"` - - // The Object Lock mode that you want to apply to the object copy. - // - // This functionality is not supported for directory buckets. - ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"` - - // The date and time when you want the Object Lock of the object copy to expire. - // - // This functionality is not supported for directory buckets. - ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"` - - // Confirms that the requester knows that they will be charged for the request. - // Bucket owners need not specify this parameter in their requests. If either - // the source or destination S3 bucket has Requester Pays enabled, the requester - // will pay for corresponding charges to copy the object. For information about - // downloading objects from Requester Pays buckets, see Downloading Objects - // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` - - // Specifies the algorithm to use when encrypting the object (for example, AES256). - // - // When you perform a CopyObject operation, if you want to use a different type - // of encryption setting for the target object, you can specify appropriate - // encryption-related headers to encrypt the target object with an Amazon S3 - // managed key, a KMS key, or a customer-provided key. If the encryption setting - // in your request is different from the default encryption configuration of - // the destination bucket, the encryption setting in your request takes precedence. - // - // This functionality is not supported when the destination bucket is a directory - // bucket. - SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` - - // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting - // data. This value is used to store the object and then it is discarded. Amazon - // S3 does not store the encryption key. The key must be appropriate for use - // with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm - // header. - // - // This functionality is not supported when the destination bucket is a directory - // bucket. - // - // SSECustomerKey is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by CopyObjectInput's - // String and GoString methods. - SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"` - - // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. - // Amazon S3 uses this header for a message integrity check to ensure that the - // encryption key was transmitted without error. - // - // This functionality is not supported when the destination bucket is a directory - // bucket. - SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` - - // Specifies the Amazon Web Services KMS Encryption Context to use for object - // encryption. The value of this header is a base64-encoded UTF-8 string holding - // JSON with the encryption context key-value pairs. This value must be explicitly - // added to specify encryption context for CopyObject requests. - // - // This functionality is not supported when the destination bucket is a directory - // bucket. - // - // SSEKMSEncryptionContext is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by CopyObjectInput's - // String and GoString methods. - SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"` - - // Specifies the KMS ID (Key ID, Key ARN, or Key Alias) to use for object encryption. - // All GET and PUT requests for an object protected by KMS will fail if they're - // not made via SSL or using SigV4. For information about configuring any of - // the officially supported Amazon Web Services SDKs and Amazon Web Services - // CLI, see Specifying the Signature Version in Request Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version) - // in the Amazon S3 User Guide. - // - // This functionality is not supported when the destination bucket is a directory - // bucket. - // - // SSEKMSKeyId is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by CopyObjectInput's - // String and GoString methods. - SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` - - // The server-side encryption algorithm used when storing this object in Amazon - // S3 (for example, AES256, aws:kms, aws:kms:dsse). Unrecognized or unsupported - // values won’t write a destination object and will receive a 400 Bad Request - // response. - // - // Amazon S3 automatically encrypts all new objects that are copied to an S3 - // bucket. When copying an object, if you don't specify encryption information - // in your copy request, the encryption setting of the target object is set - // to the default encryption configuration of the destination bucket. By default, - // all buckets have a base level of encryption configuration that uses server-side - // encryption with Amazon S3 managed keys (SSE-S3). If the destination bucket - // has a default encryption configuration that uses server-side encryption with - // Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption - // with Amazon Web Services KMS keys (DSSE-KMS), or server-side encryption with - // customer-provided encryption keys (SSE-C), Amazon S3 uses the corresponding - // KMS key, or a customer-provided key to encrypt the target object copy. - // - // When you perform a CopyObject operation, if you want to use a different type - // of encryption setting for the target object, you can specify appropriate - // encryption-related headers to encrypt the target object with an Amazon S3 - // managed key, a KMS key, or a customer-provided key. If the encryption setting - // in your request is different from the default encryption configuration of - // the destination bucket, the encryption setting in your request takes precedence. - // - // With server-side encryption, Amazon S3 encrypts your data as it writes your - // data to disks in its data centers and decrypts the data when you access it. - // For more information about server-side encryption, see Using Server-Side - // Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html) - // in the Amazon S3 User Guide. - // - // For directory buckets, only server-side encryption with Amazon S3 managed - // keys (SSE-S3) (AES256) is supported. - ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"` - - // If the x-amz-storage-class header is not used, the copied object will be - // stored in the STANDARD Storage Class by default. The STANDARD storage class - // provides high durability and high availability. Depending on performance - // needs, you can specify a different Storage Class. - // - // * Directory buckets - For directory buckets, only the S3 Express One Zone - // storage class is supported to store newly created objects. Unsupported - // storage class values won't write a destination object and will respond - // with the HTTP status code 400 Bad Request. - // - // * Amazon S3 on Outposts - S3 on Outposts only uses the OUTPOSTS Storage - // Class. - // - // You can use the CopyObject action to change the storage class of an object - // that is already stored in Amazon S3 by using the x-amz-storage-class header. - // For more information, see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html) - // in the Amazon S3 User Guide. - // - // Before using an object as a source object for the copy operation, you must - // restore a copy of it if it meets any of the following conditions: - // - // * The storage class of the source object is GLACIER or DEEP_ARCHIVE. - // - // * The storage class of the source object is INTELLIGENT_TIERING and it's - // S3 Intelligent-Tiering access tier (https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering-overview.html#intel-tiering-tier-definition) - // is Archive Access or Deep Archive Access. - // - // For more information, see RestoreObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html) - // and Copying Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html) - // in the Amazon S3 User Guide. - StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"` - - // The tag-set for the object copy in the destination bucket. This value must - // be used in conjunction with the x-amz-tagging-directive if you choose REPLACE - // for the x-amz-tagging-directive. If you choose COPY for the x-amz-tagging-directive, - // you don't need to set the x-amz-tagging header, because the tag-set will - // be copied from the source object directly. The tag-set must be encoded as - // URL Query parameters. - // - // The default value is the empty value. - // - // Directory buckets - For directory buckets in a CopyObject operation, only - // the empty tag-set is supported. Any requests that attempt to write non-empty - // tags into directory buckets will receive a 501 Not Implemented status code. - // When the destination bucket is a directory bucket, you will receive a 501 - // Not Implemented response in any of the following situations: - // - // * When you attempt to COPY the tag-set from an S3 source object that has - // non-empty tags. - // - // * When you attempt to REPLACE the tag-set of a source object and set a - // non-empty value to x-amz-tagging. - // - // * When you don't set the x-amz-tagging-directive header and the source - // object has non-empty tags. This is because the default value of x-amz-tagging-directive - // is COPY. - // - // Because only the empty tag-set is supported for directory buckets in a CopyObject - // operation, the following situations are allowed: - // - // * When you attempt to COPY the tag-set from a directory bucket source - // object that has no tags to a general purpose bucket. It copies an empty - // tag-set to the destination object. - // - // * When you attempt to REPLACE the tag-set of a directory bucket source - // object and set the x-amz-tagging value of the directory bucket destination - // object to empty. - // - // * When you attempt to REPLACE the tag-set of a general purpose bucket - // source object that has non-empty tags and set the x-amz-tagging value - // of the directory bucket destination object to empty. - // - // * When you attempt to REPLACE the tag-set of a directory bucket source - // object and don't set the x-amz-tagging value of the directory bucket destination - // object. This is because the default value of x-amz-tagging is the empty - // value. - Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"` - - // Specifies whether the object tag-set is copied from the source object or - // replaced with the tag-set that's provided in the request. - // - // The default value is COPY. - // - // Directory buckets - For directory buckets in a CopyObject operation, only - // the empty tag-set is supported. Any requests that attempt to write non-empty - // tags into directory buckets will receive a 501 Not Implemented status code. - // When the destination bucket is a directory bucket, you will receive a 501 - // Not Implemented response in any of the following situations: - // - // * When you attempt to COPY the tag-set from an S3 source object that has - // non-empty tags. - // - // * When you attempt to REPLACE the tag-set of a source object and set a - // non-empty value to x-amz-tagging. - // - // * When you don't set the x-amz-tagging-directive header and the source - // object has non-empty tags. This is because the default value of x-amz-tagging-directive - // is COPY. - // - // Because only the empty tag-set is supported for directory buckets in a CopyObject - // operation, the following situations are allowed: - // - // * When you attempt to COPY the tag-set from a directory bucket source - // object that has no tags to a general purpose bucket. It copies an empty - // tag-set to the destination object. - // - // * When you attempt to REPLACE the tag-set of a directory bucket source - // object and set the x-amz-tagging value of the directory bucket destination - // object to empty. - // - // * When you attempt to REPLACE the tag-set of a general purpose bucket - // source object that has non-empty tags and set the x-amz-tagging value - // of the directory bucket destination object to empty. - // - // * When you attempt to REPLACE the tag-set of a directory bucket source - // object and don't set the x-amz-tagging value of the directory bucket destination - // object. This is because the default value of x-amz-tagging is the empty - // value. - TaggingDirective *string `location:"header" locationName:"x-amz-tagging-directive" type:"string" enum:"TaggingDirective"` - - // If the destination bucket is configured as a website, redirects requests - // for this object copy to another object in the same bucket or to an external - // URL. Amazon S3 stores the value of this header in the object metadata. This - // value is unique to each object and is not copied when using the x-amz-metadata-directive - // header. Instead, you may opt to provide this header in combination with the - // x-amz-metadata-directive header. - // - // This functionality is not supported for directory buckets. - WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" 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 CopyObjectInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CopyObjectInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CopyObjectInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CopyObjectInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.CopySource == nil { - invalidParams.Add(request.NewErrParamRequired("CopySource")) - } - 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 -} - -// SetACL sets the ACL field's value. -func (s *CopyObjectInput) SetACL(v string) *CopyObjectInput { - s.ACL = &v - return s -} - -// SetBucket sets the Bucket field's value. -func (s *CopyObjectInput) SetBucket(v string) *CopyObjectInput { - s.Bucket = &v - return s -} - -func (s *CopyObjectInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetBucketKeyEnabled sets the BucketKeyEnabled field's value. -func (s *CopyObjectInput) SetBucketKeyEnabled(v bool) *CopyObjectInput { - s.BucketKeyEnabled = &v - return s -} - -// SetCacheControl sets the CacheControl field's value. -func (s *CopyObjectInput) SetCacheControl(v string) *CopyObjectInput { - s.CacheControl = &v - return s -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *CopyObjectInput) SetChecksumAlgorithm(v string) *CopyObjectInput { - s.ChecksumAlgorithm = &v - return s -} - -// SetContentDisposition sets the ContentDisposition field's value. -func (s *CopyObjectInput) SetContentDisposition(v string) *CopyObjectInput { - s.ContentDisposition = &v - return s -} - -// SetContentEncoding sets the ContentEncoding field's value. -func (s *CopyObjectInput) SetContentEncoding(v string) *CopyObjectInput { - s.ContentEncoding = &v - return s -} - -// SetContentLanguage sets the ContentLanguage field's value. -func (s *CopyObjectInput) SetContentLanguage(v string) *CopyObjectInput { - s.ContentLanguage = &v - return s -} - -// SetContentType sets the ContentType field's value. -func (s *CopyObjectInput) SetContentType(v string) *CopyObjectInput { - s.ContentType = &v - return s -} - -// SetCopySource sets the CopySource field's value. -func (s *CopyObjectInput) SetCopySource(v string) *CopyObjectInput { - s.CopySource = &v - return s -} - -// SetCopySourceIfMatch sets the CopySourceIfMatch field's value. -func (s *CopyObjectInput) SetCopySourceIfMatch(v string) *CopyObjectInput { - s.CopySourceIfMatch = &v - return s -} - -// SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field's value. -func (s *CopyObjectInput) SetCopySourceIfModifiedSince(v time.Time) *CopyObjectInput { - s.CopySourceIfModifiedSince = &v - return s -} - -// SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field's value. -func (s *CopyObjectInput) SetCopySourceIfNoneMatch(v string) *CopyObjectInput { - s.CopySourceIfNoneMatch = &v - return s -} - -// SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field's value. -func (s *CopyObjectInput) SetCopySourceIfUnmodifiedSince(v time.Time) *CopyObjectInput { - s.CopySourceIfUnmodifiedSince = &v - return s -} - -// SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field's value. -func (s *CopyObjectInput) SetCopySourceSSECustomerAlgorithm(v string) *CopyObjectInput { - s.CopySourceSSECustomerAlgorithm = &v - return s -} - -// SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field's value. -func (s *CopyObjectInput) SetCopySourceSSECustomerKey(v string) *CopyObjectInput { - s.CopySourceSSECustomerKey = &v - return s -} - -func (s *CopyObjectInput) getCopySourceSSECustomerKey() (v string) { - if s.CopySourceSSECustomerKey == nil { - return v - } - return *s.CopySourceSSECustomerKey -} - -// SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value. -func (s *CopyObjectInput) SetCopySourceSSECustomerKeyMD5(v string) *CopyObjectInput { - s.CopySourceSSECustomerKeyMD5 = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *CopyObjectInput) SetExpectedBucketOwner(v string) *CopyObjectInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetExpectedSourceBucketOwner sets the ExpectedSourceBucketOwner field's value. -func (s *CopyObjectInput) SetExpectedSourceBucketOwner(v string) *CopyObjectInput { - s.ExpectedSourceBucketOwner = &v - return s -} - -// SetExpires sets the Expires field's value. -func (s *CopyObjectInput) SetExpires(v time.Time) *CopyObjectInput { - s.Expires = &v - return s -} - -// SetGrantFullControl sets the GrantFullControl field's value. -func (s *CopyObjectInput) SetGrantFullControl(v string) *CopyObjectInput { - s.GrantFullControl = &v - return s -} - -// SetGrantRead sets the GrantRead field's value. -func (s *CopyObjectInput) SetGrantRead(v string) *CopyObjectInput { - s.GrantRead = &v - return s -} - -// SetGrantReadACP sets the GrantReadACP field's value. -func (s *CopyObjectInput) SetGrantReadACP(v string) *CopyObjectInput { - s.GrantReadACP = &v - return s -} - -// SetGrantWriteACP sets the GrantWriteACP field's value. -func (s *CopyObjectInput) SetGrantWriteACP(v string) *CopyObjectInput { - s.GrantWriteACP = &v - return s -} - -// SetKey sets the Key field's value. -func (s *CopyObjectInput) SetKey(v string) *CopyObjectInput { - s.Key = &v - return s -} - -// SetMetadata sets the Metadata field's value. -func (s *CopyObjectInput) SetMetadata(v map[string]*string) *CopyObjectInput { - s.Metadata = v - return s -} - -// SetMetadataDirective sets the MetadataDirective field's value. -func (s *CopyObjectInput) SetMetadataDirective(v string) *CopyObjectInput { - s.MetadataDirective = &v - return s -} - -// SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value. -func (s *CopyObjectInput) SetObjectLockLegalHoldStatus(v string) *CopyObjectInput { - s.ObjectLockLegalHoldStatus = &v - return s -} - -// SetObjectLockMode sets the ObjectLockMode field's value. -func (s *CopyObjectInput) SetObjectLockMode(v string) *CopyObjectInput { - s.ObjectLockMode = &v - return s -} - -// SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value. -func (s *CopyObjectInput) SetObjectLockRetainUntilDate(v time.Time) *CopyObjectInput { - s.ObjectLockRetainUntilDate = &v - return s -} - -// SetRequestPayer sets the RequestPayer field's value. -func (s *CopyObjectInput) SetRequestPayer(v string) *CopyObjectInput { - s.RequestPayer = &v - return s -} - -// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. -func (s *CopyObjectInput) SetSSECustomerAlgorithm(v string) *CopyObjectInput { - s.SSECustomerAlgorithm = &v - return s -} - -// SetSSECustomerKey sets the SSECustomerKey field's value. -func (s *CopyObjectInput) SetSSECustomerKey(v string) *CopyObjectInput { - s.SSECustomerKey = &v - return s -} - -func (s *CopyObjectInput) getSSECustomerKey() (v string) { - if s.SSECustomerKey == nil { - return v - } - return *s.SSECustomerKey -} - -// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. -func (s *CopyObjectInput) SetSSECustomerKeyMD5(v string) *CopyObjectInput { - s.SSECustomerKeyMD5 = &v - return s -} - -// SetSSEKMSEncryptionContext sets the SSEKMSEncryptionContext field's value. -func (s *CopyObjectInput) SetSSEKMSEncryptionContext(v string) *CopyObjectInput { - s.SSEKMSEncryptionContext = &v - return s -} - -// SetSSEKMSKeyId sets the SSEKMSKeyId field's value. -func (s *CopyObjectInput) SetSSEKMSKeyId(v string) *CopyObjectInput { - s.SSEKMSKeyId = &v - return s -} - -// SetServerSideEncryption sets the ServerSideEncryption field's value. -func (s *CopyObjectInput) SetServerSideEncryption(v string) *CopyObjectInput { - s.ServerSideEncryption = &v - return s -} - -// SetStorageClass sets the StorageClass field's value. -func (s *CopyObjectInput) SetStorageClass(v string) *CopyObjectInput { - s.StorageClass = &v - return s -} - -// SetTagging sets the Tagging field's value. -func (s *CopyObjectInput) SetTagging(v string) *CopyObjectInput { - s.Tagging = &v - return s -} - -// SetTaggingDirective sets the TaggingDirective field's value. -func (s *CopyObjectInput) SetTaggingDirective(v string) *CopyObjectInput { - s.TaggingDirective = &v - return s -} - -// SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value. -func (s *CopyObjectInput) SetWebsiteRedirectLocation(v string) *CopyObjectInput { - s.WebsiteRedirectLocation = &v - return s -} - -func (s *CopyObjectInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *CopyObjectInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s CopyObjectInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type CopyObjectOutput struct { - _ struct{} `type:"structure" payload:"CopyObjectResult"` - - // Indicates whether the copied object uses an S3 Bucket Key for server-side - // encryption with Key Management Service (KMS) keys (SSE-KMS). - // - // This functionality is not supported for directory buckets. - BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"` - - // Container for all response elements. - CopyObjectResult *CopyObjectResult `type:"structure"` - - // Version ID of the source object that was copied. - // - // This functionality is not supported when the source object is in a directory - // bucket. - CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"` - - // If the object expiration is configured, the response includes this header. - // - // This functionality is not supported for directory buckets. - Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"` - - // If present, indicates that the requester was successfully charged for the - // request. - // - // This functionality is not supported for directory buckets. - RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` - - // If server-side encryption with a customer-provided encryption key was requested, - // the response will include this header to confirm the encryption algorithm - // that's used. - // - // This functionality is not supported for directory buckets. - SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` - - // If server-side encryption with a customer-provided encryption key was requested, - // the response will include this header to provide the round-trip message integrity - // verification of the customer-provided encryption key. - // - // This functionality is not supported for directory buckets. - SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` - - // If present, indicates the Amazon Web Services KMS Encryption Context to use - // for object encryption. The value of this header is a base64-encoded UTF-8 - // string holding JSON with the encryption context key-value pairs. - // - // This functionality is not supported for directory buckets. - // - // SSEKMSEncryptionContext is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by CopyObjectOutput's - // String and GoString methods. - SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"` - - // If present, indicates the ID of the Key Management Service (KMS) symmetric - // encryption customer managed key that was used for the object. - // - // This functionality is not supported for directory buckets. - // - // SSEKMSKeyId is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by CopyObjectOutput's - // String and GoString methods. - SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` - - // The server-side encryption algorithm used when you store this object in Amazon - // S3 (for example, AES256, aws:kms, aws:kms:dsse). - // - // For directory buckets, only server-side encryption with Amazon S3 managed - // keys (SSE-S3) (AES256) is supported. - ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"` - - // Version ID of the newly created copy. - // - // This functionality is not supported for directory buckets. - VersionId *string `location:"header" locationName:"x-amz-version-id" 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 CopyObjectOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CopyObjectOutput) GoString() string { - return s.String() -} - -// SetBucketKeyEnabled sets the BucketKeyEnabled field's value. -func (s *CopyObjectOutput) SetBucketKeyEnabled(v bool) *CopyObjectOutput { - s.BucketKeyEnabled = &v - return s -} - -// SetCopyObjectResult sets the CopyObjectResult field's value. -func (s *CopyObjectOutput) SetCopyObjectResult(v *CopyObjectResult) *CopyObjectOutput { - s.CopyObjectResult = v - return s -} - -// SetCopySourceVersionId sets the CopySourceVersionId field's value. -func (s *CopyObjectOutput) SetCopySourceVersionId(v string) *CopyObjectOutput { - s.CopySourceVersionId = &v - return s -} - -// SetExpiration sets the Expiration field's value. -func (s *CopyObjectOutput) SetExpiration(v string) *CopyObjectOutput { - s.Expiration = &v - return s -} - -// SetRequestCharged sets the RequestCharged field's value. -func (s *CopyObjectOutput) SetRequestCharged(v string) *CopyObjectOutput { - s.RequestCharged = &v - return s -} - -// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. -func (s *CopyObjectOutput) SetSSECustomerAlgorithm(v string) *CopyObjectOutput { - s.SSECustomerAlgorithm = &v - return s -} - -// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. -func (s *CopyObjectOutput) SetSSECustomerKeyMD5(v string) *CopyObjectOutput { - s.SSECustomerKeyMD5 = &v - return s -} - -// SetSSEKMSEncryptionContext sets the SSEKMSEncryptionContext field's value. -func (s *CopyObjectOutput) SetSSEKMSEncryptionContext(v string) *CopyObjectOutput { - s.SSEKMSEncryptionContext = &v - return s -} - -// SetSSEKMSKeyId sets the SSEKMSKeyId field's value. -func (s *CopyObjectOutput) SetSSEKMSKeyId(v string) *CopyObjectOutput { - s.SSEKMSKeyId = &v - return s -} - -// SetServerSideEncryption sets the ServerSideEncryption field's value. -func (s *CopyObjectOutput) SetServerSideEncryption(v string) *CopyObjectOutput { - s.ServerSideEncryption = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *CopyObjectOutput) SetVersionId(v string) *CopyObjectOutput { - s.VersionId = &v - return s -} - -// Container for all response elements. -type CopyObjectResult struct { - _ struct{} `type:"structure"` - - // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be - // present if it was uploaded with the object. For more information, see Checking - // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - ChecksumCRC32 *string `type:"string"` - - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only - // be present if it was uploaded with the object. For more information, see - // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - ChecksumCRC32C *string `type:"string"` - - // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be - // present if it was uploaded with the object. For more information, see Checking - // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - ChecksumSHA1 *string `type:"string"` - - // The base64-encoded, 256-bit SHA-256 digest of the object. This will only - // be present if it was uploaded with the object. For more information, see - // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - ChecksumSHA256 *string `type:"string"` - - // Returns the ETag of the new object. The ETag reflects only changes to the - // contents of an object, not its metadata. - ETag *string `type:"string"` - - // Creation date of the object. - LastModified *time.Time `type:"timestamp"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CopyObjectResult) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CopyObjectResult) GoString() string { - return s.String() -} - -// SetChecksumCRC32 sets the ChecksumCRC32 field's value. -func (s *CopyObjectResult) SetChecksumCRC32(v string) *CopyObjectResult { - s.ChecksumCRC32 = &v - return s -} - -// SetChecksumCRC32C sets the ChecksumCRC32C field's value. -func (s *CopyObjectResult) SetChecksumCRC32C(v string) *CopyObjectResult { - s.ChecksumCRC32C = &v - return s -} - -// SetChecksumSHA1 sets the ChecksumSHA1 field's value. -func (s *CopyObjectResult) SetChecksumSHA1(v string) *CopyObjectResult { - s.ChecksumSHA1 = &v - return s -} - -// SetChecksumSHA256 sets the ChecksumSHA256 field's value. -func (s *CopyObjectResult) SetChecksumSHA256(v string) *CopyObjectResult { - s.ChecksumSHA256 = &v - return s -} - -// SetETag sets the ETag field's value. -func (s *CopyObjectResult) SetETag(v string) *CopyObjectResult { - s.ETag = &v - return s -} - -// SetLastModified sets the LastModified field's value. -func (s *CopyObjectResult) SetLastModified(v time.Time) *CopyObjectResult { - s.LastModified = &v - return s -} - -// Container for all response elements. -type CopyPartResult struct { - _ struct{} `type:"structure"` - - // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be - // present if it was uploaded with the object. When you use an API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumCRC32 *string `type:"string"` - - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only - // be present if it was uploaded with the object. When you use an API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumCRC32C *string `type:"string"` - - // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be - // present if it was uploaded with the object. When you use the API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumSHA1 *string `type:"string"` - - // The base64-encoded, 256-bit SHA-256 digest of the object. This will only - // be present if it was uploaded with the object. When you use an API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumSHA256 *string `type:"string"` - - // Entity tag of the object. - ETag *string `type:"string"` - - // Date and time at which the object was uploaded. - LastModified *time.Time `type:"timestamp"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CopyPartResult) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CopyPartResult) GoString() string { - return s.String() -} - -// SetChecksumCRC32 sets the ChecksumCRC32 field's value. -func (s *CopyPartResult) SetChecksumCRC32(v string) *CopyPartResult { - s.ChecksumCRC32 = &v - return s -} - -// SetChecksumCRC32C sets the ChecksumCRC32C field's value. -func (s *CopyPartResult) SetChecksumCRC32C(v string) *CopyPartResult { - s.ChecksumCRC32C = &v - return s -} - -// SetChecksumSHA1 sets the ChecksumSHA1 field's value. -func (s *CopyPartResult) SetChecksumSHA1(v string) *CopyPartResult { - s.ChecksumSHA1 = &v - return s -} - -// SetChecksumSHA256 sets the ChecksumSHA256 field's value. -func (s *CopyPartResult) SetChecksumSHA256(v string) *CopyPartResult { - s.ChecksumSHA256 = &v - return s -} - -// SetETag sets the ETag field's value. -func (s *CopyPartResult) SetETag(v string) *CopyPartResult { - s.ETag = &v - return s -} - -// SetLastModified sets the LastModified field's value. -func (s *CopyPartResult) SetLastModified(v time.Time) *CopyPartResult { - s.LastModified = &v - return s -} - -// The configuration information for the bucket. -type CreateBucketConfiguration struct { - _ struct{} `type:"structure"` - - // Specifies the information about the bucket that will be created. - // - // This functionality is only supported by directory buckets. - Bucket *BucketInfo `type:"structure"` - - // Specifies the location where the bucket will be created. - // - // For directory buckets, the location type is Availability Zone. - // - // This functionality is only supported by directory buckets. - Location *LocationInfo `type:"structure"` - - // Specifies the Region where the bucket will be created. You might choose a - // Region to optimize latency, minimize costs, or address regulatory requirements. - // For example, if you reside in Europe, you will probably find it advantageous - // to create buckets in the Europe (Ireland) Region. For more information, see - // Accessing a bucket (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro) - // in the Amazon S3 User Guide. - // - // If you don't specify a Region, the bucket is created in the US East (N. Virginia) - // Region (us-east-1) by default. - // - // This functionality is not supported for directory buckets. - LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateBucketConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateBucketConfiguration) GoString() string { - return s.String() -} - -// SetBucket sets the Bucket field's value. -func (s *CreateBucketConfiguration) SetBucket(v *BucketInfo) *CreateBucketConfiguration { - s.Bucket = v - return s -} - -func (s *CreateBucketConfiguration) getBucket() (v *BucketInfo) { - return s.Bucket -} - -// SetLocation sets the Location field's value. -func (s *CreateBucketConfiguration) SetLocation(v *LocationInfo) *CreateBucketConfiguration { - s.Location = v - return s -} - -// SetLocationConstraint sets the LocationConstraint field's value. -func (s *CreateBucketConfiguration) SetLocationConstraint(v string) *CreateBucketConfiguration { - s.LocationConstraint = &v - return s -} - -type CreateBucketInput struct { - _ struct{} `locationName:"CreateBucketRequest" type:"structure" payload:"CreateBucketConfiguration"` - - // The canned ACL to apply to the bucket. - // - // This functionality is not supported for directory buckets. - ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"` - - // The name of the bucket to create. - // - // General purpose buckets - For information about bucket naming restrictions, - // see Bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html) - // in the Amazon S3 User Guide. - // - // Directory buckets - When you use this operation with a directory bucket, - // you must use path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name - // . Virtual-hosted-style requests aren't supported. Directory bucket names - // must be unique in the chosen Availability Zone. Bucket names must also follow - // the format bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). - // For information about bucket naming restrictions, see Directory bucket naming - // rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html) - // in the Amazon S3 User Guide - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The configuration information for the bucket. - CreateBucketConfiguration *CreateBucketConfiguration `locationName:"CreateBucketConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` - - // Allows grantee the read, write, read ACP, and write ACP permissions on the - // bucket. - // - // This functionality is not supported for directory buckets. - GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"` - - // Allows grantee to list the objects in the bucket. - // - // This functionality is not supported for directory buckets. - GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"` - - // Allows grantee to read the bucket ACL. - // - // This functionality is not supported for directory buckets. - GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"` - - // Allows grantee to create new objects in the bucket. - // - // For the bucket and object owners of existing objects, also allows deletions - // and overwrites of those objects. - // - // This functionality is not supported for directory buckets. - GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"` - - // Allows grantee to write the ACL for the applicable bucket. - // - // This functionality is not supported for directory buckets. - GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"` - - // Specifies whether you want S3 Object Lock to be enabled for the new bucket. - // - // This functionality is not supported for directory buckets. - ObjectLockEnabledForBucket *bool `location:"header" locationName:"x-amz-bucket-object-lock-enabled" type:"boolean"` - - // The container element for object ownership for a bucket's ownership controls. - // - // BucketOwnerPreferred - Objects uploaded to the bucket change ownership to - // the bucket owner if the objects are uploaded with the bucket-owner-full-control - // canned ACL. - // - // ObjectWriter - The uploading account will own the object if the object is - // uploaded with the bucket-owner-full-control canned ACL. - // - // BucketOwnerEnforced - Access control lists (ACLs) are disabled and no longer - // affect permissions. The bucket owner automatically owns and has full control - // over every object in the bucket. The bucket only accepts PUT requests that - // don't specify an ACL or specify bucket owner full control ACLs (such as the - // predefined bucket-owner-full-control canned ACL or a custom ACL in XML format - // that grants the same permissions). - // - // By default, ObjectOwnership is set to BucketOwnerEnforced and ACLs are disabled. - // We recommend keeping ACLs disabled, except in uncommon use cases where you - // must control access for each object individually. For more information about - // S3 Object Ownership, see Controlling ownership of objects and disabling ACLs - // for your bucket (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. Directory buckets - // use the bucket owner enforced setting for S3 Object Ownership. - ObjectOwnership *string `location:"header" locationName:"x-amz-object-ownership" type:"string" enum:"ObjectOwnership"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateBucketInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateBucketInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateBucketInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateBucketInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetACL sets the ACL field's value. -func (s *CreateBucketInput) SetACL(v string) *CreateBucketInput { - s.ACL = &v - return s -} - -// SetBucket sets the Bucket field's value. -func (s *CreateBucketInput) SetBucket(v string) *CreateBucketInput { - s.Bucket = &v - return s -} - -func (s *CreateBucketInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetCreateBucketConfiguration sets the CreateBucketConfiguration field's value. -func (s *CreateBucketInput) SetCreateBucketConfiguration(v *CreateBucketConfiguration) *CreateBucketInput { - s.CreateBucketConfiguration = v - return s -} - -// SetGrantFullControl sets the GrantFullControl field's value. -func (s *CreateBucketInput) SetGrantFullControl(v string) *CreateBucketInput { - s.GrantFullControl = &v - return s -} - -// SetGrantRead sets the GrantRead field's value. -func (s *CreateBucketInput) SetGrantRead(v string) *CreateBucketInput { - s.GrantRead = &v - return s -} - -// SetGrantReadACP sets the GrantReadACP field's value. -func (s *CreateBucketInput) SetGrantReadACP(v string) *CreateBucketInput { - s.GrantReadACP = &v - return s -} - -// SetGrantWrite sets the GrantWrite field's value. -func (s *CreateBucketInput) SetGrantWrite(v string) *CreateBucketInput { - s.GrantWrite = &v - return s -} - -// SetGrantWriteACP sets the GrantWriteACP field's value. -func (s *CreateBucketInput) SetGrantWriteACP(v string) *CreateBucketInput { - s.GrantWriteACP = &v - return s -} - -// SetObjectLockEnabledForBucket sets the ObjectLockEnabledForBucket field's value. -func (s *CreateBucketInput) SetObjectLockEnabledForBucket(v bool) *CreateBucketInput { - s.ObjectLockEnabledForBucket = &v - return s -} - -// SetObjectOwnership sets the ObjectOwnership field's value. -func (s *CreateBucketInput) SetObjectOwnership(v string) *CreateBucketInput { - s.ObjectOwnership = &v - return s -} - -type CreateBucketOutput struct { - _ struct{} `type:"structure"` - - // A forward slash followed by the name of the bucket. - Location *string `location:"header" locationName:"Location" 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 CreateBucketOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateBucketOutput) GoString() string { - return s.String() -} - -// SetLocation sets the Location field's value. -func (s *CreateBucketOutput) SetLocation(v string) *CreateBucketOutput { - s.Location = &v - return s -} - -type CreateMultipartUploadInput struct { - _ struct{} `locationName:"CreateMultipartUploadRequest" type:"structure"` - - // The canned ACL to apply to the object. Amazon S3 supports a set of predefined - // ACLs, known as canned ACLs. Each canned ACL has a predefined set of grantees - // and permissions. For more information, see Canned ACL (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL) - // in the Amazon S3 User Guide. - // - // By default, all objects are private. Only the owner has full access control. - // When uploading an object, you can grant access permissions to individual - // Amazon Web Services accounts or to predefined groups defined by Amazon S3. - // These permissions are then added to the access control list (ACL) on the - // new object. For more information, see Using ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html). - // One way to grant the permissions using the request headers is to specify - // a canned ACL with the x-amz-acl request header. - // - // * This functionality is not supported for directory buckets. - // - // * This functionality is not supported for Amazon S3 on Outposts. - ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"` - - // The name of the bucket where the multipart upload is initiated and where - // the object is uploaded. - // - // Directory buckets - When you use this operation with a directory bucket, - // you must use virtual-hosted-style requests in the format Bucket_name.s3express-az_id.region.amazonaws.com. - // Path-style requests are not supported. Directory bucket names must be unique - // in the chosen Availability Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 - // (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about - // bucket naming restrictions, see Directory bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html) - // in the Amazon S3 User Guide. - // - // Access points - When you use this action with an access point, you must provide - // the alias of the access point in place of the bucket name or specify the - // access point ARN. When using the access point ARN, you must direct requests - // to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this action with an access point through the Amazon Web Services - // SDKs, you provide the access point ARN in place of the bucket name. For more - // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. - // - // Access points and Object Lambda access points are not supported by directory - // buckets. - // - // S3 on Outposts - When you use this action with Amazon S3 on Outposts, you - // must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname - // takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. - // When you use this action with S3 on Outposts through the Amazon Web Services - // SDKs, you provide the Outposts access point ARN in place of the bucket name. - // For more information about S3 on Outposts ARNs, see What is S3 on Outposts? - // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) - // in the Amazon S3 User Guide. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption - // with server-side encryption using Key Management Service (KMS) keys (SSE-KMS). - // Setting this header to true causes Amazon S3 to use an S3 Bucket Key for - // object encryption with SSE-KMS. - // - // Specifying this header with an object action doesn’t affect bucket-level - // settings for S3 Bucket Key. - // - // This functionality is not supported for directory buckets. - BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"` - - // Specifies caching behavior along the request/reply chain. - CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"` - - // Indicates the algorithm that you want Amazon S3 to use to create the checksum - // for the object. For more information, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - ChecksumAlgorithm *string `location:"header" locationName:"x-amz-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"` - - // Specifies presentational information for the object. - ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"` - - // Specifies what content encodings have been applied to the object and thus - // what decoding mechanisms must be applied to obtain the media-type referenced - // by the Content-Type header field. - // - // For directory buckets, only the aws-chunked value is supported in this header - // field. - ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"` - - // The language that the content is in. - ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"` - - // A standard MIME type describing the format of the object data. - ContentType *string `location:"header" locationName:"Content-Type" type:"string"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // The date and time at which the object is no longer cacheable. - Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"` - - // Specify access permissions explicitly to give the grantee READ, READ_ACP, - // and WRITE_ACP permissions on the object. - // - // By default, all objects are private. Only the owner has full access control. - // When uploading an object, you can use this header to explicitly grant access - // permissions to specific Amazon Web Services accounts or groups. This header - // maps to specific permissions that Amazon S3 supports in an ACL. For more - // information, see Access Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html) - // in the Amazon S3 User Guide. - // - // You specify each grantee as a type=value pair, where the type is one of the - // following: - // - // * id – if the value specified is the canonical user ID of an Amazon - // Web Services account - // - // * uri – if you are granting permissions to a predefined group - // - // * emailAddress – if the value specified is the email address of an Amazon - // Web Services account Using email addresses to specify a grantee is only - // supported in the following Amazon Web Services Regions: US East (N. Virginia) - // US West (N. California) US West (Oregon) Asia Pacific (Singapore) Asia - // Pacific (Sydney) Asia Pacific (Tokyo) Europe (Ireland) South America (São - // Paulo) For a list of all the Amazon S3 supported Regions and endpoints, - // see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) - // in the Amazon Web Services General Reference. - // - // For example, the following x-amz-grant-read header grants the Amazon Web - // Services accounts identified by account IDs permissions to read object data - // and its metadata: - // - // x-amz-grant-read: id="11112222333", id="444455556666" - // - // * This functionality is not supported for directory buckets. - // - // * This functionality is not supported for Amazon S3 on Outposts. - GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"` - - // Specify access permissions explicitly to allow grantee to read the object - // data and its metadata. - // - // By default, all objects are private. Only the owner has full access control. - // When uploading an object, you can use this header to explicitly grant access - // permissions to specific Amazon Web Services accounts or groups. This header - // maps to specific permissions that Amazon S3 supports in an ACL. For more - // information, see Access Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html) - // in the Amazon S3 User Guide. - // - // You specify each grantee as a type=value pair, where the type is one of the - // following: - // - // * id – if the value specified is the canonical user ID of an Amazon - // Web Services account - // - // * uri – if you are granting permissions to a predefined group - // - // * emailAddress – if the value specified is the email address of an Amazon - // Web Services account Using email addresses to specify a grantee is only - // supported in the following Amazon Web Services Regions: US East (N. Virginia) - // US West (N. California) US West (Oregon) Asia Pacific (Singapore) Asia - // Pacific (Sydney) Asia Pacific (Tokyo) Europe (Ireland) South America (São - // Paulo) For a list of all the Amazon S3 supported Regions and endpoints, - // see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) - // in the Amazon Web Services General Reference. - // - // For example, the following x-amz-grant-read header grants the Amazon Web - // Services accounts identified by account IDs permissions to read object data - // and its metadata: - // - // x-amz-grant-read: id="11112222333", id="444455556666" - // - // * This functionality is not supported for directory buckets. - // - // * This functionality is not supported for Amazon S3 on Outposts. - GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"` - - // Specify access permissions explicitly to allows grantee to read the object - // ACL. - // - // By default, all objects are private. Only the owner has full access control. - // When uploading an object, you can use this header to explicitly grant access - // permissions to specific Amazon Web Services accounts or groups. This header - // maps to specific permissions that Amazon S3 supports in an ACL. For more - // information, see Access Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html) - // in the Amazon S3 User Guide. - // - // You specify each grantee as a type=value pair, where the type is one of the - // following: - // - // * id – if the value specified is the canonical user ID of an Amazon - // Web Services account - // - // * uri – if you are granting permissions to a predefined group - // - // * emailAddress – if the value specified is the email address of an Amazon - // Web Services account Using email addresses to specify a grantee is only - // supported in the following Amazon Web Services Regions: US East (N. Virginia) - // US West (N. California) US West (Oregon) Asia Pacific (Singapore) Asia - // Pacific (Sydney) Asia Pacific (Tokyo) Europe (Ireland) South America (São - // Paulo) For a list of all the Amazon S3 supported Regions and endpoints, - // see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) - // in the Amazon Web Services General Reference. - // - // For example, the following x-amz-grant-read header grants the Amazon Web - // Services accounts identified by account IDs permissions to read object data - // and its metadata: - // - // x-amz-grant-read: id="11112222333", id="444455556666" - // - // * This functionality is not supported for directory buckets. - // - // * This functionality is not supported for Amazon S3 on Outposts. - GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"` - - // Specify access permissions explicitly to allows grantee to allow grantee - // to write the ACL for the applicable object. - // - // By default, all objects are private. Only the owner has full access control. - // When uploading an object, you can use this header to explicitly grant access - // permissions to specific Amazon Web Services accounts or groups. This header - // maps to specific permissions that Amazon S3 supports in an ACL. For more - // information, see Access Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html) - // in the Amazon S3 User Guide. - // - // You specify each grantee as a type=value pair, where the type is one of the - // following: - // - // * id – if the value specified is the canonical user ID of an Amazon - // Web Services account - // - // * uri – if you are granting permissions to a predefined group - // - // * emailAddress – if the value specified is the email address of an Amazon - // Web Services account Using email addresses to specify a grantee is only - // supported in the following Amazon Web Services Regions: US East (N. Virginia) - // US West (N. California) US West (Oregon) Asia Pacific (Singapore) Asia - // Pacific (Sydney) Asia Pacific (Tokyo) Europe (Ireland) South America (São - // Paulo) For a list of all the Amazon S3 supported Regions and endpoints, - // see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) - // in the Amazon Web Services General Reference. - // - // For example, the following x-amz-grant-read header grants the Amazon Web - // Services accounts identified by account IDs permissions to read object data - // and its metadata: - // - // x-amz-grant-read: id="11112222333", id="444455556666" - // - // * This functionality is not supported for directory buckets. - // - // * This functionality is not supported for Amazon S3 on Outposts. - GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"` - - // Object key for which the multipart upload is to be initiated. - // - // Key is a required field - Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - - // A map of metadata to store with the object in S3. - Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"` - - // Specifies whether you want to apply a legal hold to the uploaded object. - // - // This functionality is not supported for directory buckets. - ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"` - - // Specifies the Object Lock mode that you want to apply to the uploaded object. - // - // This functionality is not supported for directory buckets. - ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"` - - // Specifies the date and time when you want the Object Lock to expire. - // - // This functionality is not supported for directory buckets. - ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"` - - // Confirms that the requester knows that they will be charged for the request. - // Bucket owners need not specify this parameter in their requests. If either - // the source or destination S3 bucket has Requester Pays enabled, the requester - // will pay for corresponding charges to copy the object. For information about - // downloading objects from Requester Pays buckets, see Downloading Objects - // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` - - // Specifies the algorithm to use when encrypting the object (for example, AES256). - // - // This functionality is not supported for directory buckets. - SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` - - // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting - // data. This value is used to store the object and then it is discarded; Amazon - // S3 does not store the encryption key. The key must be appropriate for use - // with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm - // header. - // - // This functionality is not supported for directory buckets. - // - // SSECustomerKey is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by CreateMultipartUploadInput's - // String and GoString methods. - SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"` - - // Specifies the 128-bit MD5 digest of the customer-provided encryption key - // according to RFC 1321. Amazon S3 uses this header for a message integrity - // check to ensure that the encryption key was transmitted without error. - // - // This functionality is not supported for directory buckets. - SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` - - // Specifies the Amazon Web Services KMS Encryption Context to use for object - // encryption. The value of this header is a base64-encoded UTF-8 string holding - // JSON with the encryption context key-value pairs. - // - // This functionality is not supported for directory buckets. - // - // SSEKMSEncryptionContext is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by CreateMultipartUploadInput's - // String and GoString methods. - SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"` - - // Specifies the ID (Key ID, Key ARN, or Key Alias) of the symmetric encryption - // customer managed key to use for object encryption. - // - // This functionality is not supported for directory buckets. - // - // SSEKMSKeyId is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by CreateMultipartUploadInput's - // String and GoString methods. - SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` - - // The server-side encryption algorithm used when you store this object in Amazon - // S3 (for example, AES256, aws:kms). - // - // For directory buckets, only server-side encryption with Amazon S3 managed - // keys (SSE-S3) (AES256) is supported. - ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"` - - // By default, Amazon S3 uses the STANDARD Storage Class to store newly created - // objects. The STANDARD storage class provides high durability and high availability. - // Depending on performance needs, you can specify a different Storage Class. - // For more information, see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html) - // in the Amazon S3 User Guide. - // - // * For directory buckets, only the S3 Express One Zone storage class is - // supported to store newly created objects. - // - // * Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. - StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"` - - // The tag-set for the object. The tag-set must be encoded as URL Query parameters. - // - // This functionality is not supported for directory buckets. - Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"` - - // If the bucket is configured as a website, redirects requests for this object - // to another object in the same bucket or to an external URL. Amazon S3 stores - // the value of this header in the object metadata. - // - // This functionality is not supported for directory buckets. - WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" 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 CreateMultipartUploadInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateMultipartUploadInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateMultipartUploadInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateMultipartUploadInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - 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 -} - -// SetACL sets the ACL field's value. -func (s *CreateMultipartUploadInput) SetACL(v string) *CreateMultipartUploadInput { - s.ACL = &v - return s -} - -// SetBucket sets the Bucket field's value. -func (s *CreateMultipartUploadInput) SetBucket(v string) *CreateMultipartUploadInput { - s.Bucket = &v - return s -} - -func (s *CreateMultipartUploadInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetBucketKeyEnabled sets the BucketKeyEnabled field's value. -func (s *CreateMultipartUploadInput) SetBucketKeyEnabled(v bool) *CreateMultipartUploadInput { - s.BucketKeyEnabled = &v - return s -} - -// SetCacheControl sets the CacheControl field's value. -func (s *CreateMultipartUploadInput) SetCacheControl(v string) *CreateMultipartUploadInput { - s.CacheControl = &v - return s -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *CreateMultipartUploadInput) SetChecksumAlgorithm(v string) *CreateMultipartUploadInput { - s.ChecksumAlgorithm = &v - return s -} - -// SetContentDisposition sets the ContentDisposition field's value. -func (s *CreateMultipartUploadInput) SetContentDisposition(v string) *CreateMultipartUploadInput { - s.ContentDisposition = &v - return s -} - -// SetContentEncoding sets the ContentEncoding field's value. -func (s *CreateMultipartUploadInput) SetContentEncoding(v string) *CreateMultipartUploadInput { - s.ContentEncoding = &v - return s -} - -// SetContentLanguage sets the ContentLanguage field's value. -func (s *CreateMultipartUploadInput) SetContentLanguage(v string) *CreateMultipartUploadInput { - s.ContentLanguage = &v - return s -} - -// SetContentType sets the ContentType field's value. -func (s *CreateMultipartUploadInput) SetContentType(v string) *CreateMultipartUploadInput { - s.ContentType = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *CreateMultipartUploadInput) SetExpectedBucketOwner(v string) *CreateMultipartUploadInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetExpires sets the Expires field's value. -func (s *CreateMultipartUploadInput) SetExpires(v time.Time) *CreateMultipartUploadInput { - s.Expires = &v - return s -} - -// SetGrantFullControl sets the GrantFullControl field's value. -func (s *CreateMultipartUploadInput) SetGrantFullControl(v string) *CreateMultipartUploadInput { - s.GrantFullControl = &v - return s -} - -// SetGrantRead sets the GrantRead field's value. -func (s *CreateMultipartUploadInput) SetGrantRead(v string) *CreateMultipartUploadInput { - s.GrantRead = &v - return s -} - -// SetGrantReadACP sets the GrantReadACP field's value. -func (s *CreateMultipartUploadInput) SetGrantReadACP(v string) *CreateMultipartUploadInput { - s.GrantReadACP = &v - return s -} - -// SetGrantWriteACP sets the GrantWriteACP field's value. -func (s *CreateMultipartUploadInput) SetGrantWriteACP(v string) *CreateMultipartUploadInput { - s.GrantWriteACP = &v - return s -} - -// SetKey sets the Key field's value. -func (s *CreateMultipartUploadInput) SetKey(v string) *CreateMultipartUploadInput { - s.Key = &v - return s -} - -// SetMetadata sets the Metadata field's value. -func (s *CreateMultipartUploadInput) SetMetadata(v map[string]*string) *CreateMultipartUploadInput { - s.Metadata = v - return s -} - -// SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value. -func (s *CreateMultipartUploadInput) SetObjectLockLegalHoldStatus(v string) *CreateMultipartUploadInput { - s.ObjectLockLegalHoldStatus = &v - return s -} - -// SetObjectLockMode sets the ObjectLockMode field's value. -func (s *CreateMultipartUploadInput) SetObjectLockMode(v string) *CreateMultipartUploadInput { - s.ObjectLockMode = &v - return s -} - -// SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value. -func (s *CreateMultipartUploadInput) SetObjectLockRetainUntilDate(v time.Time) *CreateMultipartUploadInput { - s.ObjectLockRetainUntilDate = &v - return s -} - -// SetRequestPayer sets the RequestPayer field's value. -func (s *CreateMultipartUploadInput) SetRequestPayer(v string) *CreateMultipartUploadInput { - s.RequestPayer = &v - return s -} - -// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. -func (s *CreateMultipartUploadInput) SetSSECustomerAlgorithm(v string) *CreateMultipartUploadInput { - s.SSECustomerAlgorithm = &v - return s -} - -// SetSSECustomerKey sets the SSECustomerKey field's value. -func (s *CreateMultipartUploadInput) SetSSECustomerKey(v string) *CreateMultipartUploadInput { - s.SSECustomerKey = &v - return s -} - -func (s *CreateMultipartUploadInput) getSSECustomerKey() (v string) { - if s.SSECustomerKey == nil { - return v - } - return *s.SSECustomerKey -} - -// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. -func (s *CreateMultipartUploadInput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadInput { - s.SSECustomerKeyMD5 = &v - return s -} - -// SetSSEKMSEncryptionContext sets the SSEKMSEncryptionContext field's value. -func (s *CreateMultipartUploadInput) SetSSEKMSEncryptionContext(v string) *CreateMultipartUploadInput { - s.SSEKMSEncryptionContext = &v - return s -} - -// SetSSEKMSKeyId sets the SSEKMSKeyId field's value. -func (s *CreateMultipartUploadInput) SetSSEKMSKeyId(v string) *CreateMultipartUploadInput { - s.SSEKMSKeyId = &v - return s -} - -// SetServerSideEncryption sets the ServerSideEncryption field's value. -func (s *CreateMultipartUploadInput) SetServerSideEncryption(v string) *CreateMultipartUploadInput { - s.ServerSideEncryption = &v - return s -} - -// SetStorageClass sets the StorageClass field's value. -func (s *CreateMultipartUploadInput) SetStorageClass(v string) *CreateMultipartUploadInput { - s.StorageClass = &v - return s -} - -// SetTagging sets the Tagging field's value. -func (s *CreateMultipartUploadInput) SetTagging(v string) *CreateMultipartUploadInput { - s.Tagging = &v - return s -} - -// SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value. -func (s *CreateMultipartUploadInput) SetWebsiteRedirectLocation(v string) *CreateMultipartUploadInput { - s.WebsiteRedirectLocation = &v - return s -} - -func (s *CreateMultipartUploadInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *CreateMultipartUploadInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s CreateMultipartUploadInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type CreateMultipartUploadOutput struct { - _ struct{} `type:"structure"` - - // If the bucket has a lifecycle rule configured with an action to abort incomplete - // multipart uploads and the prefix in the lifecycle rule matches the object - // name in the request, the response includes this header. The header indicates - // when the initiated multipart upload becomes eligible for an abort operation. - // For more information, see Aborting Incomplete Multipart Uploads Using a Bucket - // Lifecycle Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config) - // in the Amazon S3 User Guide. - // - // The response also includes the x-amz-abort-rule-id header that provides the - // ID of the lifecycle configuration rule that defines the abort action. - // - // This functionality is not supported for directory buckets. - AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp"` - - // This header is returned along with the x-amz-abort-date header. It identifies - // the applicable lifecycle configuration rule that defines the action to abort - // incomplete multipart uploads. - // - // This functionality is not supported for directory buckets. - AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"` - - // The name of the bucket to which the multipart upload was initiated. Does - // not return the access point ARN or access point alias if used. - // - // Access points are not supported by directory buckets. - Bucket *string `locationName:"Bucket" type:"string"` - - // Indicates whether the multipart upload uses an S3 Bucket Key for server-side - // encryption with Key Management Service (KMS) keys (SSE-KMS). - // - // This functionality is not supported for directory buckets. - BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"` - - // The algorithm that was used to create a checksum of the object. - ChecksumAlgorithm *string `location:"header" locationName:"x-amz-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"` - - // Object key for which the multipart upload was initiated. - Key *string `min:"1" type:"string"` - - // If present, indicates that the requester was successfully charged for the - // request. - // - // This functionality is not supported for directory buckets. - RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` - - // If server-side encryption with a customer-provided encryption key was requested, - // the response will include this header to confirm the encryption algorithm - // that's used. - // - // This functionality is not supported for directory buckets. - SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` - - // If server-side encryption with a customer-provided encryption key was requested, - // the response will include this header to provide the round-trip message integrity - // verification of the customer-provided encryption key. - // - // This functionality is not supported for directory buckets. - SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` - - // If present, indicates the Amazon Web Services KMS Encryption Context to use - // for object encryption. The value of this header is a base64-encoded UTF-8 - // string holding JSON with the encryption context key-value pairs. - // - // This functionality is not supported for directory buckets. - // - // SSEKMSEncryptionContext is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by CreateMultipartUploadOutput's - // String and GoString methods. - SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"` - - // If present, indicates the ID of the Key Management Service (KMS) symmetric - // encryption customer managed key that was used for the object. - // - // This functionality is not supported for directory buckets. - // - // SSEKMSKeyId is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by CreateMultipartUploadOutput's - // String and GoString methods. - SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` - - // The server-side encryption algorithm used when you store this object in Amazon - // S3 (for example, AES256, aws:kms). - // - // For directory buckets, only server-side encryption with Amazon S3 managed - // keys (SSE-S3) (AES256) is supported. - ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"` - - // ID for the initiated multipart upload. - UploadId *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 CreateMultipartUploadOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateMultipartUploadOutput) GoString() string { - return s.String() -} - -// SetAbortDate sets the AbortDate field's value. -func (s *CreateMultipartUploadOutput) SetAbortDate(v time.Time) *CreateMultipartUploadOutput { - s.AbortDate = &v - return s -} - -// SetAbortRuleId sets the AbortRuleId field's value. -func (s *CreateMultipartUploadOutput) SetAbortRuleId(v string) *CreateMultipartUploadOutput { - s.AbortRuleId = &v - return s -} - -// SetBucket sets the Bucket field's value. -func (s *CreateMultipartUploadOutput) SetBucket(v string) *CreateMultipartUploadOutput { - s.Bucket = &v - return s -} - -func (s *CreateMultipartUploadOutput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetBucketKeyEnabled sets the BucketKeyEnabled field's value. -func (s *CreateMultipartUploadOutput) SetBucketKeyEnabled(v bool) *CreateMultipartUploadOutput { - s.BucketKeyEnabled = &v - return s -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *CreateMultipartUploadOutput) SetChecksumAlgorithm(v string) *CreateMultipartUploadOutput { - s.ChecksumAlgorithm = &v - return s -} - -// SetKey sets the Key field's value. -func (s *CreateMultipartUploadOutput) SetKey(v string) *CreateMultipartUploadOutput { - s.Key = &v - return s -} - -// SetRequestCharged sets the RequestCharged field's value. -func (s *CreateMultipartUploadOutput) SetRequestCharged(v string) *CreateMultipartUploadOutput { - s.RequestCharged = &v - return s -} - -// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. -func (s *CreateMultipartUploadOutput) SetSSECustomerAlgorithm(v string) *CreateMultipartUploadOutput { - s.SSECustomerAlgorithm = &v - return s -} - -// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. -func (s *CreateMultipartUploadOutput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadOutput { - s.SSECustomerKeyMD5 = &v - return s -} - -// SetSSEKMSEncryptionContext sets the SSEKMSEncryptionContext field's value. -func (s *CreateMultipartUploadOutput) SetSSEKMSEncryptionContext(v string) *CreateMultipartUploadOutput { - s.SSEKMSEncryptionContext = &v - return s -} - -// SetSSEKMSKeyId sets the SSEKMSKeyId field's value. -func (s *CreateMultipartUploadOutput) SetSSEKMSKeyId(v string) *CreateMultipartUploadOutput { - s.SSEKMSKeyId = &v - return s -} - -// SetServerSideEncryption sets the ServerSideEncryption field's value. -func (s *CreateMultipartUploadOutput) SetServerSideEncryption(v string) *CreateMultipartUploadOutput { - s.ServerSideEncryption = &v - return s -} - -// SetUploadId sets the UploadId field's value. -func (s *CreateMultipartUploadOutput) SetUploadId(v string) *CreateMultipartUploadOutput { - s.UploadId = &v - return s -} - -type CreateSessionInput struct { - _ struct{} `locationName:"CreateSessionRequest" type:"structure"` - - // The name of the bucket that you create a session for. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // Specifies the mode of the session that will be created, either ReadWrite - // or ReadOnly. By default, a ReadWrite session is created. A ReadWrite session - // is capable of executing all the Zonal endpoint APIs on a directory bucket. - // A ReadOnly session is constrained to execute the following Zonal endpoint - // APIs: GetObject, HeadObject, ListObjectsV2, GetObjectAttributes, ListParts, - // and ListMultipartUploads. - SessionMode *string `location:"header" locationName:"x-amz-create-session-mode" type:"string" enum:"SessionMode"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateSessionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateSessionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateSessionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateSessionInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *CreateSessionInput) SetBucket(v string) *CreateSessionInput { - s.Bucket = &v - return s -} - -func (s *CreateSessionInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetSessionMode sets the SessionMode field's value. -func (s *CreateSessionInput) SetSessionMode(v string) *CreateSessionInput { - s.SessionMode = &v - return s -} - -func (s *CreateSessionInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *CreateSessionInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s CreateSessionInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type CreateSessionOutput struct { - _ struct{} `type:"structure"` - - // The established temporary security credentials for the created session. - // - // Credentials is a required field - Credentials *SessionCredentials `locationName:"Credentials" type:"structure" 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 CreateSessionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateSessionOutput) GoString() string { - return s.String() -} - -// SetCredentials sets the Credentials field's value. -func (s *CreateSessionOutput) SetCredentials(v *SessionCredentials) *CreateSessionOutput { - s.Credentials = v - return s -} - -// The container element for specifying the default Object Lock retention settings -// for new objects placed in the specified bucket. -// -// - The DefaultRetention settings require both a mode and a period. -// -// - The DefaultRetention period can be either Days or Years but you must -// select one. You cannot specify Days and Years at the same time. -type DefaultRetention struct { - _ struct{} `type:"structure"` - - // The number of days that you want to specify for the default retention period. - // Must be used with Mode. - Days *int64 `type:"integer"` - - // The default Object Lock retention mode you want to apply to new objects placed - // in the specified bucket. Must be used with either Days or Years. - Mode *string `type:"string" enum:"ObjectLockRetentionMode"` - - // The number of years that you want to specify for the default retention period. - // Must be used with Mode. - Years *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 DefaultRetention) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DefaultRetention) GoString() string { - return s.String() -} - -// SetDays sets the Days field's value. -func (s *DefaultRetention) SetDays(v int64) *DefaultRetention { - s.Days = &v - return s -} - -// SetMode sets the Mode field's value. -func (s *DefaultRetention) SetMode(v string) *DefaultRetention { - s.Mode = &v - return s -} - -// SetYears sets the Years field's value. -func (s *DefaultRetention) SetYears(v int64) *DefaultRetention { - s.Years = &v - return s -} - -// Container for the objects to delete. -type Delete struct { - _ struct{} `type:"structure"` - - // The object to delete. - // - // Directory buckets - For directory buckets, an object that's composed entirely - // of whitespace characters is not supported by the DeleteObjects API operation. - // The request will receive a 400 Bad Request error and none of the objects - // in the request will be deleted. - // - // Objects is a required field - Objects []*ObjectIdentifier `locationName:"Object" type:"list" flattened:"true" required:"true"` - - // Element to enable quiet mode for the request. When you add this element, - // you must set its value to true. - Quiet *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 Delete) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Delete) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Delete) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Delete"} - if s.Objects == nil { - invalidParams.Add(request.NewErrParamRequired("Objects")) - } - if s.Objects != nil { - for i, v := range s.Objects { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Objects", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetObjects sets the Objects field's value. -func (s *Delete) SetObjects(v []*ObjectIdentifier) *Delete { - s.Objects = v - return s -} - -// SetQuiet sets the Quiet field's value. -func (s *Delete) SetQuiet(v bool) *Delete { - s.Quiet = &v - return s -} - -type DeleteBucketAnalyticsConfigurationInput struct { - _ struct{} `locationName:"DeleteBucketAnalyticsConfigurationRequest" type:"structure"` - - // The name of the bucket from which an analytics configuration is deleted. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // The ID that identifies the analytics configuration. - // - // Id is a required field - Id *string `location:"querystring" locationName:"id" 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 DeleteBucketAnalyticsConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteBucketAnalyticsConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBucketAnalyticsConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBucketAnalyticsConfigurationInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *DeleteBucketAnalyticsConfigurationInput) SetBucket(v string) *DeleteBucketAnalyticsConfigurationInput { - s.Bucket = &v - return s -} - -func (s *DeleteBucketAnalyticsConfigurationInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *DeleteBucketAnalyticsConfigurationInput) SetExpectedBucketOwner(v string) *DeleteBucketAnalyticsConfigurationInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetId sets the Id field's value. -func (s *DeleteBucketAnalyticsConfigurationInput) SetId(v string) *DeleteBucketAnalyticsConfigurationInput { - s.Id = &v - return s -} - -func (s *DeleteBucketAnalyticsConfigurationInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *DeleteBucketAnalyticsConfigurationInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s DeleteBucketAnalyticsConfigurationInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type DeleteBucketAnalyticsConfigurationOutput 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 DeleteBucketAnalyticsConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteBucketAnalyticsConfigurationOutput) GoString() string { - return s.String() -} - -type DeleteBucketCorsInput struct { - _ struct{} `locationName:"DeleteBucketCorsRequest" type:"structure"` - - // Specifies the bucket whose cors configuration is being deleted. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 DeleteBucketCorsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteBucketCorsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBucketCorsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBucketCorsInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *DeleteBucketCorsInput) SetBucket(v string) *DeleteBucketCorsInput { - s.Bucket = &v - return s -} - -func (s *DeleteBucketCorsInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *DeleteBucketCorsInput) SetExpectedBucketOwner(v string) *DeleteBucketCorsInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *DeleteBucketCorsInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *DeleteBucketCorsInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s DeleteBucketCorsInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type DeleteBucketCorsOutput 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 DeleteBucketCorsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteBucketCorsOutput) GoString() string { - return s.String() -} - -type DeleteBucketEncryptionInput struct { - _ struct{} `locationName:"DeleteBucketEncryptionRequest" type:"structure"` - - // The name of the bucket containing the server-side encryption configuration - // to delete. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 DeleteBucketEncryptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteBucketEncryptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBucketEncryptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBucketEncryptionInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *DeleteBucketEncryptionInput) SetBucket(v string) *DeleteBucketEncryptionInput { - s.Bucket = &v - return s -} - -func (s *DeleteBucketEncryptionInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *DeleteBucketEncryptionInput) SetExpectedBucketOwner(v string) *DeleteBucketEncryptionInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *DeleteBucketEncryptionInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *DeleteBucketEncryptionInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s DeleteBucketEncryptionInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type DeleteBucketEncryptionOutput 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 DeleteBucketEncryptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteBucketEncryptionOutput) GoString() string { - return s.String() -} - -type DeleteBucketInput struct { - _ struct{} `locationName:"DeleteBucketRequest" type:"structure"` - - // Specifies the bucket being deleted. - // - // Directory buckets - When you use this operation with a directory bucket, - // you must use path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name - // . Virtual-hosted-style requests aren't supported. Directory bucket names - // must be unique in the chosen Availability Zone. Bucket names must also follow - // the format bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). - // For information about bucket naming restrictions, see Directory bucket naming - // rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html) - // in the Amazon S3 User Guide - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - // - // For directory buckets, this header is not supported in this API operation. - // If you specify this header, the request fails with the HTTP status code 501 - // Not Implemented. - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 DeleteBucketInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteBucketInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBucketInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBucketInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *DeleteBucketInput) SetBucket(v string) *DeleteBucketInput { - s.Bucket = &v - return s -} - -func (s *DeleteBucketInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *DeleteBucketInput) SetExpectedBucketOwner(v string) *DeleteBucketInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *DeleteBucketInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *DeleteBucketInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s DeleteBucketInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type DeleteBucketIntelligentTieringConfigurationInput struct { - _ struct{} `locationName:"DeleteBucketIntelligentTieringConfigurationRequest" type:"structure"` - - // The name of the Amazon S3 bucket whose configuration you want to modify or - // retrieve. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The ID used to identify the S3 Intelligent-Tiering configuration. - // - // Id is a required field - Id *string `location:"querystring" locationName:"id" 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 DeleteBucketIntelligentTieringConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteBucketIntelligentTieringConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBucketIntelligentTieringConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBucketIntelligentTieringConfigurationInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *DeleteBucketIntelligentTieringConfigurationInput) SetBucket(v string) *DeleteBucketIntelligentTieringConfigurationInput { - s.Bucket = &v - return s -} - -func (s *DeleteBucketIntelligentTieringConfigurationInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetId sets the Id field's value. -func (s *DeleteBucketIntelligentTieringConfigurationInput) SetId(v string) *DeleteBucketIntelligentTieringConfigurationInput { - s.Id = &v - return s -} - -func (s *DeleteBucketIntelligentTieringConfigurationInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *DeleteBucketIntelligentTieringConfigurationInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s DeleteBucketIntelligentTieringConfigurationInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type DeleteBucketIntelligentTieringConfigurationOutput 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 DeleteBucketIntelligentTieringConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteBucketIntelligentTieringConfigurationOutput) GoString() string { - return s.String() -} - -type DeleteBucketInventoryConfigurationInput struct { - _ struct{} `locationName:"DeleteBucketInventoryConfigurationRequest" type:"structure"` - - // The name of the bucket containing the inventory configuration to delete. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // The ID used to identify the inventory configuration. - // - // Id is a required field - Id *string `location:"querystring" locationName:"id" 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 DeleteBucketInventoryConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteBucketInventoryConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBucketInventoryConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBucketInventoryConfigurationInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *DeleteBucketInventoryConfigurationInput) SetBucket(v string) *DeleteBucketInventoryConfigurationInput { - s.Bucket = &v - return s -} - -func (s *DeleteBucketInventoryConfigurationInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *DeleteBucketInventoryConfigurationInput) SetExpectedBucketOwner(v string) *DeleteBucketInventoryConfigurationInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetId sets the Id field's value. -func (s *DeleteBucketInventoryConfigurationInput) SetId(v string) *DeleteBucketInventoryConfigurationInput { - s.Id = &v - return s -} - -func (s *DeleteBucketInventoryConfigurationInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *DeleteBucketInventoryConfigurationInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s DeleteBucketInventoryConfigurationInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type DeleteBucketInventoryConfigurationOutput 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 DeleteBucketInventoryConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteBucketInventoryConfigurationOutput) GoString() string { - return s.String() -} - -type DeleteBucketLifecycleInput struct { - _ struct{} `locationName:"DeleteBucketLifecycleRequest" type:"structure"` - - // The bucket name of the lifecycle to delete. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 DeleteBucketLifecycleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteBucketLifecycleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBucketLifecycleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBucketLifecycleInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *DeleteBucketLifecycleInput) SetBucket(v string) *DeleteBucketLifecycleInput { - s.Bucket = &v - return s -} - -func (s *DeleteBucketLifecycleInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *DeleteBucketLifecycleInput) SetExpectedBucketOwner(v string) *DeleteBucketLifecycleInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *DeleteBucketLifecycleInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *DeleteBucketLifecycleInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s DeleteBucketLifecycleInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type DeleteBucketLifecycleOutput 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 DeleteBucketLifecycleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteBucketLifecycleOutput) GoString() string { - return s.String() -} - -type DeleteBucketMetricsConfigurationInput struct { - _ struct{} `locationName:"DeleteBucketMetricsConfigurationRequest" type:"structure"` - - // The name of the bucket containing the metrics configuration to delete. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // The ID used to identify the metrics configuration. The ID has a 64 character - // limit and can only contain letters, numbers, periods, dashes, and underscores. - // - // Id is a required field - Id *string `location:"querystring" locationName:"id" 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 DeleteBucketMetricsConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteBucketMetricsConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBucketMetricsConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBucketMetricsConfigurationInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *DeleteBucketMetricsConfigurationInput) SetBucket(v string) *DeleteBucketMetricsConfigurationInput { - s.Bucket = &v - return s -} - -func (s *DeleteBucketMetricsConfigurationInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *DeleteBucketMetricsConfigurationInput) SetExpectedBucketOwner(v string) *DeleteBucketMetricsConfigurationInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetId sets the Id field's value. -func (s *DeleteBucketMetricsConfigurationInput) SetId(v string) *DeleteBucketMetricsConfigurationInput { - s.Id = &v - return s -} - -func (s *DeleteBucketMetricsConfigurationInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *DeleteBucketMetricsConfigurationInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s DeleteBucketMetricsConfigurationInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type DeleteBucketMetricsConfigurationOutput 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 DeleteBucketMetricsConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteBucketMetricsConfigurationOutput) GoString() string { - return s.String() -} - -type DeleteBucketOutput 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 DeleteBucketOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteBucketOutput) GoString() string { - return s.String() -} - -type DeleteBucketOwnershipControlsInput struct { - _ struct{} `locationName:"DeleteBucketOwnershipControlsRequest" type:"structure"` - - // The Amazon S3 bucket whose OwnershipControls you want to delete. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 DeleteBucketOwnershipControlsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteBucketOwnershipControlsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBucketOwnershipControlsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBucketOwnershipControlsInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *DeleteBucketOwnershipControlsInput) SetBucket(v string) *DeleteBucketOwnershipControlsInput { - s.Bucket = &v - return s -} - -func (s *DeleteBucketOwnershipControlsInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *DeleteBucketOwnershipControlsInput) SetExpectedBucketOwner(v string) *DeleteBucketOwnershipControlsInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *DeleteBucketOwnershipControlsInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *DeleteBucketOwnershipControlsInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s DeleteBucketOwnershipControlsInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type DeleteBucketOwnershipControlsOutput 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 DeleteBucketOwnershipControlsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteBucketOwnershipControlsOutput) GoString() string { - return s.String() -} - -type DeleteBucketPolicyInput struct { - _ struct{} `locationName:"DeleteBucketPolicyRequest" type:"structure"` - - // The bucket name. - // - // Directory buckets - When you use this operation with a directory bucket, - // you must use path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name - // . Virtual-hosted-style requests aren't supported. Directory bucket names - // must be unique in the chosen Availability Zone. Bucket names must also follow - // the format bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). - // For information about bucket naming restrictions, see Directory bucket naming - // rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html) - // in the Amazon S3 User Guide - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - // - // For directory buckets, this header is not supported in this API operation. - // If you specify this header, the request fails with the HTTP status code 501 - // Not Implemented. - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 DeleteBucketPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteBucketPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBucketPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBucketPolicyInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *DeleteBucketPolicyInput) SetBucket(v string) *DeleteBucketPolicyInput { - s.Bucket = &v - return s -} - -func (s *DeleteBucketPolicyInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *DeleteBucketPolicyInput) SetExpectedBucketOwner(v string) *DeleteBucketPolicyInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *DeleteBucketPolicyInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *DeleteBucketPolicyInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s DeleteBucketPolicyInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type DeleteBucketPolicyOutput 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 DeleteBucketPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteBucketPolicyOutput) GoString() string { - return s.String() -} - -type DeleteBucketReplicationInput struct { - _ struct{} `locationName:"DeleteBucketReplicationRequest" type:"structure"` - - // The bucket name. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 DeleteBucketReplicationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteBucketReplicationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBucketReplicationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBucketReplicationInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *DeleteBucketReplicationInput) SetBucket(v string) *DeleteBucketReplicationInput { - s.Bucket = &v - return s -} - -func (s *DeleteBucketReplicationInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *DeleteBucketReplicationInput) SetExpectedBucketOwner(v string) *DeleteBucketReplicationInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *DeleteBucketReplicationInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *DeleteBucketReplicationInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s DeleteBucketReplicationInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type DeleteBucketReplicationOutput 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 DeleteBucketReplicationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteBucketReplicationOutput) GoString() string { - return s.String() -} - -type DeleteBucketTaggingInput struct { - _ struct{} `locationName:"DeleteBucketTaggingRequest" type:"structure"` - - // The bucket that has the tag set to be removed. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 DeleteBucketTaggingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteBucketTaggingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBucketTaggingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBucketTaggingInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *DeleteBucketTaggingInput) SetBucket(v string) *DeleteBucketTaggingInput { - s.Bucket = &v - return s -} - -func (s *DeleteBucketTaggingInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *DeleteBucketTaggingInput) SetExpectedBucketOwner(v string) *DeleteBucketTaggingInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *DeleteBucketTaggingInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *DeleteBucketTaggingInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s DeleteBucketTaggingInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type DeleteBucketTaggingOutput 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 DeleteBucketTaggingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteBucketTaggingOutput) GoString() string { - return s.String() -} - -type DeleteBucketWebsiteInput struct { - _ struct{} `locationName:"DeleteBucketWebsiteRequest" type:"structure"` - - // The bucket name for which you want to remove the website configuration. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 DeleteBucketWebsiteInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteBucketWebsiteInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteBucketWebsiteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteBucketWebsiteInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *DeleteBucketWebsiteInput) SetBucket(v string) *DeleteBucketWebsiteInput { - s.Bucket = &v - return s -} - -func (s *DeleteBucketWebsiteInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *DeleteBucketWebsiteInput) SetExpectedBucketOwner(v string) *DeleteBucketWebsiteInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *DeleteBucketWebsiteInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *DeleteBucketWebsiteInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s DeleteBucketWebsiteInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type DeleteBucketWebsiteOutput 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 DeleteBucketWebsiteOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteBucketWebsiteOutput) GoString() string { - return s.String() -} - -// Information about the delete marker. -type DeleteMarkerEntry struct { - _ struct{} `type:"structure"` - - // Specifies whether the object is (true) or is not (false) the latest version - // of an object. - IsLatest *bool `type:"boolean"` - - // The object key. - Key *string `min:"1" type:"string"` - - // Date and time when the object was last modified. - LastModified *time.Time `type:"timestamp"` - - // The account that created the delete marker.> - Owner *Owner `type:"structure"` - - // Version ID of an object. - VersionId *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 DeleteMarkerEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteMarkerEntry) GoString() string { - return s.String() -} - -// SetIsLatest sets the IsLatest field's value. -func (s *DeleteMarkerEntry) SetIsLatest(v bool) *DeleteMarkerEntry { - s.IsLatest = &v - return s -} - -// SetKey sets the Key field's value. -func (s *DeleteMarkerEntry) SetKey(v string) *DeleteMarkerEntry { - s.Key = &v - return s -} - -// SetLastModified sets the LastModified field's value. -func (s *DeleteMarkerEntry) SetLastModified(v time.Time) *DeleteMarkerEntry { - s.LastModified = &v - return s -} - -// SetOwner sets the Owner field's value. -func (s *DeleteMarkerEntry) SetOwner(v *Owner) *DeleteMarkerEntry { - s.Owner = v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *DeleteMarkerEntry) SetVersionId(v string) *DeleteMarkerEntry { - s.VersionId = &v - return s -} - -// Specifies whether Amazon S3 replicates delete markers. If you specify a Filter -// in your replication configuration, you must also include a DeleteMarkerReplication -// element. If your Filter includes a Tag element, the DeleteMarkerReplication -// Status must be set to Disabled, because Amazon S3 does not support replicating -// delete markers for tag-based rules. For an example configuration, see Basic -// Rule Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-config-min-rule-config). -// -// For more information about delete marker replication, see Basic Rule Configuration -// (https://docs.aws.amazon.com/AmazonS3/latest/dev/delete-marker-replication.html). -// -// If you are using an earlier version of the replication configuration, Amazon -// S3 handles replication of delete markers differently. For more information, -// see Backward Compatibility (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-backward-compat-considerations). -type DeleteMarkerReplication struct { - _ struct{} `type:"structure"` - - // Indicates whether to replicate delete markers. - // - // Indicates whether to replicate delete markers. - Status *string `type:"string" enum:"DeleteMarkerReplicationStatus"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteMarkerReplication) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteMarkerReplication) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *DeleteMarkerReplication) SetStatus(v string) *DeleteMarkerReplication { - s.Status = &v - return s -} - -type DeleteObjectInput struct { - _ struct{} `locationName:"DeleteObjectRequest" type:"structure"` - - // The bucket name of the bucket containing the object. - // - // Directory buckets - When you use this operation with a directory bucket, - // you must use virtual-hosted-style requests in the format Bucket_name.s3express-az_id.region.amazonaws.com. - // Path-style requests are not supported. Directory bucket names must be unique - // in the chosen Availability Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 - // (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about - // bucket naming restrictions, see Directory bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html) - // in the Amazon S3 User Guide. - // - // Access points - When you use this action with an access point, you must provide - // the alias of the access point in place of the bucket name or specify the - // access point ARN. When using the access point ARN, you must direct requests - // to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this action with an access point through the Amazon Web Services - // SDKs, you provide the access point ARN in place of the bucket name. For more - // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. - // - // Access points and Object Lambda access points are not supported by directory - // buckets. - // - // S3 on Outposts - When you use this action with Amazon S3 on Outposts, you - // must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname - // takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. - // When you use this action with S3 on Outposts through the Amazon Web Services - // SDKs, you provide the Outposts access point ARN in place of the bucket name. - // For more information about S3 on Outposts ARNs, see What is S3 on Outposts? - // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) - // in the Amazon S3 User Guide. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // Indicates whether S3 Object Lock should bypass Governance-mode restrictions - // to process this operation. To use this header, you must have the s3:BypassGovernanceRetention - // permission. - // - // This functionality is not supported for directory buckets. - BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // Key name of the object to delete. - // - // Key is a required field - Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - - // The concatenation of the authentication device's serial number, a space, - // and the value that is displayed on your authentication device. Required to - // permanently delete a versioned object if versioning is configured with MFA - // delete enabled. - // - // This functionality is not supported for directory buckets. - MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"` - - // Confirms that the requester knows that they will be charged for the request. - // Bucket owners need not specify this parameter in their requests. If either - // the source or destination S3 bucket has Requester Pays enabled, the requester - // will pay for corresponding charges to copy the object. For information about - // downloading objects from Requester Pays buckets, see Downloading Objects - // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` - - // Version ID used to reference a specific version of the object. - // - // For directory buckets in this API operation, only the null value of the version - // ID is supported. - VersionId *string `location:"querystring" locationName:"versionId" 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 DeleteObjectInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteObjectInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteObjectInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteObjectInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - 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 -} - -// SetBucket sets the Bucket field's value. -func (s *DeleteObjectInput) SetBucket(v string) *DeleteObjectInput { - s.Bucket = &v - return s -} - -func (s *DeleteObjectInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetBypassGovernanceRetention sets the BypassGovernanceRetention field's value. -func (s *DeleteObjectInput) SetBypassGovernanceRetention(v bool) *DeleteObjectInput { - s.BypassGovernanceRetention = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *DeleteObjectInput) SetExpectedBucketOwner(v string) *DeleteObjectInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetKey sets the Key field's value. -func (s *DeleteObjectInput) SetKey(v string) *DeleteObjectInput { - s.Key = &v - return s -} - -// SetMFA sets the MFA field's value. -func (s *DeleteObjectInput) SetMFA(v string) *DeleteObjectInput { - s.MFA = &v - return s -} - -// SetRequestPayer sets the RequestPayer field's value. -func (s *DeleteObjectInput) SetRequestPayer(v string) *DeleteObjectInput { - s.RequestPayer = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *DeleteObjectInput) SetVersionId(v string) *DeleteObjectInput { - s.VersionId = &v - return s -} - -func (s *DeleteObjectInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *DeleteObjectInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s DeleteObjectInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type DeleteObjectOutput struct { - _ struct{} `type:"structure"` - - // Indicates whether the specified object version that was permanently deleted - // was (true) or was not (false) a delete marker before deletion. In a simple - // DELETE, this header indicates whether (true) or not (false) the current version - // of the object is a delete marker. - // - // This functionality is not supported for directory buckets. - DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"` - - // If present, indicates that the requester was successfully charged for the - // request. - // - // This functionality is not supported for directory buckets. - RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` - - // Returns the version ID of the delete marker created as a result of the DELETE - // operation. - // - // This functionality is not supported for directory buckets. - VersionId *string `location:"header" locationName:"x-amz-version-id" 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 DeleteObjectOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteObjectOutput) GoString() string { - return s.String() -} - -// SetDeleteMarker sets the DeleteMarker field's value. -func (s *DeleteObjectOutput) SetDeleteMarker(v bool) *DeleteObjectOutput { - s.DeleteMarker = &v - return s -} - -// SetRequestCharged sets the RequestCharged field's value. -func (s *DeleteObjectOutput) SetRequestCharged(v string) *DeleteObjectOutput { - s.RequestCharged = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *DeleteObjectOutput) SetVersionId(v string) *DeleteObjectOutput { - s.VersionId = &v - return s -} - -type DeleteObjectTaggingInput struct { - _ struct{} `locationName:"DeleteObjectTaggingRequest" type:"structure"` - - // The bucket name containing the objects from which to remove the tags. - // - // Access points - When you use this action with an access point, you must provide - // the alias of the access point in place of the bucket name or specify the - // access point ARN. When using the access point ARN, you must direct requests - // to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this action with an access point through the Amazon Web Services - // SDKs, you provide the access point ARN in place of the bucket name. For more - // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. - // - // S3 on Outposts - When you use this action with Amazon S3 on Outposts, you - // must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname - // takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. - // When you use this action with S3 on Outposts through the Amazon Web Services - // SDKs, you provide the Outposts access point ARN in place of the bucket name. - // For more information about S3 on Outposts ARNs, see What is S3 on Outposts? - // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) - // in the Amazon S3 User Guide. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // The key that identifies the object in the bucket from which to remove all - // tags. - // - // Key is a required field - Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - - // The versionId of the object that the tag-set will be removed from. - VersionId *string `location:"querystring" locationName:"versionId" 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 DeleteObjectTaggingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteObjectTaggingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteObjectTaggingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteObjectTaggingInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - 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 -} - -// SetBucket sets the Bucket field's value. -func (s *DeleteObjectTaggingInput) SetBucket(v string) *DeleteObjectTaggingInput { - s.Bucket = &v - return s -} - -func (s *DeleteObjectTaggingInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *DeleteObjectTaggingInput) SetExpectedBucketOwner(v string) *DeleteObjectTaggingInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetKey sets the Key field's value. -func (s *DeleteObjectTaggingInput) SetKey(v string) *DeleteObjectTaggingInput { - s.Key = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *DeleteObjectTaggingInput) SetVersionId(v string) *DeleteObjectTaggingInput { - s.VersionId = &v - return s -} - -func (s *DeleteObjectTaggingInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *DeleteObjectTaggingInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s DeleteObjectTaggingInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type DeleteObjectTaggingOutput struct { - _ struct{} `type:"structure"` - - // The versionId of the object the tag-set was removed from. - VersionId *string `location:"header" locationName:"x-amz-version-id" 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 DeleteObjectTaggingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteObjectTaggingOutput) GoString() string { - return s.String() -} - -// SetVersionId sets the VersionId field's value. -func (s *DeleteObjectTaggingOutput) SetVersionId(v string) *DeleteObjectTaggingOutput { - s.VersionId = &v - return s -} - -type DeleteObjectsInput struct { - _ struct{} `locationName:"DeleteObjectsRequest" type:"structure" payload:"Delete"` - - // The bucket name containing the objects to delete. - // - // Directory buckets - When you use this operation with a directory bucket, - // you must use virtual-hosted-style requests in the format Bucket_name.s3express-az_id.region.amazonaws.com. - // Path-style requests are not supported. Directory bucket names must be unique - // in the chosen Availability Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 - // (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about - // bucket naming restrictions, see Directory bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html) - // in the Amazon S3 User Guide. - // - // Access points - When you use this action with an access point, you must provide - // the alias of the access point in place of the bucket name or specify the - // access point ARN. When using the access point ARN, you must direct requests - // to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this action with an access point through the Amazon Web Services - // SDKs, you provide the access point ARN in place of the bucket name. For more - // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. - // - // Access points and Object Lambda access points are not supported by directory - // buckets. - // - // S3 on Outposts - When you use this action with Amazon S3 on Outposts, you - // must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname - // takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. - // When you use this action with S3 on Outposts through the Amazon Web Services - // SDKs, you provide the Outposts access point ARN in place of the bucket name. - // For more information about S3 on Outposts ARNs, see What is S3 on Outposts? - // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) - // in the Amazon S3 User Guide. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // Specifies whether you want to delete this object even if it has a Governance-type - // Object Lock in place. To use this header, you must have the s3:BypassGovernanceRetention - // permission. - // - // This functionality is not supported for directory buckets. - BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"` - - // Indicates the algorithm used to create the checksum for the object when you - // use the SDK. This header will not provide any additional functionality if - // you don't use the SDK. When you send this header, there must be a corresponding - // x-amz-checksum-algorithm or x-amz-trailer header sent. Otherwise, Amazon - // S3 fails the request with the HTTP status code 400 Bad Request. - // - // For the x-amz-checksum-algorithm header, replace algorithm with the supported - // algorithm from the following list: - // - // * CRC32 - // - // * CRC32C - // - // * SHA1 - // - // * SHA256 - // - // For more information, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - // - // If the individual checksum value you provide through x-amz-checksum-algorithm - // doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, - // Amazon S3 ignores any provided ChecksumAlgorithm parameter and uses the checksum - // algorithm that matches the provided value in x-amz-checksum-algorithm . - // - // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm - // parameter. - // - // The AWS SDK for Go v1 does not support automatic computing request payload - // checksum. This feature is available in the AWS SDK for Go v2. If a value - // is specified for this parameter, the matching algorithm's checksum member - // must be populated with the algorithm's checksum of the request payload. - // - // The SDK will automatically compute the Content-MD5 checksum for this operation. - // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm - // to be used. - ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"` - - // Container for the request. - // - // Delete is a required field - Delete *Delete `locationName:"Delete" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // The concatenation of the authentication device's serial number, a space, - // and the value that is displayed on your authentication device. Required to - // permanently delete a versioned object if versioning is configured with MFA - // delete enabled. - // - // When performing the DeleteObjects operation on an MFA delete enabled bucket, - // which attempts to delete the specified versioned objects, you must include - // an MFA token. If you don't provide an MFA token, the entire request will - // fail, even if there are non-versioned objects that you are trying to delete. - // If you provide an invalid token, whether there are versioned object keys - // in the request or not, the entire Multi-Object Delete request will fail. - // For information about MFA Delete, see MFA Delete (https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"` - - // Confirms that the requester knows that they will be charged for the request. - // Bucket owners need not specify this parameter in their requests. If either - // the source or destination S3 bucket has Requester Pays enabled, the requester - // will pay for corresponding charges to copy the object. For information about - // downloading objects from Requester Pays buckets, see Downloading Objects - // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteObjectsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteObjectsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteObjectsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteObjectsInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.Delete == nil { - invalidParams.Add(request.NewErrParamRequired("Delete")) - } - if s.Delete != nil { - if err := s.Delete.Validate(); err != nil { - invalidParams.AddNested("Delete", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *DeleteObjectsInput) SetBucket(v string) *DeleteObjectsInput { - s.Bucket = &v - return s -} - -func (s *DeleteObjectsInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetBypassGovernanceRetention sets the BypassGovernanceRetention field's value. -func (s *DeleteObjectsInput) SetBypassGovernanceRetention(v bool) *DeleteObjectsInput { - s.BypassGovernanceRetention = &v - return s -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *DeleteObjectsInput) SetChecksumAlgorithm(v string) *DeleteObjectsInput { - s.ChecksumAlgorithm = &v - return s -} - -// SetDelete sets the Delete field's value. -func (s *DeleteObjectsInput) SetDelete(v *Delete) *DeleteObjectsInput { - s.Delete = v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *DeleteObjectsInput) SetExpectedBucketOwner(v string) *DeleteObjectsInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetMFA sets the MFA field's value. -func (s *DeleteObjectsInput) SetMFA(v string) *DeleteObjectsInput { - s.MFA = &v - return s -} - -// SetRequestPayer sets the RequestPayer field's value. -func (s *DeleteObjectsInput) SetRequestPayer(v string) *DeleteObjectsInput { - s.RequestPayer = &v - return s -} - -func (s *DeleteObjectsInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *DeleteObjectsInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s DeleteObjectsInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type DeleteObjectsOutput struct { - _ struct{} `type:"structure"` - - // Container element for a successful delete. It identifies the object that - // was successfully deleted. - Deleted []*DeletedObject `type:"list" flattened:"true"` - - // Container for a failed delete action that describes the object that Amazon - // S3 attempted to delete and the error it encountered. - Errors []*Error `locationName:"Error" type:"list" flattened:"true"` - - // If present, indicates that the requester was successfully charged for the - // request. - // - // This functionality is not supported for directory buckets. - RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteObjectsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteObjectsOutput) GoString() string { - return s.String() -} - -// SetDeleted sets the Deleted field's value. -func (s *DeleteObjectsOutput) SetDeleted(v []*DeletedObject) *DeleteObjectsOutput { - s.Deleted = v - return s -} - -// SetErrors sets the Errors field's value. -func (s *DeleteObjectsOutput) SetErrors(v []*Error) *DeleteObjectsOutput { - s.Errors = v - return s -} - -// SetRequestCharged sets the RequestCharged field's value. -func (s *DeleteObjectsOutput) SetRequestCharged(v string) *DeleteObjectsOutput { - s.RequestCharged = &v - return s -} - -type DeletePublicAccessBlockInput struct { - _ struct{} `locationName:"DeletePublicAccessBlockRequest" type:"structure"` - - // The Amazon S3 bucket whose PublicAccessBlock configuration you want to delete. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 DeletePublicAccessBlockInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeletePublicAccessBlockInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeletePublicAccessBlockInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeletePublicAccessBlockInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *DeletePublicAccessBlockInput) SetBucket(v string) *DeletePublicAccessBlockInput { - s.Bucket = &v - return s -} - -func (s *DeletePublicAccessBlockInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *DeletePublicAccessBlockInput) SetExpectedBucketOwner(v string) *DeletePublicAccessBlockInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *DeletePublicAccessBlockInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *DeletePublicAccessBlockInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s DeletePublicAccessBlockInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type DeletePublicAccessBlockOutput 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 DeletePublicAccessBlockOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeletePublicAccessBlockOutput) GoString() string { - return s.String() -} - -// Information about the deleted object. -type DeletedObject struct { - _ struct{} `type:"structure"` - - // Indicates whether the specified object version that was permanently deleted - // was (true) or was not (false) a delete marker before deletion. In a simple - // DELETE, this header indicates whether (true) or not (false) the current version - // of the object is a delete marker. - // - // This functionality is not supported for directory buckets. - DeleteMarker *bool `type:"boolean"` - - // The version ID of the delete marker created as a result of the DELETE operation. - // If you delete a specific object version, the value returned by this header - // is the version ID of the object version deleted. - // - // This functionality is not supported for directory buckets. - DeleteMarkerVersionId *string `type:"string"` - - // The name of the deleted object. - Key *string `min:"1" type:"string"` - - // The version ID of the deleted object. - // - // This functionality is not supported for directory buckets. - VersionId *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 DeletedObject) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeletedObject) GoString() string { - return s.String() -} - -// SetDeleteMarker sets the DeleteMarker field's value. -func (s *DeletedObject) SetDeleteMarker(v bool) *DeletedObject { - s.DeleteMarker = &v - return s -} - -// SetDeleteMarkerVersionId sets the DeleteMarkerVersionId field's value. -func (s *DeletedObject) SetDeleteMarkerVersionId(v string) *DeletedObject { - s.DeleteMarkerVersionId = &v - return s -} - -// SetKey sets the Key field's value. -func (s *DeletedObject) SetKey(v string) *DeletedObject { - s.Key = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *DeletedObject) SetVersionId(v string) *DeletedObject { - s.VersionId = &v - return s -} - -// Specifies information about where to publish analysis or configuration results -// for an Amazon S3 bucket and S3 Replication Time Control (S3 RTC). -type Destination struct { - _ struct{} `type:"structure"` - - // Specify this only in a cross-account scenario (where source and destination - // bucket owners are not the same), and you want to change replica ownership - // to the Amazon Web Services account that owns the destination bucket. If this - // is not specified in the replication configuration, the replicas are owned - // by same Amazon Web Services account that owns the source object. - AccessControlTranslation *AccessControlTranslation `type:"structure"` - - // Destination bucket owner account ID. In a cross-account scenario, if you - // direct Amazon S3 to change replica ownership to the Amazon Web Services account - // that owns the destination bucket by specifying the AccessControlTranslation - // property, this is the account ID of the destination bucket owner. For more - // information, see Replication Additional Configuration: Changing the Replica - // Owner (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-change-owner.html) - // in the Amazon S3 User Guide. - Account *string `type:"string"` - - // The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to - // store the results. - // - // Bucket is a required field - Bucket *string `type:"string" required:"true"` - - // A container that provides information about encryption. If SourceSelectionCriteria - // is specified, you must specify this element. - EncryptionConfiguration *EncryptionConfiguration `type:"structure"` - - // A container specifying replication metrics-related settings enabling replication - // metrics and events. - Metrics *Metrics `type:"structure"` - - // A container specifying S3 Replication Time Control (S3 RTC), including whether - // S3 RTC is enabled and the time when all objects and operations on objects - // must be replicated. Must be specified together with a Metrics block. - ReplicationTime *ReplicationTime `type:"structure"` - - // The storage class to use when replicating objects, such as S3 Standard or - // reduced redundancy. By default, Amazon S3 uses the storage class of the source - // object to create the object replica. - // - // For valid values, see the StorageClass element of the PUT Bucket replication - // (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTreplication.html) - // action in the Amazon S3 API Reference. - StorageClass *string `type:"string" enum:"StorageClass"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API 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() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Destination) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Destination"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.AccessControlTranslation != nil { - if err := s.AccessControlTranslation.Validate(); err != nil { - invalidParams.AddNested("AccessControlTranslation", err.(request.ErrInvalidParams)) - } - } - if s.Metrics != nil { - if err := s.Metrics.Validate(); err != nil { - invalidParams.AddNested("Metrics", err.(request.ErrInvalidParams)) - } - } - if s.ReplicationTime != nil { - if err := s.ReplicationTime.Validate(); err != nil { - invalidParams.AddNested("ReplicationTime", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessControlTranslation sets the AccessControlTranslation field's value. -func (s *Destination) SetAccessControlTranslation(v *AccessControlTranslation) *Destination { - s.AccessControlTranslation = v - return s -} - -// SetAccount sets the Account field's value. -func (s *Destination) SetAccount(v string) *Destination { - s.Account = &v - return s -} - -// SetBucket sets the Bucket field's value. -func (s *Destination) SetBucket(v string) *Destination { - s.Bucket = &v - return s -} - -func (s *Destination) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetEncryptionConfiguration sets the EncryptionConfiguration field's value. -func (s *Destination) SetEncryptionConfiguration(v *EncryptionConfiguration) *Destination { - s.EncryptionConfiguration = v - return s -} - -// SetMetrics sets the Metrics field's value. -func (s *Destination) SetMetrics(v *Metrics) *Destination { - s.Metrics = v - return s -} - -// SetReplicationTime sets the ReplicationTime field's value. -func (s *Destination) SetReplicationTime(v *ReplicationTime) *Destination { - s.ReplicationTime = v - return s -} - -// SetStorageClass sets the StorageClass field's value. -func (s *Destination) SetStorageClass(v string) *Destination { - s.StorageClass = &v - return s -} - -// Contains the type of server-side encryption used. -type Encryption struct { - _ struct{} `type:"structure"` - - // The server-side encryption algorithm used when storing job results in Amazon - // S3 (for example, AES256, aws:kms). - // - // EncryptionType is a required field - EncryptionType *string `type:"string" required:"true" enum:"ServerSideEncryption"` - - // If the encryption type is aws:kms, this optional value can be used to specify - // the encryption context for the restore results. - KMSContext *string `type:"string"` - - // If the encryption type is aws:kms, this optional value specifies the ID of - // the symmetric encryption customer managed key to use for encryption of job - // results. Amazon S3 only supports symmetric encryption KMS keys. For more - // information, see Asymmetric keys in KMS (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html) - // in the Amazon Web Services Key Management Service Developer Guide. - // - // KMSKeyId is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by Encryption's - // String and GoString methods. - KMSKeyId *string `type:"string" sensitive:"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 Encryption) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Encryption) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Encryption) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Encryption"} - if s.EncryptionType == nil { - invalidParams.Add(request.NewErrParamRequired("EncryptionType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEncryptionType sets the EncryptionType field's value. -func (s *Encryption) SetEncryptionType(v string) *Encryption { - s.EncryptionType = &v - return s -} - -// SetKMSContext sets the KMSContext field's value. -func (s *Encryption) SetKMSContext(v string) *Encryption { - s.KMSContext = &v - return s -} - -// SetKMSKeyId sets the KMSKeyId field's value. -func (s *Encryption) SetKMSKeyId(v string) *Encryption { - s.KMSKeyId = &v - return s -} - -// Specifies encryption-related information for an Amazon S3 bucket that is -// a destination for replicated objects. -type EncryptionConfiguration struct { - _ struct{} `type:"structure"` - - // Specifies the ID (Key ARN or Alias ARN) of the customer managed Amazon Web - // Services KMS key stored in Amazon Web Services Key Management Service (KMS) - // for the destination bucket. Amazon S3 uses this key to encrypt replica objects. - // Amazon S3 only supports symmetric encryption KMS keys. For more information, - // see Asymmetric keys in Amazon Web Services KMS (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html) - // in the Amazon Web Services Key Management Service Developer Guide. - ReplicaKmsKeyID *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 EncryptionConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s EncryptionConfiguration) GoString() string { - return s.String() -} - -// SetReplicaKmsKeyID sets the ReplicaKmsKeyID field's value. -func (s *EncryptionConfiguration) SetReplicaKmsKeyID(v string) *EncryptionConfiguration { - s.ReplicaKmsKeyID = &v - return s -} - -// A message that indicates the request is complete and no more messages will -// be sent. You should not assume that the request is complete until the client -// receives an EndEvent. -type EndEvent struct { - _ struct{} `locationName:"EndEvent" 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 EndEvent) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s EndEvent) GoString() string { - return s.String() -} - -// The EndEvent is and event in the SelectObjectContentEventStream group of events. -func (s *EndEvent) eventSelectObjectContentEventStream() {} - -// UnmarshalEvent unmarshals the EventStream Message into the EndEvent value. -// This method is only used internally within the SDK's EventStream handling. -func (s *EndEvent) UnmarshalEvent( - payloadUnmarshaler protocol.PayloadUnmarshaler, - msg eventstream.Message, -) error { - return nil -} - -// MarshalEvent marshals the type into an stream event value. This method -// should only used internally within the SDK's EventStream handling. -func (s *EndEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { - msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) - return msg, err -} - -// Container for all error elements. -type Error struct { - _ struct{} `type:"structure"` - - // 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. The following is a list of Amazon S3 error codes. For more information, - // see Error responses (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html). - // - // * Code: AccessDenied Description: Access Denied HTTP Status Code: 403 - // Forbidden SOAP Fault Code Prefix: Client - // - // * Code: AccountProblem Description: There is a problem with your Amazon - // Web Services account that prevents the action from completing successfully. - // Contact Amazon Web Services Support for further assistance. HTTP Status - // Code: 403 Forbidden SOAP Fault Code Prefix: Client - // - // * Code: AllAccessDisabled Description: All access to this Amazon S3 resource - // has been disabled. Contact Amazon Web Services Support for further assistance. - // HTTP Status Code: 403 Forbidden SOAP Fault Code Prefix: Client - // - // * Code: AmbiguousGrantByEmailAddress Description: The email address you - // provided is associated with more than one account. HTTP Status Code: 400 - // Bad Request SOAP Fault Code Prefix: Client - // - // * Code: AuthorizationHeaderMalformed Description: The authorization header - // you provided is invalid. HTTP Status Code: 400 Bad Request HTTP Status - // Code: N/A - // - // * Code: BadDigest Description: The Content-MD5 you specified did not match - // what we received. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: - // Client - // - // * Code: BucketAlreadyExists Description: The requested bucket name is - // not available. The bucket namespace is shared by all users of the system. - // Please select a different name and try again. HTTP Status Code: 409 Conflict - // SOAP Fault Code Prefix: Client - // - // * Code: BucketAlreadyOwnedByYou Description: The bucket you tried to create - // already exists, and you own it. Amazon S3 returns this error in all Amazon - // Web Services Regions except in the North Virginia Region. For legacy compatibility, - // if you re-create an existing bucket that you already own in the North - // Virginia Region, Amazon S3 returns 200 OK and resets the bucket access - // control lists (ACLs). Code: 409 Conflict (in all Regions except the North - // Virginia Region) SOAP Fault Code Prefix: Client - // - // * Code: BucketNotEmpty Description: The bucket you tried to delete is - // not empty. HTTP Status Code: 409 Conflict SOAP Fault Code Prefix: Client - // - // * Code: CredentialsNotSupported Description: This request does not support - // credentials. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: - // Client - // - // * Code: CrossLocationLoggingProhibited Description: Cross-location logging - // not allowed. Buckets in one geographic location cannot log information - // to a bucket in another location. HTTP Status Code: 403 Forbidden SOAP - // Fault Code Prefix: Client - // - // * Code: EntityTooSmall Description: Your proposed upload is smaller than - // the minimum allowed object size. HTTP Status Code: 400 Bad Request SOAP - // Fault Code Prefix: Client - // - // * Code: EntityTooLarge Description: Your proposed upload exceeds the maximum - // allowed object size. HTTP Status Code: 400 Bad Request SOAP Fault Code - // Prefix: Client - // - // * Code: ExpiredToken Description: The provided token has expired. HTTP - // Status Code: 400 Bad Request SOAP Fault Code Prefix: Client - // - // * Code: IllegalVersioningConfigurationException Description: Indicates - // that the versioning configuration specified in the request is invalid. - // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client - // - // * Code: IncompleteBody Description: You did not provide the number of - // bytes specified by the Content-Length HTTP header HTTP Status Code: 400 - // Bad Request SOAP Fault Code Prefix: Client - // - // * Code: IncorrectNumberOfFilesInPostRequest Description: POST requires - // exactly one file upload per request. HTTP Status Code: 400 Bad Request - // SOAP Fault Code Prefix: Client - // - // * Code: InlineDataTooLarge Description: Inline data exceeds the maximum - // allowed size. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: - // Client - // - // * Code: InternalError Description: We encountered an internal error. Please - // try again. HTTP Status Code: 500 Internal Server Error SOAP Fault Code - // Prefix: Server - // - // * Code: InvalidAccessKeyId Description: The Amazon Web Services access - // key ID you provided does not exist in our records. HTTP Status Code: 403 - // Forbidden SOAP Fault Code Prefix: Client - // - // * Code: InvalidAddressingHeader Description: You must specify the Anonymous - // role. HTTP Status Code: N/A SOAP Fault Code Prefix: Client - // - // * Code: InvalidArgument Description: Invalid Argument HTTP Status Code: - // 400 Bad Request SOAP Fault Code Prefix: Client - // - // * Code: InvalidBucketName Description: The specified bucket is not valid. - // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client - // - // * Code: InvalidBucketState Description: The request is not valid with - // the current state of the bucket. HTTP Status Code: 409 Conflict SOAP Fault - // Code Prefix: Client - // - // * Code: InvalidDigest Description: The Content-MD5 you specified is not - // valid. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client - // - // * Code: InvalidEncryptionAlgorithmError Description: The encryption request - // you specified is not valid. The valid value is AES256. HTTP Status Code: - // 400 Bad Request SOAP Fault Code Prefix: Client - // - // * Code: InvalidLocationConstraint Description: The specified location - // constraint is not valid. For more information about Regions, see How to - // Select a Region for Your Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro). - // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client - // - // * Code: InvalidObjectState Description: The action is not valid for the - // current state of the object. HTTP Status Code: 403 Forbidden SOAP Fault - // Code Prefix: Client - // - // * Code: InvalidPart Description: One or more of the specified parts could - // not be found. The part might not have been uploaded, or the specified - // entity tag might not have matched the part's entity tag. HTTP Status Code: - // 400 Bad Request SOAP Fault Code Prefix: Client - // - // * Code: InvalidPartOrder Description: The list of parts was not in ascending - // order. Parts list must be specified in order by part number. HTTP Status - // Code: 400 Bad Request SOAP Fault Code Prefix: Client - // - // * Code: InvalidPayer Description: All access to this object has been disabled. - // Please contact Amazon Web Services Support for further assistance. HTTP - // Status Code: 403 Forbidden SOAP Fault Code Prefix: Client - // - // * Code: InvalidPolicyDocument Description: The content of the form does - // not meet the conditions specified in the policy document. HTTP Status - // Code: 400 Bad Request SOAP Fault Code Prefix: Client - // - // * Code: InvalidRange Description: The requested range cannot be satisfied. - // HTTP Status Code: 416 Requested Range Not Satisfiable SOAP Fault Code - // Prefix: Client - // - // * Code: InvalidRequest Description: Please use AWS4-HMAC-SHA256. HTTP - // Status Code: 400 Bad Request Code: N/A - // - // * Code: InvalidRequest Description: SOAP requests must be made over an - // HTTPS connection. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: - // Client - // - // * Code: InvalidRequest Description: Amazon S3 Transfer Acceleration is - // not supported for buckets with non-DNS compliant names. HTTP Status Code: - // 400 Bad Request Code: N/A - // - // * Code: InvalidRequest Description: Amazon S3 Transfer Acceleration is - // not supported for buckets with periods (.) in their names. HTTP Status - // Code: 400 Bad Request Code: N/A - // - // * Code: InvalidRequest Description: Amazon S3 Transfer Accelerate endpoint - // only supports virtual style requests. HTTP Status Code: 400 Bad Request - // Code: N/A - // - // * Code: InvalidRequest Description: Amazon S3 Transfer Accelerate is not - // configured on this bucket. HTTP Status Code: 400 Bad Request Code: N/A - // - // * Code: InvalidRequest Description: Amazon S3 Transfer Accelerate is disabled - // on this bucket. HTTP Status Code: 400 Bad Request Code: N/A - // - // * Code: InvalidRequest Description: Amazon S3 Transfer Acceleration is - // not supported on this bucket. Contact Amazon Web Services Support for - // more information. HTTP Status Code: 400 Bad Request Code: N/A - // - // * Code: InvalidRequest Description: Amazon S3 Transfer Acceleration cannot - // be enabled on this bucket. Contact Amazon Web Services Support for more - // information. HTTP Status Code: 400 Bad Request Code: N/A - // - // * Code: InvalidSecurity Description: The provided security credentials - // are not valid. HTTP Status Code: 403 Forbidden SOAP Fault Code Prefix: - // Client - // - // * Code: InvalidSOAPRequest Description: The SOAP request body is invalid. - // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client - // - // * Code: InvalidStorageClass Description: The storage class you specified - // is not valid. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: - // Client - // - // * Code: InvalidTargetBucketForLogging Description: The target bucket for - // logging does not exist, is not owned by you, or does not have the appropriate - // grants for the log-delivery group. HTTP Status Code: 400 Bad Request SOAP - // Fault Code Prefix: Client - // - // * Code: InvalidToken Description: The provided token is malformed or otherwise - // invalid. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client - // - // * Code: InvalidURI Description: Couldn't parse the specified URI. HTTP - // Status Code: 400 Bad Request SOAP Fault Code Prefix: Client - // - // * Code: KeyTooLongError Description: Your key is too long. HTTP Status - // Code: 400 Bad Request SOAP Fault Code Prefix: Client - // - // * Code: MalformedACLError Description: The XML you provided was not well-formed - // or did not validate against our published schema. HTTP Status Code: 400 - // Bad Request SOAP Fault Code Prefix: Client - // - // * Code: MalformedPOSTRequest Description: The body of your POST request - // is not well-formed multipart/form-data. HTTP Status Code: 400 Bad Request - // SOAP Fault Code Prefix: Client - // - // * Code: MalformedXML Description: This happens when the user sends malformed - // XML (XML that doesn't conform to the published XSD) for the configuration. - // The error message is, "The XML you provided was not well-formed or did - // not validate against our published schema." HTTP Status Code: 400 Bad - // Request SOAP Fault Code Prefix: Client - // - // * Code: MaxMessageLengthExceeded Description: Your request was too big. - // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client - // - // * Code: MaxPostPreDataLengthExceededError Description: Your POST request - // fields preceding the upload file were too large. HTTP Status Code: 400 - // Bad Request SOAP Fault Code Prefix: Client - // - // * Code: MetadataTooLarge Description: Your metadata headers exceed the - // maximum allowed metadata size. HTTP Status Code: 400 Bad Request SOAP - // Fault Code Prefix: Client - // - // * Code: MethodNotAllowed Description: The specified method is not allowed - // against this resource. HTTP Status Code: 405 Method Not Allowed SOAP Fault - // Code Prefix: Client - // - // * Code: MissingAttachment Description: A SOAP attachment was expected, - // but none were found. HTTP Status Code: N/A SOAP Fault Code Prefix: Client - // - // * Code: MissingContentLength Description: You must provide the Content-Length - // HTTP header. HTTP Status Code: 411 Length Required SOAP Fault Code Prefix: - // Client - // - // * Code: MissingRequestBodyError Description: This happens when the user - // sends an empty XML document as a request. The error message is, "Request - // body is empty." HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: - // Client - // - // * Code: MissingSecurityElement Description: The SOAP 1.1 request is missing - // a security element. HTTP Status Code: 400 Bad Request SOAP Fault Code - // Prefix: Client - // - // * Code: MissingSecurityHeader Description: Your request is missing a required - // header. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client - // - // * Code: NoLoggingStatusForKey Description: There is no such thing as a - // logging status subresource for a key. HTTP Status Code: 400 Bad Request - // SOAP Fault Code Prefix: Client - // - // * Code: NoSuchBucket Description: The specified bucket does not exist. - // HTTP Status Code: 404 Not Found SOAP Fault Code Prefix: Client - // - // * Code: NoSuchBucketPolicy Description: The specified bucket does not - // have a bucket policy. HTTP Status Code: 404 Not Found SOAP Fault Code - // Prefix: Client - // - // * Code: NoSuchKey Description: The specified key does not exist. HTTP - // Status Code: 404 Not Found SOAP Fault Code Prefix: Client - // - // * Code: NoSuchLifecycleConfiguration Description: The lifecycle configuration - // does not exist. HTTP Status Code: 404 Not Found SOAP Fault Code Prefix: - // Client - // - // * Code: NoSuchUpload Description: The specified multipart upload does - // not exist. The upload ID might be invalid, or the multipart upload might - // have been aborted or completed. HTTP Status Code: 404 Not Found SOAP Fault - // Code Prefix: Client - // - // * Code: NoSuchVersion Description: Indicates that the version ID specified - // in the request does not match an existing version. HTTP Status Code: 404 - // Not Found SOAP Fault Code Prefix: Client - // - // * Code: NotImplemented Description: A header you provided implies functionality - // that is not implemented. HTTP Status Code: 501 Not Implemented SOAP Fault - // Code Prefix: Server - // - // * Code: NotSignedUp Description: Your account is not signed up for the - // Amazon S3 service. You must sign up before you can use Amazon S3. You - // can sign up at the following URL: Amazon S3 (http://aws.amazon.com/s3) - // HTTP Status Code: 403 Forbidden SOAP Fault Code Prefix: Client - // - // * Code: OperationAborted Description: A conflicting conditional action - // is currently in progress against this resource. Try again. HTTP Status - // Code: 409 Conflict SOAP Fault Code Prefix: Client - // - // * Code: PermanentRedirect Description: The bucket you are attempting to - // access must be addressed using the specified endpoint. Send all future - // requests to this endpoint. HTTP Status Code: 301 Moved Permanently SOAP - // Fault Code Prefix: Client - // - // * Code: PreconditionFailed Description: At least one of the preconditions - // you specified did not hold. HTTP Status Code: 412 Precondition Failed - // SOAP Fault Code Prefix: Client - // - // * Code: Redirect Description: Temporary redirect. HTTP Status Code: 307 - // Moved Temporarily SOAP Fault Code Prefix: Client - // - // * Code: RestoreAlreadyInProgress Description: Object restore is already - // in progress. HTTP Status Code: 409 Conflict SOAP Fault Code Prefix: Client - // - // * Code: RequestIsNotMultiPartContent Description: Bucket POST must be - // of the enclosure-type multipart/form-data. HTTP Status Code: 400 Bad Request - // SOAP Fault Code Prefix: Client - // - // * Code: RequestTimeout Description: Your socket connection to the server - // was not read from or written to within the timeout period. HTTP Status - // Code: 400 Bad Request SOAP Fault Code Prefix: Client - // - // * Code: RequestTimeTooSkewed Description: The difference between the request - // time and the server's time is too large. HTTP Status Code: 403 Forbidden - // SOAP Fault Code Prefix: Client - // - // * Code: RequestTorrentOfBucketError Description: Requesting the torrent - // file of a bucket is not permitted. HTTP Status Code: 400 Bad Request SOAP - // Fault Code Prefix: Client - // - // * Code: SignatureDoesNotMatch Description: The request signature we calculated - // does not match the signature you provided. Check your Amazon Web Services - // secret access key and signing method. For more information, see REST Authentication - // (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html) - // and SOAP Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/SOAPAuthentication.html) - // for details. HTTP Status Code: 403 Forbidden SOAP Fault Code Prefix: Client - // - // * Code: ServiceUnavailable Description: Service is unable to handle request. - // HTTP Status Code: 503 Service Unavailable SOAP Fault Code Prefix: Server - // - // * Code: SlowDown Description: Reduce your request rate. HTTP Status Code: - // 503 Slow Down SOAP Fault Code Prefix: Server - // - // * Code: TemporaryRedirect Description: You are being redirected to the - // bucket while DNS updates. HTTP Status Code: 307 Moved Temporarily SOAP - // Fault Code Prefix: Client - // - // * Code: TokenRefreshRequired Description: The provided token must be refreshed. - // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client - // - // * Code: TooManyBuckets Description: You have attempted to create more - // buckets than allowed. HTTP Status Code: 400 Bad Request SOAP Fault Code - // Prefix: Client - // - // * Code: UnexpectedContent Description: This request does not support content. - // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client - // - // * Code: UnresolvableGrantByEmailAddress Description: The email address - // you provided does not match any account on record. HTTP Status Code: 400 - // Bad Request SOAP Fault Code Prefix: Client - // - // * Code: UserKeyMustBeSpecified Description: The bucket POST must contain - // the specified field name. If it is specified, check the order of the fields. - // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client - Code *string `type:"string"` - - // The error key. - Key *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 `type:"string"` - - // The version ID of the error. - // - // This functionality is not supported for directory buckets. - VersionId *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 Error) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Error) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *Error) SetCode(v string) *Error { - s.Code = &v - return s -} - -// SetKey sets the Key field's value. -func (s *Error) SetKey(v string) *Error { - s.Key = &v - return s -} - -// SetMessage sets the Message field's value. -func (s *Error) SetMessage(v string) *Error { - s.Message = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *Error) SetVersionId(v string) *Error { - s.VersionId = &v - return s -} - -// The error information. -type ErrorDocument struct { - _ struct{} `type:"structure"` - - // The object key name to use when a 4XX class error occurs. - // - // Replacement must be made for object keys containing special characters (such - // as carriage returns) when using XML requests. For more information, see XML - // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints). - // - // Key is a required field - Key *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 ErrorDocument) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ErrorDocument) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ErrorDocument) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ErrorDocument"} - 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 *ErrorDocument) SetKey(v string) *ErrorDocument { - s.Key = &v - return s -} - -// A container for specifying the configuration for Amazon EventBridge. -type EventBridgeConfiguration 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 EventBridgeConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s EventBridgeConfiguration) GoString() string { - return s.String() -} - -// Optional configuration to replicate existing source bucket objects. For more -// information, see Replicating Existing Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-what-is-isnot-replicated.html#existing-object-replication) -// in the Amazon S3 User Guide. -type ExistingObjectReplication struct { - _ struct{} `type:"structure"` - - // Specifies whether Amazon S3 replicates existing source bucket objects. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"ExistingObjectReplicationStatus"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ExistingObjectReplication) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ExistingObjectReplication) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ExistingObjectReplication) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ExistingObjectReplication"} - 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 *ExistingObjectReplication) SetStatus(v string) *ExistingObjectReplication { - s.Status = &v - return s -} - -// Specifies the Amazon S3 object key name to filter on. An object key name -// is the name assigned to an object in your Amazon S3 bucket. You specify whether -// to filter on the suffix or prefix of the object key name. A prefix is a specific -// string of characters at the beginning of an object key name, which you can -// use to organize objects. For example, you can start the key names of related -// objects with a prefix, such as 2023- or engineering/. Then, you can use FilterRule -// to find objects in a bucket with key names that have the same prefix. A suffix -// is similar to a prefix, but it is at the end of the object key name instead -// of at the beginning. -type FilterRule struct { - _ struct{} `type:"structure"` - - // The object key name prefix or suffix identifying one or more objects to which - // the filtering rule applies. The maximum length is 1,024 characters. Overlapping - // prefixes and suffixes are not supported. For more information, see Configuring - // Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) - // in the Amazon S3 User Guide. - Name *string `type:"string" enum:"FilterRuleName"` - - // The value that the filter searches for in object key names. - 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 FilterRule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FilterRule) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *FilterRule) SetName(v string) *FilterRule { - s.Name = &v - return s -} - -// SetValue sets the Value field's value. -func (s *FilterRule) SetValue(v string) *FilterRule { - s.Value = &v - return s -} - -type GetBucketAccelerateConfigurationInput struct { - _ struct{} `locationName:"GetBucketAccelerateConfigurationRequest" type:"structure"` - - // The name of the bucket for which the accelerate configuration is retrieved. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // Confirms that the requester knows that they will be charged for the request. - // Bucket owners need not specify this parameter in their requests. If either - // the source or destination S3 bucket has Requester Pays enabled, the requester - // will pay for corresponding charges to copy the object. For information about - // downloading objects from Requester Pays buckets, see Downloading Objects - // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketAccelerateConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketAccelerateConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBucketAccelerateConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBucketAccelerateConfigurationInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *GetBucketAccelerateConfigurationInput) SetBucket(v string) *GetBucketAccelerateConfigurationInput { - s.Bucket = &v - return s -} - -func (s *GetBucketAccelerateConfigurationInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *GetBucketAccelerateConfigurationInput) SetExpectedBucketOwner(v string) *GetBucketAccelerateConfigurationInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetRequestPayer sets the RequestPayer field's value. -func (s *GetBucketAccelerateConfigurationInput) SetRequestPayer(v string) *GetBucketAccelerateConfigurationInput { - s.RequestPayer = &v - return s -} - -func (s *GetBucketAccelerateConfigurationInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *GetBucketAccelerateConfigurationInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s GetBucketAccelerateConfigurationInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type GetBucketAccelerateConfigurationOutput struct { - _ struct{} `type:"structure"` - - // If present, indicates that the requester was successfully charged for the - // request. - // - // This functionality is not supported for directory buckets. - RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` - - // The accelerate configuration of the bucket. - Status *string `type:"string" enum:"BucketAccelerateStatus"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketAccelerateConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketAccelerateConfigurationOutput) GoString() string { - return s.String() -} - -// SetRequestCharged sets the RequestCharged field's value. -func (s *GetBucketAccelerateConfigurationOutput) SetRequestCharged(v string) *GetBucketAccelerateConfigurationOutput { - s.RequestCharged = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *GetBucketAccelerateConfigurationOutput) SetStatus(v string) *GetBucketAccelerateConfigurationOutput { - s.Status = &v - return s -} - -type GetBucketAclInput struct { - _ struct{} `locationName:"GetBucketAclRequest" type:"structure"` - - // Specifies the S3 bucket whose ACL is being requested. - // - // When you use this API operation with an access point, provide the alias of - // the access point in place of the bucket name. - // - // When you use this API operation with an Object Lambda access point, provide - // the alias of the Object Lambda access point in place of the bucket name. - // If the Object Lambda access point alias in a request is not valid, the error - // code InvalidAccessPointAliasError is returned. For more information about - // InvalidAccessPointAliasError, see List of Error Codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList). - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 GetBucketAclInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketAclInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBucketAclInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBucketAclInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *GetBucketAclInput) SetBucket(v string) *GetBucketAclInput { - s.Bucket = &v - return s -} - -func (s *GetBucketAclInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *GetBucketAclInput) SetExpectedBucketOwner(v string) *GetBucketAclInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *GetBucketAclInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *GetBucketAclInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s GetBucketAclInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type GetBucketAclOutput struct { - _ struct{} `type:"structure"` - - // A list of grants. - Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"` - - // Container for the bucket owner's display name and ID. - Owner *Owner `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 GetBucketAclOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketAclOutput) GoString() string { - return s.String() -} - -// SetGrants sets the Grants field's value. -func (s *GetBucketAclOutput) SetGrants(v []*Grant) *GetBucketAclOutput { - s.Grants = v - return s -} - -// SetOwner sets the Owner field's value. -func (s *GetBucketAclOutput) SetOwner(v *Owner) *GetBucketAclOutput { - s.Owner = v - return s -} - -type GetBucketAnalyticsConfigurationInput struct { - _ struct{} `locationName:"GetBucketAnalyticsConfigurationRequest" type:"structure"` - - // The name of the bucket from which an analytics configuration is retrieved. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // The ID that identifies the analytics configuration. - // - // Id is a required field - Id *string `location:"querystring" locationName:"id" 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 GetBucketAnalyticsConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketAnalyticsConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBucketAnalyticsConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBucketAnalyticsConfigurationInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *GetBucketAnalyticsConfigurationInput) SetBucket(v string) *GetBucketAnalyticsConfigurationInput { - s.Bucket = &v - return s -} - -func (s *GetBucketAnalyticsConfigurationInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *GetBucketAnalyticsConfigurationInput) SetExpectedBucketOwner(v string) *GetBucketAnalyticsConfigurationInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetId sets the Id field's value. -func (s *GetBucketAnalyticsConfigurationInput) SetId(v string) *GetBucketAnalyticsConfigurationInput { - s.Id = &v - return s -} - -func (s *GetBucketAnalyticsConfigurationInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *GetBucketAnalyticsConfigurationInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s GetBucketAnalyticsConfigurationInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type GetBucketAnalyticsConfigurationOutput struct { - _ struct{} `type:"structure" payload:"AnalyticsConfiguration"` - - // The configuration and any analyses for the analytics filter. - AnalyticsConfiguration *AnalyticsConfiguration `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 GetBucketAnalyticsConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketAnalyticsConfigurationOutput) GoString() string { - return s.String() -} - -// SetAnalyticsConfiguration sets the AnalyticsConfiguration field's value. -func (s *GetBucketAnalyticsConfigurationOutput) SetAnalyticsConfiguration(v *AnalyticsConfiguration) *GetBucketAnalyticsConfigurationOutput { - s.AnalyticsConfiguration = v - return s -} - -type GetBucketCorsInput struct { - _ struct{} `locationName:"GetBucketCorsRequest" type:"structure"` - - // The bucket name for which to get the cors configuration. - // - // When you use this API operation with an access point, provide the alias of - // the access point in place of the bucket name. - // - // When you use this API operation with an Object Lambda access point, provide - // the alias of the Object Lambda access point in place of the bucket name. - // If the Object Lambda access point alias in a request is not valid, the error - // code InvalidAccessPointAliasError is returned. For more information about - // InvalidAccessPointAliasError, see List of Error Codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList). - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 GetBucketCorsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketCorsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBucketCorsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBucketCorsInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *GetBucketCorsInput) SetBucket(v string) *GetBucketCorsInput { - s.Bucket = &v - return s -} - -func (s *GetBucketCorsInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *GetBucketCorsInput) SetExpectedBucketOwner(v string) *GetBucketCorsInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *GetBucketCorsInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *GetBucketCorsInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s GetBucketCorsInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type GetBucketCorsOutput struct { - _ struct{} `type:"structure"` - - // A set of origins and methods (cross-origin access that you want to allow). - // You can add up to 100 rules to the configuration. - CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"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 GetBucketCorsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketCorsOutput) GoString() string { - return s.String() -} - -// SetCORSRules sets the CORSRules field's value. -func (s *GetBucketCorsOutput) SetCORSRules(v []*CORSRule) *GetBucketCorsOutput { - s.CORSRules = v - return s -} - -type GetBucketEncryptionInput struct { - _ struct{} `locationName:"GetBucketEncryptionRequest" type:"structure"` - - // The name of the bucket from which the server-side encryption configuration - // is retrieved. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 GetBucketEncryptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketEncryptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBucketEncryptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBucketEncryptionInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *GetBucketEncryptionInput) SetBucket(v string) *GetBucketEncryptionInput { - s.Bucket = &v - return s -} - -func (s *GetBucketEncryptionInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *GetBucketEncryptionInput) SetExpectedBucketOwner(v string) *GetBucketEncryptionInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *GetBucketEncryptionInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *GetBucketEncryptionInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s GetBucketEncryptionInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type GetBucketEncryptionOutput struct { - _ struct{} `type:"structure" payload:"ServerSideEncryptionConfiguration"` - - // Specifies the default server-side-encryption configuration. - ServerSideEncryptionConfiguration *ServerSideEncryptionConfiguration `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 GetBucketEncryptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketEncryptionOutput) GoString() string { - return s.String() -} - -// SetServerSideEncryptionConfiguration sets the ServerSideEncryptionConfiguration field's value. -func (s *GetBucketEncryptionOutput) SetServerSideEncryptionConfiguration(v *ServerSideEncryptionConfiguration) *GetBucketEncryptionOutput { - s.ServerSideEncryptionConfiguration = v - return s -} - -type GetBucketIntelligentTieringConfigurationInput struct { - _ struct{} `locationName:"GetBucketIntelligentTieringConfigurationRequest" type:"structure"` - - // The name of the Amazon S3 bucket whose configuration you want to modify or - // retrieve. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The ID used to identify the S3 Intelligent-Tiering configuration. - // - // Id is a required field - Id *string `location:"querystring" locationName:"id" 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 GetBucketIntelligentTieringConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketIntelligentTieringConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBucketIntelligentTieringConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBucketIntelligentTieringConfigurationInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *GetBucketIntelligentTieringConfigurationInput) SetBucket(v string) *GetBucketIntelligentTieringConfigurationInput { - s.Bucket = &v - return s -} - -func (s *GetBucketIntelligentTieringConfigurationInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetId sets the Id field's value. -func (s *GetBucketIntelligentTieringConfigurationInput) SetId(v string) *GetBucketIntelligentTieringConfigurationInput { - s.Id = &v - return s -} - -func (s *GetBucketIntelligentTieringConfigurationInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *GetBucketIntelligentTieringConfigurationInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s GetBucketIntelligentTieringConfigurationInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type GetBucketIntelligentTieringConfigurationOutput struct { - _ struct{} `type:"structure" payload:"IntelligentTieringConfiguration"` - - // Container for S3 Intelligent-Tiering configuration. - IntelligentTieringConfiguration *IntelligentTieringConfiguration `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 GetBucketIntelligentTieringConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketIntelligentTieringConfigurationOutput) GoString() string { - return s.String() -} - -// SetIntelligentTieringConfiguration sets the IntelligentTieringConfiguration field's value. -func (s *GetBucketIntelligentTieringConfigurationOutput) SetIntelligentTieringConfiguration(v *IntelligentTieringConfiguration) *GetBucketIntelligentTieringConfigurationOutput { - s.IntelligentTieringConfiguration = v - return s -} - -type GetBucketInventoryConfigurationInput struct { - _ struct{} `locationName:"GetBucketInventoryConfigurationRequest" type:"structure"` - - // The name of the bucket containing the inventory configuration to retrieve. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // The ID used to identify the inventory configuration. - // - // Id is a required field - Id *string `location:"querystring" locationName:"id" 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 GetBucketInventoryConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketInventoryConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBucketInventoryConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBucketInventoryConfigurationInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *GetBucketInventoryConfigurationInput) SetBucket(v string) *GetBucketInventoryConfigurationInput { - s.Bucket = &v - return s -} - -func (s *GetBucketInventoryConfigurationInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *GetBucketInventoryConfigurationInput) SetExpectedBucketOwner(v string) *GetBucketInventoryConfigurationInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetId sets the Id field's value. -func (s *GetBucketInventoryConfigurationInput) SetId(v string) *GetBucketInventoryConfigurationInput { - s.Id = &v - return s -} - -func (s *GetBucketInventoryConfigurationInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *GetBucketInventoryConfigurationInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s GetBucketInventoryConfigurationInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type GetBucketInventoryConfigurationOutput struct { - _ struct{} `type:"structure" payload:"InventoryConfiguration"` - - // Specifies the inventory configuration. - InventoryConfiguration *InventoryConfiguration `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 GetBucketInventoryConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketInventoryConfigurationOutput) GoString() string { - return s.String() -} - -// SetInventoryConfiguration sets the InventoryConfiguration field's value. -func (s *GetBucketInventoryConfigurationOutput) SetInventoryConfiguration(v *InventoryConfiguration) *GetBucketInventoryConfigurationOutput { - s.InventoryConfiguration = v - return s -} - -type GetBucketLifecycleConfigurationInput struct { - _ struct{} `locationName:"GetBucketLifecycleConfigurationRequest" type:"structure"` - - // The name of the bucket for which to get the lifecycle information. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 GetBucketLifecycleConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketLifecycleConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBucketLifecycleConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleConfigurationInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *GetBucketLifecycleConfigurationInput) SetBucket(v string) *GetBucketLifecycleConfigurationInput { - s.Bucket = &v - return s -} - -func (s *GetBucketLifecycleConfigurationInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *GetBucketLifecycleConfigurationInput) SetExpectedBucketOwner(v string) *GetBucketLifecycleConfigurationInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *GetBucketLifecycleConfigurationInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *GetBucketLifecycleConfigurationInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s GetBucketLifecycleConfigurationInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type GetBucketLifecycleConfigurationOutput struct { - _ struct{} `type:"structure"` - - // Container for a lifecycle rule. - Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"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 GetBucketLifecycleConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketLifecycleConfigurationOutput) GoString() string { - return s.String() -} - -// SetRules sets the Rules field's value. -func (s *GetBucketLifecycleConfigurationOutput) SetRules(v []*LifecycleRule) *GetBucketLifecycleConfigurationOutput { - s.Rules = v - return s -} - -type GetBucketLifecycleInput struct { - _ struct{} `locationName:"GetBucketLifecycleRequest" type:"structure"` - - // The name of the bucket for which to get the lifecycle information. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 GetBucketLifecycleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketLifecycleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBucketLifecycleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *GetBucketLifecycleInput) SetBucket(v string) *GetBucketLifecycleInput { - s.Bucket = &v - return s -} - -func (s *GetBucketLifecycleInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *GetBucketLifecycleInput) SetExpectedBucketOwner(v string) *GetBucketLifecycleInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *GetBucketLifecycleInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *GetBucketLifecycleInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s GetBucketLifecycleInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type GetBucketLifecycleOutput struct { - _ struct{} `type:"structure"` - - // Container for a lifecycle rule. - Rules []*Rule `locationName:"Rule" type:"list" flattened:"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 GetBucketLifecycleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketLifecycleOutput) GoString() string { - return s.String() -} - -// SetRules sets the Rules field's value. -func (s *GetBucketLifecycleOutput) SetRules(v []*Rule) *GetBucketLifecycleOutput { - s.Rules = v - return s -} - -type GetBucketLocationInput struct { - _ struct{} `locationName:"GetBucketLocationRequest" type:"structure"` - - // The name of the bucket for which to get the location. - // - // When you use this API operation with an access point, provide the alias of - // the access point in place of the bucket name. - // - // When you use this API operation with an Object Lambda access point, provide - // the alias of the Object Lambda access point in place of the bucket name. - // If the Object Lambda access point alias in a request is not valid, the error - // code InvalidAccessPointAliasError is returned. For more information about - // InvalidAccessPointAliasError, see List of Error Codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList). - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 GetBucketLocationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketLocationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBucketLocationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBucketLocationInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *GetBucketLocationInput) SetBucket(v string) *GetBucketLocationInput { - s.Bucket = &v - return s -} - -func (s *GetBucketLocationInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *GetBucketLocationInput) SetExpectedBucketOwner(v string) *GetBucketLocationInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *GetBucketLocationInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *GetBucketLocationInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s GetBucketLocationInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type GetBucketLocationOutput struct { - _ struct{} `type:"structure"` - - // Specifies the Region where the bucket resides. For a list of all the Amazon - // S3 supported location constraints by Region, see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region). - // Buckets in Region us-east-1 have a LocationConstraint of null. - LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketLocationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketLocationOutput) GoString() string { - return s.String() -} - -// SetLocationConstraint sets the LocationConstraint field's value. -func (s *GetBucketLocationOutput) SetLocationConstraint(v string) *GetBucketLocationOutput { - s.LocationConstraint = &v - return s -} - -type GetBucketLoggingInput struct { - _ struct{} `locationName:"GetBucketLoggingRequest" type:"structure"` - - // The bucket name for which to get the logging information. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 GetBucketLoggingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketLoggingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBucketLoggingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBucketLoggingInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *GetBucketLoggingInput) SetBucket(v string) *GetBucketLoggingInput { - s.Bucket = &v - return s -} - -func (s *GetBucketLoggingInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *GetBucketLoggingInput) SetExpectedBucketOwner(v string) *GetBucketLoggingInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *GetBucketLoggingInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *GetBucketLoggingInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s GetBucketLoggingInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type GetBucketLoggingOutput struct { - _ struct{} `type:"structure"` - - // Describes where logs are stored and the prefix that Amazon S3 assigns to - // all log object keys for a bucket. For more information, see PUT Bucket logging - // (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html) - // in the Amazon S3 API Reference. - LoggingEnabled *LoggingEnabled `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 GetBucketLoggingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketLoggingOutput) GoString() string { - return s.String() -} - -// SetLoggingEnabled sets the LoggingEnabled field's value. -func (s *GetBucketLoggingOutput) SetLoggingEnabled(v *LoggingEnabled) *GetBucketLoggingOutput { - s.LoggingEnabled = v - return s -} - -type GetBucketMetricsConfigurationInput struct { - _ struct{} `locationName:"GetBucketMetricsConfigurationRequest" type:"structure"` - - // The name of the bucket containing the metrics configuration to retrieve. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // The ID used to identify the metrics configuration. The ID has a 64 character - // limit and can only contain letters, numbers, periods, dashes, and underscores. - // - // Id is a required field - Id *string `location:"querystring" locationName:"id" 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 GetBucketMetricsConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketMetricsConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBucketMetricsConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBucketMetricsConfigurationInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *GetBucketMetricsConfigurationInput) SetBucket(v string) *GetBucketMetricsConfigurationInput { - s.Bucket = &v - return s -} - -func (s *GetBucketMetricsConfigurationInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *GetBucketMetricsConfigurationInput) SetExpectedBucketOwner(v string) *GetBucketMetricsConfigurationInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetId sets the Id field's value. -func (s *GetBucketMetricsConfigurationInput) SetId(v string) *GetBucketMetricsConfigurationInput { - s.Id = &v - return s -} - -func (s *GetBucketMetricsConfigurationInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *GetBucketMetricsConfigurationInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s GetBucketMetricsConfigurationInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type GetBucketMetricsConfigurationOutput struct { - _ struct{} `type:"structure" payload:"MetricsConfiguration"` - - // Specifies the metrics configuration. - MetricsConfiguration *MetricsConfiguration `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 GetBucketMetricsConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketMetricsConfigurationOutput) GoString() string { - return s.String() -} - -// SetMetricsConfiguration sets the MetricsConfiguration field's value. -func (s *GetBucketMetricsConfigurationOutput) SetMetricsConfiguration(v *MetricsConfiguration) *GetBucketMetricsConfigurationOutput { - s.MetricsConfiguration = v - return s -} - -type GetBucketNotificationConfigurationRequest struct { - _ struct{} `locationName:"GetBucketNotificationConfigurationRequest" type:"structure"` - - // The name of the bucket for which to get the notification configuration. - // - // When you use this API operation with an access point, provide the alias of - // the access point in place of the bucket name. - // - // When you use this API operation with an Object Lambda access point, provide - // the alias of the Object Lambda access point in place of the bucket name. - // If the Object Lambda access point alias in a request is not valid, the error - // code InvalidAccessPointAliasError is returned. For more information about - // InvalidAccessPointAliasError, see List of Error Codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList). - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 GetBucketNotificationConfigurationRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketNotificationConfigurationRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBucketNotificationConfigurationRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBucketNotificationConfigurationRequest"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *GetBucketNotificationConfigurationRequest) SetBucket(v string) *GetBucketNotificationConfigurationRequest { - s.Bucket = &v - return s -} - -func (s *GetBucketNotificationConfigurationRequest) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *GetBucketNotificationConfigurationRequest) SetExpectedBucketOwner(v string) *GetBucketNotificationConfigurationRequest { - s.ExpectedBucketOwner = &v - return s -} - -func (s *GetBucketNotificationConfigurationRequest) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *GetBucketNotificationConfigurationRequest) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s GetBucketNotificationConfigurationRequest) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type GetBucketOwnershipControlsInput struct { - _ struct{} `locationName:"GetBucketOwnershipControlsRequest" type:"structure"` - - // The name of the Amazon S3 bucket whose OwnershipControls you want to retrieve. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 GetBucketOwnershipControlsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketOwnershipControlsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBucketOwnershipControlsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBucketOwnershipControlsInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *GetBucketOwnershipControlsInput) SetBucket(v string) *GetBucketOwnershipControlsInput { - s.Bucket = &v - return s -} - -func (s *GetBucketOwnershipControlsInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *GetBucketOwnershipControlsInput) SetExpectedBucketOwner(v string) *GetBucketOwnershipControlsInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *GetBucketOwnershipControlsInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *GetBucketOwnershipControlsInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s GetBucketOwnershipControlsInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type GetBucketOwnershipControlsOutput struct { - _ struct{} `type:"structure" payload:"OwnershipControls"` - - // The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or ObjectWriter) - // currently in effect for this Amazon S3 bucket. - OwnershipControls *OwnershipControls `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 GetBucketOwnershipControlsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketOwnershipControlsOutput) GoString() string { - return s.String() -} - -// SetOwnershipControls sets the OwnershipControls field's value. -func (s *GetBucketOwnershipControlsOutput) SetOwnershipControls(v *OwnershipControls) *GetBucketOwnershipControlsOutput { - s.OwnershipControls = v - return s -} - -type GetBucketPolicyInput struct { - _ struct{} `locationName:"GetBucketPolicyRequest" type:"structure"` - - // The bucket name to get the bucket policy for. - // - // Directory buckets - When you use this operation with a directory bucket, - // you must use path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name - // . Virtual-hosted-style requests aren't supported. Directory bucket names - // must be unique in the chosen Availability Zone. Bucket names must also follow - // the format bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). - // For information about bucket naming restrictions, see Directory bucket naming - // rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html) - // in the Amazon S3 User Guide - // - // Access points - When you use this API operation with an access point, provide - // the alias of the access point in place of the bucket name. - // - // Object Lambda access points - When you use this API operation with an Object - // Lambda access point, provide the alias of the Object Lambda access point - // in place of the bucket name. If the Object Lambda access point alias in a - // request is not valid, the error code InvalidAccessPointAliasError is returned. - // For more information about InvalidAccessPointAliasError, see List of Error - // Codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList). - // - // Access points and Object Lambda access points are not supported by directory - // buckets. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - // - // For directory buckets, this header is not supported in this API operation. - // If you specify this header, the request fails with the HTTP status code 501 - // Not Implemented. - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 GetBucketPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBucketPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBucketPolicyInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *GetBucketPolicyInput) SetBucket(v string) *GetBucketPolicyInput { - s.Bucket = &v - return s -} - -func (s *GetBucketPolicyInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *GetBucketPolicyInput) SetExpectedBucketOwner(v string) *GetBucketPolicyInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *GetBucketPolicyInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *GetBucketPolicyInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s GetBucketPolicyInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type GetBucketPolicyOutput struct { - _ struct{} `type:"structure" payload:"Policy"` - - // The bucket policy as a JSON document. - Policy *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 GetBucketPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketPolicyOutput) GoString() string { - return s.String() -} - -// SetPolicy sets the Policy field's value. -func (s *GetBucketPolicyOutput) SetPolicy(v string) *GetBucketPolicyOutput { - s.Policy = &v - return s -} - -type GetBucketPolicyStatusInput struct { - _ struct{} `locationName:"GetBucketPolicyStatusRequest" type:"structure"` - - // The name of the Amazon S3 bucket whose policy status you want to retrieve. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 GetBucketPolicyStatusInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketPolicyStatusInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBucketPolicyStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBucketPolicyStatusInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *GetBucketPolicyStatusInput) SetBucket(v string) *GetBucketPolicyStatusInput { - s.Bucket = &v - return s -} - -func (s *GetBucketPolicyStatusInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *GetBucketPolicyStatusInput) SetExpectedBucketOwner(v string) *GetBucketPolicyStatusInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *GetBucketPolicyStatusInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *GetBucketPolicyStatusInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s GetBucketPolicyStatusInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type GetBucketPolicyStatusOutput struct { - _ struct{} `type:"structure" payload:"PolicyStatus"` - - // The policy status for the specified bucket. - PolicyStatus *PolicyStatus `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 GetBucketPolicyStatusOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketPolicyStatusOutput) GoString() string { - return s.String() -} - -// SetPolicyStatus sets the PolicyStatus field's value. -func (s *GetBucketPolicyStatusOutput) SetPolicyStatus(v *PolicyStatus) *GetBucketPolicyStatusOutput { - s.PolicyStatus = v - return s -} - -type GetBucketReplicationInput struct { - _ struct{} `locationName:"GetBucketReplicationRequest" type:"structure"` - - // The bucket name for which to get the replication information. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 GetBucketReplicationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketReplicationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBucketReplicationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBucketReplicationInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *GetBucketReplicationInput) SetBucket(v string) *GetBucketReplicationInput { - s.Bucket = &v - return s -} - -func (s *GetBucketReplicationInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *GetBucketReplicationInput) SetExpectedBucketOwner(v string) *GetBucketReplicationInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *GetBucketReplicationInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *GetBucketReplicationInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s GetBucketReplicationInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type GetBucketReplicationOutput struct { - _ struct{} `type:"structure" payload:"ReplicationConfiguration"` - - // A container for replication rules. You can add up to 1,000 rules. The maximum - // size of a replication configuration is 2 MB. - ReplicationConfiguration *ReplicationConfiguration `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 GetBucketReplicationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketReplicationOutput) GoString() string { - return s.String() -} - -// SetReplicationConfiguration sets the ReplicationConfiguration field's value. -func (s *GetBucketReplicationOutput) SetReplicationConfiguration(v *ReplicationConfiguration) *GetBucketReplicationOutput { - s.ReplicationConfiguration = v - return s -} - -type GetBucketRequestPaymentInput struct { - _ struct{} `locationName:"GetBucketRequestPaymentRequest" type:"structure"` - - // The name of the bucket for which to get the payment request configuration - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 GetBucketRequestPaymentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketRequestPaymentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBucketRequestPaymentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBucketRequestPaymentInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *GetBucketRequestPaymentInput) SetBucket(v string) *GetBucketRequestPaymentInput { - s.Bucket = &v - return s -} - -func (s *GetBucketRequestPaymentInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *GetBucketRequestPaymentInput) SetExpectedBucketOwner(v string) *GetBucketRequestPaymentInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *GetBucketRequestPaymentInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *GetBucketRequestPaymentInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s GetBucketRequestPaymentInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type GetBucketRequestPaymentOutput struct { - _ struct{} `type:"structure"` - - // Specifies who pays for the download and request fees. - Payer *string `type:"string" enum:"Payer"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketRequestPaymentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketRequestPaymentOutput) GoString() string { - return s.String() -} - -// SetPayer sets the Payer field's value. -func (s *GetBucketRequestPaymentOutput) SetPayer(v string) *GetBucketRequestPaymentOutput { - s.Payer = &v - return s -} - -type GetBucketTaggingInput struct { - _ struct{} `locationName:"GetBucketTaggingRequest" type:"structure"` - - // The name of the bucket for which to get the tagging information. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 GetBucketTaggingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketTaggingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBucketTaggingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBucketTaggingInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *GetBucketTaggingInput) SetBucket(v string) *GetBucketTaggingInput { - s.Bucket = &v - return s -} - -func (s *GetBucketTaggingInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *GetBucketTaggingInput) SetExpectedBucketOwner(v string) *GetBucketTaggingInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *GetBucketTaggingInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *GetBucketTaggingInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s GetBucketTaggingInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type GetBucketTaggingOutput struct { - _ struct{} `type:"structure"` - - // Contains the tag set. - // - // TagSet is a required field - TagSet []*Tag `locationNameList:"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 GetBucketTaggingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketTaggingOutput) GoString() string { - return s.String() -} - -// SetTagSet sets the TagSet field's value. -func (s *GetBucketTaggingOutput) SetTagSet(v []*Tag) *GetBucketTaggingOutput { - s.TagSet = v - return s -} - -type GetBucketVersioningInput struct { - _ struct{} `locationName:"GetBucketVersioningRequest" type:"structure"` - - // The name of the bucket for which to get the versioning information. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 GetBucketVersioningInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketVersioningInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBucketVersioningInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBucketVersioningInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *GetBucketVersioningInput) SetBucket(v string) *GetBucketVersioningInput { - s.Bucket = &v - return s -} - -func (s *GetBucketVersioningInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *GetBucketVersioningInput) SetExpectedBucketOwner(v string) *GetBucketVersioningInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *GetBucketVersioningInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *GetBucketVersioningInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s GetBucketVersioningInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type GetBucketVersioningOutput struct { - _ struct{} `type:"structure"` - - // Specifies whether MFA delete is enabled in the bucket versioning configuration. - // This element is only returned if the bucket has been configured with MFA - // delete. If the bucket has never been so configured, this element is not returned. - MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADeleteStatus"` - - // The versioning state of the bucket. - Status *string `type:"string" enum:"BucketVersioningStatus"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketVersioningOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketVersioningOutput) GoString() string { - return s.String() -} - -// SetMFADelete sets the MFADelete field's value. -func (s *GetBucketVersioningOutput) SetMFADelete(v string) *GetBucketVersioningOutput { - s.MFADelete = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *GetBucketVersioningOutput) SetStatus(v string) *GetBucketVersioningOutput { - s.Status = &v - return s -} - -type GetBucketWebsiteInput struct { - _ struct{} `locationName:"GetBucketWebsiteRequest" type:"structure"` - - // The bucket name for which to get the website configuration. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 GetBucketWebsiteInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketWebsiteInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetBucketWebsiteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBucketWebsiteInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *GetBucketWebsiteInput) SetBucket(v string) *GetBucketWebsiteInput { - s.Bucket = &v - return s -} - -func (s *GetBucketWebsiteInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *GetBucketWebsiteInput) SetExpectedBucketOwner(v string) *GetBucketWebsiteInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *GetBucketWebsiteInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *GetBucketWebsiteInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s GetBucketWebsiteInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type GetBucketWebsiteOutput struct { - _ struct{} `type:"structure"` - - // The object key name of the website error document to use for 4XX class errors. - ErrorDocument *ErrorDocument `type:"structure"` - - // The name of the index document for the website (for example index.html). - IndexDocument *IndexDocument `type:"structure"` - - // Specifies the redirect behavior of all requests to a website endpoint of - // an Amazon S3 bucket. - RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"` - - // Rules that define when a redirect is applied and the redirect behavior. - RoutingRules []*RoutingRule `locationNameList:"RoutingRule" 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 GetBucketWebsiteOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetBucketWebsiteOutput) GoString() string { - return s.String() -} - -// SetErrorDocument sets the ErrorDocument field's value. -func (s *GetBucketWebsiteOutput) SetErrorDocument(v *ErrorDocument) *GetBucketWebsiteOutput { - s.ErrorDocument = v - return s -} - -// SetIndexDocument sets the IndexDocument field's value. -func (s *GetBucketWebsiteOutput) SetIndexDocument(v *IndexDocument) *GetBucketWebsiteOutput { - s.IndexDocument = v - return s -} - -// SetRedirectAllRequestsTo sets the RedirectAllRequestsTo field's value. -func (s *GetBucketWebsiteOutput) SetRedirectAllRequestsTo(v *RedirectAllRequestsTo) *GetBucketWebsiteOutput { - s.RedirectAllRequestsTo = v - return s -} - -// SetRoutingRules sets the RoutingRules field's value. -func (s *GetBucketWebsiteOutput) SetRoutingRules(v []*RoutingRule) *GetBucketWebsiteOutput { - s.RoutingRules = v - return s -} - -type GetObjectAclInput struct { - _ struct{} `locationName:"GetObjectAclRequest" type:"structure"` - - // The bucket name that contains the object for which to get the ACL information. - // - // Access points - When you use this action with an access point, you must provide - // the alias of the access point in place of the bucket name or specify the - // access point ARN. When using the access point ARN, you must direct requests - // to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this action with an access point through the Amazon Web Services - // SDKs, you provide the access point ARN in place of the bucket name. For more - // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // The key of the object for which to get the ACL information. - // - // Key is a required field - Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - - // Confirms that the requester knows that they will be charged for the request. - // Bucket owners need not specify this parameter in their requests. If either - // the source or destination S3 bucket has Requester Pays enabled, the requester - // will pay for corresponding charges to copy the object. For information about - // downloading objects from Requester Pays buckets, see Downloading Objects - // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` - - // Version ID used to reference a specific version of the object. - // - // This functionality is not supported for directory buckets. - VersionId *string `location:"querystring" locationName:"versionId" 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 GetObjectAclInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetObjectAclInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetObjectAclInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetObjectAclInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - 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 -} - -// SetBucket sets the Bucket field's value. -func (s *GetObjectAclInput) SetBucket(v string) *GetObjectAclInput { - s.Bucket = &v - return s -} - -func (s *GetObjectAclInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *GetObjectAclInput) SetExpectedBucketOwner(v string) *GetObjectAclInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetKey sets the Key field's value. -func (s *GetObjectAclInput) SetKey(v string) *GetObjectAclInput { - s.Key = &v - return s -} - -// SetRequestPayer sets the RequestPayer field's value. -func (s *GetObjectAclInput) SetRequestPayer(v string) *GetObjectAclInput { - s.RequestPayer = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *GetObjectAclInput) SetVersionId(v string) *GetObjectAclInput { - s.VersionId = &v - return s -} - -func (s *GetObjectAclInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *GetObjectAclInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s GetObjectAclInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type GetObjectAclOutput struct { - _ struct{} `type:"structure"` - - // A list of grants. - Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"` - - // Container for the bucket owner's display name and ID. - Owner *Owner `type:"structure"` - - // If present, indicates that the requester was successfully charged for the - // request. - // - // This functionality is not supported for directory buckets. - RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetObjectAclOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetObjectAclOutput) GoString() string { - return s.String() -} - -// SetGrants sets the Grants field's value. -func (s *GetObjectAclOutput) SetGrants(v []*Grant) *GetObjectAclOutput { - s.Grants = v - return s -} - -// SetOwner sets the Owner field's value. -func (s *GetObjectAclOutput) SetOwner(v *Owner) *GetObjectAclOutput { - s.Owner = v - return s -} - -// SetRequestCharged sets the RequestCharged field's value. -func (s *GetObjectAclOutput) SetRequestCharged(v string) *GetObjectAclOutput { - s.RequestCharged = &v - return s -} - -type GetObjectAttributesInput struct { - _ struct{} `locationName:"GetObjectAttributesRequest" type:"structure"` - - // The name of the bucket that contains the object. - // - // Directory buckets - When you use this operation with a directory bucket, - // you must use virtual-hosted-style requests in the format Bucket_name.s3express-az_id.region.amazonaws.com. - // Path-style requests are not supported. Directory bucket names must be unique - // in the chosen Availability Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 - // (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about - // bucket naming restrictions, see Directory bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html) - // in the Amazon S3 User Guide. - // - // Access points - When you use this action with an access point, you must provide - // the alias of the access point in place of the bucket name or specify the - // access point ARN. When using the access point ARN, you must direct requests - // to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this action with an access point through the Amazon Web Services - // SDKs, you provide the access point ARN in place of the bucket name. For more - // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. - // - // Access points and Object Lambda access points are not supported by directory - // buckets. - // - // S3 on Outposts - When you use this action with Amazon S3 on Outposts, you - // must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname - // takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. - // When you use this action with S3 on Outposts through the Amazon Web Services - // SDKs, you provide the Outposts access point ARN in place of the bucket name. - // For more information about S3 on Outposts ARNs, see What is S3 on Outposts? - // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) - // in the Amazon S3 User Guide. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // The object key. - // - // Key is a required field - Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - - // Sets the maximum number of parts to return. - MaxParts *int64 `location:"header" locationName:"x-amz-max-parts" type:"integer"` - - // Specifies the fields at the root level that you want returned in the response. - // Fields that you do not specify are not returned. - // - // ObjectAttributes is a required field - ObjectAttributes []*string `location:"header" locationName:"x-amz-object-attributes" type:"list" required:"true" enum:"ObjectAttributes"` - - // Specifies the part after which listing should begin. Only parts with higher - // part numbers will be listed. - PartNumberMarker *int64 `location:"header" locationName:"x-amz-part-number-marker" type:"integer"` - - // Confirms that the requester knows that they will be charged for the request. - // Bucket owners need not specify this parameter in their requests. If either - // the source or destination S3 bucket has Requester Pays enabled, the requester - // will pay for corresponding charges to copy the object. For information about - // downloading objects from Requester Pays buckets, see Downloading Objects - // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` - - // Specifies the algorithm to use when encrypting the object (for example, AES256). - // - // This functionality is not supported for directory buckets. - SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` - - // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting - // data. This value is used to store the object and then it is discarded; Amazon - // S3 does not store the encryption key. The key must be appropriate for use - // with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm - // header. - // - // This functionality is not supported for directory buckets. - // - // SSECustomerKey is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by GetObjectAttributesInput's - // String and GoString methods. - SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"` - - // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. - // Amazon S3 uses this header for a message integrity check to ensure that the - // encryption key was transmitted without error. - // - // This functionality is not supported for directory buckets. - SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` - - // The version ID used to reference a specific version of the object. - // - // S3 Versioning isn't enabled and supported for directory buckets. For this - // API operation, only the null value of the version ID is supported by directory - // buckets. You can only specify null to the versionId query parameter in the - // request. - VersionId *string `location:"querystring" locationName:"versionId" 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 GetObjectAttributesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetObjectAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetObjectAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetObjectAttributesInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - 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.ObjectAttributes == nil { - invalidParams.Add(request.NewErrParamRequired("ObjectAttributes")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *GetObjectAttributesInput) SetBucket(v string) *GetObjectAttributesInput { - s.Bucket = &v - return s -} - -func (s *GetObjectAttributesInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *GetObjectAttributesInput) SetExpectedBucketOwner(v string) *GetObjectAttributesInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetKey sets the Key field's value. -func (s *GetObjectAttributesInput) SetKey(v string) *GetObjectAttributesInput { - s.Key = &v - return s -} - -// SetMaxParts sets the MaxParts field's value. -func (s *GetObjectAttributesInput) SetMaxParts(v int64) *GetObjectAttributesInput { - s.MaxParts = &v - return s -} - -// SetObjectAttributes sets the ObjectAttributes field's value. -func (s *GetObjectAttributesInput) SetObjectAttributes(v []*string) *GetObjectAttributesInput { - s.ObjectAttributes = v - return s -} - -// SetPartNumberMarker sets the PartNumberMarker field's value. -func (s *GetObjectAttributesInput) SetPartNumberMarker(v int64) *GetObjectAttributesInput { - s.PartNumberMarker = &v - return s -} - -// SetRequestPayer sets the RequestPayer field's value. -func (s *GetObjectAttributesInput) SetRequestPayer(v string) *GetObjectAttributesInput { - s.RequestPayer = &v - return s -} - -// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. -func (s *GetObjectAttributesInput) SetSSECustomerAlgorithm(v string) *GetObjectAttributesInput { - s.SSECustomerAlgorithm = &v - return s -} - -// SetSSECustomerKey sets the SSECustomerKey field's value. -func (s *GetObjectAttributesInput) SetSSECustomerKey(v string) *GetObjectAttributesInput { - s.SSECustomerKey = &v - return s -} - -func (s *GetObjectAttributesInput) getSSECustomerKey() (v string) { - if s.SSECustomerKey == nil { - return v - } - return *s.SSECustomerKey -} - -// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. -func (s *GetObjectAttributesInput) SetSSECustomerKeyMD5(v string) *GetObjectAttributesInput { - s.SSECustomerKeyMD5 = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *GetObjectAttributesInput) SetVersionId(v string) *GetObjectAttributesInput { - s.VersionId = &v - return s -} - -func (s *GetObjectAttributesInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *GetObjectAttributesInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s GetObjectAttributesInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type GetObjectAttributesOutput struct { - _ struct{} `type:"structure"` - - // The checksum or digest of the object. - Checksum *Checksum `type:"structure"` - - // Specifies whether the object retrieved was (true) or was not (false) a delete - // marker. If false, this response header does not appear in the response. - // - // This functionality is not supported for directory buckets. - DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"` - - // An ETag is an opaque identifier assigned by a web server to a specific version - // of a resource found at a URL. - ETag *string `type:"string"` - - // The creation date of the object. - LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"` - - // A collection of parts associated with a multipart upload. - ObjectParts *GetObjectAttributesParts `type:"structure"` - - // The size of the object in bytes. - ObjectSize *int64 `type:"long"` - - // If present, indicates that the requester was successfully charged for the - // request. - // - // This functionality is not supported for directory buckets. - RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` - - // Provides the storage class information of the object. Amazon S3 returns this - // header for all objects except for S3 Standard storage class objects. - // - // For more information, see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html). - // - // Directory buckets - Only the S3 Express One Zone storage class is supported - // by directory buckets to store objects. - StorageClass *string `type:"string" enum:"StorageClass"` - - // The version ID of the object. - // - // This functionality is not supported for directory buckets. - VersionId *string `location:"header" locationName:"x-amz-version-id" 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 GetObjectAttributesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetObjectAttributesOutput) GoString() string { - return s.String() -} - -// SetChecksum sets the Checksum field's value. -func (s *GetObjectAttributesOutput) SetChecksum(v *Checksum) *GetObjectAttributesOutput { - s.Checksum = v - return s -} - -// SetDeleteMarker sets the DeleteMarker field's value. -func (s *GetObjectAttributesOutput) SetDeleteMarker(v bool) *GetObjectAttributesOutput { - s.DeleteMarker = &v - return s -} - -// SetETag sets the ETag field's value. -func (s *GetObjectAttributesOutput) SetETag(v string) *GetObjectAttributesOutput { - s.ETag = &v - return s -} - -// SetLastModified sets the LastModified field's value. -func (s *GetObjectAttributesOutput) SetLastModified(v time.Time) *GetObjectAttributesOutput { - s.LastModified = &v - return s -} - -// SetObjectParts sets the ObjectParts field's value. -func (s *GetObjectAttributesOutput) SetObjectParts(v *GetObjectAttributesParts) *GetObjectAttributesOutput { - s.ObjectParts = v - return s -} - -// SetObjectSize sets the ObjectSize field's value. -func (s *GetObjectAttributesOutput) SetObjectSize(v int64) *GetObjectAttributesOutput { - s.ObjectSize = &v - return s -} - -// SetRequestCharged sets the RequestCharged field's value. -func (s *GetObjectAttributesOutput) SetRequestCharged(v string) *GetObjectAttributesOutput { - s.RequestCharged = &v - return s -} - -// SetStorageClass sets the StorageClass field's value. -func (s *GetObjectAttributesOutput) SetStorageClass(v string) *GetObjectAttributesOutput { - s.StorageClass = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *GetObjectAttributesOutput) SetVersionId(v string) *GetObjectAttributesOutput { - s.VersionId = &v - return s -} - -// A collection of parts associated with a multipart upload. -type GetObjectAttributesParts struct { - _ struct{} `type:"structure"` - - // Indicates whether the returned list of parts is truncated. A value of true - // indicates that the list was truncated. A list can be truncated if the number - // of parts exceeds the limit returned in the MaxParts element. - IsTruncated *bool `type:"boolean"` - - // The maximum number of parts allowed in the response. - MaxParts *int64 `type:"integer"` - - // When a list is truncated, this element specifies the last part in the list, - // as well as the value to use for the PartNumberMarker request parameter in - // a subsequent request. - NextPartNumberMarker *int64 `type:"integer"` - - // The marker for the current part. - PartNumberMarker *int64 `type:"integer"` - - // A container for elements related to a particular part. A response can contain - // zero or more Parts elements. - // - // * General purpose buckets - For GetObjectAttributes, if a additional checksum - // (including x-amz-checksum-crc32, x-amz-checksum-crc32c, x-amz-checksum-sha1, - // or x-amz-checksum-sha256) isn't applied to the object specified in the - // request, the response doesn't return Part. - // - // * Directory buckets - For GetObjectAttributes, no matter whether a additional - // checksum is applied to the object specified in the request, the response - // returns Part. - Parts []*ObjectPart `locationName:"Part" type:"list" flattened:"true"` - - // The total number of parts. - TotalPartsCount *int64 `locationName:"PartsCount" 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 GetObjectAttributesParts) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetObjectAttributesParts) GoString() string { - return s.String() -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *GetObjectAttributesParts) SetIsTruncated(v bool) *GetObjectAttributesParts { - s.IsTruncated = &v - return s -} - -// SetMaxParts sets the MaxParts field's value. -func (s *GetObjectAttributesParts) SetMaxParts(v int64) *GetObjectAttributesParts { - s.MaxParts = &v - return s -} - -// SetNextPartNumberMarker sets the NextPartNumberMarker field's value. -func (s *GetObjectAttributesParts) SetNextPartNumberMarker(v int64) *GetObjectAttributesParts { - s.NextPartNumberMarker = &v - return s -} - -// SetPartNumberMarker sets the PartNumberMarker field's value. -func (s *GetObjectAttributesParts) SetPartNumberMarker(v int64) *GetObjectAttributesParts { - s.PartNumberMarker = &v - return s -} - -// SetParts sets the Parts field's value. -func (s *GetObjectAttributesParts) SetParts(v []*ObjectPart) *GetObjectAttributesParts { - s.Parts = v - return s -} - -// SetTotalPartsCount sets the TotalPartsCount field's value. -func (s *GetObjectAttributesParts) SetTotalPartsCount(v int64) *GetObjectAttributesParts { - s.TotalPartsCount = &v - return s -} - -type GetObjectInput struct { - _ struct{} `locationName:"GetObjectRequest" type:"structure"` - - // The bucket name containing the object. - // - // Directory buckets - When you use this operation with a directory bucket, - // you must use virtual-hosted-style requests in the format Bucket_name.s3express-az_id.region.amazonaws.com. - // Path-style requests are not supported. Directory bucket names must be unique - // in the chosen Availability Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 - // (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about - // bucket naming restrictions, see Directory bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html) - // in the Amazon S3 User Guide. - // - // Access points - When you use this action with an access point, you must provide - // the alias of the access point in place of the bucket name or specify the - // access point ARN. When using the access point ARN, you must direct requests - // to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this action with an access point through the Amazon Web Services - // SDKs, you provide the access point ARN in place of the bucket name. For more - // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. - // - // Object Lambda access points - When you use this action with an Object Lambda - // access point, you must direct requests to the Object Lambda access point - // hostname. The Object Lambda access point hostname takes the form AccessPointName-AccountId.s3-object-lambda.Region.amazonaws.com. - // - // Access points and Object Lambda access points are not supported by directory - // buckets. - // - // S3 on Outposts - When you use this action with Amazon S3 on Outposts, you - // must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname - // takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. - // When you use this action with S3 on Outposts through the Amazon Web Services - // SDKs, you provide the Outposts access point ARN in place of the bucket name. - // For more information about S3 on Outposts ARNs, see What is S3 on Outposts? - // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) - // in the Amazon S3 User Guide. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // To retrieve the checksum, this mode must be enabled. - // - // The AWS SDK for Go v1 does not support automatic response payload checksum - // validation. This feature is available in the AWS SDK for Go v2. - ChecksumMode *string `location:"header" locationName:"x-amz-checksum-mode" type:"string" enum:"ChecksumMode"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // Return the object only if its entity tag (ETag) is the same as the one specified - // in this header; otherwise, return a 412 Precondition Failed error. - // - // If both of the If-Match and If-Unmodified-Since headers are present in the - // request as follows: If-Match condition evaluates to true, and; If-Unmodified-Since - // condition evaluates to false; then, S3 returns 200 OK and the data requested. - // - // For more information about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232). - IfMatch *string `location:"header" locationName:"If-Match" type:"string"` - - // Return the object only if it has been modified since the specified time; - // otherwise, return a 304 Not Modified error. - // - // If both of the If-None-Match and If-Modified-Since headers are present in - // the request as follows:If-None-Match condition evaluates to false, and; If-Modified-Since - // condition evaluates to true; then, S3 returns 304 Not Modified status code. - // - // For more information about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232). - IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp"` - - // Return the object only if its entity tag (ETag) is different from the one - // specified in this header; otherwise, return a 304 Not Modified error. - // - // If both of the If-None-Match and If-Modified-Since headers are present in - // the request as follows:If-None-Match condition evaluates to false, and; If-Modified-Since - // condition evaluates to true; then, S3 returns 304 Not Modified HTTP status - // code. - // - // For more information about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232). - IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"` - - // Return the object only if it has not been modified since the specified time; - // otherwise, return a 412 Precondition Failed error. - // - // If both of the If-Match and If-Unmodified-Since headers are present in the - // request as follows: If-Match condition evaluates to true, and; If-Unmodified-Since - // condition evaluates to false; then, S3 returns 200 OK and the data requested. - // - // For more information about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232). - IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp"` - - // Key of the object to get. - // - // Key is a required field - Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - - // Part number of the object being read. This is a positive integer between - // 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified. - // Useful for downloading just a part of an object. - PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"` - - // Downloads the specified byte range of an object. For more information about - // the HTTP Range header, see https://www.rfc-editor.org/rfc/rfc9110.html#name-range - // (https://www.rfc-editor.org/rfc/rfc9110.html#name-range). - // - // Amazon S3 doesn't support retrieving multiple ranges of data per GET request. - Range *string `location:"header" locationName:"Range" type:"string"` - - // Confirms that the requester knows that they will be charged for the request. - // Bucket owners need not specify this parameter in their requests. If either - // the source or destination S3 bucket has Requester Pays enabled, the requester - // will pay for corresponding charges to copy the object. For information about - // downloading objects from Requester Pays buckets, see Downloading Objects - // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` - - // Sets the Cache-Control header of the response. - ResponseCacheControl *string `location:"querystring" locationName:"response-cache-control" type:"string"` - - // Sets the Content-Disposition header of the response. - ResponseContentDisposition *string `location:"querystring" locationName:"response-content-disposition" type:"string"` - - // Sets the Content-Encoding header of the response. - ResponseContentEncoding *string `location:"querystring" locationName:"response-content-encoding" type:"string"` - - // Sets the Content-Language header of the response. - ResponseContentLanguage *string `location:"querystring" locationName:"response-content-language" type:"string"` - - // Sets the Content-Type header of the response. - ResponseContentType *string `location:"querystring" locationName:"response-content-type" type:"string"` - - // Sets the Expires header of the response. - ResponseExpires *time.Time `location:"querystring" locationName:"response-expires" type:"timestamp" timestampFormat:"rfc822"` - - // Specifies the algorithm to use when decrypting the object (for example, AES256). - // - // If you encrypt an object by using server-side encryption with customer-provided - // encryption keys (SSE-C) when you store the object in Amazon S3, then when - // you GET the object, you must use the following headers: - // - // * x-amz-server-side-encryption-customer-algorithm - // - // * x-amz-server-side-encryption-customer-key - // - // * x-amz-server-side-encryption-customer-key-MD5 - // - // For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided - // Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` - - // Specifies the customer-provided encryption key that you originally provided - // for Amazon S3 to encrypt the data before storing it. This value is used to - // decrypt the object when recovering it and must match the one used when storing - // the data. The key must be appropriate for use with the algorithm specified - // in the x-amz-server-side-encryption-customer-algorithm header. - // - // If you encrypt an object by using server-side encryption with customer-provided - // encryption keys (SSE-C) when you store the object in Amazon S3, then when - // you GET the object, you must use the following headers: - // - // * x-amz-server-side-encryption-customer-algorithm - // - // * x-amz-server-side-encryption-customer-key - // - // * x-amz-server-side-encryption-customer-key-MD5 - // - // For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided - // Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - // - // SSECustomerKey is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by GetObjectInput's - // String and GoString methods. - SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"` - - // Specifies the 128-bit MD5 digest of the customer-provided encryption key - // according to RFC 1321. Amazon S3 uses this header for a message integrity - // check to ensure that the encryption key was transmitted without error. - // - // If you encrypt an object by using server-side encryption with customer-provided - // encryption keys (SSE-C) when you store the object in Amazon S3, then when - // you GET the object, you must use the following headers: - // - // * x-amz-server-side-encryption-customer-algorithm - // - // * x-amz-server-side-encryption-customer-key - // - // * x-amz-server-side-encryption-customer-key-MD5 - // - // For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided - // Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` - - // Version ID used to reference a specific version of the object. - // - // By default, the GetObject operation returns the current version of an object. - // To return a different version, use the versionId subresource. - // - // * If you include a versionId in your request header, you must have the - // s3:GetObjectVersion permission to access a specific version of an object. - // The s3:GetObject permission is not required in this scenario. - // - // * If you request the current version of an object without a specific versionId - // in the request header, only the s3:GetObject permission is required. The - // s3:GetObjectVersion permission is not required in this scenario. - // - // * Directory buckets - S3 Versioning isn't enabled and supported for directory - // buckets. For this API operation, only the null value of the version ID - // is supported by directory buckets. You can only specify null to the versionId - // query parameter in the request. - // - // For more information about versioning, see PutBucketVersioning (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html). - VersionId *string `location:"querystring" locationName:"versionId" 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 GetObjectInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetObjectInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetObjectInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetObjectInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - 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 -} - -// SetBucket sets the Bucket field's value. -func (s *GetObjectInput) SetBucket(v string) *GetObjectInput { - s.Bucket = &v - return s -} - -func (s *GetObjectInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetChecksumMode sets the ChecksumMode field's value. -func (s *GetObjectInput) SetChecksumMode(v string) *GetObjectInput { - s.ChecksumMode = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *GetObjectInput) SetExpectedBucketOwner(v string) *GetObjectInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *GetObjectInput) SetIfMatch(v string) *GetObjectInput { - s.IfMatch = &v - return s -} - -// SetIfModifiedSince sets the IfModifiedSince field's value. -func (s *GetObjectInput) SetIfModifiedSince(v time.Time) *GetObjectInput { - s.IfModifiedSince = &v - return s -} - -// SetIfNoneMatch sets the IfNoneMatch field's value. -func (s *GetObjectInput) SetIfNoneMatch(v string) *GetObjectInput { - s.IfNoneMatch = &v - return s -} - -// SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value. -func (s *GetObjectInput) SetIfUnmodifiedSince(v time.Time) *GetObjectInput { - s.IfUnmodifiedSince = &v - return s -} - -// SetKey sets the Key field's value. -func (s *GetObjectInput) SetKey(v string) *GetObjectInput { - s.Key = &v - return s -} - -// SetPartNumber sets the PartNumber field's value. -func (s *GetObjectInput) SetPartNumber(v int64) *GetObjectInput { - s.PartNumber = &v - return s -} - -// SetRange sets the Range field's value. -func (s *GetObjectInput) SetRange(v string) *GetObjectInput { - s.Range = &v - return s -} - -// SetRequestPayer sets the RequestPayer field's value. -func (s *GetObjectInput) SetRequestPayer(v string) *GetObjectInput { - s.RequestPayer = &v - return s -} - -// SetResponseCacheControl sets the ResponseCacheControl field's value. -func (s *GetObjectInput) SetResponseCacheControl(v string) *GetObjectInput { - s.ResponseCacheControl = &v - return s -} - -// SetResponseContentDisposition sets the ResponseContentDisposition field's value. -func (s *GetObjectInput) SetResponseContentDisposition(v string) *GetObjectInput { - s.ResponseContentDisposition = &v - return s -} - -// SetResponseContentEncoding sets the ResponseContentEncoding field's value. -func (s *GetObjectInput) SetResponseContentEncoding(v string) *GetObjectInput { - s.ResponseContentEncoding = &v - return s -} - -// SetResponseContentLanguage sets the ResponseContentLanguage field's value. -func (s *GetObjectInput) SetResponseContentLanguage(v string) *GetObjectInput { - s.ResponseContentLanguage = &v - return s -} - -// SetResponseContentType sets the ResponseContentType field's value. -func (s *GetObjectInput) SetResponseContentType(v string) *GetObjectInput { - s.ResponseContentType = &v - return s -} - -// SetResponseExpires sets the ResponseExpires field's value. -func (s *GetObjectInput) SetResponseExpires(v time.Time) *GetObjectInput { - s.ResponseExpires = &v - return s -} - -// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. -func (s *GetObjectInput) SetSSECustomerAlgorithm(v string) *GetObjectInput { - s.SSECustomerAlgorithm = &v - return s -} - -// SetSSECustomerKey sets the SSECustomerKey field's value. -func (s *GetObjectInput) SetSSECustomerKey(v string) *GetObjectInput { - s.SSECustomerKey = &v - return s -} - -func (s *GetObjectInput) getSSECustomerKey() (v string) { - if s.SSECustomerKey == nil { - return v - } - return *s.SSECustomerKey -} - -// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. -func (s *GetObjectInput) SetSSECustomerKeyMD5(v string) *GetObjectInput { - s.SSECustomerKeyMD5 = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *GetObjectInput) SetVersionId(v string) *GetObjectInput { - s.VersionId = &v - return s -} - -func (s *GetObjectInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *GetObjectInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s GetObjectInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type GetObjectLegalHoldInput struct { - _ struct{} `locationName:"GetObjectLegalHoldRequest" type:"structure"` - - // The bucket name containing the object whose legal hold status you want to - // retrieve. - // - // Access points - When you use this action with an access point, you must provide - // the alias of the access point in place of the bucket name or specify the - // access point ARN. When using the access point ARN, you must direct requests - // to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this action with an access point through the Amazon Web Services - // SDKs, you provide the access point ARN in place of the bucket name. For more - // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // The key name for the object whose legal hold status you want to retrieve. - // - // Key is a required field - Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - - // Confirms that the requester knows that they will be charged for the request. - // Bucket owners need not specify this parameter in their requests. If either - // the source or destination S3 bucket has Requester Pays enabled, the requester - // will pay for corresponding charges to copy the object. For information about - // downloading objects from Requester Pays buckets, see Downloading Objects - // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` - - // The version ID of the object whose legal hold status you want to retrieve. - VersionId *string `location:"querystring" locationName:"versionId" 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 GetObjectLegalHoldInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetObjectLegalHoldInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetObjectLegalHoldInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetObjectLegalHoldInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - 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 -} - -// SetBucket sets the Bucket field's value. -func (s *GetObjectLegalHoldInput) SetBucket(v string) *GetObjectLegalHoldInput { - s.Bucket = &v - return s -} - -func (s *GetObjectLegalHoldInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *GetObjectLegalHoldInput) SetExpectedBucketOwner(v string) *GetObjectLegalHoldInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetKey sets the Key field's value. -func (s *GetObjectLegalHoldInput) SetKey(v string) *GetObjectLegalHoldInput { - s.Key = &v - return s -} - -// SetRequestPayer sets the RequestPayer field's value. -func (s *GetObjectLegalHoldInput) SetRequestPayer(v string) *GetObjectLegalHoldInput { - s.RequestPayer = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *GetObjectLegalHoldInput) SetVersionId(v string) *GetObjectLegalHoldInput { - s.VersionId = &v - return s -} - -func (s *GetObjectLegalHoldInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *GetObjectLegalHoldInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s GetObjectLegalHoldInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type GetObjectLegalHoldOutput struct { - _ struct{} `type:"structure" payload:"LegalHold"` - - // The current legal hold status for the specified object. - LegalHold *ObjectLockLegalHold `locationName:"LegalHold" 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 GetObjectLegalHoldOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetObjectLegalHoldOutput) GoString() string { - return s.String() -} - -// SetLegalHold sets the LegalHold field's value. -func (s *GetObjectLegalHoldOutput) SetLegalHold(v *ObjectLockLegalHold) *GetObjectLegalHoldOutput { - s.LegalHold = v - return s -} - -type GetObjectLockConfigurationInput struct { - _ struct{} `locationName:"GetObjectLockConfigurationRequest" type:"structure"` - - // The bucket whose Object Lock configuration you want to retrieve. - // - // Access points - When you use this action with an access point, you must provide - // the alias of the access point in place of the bucket name or specify the - // access point ARN. When using the access point ARN, you must direct requests - // to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this action with an access point through the Amazon Web Services - // SDKs, you provide the access point ARN in place of the bucket name. For more - // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 GetObjectLockConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetObjectLockConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetObjectLockConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetObjectLockConfigurationInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *GetObjectLockConfigurationInput) SetBucket(v string) *GetObjectLockConfigurationInput { - s.Bucket = &v - return s -} - -func (s *GetObjectLockConfigurationInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *GetObjectLockConfigurationInput) SetExpectedBucketOwner(v string) *GetObjectLockConfigurationInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *GetObjectLockConfigurationInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *GetObjectLockConfigurationInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s GetObjectLockConfigurationInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type GetObjectLockConfigurationOutput struct { - _ struct{} `type:"structure" payload:"ObjectLockConfiguration"` - - // The specified bucket's Object Lock configuration. - ObjectLockConfiguration *ObjectLockConfiguration `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 GetObjectLockConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetObjectLockConfigurationOutput) GoString() string { - return s.String() -} - -// SetObjectLockConfiguration sets the ObjectLockConfiguration field's value. -func (s *GetObjectLockConfigurationOutput) SetObjectLockConfiguration(v *ObjectLockConfiguration) *GetObjectLockConfigurationOutput { - s.ObjectLockConfiguration = v - return s -} - -type GetObjectOutput struct { - _ struct{} `type:"structure" payload:"Body"` - - // Indicates that a range of bytes was specified in the request. - AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"` - - // Object data. - Body io.ReadCloser `type:"blob"` - - // Indicates whether the object uses an S3 Bucket Key for server-side encryption - // with Key Management Service (KMS) keys (SSE-KMS). - // - // This functionality is not supported for directory buckets. - BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"` - - // Specifies caching behavior along the request/reply chain. - CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"` - - // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be - // present if it was uploaded with the object. For more information, see Checking - // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - ChecksumCRC32 *string `location:"header" locationName:"x-amz-checksum-crc32" type:"string"` - - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only - // be present if it was uploaded with the object. For more information, see - // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - ChecksumCRC32C *string `location:"header" locationName:"x-amz-checksum-crc32c" type:"string"` - - // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be - // present if it was uploaded with the object. For more information, see Checking - // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - ChecksumSHA1 *string `location:"header" locationName:"x-amz-checksum-sha1" type:"string"` - - // The base64-encoded, 256-bit SHA-256 digest of the object. This will only - // be present if it was uploaded with the object. For more information, see - // Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - ChecksumSHA256 *string `location:"header" locationName:"x-amz-checksum-sha256" type:"string"` - - // Specifies presentational information for the object. - ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"` - - // Indicates what content encodings have been applied to the object and thus - // what decoding mechanisms must be applied to obtain the media-type referenced - // by the Content-Type header field. - ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"` - - // The language the content is in. - ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"` - - // Size of the body in bytes. - ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"` - - // The portion of the object returned in the response. - ContentRange *string `location:"header" locationName:"Content-Range" type:"string"` - - // A standard MIME type describing the format of the object data. - ContentType *string `location:"header" locationName:"Content-Type" type:"string"` - - // Indicates whether the object retrieved was (true) or was not (false) a Delete - // Marker. If false, this response header does not appear in the response. - // - // * If the current version of the object is a delete marker, Amazon S3 behaves - // as if the object was deleted and includes x-amz-delete-marker: true in - // the response. - // - // * If the specified version in the request is a delete marker, the response - // returns a 405 Method Not Allowed error and the Last-Modified: timestamp - // response header. - DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"` - - // An entity tag (ETag) is an opaque identifier assigned by a web server to - // a specific version of a resource found at a URL. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // If the object expiration is configured (see PutBucketLifecycleConfiguration - // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)), - // the response includes this header. It includes the expiry-date and rule-id - // key-value pairs providing object expiration information. The value of the - // rule-id is URL-encoded. - // - // This functionality is not supported for directory buckets. - Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"` - - // The date and time at which the object is no longer cacheable. - Expires *string `location:"header" locationName:"Expires" type:"string"` - - // Date and time when the object was last modified. - // - // General purpose buckets - When you specify a versionId of the object in your - // request, if the specified version in the request is a delete marker, the - // response returns a 405 Method Not Allowed error and the Last-Modified: timestamp - // response header. - LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"` - - // A map of metadata to store with the object in S3. - // - // By default unmarshaled keys are written as a map keys in following canonicalized format: - // the first letter and any letter following a hyphen will be capitalized, and the rest as lowercase. - // Set `aws.Config.LowerCaseHeaderMaps` to `true` to write unmarshaled keys to the map as lowercase. - Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"` - - // This is set to the number of metadata entries not returned in the headers - // that are prefixed with x-amz-meta-. This can happen if you create metadata - // using an API like SOAP that supports more flexible metadata than the REST - // API. For example, using SOAP, you can create metadata whose values are not - // legal HTTP headers. - // - // This functionality is not supported for directory buckets. - MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"` - - // Indicates whether this object has an active legal hold. This field is only - // returned if you have permission to view an object's legal hold status. - // - // This functionality is not supported for directory buckets. - ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"` - - // The Object Lock mode that's currently in place for this object. - // - // This functionality is not supported for directory buckets. - ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"` - - // The date and time when this object's Object Lock will expire. - // - // This functionality is not supported for directory buckets. - ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"` - - // The count of parts this object has. This value is only returned if you specify - // partNumber in your request and the object was uploaded as a multipart upload. - PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"` - - // Amazon S3 can return this if your request involves a bucket that is either - // a source or destination in a replication rule. - // - // This functionality is not supported for directory buckets. - ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"` - - // If present, indicates that the requester was successfully charged for the - // request. - // - // This functionality is not supported for directory buckets. - RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` - - // Provides information about object restoration action and expiration time - // of the restored object copy. - // - // This functionality is not supported for directory buckets. Only the S3 Express - // One Zone storage class is supported by directory buckets to store objects. - Restore *string `location:"header" locationName:"x-amz-restore" type:"string"` - - // If server-side encryption with a customer-provided encryption key was requested, - // the response will include this header to confirm the encryption algorithm - // that's used. - // - // This functionality is not supported for directory buckets. - SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` - - // If server-side encryption with a customer-provided encryption key was requested, - // the response will include this header to provide the round-trip message integrity - // verification of the customer-provided encryption key. - // - // This functionality is not supported for directory buckets. - SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` - - // If present, indicates the ID of the Key Management Service (KMS) symmetric - // encryption customer managed key that was used for the object. - // - // This functionality is not supported for directory buckets. - // - // SSEKMSKeyId is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by GetObjectOutput's - // String and GoString methods. - SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` - - // The server-side encryption algorithm used when you store this object in Amazon - // S3 (for example, AES256, aws:kms, aws:kms:dsse). - // - // For directory buckets, only server-side encryption with Amazon S3 managed - // keys (SSE-S3) (AES256) is supported. - ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"` - - // Provides storage class information of the object. Amazon S3 returns this - // header for all objects except for S3 Standard storage class objects. - // - // Directory buckets - Only the S3 Express One Zone storage class is supported - // by directory buckets to store objects. - StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"` - - // The number of tags, if any, on the object, when you have the relevant permission - // to read object tags. - // - // You can use GetObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html) - // to retrieve the tag set associated with an object. - // - // This functionality is not supported for directory buckets. - TagCount *int64 `location:"header" locationName:"x-amz-tagging-count" type:"integer"` - - // Version ID of the object. - // - // This functionality is not supported for directory buckets. - VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"` - - // If the bucket is configured as a website, redirects requests for this object - // to another object in the same bucket or to an external URL. Amazon S3 stores - // the value of this header in the object metadata. - // - // This functionality is not supported for directory buckets. - WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" 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 GetObjectOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetObjectOutput) GoString() string { - return s.String() -} - -// SetAcceptRanges sets the AcceptRanges field's value. -func (s *GetObjectOutput) SetAcceptRanges(v string) *GetObjectOutput { - s.AcceptRanges = &v - return s -} - -// SetBody sets the Body field's value. -func (s *GetObjectOutput) SetBody(v io.ReadCloser) *GetObjectOutput { - s.Body = v - return s -} - -// SetBucketKeyEnabled sets the BucketKeyEnabled field's value. -func (s *GetObjectOutput) SetBucketKeyEnabled(v bool) *GetObjectOutput { - s.BucketKeyEnabled = &v - return s -} - -// SetCacheControl sets the CacheControl field's value. -func (s *GetObjectOutput) SetCacheControl(v string) *GetObjectOutput { - s.CacheControl = &v - return s -} - -// SetChecksumCRC32 sets the ChecksumCRC32 field's value. -func (s *GetObjectOutput) SetChecksumCRC32(v string) *GetObjectOutput { - s.ChecksumCRC32 = &v - return s -} - -// SetChecksumCRC32C sets the ChecksumCRC32C field's value. -func (s *GetObjectOutput) SetChecksumCRC32C(v string) *GetObjectOutput { - s.ChecksumCRC32C = &v - return s -} - -// SetChecksumSHA1 sets the ChecksumSHA1 field's value. -func (s *GetObjectOutput) SetChecksumSHA1(v string) *GetObjectOutput { - s.ChecksumSHA1 = &v - return s -} - -// SetChecksumSHA256 sets the ChecksumSHA256 field's value. -func (s *GetObjectOutput) SetChecksumSHA256(v string) *GetObjectOutput { - s.ChecksumSHA256 = &v - return s -} - -// SetContentDisposition sets the ContentDisposition field's value. -func (s *GetObjectOutput) SetContentDisposition(v string) *GetObjectOutput { - s.ContentDisposition = &v - return s -} - -// SetContentEncoding sets the ContentEncoding field's value. -func (s *GetObjectOutput) SetContentEncoding(v string) *GetObjectOutput { - s.ContentEncoding = &v - return s -} - -// SetContentLanguage sets the ContentLanguage field's value. -func (s *GetObjectOutput) SetContentLanguage(v string) *GetObjectOutput { - s.ContentLanguage = &v - return s -} - -// SetContentLength sets the ContentLength field's value. -func (s *GetObjectOutput) SetContentLength(v int64) *GetObjectOutput { - s.ContentLength = &v - return s -} - -// SetContentRange sets the ContentRange field's value. -func (s *GetObjectOutput) SetContentRange(v string) *GetObjectOutput { - s.ContentRange = &v - return s -} - -// SetContentType sets the ContentType field's value. -func (s *GetObjectOutput) SetContentType(v string) *GetObjectOutput { - s.ContentType = &v - return s -} - -// SetDeleteMarker sets the DeleteMarker field's value. -func (s *GetObjectOutput) SetDeleteMarker(v bool) *GetObjectOutput { - s.DeleteMarker = &v - return s -} - -// SetETag sets the ETag field's value. -func (s *GetObjectOutput) SetETag(v string) *GetObjectOutput { - s.ETag = &v - return s -} - -// SetExpiration sets the Expiration field's value. -func (s *GetObjectOutput) SetExpiration(v string) *GetObjectOutput { - s.Expiration = &v - return s -} - -// SetExpires sets the Expires field's value. -func (s *GetObjectOutput) SetExpires(v string) *GetObjectOutput { - s.Expires = &v - return s -} - -// SetLastModified sets the LastModified field's value. -func (s *GetObjectOutput) SetLastModified(v time.Time) *GetObjectOutput { - s.LastModified = &v - return s -} - -// SetMetadata sets the Metadata field's value. -func (s *GetObjectOutput) SetMetadata(v map[string]*string) *GetObjectOutput { - s.Metadata = v - return s -} - -// SetMissingMeta sets the MissingMeta field's value. -func (s *GetObjectOutput) SetMissingMeta(v int64) *GetObjectOutput { - s.MissingMeta = &v - return s -} - -// SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value. -func (s *GetObjectOutput) SetObjectLockLegalHoldStatus(v string) *GetObjectOutput { - s.ObjectLockLegalHoldStatus = &v - return s -} - -// SetObjectLockMode sets the ObjectLockMode field's value. -func (s *GetObjectOutput) SetObjectLockMode(v string) *GetObjectOutput { - s.ObjectLockMode = &v - return s -} - -// SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value. -func (s *GetObjectOutput) SetObjectLockRetainUntilDate(v time.Time) *GetObjectOutput { - s.ObjectLockRetainUntilDate = &v - return s -} - -// SetPartsCount sets the PartsCount field's value. -func (s *GetObjectOutput) SetPartsCount(v int64) *GetObjectOutput { - s.PartsCount = &v - return s -} - -// SetReplicationStatus sets the ReplicationStatus field's value. -func (s *GetObjectOutput) SetReplicationStatus(v string) *GetObjectOutput { - s.ReplicationStatus = &v - return s -} - -// SetRequestCharged sets the RequestCharged field's value. -func (s *GetObjectOutput) SetRequestCharged(v string) *GetObjectOutput { - s.RequestCharged = &v - return s -} - -// SetRestore sets the Restore field's value. -func (s *GetObjectOutput) SetRestore(v string) *GetObjectOutput { - s.Restore = &v - return s -} - -// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. -func (s *GetObjectOutput) SetSSECustomerAlgorithm(v string) *GetObjectOutput { - s.SSECustomerAlgorithm = &v - return s -} - -// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. -func (s *GetObjectOutput) SetSSECustomerKeyMD5(v string) *GetObjectOutput { - s.SSECustomerKeyMD5 = &v - return s -} - -// SetSSEKMSKeyId sets the SSEKMSKeyId field's value. -func (s *GetObjectOutput) SetSSEKMSKeyId(v string) *GetObjectOutput { - s.SSEKMSKeyId = &v - return s -} - -// SetServerSideEncryption sets the ServerSideEncryption field's value. -func (s *GetObjectOutput) SetServerSideEncryption(v string) *GetObjectOutput { - s.ServerSideEncryption = &v - return s -} - -// SetStorageClass sets the StorageClass field's value. -func (s *GetObjectOutput) SetStorageClass(v string) *GetObjectOutput { - s.StorageClass = &v - return s -} - -// SetTagCount sets the TagCount field's value. -func (s *GetObjectOutput) SetTagCount(v int64) *GetObjectOutput { - s.TagCount = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *GetObjectOutput) SetVersionId(v string) *GetObjectOutput { - s.VersionId = &v - return s -} - -// SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value. -func (s *GetObjectOutput) SetWebsiteRedirectLocation(v string) *GetObjectOutput { - s.WebsiteRedirectLocation = &v - return s -} - -type GetObjectRetentionInput struct { - _ struct{} `locationName:"GetObjectRetentionRequest" type:"structure"` - - // The bucket name containing the object whose retention settings you want to - // retrieve. - // - // Access points - When you use this action with an access point, you must provide - // the alias of the access point in place of the bucket name or specify the - // access point ARN. When using the access point ARN, you must direct requests - // to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this action with an access point through the Amazon Web Services - // SDKs, you provide the access point ARN in place of the bucket name. For more - // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // The key name for the object whose retention settings you want to retrieve. - // - // Key is a required field - Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - - // Confirms that the requester knows that they will be charged for the request. - // Bucket owners need not specify this parameter in their requests. If either - // the source or destination S3 bucket has Requester Pays enabled, the requester - // will pay for corresponding charges to copy the object. For information about - // downloading objects from Requester Pays buckets, see Downloading Objects - // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` - - // The version ID for the object whose retention settings you want to retrieve. - VersionId *string `location:"querystring" locationName:"versionId" 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 GetObjectRetentionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetObjectRetentionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetObjectRetentionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetObjectRetentionInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - 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 -} - -// SetBucket sets the Bucket field's value. -func (s *GetObjectRetentionInput) SetBucket(v string) *GetObjectRetentionInput { - s.Bucket = &v - return s -} - -func (s *GetObjectRetentionInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *GetObjectRetentionInput) SetExpectedBucketOwner(v string) *GetObjectRetentionInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetKey sets the Key field's value. -func (s *GetObjectRetentionInput) SetKey(v string) *GetObjectRetentionInput { - s.Key = &v - return s -} - -// SetRequestPayer sets the RequestPayer field's value. -func (s *GetObjectRetentionInput) SetRequestPayer(v string) *GetObjectRetentionInput { - s.RequestPayer = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *GetObjectRetentionInput) SetVersionId(v string) *GetObjectRetentionInput { - s.VersionId = &v - return s -} - -func (s *GetObjectRetentionInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *GetObjectRetentionInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s GetObjectRetentionInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type GetObjectRetentionOutput struct { - _ struct{} `type:"structure" payload:"Retention"` - - // The container element for an object's retention settings. - Retention *ObjectLockRetention `locationName:"Retention" 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 GetObjectRetentionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetObjectRetentionOutput) GoString() string { - return s.String() -} - -// SetRetention sets the Retention field's value. -func (s *GetObjectRetentionOutput) SetRetention(v *ObjectLockRetention) *GetObjectRetentionOutput { - s.Retention = v - return s -} - -type GetObjectTaggingInput struct { - _ struct{} `locationName:"GetObjectTaggingRequest" type:"structure"` - - // The bucket name containing the object for which to get the tagging information. - // - // Access points - When you use this action with an access point, you must provide - // the alias of the access point in place of the bucket name or specify the - // access point ARN. When using the access point ARN, you must direct requests - // to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this action with an access point through the Amazon Web Services - // SDKs, you provide the access point ARN in place of the bucket name. For more - // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. - // - // S3 on Outposts - When you use this action with Amazon S3 on Outposts, you - // must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname - // takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. - // When you use this action with S3 on Outposts through the Amazon Web Services - // SDKs, you provide the Outposts access point ARN in place of the bucket name. - // For more information about S3 on Outposts ARNs, see What is S3 on Outposts? - // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) - // in the Amazon S3 User Guide. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // Object key for which to get the tagging information. - // - // Key is a required field - Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - - // Confirms that the requester knows that they will be charged for the request. - // Bucket owners need not specify this parameter in their requests. If either - // the source or destination S3 bucket has Requester Pays enabled, the requester - // will pay for corresponding charges to copy the object. For information about - // downloading objects from Requester Pays buckets, see Downloading Objects - // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` - - // The versionId of the object for which to get the tagging information. - VersionId *string `location:"querystring" locationName:"versionId" 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 GetObjectTaggingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetObjectTaggingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetObjectTaggingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetObjectTaggingInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - 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 -} - -// SetBucket sets the Bucket field's value. -func (s *GetObjectTaggingInput) SetBucket(v string) *GetObjectTaggingInput { - s.Bucket = &v - return s -} - -func (s *GetObjectTaggingInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *GetObjectTaggingInput) SetExpectedBucketOwner(v string) *GetObjectTaggingInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetKey sets the Key field's value. -func (s *GetObjectTaggingInput) SetKey(v string) *GetObjectTaggingInput { - s.Key = &v - return s -} - -// SetRequestPayer sets the RequestPayer field's value. -func (s *GetObjectTaggingInput) SetRequestPayer(v string) *GetObjectTaggingInput { - s.RequestPayer = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *GetObjectTaggingInput) SetVersionId(v string) *GetObjectTaggingInput { - s.VersionId = &v - return s -} - -func (s *GetObjectTaggingInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *GetObjectTaggingInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s GetObjectTaggingInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type GetObjectTaggingOutput struct { - _ struct{} `type:"structure"` - - // Contains the tag set. - // - // TagSet is a required field - TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"` - - // The versionId of the object for which you got the tagging information. - VersionId *string `location:"header" locationName:"x-amz-version-id" 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 GetObjectTaggingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetObjectTaggingOutput) GoString() string { - return s.String() -} - -// SetTagSet sets the TagSet field's value. -func (s *GetObjectTaggingOutput) SetTagSet(v []*Tag) *GetObjectTaggingOutput { - s.TagSet = v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *GetObjectTaggingOutput) SetVersionId(v string) *GetObjectTaggingOutput { - s.VersionId = &v - return s -} - -type GetObjectTorrentInput struct { - _ struct{} `locationName:"GetObjectTorrentRequest" type:"structure"` - - // The name of the bucket containing the object for which to get the torrent - // files. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // The object key for which to get the information. - // - // Key is a required field - Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - - // Confirms that the requester knows that they will be charged for the request. - // Bucket owners need not specify this parameter in their requests. If either - // the source or destination S3 bucket has Requester Pays enabled, the requester - // will pay for corresponding charges to copy the object. For information about - // downloading objects from Requester Pays buckets, see Downloading Objects - // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetObjectTorrentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetObjectTorrentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetObjectTorrentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetObjectTorrentInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - 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 -} - -// SetBucket sets the Bucket field's value. -func (s *GetObjectTorrentInput) SetBucket(v string) *GetObjectTorrentInput { - s.Bucket = &v - return s -} - -func (s *GetObjectTorrentInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *GetObjectTorrentInput) SetExpectedBucketOwner(v string) *GetObjectTorrentInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetKey sets the Key field's value. -func (s *GetObjectTorrentInput) SetKey(v string) *GetObjectTorrentInput { - s.Key = &v - return s -} - -// SetRequestPayer sets the RequestPayer field's value. -func (s *GetObjectTorrentInput) SetRequestPayer(v string) *GetObjectTorrentInput { - s.RequestPayer = &v - return s -} - -func (s *GetObjectTorrentInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *GetObjectTorrentInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s GetObjectTorrentInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type GetObjectTorrentOutput struct { - _ struct{} `type:"structure" payload:"Body"` - - // A Bencoded dictionary as defined by the BitTorrent specification - Body io.ReadCloser `type:"blob"` - - // If present, indicates that the requester was successfully charged for the - // request. - // - // This functionality is not supported for directory buckets. - RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetObjectTorrentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetObjectTorrentOutput) GoString() string { - return s.String() -} - -// SetBody sets the Body field's value. -func (s *GetObjectTorrentOutput) SetBody(v io.ReadCloser) *GetObjectTorrentOutput { - s.Body = v - return s -} - -// SetRequestCharged sets the RequestCharged field's value. -func (s *GetObjectTorrentOutput) SetRequestCharged(v string) *GetObjectTorrentOutput { - s.RequestCharged = &v - return s -} - -type GetPublicAccessBlockInput struct { - _ struct{} `locationName:"GetPublicAccessBlockRequest" type:"structure"` - - // The name of the Amazon S3 bucket whose PublicAccessBlock configuration you - // want to retrieve. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 GetPublicAccessBlockInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetPublicAccessBlockInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetPublicAccessBlockInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetPublicAccessBlockInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *GetPublicAccessBlockInput) SetBucket(v string) *GetPublicAccessBlockInput { - s.Bucket = &v - return s -} - -func (s *GetPublicAccessBlockInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *GetPublicAccessBlockInput) SetExpectedBucketOwner(v string) *GetPublicAccessBlockInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *GetPublicAccessBlockInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *GetPublicAccessBlockInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s GetPublicAccessBlockInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type GetPublicAccessBlockOutput struct { - _ struct{} `type:"structure" payload:"PublicAccessBlockConfiguration"` - - // The PublicAccessBlock configuration currently in effect for this Amazon S3 - // bucket. - PublicAccessBlockConfiguration *PublicAccessBlockConfiguration `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 GetPublicAccessBlockOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetPublicAccessBlockOutput) GoString() string { - return s.String() -} - -// SetPublicAccessBlockConfiguration sets the PublicAccessBlockConfiguration field's value. -func (s *GetPublicAccessBlockOutput) SetPublicAccessBlockConfiguration(v *PublicAccessBlockConfiguration) *GetPublicAccessBlockOutput { - s.PublicAccessBlockConfiguration = v - return s -} - -// Container for S3 Glacier job parameters. -type GlacierJobParameters struct { - _ struct{} `type:"structure"` - - // Retrieval tier at which the restore will be processed. - // - // Tier is a required field - Tier *string `type:"string" required:"true" enum:"Tier"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GlacierJobParameters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GlacierJobParameters) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GlacierJobParameters) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GlacierJobParameters"} - if s.Tier == nil { - invalidParams.Add(request.NewErrParamRequired("Tier")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTier sets the Tier field's value. -func (s *GlacierJobParameters) SetTier(v string) *GlacierJobParameters { - s.Tier = &v - return s -} - -// Container for grant information. -type Grant struct { - _ struct{} `type:"structure"` - - // The person being granted permissions. - Grantee *Grantee `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"` - - // Specifies the permission given to the grantee. - Permission *string `type:"string" enum:"Permission"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Grant) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Grant) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Grant) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Grant"} - if s.Grantee != nil { - if err := s.Grantee.Validate(); err != nil { - invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGrantee sets the Grantee field's value. -func (s *Grant) SetGrantee(v *Grantee) *Grant { - s.Grantee = v - return s -} - -// SetPermission sets the Permission field's value. -func (s *Grant) SetPermission(v string) *Grant { - s.Permission = &v - return s -} - -// Container for the person being granted permissions. -type Grantee struct { - _ struct{} `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"` - - // Screen name of the grantee. - DisplayName *string `type:"string"` - - // Email address of the grantee. - // - // Using email addresses to specify a grantee is only supported in the following - // Amazon Web Services Regions: - // - // * US East (N. Virginia) - // - // * US West (N. California) - // - // * US West (Oregon) - // - // * Asia Pacific (Singapore) - // - // * Asia Pacific (Sydney) - // - // * Asia Pacific (Tokyo) - // - // * Europe (Ireland) - // - // * South America (São Paulo) - // - // For a list of all the Amazon S3 supported Regions and endpoints, see Regions - // and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) - // in the Amazon Web Services General Reference. - EmailAddress *string `type:"string"` - - // The canonical user ID of the grantee. - ID *string `type:"string"` - - // Type of grantee - // - // Type is a required field - Type *string `locationName:"xsi:type" type:"string" xmlAttribute:"true" required:"true" enum:"Type"` - - // URI of the grantee group. - URI *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 Grantee) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Grantee) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Grantee) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Grantee"} - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDisplayName sets the DisplayName field's value. -func (s *Grantee) SetDisplayName(v string) *Grantee { - s.DisplayName = &v - return s -} - -// SetEmailAddress sets the EmailAddress field's value. -func (s *Grantee) SetEmailAddress(v string) *Grantee { - s.EmailAddress = &v - return s -} - -// SetID sets the ID field's value. -func (s *Grantee) SetID(v string) *Grantee { - s.ID = &v - return s -} - -// SetType sets the Type field's value. -func (s *Grantee) SetType(v string) *Grantee { - s.Type = &v - return s -} - -// SetURI sets the URI field's value. -func (s *Grantee) SetURI(v string) *Grantee { - s.URI = &v - return s -} - -type HeadBucketInput struct { - _ struct{} `locationName:"HeadBucketRequest" type:"structure"` - - // The bucket name. - // - // Directory buckets - When you use this operation with a directory bucket, - // you must use virtual-hosted-style requests in the format Bucket_name.s3express-az_id.region.amazonaws.com. - // Path-style requests are not supported. Directory bucket names must be unique - // in the chosen Availability Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 - // (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about - // bucket naming restrictions, see Directory bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html) - // in the Amazon S3 User Guide. - // - // Access points - When you use this action with an access point, you must provide - // the alias of the access point in place of the bucket name or specify the - // access point ARN. When using the access point ARN, you must direct requests - // to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this action with an access point through the Amazon Web Services - // SDKs, you provide the access point ARN in place of the bucket name. For more - // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. - // - // Object Lambda access points - When you use this API operation with an Object - // Lambda access point, provide the alias of the Object Lambda access point - // in place of the bucket name. If the Object Lambda access point alias in a - // request is not valid, the error code InvalidAccessPointAliasError is returned. - // For more information about InvalidAccessPointAliasError, see List of Error - // Codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList). - // - // Access points and Object Lambda access points are not supported by directory - // buckets. - // - // S3 on Outposts - When you use this action with Amazon S3 on Outposts, you - // must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname - // takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. - // When you use this action with S3 on Outposts through the Amazon Web Services - // SDKs, you provide the Outposts access point ARN in place of the bucket name. - // For more information about S3 on Outposts ARNs, see What is S3 on Outposts? - // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) - // in the Amazon S3 User Guide. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 HeadBucketInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s HeadBucketInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HeadBucketInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HeadBucketInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *HeadBucketInput) SetBucket(v string) *HeadBucketInput { - s.Bucket = &v - return s -} - -func (s *HeadBucketInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *HeadBucketInput) SetExpectedBucketOwner(v string) *HeadBucketInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *HeadBucketInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *HeadBucketInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s HeadBucketInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type HeadBucketOutput struct { - _ struct{} `type:"structure"` - - // Indicates whether the bucket name used in the request is an access point - // alias. - // - // This functionality is not supported for directory buckets. - AccessPointAlias *bool `location:"header" locationName:"x-amz-access-point-alias" type:"boolean"` - - // The name of the location where the bucket will be created. - // - // For directory buckets, the AZ ID of the Availability Zone where the bucket - // is created. An example AZ ID value is usw2-az1. - // - // This functionality is only supported by directory buckets. - BucketLocationName *string `location:"header" locationName:"x-amz-bucket-location-name" type:"string"` - - // The type of location where the bucket is created. - // - // This functionality is only supported by directory buckets. - BucketLocationType *string `location:"header" locationName:"x-amz-bucket-location-type" type:"string" enum:"LocationType"` - - // The Region that the bucket is located. - // - // This functionality is not supported for directory buckets. - BucketRegion *string `location:"header" locationName:"x-amz-bucket-region" 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 HeadBucketOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s HeadBucketOutput) GoString() string { - return s.String() -} - -// SetAccessPointAlias sets the AccessPointAlias field's value. -func (s *HeadBucketOutput) SetAccessPointAlias(v bool) *HeadBucketOutput { - s.AccessPointAlias = &v - return s -} - -// SetBucketLocationName sets the BucketLocationName field's value. -func (s *HeadBucketOutput) SetBucketLocationName(v string) *HeadBucketOutput { - s.BucketLocationName = &v - return s -} - -// SetBucketLocationType sets the BucketLocationType field's value. -func (s *HeadBucketOutput) SetBucketLocationType(v string) *HeadBucketOutput { - s.BucketLocationType = &v - return s -} - -// SetBucketRegion sets the BucketRegion field's value. -func (s *HeadBucketOutput) SetBucketRegion(v string) *HeadBucketOutput { - s.BucketRegion = &v - return s -} - -type HeadObjectInput struct { - _ struct{} `locationName:"HeadObjectRequest" type:"structure"` - - // The name of the bucket that contains the object. - // - // Directory buckets - When you use this operation with a directory bucket, - // you must use virtual-hosted-style requests in the format Bucket_name.s3express-az_id.region.amazonaws.com. - // Path-style requests are not supported. Directory bucket names must be unique - // in the chosen Availability Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 - // (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about - // bucket naming restrictions, see Directory bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html) - // in the Amazon S3 User Guide. - // - // Access points - When you use this action with an access point, you must provide - // the alias of the access point in place of the bucket name or specify the - // access point ARN. When using the access point ARN, you must direct requests - // to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this action with an access point through the Amazon Web Services - // SDKs, you provide the access point ARN in place of the bucket name. For more - // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. - // - // Access points and Object Lambda access points are not supported by directory - // buckets. - // - // S3 on Outposts - When you use this action with Amazon S3 on Outposts, you - // must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname - // takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. - // When you use this action with S3 on Outposts through the Amazon Web Services - // SDKs, you provide the Outposts access point ARN in place of the bucket name. - // For more information about S3 on Outposts ARNs, see What is S3 on Outposts? - // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) - // in the Amazon S3 User Guide. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // To retrieve the checksum, this parameter must be enabled. - // - // In addition, if you enable ChecksumMode and the object is encrypted with - // Amazon Web Services Key Management Service (Amazon Web Services KMS), you - // must have permission to use the kms:Decrypt action for the request to succeed. - ChecksumMode *string `location:"header" locationName:"x-amz-checksum-mode" type:"string" enum:"ChecksumMode"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // Return the object only if its entity tag (ETag) is the same as the one specified; - // otherwise, return a 412 (precondition failed) error. - // - // If both of the If-Match and If-Unmodified-Since headers are present in the - // request as follows: - // - // * If-Match condition evaluates to true, and; - // - // * If-Unmodified-Since condition evaluates to false; - // - // Then Amazon S3 returns 200 OK and the data requested. - // - // For more information about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232). - IfMatch *string `location:"header" locationName:"If-Match" type:"string"` - - // Return the object only if it has been modified since the specified time; - // otherwise, return a 304 (not modified) error. - // - // If both of the If-None-Match and If-Modified-Since headers are present in - // the request as follows: - // - // * If-None-Match condition evaluates to false, and; - // - // * If-Modified-Since condition evaluates to true; - // - // Then Amazon S3 returns the 304 Not Modified response code. - // - // For more information about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232). - IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp"` - - // Return the object only if its entity tag (ETag) is different from the one - // specified; otherwise, return a 304 (not modified) error. - // - // If both of the If-None-Match and If-Modified-Since headers are present in - // the request as follows: - // - // * If-None-Match condition evaluates to false, and; - // - // * If-Modified-Since condition evaluates to true; - // - // Then Amazon S3 returns the 304 Not Modified response code. - // - // For more information about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232). - IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"` - - // Return the object only if it has not been modified since the specified time; - // otherwise, return a 412 (precondition failed) error. - // - // If both of the If-Match and If-Unmodified-Since headers are present in the - // request as follows: - // - // * If-Match condition evaluates to true, and; - // - // * If-Unmodified-Since condition evaluates to false; - // - // Then Amazon S3 returns 200 OK and the data requested. - // - // For more information about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232). - IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp"` - - // The object key. - // - // Key is a required field - Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - - // Part number of the object being read. This is a positive integer between - // 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified. - // Useful querying about the size of the part and the number of parts in this - // object. - PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"` - - // HeadObject returns only the metadata for an object. If the Range is satisfiable, - // only the ContentLength is affected in the response. If the Range is not satisfiable, - // S3 returns a 416 - Requested Range Not Satisfiable error. - Range *string `location:"header" locationName:"Range" type:"string"` - - // Confirms that the requester knows that they will be charged for the request. - // Bucket owners need not specify this parameter in their requests. If either - // the source or destination S3 bucket has Requester Pays enabled, the requester - // will pay for corresponding charges to copy the object. For information about - // downloading objects from Requester Pays buckets, see Downloading Objects - // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` - - // Sets the Cache-Control header of the response. - ResponseCacheControl *string `location:"querystring" locationName:"response-cache-control" type:"string"` - - // Sets the Content-Disposition header of the response. - ResponseContentDisposition *string `location:"querystring" locationName:"response-content-disposition" type:"string"` - - // Sets the Content-Encoding header of the response. - ResponseContentEncoding *string `location:"querystring" locationName:"response-content-encoding" type:"string"` - - // Sets the Content-Language header of the response. - ResponseContentLanguage *string `location:"querystring" locationName:"response-content-language" type:"string"` - - // Sets the Content-Type header of the response. - ResponseContentType *string `location:"querystring" locationName:"response-content-type" type:"string"` - - // Sets the Expires header of the response. - ResponseExpires *time.Time `location:"querystring" locationName:"response-expires" type:"timestamp" timestampFormat:"rfc822"` - - // Specifies the algorithm to use when encrypting the object (for example, AES256). - // - // This functionality is not supported for directory buckets. - SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` - - // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting - // data. This value is used to store the object and then it is discarded; Amazon - // S3 does not store the encryption key. The key must be appropriate for use - // with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm - // header. - // - // This functionality is not supported for directory buckets. - // - // SSECustomerKey is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by HeadObjectInput's - // String and GoString methods. - SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"` - - // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. - // Amazon S3 uses this header for a message integrity check to ensure that the - // encryption key was transmitted without error. - // - // This functionality is not supported for directory buckets. - SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` - - // Version ID used to reference a specific version of the object. - // - // For directory buckets in this API operation, only the null value of the version - // ID is supported. - VersionId *string `location:"querystring" locationName:"versionId" 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 HeadObjectInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s HeadObjectInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HeadObjectInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HeadObjectInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - 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 -} - -// SetBucket sets the Bucket field's value. -func (s *HeadObjectInput) SetBucket(v string) *HeadObjectInput { - s.Bucket = &v - return s -} - -func (s *HeadObjectInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetChecksumMode sets the ChecksumMode field's value. -func (s *HeadObjectInput) SetChecksumMode(v string) *HeadObjectInput { - s.ChecksumMode = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *HeadObjectInput) SetExpectedBucketOwner(v string) *HeadObjectInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetIfMatch sets the IfMatch field's value. -func (s *HeadObjectInput) SetIfMatch(v string) *HeadObjectInput { - s.IfMatch = &v - return s -} - -// SetIfModifiedSince sets the IfModifiedSince field's value. -func (s *HeadObjectInput) SetIfModifiedSince(v time.Time) *HeadObjectInput { - s.IfModifiedSince = &v - return s -} - -// SetIfNoneMatch sets the IfNoneMatch field's value. -func (s *HeadObjectInput) SetIfNoneMatch(v string) *HeadObjectInput { - s.IfNoneMatch = &v - return s -} - -// SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value. -func (s *HeadObjectInput) SetIfUnmodifiedSince(v time.Time) *HeadObjectInput { - s.IfUnmodifiedSince = &v - return s -} - -// SetKey sets the Key field's value. -func (s *HeadObjectInput) SetKey(v string) *HeadObjectInput { - s.Key = &v - return s -} - -// SetPartNumber sets the PartNumber field's value. -func (s *HeadObjectInput) SetPartNumber(v int64) *HeadObjectInput { - s.PartNumber = &v - return s -} - -// SetRange sets the Range field's value. -func (s *HeadObjectInput) SetRange(v string) *HeadObjectInput { - s.Range = &v - return s -} - -// SetRequestPayer sets the RequestPayer field's value. -func (s *HeadObjectInput) SetRequestPayer(v string) *HeadObjectInput { - s.RequestPayer = &v - return s -} - -// SetResponseCacheControl sets the ResponseCacheControl field's value. -func (s *HeadObjectInput) SetResponseCacheControl(v string) *HeadObjectInput { - s.ResponseCacheControl = &v - return s -} - -// SetResponseContentDisposition sets the ResponseContentDisposition field's value. -func (s *HeadObjectInput) SetResponseContentDisposition(v string) *HeadObjectInput { - s.ResponseContentDisposition = &v - return s -} - -// SetResponseContentEncoding sets the ResponseContentEncoding field's value. -func (s *HeadObjectInput) SetResponseContentEncoding(v string) *HeadObjectInput { - s.ResponseContentEncoding = &v - return s -} - -// SetResponseContentLanguage sets the ResponseContentLanguage field's value. -func (s *HeadObjectInput) SetResponseContentLanguage(v string) *HeadObjectInput { - s.ResponseContentLanguage = &v - return s -} - -// SetResponseContentType sets the ResponseContentType field's value. -func (s *HeadObjectInput) SetResponseContentType(v string) *HeadObjectInput { - s.ResponseContentType = &v - return s -} - -// SetResponseExpires sets the ResponseExpires field's value. -func (s *HeadObjectInput) SetResponseExpires(v time.Time) *HeadObjectInput { - s.ResponseExpires = &v - return s -} - -// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. -func (s *HeadObjectInput) SetSSECustomerAlgorithm(v string) *HeadObjectInput { - s.SSECustomerAlgorithm = &v - return s -} - -// SetSSECustomerKey sets the SSECustomerKey field's value. -func (s *HeadObjectInput) SetSSECustomerKey(v string) *HeadObjectInput { - s.SSECustomerKey = &v - return s -} - -func (s *HeadObjectInput) getSSECustomerKey() (v string) { - if s.SSECustomerKey == nil { - return v - } - return *s.SSECustomerKey -} - -// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. -func (s *HeadObjectInput) SetSSECustomerKeyMD5(v string) *HeadObjectInput { - s.SSECustomerKeyMD5 = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *HeadObjectInput) SetVersionId(v string) *HeadObjectInput { - s.VersionId = &v - return s -} - -func (s *HeadObjectInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *HeadObjectInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s HeadObjectInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type HeadObjectOutput struct { - _ struct{} `type:"structure"` - - // Indicates that a range of bytes was specified. - AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"` - - // The archive state of the head object. - // - // This functionality is not supported for directory buckets. - ArchiveStatus *string `location:"header" locationName:"x-amz-archive-status" type:"string" enum:"ArchiveStatus"` - - // Indicates whether the object uses an S3 Bucket Key for server-side encryption - // with Key Management Service (KMS) keys (SSE-KMS). - // - // This functionality is not supported for directory buckets. - BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"` - - // Specifies caching behavior along the request/reply chain. - CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"` - - // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be - // present if it was uploaded with the object. When you use an API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumCRC32 *string `location:"header" locationName:"x-amz-checksum-crc32" type:"string"` - - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only - // be present if it was uploaded with the object. When you use an API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumCRC32C *string `location:"header" locationName:"x-amz-checksum-crc32c" type:"string"` - - // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be - // present if it was uploaded with the object. When you use the API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumSHA1 *string `location:"header" locationName:"x-amz-checksum-sha1" type:"string"` - - // The base64-encoded, 256-bit SHA-256 digest of the object. This will only - // be present if it was uploaded with the object. When you use an API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumSHA256 *string `location:"header" locationName:"x-amz-checksum-sha256" type:"string"` - - // Specifies presentational information for the object. - ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"` - - // Indicates what content encodings have been applied to the object and thus - // what decoding mechanisms must be applied to obtain the media-type referenced - // by the Content-Type header field. - ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"` - - // The language the content is in. - ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"` - - // Size of the body in bytes. - ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"` - - // A standard MIME type describing the format of the object data. - ContentType *string `location:"header" locationName:"Content-Type" type:"string"` - - // Specifies whether the object retrieved was (true) or was not (false) a Delete - // Marker. If false, this response header does not appear in the response. - // - // This functionality is not supported for directory buckets. - DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"` - - // An entity tag (ETag) is an opaque identifier assigned by a web server to - // a specific version of a resource found at a URL. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // If the object expiration is configured (see PutBucketLifecycleConfiguration - // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)), - // the response includes this header. It includes the expiry-date and rule-id - // key-value pairs providing object expiration information. The value of the - // rule-id is URL-encoded. - // - // This functionality is not supported for directory buckets. - Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"` - - // The date and time at which the object is no longer cacheable. - Expires *string `location:"header" locationName:"Expires" type:"string"` - - // Date and time when the object was last modified. - LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"` - - // A map of metadata to store with the object in S3. - // - // By default unmarshaled keys are written as a map keys in following canonicalized format: - // the first letter and any letter following a hyphen will be capitalized, and the rest as lowercase. - // Set `aws.Config.LowerCaseHeaderMaps` to `true` to write unmarshaled keys to the map as lowercase. - Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"` - - // This is set to the number of metadata entries not returned in x-amz-meta - // headers. This can happen if you create metadata using an API like SOAP that - // supports more flexible metadata than the REST API. For example, using SOAP, - // you can create metadata whose values are not legal HTTP headers. - // - // This functionality is not supported for directory buckets. - MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"` - - // Specifies whether a legal hold is in effect for this object. This header - // is only returned if the requester has the s3:GetObjectLegalHold permission. - // This header is not returned if the specified version of this object has never - // had a legal hold applied. For more information about S3 Object Lock, see - // Object Lock (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html). - // - // This functionality is not supported for directory buckets. - ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"` - - // The Object Lock mode, if any, that's in effect for this object. This header - // is only returned if the requester has the s3:GetObjectRetention permission. - // For more information about S3 Object Lock, see Object Lock (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html). - // - // This functionality is not supported for directory buckets. - ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"` - - // The date and time when the Object Lock retention period expires. This header - // is only returned if the requester has the s3:GetObjectRetention permission. - // - // This functionality is not supported for directory buckets. - ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"` - - // The count of parts this object has. This value is only returned if you specify - // partNumber in your request and the object was uploaded as a multipart upload. - PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"` - - // Amazon S3 can return this header if your request involves a bucket that is - // either a source or a destination in a replication rule. - // - // In replication, you have a source bucket on which you configure replication - // and destination bucket or buckets where Amazon S3 stores object replicas. - // When you request an object (GetObject) or object metadata (HeadObject) from - // these buckets, Amazon S3 will return the x-amz-replication-status header - // in the response as follows: - // - // * If requesting an object from the source bucket, Amazon S3 will return - // the x-amz-replication-status header if the object in your request is eligible - // for replication. For example, suppose that in your replication configuration, - // you specify object prefix TaxDocs requesting Amazon S3 to replicate objects - // with key prefix TaxDocs. Any objects you upload with this key name prefix, - // for example TaxDocs/document1.pdf, are eligible for replication. For any - // object request with this key name prefix, Amazon S3 will return the x-amz-replication-status - // header with value PENDING, COMPLETED or FAILED indicating object replication - // status. - // - // * If requesting an object from a destination bucket, Amazon S3 will return - // the x-amz-replication-status header with value REPLICA if the object in - // your request is a replica that Amazon S3 created and there is no replica - // modification replication in progress. - // - // * When replicating objects to multiple destination buckets, the x-amz-replication-status - // header acts differently. The header of the source object will only return - // a value of COMPLETED when replication is successful to all destinations. - // The header will remain at value PENDING until replication has completed - // for all destinations. If one or more destinations fails replication the - // header will return FAILED. - // - // For more information, see Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html). - // - // This functionality is not supported for directory buckets. - ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"` - - // If present, indicates that the requester was successfully charged for the - // request. - // - // This functionality is not supported for directory buckets. - RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` - - // If the object is an archived object (an object whose storage class is GLACIER), - // the response includes this header if either the archive restoration is in - // progress (see RestoreObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html) - // or an archive copy is already restored. - // - // If an archive copy is already restored, the header value indicates when Amazon - // S3 is scheduled to delete the object copy. For example: - // - // x-amz-restore: ongoing-request="false", expiry-date="Fri, 21 Dec 2012 00:00:00 - // GMT" - // - // If the object restoration is in progress, the header returns the value ongoing-request="true". - // - // For more information about archiving objects, see Transitioning Objects: - // General Considerations (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html#lifecycle-transition-general-considerations). - // - // This functionality is not supported for directory buckets. Only the S3 Express - // One Zone storage class is supported by directory buckets to store objects. - Restore *string `location:"header" locationName:"x-amz-restore" type:"string"` - - // If server-side encryption with a customer-provided encryption key was requested, - // the response will include this header to confirm the encryption algorithm - // that's used. - // - // This functionality is not supported for directory buckets. - SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` - - // If server-side encryption with a customer-provided encryption key was requested, - // the response will include this header to provide the round-trip message integrity - // verification of the customer-provided encryption key. - // - // This functionality is not supported for directory buckets. - SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` - - // If present, indicates the ID of the Key Management Service (KMS) symmetric - // encryption customer managed key that was used for the object. - // - // This functionality is not supported for directory buckets. - // - // SSEKMSKeyId is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by HeadObjectOutput's - // String and GoString methods. - SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` - - // The server-side encryption algorithm used when you store this object in Amazon - // S3 (for example, AES256, aws:kms, aws:kms:dsse). - // - // For directory buckets, only server-side encryption with Amazon S3 managed - // keys (SSE-S3) (AES256) is supported. - ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"` - - // Provides storage class information of the object. Amazon S3 returns this - // header for all objects except for S3 Standard storage class objects. - // - // For more information, see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html). - // - // Directory buckets - Only the S3 Express One Zone storage class is supported - // by directory buckets to store objects. - StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"` - - // Version ID of the object. - // - // This functionality is not supported for directory buckets. - VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"` - - // If the bucket is configured as a website, redirects requests for this object - // to another object in the same bucket or to an external URL. Amazon S3 stores - // the value of this header in the object metadata. - // - // This functionality is not supported for directory buckets. - WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" 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 HeadObjectOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s HeadObjectOutput) GoString() string { - return s.String() -} - -// SetAcceptRanges sets the AcceptRanges field's value. -func (s *HeadObjectOutput) SetAcceptRanges(v string) *HeadObjectOutput { - s.AcceptRanges = &v - return s -} - -// SetArchiveStatus sets the ArchiveStatus field's value. -func (s *HeadObjectOutput) SetArchiveStatus(v string) *HeadObjectOutput { - s.ArchiveStatus = &v - return s -} - -// SetBucketKeyEnabled sets the BucketKeyEnabled field's value. -func (s *HeadObjectOutput) SetBucketKeyEnabled(v bool) *HeadObjectOutput { - s.BucketKeyEnabled = &v - return s -} - -// SetCacheControl sets the CacheControl field's value. -func (s *HeadObjectOutput) SetCacheControl(v string) *HeadObjectOutput { - s.CacheControl = &v - return s -} - -// SetChecksumCRC32 sets the ChecksumCRC32 field's value. -func (s *HeadObjectOutput) SetChecksumCRC32(v string) *HeadObjectOutput { - s.ChecksumCRC32 = &v - return s -} - -// SetChecksumCRC32C sets the ChecksumCRC32C field's value. -func (s *HeadObjectOutput) SetChecksumCRC32C(v string) *HeadObjectOutput { - s.ChecksumCRC32C = &v - return s -} - -// SetChecksumSHA1 sets the ChecksumSHA1 field's value. -func (s *HeadObjectOutput) SetChecksumSHA1(v string) *HeadObjectOutput { - s.ChecksumSHA1 = &v - return s -} - -// SetChecksumSHA256 sets the ChecksumSHA256 field's value. -func (s *HeadObjectOutput) SetChecksumSHA256(v string) *HeadObjectOutput { - s.ChecksumSHA256 = &v - return s -} - -// SetContentDisposition sets the ContentDisposition field's value. -func (s *HeadObjectOutput) SetContentDisposition(v string) *HeadObjectOutput { - s.ContentDisposition = &v - return s -} - -// SetContentEncoding sets the ContentEncoding field's value. -func (s *HeadObjectOutput) SetContentEncoding(v string) *HeadObjectOutput { - s.ContentEncoding = &v - return s -} - -// SetContentLanguage sets the ContentLanguage field's value. -func (s *HeadObjectOutput) SetContentLanguage(v string) *HeadObjectOutput { - s.ContentLanguage = &v - return s -} - -// SetContentLength sets the ContentLength field's value. -func (s *HeadObjectOutput) SetContentLength(v int64) *HeadObjectOutput { - s.ContentLength = &v - return s -} - -// SetContentType sets the ContentType field's value. -func (s *HeadObjectOutput) SetContentType(v string) *HeadObjectOutput { - s.ContentType = &v - return s -} - -// SetDeleteMarker sets the DeleteMarker field's value. -func (s *HeadObjectOutput) SetDeleteMarker(v bool) *HeadObjectOutput { - s.DeleteMarker = &v - return s -} - -// SetETag sets the ETag field's value. -func (s *HeadObjectOutput) SetETag(v string) *HeadObjectOutput { - s.ETag = &v - return s -} - -// SetExpiration sets the Expiration field's value. -func (s *HeadObjectOutput) SetExpiration(v string) *HeadObjectOutput { - s.Expiration = &v - return s -} - -// SetExpires sets the Expires field's value. -func (s *HeadObjectOutput) SetExpires(v string) *HeadObjectOutput { - s.Expires = &v - return s -} - -// SetLastModified sets the LastModified field's value. -func (s *HeadObjectOutput) SetLastModified(v time.Time) *HeadObjectOutput { - s.LastModified = &v - return s -} - -// SetMetadata sets the Metadata field's value. -func (s *HeadObjectOutput) SetMetadata(v map[string]*string) *HeadObjectOutput { - s.Metadata = v - return s -} - -// SetMissingMeta sets the MissingMeta field's value. -func (s *HeadObjectOutput) SetMissingMeta(v int64) *HeadObjectOutput { - s.MissingMeta = &v - return s -} - -// SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value. -func (s *HeadObjectOutput) SetObjectLockLegalHoldStatus(v string) *HeadObjectOutput { - s.ObjectLockLegalHoldStatus = &v - return s -} - -// SetObjectLockMode sets the ObjectLockMode field's value. -func (s *HeadObjectOutput) SetObjectLockMode(v string) *HeadObjectOutput { - s.ObjectLockMode = &v - return s -} - -// SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value. -func (s *HeadObjectOutput) SetObjectLockRetainUntilDate(v time.Time) *HeadObjectOutput { - s.ObjectLockRetainUntilDate = &v - return s -} - -// SetPartsCount sets the PartsCount field's value. -func (s *HeadObjectOutput) SetPartsCount(v int64) *HeadObjectOutput { - s.PartsCount = &v - return s -} - -// SetReplicationStatus sets the ReplicationStatus field's value. -func (s *HeadObjectOutput) SetReplicationStatus(v string) *HeadObjectOutput { - s.ReplicationStatus = &v - return s -} - -// SetRequestCharged sets the RequestCharged field's value. -func (s *HeadObjectOutput) SetRequestCharged(v string) *HeadObjectOutput { - s.RequestCharged = &v - return s -} - -// SetRestore sets the Restore field's value. -func (s *HeadObjectOutput) SetRestore(v string) *HeadObjectOutput { - s.Restore = &v - return s -} - -// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. -func (s *HeadObjectOutput) SetSSECustomerAlgorithm(v string) *HeadObjectOutput { - s.SSECustomerAlgorithm = &v - return s -} - -// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. -func (s *HeadObjectOutput) SetSSECustomerKeyMD5(v string) *HeadObjectOutput { - s.SSECustomerKeyMD5 = &v - return s -} - -// SetSSEKMSKeyId sets the SSEKMSKeyId field's value. -func (s *HeadObjectOutput) SetSSEKMSKeyId(v string) *HeadObjectOutput { - s.SSEKMSKeyId = &v - return s -} - -// SetServerSideEncryption sets the ServerSideEncryption field's value. -func (s *HeadObjectOutput) SetServerSideEncryption(v string) *HeadObjectOutput { - s.ServerSideEncryption = &v - return s -} - -// SetStorageClass sets the StorageClass field's value. -func (s *HeadObjectOutput) SetStorageClass(v string) *HeadObjectOutput { - s.StorageClass = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *HeadObjectOutput) SetVersionId(v string) *HeadObjectOutput { - s.VersionId = &v - return s -} - -// SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value. -func (s *HeadObjectOutput) SetWebsiteRedirectLocation(v string) *HeadObjectOutput { - s.WebsiteRedirectLocation = &v - return s -} - -// Container for the Suffix element. -type IndexDocument struct { - _ struct{} `type:"structure"` - - // A suffix that is appended to a request that is for a directory on the website - // endpoint. (For example, if the suffix is index.html and you make a request - // to samplebucket/images/, the data that is returned will be for the object - // with the key name images/index.html.) The suffix must not be empty and must - // not include a slash character. - // - // Replacement must be made for object keys containing special characters (such - // as carriage returns) when using XML requests. For more information, see XML - // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints). - // - // Suffix is a required field - Suffix *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 IndexDocument) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s IndexDocument) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *IndexDocument) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "IndexDocument"} - if s.Suffix == nil { - invalidParams.Add(request.NewErrParamRequired("Suffix")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSuffix sets the Suffix field's value. -func (s *IndexDocument) SetSuffix(v string) *IndexDocument { - s.Suffix = &v - return s -} - -// Container element that identifies who initiated the multipart upload. -type Initiator struct { - _ struct{} `type:"structure"` - - // Name of the Principal. - // - // This functionality is not supported for directory buckets. - DisplayName *string `type:"string"` - - // If the principal is an Amazon Web Services account, it provides the Canonical - // User ID. If the principal is an IAM User, it provides a user ARN value. - // - // Directory buckets - If the principal is an Amazon Web Services account, it - // provides the Amazon Web Services account ID. If the principal is an IAM User, - // it provides a user ARN value. - ID *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 Initiator) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Initiator) GoString() string { - return s.String() -} - -// SetDisplayName sets the DisplayName field's value. -func (s *Initiator) SetDisplayName(v string) *Initiator { - s.DisplayName = &v - return s -} - -// SetID sets the ID field's value. -func (s *Initiator) SetID(v string) *Initiator { - s.ID = &v - return s -} - -// Describes the serialization format of the object. -type InputSerialization struct { - _ struct{} `type:"structure"` - - // Describes the serialization of a CSV-encoded object. - CSV *CSVInput `type:"structure"` - - // Specifies object's compression format. Valid values: NONE, GZIP, BZIP2. Default - // Value: NONE. - CompressionType *string `type:"string" enum:"CompressionType"` - - // Specifies JSON as object's input serialization format. - JSON *JSONInput `type:"structure"` - - // Specifies Parquet as object's input serialization format. - Parquet *ParquetInput `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 InputSerialization) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s InputSerialization) GoString() string { - return s.String() -} - -// SetCSV sets the CSV field's value. -func (s *InputSerialization) SetCSV(v *CSVInput) *InputSerialization { - s.CSV = v - return s -} - -// SetCompressionType sets the CompressionType field's value. -func (s *InputSerialization) SetCompressionType(v string) *InputSerialization { - s.CompressionType = &v - return s -} - -// SetJSON sets the JSON field's value. -func (s *InputSerialization) SetJSON(v *JSONInput) *InputSerialization { - s.JSON = v - return s -} - -// SetParquet sets the Parquet field's value. -func (s *InputSerialization) SetParquet(v *ParquetInput) *InputSerialization { - s.Parquet = v - return s -} - -// A container for specifying S3 Intelligent-Tiering filters. The filters determine -// the subset of objects to which the rule applies. -type IntelligentTieringAndOperator struct { - _ struct{} `type:"structure"` - - // An object key name prefix that identifies the subset of objects to which - // the configuration applies. - Prefix *string `type:"string"` - - // All of these tags must exist in the object's tag set in order for the configuration - // to apply. - Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"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 IntelligentTieringAndOperator) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s IntelligentTieringAndOperator) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *IntelligentTieringAndOperator) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "IntelligentTieringAndOperator"} - 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 -} - -// SetPrefix sets the Prefix field's value. -func (s *IntelligentTieringAndOperator) SetPrefix(v string) *IntelligentTieringAndOperator { - s.Prefix = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *IntelligentTieringAndOperator) SetTags(v []*Tag) *IntelligentTieringAndOperator { - s.Tags = v - return s -} - -// Specifies the S3 Intelligent-Tiering configuration for an Amazon S3 bucket. -// -// For information about the S3 Intelligent-Tiering storage class, see Storage -// class for automatically optimizing frequently and infrequently accessed objects -// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access). -type IntelligentTieringConfiguration struct { - _ struct{} `type:"structure"` - - // Specifies a bucket filter. The configuration only includes objects that meet - // the filter's criteria. - Filter *IntelligentTieringFilter `type:"structure"` - - // The ID used to identify the S3 Intelligent-Tiering configuration. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // Specifies the status of the configuration. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"IntelligentTieringStatus"` - - // Specifies the S3 Intelligent-Tiering storage class tier of the configuration. - // - // Tierings is a required field - Tierings []*Tiering `locationName:"Tiering" type:"list" flattened:"true" 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 IntelligentTieringConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s IntelligentTieringConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *IntelligentTieringConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "IntelligentTieringConfiguration"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Status == nil { - invalidParams.Add(request.NewErrParamRequired("Status")) - } - if s.Tierings == nil { - invalidParams.Add(request.NewErrParamRequired("Tierings")) - } - if s.Filter != nil { - if err := s.Filter.Validate(); err != nil { - invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) - } - } - if s.Tierings != nil { - for i, v := range s.Tierings { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tierings", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilter sets the Filter field's value. -func (s *IntelligentTieringConfiguration) SetFilter(v *IntelligentTieringFilter) *IntelligentTieringConfiguration { - s.Filter = v - return s -} - -// SetId sets the Id field's value. -func (s *IntelligentTieringConfiguration) SetId(v string) *IntelligentTieringConfiguration { - s.Id = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *IntelligentTieringConfiguration) SetStatus(v string) *IntelligentTieringConfiguration { - s.Status = &v - return s -} - -// SetTierings sets the Tierings field's value. -func (s *IntelligentTieringConfiguration) SetTierings(v []*Tiering) *IntelligentTieringConfiguration { - s.Tierings = v - return s -} - -// The Filter is used to identify objects that the S3 Intelligent-Tiering configuration -// applies to. -type IntelligentTieringFilter struct { - _ struct{} `type:"structure"` - - // A conjunction (logical AND) of predicates, which is used in evaluating a - // metrics filter. The operator must have at least two predicates, and an object - // must match all of the predicates in order for the filter to apply. - And *IntelligentTieringAndOperator `type:"structure"` - - // An object key name prefix that identifies the subset of objects to which - // the rule applies. - // - // Replacement must be made for object keys containing special characters (such - // as carriage returns) when using XML requests. For more information, see XML - // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints). - Prefix *string `type:"string"` - - // A container of a key value name pair. - Tag *Tag `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 IntelligentTieringFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s IntelligentTieringFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *IntelligentTieringFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "IntelligentTieringFilter"} - if s.And != nil { - if err := s.And.Validate(); err != nil { - invalidParams.AddNested("And", err.(request.ErrInvalidParams)) - } - } - if s.Tag != nil { - if err := s.Tag.Validate(); err != nil { - invalidParams.AddNested("Tag", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAnd sets the And field's value. -func (s *IntelligentTieringFilter) SetAnd(v *IntelligentTieringAndOperator) *IntelligentTieringFilter { - s.And = v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *IntelligentTieringFilter) SetPrefix(v string) *IntelligentTieringFilter { - s.Prefix = &v - return s -} - -// SetTag sets the Tag field's value. -func (s *IntelligentTieringFilter) SetTag(v *Tag) *IntelligentTieringFilter { - s.Tag = v - return s -} - -// Specifies the inventory configuration for an Amazon S3 bucket. For more information, -// see GET Bucket inventory (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETInventoryConfig.html) -// in the Amazon S3 API Reference. -type InventoryConfiguration struct { - _ struct{} `type:"structure"` - - // Contains information about where to publish the inventory results. - // - // Destination is a required field - Destination *InventoryDestination `type:"structure" required:"true"` - - // Specifies an inventory filter. The inventory only includes objects that meet - // the filter's criteria. - Filter *InventoryFilter `type:"structure"` - - // The ID used to identify the inventory configuration. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // Object versions to include in the inventory list. If set to All, the list - // includes all the object versions, which adds the version-related fields VersionId, - // IsLatest, and DeleteMarker to the list. If set to Current, the list does - // not contain these version-related fields. - // - // IncludedObjectVersions is a required field - IncludedObjectVersions *string `type:"string" required:"true" enum:"InventoryIncludedObjectVersions"` - - // Specifies whether the inventory is enabled or disabled. If set to True, an - // inventory list is generated. If set to False, no inventory list is generated. - // - // IsEnabled is a required field - IsEnabled *bool `type:"boolean" required:"true"` - - // Contains the optional fields that are included in the inventory results. - OptionalFields []*string `locationNameList:"Field" type:"list" enum:"InventoryOptionalField"` - - // Specifies the schedule for generating inventory results. - // - // Schedule is a required field - Schedule *InventorySchedule `type:"structure" 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 InventoryConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s InventoryConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InventoryConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InventoryConfiguration"} - if s.Destination == nil { - invalidParams.Add(request.NewErrParamRequired("Destination")) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.IncludedObjectVersions == nil { - invalidParams.Add(request.NewErrParamRequired("IncludedObjectVersions")) - } - if s.IsEnabled == nil { - invalidParams.Add(request.NewErrParamRequired("IsEnabled")) - } - if s.Schedule == nil { - invalidParams.Add(request.NewErrParamRequired("Schedule")) - } - if s.Destination != nil { - if err := s.Destination.Validate(); err != nil { - invalidParams.AddNested("Destination", err.(request.ErrInvalidParams)) - } - } - if s.Filter != nil { - if err := s.Filter.Validate(); err != nil { - invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) - } - } - if s.Schedule != nil { - if err := s.Schedule.Validate(); err != nil { - invalidParams.AddNested("Schedule", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestination sets the Destination field's value. -func (s *InventoryConfiguration) SetDestination(v *InventoryDestination) *InventoryConfiguration { - s.Destination = v - return s -} - -// SetFilter sets the Filter field's value. -func (s *InventoryConfiguration) SetFilter(v *InventoryFilter) *InventoryConfiguration { - s.Filter = v - return s -} - -// SetId sets the Id field's value. -func (s *InventoryConfiguration) SetId(v string) *InventoryConfiguration { - s.Id = &v - return s -} - -// SetIncludedObjectVersions sets the IncludedObjectVersions field's value. -func (s *InventoryConfiguration) SetIncludedObjectVersions(v string) *InventoryConfiguration { - s.IncludedObjectVersions = &v - return s -} - -// SetIsEnabled sets the IsEnabled field's value. -func (s *InventoryConfiguration) SetIsEnabled(v bool) *InventoryConfiguration { - s.IsEnabled = &v - return s -} - -// SetOptionalFields sets the OptionalFields field's value. -func (s *InventoryConfiguration) SetOptionalFields(v []*string) *InventoryConfiguration { - s.OptionalFields = v - return s -} - -// SetSchedule sets the Schedule field's value. -func (s *InventoryConfiguration) SetSchedule(v *InventorySchedule) *InventoryConfiguration { - s.Schedule = v - return s -} - -// Specifies the inventory configuration for an Amazon S3 bucket. -type InventoryDestination struct { - _ struct{} `type:"structure"` - - // Contains the bucket name, file format, bucket owner (optional), and prefix - // (optional) where inventory results are published. - // - // S3BucketDestination is a required field - S3BucketDestination *InventoryS3BucketDestination `type:"structure" 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 InventoryDestination) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s InventoryDestination) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InventoryDestination) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InventoryDestination"} - if s.S3BucketDestination == nil { - invalidParams.Add(request.NewErrParamRequired("S3BucketDestination")) - } - if s.S3BucketDestination != nil { - if err := s.S3BucketDestination.Validate(); err != nil { - invalidParams.AddNested("S3BucketDestination", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetS3BucketDestination sets the S3BucketDestination field's value. -func (s *InventoryDestination) SetS3BucketDestination(v *InventoryS3BucketDestination) *InventoryDestination { - s.S3BucketDestination = v - return s -} - -// Contains the type of server-side encryption used to encrypt the inventory -// results. -type InventoryEncryption struct { - _ struct{} `type:"structure"` - - // Specifies the use of SSE-KMS to encrypt delivered inventory reports. - SSEKMS *SSEKMS `locationName:"SSE-KMS" type:"structure"` - - // Specifies the use of SSE-S3 to encrypt delivered inventory reports. - SSES3 *SSES3 `locationName:"SSE-S3" 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 InventoryEncryption) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s InventoryEncryption) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InventoryEncryption) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InventoryEncryption"} - if s.SSEKMS != nil { - if err := s.SSEKMS.Validate(); err != nil { - invalidParams.AddNested("SSEKMS", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSSEKMS sets the SSEKMS field's value. -func (s *InventoryEncryption) SetSSEKMS(v *SSEKMS) *InventoryEncryption { - s.SSEKMS = v - return s -} - -// SetSSES3 sets the SSES3 field's value. -func (s *InventoryEncryption) SetSSES3(v *SSES3) *InventoryEncryption { - s.SSES3 = v - return s -} - -// Specifies an inventory filter. The inventory only includes objects that meet -// the filter's criteria. -type InventoryFilter struct { - _ struct{} `type:"structure"` - - // The prefix that an object must have to be included in the inventory results. - // - // Prefix is a required field - Prefix *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 InventoryFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s InventoryFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InventoryFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InventoryFilter"} - if s.Prefix == nil { - invalidParams.Add(request.NewErrParamRequired("Prefix")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPrefix sets the Prefix field's value. -func (s *InventoryFilter) SetPrefix(v string) *InventoryFilter { - s.Prefix = &v - return s -} - -// Contains the bucket name, file format, bucket owner (optional), and prefix -// (optional) where inventory results are published. -type InventoryS3BucketDestination struct { - _ struct{} `type:"structure"` - - // The account ID that owns the destination S3 bucket. If no account ID is provided, - // the owner is not validated before exporting data. - // - // Although this value is optional, we strongly recommend that you set it to - // help prevent problems if the destination bucket ownership changes. - AccountId *string `type:"string"` - - // The Amazon Resource Name (ARN) of the bucket where inventory results will - // be published. - // - // Bucket is a required field - Bucket *string `type:"string" required:"true"` - - // Contains the type of server-side encryption used to encrypt the inventory - // results. - Encryption *InventoryEncryption `type:"structure"` - - // Specifies the output format of the inventory results. - // - // Format is a required field - Format *string `type:"string" required:"true" enum:"InventoryFormat"` - - // The prefix that is prepended to all inventory results. - Prefix *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 InventoryS3BucketDestination) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s InventoryS3BucketDestination) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InventoryS3BucketDestination) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InventoryS3BucketDestination"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Format == nil { - invalidParams.Add(request.NewErrParamRequired("Format")) - } - if s.Encryption != nil { - if err := s.Encryption.Validate(); err != nil { - invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccountId sets the AccountId field's value. -func (s *InventoryS3BucketDestination) SetAccountId(v string) *InventoryS3BucketDestination { - s.AccountId = &v - return s -} - -// SetBucket sets the Bucket field's value. -func (s *InventoryS3BucketDestination) SetBucket(v string) *InventoryS3BucketDestination { - s.Bucket = &v - return s -} - -func (s *InventoryS3BucketDestination) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetEncryption sets the Encryption field's value. -func (s *InventoryS3BucketDestination) SetEncryption(v *InventoryEncryption) *InventoryS3BucketDestination { - s.Encryption = v - return s -} - -// SetFormat sets the Format field's value. -func (s *InventoryS3BucketDestination) SetFormat(v string) *InventoryS3BucketDestination { - s.Format = &v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *InventoryS3BucketDestination) SetPrefix(v string) *InventoryS3BucketDestination { - s.Prefix = &v - return s -} - -// Specifies the schedule for generating inventory results. -type InventorySchedule struct { - _ struct{} `type:"structure"` - - // Specifies how frequently inventory results are produced. - // - // Frequency is a required field - Frequency *string `type:"string" required:"true" enum:"InventoryFrequency"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s InventorySchedule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s InventorySchedule) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *InventorySchedule) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "InventorySchedule"} - if s.Frequency == nil { - invalidParams.Add(request.NewErrParamRequired("Frequency")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFrequency sets the Frequency field's value. -func (s *InventorySchedule) SetFrequency(v string) *InventorySchedule { - s.Frequency = &v - return s -} - -// Specifies JSON as object's input serialization format. -type JSONInput struct { - _ struct{} `type:"structure"` - - // The type of JSON. Valid values: Document, Lines. - Type *string `type:"string" enum:"JSONType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s JSONInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s JSONInput) GoString() string { - return s.String() -} - -// SetType sets the Type field's value. -func (s *JSONInput) SetType(v string) *JSONInput { - s.Type = &v - return s -} - -// Specifies JSON as request's output serialization format. -type JSONOutput struct { - _ struct{} `type:"structure"` - - // The value used to separate individual records in the output. If no value - // is specified, Amazon S3 uses a newline character ('\n'). - RecordDelimiter *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 JSONOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s JSONOutput) GoString() string { - return s.String() -} - -// SetRecordDelimiter sets the RecordDelimiter field's value. -func (s *JSONOutput) SetRecordDelimiter(v string) *JSONOutput { - s.RecordDelimiter = &v - return s -} - -// A container for object key name prefix and suffix filtering rules. -type KeyFilter struct { - _ struct{} `type:"structure"` - - // A list of containers for the key-value pair that defines the criteria for - // the filter rule. - FilterRules []*FilterRule `locationName:"FilterRule" type:"list" flattened:"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 KeyFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s KeyFilter) GoString() string { - return s.String() -} - -// SetFilterRules sets the FilterRules field's value. -func (s *KeyFilter) SetFilterRules(v []*FilterRule) *KeyFilter { - s.FilterRules = v - return s -} - -// A container for specifying the configuration for Lambda notifications. -type LambdaFunctionConfiguration struct { - _ struct{} `type:"structure"` - - // The Amazon S3 bucket event for which to invoke the Lambda function. For more - // information, see Supported Event Types (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) - // in the Amazon S3 User Guide. - // - // Events is a required field - Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true" enum:"Event"` - - // Specifies object key name filtering rules. For information about key name - // filtering, see Configuring event notifications using object key name filtering - // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/notification-how-to-filtering.html) - // in the Amazon S3 User Guide. - Filter *NotificationConfigurationFilter `type:"structure"` - - // An optional unique identifier for configurations in a notification configuration. - // If you don't provide one, Amazon S3 will assign an ID. - Id *string `type:"string"` - - // The Amazon Resource Name (ARN) of the Lambda function that Amazon S3 invokes - // when the specified event type occurs. - // - // LambdaFunctionArn is a required field - LambdaFunctionArn *string `locationName:"CloudFunction" 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 LambdaFunctionConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s LambdaFunctionConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LambdaFunctionConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LambdaFunctionConfiguration"} - if s.Events == nil { - invalidParams.Add(request.NewErrParamRequired("Events")) - } - if s.LambdaFunctionArn == nil { - invalidParams.Add(request.NewErrParamRequired("LambdaFunctionArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEvents sets the Events field's value. -func (s *LambdaFunctionConfiguration) SetEvents(v []*string) *LambdaFunctionConfiguration { - s.Events = v - return s -} - -// SetFilter sets the Filter field's value. -func (s *LambdaFunctionConfiguration) SetFilter(v *NotificationConfigurationFilter) *LambdaFunctionConfiguration { - s.Filter = v - return s -} - -// SetId sets the Id field's value. -func (s *LambdaFunctionConfiguration) SetId(v string) *LambdaFunctionConfiguration { - s.Id = &v - return s -} - -// SetLambdaFunctionArn sets the LambdaFunctionArn field's value. -func (s *LambdaFunctionConfiguration) SetLambdaFunctionArn(v string) *LambdaFunctionConfiguration { - s.LambdaFunctionArn = &v - return s -} - -// Container for lifecycle rules. You can add as many as 1000 rules. -// -// For more information see, Managing your storage lifecycle (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html) -// in the Amazon S3 User Guide. -type LifecycleConfiguration struct { - _ struct{} `type:"structure"` - - // Specifies lifecycle configuration rules for an Amazon S3 bucket. - // - // Rules is a required field - Rules []*Rule `locationName:"Rule" type:"list" flattened:"true" 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 LifecycleConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s LifecycleConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LifecycleConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LifecycleConfiguration"} - if s.Rules == nil { - invalidParams.Add(request.NewErrParamRequired("Rules")) - } - if s.Rules != nil { - for i, v := range s.Rules { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRules sets the Rules field's value. -func (s *LifecycleConfiguration) SetRules(v []*Rule) *LifecycleConfiguration { - s.Rules = v - return s -} - -// Container for the expiration for the lifecycle of the object. -// -// For more information see, Managing your storage lifecycle (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html) -// in the Amazon S3 User Guide. -type LifecycleExpiration struct { - _ struct{} `type:"structure"` - - // Indicates at what date the object is to be moved or deleted. The date value - // must conform to the ISO 8601 format. The time is always midnight UTC. - Date *time.Time `type:"timestamp" timestampFormat:"iso8601"` - - // Indicates the lifetime, in days, of the objects that are subject to the rule. - // The value must be a non-zero positive integer. - Days *int64 `type:"integer"` - - // Indicates whether Amazon S3 will remove a delete marker with no noncurrent - // versions. If set to true, the delete marker will be expired; if set to false - // the policy takes no action. This cannot be specified with Days or Date in - // a Lifecycle Expiration Policy. - ExpiredObjectDeleteMarker *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 LifecycleExpiration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s LifecycleExpiration) GoString() string { - return s.String() -} - -// SetDate sets the Date field's value. -func (s *LifecycleExpiration) SetDate(v time.Time) *LifecycleExpiration { - s.Date = &v - return s -} - -// SetDays sets the Days field's value. -func (s *LifecycleExpiration) SetDays(v int64) *LifecycleExpiration { - s.Days = &v - return s -} - -// SetExpiredObjectDeleteMarker sets the ExpiredObjectDeleteMarker field's value. -func (s *LifecycleExpiration) SetExpiredObjectDeleteMarker(v bool) *LifecycleExpiration { - s.ExpiredObjectDeleteMarker = &v - return s -} - -// A lifecycle rule for individual objects in an Amazon S3 bucket. -// -// For more information see, Managing your storage lifecycle (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html) -// in the Amazon S3 User Guide. -type LifecycleRule struct { - _ struct{} `type:"structure"` - - // Specifies the days since the initiation of an incomplete multipart upload - // that Amazon S3 will wait before permanently removing all parts of the upload. - // For more information, see Aborting Incomplete Multipart Uploads Using a Bucket - // Lifecycle Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config) - // in the Amazon S3 User Guide. - AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `type:"structure"` - - // Specifies the expiration for the lifecycle of the object in the form of date, - // days and, whether the object has a delete marker. - Expiration *LifecycleExpiration `type:"structure"` - - // The Filter is used to identify objects that a Lifecycle Rule applies to. - // A Filter must have exactly one of Prefix, Tag, or And specified. Filter is - // required if the LifecycleRule does not contain a Prefix element. - Filter *LifecycleRuleFilter `type:"structure"` - - // Unique identifier for the rule. The value cannot be longer than 255 characters. - ID *string `type:"string"` - - // Specifies when noncurrent object versions expire. Upon expiration, Amazon - // S3 permanently deletes the noncurrent object versions. You set this lifecycle - // configuration action on a bucket that has versioning enabled (or suspended) - // to request that Amazon S3 delete noncurrent object versions at a specific - // period in the object's lifetime. - NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"` - - // Specifies the transition rule for the lifecycle rule that describes when - // noncurrent objects transition to a specific storage class. If your bucket - // is versioning-enabled (or versioning is suspended), you can set this action - // to request that Amazon S3 transition noncurrent object versions to a specific - // storage class at a set period in the object's lifetime. - NoncurrentVersionTransitions []*NoncurrentVersionTransition `locationName:"NoncurrentVersionTransition" type:"list" flattened:"true"` - - // Prefix identifying one or more objects to which the rule applies. This is - // no longer used; use Filter instead. - // - // Replacement must be made for object keys containing special characters (such - // as carriage returns) when using XML requests. For more information, see XML - // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints). - // - // Deprecated: Prefix has been deprecated - Prefix *string `deprecated:"true" type:"string"` - - // If 'Enabled', the rule is currently being applied. If 'Disabled', the rule - // is not currently being applied. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"ExpirationStatus"` - - // Specifies when an Amazon S3 object transitions to a specified storage class. - Transitions []*Transition `locationName:"Transition" type:"list" flattened:"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 LifecycleRule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s LifecycleRule) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LifecycleRule) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LifecycleRule"} - if s.Status == nil { - invalidParams.Add(request.NewErrParamRequired("Status")) - } - if s.Filter != nil { - if err := s.Filter.Validate(); err != nil { - invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAbortIncompleteMultipartUpload sets the AbortIncompleteMultipartUpload field's value. -func (s *LifecycleRule) SetAbortIncompleteMultipartUpload(v *AbortIncompleteMultipartUpload) *LifecycleRule { - s.AbortIncompleteMultipartUpload = v - return s -} - -// SetExpiration sets the Expiration field's value. -func (s *LifecycleRule) SetExpiration(v *LifecycleExpiration) *LifecycleRule { - s.Expiration = v - return s -} - -// SetFilter sets the Filter field's value. -func (s *LifecycleRule) SetFilter(v *LifecycleRuleFilter) *LifecycleRule { - s.Filter = v - return s -} - -// SetID sets the ID field's value. -func (s *LifecycleRule) SetID(v string) *LifecycleRule { - s.ID = &v - return s -} - -// SetNoncurrentVersionExpiration sets the NoncurrentVersionExpiration field's value. -func (s *LifecycleRule) SetNoncurrentVersionExpiration(v *NoncurrentVersionExpiration) *LifecycleRule { - s.NoncurrentVersionExpiration = v - return s -} - -// SetNoncurrentVersionTransitions sets the NoncurrentVersionTransitions field's value. -func (s *LifecycleRule) SetNoncurrentVersionTransitions(v []*NoncurrentVersionTransition) *LifecycleRule { - s.NoncurrentVersionTransitions = v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *LifecycleRule) SetPrefix(v string) *LifecycleRule { - s.Prefix = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *LifecycleRule) SetStatus(v string) *LifecycleRule { - s.Status = &v - return s -} - -// SetTransitions sets the Transitions field's value. -func (s *LifecycleRule) SetTransitions(v []*Transition) *LifecycleRule { - s.Transitions = v - return s -} - -// This is used in a Lifecycle Rule Filter to apply a logical AND to two or -// more predicates. The Lifecycle Rule will apply to any object matching all -// of the predicates configured inside the And operator. -type LifecycleRuleAndOperator struct { - _ struct{} `type:"structure"` - - // Minimum object size to which the rule applies. - ObjectSizeGreaterThan *int64 `type:"long"` - - // Maximum object size to which the rule applies. - ObjectSizeLessThan *int64 `type:"long"` - - // Prefix identifying one or more objects to which the rule applies. - Prefix *string `type:"string"` - - // All of these tags must exist in the object's tag set in order for the rule - // to apply. - Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"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 LifecycleRuleAndOperator) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s LifecycleRuleAndOperator) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LifecycleRuleAndOperator) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LifecycleRuleAndOperator"} - 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 -} - -// SetObjectSizeGreaterThan sets the ObjectSizeGreaterThan field's value. -func (s *LifecycleRuleAndOperator) SetObjectSizeGreaterThan(v int64) *LifecycleRuleAndOperator { - s.ObjectSizeGreaterThan = &v - return s -} - -// SetObjectSizeLessThan sets the ObjectSizeLessThan field's value. -func (s *LifecycleRuleAndOperator) SetObjectSizeLessThan(v int64) *LifecycleRuleAndOperator { - s.ObjectSizeLessThan = &v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *LifecycleRuleAndOperator) SetPrefix(v string) *LifecycleRuleAndOperator { - s.Prefix = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *LifecycleRuleAndOperator) SetTags(v []*Tag) *LifecycleRuleAndOperator { - s.Tags = v - return s -} - -// The Filter is used to identify objects that a Lifecycle Rule applies to. -// A Filter can have exactly one of Prefix, Tag, ObjectSizeGreaterThan, ObjectSizeLessThan, -// or And specified. If the Filter element is left empty, the Lifecycle Rule -// applies to all objects in the bucket. -type LifecycleRuleFilter struct { - _ struct{} `type:"structure"` - - // This is used in a Lifecycle Rule Filter to apply a logical AND to two or - // more predicates. The Lifecycle Rule will apply to any object matching all - // of the predicates configured inside the And operator. - And *LifecycleRuleAndOperator `type:"structure"` - - // Minimum object size to which the rule applies. - ObjectSizeGreaterThan *int64 `type:"long"` - - // Maximum object size to which the rule applies. - ObjectSizeLessThan *int64 `type:"long"` - - // Prefix identifying one or more objects to which the rule applies. - // - // Replacement must be made for object keys containing special characters (such - // as carriage returns) when using XML requests. For more information, see XML - // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints). - Prefix *string `type:"string"` - - // This tag must exist in the object's tag set in order for the rule to apply. - Tag *Tag `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 LifecycleRuleFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s LifecycleRuleFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LifecycleRuleFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LifecycleRuleFilter"} - if s.And != nil { - if err := s.And.Validate(); err != nil { - invalidParams.AddNested("And", err.(request.ErrInvalidParams)) - } - } - if s.Tag != nil { - if err := s.Tag.Validate(); err != nil { - invalidParams.AddNested("Tag", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAnd sets the And field's value. -func (s *LifecycleRuleFilter) SetAnd(v *LifecycleRuleAndOperator) *LifecycleRuleFilter { - s.And = v - return s -} - -// SetObjectSizeGreaterThan sets the ObjectSizeGreaterThan field's value. -func (s *LifecycleRuleFilter) SetObjectSizeGreaterThan(v int64) *LifecycleRuleFilter { - s.ObjectSizeGreaterThan = &v - return s -} - -// SetObjectSizeLessThan sets the ObjectSizeLessThan field's value. -func (s *LifecycleRuleFilter) SetObjectSizeLessThan(v int64) *LifecycleRuleFilter { - s.ObjectSizeLessThan = &v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *LifecycleRuleFilter) SetPrefix(v string) *LifecycleRuleFilter { - s.Prefix = &v - return s -} - -// SetTag sets the Tag field's value. -func (s *LifecycleRuleFilter) SetTag(v *Tag) *LifecycleRuleFilter { - s.Tag = v - return s -} - -type ListBucketAnalyticsConfigurationsInput struct { - _ struct{} `locationName:"ListBucketAnalyticsConfigurationsRequest" type:"structure"` - - // The name of the bucket from which analytics configurations are retrieved. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The ContinuationToken that represents a placeholder from where this request - // should begin. - ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 ListBucketAnalyticsConfigurationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListBucketAnalyticsConfigurationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListBucketAnalyticsConfigurationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListBucketAnalyticsConfigurationsInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *ListBucketAnalyticsConfigurationsInput) SetBucket(v string) *ListBucketAnalyticsConfigurationsInput { - s.Bucket = &v - return s -} - -func (s *ListBucketAnalyticsConfigurationsInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetContinuationToken sets the ContinuationToken field's value. -func (s *ListBucketAnalyticsConfigurationsInput) SetContinuationToken(v string) *ListBucketAnalyticsConfigurationsInput { - s.ContinuationToken = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *ListBucketAnalyticsConfigurationsInput) SetExpectedBucketOwner(v string) *ListBucketAnalyticsConfigurationsInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *ListBucketAnalyticsConfigurationsInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *ListBucketAnalyticsConfigurationsInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s ListBucketAnalyticsConfigurationsInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type ListBucketAnalyticsConfigurationsOutput struct { - _ struct{} `type:"structure"` - - // The list of analytics configurations for a bucket. - AnalyticsConfigurationList []*AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"list" flattened:"true"` - - // The marker that is used as a starting point for this analytics configuration - // list response. This value is present if it was sent in the request. - ContinuationToken *string `type:"string"` - - // Indicates whether the returned list of analytics configurations is complete. - // A value of true indicates that the list is not complete and the NextContinuationToken - // will be provided for a subsequent request. - IsTruncated *bool `type:"boolean"` - - // NextContinuationToken is sent when isTruncated is true, which indicates that - // there are more analytics configurations to list. The next request must include - // this NextContinuationToken. The token is obfuscated and is not a usable value. - NextContinuationToken *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 ListBucketAnalyticsConfigurationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListBucketAnalyticsConfigurationsOutput) GoString() string { - return s.String() -} - -// SetAnalyticsConfigurationList sets the AnalyticsConfigurationList field's value. -func (s *ListBucketAnalyticsConfigurationsOutput) SetAnalyticsConfigurationList(v []*AnalyticsConfiguration) *ListBucketAnalyticsConfigurationsOutput { - s.AnalyticsConfigurationList = v - return s -} - -// SetContinuationToken sets the ContinuationToken field's value. -func (s *ListBucketAnalyticsConfigurationsOutput) SetContinuationToken(v string) *ListBucketAnalyticsConfigurationsOutput { - s.ContinuationToken = &v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListBucketAnalyticsConfigurationsOutput) SetIsTruncated(v bool) *ListBucketAnalyticsConfigurationsOutput { - s.IsTruncated = &v - return s -} - -// SetNextContinuationToken sets the NextContinuationToken field's value. -func (s *ListBucketAnalyticsConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketAnalyticsConfigurationsOutput { - s.NextContinuationToken = &v - return s -} - -type ListBucketIntelligentTieringConfigurationsInput struct { - _ struct{} `locationName:"ListBucketIntelligentTieringConfigurationsRequest" type:"structure"` - - // The name of the Amazon S3 bucket whose configuration you want to modify or - // retrieve. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The ContinuationToken that represents a placeholder from where this request - // should begin. - ContinuationToken *string `location:"querystring" locationName:"continuation-token" 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 ListBucketIntelligentTieringConfigurationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListBucketIntelligentTieringConfigurationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListBucketIntelligentTieringConfigurationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListBucketIntelligentTieringConfigurationsInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *ListBucketIntelligentTieringConfigurationsInput) SetBucket(v string) *ListBucketIntelligentTieringConfigurationsInput { - s.Bucket = &v - return s -} - -func (s *ListBucketIntelligentTieringConfigurationsInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetContinuationToken sets the ContinuationToken field's value. -func (s *ListBucketIntelligentTieringConfigurationsInput) SetContinuationToken(v string) *ListBucketIntelligentTieringConfigurationsInput { - s.ContinuationToken = &v - return s -} - -func (s *ListBucketIntelligentTieringConfigurationsInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *ListBucketIntelligentTieringConfigurationsInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s ListBucketIntelligentTieringConfigurationsInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type ListBucketIntelligentTieringConfigurationsOutput struct { - _ struct{} `type:"structure"` - - // The ContinuationToken that represents a placeholder from where this request - // should begin. - ContinuationToken *string `type:"string"` - - // The list of S3 Intelligent-Tiering configurations for a bucket. - IntelligentTieringConfigurationList []*IntelligentTieringConfiguration `locationName:"IntelligentTieringConfiguration" type:"list" flattened:"true"` - - // Indicates whether the returned list of analytics configurations is complete. - // A value of true indicates that the list is not complete and the NextContinuationToken - // will be provided for a subsequent request. - IsTruncated *bool `type:"boolean"` - - // The marker used to continue this inventory configuration listing. Use the - // NextContinuationToken from this response to continue the listing in a subsequent - // request. The continuation token is an opaque value that Amazon S3 understands. - NextContinuationToken *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 ListBucketIntelligentTieringConfigurationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListBucketIntelligentTieringConfigurationsOutput) GoString() string { - return s.String() -} - -// SetContinuationToken sets the ContinuationToken field's value. -func (s *ListBucketIntelligentTieringConfigurationsOutput) SetContinuationToken(v string) *ListBucketIntelligentTieringConfigurationsOutput { - s.ContinuationToken = &v - return s -} - -// SetIntelligentTieringConfigurationList sets the IntelligentTieringConfigurationList field's value. -func (s *ListBucketIntelligentTieringConfigurationsOutput) SetIntelligentTieringConfigurationList(v []*IntelligentTieringConfiguration) *ListBucketIntelligentTieringConfigurationsOutput { - s.IntelligentTieringConfigurationList = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListBucketIntelligentTieringConfigurationsOutput) SetIsTruncated(v bool) *ListBucketIntelligentTieringConfigurationsOutput { - s.IsTruncated = &v - return s -} - -// SetNextContinuationToken sets the NextContinuationToken field's value. -func (s *ListBucketIntelligentTieringConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketIntelligentTieringConfigurationsOutput { - s.NextContinuationToken = &v - return s -} - -type ListBucketInventoryConfigurationsInput struct { - _ struct{} `locationName:"ListBucketInventoryConfigurationsRequest" type:"structure"` - - // The name of the bucket containing the inventory configurations to retrieve. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The marker used to continue an inventory configuration listing that has been - // truncated. Use the NextContinuationToken from a previously truncated list - // response to continue the listing. The continuation token is an opaque value - // that Amazon S3 understands. - ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 ListBucketInventoryConfigurationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListBucketInventoryConfigurationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListBucketInventoryConfigurationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListBucketInventoryConfigurationsInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *ListBucketInventoryConfigurationsInput) SetBucket(v string) *ListBucketInventoryConfigurationsInput { - s.Bucket = &v - return s -} - -func (s *ListBucketInventoryConfigurationsInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetContinuationToken sets the ContinuationToken field's value. -func (s *ListBucketInventoryConfigurationsInput) SetContinuationToken(v string) *ListBucketInventoryConfigurationsInput { - s.ContinuationToken = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *ListBucketInventoryConfigurationsInput) SetExpectedBucketOwner(v string) *ListBucketInventoryConfigurationsInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *ListBucketInventoryConfigurationsInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *ListBucketInventoryConfigurationsInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s ListBucketInventoryConfigurationsInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type ListBucketInventoryConfigurationsOutput struct { - _ struct{} `type:"structure"` - - // If sent in the request, the marker that is used as a starting point for this - // inventory configuration list response. - ContinuationToken *string `type:"string"` - - // The list of inventory configurations for a bucket. - InventoryConfigurationList []*InventoryConfiguration `locationName:"InventoryConfiguration" type:"list" flattened:"true"` - - // Tells whether the returned list of inventory configurations is complete. - // A value of true indicates that the list is not complete and the NextContinuationToken - // is provided for a subsequent request. - IsTruncated *bool `type:"boolean"` - - // The marker used to continue this inventory configuration listing. Use the - // NextContinuationToken from this response to continue the listing in a subsequent - // request. The continuation token is an opaque value that Amazon S3 understands. - NextContinuationToken *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 ListBucketInventoryConfigurationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListBucketInventoryConfigurationsOutput) GoString() string { - return s.String() -} - -// SetContinuationToken sets the ContinuationToken field's value. -func (s *ListBucketInventoryConfigurationsOutput) SetContinuationToken(v string) *ListBucketInventoryConfigurationsOutput { - s.ContinuationToken = &v - return s -} - -// SetInventoryConfigurationList sets the InventoryConfigurationList field's value. -func (s *ListBucketInventoryConfigurationsOutput) SetInventoryConfigurationList(v []*InventoryConfiguration) *ListBucketInventoryConfigurationsOutput { - s.InventoryConfigurationList = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListBucketInventoryConfigurationsOutput) SetIsTruncated(v bool) *ListBucketInventoryConfigurationsOutput { - s.IsTruncated = &v - return s -} - -// SetNextContinuationToken sets the NextContinuationToken field's value. -func (s *ListBucketInventoryConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketInventoryConfigurationsOutput { - s.NextContinuationToken = &v - return s -} - -type ListBucketMetricsConfigurationsInput struct { - _ struct{} `locationName:"ListBucketMetricsConfigurationsRequest" type:"structure"` - - // The name of the bucket containing the metrics configurations to retrieve. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The marker that is used to continue a metrics configuration listing that - // has been truncated. Use the NextContinuationToken from a previously truncated - // list response to continue the listing. The continuation token is an opaque - // value that Amazon S3 understands. - ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 ListBucketMetricsConfigurationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListBucketMetricsConfigurationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListBucketMetricsConfigurationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListBucketMetricsConfigurationsInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *ListBucketMetricsConfigurationsInput) SetBucket(v string) *ListBucketMetricsConfigurationsInput { - s.Bucket = &v - return s -} - -func (s *ListBucketMetricsConfigurationsInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetContinuationToken sets the ContinuationToken field's value. -func (s *ListBucketMetricsConfigurationsInput) SetContinuationToken(v string) *ListBucketMetricsConfigurationsInput { - s.ContinuationToken = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *ListBucketMetricsConfigurationsInput) SetExpectedBucketOwner(v string) *ListBucketMetricsConfigurationsInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *ListBucketMetricsConfigurationsInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *ListBucketMetricsConfigurationsInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s ListBucketMetricsConfigurationsInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type ListBucketMetricsConfigurationsOutput struct { - _ struct{} `type:"structure"` - - // The marker that is used as a starting point for this metrics configuration - // list response. This value is present if it was sent in the request. - ContinuationToken *string `type:"string"` - - // Indicates whether the returned list of metrics configurations is complete. - // A value of true indicates that the list is not complete and the NextContinuationToken - // will be provided for a subsequent request. - IsTruncated *bool `type:"boolean"` - - // The list of metrics configurations for a bucket. - MetricsConfigurationList []*MetricsConfiguration `locationName:"MetricsConfiguration" type:"list" flattened:"true"` - - // The marker used to continue a metrics configuration listing that has been - // truncated. Use the NextContinuationToken from a previously truncated list - // response to continue the listing. The continuation token is an opaque value - // that Amazon S3 understands. - NextContinuationToken *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 ListBucketMetricsConfigurationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListBucketMetricsConfigurationsOutput) GoString() string { - return s.String() -} - -// SetContinuationToken sets the ContinuationToken field's value. -func (s *ListBucketMetricsConfigurationsOutput) SetContinuationToken(v string) *ListBucketMetricsConfigurationsOutput { - s.ContinuationToken = &v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListBucketMetricsConfigurationsOutput) SetIsTruncated(v bool) *ListBucketMetricsConfigurationsOutput { - s.IsTruncated = &v - return s -} - -// SetMetricsConfigurationList sets the MetricsConfigurationList field's value. -func (s *ListBucketMetricsConfigurationsOutput) SetMetricsConfigurationList(v []*MetricsConfiguration) *ListBucketMetricsConfigurationsOutput { - s.MetricsConfigurationList = v - return s -} - -// SetNextContinuationToken sets the NextContinuationToken field's value. -func (s *ListBucketMetricsConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketMetricsConfigurationsOutput { - s.NextContinuationToken = &v - return s -} - -type ListBucketsInput 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 ListBucketsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListBucketsInput) GoString() string { - return s.String() -} - -type ListBucketsOutput struct { - _ struct{} `type:"structure"` - - // The list of buckets owned by the requester. - Buckets []*Bucket `locationNameList:"Bucket" type:"list"` - - // The owner of the buckets listed. - Owner *Owner `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 ListBucketsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListBucketsOutput) GoString() string { - return s.String() -} - -// SetBuckets sets the Buckets field's value. -func (s *ListBucketsOutput) SetBuckets(v []*Bucket) *ListBucketsOutput { - s.Buckets = v - return s -} - -// SetOwner sets the Owner field's value. -func (s *ListBucketsOutput) SetOwner(v *Owner) *ListBucketsOutput { - s.Owner = v - return s -} - -type ListDirectoryBucketsInput struct { - _ struct{} `locationName:"ListDirectoryBucketsRequest" type:"structure"` - - // ContinuationToken indicates to Amazon S3 that the list is being continued - // on this bucket with a token. ContinuationToken is obfuscated and is not a - // real key. You can use this ContinuationToken for pagination of the list results. - ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"` - - // Maximum number of buckets to be returned in response. When the number is - // more than the count of buckets that are owned by an Amazon Web Services account, - // return all the buckets in response. - MaxDirectoryBuckets *int64 `location:"querystring" locationName:"max-directory-buckets" 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 ListDirectoryBucketsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListDirectoryBucketsInput) GoString() string { - return s.String() -} - -// SetContinuationToken sets the ContinuationToken field's value. -func (s *ListDirectoryBucketsInput) SetContinuationToken(v string) *ListDirectoryBucketsInput { - s.ContinuationToken = &v - return s -} - -// SetMaxDirectoryBuckets sets the MaxDirectoryBuckets field's value. -func (s *ListDirectoryBucketsInput) SetMaxDirectoryBuckets(v int64) *ListDirectoryBucketsInput { - s.MaxDirectoryBuckets = &v - return s -} - -type ListDirectoryBucketsOutput struct { - _ struct{} `type:"structure"` - - // The list of buckets owned by the requester. - Buckets []*Bucket `locationNameList:"Bucket" type:"list"` - - // If ContinuationToken was sent with the request, it is included in the response. - // You can use the returned ContinuationToken for pagination of the list response. - ContinuationToken *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 ListDirectoryBucketsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListDirectoryBucketsOutput) GoString() string { - return s.String() -} - -// SetBuckets sets the Buckets field's value. -func (s *ListDirectoryBucketsOutput) SetBuckets(v []*Bucket) *ListDirectoryBucketsOutput { - s.Buckets = v - return s -} - -// SetContinuationToken sets the ContinuationToken field's value. -func (s *ListDirectoryBucketsOutput) SetContinuationToken(v string) *ListDirectoryBucketsOutput { - s.ContinuationToken = &v - return s -} - -type ListMultipartUploadsInput struct { - _ struct{} `locationName:"ListMultipartUploadsRequest" type:"structure"` - - // The name of the bucket to which the multipart upload was initiated. - // - // Directory buckets - When you use this operation with a directory bucket, - // you must use virtual-hosted-style requests in the format Bucket_name.s3express-az_id.region.amazonaws.com. - // Path-style requests are not supported. Directory bucket names must be unique - // in the chosen Availability Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 - // (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about - // bucket naming restrictions, see Directory bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html) - // in the Amazon S3 User Guide. - // - // Access points - When you use this action with an access point, you must provide - // the alias of the access point in place of the bucket name or specify the - // access point ARN. When using the access point ARN, you must direct requests - // to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this action with an access point through the Amazon Web Services - // SDKs, you provide the access point ARN in place of the bucket name. For more - // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. - // - // Access points and Object Lambda access points are not supported by directory - // buckets. - // - // S3 on Outposts - When you use this action with Amazon S3 on Outposts, you - // must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname - // takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. - // When you use this action with S3 on Outposts through the Amazon Web Services - // SDKs, you provide the Outposts access point ARN in place of the bucket name. - // For more information about S3 on Outposts ARNs, see What is S3 on Outposts? - // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) - // in the Amazon S3 User Guide. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // Character you use to group keys. - // - // All keys that contain the same string between the prefix, if specified, and - // the first occurrence of the delimiter after the prefix are grouped under - // a single result element, CommonPrefixes. If you don't specify the prefix - // parameter, then the substring starts at the beginning of the key. The keys - // that are grouped under CommonPrefixes result element are not returned elsewhere - // in the response. - // - // Directory buckets - For directory buckets, / is the only supported delimiter. - Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"` - - // Requests Amazon S3 to encode the object keys in the response and specifies - // the encoding method to use. An object key can contain any Unicode character; - // however, the XML 1.0 parser cannot parse some characters, such as characters - // with an ASCII value from 0 to 10. For characters that are not supported in - // XML 1.0, you can add this parameter to request that Amazon S3 encode the - // keys in the response. - EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // Specifies the multipart upload after which listing should begin. - // - // * General purpose buckets - For general purpose buckets, key-marker is - // an object key. Together with upload-id-marker, this parameter specifies - // the multipart upload after which listing should begin. If upload-id-marker - // is not specified, only the keys lexicographically greater than the specified - // key-marker will be included in the list. If upload-id-marker is specified, - // any multipart uploads for a key equal to the key-marker might also be - // included, provided those multipart uploads have upload IDs lexicographically - // greater than the specified upload-id-marker. - // - // * Directory buckets - For directory buckets, key-marker is obfuscated - // and isn't a real object key. The upload-id-marker parameter isn't supported - // by directory buckets. To list the additional multipart uploads, you only - // need to set the value of key-marker to the NextKeyMarker value from the - // previous response. In the ListMultipartUploads response, the multipart - // uploads aren't sorted lexicographically based on the object keys. - KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"` - - // Sets the maximum number of multipart uploads, from 1 to 1,000, to return - // in the response body. 1,000 is the maximum number of uploads that can be - // returned in a response. - MaxUploads *int64 `location:"querystring" locationName:"max-uploads" type:"integer"` - - // Lists in-progress uploads only for those keys that begin with the specified - // prefix. You can use prefixes to separate a bucket into different grouping - // of keys. (You can think of using prefix to make groups in the same way that - // you'd use a folder in a file system.) - // - // Directory buckets - For directory buckets, only prefixes that end in a delimiter - // (/) are supported. - Prefix *string `location:"querystring" locationName:"prefix" type:"string"` - - // Confirms that the requester knows that they will be charged for the request. - // Bucket owners need not specify this parameter in their requests. If either - // the source or destination S3 bucket has Requester Pays enabled, the requester - // will pay for corresponding charges to copy the object. For information about - // downloading objects from Requester Pays buckets, see Downloading Objects - // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` - - // Together with key-marker, specifies the multipart upload after which listing - // should begin. If key-marker is not specified, the upload-id-marker parameter - // is ignored. Otherwise, any multipart uploads for a key equal to the key-marker - // might be included in the list only if they have an upload ID lexicographically - // greater than the specified upload-id-marker. - // - // This functionality is not supported for directory buckets. - UploadIdMarker *string `location:"querystring" locationName:"upload-id-marker" 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 ListMultipartUploadsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListMultipartUploadsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListMultipartUploadsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListMultipartUploadsInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *ListMultipartUploadsInput) SetBucket(v string) *ListMultipartUploadsInput { - s.Bucket = &v - return s -} - -func (s *ListMultipartUploadsInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetDelimiter sets the Delimiter field's value. -func (s *ListMultipartUploadsInput) SetDelimiter(v string) *ListMultipartUploadsInput { - s.Delimiter = &v - return s -} - -// SetEncodingType sets the EncodingType field's value. -func (s *ListMultipartUploadsInput) SetEncodingType(v string) *ListMultipartUploadsInput { - s.EncodingType = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *ListMultipartUploadsInput) SetExpectedBucketOwner(v string) *ListMultipartUploadsInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetKeyMarker sets the KeyMarker field's value. -func (s *ListMultipartUploadsInput) SetKeyMarker(v string) *ListMultipartUploadsInput { - s.KeyMarker = &v - return s -} - -// SetMaxUploads sets the MaxUploads field's value. -func (s *ListMultipartUploadsInput) SetMaxUploads(v int64) *ListMultipartUploadsInput { - s.MaxUploads = &v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *ListMultipartUploadsInput) SetPrefix(v string) *ListMultipartUploadsInput { - s.Prefix = &v - return s -} - -// SetRequestPayer sets the RequestPayer field's value. -func (s *ListMultipartUploadsInput) SetRequestPayer(v string) *ListMultipartUploadsInput { - s.RequestPayer = &v - return s -} - -// SetUploadIdMarker sets the UploadIdMarker field's value. -func (s *ListMultipartUploadsInput) SetUploadIdMarker(v string) *ListMultipartUploadsInput { - s.UploadIdMarker = &v - return s -} - -func (s *ListMultipartUploadsInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *ListMultipartUploadsInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s ListMultipartUploadsInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type ListMultipartUploadsOutput struct { - _ struct{} `type:"structure"` - - // The name of the bucket to which the multipart upload was initiated. Does - // not return the access point ARN or access point alias if used. - Bucket *string `type:"string"` - - // If you specify a delimiter in the request, then the result returns each distinct - // key prefix containing the delimiter in a CommonPrefixes element. The distinct - // key prefixes are returned in the Prefix child element. - // - // Directory buckets - For directory buckets, only prefixes that end in a delimiter - // (/) are supported. - CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"` - - // Contains the delimiter you specified in the request. If you don't specify - // a delimiter in your request, this element is absent from the response. - // - // Directory buckets - For directory buckets, / is the only supported delimiter. - Delimiter *string `type:"string"` - - // Encoding type used by Amazon S3 to encode object keys in the response. - // - // If you specify the encoding-type request parameter, Amazon S3 includes this - // element in the response, and returns encoded key name values in the following - // response elements: - // - // Delimiter, KeyMarker, Prefix, NextKeyMarker, Key. - EncodingType *string `type:"string" enum:"EncodingType"` - - // Indicates whether the returned list of multipart uploads is truncated. A - // value of true indicates that the list was truncated. The list can be truncated - // if the number of multipart uploads exceeds the limit allowed or specified - // by max uploads. - IsTruncated *bool `type:"boolean"` - - // The key at or after which the listing began. - KeyMarker *string `type:"string"` - - // Maximum number of multipart uploads that could have been included in the - // response. - MaxUploads *int64 `type:"integer"` - - // When a list is truncated, this element specifies the value that should be - // used for the key-marker request parameter in a subsequent request. - NextKeyMarker *string `type:"string"` - - // When a list is truncated, this element specifies the value that should be - // used for the upload-id-marker request parameter in a subsequent request. - // - // This functionality is not supported for directory buckets. - NextUploadIdMarker *string `type:"string"` - - // When a prefix is provided in the request, this field contains the specified - // prefix. The result contains only keys starting with the specified prefix. - // - // Directory buckets - For directory buckets, only prefixes that end in a delimiter - // (/) are supported. - Prefix *string `type:"string"` - - // If present, indicates that the requester was successfully charged for the - // request. - // - // This functionality is not supported for directory buckets. - RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` - - // Together with key-marker, specifies the multipart upload after which listing - // should begin. If key-marker is not specified, the upload-id-marker parameter - // is ignored. Otherwise, any multipart uploads for a key equal to the key-marker - // might be included in the list only if they have an upload ID lexicographically - // greater than the specified upload-id-marker. - // - // This functionality is not supported for directory buckets. - UploadIdMarker *string `type:"string"` - - // Container for elements related to a particular multipart upload. A response - // can contain zero or more Upload elements. - Uploads []*MultipartUpload `locationName:"Upload" type:"list" flattened:"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 ListMultipartUploadsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListMultipartUploadsOutput) GoString() string { - return s.String() -} - -// SetBucket sets the Bucket field's value. -func (s *ListMultipartUploadsOutput) SetBucket(v string) *ListMultipartUploadsOutput { - s.Bucket = &v - return s -} - -func (s *ListMultipartUploadsOutput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetCommonPrefixes sets the CommonPrefixes field's value. -func (s *ListMultipartUploadsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListMultipartUploadsOutput { - s.CommonPrefixes = v - return s -} - -// SetDelimiter sets the Delimiter field's value. -func (s *ListMultipartUploadsOutput) SetDelimiter(v string) *ListMultipartUploadsOutput { - s.Delimiter = &v - return s -} - -// SetEncodingType sets the EncodingType field's value. -func (s *ListMultipartUploadsOutput) SetEncodingType(v string) *ListMultipartUploadsOutput { - s.EncodingType = &v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListMultipartUploadsOutput) SetIsTruncated(v bool) *ListMultipartUploadsOutput { - s.IsTruncated = &v - return s -} - -// SetKeyMarker sets the KeyMarker field's value. -func (s *ListMultipartUploadsOutput) SetKeyMarker(v string) *ListMultipartUploadsOutput { - s.KeyMarker = &v - return s -} - -// SetMaxUploads sets the MaxUploads field's value. -func (s *ListMultipartUploadsOutput) SetMaxUploads(v int64) *ListMultipartUploadsOutput { - s.MaxUploads = &v - return s -} - -// SetNextKeyMarker sets the NextKeyMarker field's value. -func (s *ListMultipartUploadsOutput) SetNextKeyMarker(v string) *ListMultipartUploadsOutput { - s.NextKeyMarker = &v - return s -} - -// SetNextUploadIdMarker sets the NextUploadIdMarker field's value. -func (s *ListMultipartUploadsOutput) SetNextUploadIdMarker(v string) *ListMultipartUploadsOutput { - s.NextUploadIdMarker = &v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *ListMultipartUploadsOutput) SetPrefix(v string) *ListMultipartUploadsOutput { - s.Prefix = &v - return s -} - -// SetRequestCharged sets the RequestCharged field's value. -func (s *ListMultipartUploadsOutput) SetRequestCharged(v string) *ListMultipartUploadsOutput { - s.RequestCharged = &v - return s -} - -// SetUploadIdMarker sets the UploadIdMarker field's value. -func (s *ListMultipartUploadsOutput) SetUploadIdMarker(v string) *ListMultipartUploadsOutput { - s.UploadIdMarker = &v - return s -} - -// SetUploads sets the Uploads field's value. -func (s *ListMultipartUploadsOutput) SetUploads(v []*MultipartUpload) *ListMultipartUploadsOutput { - s.Uploads = v - return s -} - -type ListObjectVersionsInput struct { - _ struct{} `locationName:"ListObjectVersionsRequest" type:"structure"` - - // The bucket name that contains the objects. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // A delimiter is a character that you specify to group keys. All keys that - // contain the same string between the prefix and the first occurrence of the - // delimiter are grouped under a single result element in CommonPrefixes. These - // groups are counted as one result against the max-keys limitation. These keys - // are not returned elsewhere in the response. - Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"` - - // Requests Amazon S3 to encode the object keys in the response and specifies - // the encoding method to use. An object key can contain any Unicode character; - // however, the XML 1.0 parser cannot parse some characters, such as characters - // with an ASCII value from 0 to 10. For characters that are not supported in - // XML 1.0, you can add this parameter to request that Amazon S3 encode the - // keys in the response. - EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // Specifies the key to start with when listing objects in a bucket. - KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"` - - // Sets the maximum number of keys returned in the response. By default, the - // action returns up to 1,000 key names. The response might contain fewer keys - // but will never contain more. If additional keys satisfy the search criteria, - // but were not returned because max-keys was exceeded, the response contains - // true. To return the additional keys, see key-marker - // and version-id-marker. - MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"` - - // Specifies the optional fields that you want returned in the response. Fields - // that you do not specify are not returned. - OptionalObjectAttributes []*string `location:"header" locationName:"x-amz-optional-object-attributes" type:"list" enum:"OptionalObjectAttributes"` - - // Use this parameter to select only those keys that begin with the specified - // prefix. You can use prefixes to separate a bucket into different groupings - // of keys. (You can think of using prefix to make groups in the same way that - // you'd use a folder in a file system.) You can use prefix with delimiter to - // roll up numerous objects into a single result under CommonPrefixes. - Prefix *string `location:"querystring" locationName:"prefix" type:"string"` - - // Confirms that the requester knows that they will be charged for the request. - // Bucket owners need not specify this parameter in their requests. If either - // the source or destination S3 bucket has Requester Pays enabled, the requester - // will pay for corresponding charges to copy the object. For information about - // downloading objects from Requester Pays buckets, see Downloading Objects - // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` - - // Specifies the object version you want to start listing from. - VersionIdMarker *string `location:"querystring" locationName:"version-id-marker" 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 ListObjectVersionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListObjectVersionsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListObjectVersionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListObjectVersionsInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *ListObjectVersionsInput) SetBucket(v string) *ListObjectVersionsInput { - s.Bucket = &v - return s -} - -func (s *ListObjectVersionsInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetDelimiter sets the Delimiter field's value. -func (s *ListObjectVersionsInput) SetDelimiter(v string) *ListObjectVersionsInput { - s.Delimiter = &v - return s -} - -// SetEncodingType sets the EncodingType field's value. -func (s *ListObjectVersionsInput) SetEncodingType(v string) *ListObjectVersionsInput { - s.EncodingType = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *ListObjectVersionsInput) SetExpectedBucketOwner(v string) *ListObjectVersionsInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetKeyMarker sets the KeyMarker field's value. -func (s *ListObjectVersionsInput) SetKeyMarker(v string) *ListObjectVersionsInput { - s.KeyMarker = &v - return s -} - -// SetMaxKeys sets the MaxKeys field's value. -func (s *ListObjectVersionsInput) SetMaxKeys(v int64) *ListObjectVersionsInput { - s.MaxKeys = &v - return s -} - -// SetOptionalObjectAttributes sets the OptionalObjectAttributes field's value. -func (s *ListObjectVersionsInput) SetOptionalObjectAttributes(v []*string) *ListObjectVersionsInput { - s.OptionalObjectAttributes = v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *ListObjectVersionsInput) SetPrefix(v string) *ListObjectVersionsInput { - s.Prefix = &v - return s -} - -// SetRequestPayer sets the RequestPayer field's value. -func (s *ListObjectVersionsInput) SetRequestPayer(v string) *ListObjectVersionsInput { - s.RequestPayer = &v - return s -} - -// SetVersionIdMarker sets the VersionIdMarker field's value. -func (s *ListObjectVersionsInput) SetVersionIdMarker(v string) *ListObjectVersionsInput { - s.VersionIdMarker = &v - return s -} - -func (s *ListObjectVersionsInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *ListObjectVersionsInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s ListObjectVersionsInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type ListObjectVersionsOutput struct { - _ struct{} `type:"structure"` - - // All of the keys rolled up into a common prefix count as a single return when - // calculating the number of returns. - CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"` - - // Container for an object that is a delete marker. - DeleteMarkers []*DeleteMarkerEntry `locationName:"DeleteMarker" type:"list" flattened:"true"` - - // The delimiter grouping the included keys. A delimiter is a character that - // you specify to group keys. All keys that contain the same string between - // the prefix and the first occurrence of the delimiter are grouped under a - // single result element in CommonPrefixes. These groups are counted as one - // result against the max-keys limitation. These keys are not returned elsewhere - // in the response. - Delimiter *string `type:"string"` - - // Encoding type used by Amazon S3 to encode object key names in the XML response. - // - // If you specify the encoding-type request parameter, Amazon S3 includes this - // element in the response, and returns encoded key name values in the following - // response elements: - // - // KeyMarker, NextKeyMarker, Prefix, Key, and Delimiter. - EncodingType *string `type:"string" enum:"EncodingType"` - - // A flag that indicates whether Amazon S3 returned all of the results that - // satisfied the search criteria. If your results were truncated, you can make - // a follow-up paginated request by using the NextKeyMarker and NextVersionIdMarker - // response parameters as a starting place in another request to return the - // rest of the results. - IsTruncated *bool `type:"boolean"` - - // Marks the last key returned in a truncated response. - KeyMarker *string `type:"string"` - - // Specifies the maximum number of objects to return. - MaxKeys *int64 `type:"integer"` - - // The bucket name. - Name *string `type:"string"` - - // When the number of responses exceeds the value of MaxKeys, NextKeyMarker - // specifies the first key not returned that satisfies the search criteria. - // Use this value for the key-marker request parameter in a subsequent request. - NextKeyMarker *string `type:"string"` - - // When the number of responses exceeds the value of MaxKeys, NextVersionIdMarker - // specifies the first object version not returned that satisfies the search - // criteria. Use this value for the version-id-marker request parameter in a - // subsequent request. - NextVersionIdMarker *string `type:"string"` - - // Selects objects that start with the value supplied by this parameter. - Prefix *string `type:"string"` - - // If present, indicates that the requester was successfully charged for the - // request. - // - // This functionality is not supported for directory buckets. - RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` - - // Marks the last version of the key returned in a truncated response. - VersionIdMarker *string `type:"string"` - - // Container for version information. - Versions []*ObjectVersion `locationName:"Version" type:"list" flattened:"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 ListObjectVersionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListObjectVersionsOutput) GoString() string { - return s.String() -} - -// SetCommonPrefixes sets the CommonPrefixes field's value. -func (s *ListObjectVersionsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListObjectVersionsOutput { - s.CommonPrefixes = v - return s -} - -// SetDeleteMarkers sets the DeleteMarkers field's value. -func (s *ListObjectVersionsOutput) SetDeleteMarkers(v []*DeleteMarkerEntry) *ListObjectVersionsOutput { - s.DeleteMarkers = v - return s -} - -// SetDelimiter sets the Delimiter field's value. -func (s *ListObjectVersionsOutput) SetDelimiter(v string) *ListObjectVersionsOutput { - s.Delimiter = &v - return s -} - -// SetEncodingType sets the EncodingType field's value. -func (s *ListObjectVersionsOutput) SetEncodingType(v string) *ListObjectVersionsOutput { - s.EncodingType = &v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListObjectVersionsOutput) SetIsTruncated(v bool) *ListObjectVersionsOutput { - s.IsTruncated = &v - return s -} - -// SetKeyMarker sets the KeyMarker field's value. -func (s *ListObjectVersionsOutput) SetKeyMarker(v string) *ListObjectVersionsOutput { - s.KeyMarker = &v - return s -} - -// SetMaxKeys sets the MaxKeys field's value. -func (s *ListObjectVersionsOutput) SetMaxKeys(v int64) *ListObjectVersionsOutput { - s.MaxKeys = &v - return s -} - -// SetName sets the Name field's value. -func (s *ListObjectVersionsOutput) SetName(v string) *ListObjectVersionsOutput { - s.Name = &v - return s -} - -// SetNextKeyMarker sets the NextKeyMarker field's value. -func (s *ListObjectVersionsOutput) SetNextKeyMarker(v string) *ListObjectVersionsOutput { - s.NextKeyMarker = &v - return s -} - -// SetNextVersionIdMarker sets the NextVersionIdMarker field's value. -func (s *ListObjectVersionsOutput) SetNextVersionIdMarker(v string) *ListObjectVersionsOutput { - s.NextVersionIdMarker = &v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *ListObjectVersionsOutput) SetPrefix(v string) *ListObjectVersionsOutput { - s.Prefix = &v - return s -} - -// SetRequestCharged sets the RequestCharged field's value. -func (s *ListObjectVersionsOutput) SetRequestCharged(v string) *ListObjectVersionsOutput { - s.RequestCharged = &v - return s -} - -// SetVersionIdMarker sets the VersionIdMarker field's value. -func (s *ListObjectVersionsOutput) SetVersionIdMarker(v string) *ListObjectVersionsOutput { - s.VersionIdMarker = &v - return s -} - -// SetVersions sets the Versions field's value. -func (s *ListObjectVersionsOutput) SetVersions(v []*ObjectVersion) *ListObjectVersionsOutput { - s.Versions = v - return s -} - -type ListObjectsInput struct { - _ struct{} `locationName:"ListObjectsRequest" type:"structure"` - - // The name of the bucket containing the objects. - // - // Directory buckets - When you use this operation with a directory bucket, - // you must use virtual-hosted-style requests in the format Bucket_name.s3express-az_id.region.amazonaws.com. - // Path-style requests are not supported. Directory bucket names must be unique - // in the chosen Availability Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 - // (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about - // bucket naming restrictions, see Directory bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html) - // in the Amazon S3 User Guide. - // - // Access points - When you use this action with an access point, you must provide - // the alias of the access point in place of the bucket name or specify the - // access point ARN. When using the access point ARN, you must direct requests - // to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this action with an access point through the Amazon Web Services - // SDKs, you provide the access point ARN in place of the bucket name. For more - // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. - // - // Access points and Object Lambda access points are not supported by directory - // buckets. - // - // S3 on Outposts - When you use this action with Amazon S3 on Outposts, you - // must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname - // takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. - // When you use this action with S3 on Outposts through the Amazon Web Services - // SDKs, you provide the Outposts access point ARN in place of the bucket name. - // For more information about S3 on Outposts ARNs, see What is S3 on Outposts? - // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) - // in the Amazon S3 User Guide. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // A delimiter is a character that you use to group keys. - Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"` - - // Requests Amazon S3 to encode the object keys in the response and specifies - // the encoding method to use. An object key can contain any Unicode character; - // however, the XML 1.0 parser cannot parse some characters, such as characters - // with an ASCII value from 0 to 10. For characters that are not supported in - // XML 1.0, you can add this parameter to request that Amazon S3 encode the - // keys in the response. - EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // Marker is where you want Amazon S3 to start listing from. Amazon S3 starts - // listing after this specified key. Marker can be any key in the bucket. - Marker *string `location:"querystring" locationName:"marker" type:"string"` - - // Sets the maximum number of keys returned in the response. By default, the - // action returns up to 1,000 key names. The response might contain fewer keys - // but will never contain more. - MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"` - - // Specifies the optional fields that you want returned in the response. Fields - // that you do not specify are not returned. - OptionalObjectAttributes []*string `location:"header" locationName:"x-amz-optional-object-attributes" type:"list" enum:"OptionalObjectAttributes"` - - // Limits the response to keys that begin with the specified prefix. - Prefix *string `location:"querystring" locationName:"prefix" type:"string"` - - // Confirms that the requester knows that she or he will be charged for the - // list objects request. Bucket owners need not specify this parameter in their - // requests. - RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListObjectsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListObjectsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListObjectsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListObjectsInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *ListObjectsInput) SetBucket(v string) *ListObjectsInput { - s.Bucket = &v - return s -} - -func (s *ListObjectsInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetDelimiter sets the Delimiter field's value. -func (s *ListObjectsInput) SetDelimiter(v string) *ListObjectsInput { - s.Delimiter = &v - return s -} - -// SetEncodingType sets the EncodingType field's value. -func (s *ListObjectsInput) SetEncodingType(v string) *ListObjectsInput { - s.EncodingType = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *ListObjectsInput) SetExpectedBucketOwner(v string) *ListObjectsInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListObjectsInput) SetMarker(v string) *ListObjectsInput { - s.Marker = &v - return s -} - -// SetMaxKeys sets the MaxKeys field's value. -func (s *ListObjectsInput) SetMaxKeys(v int64) *ListObjectsInput { - s.MaxKeys = &v - return s -} - -// SetOptionalObjectAttributes sets the OptionalObjectAttributes field's value. -func (s *ListObjectsInput) SetOptionalObjectAttributes(v []*string) *ListObjectsInput { - s.OptionalObjectAttributes = v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *ListObjectsInput) SetPrefix(v string) *ListObjectsInput { - s.Prefix = &v - return s -} - -// SetRequestPayer sets the RequestPayer field's value. -func (s *ListObjectsInput) SetRequestPayer(v string) *ListObjectsInput { - s.RequestPayer = &v - return s -} - -func (s *ListObjectsInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *ListObjectsInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s ListObjectsInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type ListObjectsOutput struct { - _ struct{} `type:"structure"` - - // All of the keys (up to 1,000) rolled up in a common prefix count as a single - // return when calculating the number of returns. - // - // A response can contain CommonPrefixes only if you specify a delimiter. - // - // CommonPrefixes contains all (if there are any) keys between Prefix and the - // next occurrence of the string specified by the delimiter. - // - // CommonPrefixes lists keys that act like subdirectories in the directory specified - // by Prefix. - // - // For example, if the prefix is notes/ and the delimiter is a slash (/), as - // in notes/summer/july, the common prefix is notes/summer/. All of the keys - // that roll up into a common prefix count as a single return when calculating - // the number of returns. - CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"` - - // Metadata about each object returned. - Contents []*Object `type:"list" flattened:"true"` - - // Causes keys that contain the same string between the prefix and the first - // occurrence of the delimiter to be rolled up into a single result element - // in the CommonPrefixes collection. These rolled-up keys are not returned elsewhere - // in the response. Each rolled-up result counts as only one return against - // the MaxKeys value. - Delimiter *string `type:"string"` - - // Encoding type used by Amazon S3 to encode object keys in the response. If - // using url, non-ASCII characters used in an object's key name will be URL - // encoded. For example, the object test_file(3).png will appear as test_file%283%29.png. - EncodingType *string `type:"string" enum:"EncodingType"` - - // A flag that indicates whether Amazon S3 returned all of the results that - // satisfied the search criteria. - IsTruncated *bool `type:"boolean"` - - // Indicates where in the bucket listing begins. Marker is included in the response - // if it was sent with the request. - Marker *string `type:"string"` - - // The maximum number of keys returned in the response body. - MaxKeys *int64 `type:"integer"` - - // The bucket name. - Name *string `type:"string"` - - // When the response is truncated (the IsTruncated element value in the response - // is true), you can use the key name in this field as the marker parameter - // in the subsequent request to get the next set of objects. Amazon S3 lists - // objects in alphabetical order. - // - // This element is returned only if you have the delimiter request parameter - // specified. If the response does not include the NextMarker element and it - // is truncated, you can use the value of the last Key element in the response - // as the marker parameter in the subsequent request to get the next set of - // object keys. - NextMarker *string `type:"string"` - - // Keys that begin with the indicated prefix. - Prefix *string `type:"string"` - - // If present, indicates that the requester was successfully charged for the - // request. - // - // This functionality is not supported for directory buckets. - RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListObjectsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListObjectsOutput) GoString() string { - return s.String() -} - -// SetCommonPrefixes sets the CommonPrefixes field's value. -func (s *ListObjectsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListObjectsOutput { - s.CommonPrefixes = v - return s -} - -// SetContents sets the Contents field's value. -func (s *ListObjectsOutput) SetContents(v []*Object) *ListObjectsOutput { - s.Contents = v - return s -} - -// SetDelimiter sets the Delimiter field's value. -func (s *ListObjectsOutput) SetDelimiter(v string) *ListObjectsOutput { - s.Delimiter = &v - return s -} - -// SetEncodingType sets the EncodingType field's value. -func (s *ListObjectsOutput) SetEncodingType(v string) *ListObjectsOutput { - s.EncodingType = &v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListObjectsOutput) SetIsTruncated(v bool) *ListObjectsOutput { - s.IsTruncated = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *ListObjectsOutput) SetMarker(v string) *ListObjectsOutput { - s.Marker = &v - return s -} - -// SetMaxKeys sets the MaxKeys field's value. -func (s *ListObjectsOutput) SetMaxKeys(v int64) *ListObjectsOutput { - s.MaxKeys = &v - return s -} - -// SetName sets the Name field's value. -func (s *ListObjectsOutput) SetName(v string) *ListObjectsOutput { - s.Name = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *ListObjectsOutput) SetNextMarker(v string) *ListObjectsOutput { - s.NextMarker = &v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *ListObjectsOutput) SetPrefix(v string) *ListObjectsOutput { - s.Prefix = &v - return s -} - -// SetRequestCharged sets the RequestCharged field's value. -func (s *ListObjectsOutput) SetRequestCharged(v string) *ListObjectsOutput { - s.RequestCharged = &v - return s -} - -type ListObjectsV2Input struct { - _ struct{} `locationName:"ListObjectsV2Request" type:"structure"` - - // Directory buckets - When you use this operation with a directory bucket, - // you must use virtual-hosted-style requests in the format Bucket_name.s3express-az_id.region.amazonaws.com. - // Path-style requests are not supported. Directory bucket names must be unique - // in the chosen Availability Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 - // (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about - // bucket naming restrictions, see Directory bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html) - // in the Amazon S3 User Guide. - // - // Access points - When you use this action with an access point, you must provide - // the alias of the access point in place of the bucket name or specify the - // access point ARN. When using the access point ARN, you must direct requests - // to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this action with an access point through the Amazon Web Services - // SDKs, you provide the access point ARN in place of the bucket name. For more - // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. - // - // Access points and Object Lambda access points are not supported by directory - // buckets. - // - // S3 on Outposts - When you use this action with Amazon S3 on Outposts, you - // must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname - // takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. - // When you use this action with S3 on Outposts through the Amazon Web Services - // SDKs, you provide the Outposts access point ARN in place of the bucket name. - // For more information about S3 on Outposts ARNs, see What is S3 on Outposts? - // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) - // in the Amazon S3 User Guide. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // ContinuationToken indicates to Amazon S3 that the list is being continued - // on this bucket with a token. ContinuationToken is obfuscated and is not a - // real key. You can use this ContinuationToken for pagination of the list results. - ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"` - - // A delimiter is a character that you use to group keys. - // - // * Directory buckets - For directory buckets, / is the only supported delimiter. - // - // * Directory buckets - When you query ListObjectsV2 with a delimiter during - // in-progress multipart uploads, the CommonPrefixes response parameter contains - // the prefixes that are associated with the in-progress multipart uploads. - // For more information about multipart uploads, see Multipart Upload Overview - // (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html) in - // the Amazon S3 User Guide. - Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"` - - // Encoding type used by Amazon S3 to encode object keys in the response. If - // using url, non-ASCII characters used in an object's key name will be URL - // encoded. For example, the object test_file(3).png will appear as test_file%283%29.png. - EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // The owner field is not present in ListObjectsV2 by default. If you want to - // return the owner field with each key in the result, then set the FetchOwner - // field to true. - // - // Directory buckets - For directory buckets, the bucket owner is returned as - // the object owner for all objects. - FetchOwner *bool `location:"querystring" locationName:"fetch-owner" type:"boolean"` - - // Sets the maximum number of keys returned in the response. By default, the - // action returns up to 1,000 key names. The response might contain fewer keys - // but will never contain more. - MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"` - - // Specifies the optional fields that you want returned in the response. Fields - // that you do not specify are not returned. - // - // This functionality is not supported for directory buckets. - OptionalObjectAttributes []*string `location:"header" locationName:"x-amz-optional-object-attributes" type:"list" enum:"OptionalObjectAttributes"` - - // Limits the response to keys that begin with the specified prefix. - // - // Directory buckets - For directory buckets, only prefixes that end in a delimiter - // (/) are supported. - Prefix *string `location:"querystring" locationName:"prefix" type:"string"` - - // Confirms that the requester knows that she or he will be charged for the - // list objects request in V2 style. Bucket owners need not specify this parameter - // in their requests. - // - // This functionality is not supported for directory buckets. - RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` - - // StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts - // listing after this specified key. StartAfter can be any key in the bucket. - // - // This functionality is not supported for directory buckets. - StartAfter *string `location:"querystring" locationName:"start-after" 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 ListObjectsV2Input) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListObjectsV2Input) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListObjectsV2Input) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListObjectsV2Input"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *ListObjectsV2Input) SetBucket(v string) *ListObjectsV2Input { - s.Bucket = &v - return s -} - -func (s *ListObjectsV2Input) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetContinuationToken sets the ContinuationToken field's value. -func (s *ListObjectsV2Input) SetContinuationToken(v string) *ListObjectsV2Input { - s.ContinuationToken = &v - return s -} - -// SetDelimiter sets the Delimiter field's value. -func (s *ListObjectsV2Input) SetDelimiter(v string) *ListObjectsV2Input { - s.Delimiter = &v - return s -} - -// SetEncodingType sets the EncodingType field's value. -func (s *ListObjectsV2Input) SetEncodingType(v string) *ListObjectsV2Input { - s.EncodingType = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *ListObjectsV2Input) SetExpectedBucketOwner(v string) *ListObjectsV2Input { - s.ExpectedBucketOwner = &v - return s -} - -// SetFetchOwner sets the FetchOwner field's value. -func (s *ListObjectsV2Input) SetFetchOwner(v bool) *ListObjectsV2Input { - s.FetchOwner = &v - return s -} - -// SetMaxKeys sets the MaxKeys field's value. -func (s *ListObjectsV2Input) SetMaxKeys(v int64) *ListObjectsV2Input { - s.MaxKeys = &v - return s -} - -// SetOptionalObjectAttributes sets the OptionalObjectAttributes field's value. -func (s *ListObjectsV2Input) SetOptionalObjectAttributes(v []*string) *ListObjectsV2Input { - s.OptionalObjectAttributes = v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *ListObjectsV2Input) SetPrefix(v string) *ListObjectsV2Input { - s.Prefix = &v - return s -} - -// SetRequestPayer sets the RequestPayer field's value. -func (s *ListObjectsV2Input) SetRequestPayer(v string) *ListObjectsV2Input { - s.RequestPayer = &v - return s -} - -// SetStartAfter sets the StartAfter field's value. -func (s *ListObjectsV2Input) SetStartAfter(v string) *ListObjectsV2Input { - s.StartAfter = &v - return s -} - -func (s *ListObjectsV2Input) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *ListObjectsV2Input) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s ListObjectsV2Input) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type ListObjectsV2Output struct { - _ struct{} `type:"structure"` - - // All of the keys (up to 1,000) that share the same prefix are grouped together. - // When counting the total numbers of returns by this API operation, this group - // of keys is considered as one item. - // - // A response can contain CommonPrefixes only if you specify a delimiter. - // - // CommonPrefixes contains all (if there are any) keys between Prefix and the - // next occurrence of the string specified by a delimiter. - // - // CommonPrefixes lists keys that act like subdirectories in the directory specified - // by Prefix. - // - // For example, if the prefix is notes/ and the delimiter is a slash (/) as - // in notes/summer/july, the common prefix is notes/summer/. All of the keys - // that roll up into a common prefix count as a single return when calculating - // the number of returns. - // - // * Directory buckets - For directory buckets, only prefixes that end in - // a delimiter (/) are supported. - // - // * Directory buckets - When you query ListObjectsV2 with a delimiter during - // in-progress multipart uploads, the CommonPrefixes response parameter contains - // the prefixes that are associated with the in-progress multipart uploads. - // For more information about multipart uploads, see Multipart Upload Overview - // (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html) in - // the Amazon S3 User Guide. - CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"` - - // Metadata about each object returned. - Contents []*Object `type:"list" flattened:"true"` - - // If ContinuationToken was sent with the request, it is included in the response. - // You can use the returned ContinuationToken for pagination of the list response. - // You can use this ContinuationToken for pagination of the list results. - ContinuationToken *string `type:"string"` - - // Causes keys that contain the same string between the prefix and the first - // occurrence of the delimiter to be rolled up into a single result element - // in the CommonPrefixes collection. These rolled-up keys are not returned elsewhere - // in the response. Each rolled-up result counts as only one return against - // the MaxKeys value. - // - // Directory buckets - For directory buckets, / is the only supported delimiter. - Delimiter *string `type:"string"` - - // Encoding type used by Amazon S3 to encode object key names in the XML response. - // - // If you specify the encoding-type request parameter, Amazon S3 includes this - // element in the response, and returns encoded key name values in the following - // response elements: - // - // Delimiter, Prefix, Key, and StartAfter. - EncodingType *string `type:"string" enum:"EncodingType"` - - // Set to false if all of the results were returned. Set to true if more keys - // are available to return. If the number of results exceeds that specified - // by MaxKeys, all of the results might not be returned. - IsTruncated *bool `type:"boolean"` - - // KeyCount is the number of keys returned with this request. KeyCount will - // always be less than or equal to the MaxKeys field. For example, if you ask - // for 50 keys, your result will include 50 keys or fewer. - KeyCount *int64 `type:"integer"` - - // Sets the maximum number of keys returned in the response. By default, the - // action returns up to 1,000 key names. The response might contain fewer keys - // but will never contain more. - MaxKeys *int64 `type:"integer"` - - // The bucket name. - Name *string `type:"string"` - - // NextContinuationToken is sent when isTruncated is true, which means there - // are more keys in the bucket that can be listed. The next list requests to - // Amazon S3 can be continued with this NextContinuationToken. NextContinuationToken - // is obfuscated and is not a real key - NextContinuationToken *string `type:"string"` - - // Keys that begin with the indicated prefix. - // - // Directory buckets - For directory buckets, only prefixes that end in a delimiter - // (/) are supported. - Prefix *string `type:"string"` - - // If present, indicates that the requester was successfully charged for the - // request. - // - // This functionality is not supported for directory buckets. - RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` - - // If StartAfter was sent with the request, it is included in the response. - // - // This functionality is not supported for directory buckets. - StartAfter *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 ListObjectsV2Output) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListObjectsV2Output) GoString() string { - return s.String() -} - -// SetCommonPrefixes sets the CommonPrefixes field's value. -func (s *ListObjectsV2Output) SetCommonPrefixes(v []*CommonPrefix) *ListObjectsV2Output { - s.CommonPrefixes = v - return s -} - -// SetContents sets the Contents field's value. -func (s *ListObjectsV2Output) SetContents(v []*Object) *ListObjectsV2Output { - s.Contents = v - return s -} - -// SetContinuationToken sets the ContinuationToken field's value. -func (s *ListObjectsV2Output) SetContinuationToken(v string) *ListObjectsV2Output { - s.ContinuationToken = &v - return s -} - -// SetDelimiter sets the Delimiter field's value. -func (s *ListObjectsV2Output) SetDelimiter(v string) *ListObjectsV2Output { - s.Delimiter = &v - return s -} - -// SetEncodingType sets the EncodingType field's value. -func (s *ListObjectsV2Output) SetEncodingType(v string) *ListObjectsV2Output { - s.EncodingType = &v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListObjectsV2Output) SetIsTruncated(v bool) *ListObjectsV2Output { - s.IsTruncated = &v - return s -} - -// SetKeyCount sets the KeyCount field's value. -func (s *ListObjectsV2Output) SetKeyCount(v int64) *ListObjectsV2Output { - s.KeyCount = &v - return s -} - -// SetMaxKeys sets the MaxKeys field's value. -func (s *ListObjectsV2Output) SetMaxKeys(v int64) *ListObjectsV2Output { - s.MaxKeys = &v - return s -} - -// SetName sets the Name field's value. -func (s *ListObjectsV2Output) SetName(v string) *ListObjectsV2Output { - s.Name = &v - return s -} - -// SetNextContinuationToken sets the NextContinuationToken field's value. -func (s *ListObjectsV2Output) SetNextContinuationToken(v string) *ListObjectsV2Output { - s.NextContinuationToken = &v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *ListObjectsV2Output) SetPrefix(v string) *ListObjectsV2Output { - s.Prefix = &v - return s -} - -// SetRequestCharged sets the RequestCharged field's value. -func (s *ListObjectsV2Output) SetRequestCharged(v string) *ListObjectsV2Output { - s.RequestCharged = &v - return s -} - -// SetStartAfter sets the StartAfter field's value. -func (s *ListObjectsV2Output) SetStartAfter(v string) *ListObjectsV2Output { - s.StartAfter = &v - return s -} - -type ListPartsInput struct { - _ struct{} `locationName:"ListPartsRequest" type:"structure"` - - // The name of the bucket to which the parts are being uploaded. - // - // Directory buckets - When you use this operation with a directory bucket, - // you must use virtual-hosted-style requests in the format Bucket_name.s3express-az_id.region.amazonaws.com. - // Path-style requests are not supported. Directory bucket names must be unique - // in the chosen Availability Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 - // (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about - // bucket naming restrictions, see Directory bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html) - // in the Amazon S3 User Guide. - // - // Access points - When you use this action with an access point, you must provide - // the alias of the access point in place of the bucket name or specify the - // access point ARN. When using the access point ARN, you must direct requests - // to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this action with an access point through the Amazon Web Services - // SDKs, you provide the access point ARN in place of the bucket name. For more - // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. - // - // Access points and Object Lambda access points are not supported by directory - // buckets. - // - // S3 on Outposts - When you use this action with Amazon S3 on Outposts, you - // must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname - // takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. - // When you use this action with S3 on Outposts through the Amazon Web Services - // SDKs, you provide the Outposts access point ARN in place of the bucket name. - // For more information about S3 on Outposts ARNs, see What is S3 on Outposts? - // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) - // in the Amazon S3 User Guide. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // Object key for which the multipart upload was initiated. - // - // Key is a required field - Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - - // Sets the maximum number of parts to return. - MaxParts *int64 `location:"querystring" locationName:"max-parts" type:"integer"` - - // Specifies the part after which listing should begin. Only parts with higher - // part numbers will be listed. - PartNumberMarker *int64 `location:"querystring" locationName:"part-number-marker" type:"integer"` - - // Confirms that the requester knows that they will be charged for the request. - // Bucket owners need not specify this parameter in their requests. If either - // the source or destination S3 bucket has Requester Pays enabled, the requester - // will pay for corresponding charges to copy the object. For information about - // downloading objects from Requester Pays buckets, see Downloading Objects - // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` - - // The server-side encryption (SSE) algorithm used to encrypt the object. This - // parameter is needed only when the object was created using a checksum algorithm. - // For more information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` - - // The server-side encryption (SSE) customer managed key. This parameter is - // needed only when the object was created using a checksum algorithm. For more - // information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - // - // SSECustomerKey is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by ListPartsInput's - // String and GoString methods. - SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"` - - // The MD5 server-side encryption (SSE) customer managed key. This parameter - // is needed only when the object was created using a checksum algorithm. For - // more information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` - - // Upload ID identifying the multipart upload whose parts are being listed. - // - // UploadId is a required field - UploadId *string `location:"querystring" locationName:"uploadId" 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 ListPartsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPartsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListPartsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListPartsInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - 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.UploadId == nil { - invalidParams.Add(request.NewErrParamRequired("UploadId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *ListPartsInput) SetBucket(v string) *ListPartsInput { - s.Bucket = &v - return s -} - -func (s *ListPartsInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *ListPartsInput) SetExpectedBucketOwner(v string) *ListPartsInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetKey sets the Key field's value. -func (s *ListPartsInput) SetKey(v string) *ListPartsInput { - s.Key = &v - return s -} - -// SetMaxParts sets the MaxParts field's value. -func (s *ListPartsInput) SetMaxParts(v int64) *ListPartsInput { - s.MaxParts = &v - return s -} - -// SetPartNumberMarker sets the PartNumberMarker field's value. -func (s *ListPartsInput) SetPartNumberMarker(v int64) *ListPartsInput { - s.PartNumberMarker = &v - return s -} - -// SetRequestPayer sets the RequestPayer field's value. -func (s *ListPartsInput) SetRequestPayer(v string) *ListPartsInput { - s.RequestPayer = &v - return s -} - -// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. -func (s *ListPartsInput) SetSSECustomerAlgorithm(v string) *ListPartsInput { - s.SSECustomerAlgorithm = &v - return s -} - -// SetSSECustomerKey sets the SSECustomerKey field's value. -func (s *ListPartsInput) SetSSECustomerKey(v string) *ListPartsInput { - s.SSECustomerKey = &v - return s -} - -func (s *ListPartsInput) getSSECustomerKey() (v string) { - if s.SSECustomerKey == nil { - return v - } - return *s.SSECustomerKey -} - -// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. -func (s *ListPartsInput) SetSSECustomerKeyMD5(v string) *ListPartsInput { - s.SSECustomerKeyMD5 = &v - return s -} - -// SetUploadId sets the UploadId field's value. -func (s *ListPartsInput) SetUploadId(v string) *ListPartsInput { - s.UploadId = &v - return s -} - -func (s *ListPartsInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *ListPartsInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s ListPartsInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type ListPartsOutput struct { - _ struct{} `type:"structure"` - - // If the bucket has a lifecycle rule configured with an action to abort incomplete - // multipart uploads and the prefix in the lifecycle rule matches the object - // name in the request, then the response includes this header indicating when - // the initiated multipart upload will become eligible for abort operation. - // For more information, see Aborting Incomplete Multipart Uploads Using a Bucket - // Lifecycle Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config). - // - // The response will also include the x-amz-abort-rule-id header that will provide - // the ID of the lifecycle configuration rule that defines this action. - // - // This functionality is not supported for directory buckets. - AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp"` - - // This header is returned along with the x-amz-abort-date header. It identifies - // applicable lifecycle configuration rule that defines the action to abort - // incomplete multipart uploads. - // - // This functionality is not supported for directory buckets. - AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"` - - // The name of the bucket to which the multipart upload was initiated. Does - // not return the access point ARN or access point alias if used. - Bucket *string `type:"string"` - - // The algorithm that was used to create a checksum of the object. - ChecksumAlgorithm *string `type:"string" enum:"ChecksumAlgorithm"` - - // Container element that identifies who initiated the multipart upload. If - // the initiator is an Amazon Web Services account, this element provides the - // same information as the Owner element. If the initiator is an IAM User, this - // element provides the user ARN and display name. - Initiator *Initiator `type:"structure"` - - // Indicates whether the returned list of parts is truncated. A true value indicates - // that the list was truncated. A list can be truncated if the number of parts - // exceeds the limit returned in the MaxParts element. - IsTruncated *bool `type:"boolean"` - - // Object key for which the multipart upload was initiated. - Key *string `min:"1" type:"string"` - - // Maximum number of parts that were allowed in the response. - MaxParts *int64 `type:"integer"` - - // When a list is truncated, this element specifies the last part in the list, - // as well as the value to use for the part-number-marker request parameter - // in a subsequent request. - NextPartNumberMarker *int64 `type:"integer"` - - // Container element that identifies the object owner, after the object is created. - // If multipart upload is initiated by an IAM user, this element provides the - // parent account ID and display name. - // - // Directory buckets - The bucket owner is returned as the object owner for - // all the parts. - Owner *Owner `type:"structure"` - - // Specifies the part after which listing should begin. Only parts with higher - // part numbers will be listed. - PartNumberMarker *int64 `type:"integer"` - - // Container for elements related to a particular part. A response can contain - // zero or more Part elements. - Parts []*Part `locationName:"Part" type:"list" flattened:"true"` - - // If present, indicates that the requester was successfully charged for the - // request. - // - // This functionality is not supported for directory buckets. - RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` - - // The class of storage used to store the uploaded object. - // - // Directory buckets - Only the S3 Express One Zone storage class is supported - // by directory buckets to store objects. - StorageClass *string `type:"string" enum:"StorageClass"` - - // Upload ID identifying the multipart upload whose parts are being listed. - UploadId *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 ListPartsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListPartsOutput) GoString() string { - return s.String() -} - -// SetAbortDate sets the AbortDate field's value. -func (s *ListPartsOutput) SetAbortDate(v time.Time) *ListPartsOutput { - s.AbortDate = &v - return s -} - -// SetAbortRuleId sets the AbortRuleId field's value. -func (s *ListPartsOutput) SetAbortRuleId(v string) *ListPartsOutput { - s.AbortRuleId = &v - return s -} - -// SetBucket sets the Bucket field's value. -func (s *ListPartsOutput) SetBucket(v string) *ListPartsOutput { - s.Bucket = &v - return s -} - -func (s *ListPartsOutput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *ListPartsOutput) SetChecksumAlgorithm(v string) *ListPartsOutput { - s.ChecksumAlgorithm = &v - return s -} - -// SetInitiator sets the Initiator field's value. -func (s *ListPartsOutput) SetInitiator(v *Initiator) *ListPartsOutput { - s.Initiator = v - return s -} - -// SetIsTruncated sets the IsTruncated field's value. -func (s *ListPartsOutput) SetIsTruncated(v bool) *ListPartsOutput { - s.IsTruncated = &v - return s -} - -// SetKey sets the Key field's value. -func (s *ListPartsOutput) SetKey(v string) *ListPartsOutput { - s.Key = &v - return s -} - -// SetMaxParts sets the MaxParts field's value. -func (s *ListPartsOutput) SetMaxParts(v int64) *ListPartsOutput { - s.MaxParts = &v - return s -} - -// SetNextPartNumberMarker sets the NextPartNumberMarker field's value. -func (s *ListPartsOutput) SetNextPartNumberMarker(v int64) *ListPartsOutput { - s.NextPartNumberMarker = &v - return s -} - -// SetOwner sets the Owner field's value. -func (s *ListPartsOutput) SetOwner(v *Owner) *ListPartsOutput { - s.Owner = v - return s -} - -// SetPartNumberMarker sets the PartNumberMarker field's value. -func (s *ListPartsOutput) SetPartNumberMarker(v int64) *ListPartsOutput { - s.PartNumberMarker = &v - return s -} - -// SetParts sets the Parts field's value. -func (s *ListPartsOutput) SetParts(v []*Part) *ListPartsOutput { - s.Parts = v - return s -} - -// SetRequestCharged sets the RequestCharged field's value. -func (s *ListPartsOutput) SetRequestCharged(v string) *ListPartsOutput { - s.RequestCharged = &v - return s -} - -// SetStorageClass sets the StorageClass field's value. -func (s *ListPartsOutput) SetStorageClass(v string) *ListPartsOutput { - s.StorageClass = &v - return s -} - -// SetUploadId sets the UploadId field's value. -func (s *ListPartsOutput) SetUploadId(v string) *ListPartsOutput { - s.UploadId = &v - return s -} - -// Describes an Amazon S3 location that will receive the results of the restore -// request. -type Location struct { - _ struct{} `type:"structure"` - - // A list of grants that control access to the staged results. - AccessControlList []*Grant `locationNameList:"Grant" type:"list"` - - // The name of the bucket where the restore results will be placed. - // - // BucketName is a required field - BucketName *string `type:"string" required:"true"` - - // The canned ACL to apply to the restore results. - CannedACL *string `type:"string" enum:"ObjectCannedACL"` - - // Contains the type of server-side encryption used. - Encryption *Encryption `type:"structure"` - - // The prefix that is prepended to the restore results for this request. - // - // Prefix is a required field - Prefix *string `type:"string" required:"true"` - - // The class of storage used to store the restore results. - StorageClass *string `type:"string" enum:"StorageClass"` - - // The tag-set that is applied to the restore results. - Tagging *Tagging `type:"structure"` - - // A list of metadata to store with the restore results in S3. - UserMetadata []*MetadataEntry `locationNameList:"MetadataEntry" 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 Location) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Location) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Location) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Location"} - if s.BucketName == nil { - invalidParams.Add(request.NewErrParamRequired("BucketName")) - } - if s.Prefix == nil { - invalidParams.Add(request.NewErrParamRequired("Prefix")) - } - if s.AccessControlList != nil { - for i, v := range s.AccessControlList { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AccessControlList", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Encryption != nil { - if err := s.Encryption.Validate(); err != nil { - invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams)) - } - } - if s.Tagging != nil { - if err := s.Tagging.Validate(); err != nil { - invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessControlList sets the AccessControlList field's value. -func (s *Location) SetAccessControlList(v []*Grant) *Location { - s.AccessControlList = v - return s -} - -// SetBucketName sets the BucketName field's value. -func (s *Location) SetBucketName(v string) *Location { - s.BucketName = &v - return s -} - -// SetCannedACL sets the CannedACL field's value. -func (s *Location) SetCannedACL(v string) *Location { - s.CannedACL = &v - return s -} - -// SetEncryption sets the Encryption field's value. -func (s *Location) SetEncryption(v *Encryption) *Location { - s.Encryption = v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *Location) SetPrefix(v string) *Location { - s.Prefix = &v - return s -} - -// SetStorageClass sets the StorageClass field's value. -func (s *Location) SetStorageClass(v string) *Location { - s.StorageClass = &v - return s -} - -// SetTagging sets the Tagging field's value. -func (s *Location) SetTagging(v *Tagging) *Location { - s.Tagging = v - return s -} - -// SetUserMetadata sets the UserMetadata field's value. -func (s *Location) SetUserMetadata(v []*MetadataEntry) *Location { - s.UserMetadata = v - return s -} - -// Specifies the location where the bucket will be created. -// -// For directory buckets, the location type is Availability Zone. For more information -// about directory buckets, see Directory buckets (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-overview.html) -// in the Amazon S3 User Guide. -// -// This functionality is only supported by directory buckets. -type LocationInfo struct { - _ struct{} `type:"structure"` - - // The name of the location where the bucket will be created. - // - // For directory buckets, the name of the location is the AZ ID of the Availability - // Zone where the bucket will be created. An example AZ ID value is usw2-az1. - Name *string `type:"string"` - - // The type of location where the bucket will be created. - Type *string `type:"string" enum:"LocationType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s LocationInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s LocationInfo) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *LocationInfo) SetName(v string) *LocationInfo { - s.Name = &v - return s -} - -// SetType sets the Type field's value. -func (s *LocationInfo) SetType(v string) *LocationInfo { - s.Type = &v - return s -} - -// Describes where logs are stored and the prefix that Amazon S3 assigns to -// all log object keys for a bucket. For more information, see PUT Bucket logging -// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html) -// in the Amazon S3 API Reference. -type LoggingEnabled struct { - _ struct{} `type:"structure"` - - // Specifies the bucket where you want Amazon S3 to store server access logs. - // You can have your logs delivered to any bucket that you own, including the - // same bucket that is being logged. You can also configure multiple buckets - // to deliver their logs to the same target bucket. In this case, you should - // choose a different TargetPrefix for each source bucket so that the delivered - // log files can be distinguished by key. - // - // TargetBucket is a required field - TargetBucket *string `type:"string" required:"true"` - - // Container for granting information. - // - // Buckets that use the bucket owner enforced setting for Object Ownership don't - // support target grants. For more information, see Permissions for server access - // log delivery (https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-server-access-logging.html#grant-log-delivery-permissions-general) - // in the Amazon S3 User Guide. - TargetGrants []*TargetGrant `locationNameList:"Grant" type:"list"` - - // Amazon S3 key format for log objects. - TargetObjectKeyFormat *TargetObjectKeyFormat `type:"structure"` - - // A prefix for all log object keys. If you store log files from multiple Amazon - // S3 buckets in a single bucket, you can use a prefix to distinguish which - // log files came from which bucket. - // - // TargetPrefix is a required field - TargetPrefix *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 LoggingEnabled) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s LoggingEnabled) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LoggingEnabled) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LoggingEnabled"} - if s.TargetBucket == nil { - invalidParams.Add(request.NewErrParamRequired("TargetBucket")) - } - if s.TargetPrefix == nil { - invalidParams.Add(request.NewErrParamRequired("TargetPrefix")) - } - if s.TargetGrants != nil { - for i, v := range s.TargetGrants { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetGrants", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTargetBucket sets the TargetBucket field's value. -func (s *LoggingEnabled) SetTargetBucket(v string) *LoggingEnabled { - s.TargetBucket = &v - return s -} - -// SetTargetGrants sets the TargetGrants field's value. -func (s *LoggingEnabled) SetTargetGrants(v []*TargetGrant) *LoggingEnabled { - s.TargetGrants = v - return s -} - -// SetTargetObjectKeyFormat sets the TargetObjectKeyFormat field's value. -func (s *LoggingEnabled) SetTargetObjectKeyFormat(v *TargetObjectKeyFormat) *LoggingEnabled { - s.TargetObjectKeyFormat = v - return s -} - -// SetTargetPrefix sets the TargetPrefix field's value. -func (s *LoggingEnabled) SetTargetPrefix(v string) *LoggingEnabled { - s.TargetPrefix = &v - return s -} - -// A metadata key-value pair to store with an object. -type MetadataEntry struct { - _ struct{} `type:"structure"` - - // Name of the object. - Name *string `type:"string"` - - // Value of the object. - 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 MetadataEntry) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s MetadataEntry) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *MetadataEntry) SetName(v string) *MetadataEntry { - s.Name = &v - return s -} - -// SetValue sets the Value field's value. -func (s *MetadataEntry) SetValue(v string) *MetadataEntry { - s.Value = &v - return s -} - -// A container specifying replication metrics-related settings enabling replication -// metrics and events. -type Metrics struct { - _ struct{} `type:"structure"` - - // A container specifying the time threshold for emitting the s3:Replication:OperationMissedThreshold - // event. - EventThreshold *ReplicationTimeValue `type:"structure"` - - // Specifies whether the replication metrics are enabled. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"MetricsStatus"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Metrics) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Metrics) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Metrics) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Metrics"} - if s.Status == nil { - invalidParams.Add(request.NewErrParamRequired("Status")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEventThreshold sets the EventThreshold field's value. -func (s *Metrics) SetEventThreshold(v *ReplicationTimeValue) *Metrics { - s.EventThreshold = v - return s -} - -// SetStatus sets the Status field's value. -func (s *Metrics) SetStatus(v string) *Metrics { - s.Status = &v - return s -} - -// A conjunction (logical AND) of predicates, which is used in evaluating a -// metrics filter. The operator must have at least two predicates, and an object -// must match all of the predicates in order for the filter to apply. -type MetricsAndOperator struct { - _ struct{} `type:"structure"` - - // The access point ARN used when evaluating an AND predicate. - AccessPointArn *string `type:"string"` - - // The prefix used when evaluating an AND predicate. - Prefix *string `type:"string"` - - // The list of tags used when evaluating an AND predicate. - Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"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 MetricsAndOperator) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s MetricsAndOperator) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MetricsAndOperator) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MetricsAndOperator"} - 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 -} - -// SetAccessPointArn sets the AccessPointArn field's value. -func (s *MetricsAndOperator) SetAccessPointArn(v string) *MetricsAndOperator { - s.AccessPointArn = &v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *MetricsAndOperator) SetPrefix(v string) *MetricsAndOperator { - s.Prefix = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *MetricsAndOperator) SetTags(v []*Tag) *MetricsAndOperator { - s.Tags = v - return s -} - -// Specifies a metrics configuration for the CloudWatch request metrics (specified -// by the metrics configuration ID) from an Amazon S3 bucket. If you're updating -// an existing metrics configuration, note that this is a full replacement of -// the existing metrics configuration. If you don't include the elements you -// want to keep, they are erased. For more information, see PutBucketMetricsConfiguration -// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTMetricConfiguration.html). -type MetricsConfiguration struct { - _ struct{} `type:"structure"` - - // Specifies a metrics configuration filter. The metrics configuration will - // only include objects that meet the filter's criteria. A filter must be a - // prefix, an object tag, an access point ARN, or a conjunction (MetricsAndOperator). - Filter *MetricsFilter `type:"structure"` - - // The ID used to identify the metrics configuration. The ID has a 64 character - // limit and can only contain letters, numbers, periods, dashes, and underscores. - // - // Id is a required field - Id *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 MetricsConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s MetricsConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MetricsConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MetricsConfiguration"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Filter != nil { - if err := s.Filter.Validate(); err != nil { - invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFilter sets the Filter field's value. -func (s *MetricsConfiguration) SetFilter(v *MetricsFilter) *MetricsConfiguration { - s.Filter = v - return s -} - -// SetId sets the Id field's value. -func (s *MetricsConfiguration) SetId(v string) *MetricsConfiguration { - s.Id = &v - return s -} - -// Specifies a metrics configuration filter. The metrics configuration only -// includes objects that meet the filter's criteria. A filter must be a prefix, -// an object tag, an access point ARN, or a conjunction (MetricsAndOperator). -// For more information, see PutBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html). -type MetricsFilter struct { - _ struct{} `type:"structure"` - - // The access point ARN used when evaluating a metrics filter. - AccessPointArn *string `type:"string"` - - // A conjunction (logical AND) of predicates, which is used in evaluating a - // metrics filter. The operator must have at least two predicates, and an object - // must match all of the predicates in order for the filter to apply. - And *MetricsAndOperator `type:"structure"` - - // The prefix used when evaluating a metrics filter. - Prefix *string `type:"string"` - - // The tag used when evaluating a metrics filter. - Tag *Tag `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 MetricsFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s MetricsFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *MetricsFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MetricsFilter"} - if s.And != nil { - if err := s.And.Validate(); err != nil { - invalidParams.AddNested("And", err.(request.ErrInvalidParams)) - } - } - if s.Tag != nil { - if err := s.Tag.Validate(); err != nil { - invalidParams.AddNested("Tag", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessPointArn sets the AccessPointArn field's value. -func (s *MetricsFilter) SetAccessPointArn(v string) *MetricsFilter { - s.AccessPointArn = &v - return s -} - -// SetAnd sets the And field's value. -func (s *MetricsFilter) SetAnd(v *MetricsAndOperator) *MetricsFilter { - s.And = v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *MetricsFilter) SetPrefix(v string) *MetricsFilter { - s.Prefix = &v - return s -} - -// SetTag sets the Tag field's value. -func (s *MetricsFilter) SetTag(v *Tag) *MetricsFilter { - s.Tag = v - return s -} - -// Container for the MultipartUpload for the Amazon S3 object. -type MultipartUpload struct { - _ struct{} `type:"structure"` - - // The algorithm that was used to create a checksum of the object. - ChecksumAlgorithm *string `type:"string" enum:"ChecksumAlgorithm"` - - // Date and time at which the multipart upload was initiated. - Initiated *time.Time `type:"timestamp"` - - // Identifies who initiated the multipart upload. - Initiator *Initiator `type:"structure"` - - // Key of the object for which the multipart upload was initiated. - Key *string `min:"1" type:"string"` - - // Specifies the owner of the object that is part of the multipart upload. - // - // Directory buckets - The bucket owner is returned as the object owner for - // all the objects. - Owner *Owner `type:"structure"` - - // The class of storage used to store the object. - // - // Directory buckets - Only the S3 Express One Zone storage class is supported - // by directory buckets to store objects. - StorageClass *string `type:"string" enum:"StorageClass"` - - // Upload ID that identifies the multipart upload. - UploadId *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 MultipartUpload) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s MultipartUpload) GoString() string { - return s.String() -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *MultipartUpload) SetChecksumAlgorithm(v string) *MultipartUpload { - s.ChecksumAlgorithm = &v - return s -} - -// SetInitiated sets the Initiated field's value. -func (s *MultipartUpload) SetInitiated(v time.Time) *MultipartUpload { - s.Initiated = &v - return s -} - -// SetInitiator sets the Initiator field's value. -func (s *MultipartUpload) SetInitiator(v *Initiator) *MultipartUpload { - s.Initiator = v - return s -} - -// SetKey sets the Key field's value. -func (s *MultipartUpload) SetKey(v string) *MultipartUpload { - s.Key = &v - return s -} - -// SetOwner sets the Owner field's value. -func (s *MultipartUpload) SetOwner(v *Owner) *MultipartUpload { - s.Owner = v - return s -} - -// SetStorageClass sets the StorageClass field's value. -func (s *MultipartUpload) SetStorageClass(v string) *MultipartUpload { - s.StorageClass = &v - return s -} - -// SetUploadId sets the UploadId field's value. -func (s *MultipartUpload) SetUploadId(v string) *MultipartUpload { - s.UploadId = &v - return s -} - -// Specifies when noncurrent object versions expire. Upon expiration, Amazon -// S3 permanently deletes the noncurrent object versions. You set this lifecycle -// configuration action on a bucket that has versioning enabled (or suspended) -// to request that Amazon S3 delete noncurrent object versions at a specific -// period in the object's lifetime. -type NoncurrentVersionExpiration struct { - _ struct{} `type:"structure"` - - // Specifies how many noncurrent versions Amazon S3 will retain. You can specify - // up to 100 noncurrent versions to retain. Amazon S3 will permanently delete - // any additional noncurrent versions beyond the specified number to retain. - // For more information about noncurrent versions, see Lifecycle configuration - // elements (https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html) - // in the Amazon S3 User Guide. - NewerNoncurrentVersions *int64 `type:"integer"` - - // Specifies the number of days an object is noncurrent before Amazon S3 can - // perform the associated action. The value must be a non-zero positive integer. - // For information about the noncurrent days calculations, see How Amazon S3 - // Calculates When an Object Became Noncurrent (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations) - // in the Amazon S3 User Guide. - NoncurrentDays *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 NoncurrentVersionExpiration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s NoncurrentVersionExpiration) GoString() string { - return s.String() -} - -// SetNewerNoncurrentVersions sets the NewerNoncurrentVersions field's value. -func (s *NoncurrentVersionExpiration) SetNewerNoncurrentVersions(v int64) *NoncurrentVersionExpiration { - s.NewerNoncurrentVersions = &v - return s -} - -// SetNoncurrentDays sets the NoncurrentDays field's value. -func (s *NoncurrentVersionExpiration) SetNoncurrentDays(v int64) *NoncurrentVersionExpiration { - s.NoncurrentDays = &v - return s -} - -// Container for the transition rule that describes when noncurrent objects -// transition to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER_IR, -// GLACIER, or DEEP_ARCHIVE storage class. If your bucket is versioning-enabled -// (or versioning is suspended), you can set this action to request that Amazon -// S3 transition noncurrent object versions to the STANDARD_IA, ONEZONE_IA, -// INTELLIGENT_TIERING, GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage class at -// a specific period in the object's lifetime. -type NoncurrentVersionTransition struct { - _ struct{} `type:"structure"` - - // Specifies how many noncurrent versions Amazon S3 will retain in the same - // storage class before transitioning objects. You can specify up to 100 noncurrent - // versions to retain. Amazon S3 will transition any additional noncurrent versions - // beyond the specified number to retain. For more information about noncurrent - // versions, see Lifecycle configuration elements (https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html) - // in the Amazon S3 User Guide. - NewerNoncurrentVersions *int64 `type:"integer"` - - // Specifies the number of days an object is noncurrent before Amazon S3 can - // perform the associated action. For information about the noncurrent days - // calculations, see How Amazon S3 Calculates How Long an Object Has Been Noncurrent - // (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations) - // in the Amazon S3 User Guide. - NoncurrentDays *int64 `type:"integer"` - - // The class of storage used to store the object. - StorageClass *string `type:"string" enum:"TransitionStorageClass"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s NoncurrentVersionTransition) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s NoncurrentVersionTransition) GoString() string { - return s.String() -} - -// SetNewerNoncurrentVersions sets the NewerNoncurrentVersions field's value. -func (s *NoncurrentVersionTransition) SetNewerNoncurrentVersions(v int64) *NoncurrentVersionTransition { - s.NewerNoncurrentVersions = &v - return s -} - -// SetNoncurrentDays sets the NoncurrentDays field's value. -func (s *NoncurrentVersionTransition) SetNoncurrentDays(v int64) *NoncurrentVersionTransition { - s.NoncurrentDays = &v - return s -} - -// SetStorageClass sets the StorageClass field's value. -func (s *NoncurrentVersionTransition) SetStorageClass(v string) *NoncurrentVersionTransition { - s.StorageClass = &v - return s -} - -// A container for specifying the notification configuration of the bucket. -// If this element is empty, notifications are turned off for the bucket. -type NotificationConfiguration struct { - _ struct{} `type:"structure"` - - // Enables delivery of events to Amazon EventBridge. - EventBridgeConfiguration *EventBridgeConfiguration `type:"structure"` - - // Describes the Lambda functions to invoke and the events for which to invoke - // them. - LambdaFunctionConfigurations []*LambdaFunctionConfiguration `locationName:"CloudFunctionConfiguration" type:"list" flattened:"true"` - - // The Amazon Simple Queue Service queues to publish messages to and the events - // for which to publish messages. - QueueConfigurations []*QueueConfiguration `locationName:"QueueConfiguration" type:"list" flattened:"true"` - - // The topic to which notifications are sent and the events for which notifications - // are generated. - TopicConfigurations []*TopicConfiguration `locationName:"TopicConfiguration" type:"list" flattened:"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 NotificationConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s NotificationConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *NotificationConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "NotificationConfiguration"} - if s.LambdaFunctionConfigurations != nil { - for i, v := range s.LambdaFunctionConfigurations { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LambdaFunctionConfigurations", i), err.(request.ErrInvalidParams)) - } - } - } - if s.QueueConfigurations != nil { - for i, v := range s.QueueConfigurations { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "QueueConfigurations", i), err.(request.ErrInvalidParams)) - } - } - } - if s.TopicConfigurations != nil { - for i, v := range s.TopicConfigurations { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TopicConfigurations", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEventBridgeConfiguration sets the EventBridgeConfiguration field's value. -func (s *NotificationConfiguration) SetEventBridgeConfiguration(v *EventBridgeConfiguration) *NotificationConfiguration { - s.EventBridgeConfiguration = v - return s -} - -// SetLambdaFunctionConfigurations sets the LambdaFunctionConfigurations field's value. -func (s *NotificationConfiguration) SetLambdaFunctionConfigurations(v []*LambdaFunctionConfiguration) *NotificationConfiguration { - s.LambdaFunctionConfigurations = v - return s -} - -// SetQueueConfigurations sets the QueueConfigurations field's value. -func (s *NotificationConfiguration) SetQueueConfigurations(v []*QueueConfiguration) *NotificationConfiguration { - s.QueueConfigurations = v - return s -} - -// SetTopicConfigurations sets the TopicConfigurations field's value. -func (s *NotificationConfiguration) SetTopicConfigurations(v []*TopicConfiguration) *NotificationConfiguration { - s.TopicConfigurations = v - return s -} - -type NotificationConfigurationDeprecated struct { - _ struct{} `type:"structure"` - - // Container for specifying the Lambda notification configuration. - CloudFunctionConfiguration *CloudFunctionConfiguration `type:"structure"` - - // This data type is deprecated. This data type specifies the configuration - // for publishing messages to an Amazon Simple Queue Service (Amazon SQS) queue - // when Amazon S3 detects specified events. - QueueConfiguration *QueueConfigurationDeprecated `type:"structure"` - - // This data type is deprecated. A container for specifying the configuration - // for publication of messages to an Amazon Simple Notification Service (Amazon - // SNS) topic when Amazon S3 detects specified events. - TopicConfiguration *TopicConfigurationDeprecated `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 NotificationConfigurationDeprecated) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s NotificationConfigurationDeprecated) GoString() string { - return s.String() -} - -// SetCloudFunctionConfiguration sets the CloudFunctionConfiguration field's value. -func (s *NotificationConfigurationDeprecated) SetCloudFunctionConfiguration(v *CloudFunctionConfiguration) *NotificationConfigurationDeprecated { - s.CloudFunctionConfiguration = v - return s -} - -// SetQueueConfiguration sets the QueueConfiguration field's value. -func (s *NotificationConfigurationDeprecated) SetQueueConfiguration(v *QueueConfigurationDeprecated) *NotificationConfigurationDeprecated { - s.QueueConfiguration = v - return s -} - -// SetTopicConfiguration sets the TopicConfiguration field's value. -func (s *NotificationConfigurationDeprecated) SetTopicConfiguration(v *TopicConfigurationDeprecated) *NotificationConfigurationDeprecated { - s.TopicConfiguration = v - return s -} - -// Specifies object key name filtering rules. For information about key name -// filtering, see Configuring event notifications using object key name filtering -// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/notification-how-to-filtering.html) -// in the Amazon S3 User Guide. -type NotificationConfigurationFilter struct { - _ struct{} `type:"structure"` - - // A container for object key name prefix and suffix filtering rules. - Key *KeyFilter `locationName:"S3Key" 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 NotificationConfigurationFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s NotificationConfigurationFilter) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *NotificationConfigurationFilter) SetKey(v *KeyFilter) *NotificationConfigurationFilter { - s.Key = v - return s -} - -// An object consists of data and its descriptive metadata. -type Object struct { - _ struct{} `type:"structure"` - - // The algorithm that was used to create a checksum of the object. - ChecksumAlgorithm []*string `type:"list" flattened:"true" enum:"ChecksumAlgorithm"` - - // The entity tag is a hash of the object. The ETag reflects changes only to - // the contents of an object, not its metadata. The ETag may or may not be an - // MD5 digest of the object data. Whether or not it is depends on how the object - // was created and how it is encrypted as described below: - // - // * Objects created by the PUT Object, POST Object, or Copy operation, or - // through the Amazon Web Services Management Console, and are encrypted - // by SSE-S3 or plaintext, have ETags that are an MD5 digest of their object - // data. - // - // * Objects created by the PUT Object, POST Object, or Copy operation, or - // through the Amazon Web Services Management Console, and are encrypted - // by SSE-C or SSE-KMS, have ETags that are not an MD5 digest of their object - // data. - // - // * If an object is created by either the Multipart Upload or Part Copy - // operation, the ETag is not an MD5 digest, regardless of the method of - // encryption. If an object is larger than 16 MB, the Amazon Web Services - // Management Console will upload or copy that object as a Multipart Upload, - // and therefore the ETag will not be an MD5 digest. - // - // Directory buckets - MD5 is not supported by directory buckets. - ETag *string `type:"string"` - - // The name that you assign to an object. You use the object key to retrieve - // the object. - Key *string `min:"1" type:"string"` - - // Creation date of the object. - LastModified *time.Time `type:"timestamp"` - - // The owner of the object - // - // Directory buckets - The bucket owner is returned as the object owner. - Owner *Owner `type:"structure"` - - // Specifies the restoration status of an object. Objects in certain storage - // classes must be restored before they can be retrieved. For more information - // about these storage classes and how to work with archived objects, see Working - // with archived objects (https://docs.aws.amazon.com/AmazonS3/latest/userguide/archived-objects.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. Only the S3 Express - // One Zone storage class is supported by directory buckets to store objects. - RestoreStatus *RestoreStatus `type:"structure"` - - // Size in bytes of the object - Size *int64 `type:"long"` - - // The class of storage used to store the object. - // - // Directory buckets - Only the S3 Express One Zone storage class is supported - // by directory buckets to store objects. - StorageClass *string `type:"string" enum:"ObjectStorageClass"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Object) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Object) GoString() string { - return s.String() -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *Object) SetChecksumAlgorithm(v []*string) *Object { - s.ChecksumAlgorithm = v - return s -} - -// SetETag sets the ETag field's value. -func (s *Object) SetETag(v string) *Object { - s.ETag = &v - return s -} - -// SetKey sets the Key field's value. -func (s *Object) SetKey(v string) *Object { - s.Key = &v - return s -} - -// SetLastModified sets the LastModified field's value. -func (s *Object) SetLastModified(v time.Time) *Object { - s.LastModified = &v - return s -} - -// SetOwner sets the Owner field's value. -func (s *Object) SetOwner(v *Owner) *Object { - s.Owner = v - return s -} - -// SetRestoreStatus sets the RestoreStatus field's value. -func (s *Object) SetRestoreStatus(v *RestoreStatus) *Object { - s.RestoreStatus = v - return s -} - -// SetSize sets the Size field's value. -func (s *Object) SetSize(v int64) *Object { - s.Size = &v - return s -} - -// SetStorageClass sets the StorageClass field's value. -func (s *Object) SetStorageClass(v string) *Object { - s.StorageClass = &v - return s -} - -// Object Identifier is unique value to identify objects. -type ObjectIdentifier struct { - _ struct{} `type:"structure"` - - // Key name of the object. - // - // Replacement must be made for object keys containing special characters (such - // as carriage returns) when using XML requests. For more information, see XML - // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints). - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // Version ID for the specific version of the object to delete. - // - // This functionality is not supported for directory buckets. - VersionId *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 ObjectIdentifier) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ObjectIdentifier) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ObjectIdentifier) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ObjectIdentifier"} - 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 *ObjectIdentifier) SetKey(v string) *ObjectIdentifier { - s.Key = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *ObjectIdentifier) SetVersionId(v string) *ObjectIdentifier { - s.VersionId = &v - return s -} - -// The container element for Object Lock configuration parameters. -type ObjectLockConfiguration struct { - _ struct{} `type:"structure"` - - // Indicates whether this bucket has an Object Lock configuration enabled. Enable - // ObjectLockEnabled when you apply ObjectLockConfiguration to a bucket. - ObjectLockEnabled *string `type:"string" enum:"ObjectLockEnabled"` - - // Specifies the Object Lock rule for the specified object. Enable the this - // rule when you apply ObjectLockConfiguration to a bucket. Bucket settings - // require both a mode and a period. The period can be either Days or Years - // but you must select one. You cannot specify Days and Years at the same time. - Rule *ObjectLockRule `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 ObjectLockConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ObjectLockConfiguration) GoString() string { - return s.String() -} - -// SetObjectLockEnabled sets the ObjectLockEnabled field's value. -func (s *ObjectLockConfiguration) SetObjectLockEnabled(v string) *ObjectLockConfiguration { - s.ObjectLockEnabled = &v - return s -} - -// SetRule sets the Rule field's value. -func (s *ObjectLockConfiguration) SetRule(v *ObjectLockRule) *ObjectLockConfiguration { - s.Rule = v - return s -} - -// A legal hold configuration for an object. -type ObjectLockLegalHold struct { - _ struct{} `type:"structure"` - - // Indicates whether the specified object has a legal hold in place. - Status *string `type:"string" enum:"ObjectLockLegalHoldStatus"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ObjectLockLegalHold) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ObjectLockLegalHold) GoString() string { - return s.String() -} - -// SetStatus sets the Status field's value. -func (s *ObjectLockLegalHold) SetStatus(v string) *ObjectLockLegalHold { - s.Status = &v - return s -} - -// A Retention configuration for an object. -type ObjectLockRetention struct { - _ struct{} `type:"structure"` - - // Indicates the Retention mode for the specified object. - Mode *string `type:"string" enum:"ObjectLockRetentionMode"` - - // The date on which this Object Lock Retention will expire. - RetainUntilDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ObjectLockRetention) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ObjectLockRetention) GoString() string { - return s.String() -} - -// SetMode sets the Mode field's value. -func (s *ObjectLockRetention) SetMode(v string) *ObjectLockRetention { - s.Mode = &v - return s -} - -// SetRetainUntilDate sets the RetainUntilDate field's value. -func (s *ObjectLockRetention) SetRetainUntilDate(v time.Time) *ObjectLockRetention { - s.RetainUntilDate = &v - return s -} - -// The container element for an Object Lock rule. -type ObjectLockRule struct { - _ struct{} `type:"structure"` - - // The default Object Lock retention mode and period that you want to apply - // to new objects placed in the specified bucket. Bucket settings require both - // a mode and a period. The period can be either Days or Years but you must - // select one. You cannot specify Days and Years at the same time. - DefaultRetention *DefaultRetention `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 ObjectLockRule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ObjectLockRule) GoString() string { - return s.String() -} - -// SetDefaultRetention sets the DefaultRetention field's value. -func (s *ObjectLockRule) SetDefaultRetention(v *DefaultRetention) *ObjectLockRule { - s.DefaultRetention = v - return s -} - -// A container for elements related to an individual part. -type ObjectPart struct { - _ struct{} `type:"structure"` - - // This header can be used as a data integrity check to verify that the data - // received is the same data that was originally sent. This header specifies - // the base64-encoded, 32-bit CRC32 checksum of the object. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - ChecksumCRC32 *string `type:"string"` - - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only - // be present if it was uploaded with the object. When you use an API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumCRC32C *string `type:"string"` - - // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be - // present if it was uploaded with the object. When you use the API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumSHA1 *string `type:"string"` - - // The base64-encoded, 256-bit SHA-256 digest of the object. This will only - // be present if it was uploaded with the object. When you use an API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumSHA256 *string `type:"string"` - - // The part number identifying the part. This value is a positive integer between - // 1 and 10,000. - PartNumber *int64 `type:"integer"` - - // The size of the uploaded part in bytes. - Size *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 ObjectPart) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ObjectPart) GoString() string { - return s.String() -} - -// SetChecksumCRC32 sets the ChecksumCRC32 field's value. -func (s *ObjectPart) SetChecksumCRC32(v string) *ObjectPart { - s.ChecksumCRC32 = &v - return s -} - -// SetChecksumCRC32C sets the ChecksumCRC32C field's value. -func (s *ObjectPart) SetChecksumCRC32C(v string) *ObjectPart { - s.ChecksumCRC32C = &v - return s -} - -// SetChecksumSHA1 sets the ChecksumSHA1 field's value. -func (s *ObjectPart) SetChecksumSHA1(v string) *ObjectPart { - s.ChecksumSHA1 = &v - return s -} - -// SetChecksumSHA256 sets the ChecksumSHA256 field's value. -func (s *ObjectPart) SetChecksumSHA256(v string) *ObjectPart { - s.ChecksumSHA256 = &v - return s -} - -// SetPartNumber sets the PartNumber field's value. -func (s *ObjectPart) SetPartNumber(v int64) *ObjectPart { - s.PartNumber = &v - return s -} - -// SetSize sets the Size field's value. -func (s *ObjectPart) SetSize(v int64) *ObjectPart { - s.Size = &v - return s -} - -// The version of an object. -type ObjectVersion struct { - _ struct{} `type:"structure"` - - // The algorithm that was used to create a checksum of the object. - ChecksumAlgorithm []*string `type:"list" flattened:"true" enum:"ChecksumAlgorithm"` - - // The entity tag is an MD5 hash of that version of the object. - ETag *string `type:"string"` - - // Specifies whether the object is (true) or is not (false) the latest version - // of an object. - IsLatest *bool `type:"boolean"` - - // The object key. - Key *string `min:"1" type:"string"` - - // Date and time when the object was last modified. - LastModified *time.Time `type:"timestamp"` - - // Specifies the owner of the object. - Owner *Owner `type:"structure"` - - // Specifies the restoration status of an object. Objects in certain storage - // classes must be restored before they can be retrieved. For more information - // about these storage classes and how to work with archived objects, see Working - // with archived objects (https://docs.aws.amazon.com/AmazonS3/latest/userguide/archived-objects.html) - // in the Amazon S3 User Guide. - RestoreStatus *RestoreStatus `type:"structure"` - - // Size in bytes of the object. - Size *int64 `type:"long"` - - // The class of storage used to store the object. - StorageClass *string `type:"string" enum:"ObjectVersionStorageClass"` - - // Version ID of an object. - VersionId *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 ObjectVersion) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ObjectVersion) GoString() string { - return s.String() -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *ObjectVersion) SetChecksumAlgorithm(v []*string) *ObjectVersion { - s.ChecksumAlgorithm = v - return s -} - -// SetETag sets the ETag field's value. -func (s *ObjectVersion) SetETag(v string) *ObjectVersion { - s.ETag = &v - return s -} - -// SetIsLatest sets the IsLatest field's value. -func (s *ObjectVersion) SetIsLatest(v bool) *ObjectVersion { - s.IsLatest = &v - return s -} - -// SetKey sets the Key field's value. -func (s *ObjectVersion) SetKey(v string) *ObjectVersion { - s.Key = &v - return s -} - -// SetLastModified sets the LastModified field's value. -func (s *ObjectVersion) SetLastModified(v time.Time) *ObjectVersion { - s.LastModified = &v - return s -} - -// SetOwner sets the Owner field's value. -func (s *ObjectVersion) SetOwner(v *Owner) *ObjectVersion { - s.Owner = v - return s -} - -// SetRestoreStatus sets the RestoreStatus field's value. -func (s *ObjectVersion) SetRestoreStatus(v *RestoreStatus) *ObjectVersion { - s.RestoreStatus = v - return s -} - -// SetSize sets the Size field's value. -func (s *ObjectVersion) SetSize(v int64) *ObjectVersion { - s.Size = &v - return s -} - -// SetStorageClass sets the StorageClass field's value. -func (s *ObjectVersion) SetStorageClass(v string) *ObjectVersion { - s.StorageClass = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *ObjectVersion) SetVersionId(v string) *ObjectVersion { - s.VersionId = &v - return s -} - -// Describes the location where the restore job's output is stored. -type OutputLocation struct { - _ struct{} `type:"structure"` - - // Describes an S3 location that will receive the results of the restore request. - S3 *Location `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 OutputLocation) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OutputLocation) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OutputLocation) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OutputLocation"} - if s.S3 != nil { - if err := s.S3.Validate(); err != nil { - invalidParams.AddNested("S3", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetS3 sets the S3 field's value. -func (s *OutputLocation) SetS3(v *Location) *OutputLocation { - s.S3 = v - return s -} - -// Describes how results of the Select job are serialized. -type OutputSerialization struct { - _ struct{} `type:"structure"` - - // Describes the serialization of CSV-encoded Select results. - CSV *CSVOutput `type:"structure"` - - // Specifies JSON as request's output serialization format. - JSON *JSONOutput `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 OutputSerialization) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OutputSerialization) GoString() string { - return s.String() -} - -// SetCSV sets the CSV field's value. -func (s *OutputSerialization) SetCSV(v *CSVOutput) *OutputSerialization { - s.CSV = v - return s -} - -// SetJSON sets the JSON field's value. -func (s *OutputSerialization) SetJSON(v *JSONOutput) *OutputSerialization { - s.JSON = v - return s -} - -// Container for the owner's display name and ID. -type Owner struct { - _ struct{} `type:"structure"` - - // Container for the display name of the owner. This value is only supported - // in the following Amazon Web Services Regions: - // - // * US East (N. Virginia) - // - // * US West (N. California) - // - // * US West (Oregon) - // - // * Asia Pacific (Singapore) - // - // * Asia Pacific (Sydney) - // - // * Asia Pacific (Tokyo) - // - // * Europe (Ireland) - // - // * South America (São Paulo) - // - // This functionality is not supported for directory buckets. - DisplayName *string `type:"string"` - - // Container for the ID of the owner. - ID *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 Owner) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Owner) GoString() string { - return s.String() -} - -// SetDisplayName sets the DisplayName field's value. -func (s *Owner) SetDisplayName(v string) *Owner { - s.DisplayName = &v - return s -} - -// SetID sets the ID field's value. -func (s *Owner) SetID(v string) *Owner { - s.ID = &v - return s -} - -// The container element for a bucket's ownership controls. -type OwnershipControls struct { - _ struct{} `type:"structure"` - - // The container element for an ownership control rule. - // - // Rules is a required field - Rules []*OwnershipControlsRule `locationName:"Rule" type:"list" flattened:"true" 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 OwnershipControls) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OwnershipControls) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OwnershipControls) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OwnershipControls"} - if s.Rules == nil { - invalidParams.Add(request.NewErrParamRequired("Rules")) - } - if s.Rules != nil { - for i, v := range s.Rules { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRules sets the Rules field's value. -func (s *OwnershipControls) SetRules(v []*OwnershipControlsRule) *OwnershipControls { - s.Rules = v - return s -} - -// The container element for an ownership control rule. -type OwnershipControlsRule struct { - _ struct{} `type:"structure"` - - // The container element for object ownership for a bucket's ownership controls. - // - // BucketOwnerPreferred - Objects uploaded to the bucket change ownership to - // the bucket owner if the objects are uploaded with the bucket-owner-full-control - // canned ACL. - // - // ObjectWriter - The uploading account will own the object if the object is - // uploaded with the bucket-owner-full-control canned ACL. - // - // BucketOwnerEnforced - Access control lists (ACLs) are disabled and no longer - // affect permissions. The bucket owner automatically owns and has full control - // over every object in the bucket. The bucket only accepts PUT requests that - // don't specify an ACL or specify bucket owner full control ACLs (such as the - // predefined bucket-owner-full-control canned ACL or a custom ACL in XML format - // that grants the same permissions). - // - // By default, ObjectOwnership is set to BucketOwnerEnforced and ACLs are disabled. - // We recommend keeping ACLs disabled, except in uncommon use cases where you - // must control access for each object individually. For more information about - // S3 Object Ownership, see Controlling ownership of objects and disabling ACLs - // for your bucket (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. Directory buckets - // use the bucket owner enforced setting for S3 Object Ownership. - // - // ObjectOwnership is a required field - ObjectOwnership *string `type:"string" required:"true" enum:"ObjectOwnership"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OwnershipControlsRule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s OwnershipControlsRule) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *OwnershipControlsRule) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OwnershipControlsRule"} - if s.ObjectOwnership == nil { - invalidParams.Add(request.NewErrParamRequired("ObjectOwnership")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetObjectOwnership sets the ObjectOwnership field's value. -func (s *OwnershipControlsRule) SetObjectOwnership(v string) *OwnershipControlsRule { - s.ObjectOwnership = &v - return s -} - -// Container for Parquet. -type ParquetInput 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 ParquetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ParquetInput) GoString() string { - return s.String() -} - -// Container for elements related to a part. -type Part struct { - _ struct{} `type:"structure"` - - // This header can be used as a data integrity check to verify that the data - // received is the same data that was originally sent. This header specifies - // the base64-encoded, 32-bit CRC32 checksum of the object. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - ChecksumCRC32 *string `type:"string"` - - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only - // be present if it was uploaded with the object. When you use an API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumCRC32C *string `type:"string"` - - // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be - // present if it was uploaded with the object. When you use the API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumSHA1 *string `type:"string"` - - // This header can be used as a data integrity check to verify that the data - // received is the same data that was originally sent. This header specifies - // the base64-encoded, 256-bit SHA-256 digest of the object. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - ChecksumSHA256 *string `type:"string"` - - // Entity tag returned when the part was uploaded. - ETag *string `type:"string"` - - // Date and time at which the part was uploaded. - LastModified *time.Time `type:"timestamp"` - - // Part number identifying the part. This is a positive integer between 1 and - // 10,000. - PartNumber *int64 `type:"integer"` - - // Size in bytes of the uploaded part data. - Size *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 Part) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Part) GoString() string { - return s.String() -} - -// SetChecksumCRC32 sets the ChecksumCRC32 field's value. -func (s *Part) SetChecksumCRC32(v string) *Part { - s.ChecksumCRC32 = &v - return s -} - -// SetChecksumCRC32C sets the ChecksumCRC32C field's value. -func (s *Part) SetChecksumCRC32C(v string) *Part { - s.ChecksumCRC32C = &v - return s -} - -// SetChecksumSHA1 sets the ChecksumSHA1 field's value. -func (s *Part) SetChecksumSHA1(v string) *Part { - s.ChecksumSHA1 = &v - return s -} - -// SetChecksumSHA256 sets the ChecksumSHA256 field's value. -func (s *Part) SetChecksumSHA256(v string) *Part { - s.ChecksumSHA256 = &v - return s -} - -// SetETag sets the ETag field's value. -func (s *Part) SetETag(v string) *Part { - s.ETag = &v - return s -} - -// SetLastModified sets the LastModified field's value. -func (s *Part) SetLastModified(v time.Time) *Part { - s.LastModified = &v - return s -} - -// SetPartNumber sets the PartNumber field's value. -func (s *Part) SetPartNumber(v int64) *Part { - s.PartNumber = &v - return s -} - -// SetSize sets the Size field's value. -func (s *Part) SetSize(v int64) *Part { - s.Size = &v - return s -} - -// Amazon S3 keys for log objects are partitioned in the following format: -// -// [DestinationPrefix][SourceAccountId]/[SourceRegion]/[SourceBucket]/[YYYY]/[MM]/[DD]/[YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString] -// -// PartitionedPrefix defaults to EventTime delivery when server access logs -// are delivered. -type PartitionedPrefix struct { - _ struct{} `locationName:"PartitionedPrefix" type:"structure"` - - // Specifies the partition date source for the partitioned prefix. PartitionDateSource - // can be EventTime or DeliveryTime. - PartitionDateSource *string `type:"string" enum:"PartitionDateSource"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PartitionedPrefix) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PartitionedPrefix) GoString() string { - return s.String() -} - -// SetPartitionDateSource sets the PartitionDateSource field's value. -func (s *PartitionedPrefix) SetPartitionDateSource(v string) *PartitionedPrefix { - s.PartitionDateSource = &v - return s -} - -// The container element for a bucket's policy status. -type PolicyStatus struct { - _ struct{} `type:"structure"` - - // The policy status for this bucket. TRUE indicates that this bucket is public. - // FALSE indicates that the bucket is not public. - IsPublic *bool `locationName:"IsPublic" 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 PolicyStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PolicyStatus) GoString() string { - return s.String() -} - -// SetIsPublic sets the IsPublic field's value. -func (s *PolicyStatus) SetIsPublic(v bool) *PolicyStatus { - s.IsPublic = &v - return s -} - -// This data type contains information about progress of an operation. -type Progress struct { - _ struct{} `type:"structure"` - - // The current number of uncompressed object bytes processed. - BytesProcessed *int64 `type:"long"` - - // The current number of bytes of records payload data returned. - BytesReturned *int64 `type:"long"` - - // The current number of object bytes scanned. - BytesScanned *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 Progress) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Progress) GoString() string { - return s.String() -} - -// SetBytesProcessed sets the BytesProcessed field's value. -func (s *Progress) SetBytesProcessed(v int64) *Progress { - s.BytesProcessed = &v - return s -} - -// SetBytesReturned sets the BytesReturned field's value. -func (s *Progress) SetBytesReturned(v int64) *Progress { - s.BytesReturned = &v - return s -} - -// SetBytesScanned sets the BytesScanned field's value. -func (s *Progress) SetBytesScanned(v int64) *Progress { - s.BytesScanned = &v - return s -} - -// This data type contains information about the progress event of an operation. -type ProgressEvent struct { - _ struct{} `locationName:"ProgressEvent" type:"structure" payload:"Details"` - - // The Progress event details. - Details *Progress `locationName:"Details" 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 ProgressEvent) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ProgressEvent) GoString() string { - return s.String() -} - -// SetDetails sets the Details field's value. -func (s *ProgressEvent) SetDetails(v *Progress) *ProgressEvent { - s.Details = v - return s -} - -// The ProgressEvent is and event in the SelectObjectContentEventStream group of events. -func (s *ProgressEvent) eventSelectObjectContentEventStream() {} - -// UnmarshalEvent unmarshals the EventStream Message into the ProgressEvent value. -// This method is only used internally within the SDK's EventStream handling. -func (s *ProgressEvent) UnmarshalEvent( - payloadUnmarshaler protocol.PayloadUnmarshaler, - msg eventstream.Message, -) error { - if err := payloadUnmarshaler.UnmarshalPayload( - bytes.NewReader(msg.Payload), s, - ); err != nil { - return err - } - return nil -} - -// MarshalEvent marshals the type into an stream event value. This method -// should only used internally within the SDK's EventStream handling. -func (s *ProgressEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { - msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) - var buf bytes.Buffer - if err = pm.MarshalPayload(&buf, s); err != nil { - return eventstream.Message{}, err - } - msg.Payload = buf.Bytes() - return msg, err -} - -// The PublicAccessBlock configuration that you want to apply to this Amazon -// S3 bucket. You can enable the configuration options in any combination. For -// more information about when Amazon S3 considers a bucket or object public, -// see The Meaning of "Public" (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status) -// in the Amazon S3 User Guide. -type PublicAccessBlockConfiguration struct { - _ struct{} `type:"structure"` - - // Specifies whether Amazon S3 should block public access control lists (ACLs) - // for this bucket and objects in this bucket. Setting this element to TRUE - // causes the following behavior: - // - // * PUT Bucket ACL and PUT Object ACL calls fail if the specified ACL is - // public. - // - // * PUT Object calls fail if the request includes a public ACL. - // - // * PUT Bucket calls fail if the request includes a public ACL. - // - // Enabling this setting doesn't affect existing policies or ACLs. - BlockPublicAcls *bool `locationName:"BlockPublicAcls" type:"boolean"` - - // Specifies whether Amazon S3 should block public bucket policies for this - // bucket. Setting this element to TRUE causes Amazon S3 to reject calls to - // PUT Bucket policy if the specified bucket policy allows public access. - // - // Enabling this setting doesn't affect existing bucket policies. - BlockPublicPolicy *bool `locationName:"BlockPublicPolicy" type:"boolean"` - - // Specifies whether Amazon S3 should ignore public ACLs for this bucket and - // objects in this bucket. Setting this element to TRUE causes Amazon S3 to - // ignore all public ACLs on this bucket and objects in this bucket. - // - // Enabling this setting doesn't affect the persistence of any existing ACLs - // and doesn't prevent new public ACLs from being set. - IgnorePublicAcls *bool `locationName:"IgnorePublicAcls" type:"boolean"` - - // Specifies whether Amazon S3 should restrict public bucket policies for this - // bucket. Setting this element to TRUE restricts access to this bucket to only - // Amazon Web Service principals and authorized users within this account if - // the bucket has a public policy. - // - // Enabling this setting doesn't affect previously stored bucket policies, except - // that public and cross-account access within any public bucket policy, including - // non-public delegation to specific accounts, is blocked. - RestrictPublicBuckets *bool `locationName:"RestrictPublicBuckets" 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 PublicAccessBlockConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PublicAccessBlockConfiguration) GoString() string { - return s.String() -} - -// SetBlockPublicAcls sets the BlockPublicAcls field's value. -func (s *PublicAccessBlockConfiguration) SetBlockPublicAcls(v bool) *PublicAccessBlockConfiguration { - s.BlockPublicAcls = &v - return s -} - -// SetBlockPublicPolicy sets the BlockPublicPolicy field's value. -func (s *PublicAccessBlockConfiguration) SetBlockPublicPolicy(v bool) *PublicAccessBlockConfiguration { - s.BlockPublicPolicy = &v - return s -} - -// SetIgnorePublicAcls sets the IgnorePublicAcls field's value. -func (s *PublicAccessBlockConfiguration) SetIgnorePublicAcls(v bool) *PublicAccessBlockConfiguration { - s.IgnorePublicAcls = &v - return s -} - -// SetRestrictPublicBuckets sets the RestrictPublicBuckets field's value. -func (s *PublicAccessBlockConfiguration) SetRestrictPublicBuckets(v bool) *PublicAccessBlockConfiguration { - s.RestrictPublicBuckets = &v - return s -} - -type PutBucketAccelerateConfigurationInput struct { - _ struct{} `locationName:"PutBucketAccelerateConfigurationRequest" type:"structure" payload:"AccelerateConfiguration"` - - // Container for setting the transfer acceleration state. - // - // AccelerateConfiguration is a required field - AccelerateConfiguration *AccelerateConfiguration `locationName:"AccelerateConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` - - // The name of the bucket for which the accelerate configuration is set. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // Indicates the algorithm used to create the checksum for the object when you - // use the SDK. This header will not provide any additional functionality if - // you don't use the SDK. When you send this header, there must be a corresponding - // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the - // request with the HTTP status code 400 Bad Request. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - // - // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm - // parameter. - // - // The AWS SDK for Go v1 does not support automatic computing request payload - // checksum. This feature is available in the AWS SDK for Go v2. If a value - // is specified for this parameter, the matching algorithm's checksum member - // must be populated with the algorithm's checksum of the request payload. - ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 PutBucketAccelerateConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketAccelerateConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutBucketAccelerateConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutBucketAccelerateConfigurationInput"} - if s.AccelerateConfiguration == nil { - invalidParams.Add(request.NewErrParamRequired("AccelerateConfiguration")) - } - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccelerateConfiguration sets the AccelerateConfiguration field's value. -func (s *PutBucketAccelerateConfigurationInput) SetAccelerateConfiguration(v *AccelerateConfiguration) *PutBucketAccelerateConfigurationInput { - s.AccelerateConfiguration = v - return s -} - -// SetBucket sets the Bucket field's value. -func (s *PutBucketAccelerateConfigurationInput) SetBucket(v string) *PutBucketAccelerateConfigurationInput { - s.Bucket = &v - return s -} - -func (s *PutBucketAccelerateConfigurationInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *PutBucketAccelerateConfigurationInput) SetChecksumAlgorithm(v string) *PutBucketAccelerateConfigurationInput { - s.ChecksumAlgorithm = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *PutBucketAccelerateConfigurationInput) SetExpectedBucketOwner(v string) *PutBucketAccelerateConfigurationInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *PutBucketAccelerateConfigurationInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *PutBucketAccelerateConfigurationInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s PutBucketAccelerateConfigurationInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type PutBucketAccelerateConfigurationOutput 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 PutBucketAccelerateConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketAccelerateConfigurationOutput) GoString() string { - return s.String() -} - -type PutBucketAclInput struct { - _ struct{} `locationName:"PutBucketAclRequest" type:"structure" payload:"AccessControlPolicy"` - - // The canned ACL to apply to the bucket. - ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"` - - // Contains the elements that set the ACL permissions for an object per grantee. - AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` - - // The bucket to which to apply the ACL. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // Indicates the algorithm used to create the checksum for the object when you - // use the SDK. This header will not provide any additional functionality if - // you don't use the SDK. When you send this header, there must be a corresponding - // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the - // request with the HTTP status code 400 Bad Request. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - // - // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm - // parameter. - // - // The AWS SDK for Go v1 does not support automatic computing request payload - // checksum. This feature is available in the AWS SDK for Go v2. If a value - // is specified for this parameter, the matching algorithm's checksum member - // must be populated with the algorithm's checksum of the request payload. - // - // The SDK will automatically compute the Content-MD5 checksum for this operation. - // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm - // to be used. - ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // Allows grantee the read, write, read ACP, and write ACP permissions on the - // bucket. - GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"` - - // Allows grantee to list the objects in the bucket. - GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"` - - // Allows grantee to read the bucket ACL. - GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"` - - // Allows grantee to create new objects in the bucket. - // - // For the bucket and object owners of existing objects, also allows deletions - // and overwrites of those objects. - GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"` - - // Allows grantee to write the ACL for the applicable bucket. - GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" 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 PutBucketAclInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketAclInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutBucketAclInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutBucketAclInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.AccessControlPolicy != nil { - if err := s.AccessControlPolicy.Validate(); err != nil { - invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetACL sets the ACL field's value. -func (s *PutBucketAclInput) SetACL(v string) *PutBucketAclInput { - s.ACL = &v - return s -} - -// SetAccessControlPolicy sets the AccessControlPolicy field's value. -func (s *PutBucketAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutBucketAclInput { - s.AccessControlPolicy = v - return s -} - -// SetBucket sets the Bucket field's value. -func (s *PutBucketAclInput) SetBucket(v string) *PutBucketAclInput { - s.Bucket = &v - return s -} - -func (s *PutBucketAclInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *PutBucketAclInput) SetChecksumAlgorithm(v string) *PutBucketAclInput { - s.ChecksumAlgorithm = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *PutBucketAclInput) SetExpectedBucketOwner(v string) *PutBucketAclInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetGrantFullControl sets the GrantFullControl field's value. -func (s *PutBucketAclInput) SetGrantFullControl(v string) *PutBucketAclInput { - s.GrantFullControl = &v - return s -} - -// SetGrantRead sets the GrantRead field's value. -func (s *PutBucketAclInput) SetGrantRead(v string) *PutBucketAclInput { - s.GrantRead = &v - return s -} - -// SetGrantReadACP sets the GrantReadACP field's value. -func (s *PutBucketAclInput) SetGrantReadACP(v string) *PutBucketAclInput { - s.GrantReadACP = &v - return s -} - -// SetGrantWrite sets the GrantWrite field's value. -func (s *PutBucketAclInput) SetGrantWrite(v string) *PutBucketAclInput { - s.GrantWrite = &v - return s -} - -// SetGrantWriteACP sets the GrantWriteACP field's value. -func (s *PutBucketAclInput) SetGrantWriteACP(v string) *PutBucketAclInput { - s.GrantWriteACP = &v - return s -} - -func (s *PutBucketAclInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *PutBucketAclInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s PutBucketAclInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type PutBucketAclOutput 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 PutBucketAclOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketAclOutput) GoString() string { - return s.String() -} - -type PutBucketAnalyticsConfigurationInput struct { - _ struct{} `locationName:"PutBucketAnalyticsConfigurationRequest" type:"structure" payload:"AnalyticsConfiguration"` - - // The configuration and any analyses for the analytics filter. - // - // AnalyticsConfiguration is a required field - AnalyticsConfiguration *AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` - - // The name of the bucket to which an analytics configuration is stored. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // The ID that identifies the analytics configuration. - // - // Id is a required field - Id *string `location:"querystring" locationName:"id" 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 PutBucketAnalyticsConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketAnalyticsConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutBucketAnalyticsConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutBucketAnalyticsConfigurationInput"} - if s.AnalyticsConfiguration == nil { - invalidParams.Add(request.NewErrParamRequired("AnalyticsConfiguration")) - } - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.AnalyticsConfiguration != nil { - if err := s.AnalyticsConfiguration.Validate(); err != nil { - invalidParams.AddNested("AnalyticsConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAnalyticsConfiguration sets the AnalyticsConfiguration field's value. -func (s *PutBucketAnalyticsConfigurationInput) SetAnalyticsConfiguration(v *AnalyticsConfiguration) *PutBucketAnalyticsConfigurationInput { - s.AnalyticsConfiguration = v - return s -} - -// SetBucket sets the Bucket field's value. -func (s *PutBucketAnalyticsConfigurationInput) SetBucket(v string) *PutBucketAnalyticsConfigurationInput { - s.Bucket = &v - return s -} - -func (s *PutBucketAnalyticsConfigurationInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *PutBucketAnalyticsConfigurationInput) SetExpectedBucketOwner(v string) *PutBucketAnalyticsConfigurationInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetId sets the Id field's value. -func (s *PutBucketAnalyticsConfigurationInput) SetId(v string) *PutBucketAnalyticsConfigurationInput { - s.Id = &v - return s -} - -func (s *PutBucketAnalyticsConfigurationInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *PutBucketAnalyticsConfigurationInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s PutBucketAnalyticsConfigurationInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type PutBucketAnalyticsConfigurationOutput 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 PutBucketAnalyticsConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketAnalyticsConfigurationOutput) GoString() string { - return s.String() -} - -type PutBucketCorsInput struct { - _ struct{} `locationName:"PutBucketCorsRequest" type:"structure" payload:"CORSConfiguration"` - - // Specifies the bucket impacted by the corsconfiguration. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // Describes the cross-origin access configuration for objects in an Amazon - // S3 bucket. For more information, see Enabling Cross-Origin Resource Sharing - // (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) in the Amazon - // S3 User Guide. - // - // CORSConfiguration is a required field - CORSConfiguration *CORSConfiguration `locationName:"CORSConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` - - // Indicates the algorithm used to create the checksum for the object when you - // use the SDK. This header will not provide any additional functionality if - // you don't use the SDK. When you send this header, there must be a corresponding - // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the - // request with the HTTP status code 400 Bad Request. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - // - // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm - // parameter. - // - // The AWS SDK for Go v1 does not support automatic computing request payload - // checksum. This feature is available in the AWS SDK for Go v2. If a value - // is specified for this parameter, the matching algorithm's checksum member - // must be populated with the algorithm's checksum of the request payload. - // - // The SDK will automatically compute the Content-MD5 checksum for this operation. - // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm - // to be used. - ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 PutBucketCorsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketCorsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutBucketCorsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutBucketCorsInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.CORSConfiguration == nil { - invalidParams.Add(request.NewErrParamRequired("CORSConfiguration")) - } - if s.CORSConfiguration != nil { - if err := s.CORSConfiguration.Validate(); err != nil { - invalidParams.AddNested("CORSConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *PutBucketCorsInput) SetBucket(v string) *PutBucketCorsInput { - s.Bucket = &v - return s -} - -func (s *PutBucketCorsInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetCORSConfiguration sets the CORSConfiguration field's value. -func (s *PutBucketCorsInput) SetCORSConfiguration(v *CORSConfiguration) *PutBucketCorsInput { - s.CORSConfiguration = v - return s -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *PutBucketCorsInput) SetChecksumAlgorithm(v string) *PutBucketCorsInput { - s.ChecksumAlgorithm = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *PutBucketCorsInput) SetExpectedBucketOwner(v string) *PutBucketCorsInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *PutBucketCorsInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *PutBucketCorsInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s PutBucketCorsInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type PutBucketCorsOutput 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 PutBucketCorsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketCorsOutput) GoString() string { - return s.String() -} - -type PutBucketEncryptionInput struct { - _ struct{} `locationName:"PutBucketEncryptionRequest" type:"structure" payload:"ServerSideEncryptionConfiguration"` - - // Specifies default encryption for a bucket using server-side encryption with - // different key options. By default, all buckets have a default encryption - // configuration that uses server-side encryption with Amazon S3 managed keys - // (SSE-S3). You can optionally configure default encryption for a bucket by - // using server-side encryption with an Amazon Web Services KMS key (SSE-KMS) - // or a customer-provided key (SSE-C). For information about the bucket default - // encryption feature, see Amazon S3 Bucket Default Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html) - // in the Amazon S3 User Guide. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // Indicates the algorithm used to create the checksum for the object when you - // use the SDK. This header will not provide any additional functionality if - // you don't use the SDK. When you send this header, there must be a corresponding - // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the - // request with the HTTP status code 400 Bad Request. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - // - // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm - // parameter. - // - // The AWS SDK for Go v1 does not support automatic computing request payload - // checksum. This feature is available in the AWS SDK for Go v2. If a value - // is specified for this parameter, the matching algorithm's checksum member - // must be populated with the algorithm's checksum of the request payload. - // - // The SDK will automatically compute the Content-MD5 checksum for this operation. - // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm - // to be used. - ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // Specifies the default server-side-encryption configuration. - // - // ServerSideEncryptionConfiguration is a required field - ServerSideEncryptionConfiguration *ServerSideEncryptionConfiguration `locationName:"ServerSideEncryptionConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketEncryptionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketEncryptionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutBucketEncryptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutBucketEncryptionInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.ServerSideEncryptionConfiguration == nil { - invalidParams.Add(request.NewErrParamRequired("ServerSideEncryptionConfiguration")) - } - if s.ServerSideEncryptionConfiguration != nil { - if err := s.ServerSideEncryptionConfiguration.Validate(); err != nil { - invalidParams.AddNested("ServerSideEncryptionConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *PutBucketEncryptionInput) SetBucket(v string) *PutBucketEncryptionInput { - s.Bucket = &v - return s -} - -func (s *PutBucketEncryptionInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *PutBucketEncryptionInput) SetChecksumAlgorithm(v string) *PutBucketEncryptionInput { - s.ChecksumAlgorithm = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *PutBucketEncryptionInput) SetExpectedBucketOwner(v string) *PutBucketEncryptionInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetServerSideEncryptionConfiguration sets the ServerSideEncryptionConfiguration field's value. -func (s *PutBucketEncryptionInput) SetServerSideEncryptionConfiguration(v *ServerSideEncryptionConfiguration) *PutBucketEncryptionInput { - s.ServerSideEncryptionConfiguration = v - return s -} - -func (s *PutBucketEncryptionInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *PutBucketEncryptionInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s PutBucketEncryptionInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type PutBucketEncryptionOutput 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 PutBucketEncryptionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketEncryptionOutput) GoString() string { - return s.String() -} - -type PutBucketIntelligentTieringConfigurationInput struct { - _ struct{} `locationName:"PutBucketIntelligentTieringConfigurationRequest" type:"structure" payload:"IntelligentTieringConfiguration"` - - // The name of the Amazon S3 bucket whose configuration you want to modify or - // retrieve. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The ID used to identify the S3 Intelligent-Tiering configuration. - // - // Id is a required field - Id *string `location:"querystring" locationName:"id" type:"string" required:"true"` - - // Container for S3 Intelligent-Tiering configuration. - // - // IntelligentTieringConfiguration is a required field - IntelligentTieringConfiguration *IntelligentTieringConfiguration `locationName:"IntelligentTieringConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketIntelligentTieringConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketIntelligentTieringConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutBucketIntelligentTieringConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutBucketIntelligentTieringConfigurationInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.IntelligentTieringConfiguration == nil { - invalidParams.Add(request.NewErrParamRequired("IntelligentTieringConfiguration")) - } - if s.IntelligentTieringConfiguration != nil { - if err := s.IntelligentTieringConfiguration.Validate(); err != nil { - invalidParams.AddNested("IntelligentTieringConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *PutBucketIntelligentTieringConfigurationInput) SetBucket(v string) *PutBucketIntelligentTieringConfigurationInput { - s.Bucket = &v - return s -} - -func (s *PutBucketIntelligentTieringConfigurationInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetId sets the Id field's value. -func (s *PutBucketIntelligentTieringConfigurationInput) SetId(v string) *PutBucketIntelligentTieringConfigurationInput { - s.Id = &v - return s -} - -// SetIntelligentTieringConfiguration sets the IntelligentTieringConfiguration field's value. -func (s *PutBucketIntelligentTieringConfigurationInput) SetIntelligentTieringConfiguration(v *IntelligentTieringConfiguration) *PutBucketIntelligentTieringConfigurationInput { - s.IntelligentTieringConfiguration = v - return s -} - -func (s *PutBucketIntelligentTieringConfigurationInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *PutBucketIntelligentTieringConfigurationInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s PutBucketIntelligentTieringConfigurationInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type PutBucketIntelligentTieringConfigurationOutput 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 PutBucketIntelligentTieringConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketIntelligentTieringConfigurationOutput) GoString() string { - return s.String() -} - -type PutBucketInventoryConfigurationInput struct { - _ struct{} `locationName:"PutBucketInventoryConfigurationRequest" type:"structure" payload:"InventoryConfiguration"` - - // The name of the bucket where the inventory configuration will be stored. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // The ID used to identify the inventory configuration. - // - // Id is a required field - Id *string `location:"querystring" locationName:"id" type:"string" required:"true"` - - // Specifies the inventory configuration. - // - // InventoryConfiguration is a required field - InventoryConfiguration *InventoryConfiguration `locationName:"InventoryConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketInventoryConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketInventoryConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutBucketInventoryConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutBucketInventoryConfigurationInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.InventoryConfiguration == nil { - invalidParams.Add(request.NewErrParamRequired("InventoryConfiguration")) - } - if s.InventoryConfiguration != nil { - if err := s.InventoryConfiguration.Validate(); err != nil { - invalidParams.AddNested("InventoryConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *PutBucketInventoryConfigurationInput) SetBucket(v string) *PutBucketInventoryConfigurationInput { - s.Bucket = &v - return s -} - -func (s *PutBucketInventoryConfigurationInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *PutBucketInventoryConfigurationInput) SetExpectedBucketOwner(v string) *PutBucketInventoryConfigurationInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetId sets the Id field's value. -func (s *PutBucketInventoryConfigurationInput) SetId(v string) *PutBucketInventoryConfigurationInput { - s.Id = &v - return s -} - -// SetInventoryConfiguration sets the InventoryConfiguration field's value. -func (s *PutBucketInventoryConfigurationInput) SetInventoryConfiguration(v *InventoryConfiguration) *PutBucketInventoryConfigurationInput { - s.InventoryConfiguration = v - return s -} - -func (s *PutBucketInventoryConfigurationInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *PutBucketInventoryConfigurationInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s PutBucketInventoryConfigurationInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type PutBucketInventoryConfigurationOutput 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 PutBucketInventoryConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketInventoryConfigurationOutput) GoString() string { - return s.String() -} - -type PutBucketLifecycleConfigurationInput struct { - _ struct{} `locationName:"PutBucketLifecycleConfigurationRequest" type:"structure" payload:"LifecycleConfiguration"` - - // The name of the bucket for which to set the configuration. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // Indicates the algorithm used to create the checksum for the object when you - // use the SDK. This header will not provide any additional functionality if - // you don't use the SDK. When you send this header, there must be a corresponding - // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the - // request with the HTTP status code 400 Bad Request. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - // - // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm - // parameter. - // - // The AWS SDK for Go v1 does not support automatic computing request payload - // checksum. This feature is available in the AWS SDK for Go v2. If a value - // is specified for this parameter, the matching algorithm's checksum member - // must be populated with the algorithm's checksum of the request payload. - // - // The SDK will automatically compute the Content-MD5 checksum for this operation. - // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm - // to be used. - ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // Container for lifecycle rules. You can add as many as 1,000 rules. - LifecycleConfiguration *BucketLifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketLifecycleConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketLifecycleConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutBucketLifecycleConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleConfigurationInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.LifecycleConfiguration != nil { - if err := s.LifecycleConfiguration.Validate(); err != nil { - invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *PutBucketLifecycleConfigurationInput) SetBucket(v string) *PutBucketLifecycleConfigurationInput { - s.Bucket = &v - return s -} - -func (s *PutBucketLifecycleConfigurationInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *PutBucketLifecycleConfigurationInput) SetChecksumAlgorithm(v string) *PutBucketLifecycleConfigurationInput { - s.ChecksumAlgorithm = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *PutBucketLifecycleConfigurationInput) SetExpectedBucketOwner(v string) *PutBucketLifecycleConfigurationInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetLifecycleConfiguration sets the LifecycleConfiguration field's value. -func (s *PutBucketLifecycleConfigurationInput) SetLifecycleConfiguration(v *BucketLifecycleConfiguration) *PutBucketLifecycleConfigurationInput { - s.LifecycleConfiguration = v - return s -} - -func (s *PutBucketLifecycleConfigurationInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *PutBucketLifecycleConfigurationInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s PutBucketLifecycleConfigurationInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type PutBucketLifecycleConfigurationOutput 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 PutBucketLifecycleConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketLifecycleConfigurationOutput) GoString() string { - return s.String() -} - -type PutBucketLifecycleInput struct { - _ struct{} `locationName:"PutBucketLifecycleRequest" type:"structure" payload:"LifecycleConfiguration"` - - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // Indicates the algorithm used to create the checksum for the object when you - // use the SDK. This header will not provide any additional functionality if - // you don't use the SDK. When you send this header, there must be a corresponding - // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the - // request with the HTTP status code 400 Bad Request. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - // - // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm - // parameter. - // - // The AWS SDK for Go v1 does not support automatic computing request payload - // checksum. This feature is available in the AWS SDK for Go v2. If a value - // is specified for this parameter, the matching algorithm's checksum member - // must be populated with the algorithm's checksum of the request payload. - // - // The SDK will automatically compute the Content-MD5 checksum for this operation. - // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm - // to be used. - ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // Container for lifecycle rules. You can add as many as 1000 rules. - // - // For more information see, Managing your storage lifecycle (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html) - // in the Amazon S3 User Guide. - LifecycleConfiguration *LifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketLifecycleInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketLifecycleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutBucketLifecycleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.LifecycleConfiguration != nil { - if err := s.LifecycleConfiguration.Validate(); err != nil { - invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *PutBucketLifecycleInput) SetBucket(v string) *PutBucketLifecycleInput { - s.Bucket = &v - return s -} - -func (s *PutBucketLifecycleInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *PutBucketLifecycleInput) SetChecksumAlgorithm(v string) *PutBucketLifecycleInput { - s.ChecksumAlgorithm = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *PutBucketLifecycleInput) SetExpectedBucketOwner(v string) *PutBucketLifecycleInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetLifecycleConfiguration sets the LifecycleConfiguration field's value. -func (s *PutBucketLifecycleInput) SetLifecycleConfiguration(v *LifecycleConfiguration) *PutBucketLifecycleInput { - s.LifecycleConfiguration = v - return s -} - -func (s *PutBucketLifecycleInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *PutBucketLifecycleInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s PutBucketLifecycleInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type PutBucketLifecycleOutput 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 PutBucketLifecycleOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketLifecycleOutput) GoString() string { - return s.String() -} - -type PutBucketLoggingInput struct { - _ struct{} `locationName:"PutBucketLoggingRequest" type:"structure" payload:"BucketLoggingStatus"` - - // The name of the bucket for which to set the logging parameters. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // Container for logging status information. - // - // BucketLoggingStatus is a required field - BucketLoggingStatus *BucketLoggingStatus `locationName:"BucketLoggingStatus" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` - - // Indicates the algorithm used to create the checksum for the object when you - // use the SDK. This header will not provide any additional functionality if - // you don't use the SDK. When you send this header, there must be a corresponding - // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the - // request with the HTTP status code 400 Bad Request. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - // - // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm - // parameter. - // - // The AWS SDK for Go v1 does not support automatic computing request payload - // checksum. This feature is available in the AWS SDK for Go v2. If a value - // is specified for this parameter, the matching algorithm's checksum member - // must be populated with the algorithm's checksum of the request payload. - // - // The SDK will automatically compute the Content-MD5 checksum for this operation. - // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm - // to be used. - ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" 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 PutBucketLoggingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketLoggingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutBucketLoggingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutBucketLoggingInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.BucketLoggingStatus == nil { - invalidParams.Add(request.NewErrParamRequired("BucketLoggingStatus")) - } - if s.BucketLoggingStatus != nil { - if err := s.BucketLoggingStatus.Validate(); err != nil { - invalidParams.AddNested("BucketLoggingStatus", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *PutBucketLoggingInput) SetBucket(v string) *PutBucketLoggingInput { - s.Bucket = &v - return s -} - -func (s *PutBucketLoggingInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetBucketLoggingStatus sets the BucketLoggingStatus field's value. -func (s *PutBucketLoggingInput) SetBucketLoggingStatus(v *BucketLoggingStatus) *PutBucketLoggingInput { - s.BucketLoggingStatus = v - return s -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *PutBucketLoggingInput) SetChecksumAlgorithm(v string) *PutBucketLoggingInput { - s.ChecksumAlgorithm = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *PutBucketLoggingInput) SetExpectedBucketOwner(v string) *PutBucketLoggingInput { - s.ExpectedBucketOwner = &v - return s -} - -func (s *PutBucketLoggingInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *PutBucketLoggingInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s PutBucketLoggingInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type PutBucketLoggingOutput 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 PutBucketLoggingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketLoggingOutput) GoString() string { - return s.String() -} - -type PutBucketMetricsConfigurationInput struct { - _ struct{} `locationName:"PutBucketMetricsConfigurationRequest" type:"structure" payload:"MetricsConfiguration"` - - // The name of the bucket for which the metrics configuration is set. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // The ID used to identify the metrics configuration. The ID has a 64 character - // limit and can only contain letters, numbers, periods, dashes, and underscores. - // - // Id is a required field - Id *string `location:"querystring" locationName:"id" type:"string" required:"true"` - - // Specifies the metrics configuration. - // - // MetricsConfiguration is a required field - MetricsConfiguration *MetricsConfiguration `locationName:"MetricsConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketMetricsConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketMetricsConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutBucketMetricsConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutBucketMetricsConfigurationInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.MetricsConfiguration == nil { - invalidParams.Add(request.NewErrParamRequired("MetricsConfiguration")) - } - if s.MetricsConfiguration != nil { - if err := s.MetricsConfiguration.Validate(); err != nil { - invalidParams.AddNested("MetricsConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *PutBucketMetricsConfigurationInput) SetBucket(v string) *PutBucketMetricsConfigurationInput { - s.Bucket = &v - return s -} - -func (s *PutBucketMetricsConfigurationInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *PutBucketMetricsConfigurationInput) SetExpectedBucketOwner(v string) *PutBucketMetricsConfigurationInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetId sets the Id field's value. -func (s *PutBucketMetricsConfigurationInput) SetId(v string) *PutBucketMetricsConfigurationInput { - s.Id = &v - return s -} - -// SetMetricsConfiguration sets the MetricsConfiguration field's value. -func (s *PutBucketMetricsConfigurationInput) SetMetricsConfiguration(v *MetricsConfiguration) *PutBucketMetricsConfigurationInput { - s.MetricsConfiguration = v - return s -} - -func (s *PutBucketMetricsConfigurationInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *PutBucketMetricsConfigurationInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s PutBucketMetricsConfigurationInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type PutBucketMetricsConfigurationOutput 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 PutBucketMetricsConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketMetricsConfigurationOutput) GoString() string { - return s.String() -} - -type PutBucketNotificationConfigurationInput struct { - _ struct{} `locationName:"PutBucketNotificationConfigurationRequest" type:"structure" payload:"NotificationConfiguration"` - - // The name of the bucket. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // A container for specifying the notification configuration of the bucket. - // If this element is empty, notifications are turned off for the bucket. - // - // NotificationConfiguration is a required field - NotificationConfiguration *NotificationConfiguration `locationName:"NotificationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` - - // Skips validation of Amazon SQS, Amazon SNS, and Lambda destinations. True - // or false value. - SkipDestinationValidation *bool `location:"header" locationName:"x-amz-skip-destination-validation" 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 PutBucketNotificationConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketNotificationConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutBucketNotificationConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationConfigurationInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.NotificationConfiguration == nil { - invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration")) - } - if s.NotificationConfiguration != nil { - if err := s.NotificationConfiguration.Validate(); err != nil { - invalidParams.AddNested("NotificationConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *PutBucketNotificationConfigurationInput) SetBucket(v string) *PutBucketNotificationConfigurationInput { - s.Bucket = &v - return s -} - -func (s *PutBucketNotificationConfigurationInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *PutBucketNotificationConfigurationInput) SetExpectedBucketOwner(v string) *PutBucketNotificationConfigurationInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetNotificationConfiguration sets the NotificationConfiguration field's value. -func (s *PutBucketNotificationConfigurationInput) SetNotificationConfiguration(v *NotificationConfiguration) *PutBucketNotificationConfigurationInput { - s.NotificationConfiguration = v - return s -} - -// SetSkipDestinationValidation sets the SkipDestinationValidation field's value. -func (s *PutBucketNotificationConfigurationInput) SetSkipDestinationValidation(v bool) *PutBucketNotificationConfigurationInput { - s.SkipDestinationValidation = &v - return s -} - -func (s *PutBucketNotificationConfigurationInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *PutBucketNotificationConfigurationInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s PutBucketNotificationConfigurationInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type PutBucketNotificationConfigurationOutput 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 PutBucketNotificationConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketNotificationConfigurationOutput) GoString() string { - return s.String() -} - -type PutBucketNotificationInput struct { - _ struct{} `locationName:"PutBucketNotificationRequest" type:"structure" payload:"NotificationConfiguration"` - - // The name of the bucket. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // Indicates the algorithm used to create the checksum for the object when you - // use the SDK. This header will not provide any additional functionality if - // you don't use the SDK. When you send this header, there must be a corresponding - // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the - // request with the HTTP status code 400 Bad Request. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - // - // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm - // parameter. - // - // The AWS SDK for Go v1 does not support automatic computing request payload - // checksum. This feature is available in the AWS SDK for Go v2. If a value - // is specified for this parameter, the matching algorithm's checksum member - // must be populated with the algorithm's checksum of the request payload. - // - // The SDK will automatically compute the Content-MD5 checksum for this operation. - // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm - // to be used. - ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // The container for the configuration. - // - // NotificationConfiguration is a required field - NotificationConfiguration *NotificationConfigurationDeprecated `locationName:"NotificationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketNotificationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketNotificationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutBucketNotificationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.NotificationConfiguration == nil { - invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *PutBucketNotificationInput) SetBucket(v string) *PutBucketNotificationInput { - s.Bucket = &v - return s -} - -func (s *PutBucketNotificationInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *PutBucketNotificationInput) SetChecksumAlgorithm(v string) *PutBucketNotificationInput { - s.ChecksumAlgorithm = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *PutBucketNotificationInput) SetExpectedBucketOwner(v string) *PutBucketNotificationInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetNotificationConfiguration sets the NotificationConfiguration field's value. -func (s *PutBucketNotificationInput) SetNotificationConfiguration(v *NotificationConfigurationDeprecated) *PutBucketNotificationInput { - s.NotificationConfiguration = v - return s -} - -func (s *PutBucketNotificationInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *PutBucketNotificationInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s PutBucketNotificationInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type PutBucketNotificationOutput 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 PutBucketNotificationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketNotificationOutput) GoString() string { - return s.String() -} - -type PutBucketOwnershipControlsInput struct { - _ struct{} `locationName:"PutBucketOwnershipControlsRequest" type:"structure" payload:"OwnershipControls"` - - // The name of the Amazon S3 bucket whose OwnershipControls you want to set. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or ObjectWriter) - // that you want to apply to this Amazon S3 bucket. - // - // OwnershipControls is a required field - OwnershipControls *OwnershipControls `locationName:"OwnershipControls" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketOwnershipControlsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketOwnershipControlsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutBucketOwnershipControlsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutBucketOwnershipControlsInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.OwnershipControls == nil { - invalidParams.Add(request.NewErrParamRequired("OwnershipControls")) - } - if s.OwnershipControls != nil { - if err := s.OwnershipControls.Validate(); err != nil { - invalidParams.AddNested("OwnershipControls", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *PutBucketOwnershipControlsInput) SetBucket(v string) *PutBucketOwnershipControlsInput { - s.Bucket = &v - return s -} - -func (s *PutBucketOwnershipControlsInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *PutBucketOwnershipControlsInput) SetExpectedBucketOwner(v string) *PutBucketOwnershipControlsInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetOwnershipControls sets the OwnershipControls field's value. -func (s *PutBucketOwnershipControlsInput) SetOwnershipControls(v *OwnershipControls) *PutBucketOwnershipControlsInput { - s.OwnershipControls = v - return s -} - -func (s *PutBucketOwnershipControlsInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *PutBucketOwnershipControlsInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s PutBucketOwnershipControlsInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type PutBucketOwnershipControlsOutput 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 PutBucketOwnershipControlsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketOwnershipControlsOutput) GoString() string { - return s.String() -} - -type PutBucketPolicyInput struct { - _ struct{} `locationName:"PutBucketPolicyRequest" type:"structure" payload:"Policy"` - - // The name of the bucket. - // - // Directory buckets - When you use this operation with a directory bucket, - // you must use path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name - // . Virtual-hosted-style requests aren't supported. Directory bucket names - // must be unique in the chosen Availability Zone. Bucket names must also follow - // the format bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). - // For information about bucket naming restrictions, see Directory bucket naming - // rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html) - // in the Amazon S3 User Guide - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // Indicates the algorithm used to create the checksum for the object when you - // use the SDK. This header will not provide any additional functionality if - // you don't use the SDK. When you send this header, there must be a corresponding - // x-amz-checksum-algorithm or x-amz-trailer header sent. Otherwise, Amazon - // S3 fails the request with the HTTP status code 400 Bad Request. - // - // For the x-amz-checksum-algorithm header, replace algorithm with the supported - // algorithm from the following list: - // - // * CRC32 - // - // * CRC32C - // - // * SHA1 - // - // * SHA256 - // - // For more information, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - // - // If the individual checksum value you provide through x-amz-checksum-algorithm - // doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, - // Amazon S3 ignores any provided ChecksumAlgorithm parameter and uses the checksum - // algorithm that matches the provided value in x-amz-checksum-algorithm . - // - // For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the - // default checksum algorithm that's used for performance. - // - // The AWS SDK for Go v1 does not support automatic computing request payload - // checksum. This feature is available in the AWS SDK for Go v2. If a value - // is specified for this parameter, the matching algorithm's checksum member - // must be populated with the algorithm's checksum of the request payload. - // - // The SDK will automatically compute the Content-MD5 checksum for this operation. - // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm - // to be used. - ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"` - - // Set this parameter to true to confirm that you want to remove your permissions - // to change this bucket policy in the future. - // - // This functionality is not supported for directory buckets. - ConfirmRemoveSelfBucketAccess *bool `location:"header" locationName:"x-amz-confirm-remove-self-bucket-access" type:"boolean"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - // - // For directory buckets, this header is not supported in this API operation. - // If you specify this header, the request fails with the HTTP status code 501 - // Not Implemented. - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // The bucket policy as a JSON document. - // - // For directory buckets, the only IAM action supported in the bucket policy - // is s3express:CreateSession. - // - // Policy is a required field - Policy *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 PutBucketPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutBucketPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutBucketPolicyInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.Policy == nil { - invalidParams.Add(request.NewErrParamRequired("Policy")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *PutBucketPolicyInput) SetBucket(v string) *PutBucketPolicyInput { - s.Bucket = &v - return s -} - -func (s *PutBucketPolicyInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *PutBucketPolicyInput) SetChecksumAlgorithm(v string) *PutBucketPolicyInput { - s.ChecksumAlgorithm = &v - return s -} - -// SetConfirmRemoveSelfBucketAccess sets the ConfirmRemoveSelfBucketAccess field's value. -func (s *PutBucketPolicyInput) SetConfirmRemoveSelfBucketAccess(v bool) *PutBucketPolicyInput { - s.ConfirmRemoveSelfBucketAccess = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *PutBucketPolicyInput) SetExpectedBucketOwner(v string) *PutBucketPolicyInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetPolicy sets the Policy field's value. -func (s *PutBucketPolicyInput) SetPolicy(v string) *PutBucketPolicyInput { - s.Policy = &v - return s -} - -func (s *PutBucketPolicyInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *PutBucketPolicyInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s PutBucketPolicyInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type PutBucketPolicyOutput 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 PutBucketPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketPolicyOutput) GoString() string { - return s.String() -} - -type PutBucketReplicationInput struct { - _ struct{} `locationName:"PutBucketReplicationRequest" type:"structure" payload:"ReplicationConfiguration"` - - // The name of the bucket - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // Indicates the algorithm used to create the checksum for the object when you - // use the SDK. This header will not provide any additional functionality if - // you don't use the SDK. When you send this header, there must be a corresponding - // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the - // request with the HTTP status code 400 Bad Request. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - // - // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm - // parameter. - // - // The AWS SDK for Go v1 does not support automatic computing request payload - // checksum. This feature is available in the AWS SDK for Go v2. If a value - // is specified for this parameter, the matching algorithm's checksum member - // must be populated with the algorithm's checksum of the request payload. - // - // The SDK will automatically compute the Content-MD5 checksum for this operation. - // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm - // to be used. - ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // A container for replication rules. You can add up to 1,000 rules. The maximum - // size of a replication configuration is 2 MB. - // - // ReplicationConfiguration is a required field - ReplicationConfiguration *ReplicationConfiguration `locationName:"ReplicationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` - - // A token to allow Object Lock to be enabled for an existing bucket. - Token *string `location:"header" locationName:"x-amz-bucket-object-lock-token" 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 PutBucketReplicationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketReplicationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutBucketReplicationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutBucketReplicationInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.ReplicationConfiguration == nil { - invalidParams.Add(request.NewErrParamRequired("ReplicationConfiguration")) - } - if s.ReplicationConfiguration != nil { - if err := s.ReplicationConfiguration.Validate(); err != nil { - invalidParams.AddNested("ReplicationConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *PutBucketReplicationInput) SetBucket(v string) *PutBucketReplicationInput { - s.Bucket = &v - return s -} - -func (s *PutBucketReplicationInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *PutBucketReplicationInput) SetChecksumAlgorithm(v string) *PutBucketReplicationInput { - s.ChecksumAlgorithm = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *PutBucketReplicationInput) SetExpectedBucketOwner(v string) *PutBucketReplicationInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetReplicationConfiguration sets the ReplicationConfiguration field's value. -func (s *PutBucketReplicationInput) SetReplicationConfiguration(v *ReplicationConfiguration) *PutBucketReplicationInput { - s.ReplicationConfiguration = v - return s -} - -// SetToken sets the Token field's value. -func (s *PutBucketReplicationInput) SetToken(v string) *PutBucketReplicationInput { - s.Token = &v - return s -} - -func (s *PutBucketReplicationInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *PutBucketReplicationInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s PutBucketReplicationInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type PutBucketReplicationOutput 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 PutBucketReplicationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketReplicationOutput) GoString() string { - return s.String() -} - -type PutBucketRequestPaymentInput struct { - _ struct{} `locationName:"PutBucketRequestPaymentRequest" type:"structure" payload:"RequestPaymentConfiguration"` - - // The bucket name. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // Indicates the algorithm used to create the checksum for the object when you - // use the SDK. This header will not provide any additional functionality if - // you don't use the SDK. When you send this header, there must be a corresponding - // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the - // request with the HTTP status code 400 Bad Request. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - // - // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm - // parameter. - // - // The AWS SDK for Go v1 does not support automatic computing request payload - // checksum. This feature is available in the AWS SDK for Go v2. If a value - // is specified for this parameter, the matching algorithm's checksum member - // must be populated with the algorithm's checksum of the request payload. - // - // The SDK will automatically compute the Content-MD5 checksum for this operation. - // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm - // to be used. - ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // Container for Payer. - // - // RequestPaymentConfiguration is a required field - RequestPaymentConfiguration *RequestPaymentConfiguration `locationName:"RequestPaymentConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketRequestPaymentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketRequestPaymentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutBucketRequestPaymentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutBucketRequestPaymentInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.RequestPaymentConfiguration == nil { - invalidParams.Add(request.NewErrParamRequired("RequestPaymentConfiguration")) - } - if s.RequestPaymentConfiguration != nil { - if err := s.RequestPaymentConfiguration.Validate(); err != nil { - invalidParams.AddNested("RequestPaymentConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *PutBucketRequestPaymentInput) SetBucket(v string) *PutBucketRequestPaymentInput { - s.Bucket = &v - return s -} - -func (s *PutBucketRequestPaymentInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *PutBucketRequestPaymentInput) SetChecksumAlgorithm(v string) *PutBucketRequestPaymentInput { - s.ChecksumAlgorithm = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *PutBucketRequestPaymentInput) SetExpectedBucketOwner(v string) *PutBucketRequestPaymentInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetRequestPaymentConfiguration sets the RequestPaymentConfiguration field's value. -func (s *PutBucketRequestPaymentInput) SetRequestPaymentConfiguration(v *RequestPaymentConfiguration) *PutBucketRequestPaymentInput { - s.RequestPaymentConfiguration = v - return s -} - -func (s *PutBucketRequestPaymentInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *PutBucketRequestPaymentInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s PutBucketRequestPaymentInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type PutBucketRequestPaymentOutput 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 PutBucketRequestPaymentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketRequestPaymentOutput) GoString() string { - return s.String() -} - -type PutBucketTaggingInput struct { - _ struct{} `locationName:"PutBucketTaggingRequest" type:"structure" payload:"Tagging"` - - // The bucket name. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // Indicates the algorithm used to create the checksum for the object when you - // use the SDK. This header will not provide any additional functionality if - // you don't use the SDK. When you send this header, there must be a corresponding - // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the - // request with the HTTP status code 400 Bad Request. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - // - // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm - // parameter. - // - // The AWS SDK for Go v1 does not support automatic computing request payload - // checksum. This feature is available in the AWS SDK for Go v2. If a value - // is specified for this parameter, the matching algorithm's checksum member - // must be populated with the algorithm's checksum of the request payload. - // - // The SDK will automatically compute the Content-MD5 checksum for this operation. - // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm - // to be used. - ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // Container for the TagSet and Tag elements. - // - // Tagging is a required field - Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketTaggingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketTaggingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutBucketTaggingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutBucketTaggingInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.Tagging == nil { - invalidParams.Add(request.NewErrParamRequired("Tagging")) - } - if s.Tagging != nil { - if err := s.Tagging.Validate(); err != nil { - invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *PutBucketTaggingInput) SetBucket(v string) *PutBucketTaggingInput { - s.Bucket = &v - return s -} - -func (s *PutBucketTaggingInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *PutBucketTaggingInput) SetChecksumAlgorithm(v string) *PutBucketTaggingInput { - s.ChecksumAlgorithm = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *PutBucketTaggingInput) SetExpectedBucketOwner(v string) *PutBucketTaggingInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetTagging sets the Tagging field's value. -func (s *PutBucketTaggingInput) SetTagging(v *Tagging) *PutBucketTaggingInput { - s.Tagging = v - return s -} - -func (s *PutBucketTaggingInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *PutBucketTaggingInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s PutBucketTaggingInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type PutBucketTaggingOutput 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 PutBucketTaggingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketTaggingOutput) GoString() string { - return s.String() -} - -type PutBucketVersioningInput struct { - _ struct{} `locationName:"PutBucketVersioningRequest" type:"structure" payload:"VersioningConfiguration"` - - // The bucket name. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // Indicates the algorithm used to create the checksum for the object when you - // use the SDK. This header will not provide any additional functionality if - // you don't use the SDK. When you send this header, there must be a corresponding - // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the - // request with the HTTP status code 400 Bad Request. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - // - // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm - // parameter. - // - // The AWS SDK for Go v1 does not support automatic computing request payload - // checksum. This feature is available in the AWS SDK for Go v2. If a value - // is specified for this parameter, the matching algorithm's checksum member - // must be populated with the algorithm's checksum of the request payload. - // - // The SDK will automatically compute the Content-MD5 checksum for this operation. - // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm - // to be used. - ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // The concatenation of the authentication device's serial number, a space, - // and the value that is displayed on your authentication device. - MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"` - - // Container for setting the versioning state. - // - // VersioningConfiguration is a required field - VersioningConfiguration *VersioningConfiguration `locationName:"VersioningConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketVersioningInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketVersioningInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutBucketVersioningInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutBucketVersioningInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.VersioningConfiguration == nil { - invalidParams.Add(request.NewErrParamRequired("VersioningConfiguration")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *PutBucketVersioningInput) SetBucket(v string) *PutBucketVersioningInput { - s.Bucket = &v - return s -} - -func (s *PutBucketVersioningInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *PutBucketVersioningInput) SetChecksumAlgorithm(v string) *PutBucketVersioningInput { - s.ChecksumAlgorithm = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *PutBucketVersioningInput) SetExpectedBucketOwner(v string) *PutBucketVersioningInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetMFA sets the MFA field's value. -func (s *PutBucketVersioningInput) SetMFA(v string) *PutBucketVersioningInput { - s.MFA = &v - return s -} - -// SetVersioningConfiguration sets the VersioningConfiguration field's value. -func (s *PutBucketVersioningInput) SetVersioningConfiguration(v *VersioningConfiguration) *PutBucketVersioningInput { - s.VersioningConfiguration = v - return s -} - -func (s *PutBucketVersioningInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *PutBucketVersioningInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s PutBucketVersioningInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type PutBucketVersioningOutput 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 PutBucketVersioningOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketVersioningOutput) GoString() string { - return s.String() -} - -type PutBucketWebsiteInput struct { - _ struct{} `locationName:"PutBucketWebsiteRequest" type:"structure" payload:"WebsiteConfiguration"` - - // The bucket name. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // Indicates the algorithm used to create the checksum for the object when you - // use the SDK. This header will not provide any additional functionality if - // you don't use the SDK. When you send this header, there must be a corresponding - // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the - // request with the HTTP status code 400 Bad Request. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - // - // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm - // parameter. - // - // The AWS SDK for Go v1 does not support automatic computing request payload - // checksum. This feature is available in the AWS SDK for Go v2. If a value - // is specified for this parameter, the matching algorithm's checksum member - // must be populated with the algorithm's checksum of the request payload. - // - // The SDK will automatically compute the Content-MD5 checksum for this operation. - // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm - // to be used. - ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // Container for the request. - // - // WebsiteConfiguration is a required field - WebsiteConfiguration *WebsiteConfiguration `locationName:"WebsiteConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketWebsiteInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketWebsiteInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutBucketWebsiteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutBucketWebsiteInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.WebsiteConfiguration == nil { - invalidParams.Add(request.NewErrParamRequired("WebsiteConfiguration")) - } - if s.WebsiteConfiguration != nil { - if err := s.WebsiteConfiguration.Validate(); err != nil { - invalidParams.AddNested("WebsiteConfiguration", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *PutBucketWebsiteInput) SetBucket(v string) *PutBucketWebsiteInput { - s.Bucket = &v - return s -} - -func (s *PutBucketWebsiteInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *PutBucketWebsiteInput) SetChecksumAlgorithm(v string) *PutBucketWebsiteInput { - s.ChecksumAlgorithm = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *PutBucketWebsiteInput) SetExpectedBucketOwner(v string) *PutBucketWebsiteInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetWebsiteConfiguration sets the WebsiteConfiguration field's value. -func (s *PutBucketWebsiteInput) SetWebsiteConfiguration(v *WebsiteConfiguration) *PutBucketWebsiteInput { - s.WebsiteConfiguration = v - return s -} - -func (s *PutBucketWebsiteInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *PutBucketWebsiteInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s PutBucketWebsiteInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type PutBucketWebsiteOutput 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 PutBucketWebsiteOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBucketWebsiteOutput) GoString() string { - return s.String() -} - -type PutObjectAclInput struct { - _ struct{} `locationName:"PutObjectAclRequest" type:"structure" payload:"AccessControlPolicy"` - - // The canned ACL to apply to the object. For more information, see Canned ACL - // (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL). - ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"` - - // Contains the elements that set the ACL permissions for an object per grantee. - AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` - - // The bucket name that contains the object to which you want to attach the - // ACL. - // - // Access points - When you use this action with an access point, you must provide - // the alias of the access point in place of the bucket name or specify the - // access point ARN. When using the access point ARN, you must direct requests - // to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this action with an access point through the Amazon Web Services - // SDKs, you provide the access point ARN in place of the bucket name. For more - // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. - // - // S3 on Outposts - When you use this action with Amazon S3 on Outposts, you - // must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname - // takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. - // When you use this action with S3 on Outposts through the Amazon Web Services - // SDKs, you provide the Outposts access point ARN in place of the bucket name. - // For more information about S3 on Outposts ARNs, see What is S3 on Outposts? - // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) - // in the Amazon S3 User Guide. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // Indicates the algorithm used to create the checksum for the object when you - // use the SDK. This header will not provide any additional functionality if - // you don't use the SDK. When you send this header, there must be a corresponding - // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the - // request with the HTTP status code 400 Bad Request. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - // - // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm - // parameter. - // - // The AWS SDK for Go v1 does not support automatic computing request payload - // checksum. This feature is available in the AWS SDK for Go v2. If a value - // is specified for this parameter, the matching algorithm's checksum member - // must be populated with the algorithm's checksum of the request payload. - // - // The SDK will automatically compute the Content-MD5 checksum for this operation. - // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm - // to be used. - ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // Allows grantee the read, write, read ACP, and write ACP permissions on the - // bucket. - // - // This functionality is not supported for Amazon S3 on Outposts. - GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"` - - // Allows grantee to list the objects in the bucket. - // - // This functionality is not supported for Amazon S3 on Outposts. - GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"` - - // Allows grantee to read the bucket ACL. - // - // This functionality is not supported for Amazon S3 on Outposts. - GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"` - - // Allows grantee to create new objects in the bucket. - // - // For the bucket and object owners of existing objects, also allows deletions - // and overwrites of those objects. - GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"` - - // Allows grantee to write the ACL for the applicable bucket. - // - // This functionality is not supported for Amazon S3 on Outposts. - GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"` - - // Key for which the PUT action was initiated. - // - // Key is a required field - Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - - // Confirms that the requester knows that they will be charged for the request. - // Bucket owners need not specify this parameter in their requests. If either - // the source or destination S3 bucket has Requester Pays enabled, the requester - // will pay for corresponding charges to copy the object. For information about - // downloading objects from Requester Pays buckets, see Downloading Objects - // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` - - // Version ID used to reference a specific version of the object. - // - // This functionality is not supported for directory buckets. - VersionId *string `location:"querystring" locationName:"versionId" 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 PutObjectAclInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutObjectAclInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutObjectAclInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutObjectAclInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - 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.AccessControlPolicy != nil { - if err := s.AccessControlPolicy.Validate(); err != nil { - invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetACL sets the ACL field's value. -func (s *PutObjectAclInput) SetACL(v string) *PutObjectAclInput { - s.ACL = &v - return s -} - -// SetAccessControlPolicy sets the AccessControlPolicy field's value. -func (s *PutObjectAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutObjectAclInput { - s.AccessControlPolicy = v - return s -} - -// SetBucket sets the Bucket field's value. -func (s *PutObjectAclInput) SetBucket(v string) *PutObjectAclInput { - s.Bucket = &v - return s -} - -func (s *PutObjectAclInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *PutObjectAclInput) SetChecksumAlgorithm(v string) *PutObjectAclInput { - s.ChecksumAlgorithm = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *PutObjectAclInput) SetExpectedBucketOwner(v string) *PutObjectAclInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetGrantFullControl sets the GrantFullControl field's value. -func (s *PutObjectAclInput) SetGrantFullControl(v string) *PutObjectAclInput { - s.GrantFullControl = &v - return s -} - -// SetGrantRead sets the GrantRead field's value. -func (s *PutObjectAclInput) SetGrantRead(v string) *PutObjectAclInput { - s.GrantRead = &v - return s -} - -// SetGrantReadACP sets the GrantReadACP field's value. -func (s *PutObjectAclInput) SetGrantReadACP(v string) *PutObjectAclInput { - s.GrantReadACP = &v - return s -} - -// SetGrantWrite sets the GrantWrite field's value. -func (s *PutObjectAclInput) SetGrantWrite(v string) *PutObjectAclInput { - s.GrantWrite = &v - return s -} - -// SetGrantWriteACP sets the GrantWriteACP field's value. -func (s *PutObjectAclInput) SetGrantWriteACP(v string) *PutObjectAclInput { - s.GrantWriteACP = &v - return s -} - -// SetKey sets the Key field's value. -func (s *PutObjectAclInput) SetKey(v string) *PutObjectAclInput { - s.Key = &v - return s -} - -// SetRequestPayer sets the RequestPayer field's value. -func (s *PutObjectAclInput) SetRequestPayer(v string) *PutObjectAclInput { - s.RequestPayer = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *PutObjectAclInput) SetVersionId(v string) *PutObjectAclInput { - s.VersionId = &v - return s -} - -func (s *PutObjectAclInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *PutObjectAclInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s PutObjectAclInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type PutObjectAclOutput struct { - _ struct{} `type:"structure"` - - // If present, indicates that the requester was successfully charged for the - // request. - // - // This functionality is not supported for directory buckets. - RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutObjectAclOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutObjectAclOutput) GoString() string { - return s.String() -} - -// SetRequestCharged sets the RequestCharged field's value. -func (s *PutObjectAclOutput) SetRequestCharged(v string) *PutObjectAclOutput { - s.RequestCharged = &v - return s -} - -type PutObjectInput struct { - _ struct{} `locationName:"PutObjectRequest" type:"structure" payload:"Body"` - - // The canned ACL to apply to the object. For more information, see Canned ACL - // (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL) - // in the Amazon S3 User Guide. - // - // When adding a new object, you can use headers to grant ACL-based permissions - // to individual Amazon Web Services accounts or to predefined groups defined - // by Amazon S3. These permissions are then added to the ACL on the object. - // By default, all objects are private. Only the owner has full access control. - // For more information, see Access Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html) - // and Managing ACLs Using the REST API (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html) - // in the Amazon S3 User Guide. - // - // If the bucket that you're uploading objects to uses the bucket owner enforced - // setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. - // Buckets that use this setting only accept PUT requests that don't specify - // an ACL or PUT requests that specify bucket owner full control ACLs, such - // as the bucket-owner-full-control canned ACL or an equivalent form of this - // ACL expressed in the XML format. PUT requests that contain other ACLs (for - // example, custom grants to certain Amazon Web Services accounts) fail and - // return a 400 error with the error code AccessControlListNotSupported. For - // more information, see Controlling ownership of objects and disabling ACLs - // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html) - // in the Amazon S3 User Guide. - // - // * This functionality is not supported for directory buckets. - // - // * This functionality is not supported for Amazon S3 on Outposts. - ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"` - - // Object data. - Body io.ReadSeeker `type:"blob"` - - // The bucket name to which the PUT action was initiated. - // - // Directory buckets - When you use this operation with a directory bucket, - // you must use virtual-hosted-style requests in the format Bucket_name.s3express-az_id.region.amazonaws.com. - // Path-style requests are not supported. Directory bucket names must be unique - // in the chosen Availability Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 - // (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about - // bucket naming restrictions, see Directory bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html) - // in the Amazon S3 User Guide. - // - // Access points - When you use this action with an access point, you must provide - // the alias of the access point in place of the bucket name or specify the - // access point ARN. When using the access point ARN, you must direct requests - // to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this action with an access point through the Amazon Web Services - // SDKs, you provide the access point ARN in place of the bucket name. For more - // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. - // - // Access points and Object Lambda access points are not supported by directory - // buckets. - // - // S3 on Outposts - When you use this action with Amazon S3 on Outposts, you - // must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname - // takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. - // When you use this action with S3 on Outposts through the Amazon Web Services - // SDKs, you provide the Outposts access point ARN in place of the bucket name. - // For more information about S3 on Outposts ARNs, see What is S3 on Outposts? - // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) - // in the Amazon S3 User Guide. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption - // with server-side encryption using Key Management Service (KMS) keys (SSE-KMS). - // Setting this header to true causes Amazon S3 to use an S3 Bucket Key for - // object encryption with SSE-KMS. - // - // Specifying this header with a PUT action doesn’t affect bucket-level settings - // for S3 Bucket Key. - // - // This functionality is not supported for directory buckets. - BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"` - - // Can be used to specify caching behavior along the request/reply chain. For - // more information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9 - // (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9). - CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"` - - // Indicates the algorithm used to create the checksum for the object when you - // use the SDK. This header will not provide any additional functionality if - // you don't use the SDK. When you send this header, there must be a corresponding - // x-amz-checksum-algorithm or x-amz-trailer header sent. Otherwise, Amazon - // S3 fails the request with the HTTP status code 400 Bad Request. - // - // For the x-amz-checksum-algorithm header, replace algorithm with the supported - // algorithm from the following list: - // - // * CRC32 - // - // * CRC32C - // - // * SHA1 - // - // * SHA256 - // - // For more information, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - // - // If the individual checksum value you provide through x-amz-checksum-algorithm - // doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, - // Amazon S3 ignores any provided ChecksumAlgorithm parameter and uses the checksum - // algorithm that matches the provided value in x-amz-checksum-algorithm . - // - // For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the - // default checksum algorithm that's used for performance. - // - // The AWS SDK for Go v1 does not support automatic computing request payload - // checksum. This feature is available in the AWS SDK for Go v2. If a value - // is specified for this parameter, the matching algorithm's checksum member - // must be populated with the algorithm's checksum of the request payload. - ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"` - - // This header can be used as a data integrity check to verify that the data - // received is the same data that was originally sent. This header specifies - // the base64-encoded, 32-bit CRC32 checksum of the object. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - ChecksumCRC32 *string `location:"header" locationName:"x-amz-checksum-crc32" type:"string"` - - // This header can be used as a data integrity check to verify that the data - // received is the same data that was originally sent. This header specifies - // the base64-encoded, 32-bit CRC32C checksum of the object. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - ChecksumCRC32C *string `location:"header" locationName:"x-amz-checksum-crc32c" type:"string"` - - // This header can be used as a data integrity check to verify that the data - // received is the same data that was originally sent. This header specifies - // the base64-encoded, 160-bit SHA-1 digest of the object. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - ChecksumSHA1 *string `location:"header" locationName:"x-amz-checksum-sha1" type:"string"` - - // This header can be used as a data integrity check to verify that the data - // received is the same data that was originally sent. This header specifies - // the base64-encoded, 256-bit SHA-256 digest of the object. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - ChecksumSHA256 *string `location:"header" locationName:"x-amz-checksum-sha256" type:"string"` - - // Specifies presentational information for the object. For more information, - // see https://www.rfc-editor.org/rfc/rfc6266#section-4 (https://www.rfc-editor.org/rfc/rfc6266#section-4). - ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"` - - // Specifies what content encodings have been applied to the object and thus - // what decoding mechanisms must be applied to obtain the media-type referenced - // by the Content-Type header field. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding - // (https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding). - ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"` - - // The language the content is in. - ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"` - - // Size of the body in bytes. This parameter is useful when the size of the - // body cannot be determined automatically. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length - // (https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length). - ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"` - - // The base64-encoded 128-bit MD5 digest of the message (without the headers) - // according to RFC 1864. This header can be used as a message integrity check - // to verify that the data is the same data that was originally sent. Although - // it is optional, we recommend using the Content-MD5 mechanism as an end-to-end - // integrity check. For more information about REST request authentication, - // see REST Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html). - // - // The Content-MD5 header is required for any request to upload an object with - // a retention period configured using Amazon S3 Object Lock. For more information - // about Amazon S3 Object Lock, see Amazon S3 Object Lock Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"` - - // A standard MIME type describing the format of the contents. For more information, - // see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type (https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type). - ContentType *string `location:"header" locationName:"Content-Type" type:"string"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // The date and time at which the object is no longer cacheable. For more information, - // see https://www.rfc-editor.org/rfc/rfc7234#section-5.3 (https://www.rfc-editor.org/rfc/rfc7234#section-5.3). - Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"` - - // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object. - // - // * This functionality is not supported for directory buckets. - // - // * This functionality is not supported for Amazon S3 on Outposts. - GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"` - - // Allows grantee to read the object data and its metadata. - // - // * This functionality is not supported for directory buckets. - // - // * This functionality is not supported for Amazon S3 on Outposts. - GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"` - - // Allows grantee to read the object ACL. - // - // * This functionality is not supported for directory buckets. - // - // * This functionality is not supported for Amazon S3 on Outposts. - GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"` - - // Allows grantee to write the ACL for the applicable object. - // - // * This functionality is not supported for directory buckets. - // - // * This functionality is not supported for Amazon S3 on Outposts. - GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"` - - // Object key for which the PUT action was initiated. - // - // Key is a required field - Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - - // A map of metadata to store with the object in S3. - Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"` - - // Specifies whether a legal hold will be applied to this object. For more information - // about S3 Object Lock, see Object Lock (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"` - - // The Object Lock mode that you want to apply to this object. - // - // This functionality is not supported for directory buckets. - ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"` - - // The date and time when you want this object's Object Lock to expire. Must - // be formatted as a timestamp parameter. - // - // This functionality is not supported for directory buckets. - ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"` - - // Confirms that the requester knows that they will be charged for the request. - // Bucket owners need not specify this parameter in their requests. If either - // the source or destination S3 bucket has Requester Pays enabled, the requester - // will pay for corresponding charges to copy the object. For information about - // downloading objects from Requester Pays buckets, see Downloading Objects - // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` - - // Specifies the algorithm to use when encrypting the object (for example, AES256). - // - // This functionality is not supported for directory buckets. - SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` - - // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting - // data. This value is used to store the object and then it is discarded; Amazon - // S3 does not store the encryption key. The key must be appropriate for use - // with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm - // header. - // - // This functionality is not supported for directory buckets. - // - // SSECustomerKey is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by PutObjectInput's - // String and GoString methods. - SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"` - - // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. - // Amazon S3 uses this header for a message integrity check to ensure that the - // encryption key was transmitted without error. - // - // This functionality is not supported for directory buckets. - SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` - - // Specifies the Amazon Web Services KMS Encryption Context to use for object - // encryption. The value of this header is a base64-encoded UTF-8 string holding - // JSON with the encryption context key-value pairs. This value is stored as - // object metadata and automatically gets passed on to Amazon Web Services KMS - // for future GetObject or CopyObject operations on this object. This value - // must be explicitly added during CopyObject operations. - // - // This functionality is not supported for directory buckets. - // - // SSEKMSEncryptionContext is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by PutObjectInput's - // String and GoString methods. - SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"` - - // If x-amz-server-side-encryption has a valid value of aws:kms or aws:kms:dsse, - // this header specifies the ID (Key ID, Key ARN, or Key Alias) of the Key Management - // Service (KMS) symmetric encryption customer managed key that was used for - // the object. If you specify x-amz-server-side-encryption:aws:kms or x-amz-server-side-encryption:aws:kms:dsse, - // but do not providex-amz-server-side-encryption-aws-kms-key-id, Amazon S3 - // uses the Amazon Web Services managed key (aws/s3) to protect the data. If - // the KMS key does not exist in the same account that's issuing the command, - // you must use the full ARN and not just the ID. - // - // This functionality is not supported for directory buckets. - // - // SSEKMSKeyId is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by PutObjectInput's - // String and GoString methods. - SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` - - // The server-side encryption algorithm that was used when you store this object - // in Amazon S3 (for example, AES256, aws:kms, aws:kms:dsse). - // - // General purpose buckets - You have four mutually exclusive options to protect - // data using server-side encryption in Amazon S3, depending on how you choose - // to manage the encryption keys. Specifically, the encryption key options are - // Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or - // DSSE-KMS), and customer-provided keys (SSE-C). Amazon S3 encrypts data with - // server-side encryption by using Amazon S3 managed keys (SSE-S3) by default. - // You can optionally tell Amazon S3 to encrypt data at rest by using server-side - // encryption with other key options. For more information, see Using Server-Side - // Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html) - // in the Amazon S3 User Guide. - // - // Directory buckets - For directory buckets, only the server-side encryption - // with Amazon S3 managed keys (SSE-S3) (AES256) value is supported. - ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"` - - // By default, Amazon S3 uses the STANDARD Storage Class to store newly created - // objects. The STANDARD storage class provides high durability and high availability. - // Depending on performance needs, you can specify a different Storage Class. - // For more information, see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html) - // in the Amazon S3 User Guide. - // - // * For directory buckets, only the S3 Express One Zone storage class is - // supported to store newly created objects. - // - // * Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. - StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"` - - // The tag-set for the object. The tag-set must be encoded as URL Query parameters. - // (For example, "Key1=Value1") - // - // This functionality is not supported for directory buckets. - Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"` - - // If the bucket is configured as a website, redirects requests for this object - // to another object in the same bucket or to an external URL. Amazon S3 stores - // the value of this header in the object metadata. For information about object - // metadata, see Object Key and Metadata (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html) - // in the Amazon S3 User Guide. - // - // In the following example, the request header sets the redirect to an object - // (anotherPage.html) in the same bucket: - // - // x-amz-website-redirect-location: /anotherPage.html - // - // In the following example, the request header sets the object redirect to - // another website: - // - // x-amz-website-redirect-location: http://www.example.com/ - // - // For more information about website hosting in Amazon S3, see Hosting Websites - // on Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html) - // and How to Configure Website Page Redirects (https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" 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 PutObjectInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutObjectInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutObjectInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutObjectInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - 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 -} - -// SetACL sets the ACL field's value. -func (s *PutObjectInput) SetACL(v string) *PutObjectInput { - s.ACL = &v - return s -} - -// SetBody sets the Body field's value. -func (s *PutObjectInput) SetBody(v io.ReadSeeker) *PutObjectInput { - s.Body = v - return s -} - -// SetBucket sets the Bucket field's value. -func (s *PutObjectInput) SetBucket(v string) *PutObjectInput { - s.Bucket = &v - return s -} - -func (s *PutObjectInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetBucketKeyEnabled sets the BucketKeyEnabled field's value. -func (s *PutObjectInput) SetBucketKeyEnabled(v bool) *PutObjectInput { - s.BucketKeyEnabled = &v - return s -} - -// SetCacheControl sets the CacheControl field's value. -func (s *PutObjectInput) SetCacheControl(v string) *PutObjectInput { - s.CacheControl = &v - return s -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *PutObjectInput) SetChecksumAlgorithm(v string) *PutObjectInput { - s.ChecksumAlgorithm = &v - return s -} - -// SetChecksumCRC32 sets the ChecksumCRC32 field's value. -func (s *PutObjectInput) SetChecksumCRC32(v string) *PutObjectInput { - s.ChecksumCRC32 = &v - return s -} - -// SetChecksumCRC32C sets the ChecksumCRC32C field's value. -func (s *PutObjectInput) SetChecksumCRC32C(v string) *PutObjectInput { - s.ChecksumCRC32C = &v - return s -} - -// SetChecksumSHA1 sets the ChecksumSHA1 field's value. -func (s *PutObjectInput) SetChecksumSHA1(v string) *PutObjectInput { - s.ChecksumSHA1 = &v - return s -} - -// SetChecksumSHA256 sets the ChecksumSHA256 field's value. -func (s *PutObjectInput) SetChecksumSHA256(v string) *PutObjectInput { - s.ChecksumSHA256 = &v - return s -} - -// SetContentDisposition sets the ContentDisposition field's value. -func (s *PutObjectInput) SetContentDisposition(v string) *PutObjectInput { - s.ContentDisposition = &v - return s -} - -// SetContentEncoding sets the ContentEncoding field's value. -func (s *PutObjectInput) SetContentEncoding(v string) *PutObjectInput { - s.ContentEncoding = &v - return s -} - -// SetContentLanguage sets the ContentLanguage field's value. -func (s *PutObjectInput) SetContentLanguage(v string) *PutObjectInput { - s.ContentLanguage = &v - return s -} - -// SetContentLength sets the ContentLength field's value. -func (s *PutObjectInput) SetContentLength(v int64) *PutObjectInput { - s.ContentLength = &v - return s -} - -// SetContentMD5 sets the ContentMD5 field's value. -func (s *PutObjectInput) SetContentMD5(v string) *PutObjectInput { - s.ContentMD5 = &v - return s -} - -// SetContentType sets the ContentType field's value. -func (s *PutObjectInput) SetContentType(v string) *PutObjectInput { - s.ContentType = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *PutObjectInput) SetExpectedBucketOwner(v string) *PutObjectInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetExpires sets the Expires field's value. -func (s *PutObjectInput) SetExpires(v time.Time) *PutObjectInput { - s.Expires = &v - return s -} - -// SetGrantFullControl sets the GrantFullControl field's value. -func (s *PutObjectInput) SetGrantFullControl(v string) *PutObjectInput { - s.GrantFullControl = &v - return s -} - -// SetGrantRead sets the GrantRead field's value. -func (s *PutObjectInput) SetGrantRead(v string) *PutObjectInput { - s.GrantRead = &v - return s -} - -// SetGrantReadACP sets the GrantReadACP field's value. -func (s *PutObjectInput) SetGrantReadACP(v string) *PutObjectInput { - s.GrantReadACP = &v - return s -} - -// SetGrantWriteACP sets the GrantWriteACP field's value. -func (s *PutObjectInput) SetGrantWriteACP(v string) *PutObjectInput { - s.GrantWriteACP = &v - return s -} - -// SetKey sets the Key field's value. -func (s *PutObjectInput) SetKey(v string) *PutObjectInput { - s.Key = &v - return s -} - -// SetMetadata sets the Metadata field's value. -func (s *PutObjectInput) SetMetadata(v map[string]*string) *PutObjectInput { - s.Metadata = v - return s -} - -// SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value. -func (s *PutObjectInput) SetObjectLockLegalHoldStatus(v string) *PutObjectInput { - s.ObjectLockLegalHoldStatus = &v - return s -} - -// SetObjectLockMode sets the ObjectLockMode field's value. -func (s *PutObjectInput) SetObjectLockMode(v string) *PutObjectInput { - s.ObjectLockMode = &v - return s -} - -// SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value. -func (s *PutObjectInput) SetObjectLockRetainUntilDate(v time.Time) *PutObjectInput { - s.ObjectLockRetainUntilDate = &v - return s -} - -// SetRequestPayer sets the RequestPayer field's value. -func (s *PutObjectInput) SetRequestPayer(v string) *PutObjectInput { - s.RequestPayer = &v - return s -} - -// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. -func (s *PutObjectInput) SetSSECustomerAlgorithm(v string) *PutObjectInput { - s.SSECustomerAlgorithm = &v - return s -} - -// SetSSECustomerKey sets the SSECustomerKey field's value. -func (s *PutObjectInput) SetSSECustomerKey(v string) *PutObjectInput { - s.SSECustomerKey = &v - return s -} - -func (s *PutObjectInput) getSSECustomerKey() (v string) { - if s.SSECustomerKey == nil { - return v - } - return *s.SSECustomerKey -} - -// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. -func (s *PutObjectInput) SetSSECustomerKeyMD5(v string) *PutObjectInput { - s.SSECustomerKeyMD5 = &v - return s -} - -// SetSSEKMSEncryptionContext sets the SSEKMSEncryptionContext field's value. -func (s *PutObjectInput) SetSSEKMSEncryptionContext(v string) *PutObjectInput { - s.SSEKMSEncryptionContext = &v - return s -} - -// SetSSEKMSKeyId sets the SSEKMSKeyId field's value. -func (s *PutObjectInput) SetSSEKMSKeyId(v string) *PutObjectInput { - s.SSEKMSKeyId = &v - return s -} - -// SetServerSideEncryption sets the ServerSideEncryption field's value. -func (s *PutObjectInput) SetServerSideEncryption(v string) *PutObjectInput { - s.ServerSideEncryption = &v - return s -} - -// SetStorageClass sets the StorageClass field's value. -func (s *PutObjectInput) SetStorageClass(v string) *PutObjectInput { - s.StorageClass = &v - return s -} - -// SetTagging sets the Tagging field's value. -func (s *PutObjectInput) SetTagging(v string) *PutObjectInput { - s.Tagging = &v - return s -} - -// SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value. -func (s *PutObjectInput) SetWebsiteRedirectLocation(v string) *PutObjectInput { - s.WebsiteRedirectLocation = &v - return s -} - -func (s *PutObjectInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *PutObjectInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s PutObjectInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type PutObjectLegalHoldInput struct { - _ struct{} `locationName:"PutObjectLegalHoldRequest" type:"structure" payload:"LegalHold"` - - // The bucket name containing the object that you want to place a legal hold - // on. - // - // Access points - When you use this action with an access point, you must provide - // the alias of the access point in place of the bucket name or specify the - // access point ARN. When using the access point ARN, you must direct requests - // to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this action with an access point through the Amazon Web Services - // SDKs, you provide the access point ARN in place of the bucket name. For more - // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // Indicates the algorithm used to create the checksum for the object when you - // use the SDK. This header will not provide any additional functionality if - // you don't use the SDK. When you send this header, there must be a corresponding - // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the - // request with the HTTP status code 400 Bad Request. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - // - // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm - // parameter. - // - // The AWS SDK for Go v1 does not support automatic computing request payload - // checksum. This feature is available in the AWS SDK for Go v2. If a value - // is specified for this parameter, the matching algorithm's checksum member - // must be populated with the algorithm's checksum of the request payload. - // - // The SDK will automatically compute the Content-MD5 checksum for this operation. - // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm - // to be used. - ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // The key name for the object that you want to place a legal hold on. - // - // Key is a required field - Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - - // Container element for the legal hold configuration you want to apply to the - // specified object. - LegalHold *ObjectLockLegalHold `locationName:"LegalHold" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` - - // Confirms that the requester knows that they will be charged for the request. - // Bucket owners need not specify this parameter in their requests. If either - // the source or destination S3 bucket has Requester Pays enabled, the requester - // will pay for corresponding charges to copy the object. For information about - // downloading objects from Requester Pays buckets, see Downloading Objects - // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` - - // The version ID of the object that you want to place a legal hold on. - VersionId *string `location:"querystring" locationName:"versionId" 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 PutObjectLegalHoldInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutObjectLegalHoldInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutObjectLegalHoldInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutObjectLegalHoldInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - 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 -} - -// SetBucket sets the Bucket field's value. -func (s *PutObjectLegalHoldInput) SetBucket(v string) *PutObjectLegalHoldInput { - s.Bucket = &v - return s -} - -func (s *PutObjectLegalHoldInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *PutObjectLegalHoldInput) SetChecksumAlgorithm(v string) *PutObjectLegalHoldInput { - s.ChecksumAlgorithm = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *PutObjectLegalHoldInput) SetExpectedBucketOwner(v string) *PutObjectLegalHoldInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetKey sets the Key field's value. -func (s *PutObjectLegalHoldInput) SetKey(v string) *PutObjectLegalHoldInput { - s.Key = &v - return s -} - -// SetLegalHold sets the LegalHold field's value. -func (s *PutObjectLegalHoldInput) SetLegalHold(v *ObjectLockLegalHold) *PutObjectLegalHoldInput { - s.LegalHold = v - return s -} - -// SetRequestPayer sets the RequestPayer field's value. -func (s *PutObjectLegalHoldInput) SetRequestPayer(v string) *PutObjectLegalHoldInput { - s.RequestPayer = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *PutObjectLegalHoldInput) SetVersionId(v string) *PutObjectLegalHoldInput { - s.VersionId = &v - return s -} - -func (s *PutObjectLegalHoldInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *PutObjectLegalHoldInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s PutObjectLegalHoldInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type PutObjectLegalHoldOutput struct { - _ struct{} `type:"structure"` - - // If present, indicates that the requester was successfully charged for the - // request. - // - // This functionality is not supported for directory buckets. - RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutObjectLegalHoldOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutObjectLegalHoldOutput) GoString() string { - return s.String() -} - -// SetRequestCharged sets the RequestCharged field's value. -func (s *PutObjectLegalHoldOutput) SetRequestCharged(v string) *PutObjectLegalHoldOutput { - s.RequestCharged = &v - return s -} - -type PutObjectLockConfigurationInput struct { - _ struct{} `locationName:"PutObjectLockConfigurationRequest" type:"structure" payload:"ObjectLockConfiguration"` - - // The bucket whose Object Lock configuration you want to create or replace. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // Indicates the algorithm used to create the checksum for the object when you - // use the SDK. This header will not provide any additional functionality if - // you don't use the SDK. When you send this header, there must be a corresponding - // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the - // request with the HTTP status code 400 Bad Request. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - // - // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm - // parameter. - // - // The AWS SDK for Go v1 does not support automatic computing request payload - // checksum. This feature is available in the AWS SDK for Go v2. If a value - // is specified for this parameter, the matching algorithm's checksum member - // must be populated with the algorithm's checksum of the request payload. - // - // The SDK will automatically compute the Content-MD5 checksum for this operation. - // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm - // to be used. - ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // The Object Lock configuration that you want to apply to the specified bucket. - ObjectLockConfiguration *ObjectLockConfiguration `locationName:"ObjectLockConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` - - // Confirms that the requester knows that they will be charged for the request. - // Bucket owners need not specify this parameter in their requests. If either - // the source or destination S3 bucket has Requester Pays enabled, the requester - // will pay for corresponding charges to copy the object. For information about - // downloading objects from Requester Pays buckets, see Downloading Objects - // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` - - // A token to allow Object Lock to be enabled for an existing bucket. - Token *string `location:"header" locationName:"x-amz-bucket-object-lock-token" 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 PutObjectLockConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutObjectLockConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutObjectLockConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutObjectLockConfigurationInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *PutObjectLockConfigurationInput) SetBucket(v string) *PutObjectLockConfigurationInput { - s.Bucket = &v - return s -} - -func (s *PutObjectLockConfigurationInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *PutObjectLockConfigurationInput) SetChecksumAlgorithm(v string) *PutObjectLockConfigurationInput { - s.ChecksumAlgorithm = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *PutObjectLockConfigurationInput) SetExpectedBucketOwner(v string) *PutObjectLockConfigurationInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetObjectLockConfiguration sets the ObjectLockConfiguration field's value. -func (s *PutObjectLockConfigurationInput) SetObjectLockConfiguration(v *ObjectLockConfiguration) *PutObjectLockConfigurationInput { - s.ObjectLockConfiguration = v - return s -} - -// SetRequestPayer sets the RequestPayer field's value. -func (s *PutObjectLockConfigurationInput) SetRequestPayer(v string) *PutObjectLockConfigurationInput { - s.RequestPayer = &v - return s -} - -// SetToken sets the Token field's value. -func (s *PutObjectLockConfigurationInput) SetToken(v string) *PutObjectLockConfigurationInput { - s.Token = &v - return s -} - -func (s *PutObjectLockConfigurationInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *PutObjectLockConfigurationInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s PutObjectLockConfigurationInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type PutObjectLockConfigurationOutput struct { - _ struct{} `type:"structure"` - - // If present, indicates that the requester was successfully charged for the - // request. - // - // This functionality is not supported for directory buckets. - RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutObjectLockConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutObjectLockConfigurationOutput) GoString() string { - return s.String() -} - -// SetRequestCharged sets the RequestCharged field's value. -func (s *PutObjectLockConfigurationOutput) SetRequestCharged(v string) *PutObjectLockConfigurationOutput { - s.RequestCharged = &v - return s -} - -type PutObjectOutput struct { - _ struct{} `type:"structure"` - - // Indicates whether the uploaded object uses an S3 Bucket Key for server-side - // encryption with Key Management Service (KMS) keys (SSE-KMS). - // - // This functionality is not supported for directory buckets. - BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"` - - // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be - // present if it was uploaded with the object. When you use an API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumCRC32 *string `location:"header" locationName:"x-amz-checksum-crc32" type:"string"` - - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only - // be present if it was uploaded with the object. When you use an API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumCRC32C *string `location:"header" locationName:"x-amz-checksum-crc32c" type:"string"` - - // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be - // present if it was uploaded with the object. When you use the API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumSHA1 *string `location:"header" locationName:"x-amz-checksum-sha1" type:"string"` - - // The base64-encoded, 256-bit SHA-256 digest of the object. This will only - // be present if it was uploaded with the object. When you use an API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumSHA256 *string `location:"header" locationName:"x-amz-checksum-sha256" type:"string"` - - // Entity tag for the uploaded object. - // - // General purpose buckets - To ensure that data is not corrupted traversing - // the network, for objects where the ETag is the MD5 digest of the object, - // you can calculate the MD5 while putting an object to Amazon S3 and compare - // the returned ETag to the calculated MD5 value. - // - // Directory buckets - The ETag for the object in a directory bucket isn't the - // MD5 digest of the object. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // If the expiration is configured for the object (see PutBucketLifecycleConfiguration - // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)) - // in the Amazon S3 User Guide, the response includes this header. It includes - // the expiry-date and rule-id key-value pairs that provide information about - // object expiration. The value of the rule-id is URL-encoded. - // - // This functionality is not supported for directory buckets. - Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"` - - // If present, indicates that the requester was successfully charged for the - // request. - // - // This functionality is not supported for directory buckets. - RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` - - // If server-side encryption with a customer-provided encryption key was requested, - // the response will include this header to confirm the encryption algorithm - // that's used. - // - // This functionality is not supported for directory buckets. - SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` - - // If server-side encryption with a customer-provided encryption key was requested, - // the response will include this header to provide the round-trip message integrity - // verification of the customer-provided encryption key. - // - // This functionality is not supported for directory buckets. - SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` - - // If present, indicates the Amazon Web Services KMS Encryption Context to use - // for object encryption. The value of this header is a base64-encoded UTF-8 - // string holding JSON with the encryption context key-value pairs. This value - // is stored as object metadata and automatically gets passed on to Amazon Web - // Services KMS for future GetObject or CopyObject operations on this object. - // - // This functionality is not supported for directory buckets. - // - // SSEKMSEncryptionContext is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by PutObjectOutput's - // String and GoString methods. - SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"` - - // If x-amz-server-side-encryption has a valid value of aws:kms or aws:kms:dsse, - // this header indicates the ID of the Key Management Service (KMS) symmetric - // encryption customer managed key that was used for the object. - // - // This functionality is not supported for directory buckets. - // - // SSEKMSKeyId is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by PutObjectOutput's - // String and GoString methods. - SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` - - // The server-side encryption algorithm used when you store this object in Amazon - // S3 (for example, AES256, aws:kms, aws:kms:dsse). - // - // For directory buckets, only server-side encryption with Amazon S3 managed - // keys (SSE-S3) (AES256) is supported. - ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"` - - // Version ID of the object. - // - // If you enable versioning for a bucket, Amazon S3 automatically generates - // a unique version ID for the object being stored. Amazon S3 returns this ID - // in the response. When you enable versioning for a bucket, if Amazon S3 receives - // multiple write requests for the same object simultaneously, it stores all - // of the objects. For more information about versioning, see Adding Objects - // to Versioning-Enabled Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/AddingObjectstoVersioningEnabledBuckets.html) - // in the Amazon S3 User Guide. For information about returning the versioning - // state of a bucket, see GetBucketVersioning (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html). - // - // This functionality is not supported for directory buckets. - VersionId *string `location:"header" locationName:"x-amz-version-id" 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 PutObjectOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutObjectOutput) GoString() string { - return s.String() -} - -// SetBucketKeyEnabled sets the BucketKeyEnabled field's value. -func (s *PutObjectOutput) SetBucketKeyEnabled(v bool) *PutObjectOutput { - s.BucketKeyEnabled = &v - return s -} - -// SetChecksumCRC32 sets the ChecksumCRC32 field's value. -func (s *PutObjectOutput) SetChecksumCRC32(v string) *PutObjectOutput { - s.ChecksumCRC32 = &v - return s -} - -// SetChecksumCRC32C sets the ChecksumCRC32C field's value. -func (s *PutObjectOutput) SetChecksumCRC32C(v string) *PutObjectOutput { - s.ChecksumCRC32C = &v - return s -} - -// SetChecksumSHA1 sets the ChecksumSHA1 field's value. -func (s *PutObjectOutput) SetChecksumSHA1(v string) *PutObjectOutput { - s.ChecksumSHA1 = &v - return s -} - -// SetChecksumSHA256 sets the ChecksumSHA256 field's value. -func (s *PutObjectOutput) SetChecksumSHA256(v string) *PutObjectOutput { - s.ChecksumSHA256 = &v - return s -} - -// SetETag sets the ETag field's value. -func (s *PutObjectOutput) SetETag(v string) *PutObjectOutput { - s.ETag = &v - return s -} - -// SetExpiration sets the Expiration field's value. -func (s *PutObjectOutput) SetExpiration(v string) *PutObjectOutput { - s.Expiration = &v - return s -} - -// SetRequestCharged sets the RequestCharged field's value. -func (s *PutObjectOutput) SetRequestCharged(v string) *PutObjectOutput { - s.RequestCharged = &v - return s -} - -// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. -func (s *PutObjectOutput) SetSSECustomerAlgorithm(v string) *PutObjectOutput { - s.SSECustomerAlgorithm = &v - return s -} - -// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. -func (s *PutObjectOutput) SetSSECustomerKeyMD5(v string) *PutObjectOutput { - s.SSECustomerKeyMD5 = &v - return s -} - -// SetSSEKMSEncryptionContext sets the SSEKMSEncryptionContext field's value. -func (s *PutObjectOutput) SetSSEKMSEncryptionContext(v string) *PutObjectOutput { - s.SSEKMSEncryptionContext = &v - return s -} - -// SetSSEKMSKeyId sets the SSEKMSKeyId field's value. -func (s *PutObjectOutput) SetSSEKMSKeyId(v string) *PutObjectOutput { - s.SSEKMSKeyId = &v - return s -} - -// SetServerSideEncryption sets the ServerSideEncryption field's value. -func (s *PutObjectOutput) SetServerSideEncryption(v string) *PutObjectOutput { - s.ServerSideEncryption = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *PutObjectOutput) SetVersionId(v string) *PutObjectOutput { - s.VersionId = &v - return s -} - -type PutObjectRetentionInput struct { - _ struct{} `locationName:"PutObjectRetentionRequest" type:"structure" payload:"Retention"` - - // The bucket name that contains the object you want to apply this Object Retention - // configuration to. - // - // Access points - When you use this action with an access point, you must provide - // the alias of the access point in place of the bucket name or specify the - // access point ARN. When using the access point ARN, you must direct requests - // to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this action with an access point through the Amazon Web Services - // SDKs, you provide the access point ARN in place of the bucket name. For more - // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // Indicates whether this action should bypass Governance-mode restrictions. - BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"` - - // Indicates the algorithm used to create the checksum for the object when you - // use the SDK. This header will not provide any additional functionality if - // you don't use the SDK. When you send this header, there must be a corresponding - // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the - // request with the HTTP status code 400 Bad Request. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - // - // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm - // parameter. - // - // The AWS SDK for Go v1 does not support automatic computing request payload - // checksum. This feature is available in the AWS SDK for Go v2. If a value - // is specified for this parameter, the matching algorithm's checksum member - // must be populated with the algorithm's checksum of the request payload. - // - // The SDK will automatically compute the Content-MD5 checksum for this operation. - // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm - // to be used. - ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // The key name for the object that you want to apply this Object Retention - // configuration to. - // - // Key is a required field - Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - - // Confirms that the requester knows that they will be charged for the request. - // Bucket owners need not specify this parameter in their requests. If either - // the source or destination S3 bucket has Requester Pays enabled, the requester - // will pay for corresponding charges to copy the object. For information about - // downloading objects from Requester Pays buckets, see Downloading Objects - // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` - - // The container element for the Object Retention configuration. - Retention *ObjectLockRetention `locationName:"Retention" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` - - // The version ID for the object that you want to apply this Object Retention - // configuration to. - VersionId *string `location:"querystring" locationName:"versionId" 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 PutObjectRetentionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutObjectRetentionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutObjectRetentionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutObjectRetentionInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - 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 -} - -// SetBucket sets the Bucket field's value. -func (s *PutObjectRetentionInput) SetBucket(v string) *PutObjectRetentionInput { - s.Bucket = &v - return s -} - -func (s *PutObjectRetentionInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetBypassGovernanceRetention sets the BypassGovernanceRetention field's value. -func (s *PutObjectRetentionInput) SetBypassGovernanceRetention(v bool) *PutObjectRetentionInput { - s.BypassGovernanceRetention = &v - return s -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *PutObjectRetentionInput) SetChecksumAlgorithm(v string) *PutObjectRetentionInput { - s.ChecksumAlgorithm = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *PutObjectRetentionInput) SetExpectedBucketOwner(v string) *PutObjectRetentionInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetKey sets the Key field's value. -func (s *PutObjectRetentionInput) SetKey(v string) *PutObjectRetentionInput { - s.Key = &v - return s -} - -// SetRequestPayer sets the RequestPayer field's value. -func (s *PutObjectRetentionInput) SetRequestPayer(v string) *PutObjectRetentionInput { - s.RequestPayer = &v - return s -} - -// SetRetention sets the Retention field's value. -func (s *PutObjectRetentionInput) SetRetention(v *ObjectLockRetention) *PutObjectRetentionInput { - s.Retention = v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *PutObjectRetentionInput) SetVersionId(v string) *PutObjectRetentionInput { - s.VersionId = &v - return s -} - -func (s *PutObjectRetentionInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *PutObjectRetentionInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s PutObjectRetentionInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type PutObjectRetentionOutput struct { - _ struct{} `type:"structure"` - - // If present, indicates that the requester was successfully charged for the - // request. - // - // This functionality is not supported for directory buckets. - RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutObjectRetentionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutObjectRetentionOutput) GoString() string { - return s.String() -} - -// SetRequestCharged sets the RequestCharged field's value. -func (s *PutObjectRetentionOutput) SetRequestCharged(v string) *PutObjectRetentionOutput { - s.RequestCharged = &v - return s -} - -type PutObjectTaggingInput struct { - _ struct{} `locationName:"PutObjectTaggingRequest" type:"structure" payload:"Tagging"` - - // The bucket name containing the object. - // - // Access points - When you use this action with an access point, you must provide - // the alias of the access point in place of the bucket name or specify the - // access point ARN. When using the access point ARN, you must direct requests - // to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this action with an access point through the Amazon Web Services - // SDKs, you provide the access point ARN in place of the bucket name. For more - // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. - // - // S3 on Outposts - When you use this action with Amazon S3 on Outposts, you - // must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname - // takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. - // When you use this action with S3 on Outposts through the Amazon Web Services - // SDKs, you provide the Outposts access point ARN in place of the bucket name. - // For more information about S3 on Outposts ARNs, see What is S3 on Outposts? - // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) - // in the Amazon S3 User Guide. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // Indicates the algorithm used to create the checksum for the object when you - // use the SDK. This header will not provide any additional functionality if - // you don't use the SDK. When you send this header, there must be a corresponding - // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the - // request with the HTTP status code 400 Bad Request. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - // - // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm - // parameter. - // - // The AWS SDK for Go v1 does not support automatic computing request payload - // checksum. This feature is available in the AWS SDK for Go v2. If a value - // is specified for this parameter, the matching algorithm's checksum member - // must be populated with the algorithm's checksum of the request payload. - // - // The SDK will automatically compute the Content-MD5 checksum for this operation. - // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm - // to be used. - ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // Name of the object key. - // - // Key is a required field - Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - - // Confirms that the requester knows that they will be charged for the request. - // Bucket owners need not specify this parameter in their requests. If either - // the source or destination S3 bucket has Requester Pays enabled, the requester - // will pay for corresponding charges to copy the object. For information about - // downloading objects from Requester Pays buckets, see Downloading Objects - // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` - - // Container for the TagSet and Tag elements - // - // Tagging is a required field - Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` - - // The versionId of the object that the tag-set will be added to. - VersionId *string `location:"querystring" locationName:"versionId" 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 PutObjectTaggingInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutObjectTaggingInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutObjectTaggingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutObjectTaggingInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - 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.Tagging == nil { - invalidParams.Add(request.NewErrParamRequired("Tagging")) - } - if s.Tagging != nil { - if err := s.Tagging.Validate(); err != nil { - invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *PutObjectTaggingInput) SetBucket(v string) *PutObjectTaggingInput { - s.Bucket = &v - return s -} - -func (s *PutObjectTaggingInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *PutObjectTaggingInput) SetChecksumAlgorithm(v string) *PutObjectTaggingInput { - s.ChecksumAlgorithm = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *PutObjectTaggingInput) SetExpectedBucketOwner(v string) *PutObjectTaggingInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetKey sets the Key field's value. -func (s *PutObjectTaggingInput) SetKey(v string) *PutObjectTaggingInput { - s.Key = &v - return s -} - -// SetRequestPayer sets the RequestPayer field's value. -func (s *PutObjectTaggingInput) SetRequestPayer(v string) *PutObjectTaggingInput { - s.RequestPayer = &v - return s -} - -// SetTagging sets the Tagging field's value. -func (s *PutObjectTaggingInput) SetTagging(v *Tagging) *PutObjectTaggingInput { - s.Tagging = v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *PutObjectTaggingInput) SetVersionId(v string) *PutObjectTaggingInput { - s.VersionId = &v - return s -} - -func (s *PutObjectTaggingInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *PutObjectTaggingInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s PutObjectTaggingInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type PutObjectTaggingOutput struct { - _ struct{} `type:"structure"` - - // The versionId of the object the tag-set was added to. - VersionId *string `location:"header" locationName:"x-amz-version-id" 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 PutObjectTaggingOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutObjectTaggingOutput) GoString() string { - return s.String() -} - -// SetVersionId sets the VersionId field's value. -func (s *PutObjectTaggingOutput) SetVersionId(v string) *PutObjectTaggingOutput { - s.VersionId = &v - return s -} - -type PutPublicAccessBlockInput struct { - _ struct{} `locationName:"PutPublicAccessBlockRequest" type:"structure" payload:"PublicAccessBlockConfiguration"` - - // The name of the Amazon S3 bucket whose PublicAccessBlock configuration you - // want to set. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // Indicates the algorithm used to create the checksum for the object when you - // use the SDK. This header will not provide any additional functionality if - // you don't use the SDK. When you send this header, there must be a corresponding - // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the - // request with the HTTP status code 400 Bad Request. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - // - // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm - // parameter. - // - // The AWS SDK for Go v1 does not support automatic computing request payload - // checksum. This feature is available in the AWS SDK for Go v2. If a value - // is specified for this parameter, the matching algorithm's checksum member - // must be populated with the algorithm's checksum of the request payload. - // - // The SDK will automatically compute the Content-MD5 checksum for this operation. - // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm - // to be used. - ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // The PublicAccessBlock configuration that you want to apply to this Amazon - // S3 bucket. You can enable the configuration options in any combination. For - // more information about when Amazon S3 considers a bucket or object public, - // see The Meaning of "Public" (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status) - // in the Amazon S3 User Guide. - // - // PublicAccessBlockConfiguration is a required field - PublicAccessBlockConfiguration *PublicAccessBlockConfiguration `locationName:"PublicAccessBlockConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutPublicAccessBlockInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutPublicAccessBlockInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutPublicAccessBlockInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutPublicAccessBlockInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.PublicAccessBlockConfiguration == nil { - invalidParams.Add(request.NewErrParamRequired("PublicAccessBlockConfiguration")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *PutPublicAccessBlockInput) SetBucket(v string) *PutPublicAccessBlockInput { - s.Bucket = &v - return s -} - -func (s *PutPublicAccessBlockInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *PutPublicAccessBlockInput) SetChecksumAlgorithm(v string) *PutPublicAccessBlockInput { - s.ChecksumAlgorithm = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *PutPublicAccessBlockInput) SetExpectedBucketOwner(v string) *PutPublicAccessBlockInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetPublicAccessBlockConfiguration sets the PublicAccessBlockConfiguration field's value. -func (s *PutPublicAccessBlockInput) SetPublicAccessBlockConfiguration(v *PublicAccessBlockConfiguration) *PutPublicAccessBlockInput { - s.PublicAccessBlockConfiguration = v - return s -} - -func (s *PutPublicAccessBlockInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *PutPublicAccessBlockInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s PutPublicAccessBlockInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type PutPublicAccessBlockOutput 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 PutPublicAccessBlockOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutPublicAccessBlockOutput) GoString() string { - return s.String() -} - -// Specifies the configuration for publishing messages to an Amazon Simple Queue -// Service (Amazon SQS) queue when Amazon S3 detects specified events. -type QueueConfiguration struct { - _ struct{} `type:"structure"` - - // A collection of bucket events for which to send notifications - // - // Events is a required field - Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true" enum:"Event"` - - // Specifies object key name filtering rules. For information about key name - // filtering, see Configuring event notifications using object key name filtering - // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/notification-how-to-filtering.html) - // in the Amazon S3 User Guide. - Filter *NotificationConfigurationFilter `type:"structure"` - - // An optional unique identifier for configurations in a notification configuration. - // If you don't provide one, Amazon S3 will assign an ID. - Id *string `type:"string"` - - // The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3 - // publishes a message when it detects events of the specified type. - // - // QueueArn is a required field - QueueArn *string `locationName:"Queue" 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 QueueConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s QueueConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *QueueConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "QueueConfiguration"} - if s.Events == nil { - invalidParams.Add(request.NewErrParamRequired("Events")) - } - if s.QueueArn == nil { - invalidParams.Add(request.NewErrParamRequired("QueueArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEvents sets the Events field's value. -func (s *QueueConfiguration) SetEvents(v []*string) *QueueConfiguration { - s.Events = v - return s -} - -// SetFilter sets the Filter field's value. -func (s *QueueConfiguration) SetFilter(v *NotificationConfigurationFilter) *QueueConfiguration { - s.Filter = v - return s -} - -// SetId sets the Id field's value. -func (s *QueueConfiguration) SetId(v string) *QueueConfiguration { - s.Id = &v - return s -} - -// SetQueueArn sets the QueueArn field's value. -func (s *QueueConfiguration) SetQueueArn(v string) *QueueConfiguration { - s.QueueArn = &v - return s -} - -// This data type is deprecated. Use QueueConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_QueueConfiguration.html) -// for the same purposes. This data type specifies the configuration for publishing -// messages to an Amazon Simple Queue Service (Amazon SQS) queue when Amazon -// S3 detects specified events. -type QueueConfigurationDeprecated struct { - _ struct{} `type:"structure"` - - // The bucket event for which to send notifications. - // - // Deprecated: Event has been deprecated - Event *string `deprecated:"true" type:"string" enum:"Event"` - - // A collection of bucket events for which to send notifications. - Events []*string `locationName:"Event" type:"list" flattened:"true" enum:"Event"` - - // An optional unique identifier for configurations in a notification configuration. - // If you don't provide one, Amazon S3 will assign an ID. - Id *string `type:"string"` - - // The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3 - // publishes a message when it detects events of the specified type. - Queue *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 QueueConfigurationDeprecated) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s QueueConfigurationDeprecated) GoString() string { - return s.String() -} - -// SetEvent sets the Event field's value. -func (s *QueueConfigurationDeprecated) SetEvent(v string) *QueueConfigurationDeprecated { - s.Event = &v - return s -} - -// SetEvents sets the Events field's value. -func (s *QueueConfigurationDeprecated) SetEvents(v []*string) *QueueConfigurationDeprecated { - s.Events = v - return s -} - -// SetId sets the Id field's value. -func (s *QueueConfigurationDeprecated) SetId(v string) *QueueConfigurationDeprecated { - s.Id = &v - return s -} - -// SetQueue sets the Queue field's value. -func (s *QueueConfigurationDeprecated) SetQueue(v string) *QueueConfigurationDeprecated { - s.Queue = &v - return s -} - -// The container for the records event. -type RecordsEvent struct { - _ struct{} `locationName:"RecordsEvent" type:"structure" payload:"Payload"` - - // The byte array of partial, one or more result records. - // Payload is automatically base64 encoded/decoded by the SDK. - Payload []byte `type:"blob"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RecordsEvent) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RecordsEvent) GoString() string { - return s.String() -} - -// SetPayload sets the Payload field's value. -func (s *RecordsEvent) SetPayload(v []byte) *RecordsEvent { - s.Payload = v - return s -} - -// The RecordsEvent is and event in the SelectObjectContentEventStream group of events. -func (s *RecordsEvent) eventSelectObjectContentEventStream() {} - -// UnmarshalEvent unmarshals the EventStream Message into the RecordsEvent value. -// This method is only used internally within the SDK's EventStream handling. -func (s *RecordsEvent) UnmarshalEvent( - payloadUnmarshaler protocol.PayloadUnmarshaler, - msg eventstream.Message, -) error { - s.Payload = make([]byte, len(msg.Payload)) - copy(s.Payload, msg.Payload) - return nil -} - -// MarshalEvent marshals the type into an stream event value. This method -// should only used internally within the SDK's EventStream handling. -func (s *RecordsEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { - msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) - msg.Headers.Set(":content-type", eventstream.StringValue("application/octet-stream")) - msg.Payload = s.Payload - return msg, err -} - -// Specifies how requests are redirected. In the event of an error, you can -// specify a different error code to return. -type Redirect struct { - _ struct{} `type:"structure"` - - // The host name to use in the redirect request. - HostName *string `type:"string"` - - // The HTTP redirect code to use on the response. Not required if one of the - // siblings is present. - HttpRedirectCode *string `type:"string"` - - // Protocol to use when redirecting requests. The default is the protocol that - // is used in the original request. - Protocol *string `type:"string" enum:"Protocol"` - - // The object key prefix to use in the redirect request. For example, to redirect - // requests for all pages with prefix docs/ (objects in the docs/ folder) to - // documents/, you can set a condition block with KeyPrefixEquals set to docs/ - // and in the Redirect set ReplaceKeyPrefixWith to /documents. Not required - // if one of the siblings is present. Can be present only if ReplaceKeyWith - // is not provided. - // - // Replacement must be made for object keys containing special characters (such - // as carriage returns) when using XML requests. For more information, see XML - // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints). - ReplaceKeyPrefixWith *string `type:"string"` - - // The specific object key to use in the redirect request. For example, redirect - // request to error.html. Not required if one of the siblings is present. Can - // be present only if ReplaceKeyPrefixWith is not provided. - // - // Replacement must be made for object keys containing special characters (such - // as carriage returns) when using XML requests. For more information, see XML - // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints). - ReplaceKeyWith *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 Redirect) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Redirect) GoString() string { - return s.String() -} - -// SetHostName sets the HostName field's value. -func (s *Redirect) SetHostName(v string) *Redirect { - s.HostName = &v - return s -} - -// SetHttpRedirectCode sets the HttpRedirectCode field's value. -func (s *Redirect) SetHttpRedirectCode(v string) *Redirect { - s.HttpRedirectCode = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *Redirect) SetProtocol(v string) *Redirect { - s.Protocol = &v - return s -} - -// SetReplaceKeyPrefixWith sets the ReplaceKeyPrefixWith field's value. -func (s *Redirect) SetReplaceKeyPrefixWith(v string) *Redirect { - s.ReplaceKeyPrefixWith = &v - return s -} - -// SetReplaceKeyWith sets the ReplaceKeyWith field's value. -func (s *Redirect) SetReplaceKeyWith(v string) *Redirect { - s.ReplaceKeyWith = &v - return s -} - -// Specifies the redirect behavior of all requests to a website endpoint of -// an Amazon S3 bucket. -type RedirectAllRequestsTo struct { - _ struct{} `type:"structure"` - - // Name of the host where requests are redirected. - // - // HostName is a required field - HostName *string `type:"string" required:"true"` - - // Protocol to use when redirecting requests. The default is the protocol that - // is used in the original request. - Protocol *string `type:"string" enum:"Protocol"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RedirectAllRequestsTo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RedirectAllRequestsTo) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RedirectAllRequestsTo) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RedirectAllRequestsTo"} - if s.HostName == nil { - invalidParams.Add(request.NewErrParamRequired("HostName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHostName sets the HostName field's value. -func (s *RedirectAllRequestsTo) SetHostName(v string) *RedirectAllRequestsTo { - s.HostName = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *RedirectAllRequestsTo) SetProtocol(v string) *RedirectAllRequestsTo { - s.Protocol = &v - return s -} - -// A filter that you can specify for selection for modifications on replicas. -// Amazon S3 doesn't replicate replica modifications by default. In the latest -// version of replication configuration (when Filter is specified), you can -// specify this element and set the status to Enabled to replicate modifications -// on replicas. -// -// If you don't specify the Filter element, Amazon S3 assumes that the replication -// configuration is the earlier version, V1. In the earlier version, this element -// is not allowed. -type ReplicaModifications struct { - _ struct{} `type:"structure"` - - // Specifies whether Amazon S3 replicates modifications on replicas. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"ReplicaModificationsStatus"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ReplicaModifications) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ReplicaModifications) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReplicaModifications) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReplicaModifications"} - 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 *ReplicaModifications) SetStatus(v string) *ReplicaModifications { - s.Status = &v - return s -} - -// A container for replication rules. You can add up to 1,000 rules. The maximum -// size of a replication configuration is 2 MB. -type ReplicationConfiguration struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) - // role that Amazon S3 assumes when replicating objects. For more information, - // see How to Set Up Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-how-setup.html) - // in the Amazon S3 User Guide. - // - // Role is a required field - Role *string `type:"string" required:"true"` - - // A container for one or more replication rules. A replication configuration - // must have at least one rule and can contain a maximum of 1,000 rules. - // - // Rules is a required field - Rules []*ReplicationRule `locationName:"Rule" type:"list" flattened:"true" 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 ReplicationConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ReplicationConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReplicationConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReplicationConfiguration"} - if s.Role == nil { - invalidParams.Add(request.NewErrParamRequired("Role")) - } - if s.Rules == nil { - invalidParams.Add(request.NewErrParamRequired("Rules")) - } - if s.Rules != nil { - for i, v := range s.Rules { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRole sets the Role field's value. -func (s *ReplicationConfiguration) SetRole(v string) *ReplicationConfiguration { - s.Role = &v - return s -} - -// SetRules sets the Rules field's value. -func (s *ReplicationConfiguration) SetRules(v []*ReplicationRule) *ReplicationConfiguration { - s.Rules = v - return s -} - -// Specifies which Amazon S3 objects to replicate and where to store the replicas. -type ReplicationRule struct { - _ struct{} `type:"structure"` - - // Specifies whether Amazon S3 replicates delete markers. If you specify a Filter - // in your replication configuration, you must also include a DeleteMarkerReplication - // element. If your Filter includes a Tag element, the DeleteMarkerReplication - // Status must be set to Disabled, because Amazon S3 does not support replicating - // delete markers for tag-based rules. For an example configuration, see Basic - // Rule Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-config-min-rule-config). - // - // For more information about delete marker replication, see Basic Rule Configuration - // (https://docs.aws.amazon.com/AmazonS3/latest/dev/delete-marker-replication.html). - // - // If you are using an earlier version of the replication configuration, Amazon - // S3 handles replication of delete markers differently. For more information, - // see Backward Compatibility (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-backward-compat-considerations). - DeleteMarkerReplication *DeleteMarkerReplication `type:"structure"` - - // A container for information about the replication destination and its configurations - // including enabling the S3 Replication Time Control (S3 RTC). - // - // Destination is a required field - Destination *Destination `type:"structure" required:"true"` - - // Optional configuration to replicate existing source bucket objects. For more - // information, see Replicating Existing Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-what-is-isnot-replicated.html#existing-object-replication) - // in the Amazon S3 User Guide. - ExistingObjectReplication *ExistingObjectReplication `type:"structure"` - - // A filter that identifies the subset of objects to which the replication rule - // applies. A Filter must specify exactly one Prefix, Tag, or an And child element. - Filter *ReplicationRuleFilter `type:"structure"` - - // A unique identifier for the rule. The maximum value is 255 characters. - ID *string `type:"string"` - - // An object key name prefix that identifies the object or objects to which - // the rule applies. The maximum prefix length is 1,024 characters. To include - // all objects in a bucket, specify an empty string. - // - // Replacement must be made for object keys containing special characters (such - // as carriage returns) when using XML requests. For more information, see XML - // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints). - // - // Deprecated: Prefix has been deprecated - Prefix *string `deprecated:"true" type:"string"` - - // The priority indicates which rule has precedence whenever two or more replication - // rules conflict. Amazon S3 will attempt to replicate objects according to - // all replication rules. However, if there are two or more rules with the same - // destination bucket, then objects will be replicated according to the rule - // with the highest priority. The higher the number, the higher the priority. - // - // For more information, see Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html) - // in the Amazon S3 User Guide. - Priority *int64 `type:"integer"` - - // A container that describes additional filters for identifying the source - // objects that you want to replicate. You can choose to enable or disable the - // replication of these objects. Currently, Amazon S3 supports only the filter - // that you can specify for objects created with server-side encryption using - // a customer managed key stored in Amazon Web Services Key Management Service - // (SSE-KMS). - SourceSelectionCriteria *SourceSelectionCriteria `type:"structure"` - - // Specifies whether the rule is enabled. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"ReplicationRuleStatus"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ReplicationRule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ReplicationRule) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReplicationRule) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReplicationRule"} - if s.Destination == nil { - invalidParams.Add(request.NewErrParamRequired("Destination")) - } - if s.Status == nil { - invalidParams.Add(request.NewErrParamRequired("Status")) - } - if s.Destination != nil { - if err := s.Destination.Validate(); err != nil { - invalidParams.AddNested("Destination", err.(request.ErrInvalidParams)) - } - } - if s.ExistingObjectReplication != nil { - if err := s.ExistingObjectReplication.Validate(); err != nil { - invalidParams.AddNested("ExistingObjectReplication", err.(request.ErrInvalidParams)) - } - } - if s.Filter != nil { - if err := s.Filter.Validate(); err != nil { - invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) - } - } - if s.SourceSelectionCriteria != nil { - if err := s.SourceSelectionCriteria.Validate(); err != nil { - invalidParams.AddNested("SourceSelectionCriteria", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDeleteMarkerReplication sets the DeleteMarkerReplication field's value. -func (s *ReplicationRule) SetDeleteMarkerReplication(v *DeleteMarkerReplication) *ReplicationRule { - s.DeleteMarkerReplication = v - return s -} - -// SetDestination sets the Destination field's value. -func (s *ReplicationRule) SetDestination(v *Destination) *ReplicationRule { - s.Destination = v - return s -} - -// SetExistingObjectReplication sets the ExistingObjectReplication field's value. -func (s *ReplicationRule) SetExistingObjectReplication(v *ExistingObjectReplication) *ReplicationRule { - s.ExistingObjectReplication = v - return s -} - -// SetFilter sets the Filter field's value. -func (s *ReplicationRule) SetFilter(v *ReplicationRuleFilter) *ReplicationRule { - s.Filter = v - return s -} - -// SetID sets the ID field's value. -func (s *ReplicationRule) SetID(v string) *ReplicationRule { - s.ID = &v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *ReplicationRule) SetPrefix(v string) *ReplicationRule { - s.Prefix = &v - return s -} - -// SetPriority sets the Priority field's value. -func (s *ReplicationRule) SetPriority(v int64) *ReplicationRule { - s.Priority = &v - return s -} - -// SetSourceSelectionCriteria sets the SourceSelectionCriteria field's value. -func (s *ReplicationRule) SetSourceSelectionCriteria(v *SourceSelectionCriteria) *ReplicationRule { - s.SourceSelectionCriteria = v - return s -} - -// SetStatus sets the Status field's value. -func (s *ReplicationRule) SetStatus(v string) *ReplicationRule { - s.Status = &v - return s -} - -// A container for specifying rule filters. The filters determine the subset -// of objects to which the rule applies. This element is required only if you -// specify more than one filter. -// -// For example: -// -// - If you specify both a Prefix and a Tag filter, wrap these filters in -// an And tag. -// -// - If you specify a filter based on multiple tags, wrap the Tag elements -// in an And tag. -type ReplicationRuleAndOperator struct { - _ struct{} `type:"structure"` - - // An object key name prefix that identifies the subset of objects to which - // the rule applies. - Prefix *string `type:"string"` - - // An array of tags containing key and value pairs. - Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"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 ReplicationRuleAndOperator) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ReplicationRuleAndOperator) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReplicationRuleAndOperator) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReplicationRuleAndOperator"} - 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 -} - -// SetPrefix sets the Prefix field's value. -func (s *ReplicationRuleAndOperator) SetPrefix(v string) *ReplicationRuleAndOperator { - s.Prefix = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ReplicationRuleAndOperator) SetTags(v []*Tag) *ReplicationRuleAndOperator { - s.Tags = v - return s -} - -// A filter that identifies the subset of objects to which the replication rule -// applies. A Filter must specify exactly one Prefix, Tag, or an And child element. -type ReplicationRuleFilter struct { - _ struct{} `type:"structure"` - - // A container for specifying rule filters. The filters determine the subset - // of objects to which the rule applies. This element is required only if you - // specify more than one filter. For example: - // - // * If you specify both a Prefix and a Tag filter, wrap these filters in - // an And tag. - // - // * If you specify a filter based on multiple tags, wrap the Tag elements - // in an And tag. - And *ReplicationRuleAndOperator `type:"structure"` - - // An object key name prefix that identifies the subset of objects to which - // the rule applies. - // - // Replacement must be made for object keys containing special characters (such - // as carriage returns) when using XML requests. For more information, see XML - // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints). - Prefix *string `type:"string"` - - // A container for specifying a tag key and value. - // - // The rule applies only to objects that have the tag in their tag set. - Tag *Tag `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 ReplicationRuleFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ReplicationRuleFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReplicationRuleFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReplicationRuleFilter"} - if s.And != nil { - if err := s.And.Validate(); err != nil { - invalidParams.AddNested("And", err.(request.ErrInvalidParams)) - } - } - if s.Tag != nil { - if err := s.Tag.Validate(); err != nil { - invalidParams.AddNested("Tag", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAnd sets the And field's value. -func (s *ReplicationRuleFilter) SetAnd(v *ReplicationRuleAndOperator) *ReplicationRuleFilter { - s.And = v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *ReplicationRuleFilter) SetPrefix(v string) *ReplicationRuleFilter { - s.Prefix = &v - return s -} - -// SetTag sets the Tag field's value. -func (s *ReplicationRuleFilter) SetTag(v *Tag) *ReplicationRuleFilter { - s.Tag = v - return s -} - -// A container specifying S3 Replication Time Control (S3 RTC) related information, -// including whether S3 RTC is enabled and the time when all objects and operations -// on objects must be replicated. Must be specified together with a Metrics -// block. -type ReplicationTime struct { - _ struct{} `type:"structure"` - - // Specifies whether the replication time is enabled. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"ReplicationTimeStatus"` - - // A container specifying the time by which replication should be complete for - // all objects and operations on objects. - // - // Time is a required field - Time *ReplicationTimeValue `type:"structure" 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 ReplicationTime) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ReplicationTime) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReplicationTime) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReplicationTime"} - if s.Status == nil { - invalidParams.Add(request.NewErrParamRequired("Status")) - } - if s.Time == nil { - invalidParams.Add(request.NewErrParamRequired("Time")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStatus sets the Status field's value. -func (s *ReplicationTime) SetStatus(v string) *ReplicationTime { - s.Status = &v - return s -} - -// SetTime sets the Time field's value. -func (s *ReplicationTime) SetTime(v *ReplicationTimeValue) *ReplicationTime { - s.Time = v - return s -} - -// A container specifying the time value for S3 Replication Time Control (S3 -// RTC) and replication metrics EventThreshold. -type ReplicationTimeValue struct { - _ struct{} `type:"structure"` - - // Contains an integer specifying time in minutes. - // - // Valid value: 15 - Minutes *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 ReplicationTimeValue) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ReplicationTimeValue) GoString() string { - return s.String() -} - -// SetMinutes sets the Minutes field's value. -func (s *ReplicationTimeValue) SetMinutes(v int64) *ReplicationTimeValue { - s.Minutes = &v - return s -} - -// Container for Payer. -type RequestPaymentConfiguration struct { - _ struct{} `type:"structure"` - - // Specifies who pays for the download and request fees. - // - // Payer is a required field - Payer *string `type:"string" required:"true" enum:"Payer"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RequestPaymentConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RequestPaymentConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RequestPaymentConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RequestPaymentConfiguration"} - if s.Payer == nil { - invalidParams.Add(request.NewErrParamRequired("Payer")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPayer sets the Payer field's value. -func (s *RequestPaymentConfiguration) SetPayer(v string) *RequestPaymentConfiguration { - s.Payer = &v - return s -} - -// Container for specifying if periodic QueryProgress messages should be sent. -type RequestProgress struct { - _ struct{} `type:"structure"` - - // Specifies whether periodic QueryProgress frames should be sent. Valid values: - // TRUE, FALSE. Default value: FALSE. - 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 RequestProgress) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RequestProgress) GoString() string { - return s.String() -} - -// SetEnabled sets the Enabled field's value. -func (s *RequestProgress) SetEnabled(v bool) *RequestProgress { - s.Enabled = &v - return s -} - -type RestoreObjectInput struct { - _ struct{} `locationName:"RestoreObjectRequest" type:"structure" payload:"RestoreRequest"` - - // The bucket name containing the object to restore. - // - // Access points - When you use this action with an access point, you must provide - // the alias of the access point in place of the bucket name or specify the - // access point ARN. When using the access point ARN, you must direct requests - // to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this action with an access point through the Amazon Web Services - // SDKs, you provide the access point ARN in place of the bucket name. For more - // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. - // - // S3 on Outposts - When you use this action with Amazon S3 on Outposts, you - // must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname - // takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. - // When you use this action with S3 on Outposts through the Amazon Web Services - // SDKs, you provide the Outposts access point ARN in place of the bucket name. - // For more information about S3 on Outposts ARNs, see What is S3 on Outposts? - // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) - // in the Amazon S3 User Guide. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // Indicates the algorithm used to create the checksum for the object when you - // use the SDK. This header will not provide any additional functionality if - // you don't use the SDK. When you send this header, there must be a corresponding - // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the - // request with the HTTP status code 400 Bad Request. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - // - // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm - // parameter. - // - // The AWS SDK for Go v1 does not support automatic computing request payload - // checksum. This feature is available in the AWS SDK for Go v2. If a value - // is specified for this parameter, the matching algorithm's checksum member - // must be populated with the algorithm's checksum of the request payload. - ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // Object key for which the action was initiated. - // - // Key is a required field - Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - - // Confirms that the requester knows that they will be charged for the request. - // Bucket owners need not specify this parameter in their requests. If either - // the source or destination S3 bucket has Requester Pays enabled, the requester - // will pay for corresponding charges to copy the object. For information about - // downloading objects from Requester Pays buckets, see Downloading Objects - // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` - - // Container for restore job parameters. - RestoreRequest *RestoreRequest `locationName:"RestoreRequest" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` - - // VersionId used to reference a specific version of the object. - VersionId *string `location:"querystring" locationName:"versionId" 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 RestoreObjectInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RestoreObjectInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RestoreObjectInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RestoreObjectInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - 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.RestoreRequest != nil { - if err := s.RestoreRequest.Validate(); err != nil { - invalidParams.AddNested("RestoreRequest", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *RestoreObjectInput) SetBucket(v string) *RestoreObjectInput { - s.Bucket = &v - return s -} - -func (s *RestoreObjectInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *RestoreObjectInput) SetChecksumAlgorithm(v string) *RestoreObjectInput { - s.ChecksumAlgorithm = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *RestoreObjectInput) SetExpectedBucketOwner(v string) *RestoreObjectInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetKey sets the Key field's value. -func (s *RestoreObjectInput) SetKey(v string) *RestoreObjectInput { - s.Key = &v - return s -} - -// SetRequestPayer sets the RequestPayer field's value. -func (s *RestoreObjectInput) SetRequestPayer(v string) *RestoreObjectInput { - s.RequestPayer = &v - return s -} - -// SetRestoreRequest sets the RestoreRequest field's value. -func (s *RestoreObjectInput) SetRestoreRequest(v *RestoreRequest) *RestoreObjectInput { - s.RestoreRequest = v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *RestoreObjectInput) SetVersionId(v string) *RestoreObjectInput { - s.VersionId = &v - return s -} - -func (s *RestoreObjectInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *RestoreObjectInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s RestoreObjectInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type RestoreObjectOutput struct { - _ struct{} `type:"structure"` - - // If present, indicates that the requester was successfully charged for the - // request. - // - // This functionality is not supported for directory buckets. - RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` - - // Indicates the path in the provided S3 output location where Select results - // will be restored to. - RestoreOutputPath *string `location:"header" locationName:"x-amz-restore-output-path" 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 RestoreObjectOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RestoreObjectOutput) GoString() string { - return s.String() -} - -// SetRequestCharged sets the RequestCharged field's value. -func (s *RestoreObjectOutput) SetRequestCharged(v string) *RestoreObjectOutput { - s.RequestCharged = &v - return s -} - -// SetRestoreOutputPath sets the RestoreOutputPath field's value. -func (s *RestoreObjectOutput) SetRestoreOutputPath(v string) *RestoreObjectOutput { - s.RestoreOutputPath = &v - return s -} - -// Container for restore job parameters. -type RestoreRequest struct { - _ struct{} `type:"structure"` - - // Lifetime of the active copy in days. Do not use with restores that specify - // OutputLocation. - // - // The Days element is required for regular restores, and must not be provided - // for select requests. - Days *int64 `type:"integer"` - - // The optional description for the job. - Description *string `type:"string"` - - // S3 Glacier related parameters pertaining to this job. Do not use with restores - // that specify OutputLocation. - GlacierJobParameters *GlacierJobParameters `type:"structure"` - - // Describes the location where the restore job's output is stored. - OutputLocation *OutputLocation `type:"structure"` - - // Describes the parameters for Select job types. - SelectParameters *SelectParameters `type:"structure"` - - // Retrieval tier at which the restore will be processed. - Tier *string `type:"string" enum:"Tier"` - - // Type of restore request. - Type *string `type:"string" enum:"RestoreRequestType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RestoreRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RestoreRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RestoreRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RestoreRequest"} - if s.GlacierJobParameters != nil { - if err := s.GlacierJobParameters.Validate(); err != nil { - invalidParams.AddNested("GlacierJobParameters", err.(request.ErrInvalidParams)) - } - } - if s.OutputLocation != nil { - if err := s.OutputLocation.Validate(); err != nil { - invalidParams.AddNested("OutputLocation", err.(request.ErrInvalidParams)) - } - } - if s.SelectParameters != nil { - if err := s.SelectParameters.Validate(); err != nil { - invalidParams.AddNested("SelectParameters", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDays sets the Days field's value. -func (s *RestoreRequest) SetDays(v int64) *RestoreRequest { - s.Days = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *RestoreRequest) SetDescription(v string) *RestoreRequest { - s.Description = &v - return s -} - -// SetGlacierJobParameters sets the GlacierJobParameters field's value. -func (s *RestoreRequest) SetGlacierJobParameters(v *GlacierJobParameters) *RestoreRequest { - s.GlacierJobParameters = v - return s -} - -// SetOutputLocation sets the OutputLocation field's value. -func (s *RestoreRequest) SetOutputLocation(v *OutputLocation) *RestoreRequest { - s.OutputLocation = v - return s -} - -// SetSelectParameters sets the SelectParameters field's value. -func (s *RestoreRequest) SetSelectParameters(v *SelectParameters) *RestoreRequest { - s.SelectParameters = v - return s -} - -// SetTier sets the Tier field's value. -func (s *RestoreRequest) SetTier(v string) *RestoreRequest { - s.Tier = &v - return s -} - -// SetType sets the Type field's value. -func (s *RestoreRequest) SetType(v string) *RestoreRequest { - s.Type = &v - return s -} - -// Specifies the restoration status of an object. Objects in certain storage -// classes must be restored before they can be retrieved. For more information -// about these storage classes and how to work with archived objects, see Working -// with archived objects (https://docs.aws.amazon.com/AmazonS3/latest/userguide/archived-objects.html) -// in the Amazon S3 User Guide. -// -// This functionality is not supported for directory buckets. Only the S3 Express -// One Zone storage class is supported by directory buckets to store objects. -type RestoreStatus struct { - _ struct{} `type:"structure"` - - // Specifies whether the object is currently being restored. If the object restoration - // is in progress, the header returns the value TRUE. For example: - // - // x-amz-optional-object-attributes: IsRestoreInProgress="true" - // - // If the object restoration has completed, the header returns the value FALSE. - // For example: - // - // x-amz-optional-object-attributes: IsRestoreInProgress="false", RestoreExpiryDate="2012-12-21T00:00:00.000Z" - // - // If the object hasn't been restored, there is no header response. - IsRestoreInProgress *bool `type:"boolean"` - - // Indicates when the restored copy will expire. This value is populated only - // if the object has already been restored. For example: - // - // x-amz-optional-object-attributes: IsRestoreInProgress="false", RestoreExpiryDate="2012-12-21T00:00:00.000Z" - RestoreExpiryDate *time.Time `type:"timestamp"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RestoreStatus) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RestoreStatus) GoString() string { - return s.String() -} - -// SetIsRestoreInProgress sets the IsRestoreInProgress field's value. -func (s *RestoreStatus) SetIsRestoreInProgress(v bool) *RestoreStatus { - s.IsRestoreInProgress = &v - return s -} - -// SetRestoreExpiryDate sets the RestoreExpiryDate field's value. -func (s *RestoreStatus) SetRestoreExpiryDate(v time.Time) *RestoreStatus { - s.RestoreExpiryDate = &v - return s -} - -// Specifies the redirect behavior and when a redirect is applied. For more -// information about routing rules, see Configuring advanced conditional redirects -// (https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html#advanced-conditional-redirects) -// in the Amazon S3 User Guide. -type RoutingRule struct { - _ struct{} `type:"structure"` - - // A container for describing a condition that must be met for the specified - // redirect to apply. For example, 1. If request is for pages in the /docs folder, - // redirect to the /documents folder. 2. If request results in HTTP error 4xx, - // redirect request to another host where you might process the error. - Condition *Condition `type:"structure"` - - // Container for redirect information. You can redirect requests to another - // host, to another page, or with another protocol. In the event of an error, - // you can specify a different error code to return. - // - // Redirect is a required field - Redirect *Redirect `type:"structure" 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 RoutingRule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RoutingRule) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RoutingRule) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RoutingRule"} - if s.Redirect == nil { - invalidParams.Add(request.NewErrParamRequired("Redirect")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCondition sets the Condition field's value. -func (s *RoutingRule) SetCondition(v *Condition) *RoutingRule { - s.Condition = v - return s -} - -// SetRedirect sets the Redirect field's value. -func (s *RoutingRule) SetRedirect(v *Redirect) *RoutingRule { - s.Redirect = v - return s -} - -// Specifies lifecycle rules for an Amazon S3 bucket. For more information, -// see Put Bucket Lifecycle Configuration (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlifecycle.html) -// in the Amazon S3 API Reference. For examples, see Put Bucket Lifecycle Configuration -// Examples (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html#API_PutBucketLifecycleConfiguration_Examples). -type Rule struct { - _ struct{} `type:"structure"` - - // Specifies the days since the initiation of an incomplete multipart upload - // that Amazon S3 will wait before permanently removing all parts of the upload. - // For more information, see Aborting Incomplete Multipart Uploads Using a Bucket - // Lifecycle Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config) - // in the Amazon S3 User Guide. - AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `type:"structure"` - - // Specifies the expiration for the lifecycle of the object. - Expiration *LifecycleExpiration `type:"structure"` - - // Unique identifier for the rule. The value can't be longer than 255 characters. - ID *string `type:"string"` - - // Specifies when noncurrent object versions expire. Upon expiration, Amazon - // S3 permanently deletes the noncurrent object versions. You set this lifecycle - // configuration action on a bucket that has versioning enabled (or suspended) - // to request that Amazon S3 delete noncurrent object versions at a specific - // period in the object's lifetime. - NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"` - - // Container for the transition rule that describes when noncurrent objects - // transition to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER_IR, - // GLACIER, or DEEP_ARCHIVE storage class. If your bucket is versioning-enabled - // (or versioning is suspended), you can set this action to request that Amazon - // S3 transition noncurrent object versions to the STANDARD_IA, ONEZONE_IA, - // INTELLIGENT_TIERING, GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage class at - // a specific period in the object's lifetime. - NoncurrentVersionTransition *NoncurrentVersionTransition `type:"structure"` - - // Object key prefix that identifies one or more objects to which this rule - // applies. - // - // Replacement must be made for object keys containing special characters (such - // as carriage returns) when using XML requests. For more information, see XML - // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints). - // - // Prefix is a required field - Prefix *string `type:"string" required:"true"` - - // If Enabled, the rule is currently being applied. If Disabled, the rule is - // not currently being applied. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"ExpirationStatus"` - - // Specifies when an object transitions to a specified storage class. For more - // information about Amazon S3 lifecycle configuration rules, see Transitioning - // Objects Using Amazon S3 Lifecycle (https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-transition-general-considerations.html) - // in the Amazon S3 User Guide. - Transition *Transition `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 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() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Rule) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Rule"} - if s.Prefix == nil { - invalidParams.Add(request.NewErrParamRequired("Prefix")) - } - if s.Status == nil { - invalidParams.Add(request.NewErrParamRequired("Status")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAbortIncompleteMultipartUpload sets the AbortIncompleteMultipartUpload field's value. -func (s *Rule) SetAbortIncompleteMultipartUpload(v *AbortIncompleteMultipartUpload) *Rule { - s.AbortIncompleteMultipartUpload = v - return s -} - -// SetExpiration sets the Expiration field's value. -func (s *Rule) SetExpiration(v *LifecycleExpiration) *Rule { - s.Expiration = v - return s -} - -// SetID sets the ID field's value. -func (s *Rule) SetID(v string) *Rule { - s.ID = &v - return s -} - -// SetNoncurrentVersionExpiration sets the NoncurrentVersionExpiration field's value. -func (s *Rule) SetNoncurrentVersionExpiration(v *NoncurrentVersionExpiration) *Rule { - s.NoncurrentVersionExpiration = v - return s -} - -// SetNoncurrentVersionTransition sets the NoncurrentVersionTransition field's value. -func (s *Rule) SetNoncurrentVersionTransition(v *NoncurrentVersionTransition) *Rule { - s.NoncurrentVersionTransition = v - return s -} - -// SetPrefix sets the Prefix field's value. -func (s *Rule) SetPrefix(v string) *Rule { - s.Prefix = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Rule) SetStatus(v string) *Rule { - s.Status = &v - return s -} - -// SetTransition sets the Transition field's value. -func (s *Rule) SetTransition(v *Transition) *Rule { - s.Transition = v - return s -} - -// Specifies the use of SSE-KMS to encrypt delivered inventory reports. -type SSEKMS struct { - _ struct{} `locationName:"SSE-KMS" type:"structure"` - - // Specifies the ID of the Key Management Service (KMS) symmetric encryption - // customer managed key to use for encrypting inventory reports. - // - // KeyId is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by SSEKMS's - // String and GoString methods. - // - // KeyId is a required field - KeyId *string `type:"string" required:"true" sensitive:"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 SSEKMS) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SSEKMS) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SSEKMS) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SSEKMS"} - if s.KeyId == nil { - invalidParams.Add(request.NewErrParamRequired("KeyId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyId sets the KeyId field's value. -func (s *SSEKMS) SetKeyId(v string) *SSEKMS { - s.KeyId = &v - return s -} - -// Specifies the use of SSE-S3 to encrypt delivered inventory reports. -type SSES3 struct { - _ struct{} `locationName:"SSE-S3" 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 SSES3) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SSES3) GoString() string { - return s.String() -} - -// Specifies the byte range of the object to get the records from. A record -// is processed when its first byte is contained by the range. This parameter -// is optional, but when specified, it must not be empty. See RFC 2616, Section -// 14.35.1 about how to specify the start and end of the range. -type ScanRange struct { - _ struct{} `type:"structure"` - - // Specifies the end of the byte range. This parameter is optional. Valid values: - // non-negative integers. The default value is one less than the size of the - // object being queried. If only the End parameter is supplied, it is interpreted - // to mean scan the last N bytes of the file. For example, 50 - // means scan the last 50 bytes. - End *int64 `type:"long"` - - // Specifies the start of the byte range. This parameter is optional. Valid - // values: non-negative integers. The default value is 0. If only start is supplied, - // it means scan from that point to the end of the file. For example, 50 - // means scan from byte 50 until the end of the file. - Start *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 ScanRange) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ScanRange) GoString() string { - return s.String() -} - -// SetEnd sets the End field's value. -func (s *ScanRange) SetEnd(v int64) *ScanRange { - s.End = &v - return s -} - -// SetStart sets the Start field's value. -func (s *ScanRange) SetStart(v int64) *ScanRange { - s.Start = &v - return s -} - -// SelectObjectContentEventStreamEvent groups together all EventStream -// events writes for SelectObjectContentEventStream. -// -// These events are: -// -// - ContinuationEvent -// - EndEvent -// - ProgressEvent -// - RecordsEvent -// - StatsEvent -type SelectObjectContentEventStreamEvent interface { - eventSelectObjectContentEventStream() - eventstreamapi.Marshaler - eventstreamapi.Unmarshaler -} - -// SelectObjectContentEventStreamReader provides the interface for reading to the stream. The -// default implementation for this interface will be SelectObjectContentEventStreamData. -// -// The reader's Close method must allow multiple concurrent calls. -// -// These events are: -// -// - ContinuationEvent -// - EndEvent -// - ProgressEvent -// - RecordsEvent -// - StatsEvent -// - SelectObjectContentEventStreamUnknownEvent -type SelectObjectContentEventStreamReader interface { - // Returns a channel of events as they are read from the event stream. - Events() <-chan SelectObjectContentEventStreamEvent - - // Close will stop the reader reading events from the stream. - Close() error - - // Returns any error that has occurred while reading from the event stream. - Err() error -} - -type readSelectObjectContentEventStream struct { - eventReader *eventstreamapi.EventReader - stream chan SelectObjectContentEventStreamEvent - err *eventstreamapi.OnceError - - done chan struct{} - closeOnce sync.Once -} - -func newReadSelectObjectContentEventStream(eventReader *eventstreamapi.EventReader) *readSelectObjectContentEventStream { - r := &readSelectObjectContentEventStream{ - eventReader: eventReader, - stream: make(chan SelectObjectContentEventStreamEvent), - done: make(chan struct{}), - err: eventstreamapi.NewOnceError(), - } - go r.readEventStream() - - return r -} - -// Close will close the underlying event stream reader. -func (r *readSelectObjectContentEventStream) Close() error { - r.closeOnce.Do(r.safeClose) - return r.Err() -} - -func (r *readSelectObjectContentEventStream) ErrorSet() <-chan struct{} { - return r.err.ErrorSet() -} - -func (r *readSelectObjectContentEventStream) Closed() <-chan struct{} { - return r.done -} - -func (r *readSelectObjectContentEventStream) safeClose() { - close(r.done) -} - -func (r *readSelectObjectContentEventStream) Err() error { - return r.err.Err() -} - -func (r *readSelectObjectContentEventStream) Events() <-chan SelectObjectContentEventStreamEvent { - return r.stream -} - -func (r *readSelectObjectContentEventStream) readEventStream() { - defer r.Close() - defer close(r.stream) - - for { - event, err := r.eventReader.ReadEvent() - if err != nil { - if err == io.EOF { - return - } - select { - case <-r.done: - // If closed already ignore the error - return - default: - } - if _, ok := err.(*eventstreamapi.UnknownMessageTypeError); ok { - continue - } - r.err.SetError(err) - return - } - - select { - case r.stream <- event.(SelectObjectContentEventStreamEvent): - case <-r.done: - return - } - } -} - -type unmarshalerForSelectObjectContentEventStreamEvent struct { - metadata protocol.ResponseMetadata -} - -func (u unmarshalerForSelectObjectContentEventStreamEvent) UnmarshalerForEventName(eventType string) (eventstreamapi.Unmarshaler, error) { - switch eventType { - case "Cont": - return &ContinuationEvent{}, nil - case "End": - return &EndEvent{}, nil - case "Progress": - return &ProgressEvent{}, nil - case "Records": - return &RecordsEvent{}, nil - case "Stats": - return &StatsEvent{}, nil - default: - return &SelectObjectContentEventStreamUnknownEvent{Type: eventType}, nil - } -} - -// SelectObjectContentEventStreamUnknownEvent provides a failsafe event for the -// SelectObjectContentEventStream group of events when an unknown event is received. -type SelectObjectContentEventStreamUnknownEvent struct { - Type string - Message eventstream.Message -} - -// The SelectObjectContentEventStreamUnknownEvent is and event in the SelectObjectContentEventStream -// group of events. -func (s *SelectObjectContentEventStreamUnknownEvent) eventSelectObjectContentEventStream() {} - -// MarshalEvent marshals the type into an stream event value. This method -// should only used internally within the SDK's EventStream handling. -func (e *SelectObjectContentEventStreamUnknownEvent) MarshalEvent(pm protocol.PayloadMarshaler) ( - msg eventstream.Message, err error, -) { - return e.Message.Clone(), nil -} - -// UnmarshalEvent unmarshals the EventStream Message into the SelectObjectContentEventStreamData value. -// This method is only used internally within the SDK's EventStream handling. -func (e *SelectObjectContentEventStreamUnknownEvent) UnmarshalEvent( - payloadUnmarshaler protocol.PayloadUnmarshaler, - msg eventstream.Message, -) error { - e.Message = msg.Clone() - return nil -} - -// Request to filter the contents of an Amazon S3 object based on a simple Structured -// Query Language (SQL) statement. In the request, along with the SQL expression, -// you must specify a data serialization format (JSON or CSV) of the object. -// Amazon S3 uses this to parse object data into records. It returns only records -// that match the specified SQL expression. You must also specify the data serialization -// format for the response. For more information, see S3Select API Documentation -// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectSELECTContent.html). -type SelectObjectContentInput struct { - _ struct{} `locationName:"SelectObjectContentRequest" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` - - // The S3 bucket. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // The expression that is used to query the object. - // - // Expression is a required field - Expression *string `type:"string" required:"true"` - - // The type of the provided expression (for example, SQL). - // - // ExpressionType is a required field - ExpressionType *string `type:"string" required:"true" enum:"ExpressionType"` - - // Describes the format of the data in the object that is being queried. - // - // InputSerialization is a required field - InputSerialization *InputSerialization `type:"structure" required:"true"` - - // The object key. - // - // Key is a required field - Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - - // Describes the format of the data that you want Amazon S3 to return in response. - // - // OutputSerialization is a required field - OutputSerialization *OutputSerialization `type:"structure" required:"true"` - - // Specifies if periodic request progress information should be enabled. - RequestProgress *RequestProgress `type:"structure"` - - // The server-side encryption (SSE) algorithm used to encrypt the object. This - // parameter is needed only when the object was created using a checksum algorithm. - // For more information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html) - // in the Amazon S3 User Guide. - SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` - - // The server-side encryption (SSE) customer managed key. This parameter is - // needed only when the object was created using a checksum algorithm. For more - // information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html) - // in the Amazon S3 User Guide. - // - // SSECustomerKey is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by SelectObjectContentInput's - // String and GoString methods. - SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"` - - // The MD5 server-side encryption (SSE) customer managed key. This parameter - // is needed only when the object was created using a checksum algorithm. For - // more information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html) - // in the Amazon S3 User Guide. - SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` - - // Specifies the byte range of the object to get the records from. A record - // is processed when its first byte is contained by the range. This parameter - // is optional, but when specified, it must not be empty. See RFC 2616, Section - // 14.35.1 about how to specify the start and end of the range. - // - // ScanRangemay be used in the following ways: - // - // * 50100 - process only - // the records starting between the bytes 50 and 100 (inclusive, counting - // from zero) - // - // * 50 - process only the records - // starting after the byte 50 - // - // * 50 - process only the records within - // the last 50 bytes of the file. - ScanRange *ScanRange `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 SelectObjectContentInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SelectObjectContentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SelectObjectContentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SelectObjectContentInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.Expression == nil { - invalidParams.Add(request.NewErrParamRequired("Expression")) - } - if s.ExpressionType == nil { - invalidParams.Add(request.NewErrParamRequired("ExpressionType")) - } - if s.InputSerialization == nil { - invalidParams.Add(request.NewErrParamRequired("InputSerialization")) - } - 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.OutputSerialization == nil { - invalidParams.Add(request.NewErrParamRequired("OutputSerialization")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *SelectObjectContentInput) SetBucket(v string) *SelectObjectContentInput { - s.Bucket = &v - return s -} - -func (s *SelectObjectContentInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *SelectObjectContentInput) SetExpectedBucketOwner(v string) *SelectObjectContentInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetExpression sets the Expression field's value. -func (s *SelectObjectContentInput) SetExpression(v string) *SelectObjectContentInput { - s.Expression = &v - return s -} - -// SetExpressionType sets the ExpressionType field's value. -func (s *SelectObjectContentInput) SetExpressionType(v string) *SelectObjectContentInput { - s.ExpressionType = &v - return s -} - -// SetInputSerialization sets the InputSerialization field's value. -func (s *SelectObjectContentInput) SetInputSerialization(v *InputSerialization) *SelectObjectContentInput { - s.InputSerialization = v - return s -} - -// SetKey sets the Key field's value. -func (s *SelectObjectContentInput) SetKey(v string) *SelectObjectContentInput { - s.Key = &v - return s -} - -// SetOutputSerialization sets the OutputSerialization field's value. -func (s *SelectObjectContentInput) SetOutputSerialization(v *OutputSerialization) *SelectObjectContentInput { - s.OutputSerialization = v - return s -} - -// SetRequestProgress sets the RequestProgress field's value. -func (s *SelectObjectContentInput) SetRequestProgress(v *RequestProgress) *SelectObjectContentInput { - s.RequestProgress = v - return s -} - -// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. -func (s *SelectObjectContentInput) SetSSECustomerAlgorithm(v string) *SelectObjectContentInput { - s.SSECustomerAlgorithm = &v - return s -} - -// SetSSECustomerKey sets the SSECustomerKey field's value. -func (s *SelectObjectContentInput) SetSSECustomerKey(v string) *SelectObjectContentInput { - s.SSECustomerKey = &v - return s -} - -func (s *SelectObjectContentInput) getSSECustomerKey() (v string) { - if s.SSECustomerKey == nil { - return v - } - return *s.SSECustomerKey -} - -// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. -func (s *SelectObjectContentInput) SetSSECustomerKeyMD5(v string) *SelectObjectContentInput { - s.SSECustomerKeyMD5 = &v - return s -} - -// SetScanRange sets the ScanRange field's value. -func (s *SelectObjectContentInput) SetScanRange(v *ScanRange) *SelectObjectContentInput { - s.ScanRange = v - return s -} - -func (s *SelectObjectContentInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *SelectObjectContentInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s SelectObjectContentInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type SelectObjectContentOutput struct { - _ struct{} `type:"structure" payload:"Payload"` - - EventStream *SelectObjectContentEventStream -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SelectObjectContentOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SelectObjectContentOutput) GoString() string { - return s.String() -} - -func (s *SelectObjectContentOutput) SetEventStream(v *SelectObjectContentEventStream) *SelectObjectContentOutput { - s.EventStream = v - return s -} -func (s *SelectObjectContentOutput) GetEventStream() *SelectObjectContentEventStream { - return s.EventStream -} - -// GetStream returns the type to interact with the event stream. -func (s *SelectObjectContentOutput) GetStream() *SelectObjectContentEventStream { - return s.EventStream -} - -// Describes the parameters for Select job types. -type SelectParameters struct { - _ struct{} `type:"structure"` - - // The expression that is used to query the object. - // - // Expression is a required field - Expression *string `type:"string" required:"true"` - - // The type of the provided expression (for example, SQL). - // - // ExpressionType is a required field - ExpressionType *string `type:"string" required:"true" enum:"ExpressionType"` - - // Describes the serialization format of the object. - // - // InputSerialization is a required field - InputSerialization *InputSerialization `type:"structure" required:"true"` - - // Describes how the results of the Select job are serialized. - // - // OutputSerialization is a required field - OutputSerialization *OutputSerialization `type:"structure" 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 SelectParameters) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SelectParameters) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SelectParameters) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SelectParameters"} - if s.Expression == nil { - invalidParams.Add(request.NewErrParamRequired("Expression")) - } - if s.ExpressionType == nil { - invalidParams.Add(request.NewErrParamRequired("ExpressionType")) - } - if s.InputSerialization == nil { - invalidParams.Add(request.NewErrParamRequired("InputSerialization")) - } - if s.OutputSerialization == nil { - invalidParams.Add(request.NewErrParamRequired("OutputSerialization")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExpression sets the Expression field's value. -func (s *SelectParameters) SetExpression(v string) *SelectParameters { - s.Expression = &v - return s -} - -// SetExpressionType sets the ExpressionType field's value. -func (s *SelectParameters) SetExpressionType(v string) *SelectParameters { - s.ExpressionType = &v - return s -} - -// SetInputSerialization sets the InputSerialization field's value. -func (s *SelectParameters) SetInputSerialization(v *InputSerialization) *SelectParameters { - s.InputSerialization = v - return s -} - -// SetOutputSerialization sets the OutputSerialization field's value. -func (s *SelectParameters) SetOutputSerialization(v *OutputSerialization) *SelectParameters { - s.OutputSerialization = v - return s -} - -// Describes the default server-side encryption to apply to new objects in the -// bucket. If a PUT Object request doesn't specify any server-side encryption, -// this default encryption will be applied. If you don't specify a customer -// managed key at configuration, Amazon S3 automatically creates an Amazon Web -// Services KMS key in your Amazon Web Services account the first time that -// you add an object encrypted with SSE-KMS to a bucket. By default, Amazon -// S3 uses this KMS key for SSE-KMS. For more information, see PUT Bucket encryption -// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTencryption.html) -// in the Amazon S3 API Reference. -type ServerSideEncryptionByDefault struct { - _ struct{} `type:"structure"` - - // Amazon Web Services Key Management Service (KMS) customer Amazon Web Services - // KMS key ID to use for the default encryption. This parameter is allowed if - // and only if SSEAlgorithm is set to aws:kms or aws:kms:dsse. - // - // You can specify the key ID, key alias, or the Amazon Resource Name (ARN) - // of the KMS key. - // - // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - // - // * Key Alias: alias/alias-name - // - // If you use a key ID, you can run into a LogDestination undeliverable error - // when creating a VPC flow log. - // - // If you are using encryption with cross-account or Amazon Web Services service - // operations you must use a fully qualified KMS key ARN. For more information, - // see Using encryption for cross-account operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html#bucket-encryption-update-bucket-policy). - // - // Amazon S3 only supports symmetric encryption KMS keys. For more information, - // see Asymmetric keys in Amazon Web Services KMS (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html) - // in the Amazon Web Services Key Management Service Developer Guide. - // - // KMSMasterKeyID is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by ServerSideEncryptionByDefault's - // String and GoString methods. - KMSMasterKeyID *string `type:"string" sensitive:"true"` - - // Server-side encryption algorithm to use for the default encryption. - // - // SSEAlgorithm is a required field - SSEAlgorithm *string `type:"string" required:"true" enum:"ServerSideEncryption"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ServerSideEncryptionByDefault) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ServerSideEncryptionByDefault) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ServerSideEncryptionByDefault) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionByDefault"} - if s.SSEAlgorithm == nil { - invalidParams.Add(request.NewErrParamRequired("SSEAlgorithm")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKMSMasterKeyID sets the KMSMasterKeyID field's value. -func (s *ServerSideEncryptionByDefault) SetKMSMasterKeyID(v string) *ServerSideEncryptionByDefault { - s.KMSMasterKeyID = &v - return s -} - -// SetSSEAlgorithm sets the SSEAlgorithm field's value. -func (s *ServerSideEncryptionByDefault) SetSSEAlgorithm(v string) *ServerSideEncryptionByDefault { - s.SSEAlgorithm = &v - return s -} - -// Specifies the default server-side-encryption configuration. -type ServerSideEncryptionConfiguration struct { - _ struct{} `type:"structure"` - - // Container for information about a particular server-side encryption configuration - // rule. - // - // Rules is a required field - Rules []*ServerSideEncryptionRule `locationName:"Rule" type:"list" flattened:"true" 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 ServerSideEncryptionConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ServerSideEncryptionConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ServerSideEncryptionConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionConfiguration"} - if s.Rules == nil { - invalidParams.Add(request.NewErrParamRequired("Rules")) - } - if s.Rules != nil { - for i, v := range s.Rules { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRules sets the Rules field's value. -func (s *ServerSideEncryptionConfiguration) SetRules(v []*ServerSideEncryptionRule) *ServerSideEncryptionConfiguration { - s.Rules = v - return s -} - -// Specifies the default server-side encryption configuration. -type ServerSideEncryptionRule struct { - _ struct{} `type:"structure"` - - // Specifies the default server-side encryption to apply to new objects in the - // bucket. If a PUT Object request doesn't specify any server-side encryption, - // this default encryption will be applied. - ApplyServerSideEncryptionByDefault *ServerSideEncryptionByDefault `type:"structure"` - - // Specifies whether Amazon S3 should use an S3 Bucket Key with server-side - // encryption using KMS (SSE-KMS) for new objects in the bucket. Existing objects - // are not affected. Setting the BucketKeyEnabled element to true causes Amazon - // S3 to use an S3 Bucket Key. By default, S3 Bucket Key is not enabled. - // - // For more information, see Amazon S3 Bucket Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html) - // in the Amazon S3 User Guide. - BucketKeyEnabled *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 ServerSideEncryptionRule) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ServerSideEncryptionRule) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ServerSideEncryptionRule) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionRule"} - if s.ApplyServerSideEncryptionByDefault != nil { - if err := s.ApplyServerSideEncryptionByDefault.Validate(); err != nil { - invalidParams.AddNested("ApplyServerSideEncryptionByDefault", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetApplyServerSideEncryptionByDefault sets the ApplyServerSideEncryptionByDefault field's value. -func (s *ServerSideEncryptionRule) SetApplyServerSideEncryptionByDefault(v *ServerSideEncryptionByDefault) *ServerSideEncryptionRule { - s.ApplyServerSideEncryptionByDefault = v - return s -} - -// SetBucketKeyEnabled sets the BucketKeyEnabled field's value. -func (s *ServerSideEncryptionRule) SetBucketKeyEnabled(v bool) *ServerSideEncryptionRule { - s.BucketKeyEnabled = &v - return s -} - -// The established temporary security credentials of the session. -// -// Directory buckets - These session credentials are only supported for the -// authentication and authorization of Zonal endpoint APIs on directory buckets. -type SessionCredentials struct { - _ struct{} `type:"structure"` - - // A unique identifier that's associated with a secret access key. The access - // key ID and the secret access key are used together to sign programmatic Amazon - // Web Services requests cryptographically. - // - // AccessKeyId is a required field - AccessKeyId *string `locationName:"AccessKeyId" type:"string" required:"true"` - - // Temporary security credentials expire after a specified interval. After temporary - // credentials expire, any calls that you make with those credentials will fail. - // So you must generate a new set of temporary credentials. Temporary credentials - // cannot be extended or refreshed beyond the original specified interval. - // - // Expiration is a required field - Expiration *time.Time `locationName:"Expiration" type:"timestamp" required:"true"` - - // A key that's used with the access key ID to cryptographically sign programmatic - // Amazon Web Services requests. Signing a request identifies the sender and - // prevents the request from being altered. - // - // SecretAccessKey is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by SessionCredentials's - // String and GoString methods. - // - // SecretAccessKey is a required field - SecretAccessKey *string `locationName:"SecretAccessKey" type:"string" required:"true" sensitive:"true"` - - // A part of the temporary security credentials. The session token is used to - // validate the temporary security credentials. - // - // SessionToken is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by SessionCredentials's - // String and GoString methods. - // - // SessionToken is a required field - SessionToken *string `locationName:"SessionToken" type:"string" required:"true" sensitive:"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 SessionCredentials) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SessionCredentials) GoString() string { - return s.String() -} - -// SetAccessKeyId sets the AccessKeyId field's value. -func (s *SessionCredentials) SetAccessKeyId(v string) *SessionCredentials { - s.AccessKeyId = &v - return s -} - -// SetExpiration sets the Expiration field's value. -func (s *SessionCredentials) SetExpiration(v time.Time) *SessionCredentials { - s.Expiration = &v - return s -} - -// SetSecretAccessKey sets the SecretAccessKey field's value. -func (s *SessionCredentials) SetSecretAccessKey(v string) *SessionCredentials { - s.SecretAccessKey = &v - return s -} - -// SetSessionToken sets the SessionToken field's value. -func (s *SessionCredentials) SetSessionToken(v string) *SessionCredentials { - s.SessionToken = &v - return s -} - -// To use simple format for S3 keys for log objects, set SimplePrefix to an -// empty object. -// -// [DestinationPrefix][YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString] -type SimplePrefix struct { - _ struct{} `locationName:"SimplePrefix" 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 SimplePrefix) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SimplePrefix) GoString() string { - return s.String() -} - -// A container that describes additional filters for identifying the source -// objects that you want to replicate. You can choose to enable or disable the -// replication of these objects. Currently, Amazon S3 supports only the filter -// that you can specify for objects created with server-side encryption using -// a customer managed key stored in Amazon Web Services Key Management Service -// (SSE-KMS). -type SourceSelectionCriteria struct { - _ struct{} `type:"structure"` - - // A filter that you can specify for selections for modifications on replicas. - // Amazon S3 doesn't replicate replica modifications by default. In the latest - // version of replication configuration (when Filter is specified), you can - // specify this element and set the status to Enabled to replicate modifications - // on replicas. - // - // If you don't specify the Filter element, Amazon S3 assumes that the replication - // configuration is the earlier version, V1. In the earlier version, this element - // is not allowed - ReplicaModifications *ReplicaModifications `type:"structure"` - - // A container for filter information for the selection of Amazon S3 objects - // encrypted with Amazon Web Services KMS. If you include SourceSelectionCriteria - // in the replication configuration, this element is required. - SseKmsEncryptedObjects *SseKmsEncryptedObjects `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 SourceSelectionCriteria) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SourceSelectionCriteria) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SourceSelectionCriteria) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SourceSelectionCriteria"} - if s.ReplicaModifications != nil { - if err := s.ReplicaModifications.Validate(); err != nil { - invalidParams.AddNested("ReplicaModifications", err.(request.ErrInvalidParams)) - } - } - if s.SseKmsEncryptedObjects != nil { - if err := s.SseKmsEncryptedObjects.Validate(); err != nil { - invalidParams.AddNested("SseKmsEncryptedObjects", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetReplicaModifications sets the ReplicaModifications field's value. -func (s *SourceSelectionCriteria) SetReplicaModifications(v *ReplicaModifications) *SourceSelectionCriteria { - s.ReplicaModifications = v - return s -} - -// SetSseKmsEncryptedObjects sets the SseKmsEncryptedObjects field's value. -func (s *SourceSelectionCriteria) SetSseKmsEncryptedObjects(v *SseKmsEncryptedObjects) *SourceSelectionCriteria { - s.SseKmsEncryptedObjects = v - return s -} - -// A container for filter information for the selection of S3 objects encrypted -// with Amazon Web Services KMS. -type SseKmsEncryptedObjects struct { - _ struct{} `type:"structure"` - - // Specifies whether Amazon S3 replicates objects created with server-side encryption - // using an Amazon Web Services KMS key stored in Amazon Web Services Key Management - // Service. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"SseKmsEncryptedObjectsStatus"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SseKmsEncryptedObjects) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SseKmsEncryptedObjects) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SseKmsEncryptedObjects) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SseKmsEncryptedObjects"} - 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 *SseKmsEncryptedObjects) SetStatus(v string) *SseKmsEncryptedObjects { - s.Status = &v - return s -} - -// Container for the stats details. -type Stats struct { - _ struct{} `type:"structure"` - - // The total number of uncompressed object bytes processed. - BytesProcessed *int64 `type:"long"` - - // The total number of bytes of records payload data returned. - BytesReturned *int64 `type:"long"` - - // The total number of object bytes scanned. - BytesScanned *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 Stats) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Stats) GoString() string { - return s.String() -} - -// SetBytesProcessed sets the BytesProcessed field's value. -func (s *Stats) SetBytesProcessed(v int64) *Stats { - s.BytesProcessed = &v - return s -} - -// SetBytesReturned sets the BytesReturned field's value. -func (s *Stats) SetBytesReturned(v int64) *Stats { - s.BytesReturned = &v - return s -} - -// SetBytesScanned sets the BytesScanned field's value. -func (s *Stats) SetBytesScanned(v int64) *Stats { - s.BytesScanned = &v - return s -} - -// Container for the Stats Event. -type StatsEvent struct { - _ struct{} `locationName:"StatsEvent" type:"structure" payload:"Details"` - - // The Stats event details. - Details *Stats `locationName:"Details" 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 StatsEvent) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s StatsEvent) GoString() string { - return s.String() -} - -// SetDetails sets the Details field's value. -func (s *StatsEvent) SetDetails(v *Stats) *StatsEvent { - s.Details = v - return s -} - -// The StatsEvent is and event in the SelectObjectContentEventStream group of events. -func (s *StatsEvent) eventSelectObjectContentEventStream() {} - -// UnmarshalEvent unmarshals the EventStream Message into the StatsEvent value. -// This method is only used internally within the SDK's EventStream handling. -func (s *StatsEvent) UnmarshalEvent( - payloadUnmarshaler protocol.PayloadUnmarshaler, - msg eventstream.Message, -) error { - if err := payloadUnmarshaler.UnmarshalPayload( - bytes.NewReader(msg.Payload), s, - ); err != nil { - return err - } - return nil -} - -// MarshalEvent marshals the type into an stream event value. This method -// should only used internally within the SDK's EventStream handling. -func (s *StatsEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { - msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) - var buf bytes.Buffer - if err = pm.MarshalPayload(&buf, s); err != nil { - return eventstream.Message{}, err - } - msg.Payload = buf.Bytes() - return msg, err -} - -// Specifies data related to access patterns to be collected and made available -// to analyze the tradeoffs between different storage classes for an Amazon -// S3 bucket. -type StorageClassAnalysis struct { - _ struct{} `type:"structure"` - - // Specifies how data related to the storage class analysis for an Amazon S3 - // bucket should be exported. - DataExport *StorageClassAnalysisDataExport `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 StorageClassAnalysis) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s StorageClassAnalysis) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StorageClassAnalysis) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StorageClassAnalysis"} - if s.DataExport != nil { - if err := s.DataExport.Validate(); err != nil { - invalidParams.AddNested("DataExport", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDataExport sets the DataExport field's value. -func (s *StorageClassAnalysis) SetDataExport(v *StorageClassAnalysisDataExport) *StorageClassAnalysis { - s.DataExport = v - return s -} - -// Container for data related to the storage class analysis for an Amazon S3 -// bucket for export. -type StorageClassAnalysisDataExport struct { - _ struct{} `type:"structure"` - - // The place to store the data for an analysis. - // - // Destination is a required field - Destination *AnalyticsExportDestination `type:"structure" required:"true"` - - // The version of the output schema to use when exporting data. Must be V_1. - // - // OutputSchemaVersion is a required field - OutputSchemaVersion *string `type:"string" required:"true" enum:"StorageClassAnalysisSchemaVersion"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s StorageClassAnalysisDataExport) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s StorageClassAnalysisDataExport) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StorageClassAnalysisDataExport) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StorageClassAnalysisDataExport"} - if s.Destination == nil { - invalidParams.Add(request.NewErrParamRequired("Destination")) - } - if s.OutputSchemaVersion == nil { - invalidParams.Add(request.NewErrParamRequired("OutputSchemaVersion")) - } - if s.Destination != nil { - if err := s.Destination.Validate(); err != nil { - invalidParams.AddNested("Destination", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestination sets the Destination field's value. -func (s *StorageClassAnalysisDataExport) SetDestination(v *AnalyticsExportDestination) *StorageClassAnalysisDataExport { - s.Destination = v - return s -} - -// SetOutputSchemaVersion sets the OutputSchemaVersion field's value. -func (s *StorageClassAnalysisDataExport) SetOutputSchemaVersion(v string) *StorageClassAnalysisDataExport { - s.OutputSchemaVersion = &v - return s -} - -// A container of a key value name pair. -type Tag struct { - _ struct{} `type:"structure"` - - // Name of the object key. - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // Value of the tag. - // - // 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 -} - -// Container for TagSet elements. -type Tagging struct { - _ struct{} `type:"structure"` - - // A collection for a set of tags - // - // TagSet is a required field - TagSet []*Tag `locationNameList:"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 Tagging) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Tagging) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tagging) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tagging"} - if s.TagSet == nil { - invalidParams.Add(request.NewErrParamRequired("TagSet")) - } - if s.TagSet != nil { - for i, v := range s.TagSet { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagSet", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTagSet sets the TagSet field's value. -func (s *Tagging) SetTagSet(v []*Tag) *Tagging { - s.TagSet = v - return s -} - -// Container for granting information. -// -// Buckets that use the bucket owner enforced setting for Object Ownership don't -// support target grants. For more information, see Permissions server access -// log delivery (https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-server-access-logging.html#grant-log-delivery-permissions-general) -// in the Amazon S3 User Guide. -type TargetGrant struct { - _ struct{} `type:"structure"` - - // Container for the person being granted permissions. - Grantee *Grantee `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"` - - // Logging permissions assigned to the grantee for the bucket. - Permission *string `type:"string" enum:"BucketLogsPermission"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TargetGrant) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TargetGrant) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TargetGrant) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TargetGrant"} - if s.Grantee != nil { - if err := s.Grantee.Validate(); err != nil { - invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGrantee sets the Grantee field's value. -func (s *TargetGrant) SetGrantee(v *Grantee) *TargetGrant { - s.Grantee = v - return s -} - -// SetPermission sets the Permission field's value. -func (s *TargetGrant) SetPermission(v string) *TargetGrant { - s.Permission = &v - return s -} - -// Amazon S3 key format for log objects. Only one format, PartitionedPrefix -// or SimplePrefix, is allowed. -type TargetObjectKeyFormat struct { - _ struct{} `type:"structure"` - - // Partitioned S3 key for log objects. - PartitionedPrefix *PartitionedPrefix `locationName:"PartitionedPrefix" type:"structure"` - - // To use the simple format for S3 keys for log objects. To specify SimplePrefix - // format, set SimplePrefix to {}. - SimplePrefix *SimplePrefix `locationName:"SimplePrefix" 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 TargetObjectKeyFormat) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TargetObjectKeyFormat) GoString() string { - return s.String() -} - -// SetPartitionedPrefix sets the PartitionedPrefix field's value. -func (s *TargetObjectKeyFormat) SetPartitionedPrefix(v *PartitionedPrefix) *TargetObjectKeyFormat { - s.PartitionedPrefix = v - return s -} - -// SetSimplePrefix sets the SimplePrefix field's value. -func (s *TargetObjectKeyFormat) SetSimplePrefix(v *SimplePrefix) *TargetObjectKeyFormat { - s.SimplePrefix = v - return s -} - -// The S3 Intelligent-Tiering storage class is designed to optimize storage -// costs by automatically moving data to the most cost-effective storage access -// tier, without additional operational overhead. -type Tiering struct { - _ struct{} `type:"structure"` - - // S3 Intelligent-Tiering access tier. See Storage class for automatically optimizing - // frequently and infrequently accessed objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access) - // for a list of access tiers in the S3 Intelligent-Tiering storage class. - // - // AccessTier is a required field - AccessTier *string `type:"string" required:"true" enum:"IntelligentTieringAccessTier"` - - // The number of consecutive days of no access after which an object will be - // eligible to be transitioned to the corresponding tier. The minimum number - // of days specified for Archive Access tier must be at least 90 days and Deep - // Archive Access tier must be at least 180 days. The maximum can be up to 2 - // years (730 days). - // - // Days is a required field - Days *int64 `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 Tiering) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Tiering) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tiering) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tiering"} - if s.AccessTier == nil { - invalidParams.Add(request.NewErrParamRequired("AccessTier")) - } - if s.Days == nil { - invalidParams.Add(request.NewErrParamRequired("Days")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessTier sets the AccessTier field's value. -func (s *Tiering) SetAccessTier(v string) *Tiering { - s.AccessTier = &v - return s -} - -// SetDays sets the Days field's value. -func (s *Tiering) SetDays(v int64) *Tiering { - s.Days = &v - return s -} - -// A container for specifying the configuration for publication of messages -// to an Amazon Simple Notification Service (Amazon SNS) topic when Amazon S3 -// detects specified events. -type TopicConfiguration struct { - _ struct{} `type:"structure"` - - // The Amazon S3 bucket event about which to send notifications. For more information, - // see Supported Event Types (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) - // in the Amazon S3 User Guide. - // - // Events is a required field - Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true" enum:"Event"` - - // Specifies object key name filtering rules. For information about key name - // filtering, see Configuring event notifications using object key name filtering - // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/notification-how-to-filtering.html) - // in the Amazon S3 User Guide. - Filter *NotificationConfigurationFilter `type:"structure"` - - // An optional unique identifier for configurations in a notification configuration. - // If you don't provide one, Amazon S3 will assign an ID. - Id *string `type:"string"` - - // The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3 - // publishes a message when it detects events of the specified type. - // - // TopicArn is a required field - TopicArn *string `locationName:"Topic" 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 TopicConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TopicConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TopicConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TopicConfiguration"} - if s.Events == nil { - invalidParams.Add(request.NewErrParamRequired("Events")) - } - if s.TopicArn == nil { - invalidParams.Add(request.NewErrParamRequired("TopicArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEvents sets the Events field's value. -func (s *TopicConfiguration) SetEvents(v []*string) *TopicConfiguration { - s.Events = v - return s -} - -// SetFilter sets the Filter field's value. -func (s *TopicConfiguration) SetFilter(v *NotificationConfigurationFilter) *TopicConfiguration { - s.Filter = v - return s -} - -// SetId sets the Id field's value. -func (s *TopicConfiguration) SetId(v string) *TopicConfiguration { - s.Id = &v - return s -} - -// SetTopicArn sets the TopicArn field's value. -func (s *TopicConfiguration) SetTopicArn(v string) *TopicConfiguration { - s.TopicArn = &v - return s -} - -// A container for specifying the configuration for publication of messages -// to an Amazon Simple Notification Service (Amazon SNS) topic when Amazon S3 -// detects specified events. This data type is deprecated. Use TopicConfiguration -// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_TopicConfiguration.html) -// instead. -type TopicConfigurationDeprecated struct { - _ struct{} `type:"structure"` - - // Bucket event for which to send notifications. - // - // Deprecated: Event has been deprecated - Event *string `deprecated:"true" type:"string" enum:"Event"` - - // A collection of events related to objects - Events []*string `locationName:"Event" type:"list" flattened:"true" enum:"Event"` - - // An optional unique identifier for configurations in a notification configuration. - // If you don't provide one, Amazon S3 will assign an ID. - Id *string `type:"string"` - - // Amazon SNS topic to which Amazon S3 will publish a message to report the - // specified events for the bucket. - Topic *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 TopicConfigurationDeprecated) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TopicConfigurationDeprecated) GoString() string { - return s.String() -} - -// SetEvent sets the Event field's value. -func (s *TopicConfigurationDeprecated) SetEvent(v string) *TopicConfigurationDeprecated { - s.Event = &v - return s -} - -// SetEvents sets the Events field's value. -func (s *TopicConfigurationDeprecated) SetEvents(v []*string) *TopicConfigurationDeprecated { - s.Events = v - return s -} - -// SetId sets the Id field's value. -func (s *TopicConfigurationDeprecated) SetId(v string) *TopicConfigurationDeprecated { - s.Id = &v - return s -} - -// SetTopic sets the Topic field's value. -func (s *TopicConfigurationDeprecated) SetTopic(v string) *TopicConfigurationDeprecated { - s.Topic = &v - return s -} - -// Specifies when an object transitions to a specified storage class. For more -// information about Amazon S3 lifecycle configuration rules, see Transitioning -// Objects Using Amazon S3 Lifecycle (https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-transition-general-considerations.html) -// in the Amazon S3 User Guide. -type Transition struct { - _ struct{} `type:"structure"` - - // Indicates when objects are transitioned to the specified storage class. The - // date value must be in ISO 8601 format. The time is always midnight UTC. - Date *time.Time `type:"timestamp" timestampFormat:"iso8601"` - - // Indicates the number of days after creation when objects are transitioned - // to the specified storage class. The value must be a positive integer. - Days *int64 `type:"integer"` - - // The storage class to which you want the object to transition. - StorageClass *string `type:"string" enum:"TransitionStorageClass"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Transition) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Transition) GoString() string { - return s.String() -} - -// SetDate sets the Date field's value. -func (s *Transition) SetDate(v time.Time) *Transition { - s.Date = &v - return s -} - -// SetDays sets the Days field's value. -func (s *Transition) SetDays(v int64) *Transition { - s.Days = &v - return s -} - -// SetStorageClass sets the StorageClass field's value. -func (s *Transition) SetStorageClass(v string) *Transition { - s.StorageClass = &v - return s -} - -type UploadPartCopyInput struct { - _ struct{} `locationName:"UploadPartCopyRequest" type:"structure"` - - // The bucket name. - // - // Directory buckets - When you use this operation with a directory bucket, - // you must use virtual-hosted-style requests in the format Bucket_name.s3express-az_id.region.amazonaws.com. - // Path-style requests are not supported. Directory bucket names must be unique - // in the chosen Availability Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 - // (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about - // bucket naming restrictions, see Directory bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html) - // in the Amazon S3 User Guide. - // - // Access points - When you use this action with an access point, you must provide - // the alias of the access point in place of the bucket name or specify the - // access point ARN. When using the access point ARN, you must direct requests - // to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this action with an access point through the Amazon Web Services - // SDKs, you provide the access point ARN in place of the bucket name. For more - // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. - // - // Access points and Object Lambda access points are not supported by directory - // buckets. - // - // S3 on Outposts - When you use this action with Amazon S3 on Outposts, you - // must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname - // takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. - // When you use this action with S3 on Outposts through the Amazon Web Services - // SDKs, you provide the Outposts access point ARN in place of the bucket name. - // For more information about S3 on Outposts ARNs, see What is S3 on Outposts? - // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) - // in the Amazon S3 User Guide. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // Specifies the source object for the copy operation. You specify the value - // in one of two formats, depending on whether you want to access the source - // object through an access point (https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html): - // - // * For objects not accessed through an access point, specify the name of - // the source bucket and key of the source object, separated by a slash (/). - // For example, to copy the object reports/january.pdf from the bucket awsexamplebucket, - // use awsexamplebucket/reports/january.pdf. The value must be URL-encoded. - // - // * For objects accessed through access points, specify the Amazon Resource - // Name (ARN) of the object as accessed through the access point, in the - // format arn:aws:s3:::accesspoint//object/. - // For example, to copy the object reports/january.pdf through access point - // my-access-point owned by account 123456789012 in Region us-west-2, use - // the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf. - // The value must be URL encoded. Amazon S3 supports copy operations using - // Access points only when the source and destination buckets are in the - // same Amazon Web Services Region. Access points are not supported by directory - // buckets. Alternatively, for objects accessed through Amazon S3 on Outposts, - // specify the ARN of the object as accessed in the format arn:aws:s3-outposts:::outpost//object/. - // For example, to copy the object reports/january.pdf through outpost my-outpost - // owned by account 123456789012 in Region us-west-2, use the URL encoding - // of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf. - // The value must be URL-encoded. - // - // If your bucket has versioning enabled, you could have multiple versions of - // the same object. By default, x-amz-copy-source identifies the current version - // of the source object to copy. To copy a specific version of the source object - // to copy, append ?versionId= to the x-amz-copy-source request - // header (for example, x-amz-copy-source: /awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893). - // - // If the current version is a delete marker and you don't specify a versionId - // in the x-amz-copy-source request header, Amazon S3 returns a 404 Not Found - // error, because the object does not exist. If you specify versionId in the - // x-amz-copy-source and the versionId is a delete marker, Amazon S3 returns - // an HTTP 400 Bad Request error, because you are not allowed to specify a delete - // marker as a version for the x-amz-copy-source. - // - // Directory buckets - S3 Versioning isn't enabled and supported for directory - // buckets. - // - // CopySource is a required field - CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"` - - // Copies the object if its entity tag (ETag) matches the specified tag. - // - // If both of the x-amz-copy-source-if-match and x-amz-copy-source-if-unmodified-since - // headers are present in the request as follows: - // - // x-amz-copy-source-if-match condition evaluates to true, and; - // - // x-amz-copy-source-if-unmodified-since condition evaluates to false; - // - // Amazon S3 returns 200 OK and copies the data. - CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"` - - // Copies the object if it has been modified since the specified time. - // - // If both of the x-amz-copy-source-if-none-match and x-amz-copy-source-if-modified-since - // headers are present in the request as follows: - // - // x-amz-copy-source-if-none-match condition evaluates to false, and; - // - // x-amz-copy-source-if-modified-since condition evaluates to true; - // - // Amazon S3 returns 412 Precondition Failed response code. - CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp"` - - // Copies the object if its entity tag (ETag) is different than the specified - // ETag. - // - // If both of the x-amz-copy-source-if-none-match and x-amz-copy-source-if-modified-since - // headers are present in the request as follows: - // - // x-amz-copy-source-if-none-match condition evaluates to false, and; - // - // x-amz-copy-source-if-modified-since condition evaluates to true; - // - // Amazon S3 returns 412 Precondition Failed response code. - CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"` - - // Copies the object if it hasn't been modified since the specified time. - // - // If both of the x-amz-copy-source-if-match and x-amz-copy-source-if-unmodified-since - // headers are present in the request as follows: - // - // x-amz-copy-source-if-match condition evaluates to true, and; - // - // x-amz-copy-source-if-unmodified-since condition evaluates to false; - // - // Amazon S3 returns 200 OK and copies the data. - CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp"` - - // The range of bytes to copy from the source object. The range value must use - // the form bytes=first-last, where the first and last are the zero-based byte - // offsets to copy. For example, bytes=0-9 indicates that you want to copy the - // first 10 bytes of the source. You can copy a range only if the source object - // is greater than 5 MB. - CopySourceRange *string `location:"header" locationName:"x-amz-copy-source-range" type:"string"` - - // Specifies the algorithm to use when decrypting the source object (for example, - // AES256). - // - // This functionality is not supported when the source object is in a directory - // bucket. - CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"` - - // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt - // the source object. The encryption key provided in this header must be one - // that was used when the source object was created. - // - // This functionality is not supported when the source object is in a directory - // bucket. - // - // CopySourceSSECustomerKey is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by UploadPartCopyInput's - // String and GoString methods. - CopySourceSSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string" sensitive:"true"` - - // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. - // Amazon S3 uses this header for a message integrity check to ensure that the - // encryption key was transmitted without error. - // - // This functionality is not supported when the source object is in a directory - // bucket. - CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"` - - // The account ID of the expected destination bucket owner. If the account ID - // that you provide does not match the actual owner of the destination bucket, - // the request fails with the HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // The account ID of the expected source bucket owner. If the account ID that - // you provide does not match the actual owner of the source bucket, the request - // fails with the HTTP status code 403 Forbidden (access denied). - ExpectedSourceBucketOwner *string `location:"header" locationName:"x-amz-source-expected-bucket-owner" type:"string"` - - // Object key for which the multipart upload was initiated. - // - // Key is a required field - Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - - // Part number of part being copied. This is a positive integer between 1 and - // 10,000. - // - // PartNumber is a required field - PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"` - - // Confirms that the requester knows that they will be charged for the request. - // Bucket owners need not specify this parameter in their requests. If either - // the source or destination S3 bucket has Requester Pays enabled, the requester - // will pay for corresponding charges to copy the object. For information about - // downloading objects from Requester Pays buckets, see Downloading Objects - // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` - - // Specifies the algorithm to use when encrypting the object (for example, AES256). - // - // This functionality is not supported when the destination bucket is a directory - // bucket. - SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` - - // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting - // data. This value is used to store the object and then it is discarded; Amazon - // S3 does not store the encryption key. The key must be appropriate for use - // with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm - // header. This must be the same encryption key specified in the initiate multipart - // upload request. - // - // This functionality is not supported when the destination bucket is a directory - // bucket. - // - // SSECustomerKey is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by UploadPartCopyInput's - // String and GoString methods. - SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"` - - // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. - // Amazon S3 uses this header for a message integrity check to ensure that the - // encryption key was transmitted without error. - // - // This functionality is not supported when the destination bucket is a directory - // bucket. - SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` - - // Upload ID identifying the multipart upload whose part is being copied. - // - // UploadId is a required field - UploadId *string `location:"querystring" locationName:"uploadId" 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 UploadPartCopyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UploadPartCopyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UploadPartCopyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UploadPartCopyInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - if s.CopySource == nil { - invalidParams.Add(request.NewErrParamRequired("CopySource")) - } - 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.PartNumber == nil { - invalidParams.Add(request.NewErrParamRequired("PartNumber")) - } - if s.UploadId == nil { - invalidParams.Add(request.NewErrParamRequired("UploadId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBucket sets the Bucket field's value. -func (s *UploadPartCopyInput) SetBucket(v string) *UploadPartCopyInput { - s.Bucket = &v - return s -} - -func (s *UploadPartCopyInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetCopySource sets the CopySource field's value. -func (s *UploadPartCopyInput) SetCopySource(v string) *UploadPartCopyInput { - s.CopySource = &v - return s -} - -// SetCopySourceIfMatch sets the CopySourceIfMatch field's value. -func (s *UploadPartCopyInput) SetCopySourceIfMatch(v string) *UploadPartCopyInput { - s.CopySourceIfMatch = &v - return s -} - -// SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field's value. -func (s *UploadPartCopyInput) SetCopySourceIfModifiedSince(v time.Time) *UploadPartCopyInput { - s.CopySourceIfModifiedSince = &v - return s -} - -// SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field's value. -func (s *UploadPartCopyInput) SetCopySourceIfNoneMatch(v string) *UploadPartCopyInput { - s.CopySourceIfNoneMatch = &v - return s -} - -// SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field's value. -func (s *UploadPartCopyInput) SetCopySourceIfUnmodifiedSince(v time.Time) *UploadPartCopyInput { - s.CopySourceIfUnmodifiedSince = &v - return s -} - -// SetCopySourceRange sets the CopySourceRange field's value. -func (s *UploadPartCopyInput) SetCopySourceRange(v string) *UploadPartCopyInput { - s.CopySourceRange = &v - return s -} - -// SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field's value. -func (s *UploadPartCopyInput) SetCopySourceSSECustomerAlgorithm(v string) *UploadPartCopyInput { - s.CopySourceSSECustomerAlgorithm = &v - return s -} - -// SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field's value. -func (s *UploadPartCopyInput) SetCopySourceSSECustomerKey(v string) *UploadPartCopyInput { - s.CopySourceSSECustomerKey = &v - return s -} - -func (s *UploadPartCopyInput) getCopySourceSSECustomerKey() (v string) { - if s.CopySourceSSECustomerKey == nil { - return v - } - return *s.CopySourceSSECustomerKey -} - -// SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value. -func (s *UploadPartCopyInput) SetCopySourceSSECustomerKeyMD5(v string) *UploadPartCopyInput { - s.CopySourceSSECustomerKeyMD5 = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *UploadPartCopyInput) SetExpectedBucketOwner(v string) *UploadPartCopyInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetExpectedSourceBucketOwner sets the ExpectedSourceBucketOwner field's value. -func (s *UploadPartCopyInput) SetExpectedSourceBucketOwner(v string) *UploadPartCopyInput { - s.ExpectedSourceBucketOwner = &v - return s -} - -// SetKey sets the Key field's value. -func (s *UploadPartCopyInput) SetKey(v string) *UploadPartCopyInput { - s.Key = &v - return s -} - -// SetPartNumber sets the PartNumber field's value. -func (s *UploadPartCopyInput) SetPartNumber(v int64) *UploadPartCopyInput { - s.PartNumber = &v - return s -} - -// SetRequestPayer sets the RequestPayer field's value. -func (s *UploadPartCopyInput) SetRequestPayer(v string) *UploadPartCopyInput { - s.RequestPayer = &v - return s -} - -// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. -func (s *UploadPartCopyInput) SetSSECustomerAlgorithm(v string) *UploadPartCopyInput { - s.SSECustomerAlgorithm = &v - return s -} - -// SetSSECustomerKey sets the SSECustomerKey field's value. -func (s *UploadPartCopyInput) SetSSECustomerKey(v string) *UploadPartCopyInput { - s.SSECustomerKey = &v - return s -} - -func (s *UploadPartCopyInput) getSSECustomerKey() (v string) { - if s.SSECustomerKey == nil { - return v - } - return *s.SSECustomerKey -} - -// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. -func (s *UploadPartCopyInput) SetSSECustomerKeyMD5(v string) *UploadPartCopyInput { - s.SSECustomerKeyMD5 = &v - return s -} - -// SetUploadId sets the UploadId field's value. -func (s *UploadPartCopyInput) SetUploadId(v string) *UploadPartCopyInput { - s.UploadId = &v - return s -} - -func (s *UploadPartCopyInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *UploadPartCopyInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s UploadPartCopyInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type UploadPartCopyOutput struct { - _ struct{} `type:"structure" payload:"CopyPartResult"` - - // Indicates whether the multipart upload uses an S3 Bucket Key for server-side - // encryption with Key Management Service (KMS) keys (SSE-KMS). - // - // This functionality is not supported for directory buckets. - BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"` - - // Container for all response elements. - CopyPartResult *CopyPartResult `type:"structure"` - - // The version of the source object that was copied, if you have enabled versioning - // on the source bucket. - // - // This functionality is not supported when the source object is in a directory - // bucket. - CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"` - - // If present, indicates that the requester was successfully charged for the - // request. - // - // This functionality is not supported for directory buckets. - RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` - - // If server-side encryption with a customer-provided encryption key was requested, - // the response will include this header to confirm the encryption algorithm - // that's used. - // - // This functionality is not supported for directory buckets. - SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` - - // If server-side encryption with a customer-provided encryption key was requested, - // the response will include this header to provide the round-trip message integrity - // verification of the customer-provided encryption key. - // - // This functionality is not supported for directory buckets. - SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` - - // If present, indicates the ID of the Key Management Service (KMS) symmetric - // encryption customer managed key that was used for the object. - // - // This functionality is not supported for directory buckets. - // - // SSEKMSKeyId is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by UploadPartCopyOutput's - // String and GoString methods. - SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` - - // The server-side encryption algorithm used when you store this object in Amazon - // S3 (for example, AES256, aws:kms). - // - // For directory buckets, only server-side encryption with Amazon S3 managed - // keys (SSE-S3) (AES256) is supported. - ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UploadPartCopyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UploadPartCopyOutput) GoString() string { - return s.String() -} - -// SetBucketKeyEnabled sets the BucketKeyEnabled field's value. -func (s *UploadPartCopyOutput) SetBucketKeyEnabled(v bool) *UploadPartCopyOutput { - s.BucketKeyEnabled = &v - return s -} - -// SetCopyPartResult sets the CopyPartResult field's value. -func (s *UploadPartCopyOutput) SetCopyPartResult(v *CopyPartResult) *UploadPartCopyOutput { - s.CopyPartResult = v - return s -} - -// SetCopySourceVersionId sets the CopySourceVersionId field's value. -func (s *UploadPartCopyOutput) SetCopySourceVersionId(v string) *UploadPartCopyOutput { - s.CopySourceVersionId = &v - return s -} - -// SetRequestCharged sets the RequestCharged field's value. -func (s *UploadPartCopyOutput) SetRequestCharged(v string) *UploadPartCopyOutput { - s.RequestCharged = &v - return s -} - -// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. -func (s *UploadPartCopyOutput) SetSSECustomerAlgorithm(v string) *UploadPartCopyOutput { - s.SSECustomerAlgorithm = &v - return s -} - -// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. -func (s *UploadPartCopyOutput) SetSSECustomerKeyMD5(v string) *UploadPartCopyOutput { - s.SSECustomerKeyMD5 = &v - return s -} - -// SetSSEKMSKeyId sets the SSEKMSKeyId field's value. -func (s *UploadPartCopyOutput) SetSSEKMSKeyId(v string) *UploadPartCopyOutput { - s.SSEKMSKeyId = &v - return s -} - -// SetServerSideEncryption sets the ServerSideEncryption field's value. -func (s *UploadPartCopyOutput) SetServerSideEncryption(v string) *UploadPartCopyOutput { - s.ServerSideEncryption = &v - return s -} - -type UploadPartInput struct { - _ struct{} `locationName:"UploadPartRequest" type:"structure" payload:"Body"` - - // Object data. - Body io.ReadSeeker `type:"blob"` - - // The name of the bucket to which the multipart upload was initiated. - // - // Directory buckets - When you use this operation with a directory bucket, - // you must use virtual-hosted-style requests in the format Bucket_name.s3express-az_id.region.amazonaws.com. - // Path-style requests are not supported. Directory bucket names must be unique - // in the chosen Availability Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 - // (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about - // bucket naming restrictions, see Directory bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html) - // in the Amazon S3 User Guide. - // - // Access points - When you use this action with an access point, you must provide - // the alias of the access point in place of the bucket name or specify the - // access point ARN. When using the access point ARN, you must direct requests - // to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. - // When using this action with an access point through the Amazon Web Services - // SDKs, you provide the access point ARN in place of the bucket name. For more - // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html) - // in the Amazon S3 User Guide. - // - // Access points and Object Lambda access points are not supported by directory - // buckets. - // - // S3 on Outposts - When you use this action with Amazon S3 on Outposts, you - // must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname - // takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. - // When you use this action with S3 on Outposts through the Amazon Web Services - // SDKs, you provide the Outposts access point ARN in place of the bucket name. - // For more information about S3 on Outposts ARNs, see What is S3 on Outposts? - // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html) - // in the Amazon S3 User Guide. - // - // Bucket is a required field - Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - - // Indicates the algorithm used to create the checksum for the object when you - // use the SDK. This header will not provide any additional functionality if - // you don't use the SDK. When you send this header, there must be a corresponding - // x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the - // request with the HTTP status code 400 Bad Request. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - // - // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm - // parameter. - // - // This checksum algorithm must be the same for all parts and it match the checksum - // value supplied in the CreateMultipartUpload request. - // - // The AWS SDK for Go v1 does not support automatic computing request payload - // checksum. This feature is available in the AWS SDK for Go v2. If a value - // is specified for this parameter, the matching algorithm's checksum member - // must be populated with the algorithm's checksum of the request payload. - ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"` - - // This header can be used as a data integrity check to verify that the data - // received is the same data that was originally sent. This header specifies - // the base64-encoded, 32-bit CRC32 checksum of the object. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - ChecksumCRC32 *string `location:"header" locationName:"x-amz-checksum-crc32" type:"string"` - - // This header can be used as a data integrity check to verify that the data - // received is the same data that was originally sent. This header specifies - // the base64-encoded, 32-bit CRC32C checksum of the object. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - ChecksumCRC32C *string `location:"header" locationName:"x-amz-checksum-crc32c" type:"string"` - - // This header can be used as a data integrity check to verify that the data - // received is the same data that was originally sent. This header specifies - // the base64-encoded, 160-bit SHA-1 digest of the object. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - ChecksumSHA1 *string `location:"header" locationName:"x-amz-checksum-sha1" type:"string"` - - // This header can be used as a data integrity check to verify that the data - // received is the same data that was originally sent. This header specifies - // the base64-encoded, 256-bit SHA-256 digest of the object. For more information, - // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - ChecksumSHA256 *string `location:"header" locationName:"x-amz-checksum-sha256" type:"string"` - - // Size of the body in bytes. This parameter is useful when the size of the - // body cannot be determined automatically. - ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"` - - // The base64-encoded 128-bit MD5 digest of the part data. This parameter is - // auto-populated when using the command from the CLI. This parameter is required - // if object lock parameters are specified. - // - // This functionality is not supported for directory buckets. - ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"` - - // The account ID of the expected bucket owner. If the account ID that you provide - // does not match the actual owner of the bucket, the request fails with the - // HTTP status code 403 Forbidden (access denied). - ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"` - - // Object key for which the multipart upload was initiated. - // - // Key is a required field - Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` - - // Part number of part being uploaded. This is a positive integer between 1 - // and 10,000. - // - // PartNumber is a required field - PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"` - - // Confirms that the requester knows that they will be charged for the request. - // Bucket owners need not specify this parameter in their requests. If either - // the source or destination S3 bucket has Requester Pays enabled, the requester - // will pay for corresponding charges to copy the object. For information about - // downloading objects from Requester Pays buckets, see Downloading Objects - // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) - // in the Amazon S3 User Guide. - // - // This functionality is not supported for directory buckets. - RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` - - // Specifies the algorithm to use when encrypting the object (for example, AES256). - // - // This functionality is not supported for directory buckets. - SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` - - // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting - // data. This value is used to store the object and then it is discarded; Amazon - // S3 does not store the encryption key. The key must be appropriate for use - // with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm - // header. This must be the same encryption key specified in the initiate multipart - // upload request. - // - // This functionality is not supported for directory buckets. - // - // SSECustomerKey is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by UploadPartInput's - // String and GoString methods. - SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"` - - // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. - // Amazon S3 uses this header for a message integrity check to ensure that the - // encryption key was transmitted without error. - // - // This functionality is not supported for directory buckets. - SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` - - // Upload ID identifying the multipart upload whose part is being uploaded. - // - // UploadId is a required field - UploadId *string `location:"querystring" locationName:"uploadId" 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 UploadPartInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UploadPartInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UploadPartInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UploadPartInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) - } - if s.Bucket != nil && len(*s.Bucket) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) - } - 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.PartNumber == nil { - invalidParams.Add(request.NewErrParamRequired("PartNumber")) - } - if s.UploadId == nil { - invalidParams.Add(request.NewErrParamRequired("UploadId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBody sets the Body field's value. -func (s *UploadPartInput) SetBody(v io.ReadSeeker) *UploadPartInput { - s.Body = v - return s -} - -// SetBucket sets the Bucket field's value. -func (s *UploadPartInput) SetBucket(v string) *UploadPartInput { - s.Bucket = &v - return s -} - -func (s *UploadPartInput) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket -} - -// SetChecksumAlgorithm sets the ChecksumAlgorithm field's value. -func (s *UploadPartInput) SetChecksumAlgorithm(v string) *UploadPartInput { - s.ChecksumAlgorithm = &v - return s -} - -// SetChecksumCRC32 sets the ChecksumCRC32 field's value. -func (s *UploadPartInput) SetChecksumCRC32(v string) *UploadPartInput { - s.ChecksumCRC32 = &v - return s -} - -// SetChecksumCRC32C sets the ChecksumCRC32C field's value. -func (s *UploadPartInput) SetChecksumCRC32C(v string) *UploadPartInput { - s.ChecksumCRC32C = &v - return s -} - -// SetChecksumSHA1 sets the ChecksumSHA1 field's value. -func (s *UploadPartInput) SetChecksumSHA1(v string) *UploadPartInput { - s.ChecksumSHA1 = &v - return s -} - -// SetChecksumSHA256 sets the ChecksumSHA256 field's value. -func (s *UploadPartInput) SetChecksumSHA256(v string) *UploadPartInput { - s.ChecksumSHA256 = &v - return s -} - -// SetContentLength sets the ContentLength field's value. -func (s *UploadPartInput) SetContentLength(v int64) *UploadPartInput { - s.ContentLength = &v - return s -} - -// SetContentMD5 sets the ContentMD5 field's value. -func (s *UploadPartInput) SetContentMD5(v string) *UploadPartInput { - s.ContentMD5 = &v - return s -} - -// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value. -func (s *UploadPartInput) SetExpectedBucketOwner(v string) *UploadPartInput { - s.ExpectedBucketOwner = &v - return s -} - -// SetKey sets the Key field's value. -func (s *UploadPartInput) SetKey(v string) *UploadPartInput { - s.Key = &v - return s -} - -// SetPartNumber sets the PartNumber field's value. -func (s *UploadPartInput) SetPartNumber(v int64) *UploadPartInput { - s.PartNumber = &v - return s -} - -// SetRequestPayer sets the RequestPayer field's value. -func (s *UploadPartInput) SetRequestPayer(v string) *UploadPartInput { - s.RequestPayer = &v - return s -} - -// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. -func (s *UploadPartInput) SetSSECustomerAlgorithm(v string) *UploadPartInput { - s.SSECustomerAlgorithm = &v - return s -} - -// SetSSECustomerKey sets the SSECustomerKey field's value. -func (s *UploadPartInput) SetSSECustomerKey(v string) *UploadPartInput { - s.SSECustomerKey = &v - return s -} - -func (s *UploadPartInput) getSSECustomerKey() (v string) { - if s.SSECustomerKey == nil { - return v - } - return *s.SSECustomerKey -} - -// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. -func (s *UploadPartInput) SetSSECustomerKeyMD5(v string) *UploadPartInput { - s.SSECustomerKeyMD5 = &v - return s -} - -// SetUploadId sets the UploadId field's value. -func (s *UploadPartInput) SetUploadId(v string) *UploadPartInput { - s.UploadId = &v - return s -} - -func (s *UploadPartInput) getEndpointARN() (arn.Resource, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - return parseEndpointARN(*s.Bucket) -} - -func (s *UploadPartInput) hasEndpointARN() bool { - if s.Bucket == nil { - return false - } - return arn.IsARN(*s.Bucket) -} - -// updateArnableField updates the value of the input field that -// takes an ARN as an input. This method is useful to backfill -// the parsed resource name from ARN into the input member. -// It returns a pointer to a modified copy of input and an error. -// Note that original input is not modified. -func (s UploadPartInput) updateArnableField(v string) (interface{}, error) { - if s.Bucket == nil { - return nil, fmt.Errorf("member Bucket is nil") - } - s.Bucket = aws.String(v) - return &s, nil -} - -type UploadPartOutput struct { - _ struct{} `type:"structure"` - - // Indicates whether the multipart upload uses an S3 Bucket Key for server-side - // encryption with Key Management Service (KMS) keys (SSE-KMS). - // - // This functionality is not supported for directory buckets. - BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"` - - // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be - // present if it was uploaded with the object. When you use an API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumCRC32 *string `location:"header" locationName:"x-amz-checksum-crc32" type:"string"` - - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only - // be present if it was uploaded with the object. When you use an API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumCRC32C *string `location:"header" locationName:"x-amz-checksum-crc32c" type:"string"` - - // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be - // present if it was uploaded with the object. When you use the API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumSHA1 *string `location:"header" locationName:"x-amz-checksum-sha1" type:"string"` - - // The base64-encoded, 256-bit SHA-256 digest of the object. This will only - // be present if it was uploaded with the object. When you use an API operation - // on an object that was uploaded using multipart uploads, this value may not - // be a direct checksum value of the full object. Instead, it's a calculation - // based on the checksum values of each individual part. For more information - // about how checksums are calculated with multipart uploads, see Checking object - // integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums) - // in the Amazon S3 User Guide. - ChecksumSHA256 *string `location:"header" locationName:"x-amz-checksum-sha256" type:"string"` - - // Entity tag for the uploaded object. - ETag *string `location:"header" locationName:"ETag" type:"string"` - - // If present, indicates that the requester was successfully charged for the - // request. - // - // This functionality is not supported for directory buckets. - RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` - - // If server-side encryption with a customer-provided encryption key was requested, - // the response will include this header to confirm the encryption algorithm - // that's used. - // - // This functionality is not supported for directory buckets. - SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` - - // If server-side encryption with a customer-provided encryption key was requested, - // the response will include this header to provide the round-trip message integrity - // verification of the customer-provided encryption key. - // - // This functionality is not supported for directory buckets. - SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` - - // If present, indicates the ID of the Key Management Service (KMS) symmetric - // encryption customer managed key that was used for the object. - // - // This functionality is not supported for directory buckets. - // - // SSEKMSKeyId is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by UploadPartOutput's - // String and GoString methods. - SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` - - // The server-side encryption algorithm used when you store this object in Amazon - // S3 (for example, AES256, aws:kms). - // - // For directory buckets, only server-side encryption with Amazon S3 managed - // keys (SSE-S3) (AES256) is supported. - ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UploadPartOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UploadPartOutput) GoString() string { - return s.String() -} - -// SetBucketKeyEnabled sets the BucketKeyEnabled field's value. -func (s *UploadPartOutput) SetBucketKeyEnabled(v bool) *UploadPartOutput { - s.BucketKeyEnabled = &v - return s -} - -// SetChecksumCRC32 sets the ChecksumCRC32 field's value. -func (s *UploadPartOutput) SetChecksumCRC32(v string) *UploadPartOutput { - s.ChecksumCRC32 = &v - return s -} - -// SetChecksumCRC32C sets the ChecksumCRC32C field's value. -func (s *UploadPartOutput) SetChecksumCRC32C(v string) *UploadPartOutput { - s.ChecksumCRC32C = &v - return s -} - -// SetChecksumSHA1 sets the ChecksumSHA1 field's value. -func (s *UploadPartOutput) SetChecksumSHA1(v string) *UploadPartOutput { - s.ChecksumSHA1 = &v - return s -} - -// SetChecksumSHA256 sets the ChecksumSHA256 field's value. -func (s *UploadPartOutput) SetChecksumSHA256(v string) *UploadPartOutput { - s.ChecksumSHA256 = &v - return s -} - -// SetETag sets the ETag field's value. -func (s *UploadPartOutput) SetETag(v string) *UploadPartOutput { - s.ETag = &v - return s -} - -// SetRequestCharged sets the RequestCharged field's value. -func (s *UploadPartOutput) SetRequestCharged(v string) *UploadPartOutput { - s.RequestCharged = &v - return s -} - -// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. -func (s *UploadPartOutput) SetSSECustomerAlgorithm(v string) *UploadPartOutput { - s.SSECustomerAlgorithm = &v - return s -} - -// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. -func (s *UploadPartOutput) SetSSECustomerKeyMD5(v string) *UploadPartOutput { - s.SSECustomerKeyMD5 = &v - return s -} - -// SetSSEKMSKeyId sets the SSEKMSKeyId field's value. -func (s *UploadPartOutput) SetSSEKMSKeyId(v string) *UploadPartOutput { - s.SSEKMSKeyId = &v - return s -} - -// SetServerSideEncryption sets the ServerSideEncryption field's value. -func (s *UploadPartOutput) SetServerSideEncryption(v string) *UploadPartOutput { - s.ServerSideEncryption = &v - return s -} - -// Describes the versioning state of an Amazon S3 bucket. For more information, -// see PUT Bucket versioning (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTVersioningStatus.html) -// in the Amazon S3 API Reference. -type VersioningConfiguration struct { - _ struct{} `type:"structure"` - - // Specifies whether MFA delete is enabled in the bucket versioning configuration. - // This element is only returned if the bucket has been configured with MFA - // delete. If the bucket has never been so configured, this element is not returned. - MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADelete"` - - // The versioning state of the bucket. - Status *string `type:"string" enum:"BucketVersioningStatus"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s VersioningConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s VersioningConfiguration) GoString() string { - return s.String() -} - -// SetMFADelete sets the MFADelete field's value. -func (s *VersioningConfiguration) SetMFADelete(v string) *VersioningConfiguration { - s.MFADelete = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *VersioningConfiguration) SetStatus(v string) *VersioningConfiguration { - s.Status = &v - return s -} - -// Specifies website configuration parameters for an Amazon S3 bucket. -type WebsiteConfiguration struct { - _ struct{} `type:"structure"` - - // The name of the error document for the website. - ErrorDocument *ErrorDocument `type:"structure"` - - // The name of the index document for the website. - IndexDocument *IndexDocument `type:"structure"` - - // The redirect behavior for every request to this bucket's website endpoint. - // - // If you specify this property, you can't specify any other property. - RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"` - - // Rules that define when a redirect is applied and the redirect behavior. - RoutingRules []*RoutingRule `locationNameList:"RoutingRule" 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 WebsiteConfiguration) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s WebsiteConfiguration) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *WebsiteConfiguration) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "WebsiteConfiguration"} - if s.ErrorDocument != nil { - if err := s.ErrorDocument.Validate(); err != nil { - invalidParams.AddNested("ErrorDocument", err.(request.ErrInvalidParams)) - } - } - if s.IndexDocument != nil { - if err := s.IndexDocument.Validate(); err != nil { - invalidParams.AddNested("IndexDocument", err.(request.ErrInvalidParams)) - } - } - if s.RedirectAllRequestsTo != nil { - if err := s.RedirectAllRequestsTo.Validate(); err != nil { - invalidParams.AddNested("RedirectAllRequestsTo", err.(request.ErrInvalidParams)) - } - } - if s.RoutingRules != nil { - for i, v := range s.RoutingRules { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RoutingRules", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetErrorDocument sets the ErrorDocument field's value. -func (s *WebsiteConfiguration) SetErrorDocument(v *ErrorDocument) *WebsiteConfiguration { - s.ErrorDocument = v - return s -} - -// SetIndexDocument sets the IndexDocument field's value. -func (s *WebsiteConfiguration) SetIndexDocument(v *IndexDocument) *WebsiteConfiguration { - s.IndexDocument = v - return s -} - -// SetRedirectAllRequestsTo sets the RedirectAllRequestsTo field's value. -func (s *WebsiteConfiguration) SetRedirectAllRequestsTo(v *RedirectAllRequestsTo) *WebsiteConfiguration { - s.RedirectAllRequestsTo = v - return s -} - -// SetRoutingRules sets the RoutingRules field's value. -func (s *WebsiteConfiguration) SetRoutingRules(v []*RoutingRule) *WebsiteConfiguration { - s.RoutingRules = v - return s -} - -type WriteGetObjectResponseInput struct { - _ struct{} `locationName:"WriteGetObjectResponseRequest" type:"structure" payload:"Body"` - - // Indicates that a range of bytes was specified. - AcceptRanges *string `location:"header" locationName:"x-amz-fwd-header-accept-ranges" type:"string"` - - // The object data. - // - // To use an non-seekable io.Reader for this request wrap the io.Reader with - // "aws.ReadSeekCloser". The SDK will not retry request errors for non-seekable - // readers. This will allow the SDK to send the reader's payload as chunked - // transfer encoding. - Body io.ReadSeeker `type:"blob"` - - // Indicates whether the object stored in Amazon S3 uses an S3 bucket key for - // server-side encryption with Amazon Web Services KMS (SSE-KMS). - BucketKeyEnabled *bool `location:"header" locationName:"x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"` - - // Specifies caching behavior along the request/reply chain. - CacheControl *string `location:"header" locationName:"x-amz-fwd-header-Cache-Control" type:"string"` - - // This header can be used as a data integrity check to verify that the data - // received is the same data that was originally sent. This specifies the base64-encoded, - // 32-bit CRC32 checksum of the object returned by the Object Lambda function. - // This may not match the checksum for the object stored in Amazon S3. Amazon - // S3 will perform validation of the checksum values only when the original - // GetObject request required checksum validation. For more information about - // checksums, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - // - // Only one checksum header can be specified at a time. If you supply multiple - // checksum headers, this request will fail. - ChecksumCRC32 *string `location:"header" locationName:"x-amz-fwd-header-x-amz-checksum-crc32" type:"string"` - - // This header can be used as a data integrity check to verify that the data - // received is the same data that was originally sent. This specifies the base64-encoded, - // 32-bit CRC32C checksum of the object returned by the Object Lambda function. - // This may not match the checksum for the object stored in Amazon S3. Amazon - // S3 will perform validation of the checksum values only when the original - // GetObject request required checksum validation. For more information about - // checksums, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - // - // Only one checksum header can be specified at a time. If you supply multiple - // checksum headers, this request will fail. - ChecksumCRC32C *string `location:"header" locationName:"x-amz-fwd-header-x-amz-checksum-crc32c" type:"string"` - - // This header can be used as a data integrity check to verify that the data - // received is the same data that was originally sent. This specifies the base64-encoded, - // 160-bit SHA-1 digest of the object returned by the Object Lambda function. - // This may not match the checksum for the object stored in Amazon S3. Amazon - // S3 will perform validation of the checksum values only when the original - // GetObject request required checksum validation. For more information about - // checksums, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - // - // Only one checksum header can be specified at a time. If you supply multiple - // checksum headers, this request will fail. - ChecksumSHA1 *string `location:"header" locationName:"x-amz-fwd-header-x-amz-checksum-sha1" type:"string"` - - // This header can be used as a data integrity check to verify that the data - // received is the same data that was originally sent. This specifies the base64-encoded, - // 256-bit SHA-256 digest of the object returned by the Object Lambda function. - // This may not match the checksum for the object stored in Amazon S3. Amazon - // S3 will perform validation of the checksum values only when the original - // GetObject request required checksum validation. For more information about - // checksums, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html) - // in the Amazon S3 User Guide. - // - // Only one checksum header can be specified at a time. If you supply multiple - // checksum headers, this request will fail. - ChecksumSHA256 *string `location:"header" locationName:"x-amz-fwd-header-x-amz-checksum-sha256" type:"string"` - - // Specifies presentational information for the object. - ContentDisposition *string `location:"header" locationName:"x-amz-fwd-header-Content-Disposition" type:"string"` - - // Specifies what content encodings have been applied to the object and thus - // what decoding mechanisms must be applied to obtain the media-type referenced - // by the Content-Type header field. - ContentEncoding *string `location:"header" locationName:"x-amz-fwd-header-Content-Encoding" type:"string"` - - // The language the content is in. - ContentLanguage *string `location:"header" locationName:"x-amz-fwd-header-Content-Language" type:"string"` - - // The size of the content body in bytes. - ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"` - - // The portion of the object returned in the response. - ContentRange *string `location:"header" locationName:"x-amz-fwd-header-Content-Range" type:"string"` - - // A standard MIME type describing the format of the object data. - ContentType *string `location:"header" locationName:"x-amz-fwd-header-Content-Type" type:"string"` - - // Specifies whether an object stored in Amazon S3 is (true) or is not (false) - // a delete marker. - DeleteMarker *bool `location:"header" locationName:"x-amz-fwd-header-x-amz-delete-marker" type:"boolean"` - - // An opaque identifier assigned by a web server to a specific version of a - // resource found at a URL. - ETag *string `location:"header" locationName:"x-amz-fwd-header-ETag" type:"string"` - - // A string that uniquely identifies an error condition. Returned in the - // tag of the error XML response for a corresponding GetObject call. Cannot - // be used with a successful StatusCode header or when the transformed object - // is provided in the body. All error codes from S3 are sentence-cased. The - // regular expression (regex) value is "^[A-Z][a-zA-Z]+$". - ErrorCode *string `location:"header" locationName:"x-amz-fwd-error-code" type:"string"` - - // Contains a generic description of the error condition. Returned in the - // tag of the error XML response for a corresponding GetObject call. Cannot - // be used with a successful StatusCode header or when the transformed object - // is provided in body. - ErrorMessage *string `location:"header" locationName:"x-amz-fwd-error-message" type:"string"` - - // If the object expiration is configured (see PUT Bucket lifecycle), the response - // includes this header. It includes the expiry-date and rule-id key-value pairs - // that provide the object expiration information. The value of the rule-id - // is URL-encoded. - Expiration *string `location:"header" locationName:"x-amz-fwd-header-x-amz-expiration" type:"string"` - - // The date and time at which the object is no longer cacheable. - Expires *time.Time `location:"header" locationName:"x-amz-fwd-header-Expires" type:"timestamp"` - - // The date and time that the object was last modified. - LastModified *time.Time `location:"header" locationName:"x-amz-fwd-header-Last-Modified" type:"timestamp"` - - // A map of metadata to store with the object in S3. - Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"` - - // Set to the number of metadata entries not returned in x-amz-meta headers. - // This can happen if you create metadata using an API like SOAP that supports - // more flexible metadata than the REST API. For example, using SOAP, you can - // create metadata whose values are not legal HTTP headers. - MissingMeta *int64 `location:"header" locationName:"x-amz-fwd-header-x-amz-missing-meta" type:"integer"` - - // Indicates whether an object stored in Amazon S3 has an active legal hold. - ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-fwd-header-x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"` - - // Indicates whether an object stored in Amazon S3 has Object Lock enabled. - // For more information about S3 Object Lock, see Object Lock (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html). - ObjectLockMode *string `location:"header" locationName:"x-amz-fwd-header-x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"` - - // The date and time when Object Lock is configured to expire. - ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-fwd-header-x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"` - - // The count of parts this object has. - PartsCount *int64 `location:"header" locationName:"x-amz-fwd-header-x-amz-mp-parts-count" type:"integer"` - - // Indicates if request involves bucket that is either a source or destination - // in a Replication rule. For more information about S3 Replication, see Replication - // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/replication.html). - ReplicationStatus *string `location:"header" locationName:"x-amz-fwd-header-x-amz-replication-status" type:"string" enum:"ReplicationStatus"` - - // If present, indicates that the requester was successfully charged for the - // request. - // - // This functionality is not supported for directory buckets. - RequestCharged *string `location:"header" locationName:"x-amz-fwd-header-x-amz-request-charged" type:"string" enum:"RequestCharged"` - - // Route prefix to the HTTP URL generated. - // - // RequestRoute is a required field - RequestRoute *string `location:"header" locationName:"x-amz-request-route" type:"string" required:"true"` - - // A single use encrypted token that maps WriteGetObjectResponse to the end - // user GetObject request. - // - // RequestToken is a required field - RequestToken *string `location:"header" locationName:"x-amz-request-token" type:"string" required:"true"` - - // Provides information about object restoration operation and expiration time - // of the restored object copy. - Restore *string `location:"header" locationName:"x-amz-fwd-header-x-amz-restore" type:"string"` - - // Encryption algorithm used if server-side encryption with a customer-provided - // encryption key was specified for object stored in Amazon S3. - SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm" type:"string"` - - // 128-bit MD5 digest of customer-provided encryption key used in Amazon S3 - // to encrypt data stored in S3. For more information, see Protecting data using - // server-side encryption with customer-provided encryption keys (SSE-C) (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html). - SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5" type:"string"` - - // If present, specifies the ID (Key ID, Key ARN, or Key Alias) of the Amazon - // Web Services Key Management Service (Amazon Web Services KMS) symmetric encryption - // customer managed key that was used for stored in Amazon S3 object. - // - // SSEKMSKeyId is a sensitive parameter and its value will be - // replaced with "sensitive" in string returned by WriteGetObjectResponseInput's - // String and GoString methods. - SSEKMSKeyId *string `location:"header" locationName:"x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` - - // The server-side encryption algorithm used when storing requested object in - // Amazon S3 (for example, AES256, aws:kms). - ServerSideEncryption *string `location:"header" locationName:"x-amz-fwd-header-x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"` - - // The integer status code for an HTTP response of a corresponding GetObject - // request. The following is a list of status codes. - // - // * 200 - OK - // - // * 206 - Partial Content - // - // * 304 - Not Modified - // - // * 400 - Bad Request - // - // * 401 - Unauthorized - // - // * 403 - Forbidden - // - // * 404 - Not Found - // - // * 405 - Method Not Allowed - // - // * 409 - Conflict - // - // * 411 - Length Required - // - // * 412 - Precondition Failed - // - // * 416 - Range Not Satisfiable - // - // * 500 - Internal Server Error - // - // * 503 - Service Unavailable - StatusCode *int64 `location:"header" locationName:"x-amz-fwd-status" type:"integer"` - - // Provides storage class information of the object. Amazon S3 returns this - // header for all objects except for S3 Standard storage class objects. - // - // For more information, see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html). - StorageClass *string `location:"header" locationName:"x-amz-fwd-header-x-amz-storage-class" type:"string" enum:"StorageClass"` - - // The number of tags, if any, on the object. - TagCount *int64 `location:"header" locationName:"x-amz-fwd-header-x-amz-tagging-count" type:"integer"` - - // An ID used to reference a specific version of the object. - VersionId *string `location:"header" locationName:"x-amz-fwd-header-x-amz-version-id" 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 WriteGetObjectResponseInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s WriteGetObjectResponseInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *WriteGetObjectResponseInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "WriteGetObjectResponseInput"} - if s.RequestRoute == nil { - invalidParams.Add(request.NewErrParamRequired("RequestRoute")) - } - if s.RequestRoute != nil && len(*s.RequestRoute) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RequestRoute", 1)) - } - if s.RequestToken == nil { - invalidParams.Add(request.NewErrParamRequired("RequestToken")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptRanges sets the AcceptRanges field's value. -func (s *WriteGetObjectResponseInput) SetAcceptRanges(v string) *WriteGetObjectResponseInput { - s.AcceptRanges = &v - return s -} - -// SetBody sets the Body field's value. -func (s *WriteGetObjectResponseInput) SetBody(v io.ReadSeeker) *WriteGetObjectResponseInput { - s.Body = v - return s -} - -// SetBucketKeyEnabled sets the BucketKeyEnabled field's value. -func (s *WriteGetObjectResponseInput) SetBucketKeyEnabled(v bool) *WriteGetObjectResponseInput { - s.BucketKeyEnabled = &v - return s -} - -// SetCacheControl sets the CacheControl field's value. -func (s *WriteGetObjectResponseInput) SetCacheControl(v string) *WriteGetObjectResponseInput { - s.CacheControl = &v - return s -} - -// SetChecksumCRC32 sets the ChecksumCRC32 field's value. -func (s *WriteGetObjectResponseInput) SetChecksumCRC32(v string) *WriteGetObjectResponseInput { - s.ChecksumCRC32 = &v - return s -} - -// SetChecksumCRC32C sets the ChecksumCRC32C field's value. -func (s *WriteGetObjectResponseInput) SetChecksumCRC32C(v string) *WriteGetObjectResponseInput { - s.ChecksumCRC32C = &v - return s -} - -// SetChecksumSHA1 sets the ChecksumSHA1 field's value. -func (s *WriteGetObjectResponseInput) SetChecksumSHA1(v string) *WriteGetObjectResponseInput { - s.ChecksumSHA1 = &v - return s -} - -// SetChecksumSHA256 sets the ChecksumSHA256 field's value. -func (s *WriteGetObjectResponseInput) SetChecksumSHA256(v string) *WriteGetObjectResponseInput { - s.ChecksumSHA256 = &v - return s -} - -// SetContentDisposition sets the ContentDisposition field's value. -func (s *WriteGetObjectResponseInput) SetContentDisposition(v string) *WriteGetObjectResponseInput { - s.ContentDisposition = &v - return s -} - -// SetContentEncoding sets the ContentEncoding field's value. -func (s *WriteGetObjectResponseInput) SetContentEncoding(v string) *WriteGetObjectResponseInput { - s.ContentEncoding = &v - return s -} - -// SetContentLanguage sets the ContentLanguage field's value. -func (s *WriteGetObjectResponseInput) SetContentLanguage(v string) *WriteGetObjectResponseInput { - s.ContentLanguage = &v - return s -} - -// SetContentLength sets the ContentLength field's value. -func (s *WriteGetObjectResponseInput) SetContentLength(v int64) *WriteGetObjectResponseInput { - s.ContentLength = &v - return s -} - -// SetContentRange sets the ContentRange field's value. -func (s *WriteGetObjectResponseInput) SetContentRange(v string) *WriteGetObjectResponseInput { - s.ContentRange = &v - return s -} - -// SetContentType sets the ContentType field's value. -func (s *WriteGetObjectResponseInput) SetContentType(v string) *WriteGetObjectResponseInput { - s.ContentType = &v - return s -} - -// SetDeleteMarker sets the DeleteMarker field's value. -func (s *WriteGetObjectResponseInput) SetDeleteMarker(v bool) *WriteGetObjectResponseInput { - s.DeleteMarker = &v - return s -} - -// SetETag sets the ETag field's value. -func (s *WriteGetObjectResponseInput) SetETag(v string) *WriteGetObjectResponseInput { - s.ETag = &v - return s -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *WriteGetObjectResponseInput) SetErrorCode(v string) *WriteGetObjectResponseInput { - s.ErrorCode = &v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *WriteGetObjectResponseInput) SetErrorMessage(v string) *WriteGetObjectResponseInput { - s.ErrorMessage = &v - return s -} - -// SetExpiration sets the Expiration field's value. -func (s *WriteGetObjectResponseInput) SetExpiration(v string) *WriteGetObjectResponseInput { - s.Expiration = &v - return s -} - -// SetExpires sets the Expires field's value. -func (s *WriteGetObjectResponseInput) SetExpires(v time.Time) *WriteGetObjectResponseInput { - s.Expires = &v - return s -} - -// SetLastModified sets the LastModified field's value. -func (s *WriteGetObjectResponseInput) SetLastModified(v time.Time) *WriteGetObjectResponseInput { - s.LastModified = &v - return s -} - -// SetMetadata sets the Metadata field's value. -func (s *WriteGetObjectResponseInput) SetMetadata(v map[string]*string) *WriteGetObjectResponseInput { - s.Metadata = v - return s -} - -// SetMissingMeta sets the MissingMeta field's value. -func (s *WriteGetObjectResponseInput) SetMissingMeta(v int64) *WriteGetObjectResponseInput { - s.MissingMeta = &v - return s -} - -// SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value. -func (s *WriteGetObjectResponseInput) SetObjectLockLegalHoldStatus(v string) *WriteGetObjectResponseInput { - s.ObjectLockLegalHoldStatus = &v - return s -} - -// SetObjectLockMode sets the ObjectLockMode field's value. -func (s *WriteGetObjectResponseInput) SetObjectLockMode(v string) *WriteGetObjectResponseInput { - s.ObjectLockMode = &v - return s -} - -// SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value. -func (s *WriteGetObjectResponseInput) SetObjectLockRetainUntilDate(v time.Time) *WriteGetObjectResponseInput { - s.ObjectLockRetainUntilDate = &v - return s -} - -// SetPartsCount sets the PartsCount field's value. -func (s *WriteGetObjectResponseInput) SetPartsCount(v int64) *WriteGetObjectResponseInput { - s.PartsCount = &v - return s -} - -// SetReplicationStatus sets the ReplicationStatus field's value. -func (s *WriteGetObjectResponseInput) SetReplicationStatus(v string) *WriteGetObjectResponseInput { - s.ReplicationStatus = &v - return s -} - -// SetRequestCharged sets the RequestCharged field's value. -func (s *WriteGetObjectResponseInput) SetRequestCharged(v string) *WriteGetObjectResponseInput { - s.RequestCharged = &v - return s -} - -// SetRequestRoute sets the RequestRoute field's value. -func (s *WriteGetObjectResponseInput) SetRequestRoute(v string) *WriteGetObjectResponseInput { - s.RequestRoute = &v - return s -} - -// SetRequestToken sets the RequestToken field's value. -func (s *WriteGetObjectResponseInput) SetRequestToken(v string) *WriteGetObjectResponseInput { - s.RequestToken = &v - return s -} - -// SetRestore sets the Restore field's value. -func (s *WriteGetObjectResponseInput) SetRestore(v string) *WriteGetObjectResponseInput { - s.Restore = &v - return s -} - -// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. -func (s *WriteGetObjectResponseInput) SetSSECustomerAlgorithm(v string) *WriteGetObjectResponseInput { - s.SSECustomerAlgorithm = &v - return s -} - -// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. -func (s *WriteGetObjectResponseInput) SetSSECustomerKeyMD5(v string) *WriteGetObjectResponseInput { - s.SSECustomerKeyMD5 = &v - return s -} - -// SetSSEKMSKeyId sets the SSEKMSKeyId field's value. -func (s *WriteGetObjectResponseInput) SetSSEKMSKeyId(v string) *WriteGetObjectResponseInput { - s.SSEKMSKeyId = &v - return s -} - -// SetServerSideEncryption sets the ServerSideEncryption field's value. -func (s *WriteGetObjectResponseInput) SetServerSideEncryption(v string) *WriteGetObjectResponseInput { - s.ServerSideEncryption = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *WriteGetObjectResponseInput) SetStatusCode(v int64) *WriteGetObjectResponseInput { - s.StatusCode = &v - return s -} - -// SetStorageClass sets the StorageClass field's value. -func (s *WriteGetObjectResponseInput) SetStorageClass(v string) *WriteGetObjectResponseInput { - s.StorageClass = &v - return s -} - -// SetTagCount sets the TagCount field's value. -func (s *WriteGetObjectResponseInput) SetTagCount(v int64) *WriteGetObjectResponseInput { - s.TagCount = &v - return s -} - -// SetVersionId sets the VersionId field's value. -func (s *WriteGetObjectResponseInput) SetVersionId(v string) *WriteGetObjectResponseInput { - s.VersionId = &v - return s -} - -func (s *WriteGetObjectResponseInput) hostLabels() map[string]string { - return map[string]string{ - "RequestRoute": aws.StringValue(s.RequestRoute), - } -} - -type WriteGetObjectResponseOutput 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 WriteGetObjectResponseOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s WriteGetObjectResponseOutput) GoString() string { - return s.String() -} - -const ( - // AnalyticsS3ExportFileFormatCsv is a AnalyticsS3ExportFileFormat enum value - AnalyticsS3ExportFileFormatCsv = "CSV" -) - -// AnalyticsS3ExportFileFormat_Values returns all elements of the AnalyticsS3ExportFileFormat enum -func AnalyticsS3ExportFileFormat_Values() []string { - return []string{ - AnalyticsS3ExportFileFormatCsv, - } -} - -const ( - // ArchiveStatusArchiveAccess is a ArchiveStatus enum value - ArchiveStatusArchiveAccess = "ARCHIVE_ACCESS" - - // ArchiveStatusDeepArchiveAccess is a ArchiveStatus enum value - ArchiveStatusDeepArchiveAccess = "DEEP_ARCHIVE_ACCESS" -) - -// ArchiveStatus_Values returns all elements of the ArchiveStatus enum -func ArchiveStatus_Values() []string { - return []string{ - ArchiveStatusArchiveAccess, - ArchiveStatusDeepArchiveAccess, - } -} - -const ( - // BucketAccelerateStatusEnabled is a BucketAccelerateStatus enum value - BucketAccelerateStatusEnabled = "Enabled" - - // BucketAccelerateStatusSuspended is a BucketAccelerateStatus enum value - BucketAccelerateStatusSuspended = "Suspended" -) - -// BucketAccelerateStatus_Values returns all elements of the BucketAccelerateStatus enum -func BucketAccelerateStatus_Values() []string { - return []string{ - BucketAccelerateStatusEnabled, - BucketAccelerateStatusSuspended, - } -} - -const ( - // BucketCannedACLPrivate is a BucketCannedACL enum value - BucketCannedACLPrivate = "private" - - // BucketCannedACLPublicRead is a BucketCannedACL enum value - BucketCannedACLPublicRead = "public-read" - - // BucketCannedACLPublicReadWrite is a BucketCannedACL enum value - BucketCannedACLPublicReadWrite = "public-read-write" - - // BucketCannedACLAuthenticatedRead is a BucketCannedACL enum value - BucketCannedACLAuthenticatedRead = "authenticated-read" -) - -// BucketCannedACL_Values returns all elements of the BucketCannedACL enum -func BucketCannedACL_Values() []string { - return []string{ - BucketCannedACLPrivate, - BucketCannedACLPublicRead, - BucketCannedACLPublicReadWrite, - BucketCannedACLAuthenticatedRead, - } -} - -const ( - // BucketLocationConstraintAfSouth1 is a BucketLocationConstraint enum value - BucketLocationConstraintAfSouth1 = "af-south-1" - - // BucketLocationConstraintApEast1 is a BucketLocationConstraint enum value - BucketLocationConstraintApEast1 = "ap-east-1" - - // BucketLocationConstraintApNortheast1 is a BucketLocationConstraint enum value - BucketLocationConstraintApNortheast1 = "ap-northeast-1" - - // BucketLocationConstraintApNortheast2 is a BucketLocationConstraint enum value - BucketLocationConstraintApNortheast2 = "ap-northeast-2" - - // BucketLocationConstraintApNortheast3 is a BucketLocationConstraint enum value - BucketLocationConstraintApNortheast3 = "ap-northeast-3" - - // BucketLocationConstraintApSouth1 is a BucketLocationConstraint enum value - BucketLocationConstraintApSouth1 = "ap-south-1" - - // BucketLocationConstraintApSouth2 is a BucketLocationConstraint enum value - BucketLocationConstraintApSouth2 = "ap-south-2" - - // BucketLocationConstraintApSoutheast1 is a BucketLocationConstraint enum value - BucketLocationConstraintApSoutheast1 = "ap-southeast-1" - - // BucketLocationConstraintApSoutheast2 is a BucketLocationConstraint enum value - BucketLocationConstraintApSoutheast2 = "ap-southeast-2" - - // BucketLocationConstraintApSoutheast3 is a BucketLocationConstraint enum value - BucketLocationConstraintApSoutheast3 = "ap-southeast-3" - - // BucketLocationConstraintCaCentral1 is a BucketLocationConstraint enum value - BucketLocationConstraintCaCentral1 = "ca-central-1" - - // BucketLocationConstraintCnNorth1 is a BucketLocationConstraint enum value - BucketLocationConstraintCnNorth1 = "cn-north-1" - - // BucketLocationConstraintCnNorthwest1 is a BucketLocationConstraint enum value - BucketLocationConstraintCnNorthwest1 = "cn-northwest-1" - - // BucketLocationConstraintEu is a BucketLocationConstraint enum value - BucketLocationConstraintEu = "EU" - - // BucketLocationConstraintEuCentral1 is a BucketLocationConstraint enum value - BucketLocationConstraintEuCentral1 = "eu-central-1" - - // BucketLocationConstraintEuNorth1 is a BucketLocationConstraint enum value - BucketLocationConstraintEuNorth1 = "eu-north-1" - - // BucketLocationConstraintEuSouth1 is a BucketLocationConstraint enum value - BucketLocationConstraintEuSouth1 = "eu-south-1" - - // BucketLocationConstraintEuSouth2 is a BucketLocationConstraint enum value - BucketLocationConstraintEuSouth2 = "eu-south-2" - - // BucketLocationConstraintEuWest1 is a BucketLocationConstraint enum value - BucketLocationConstraintEuWest1 = "eu-west-1" - - // BucketLocationConstraintEuWest2 is a BucketLocationConstraint enum value - BucketLocationConstraintEuWest2 = "eu-west-2" - - // BucketLocationConstraintEuWest3 is a BucketLocationConstraint enum value - BucketLocationConstraintEuWest3 = "eu-west-3" - - // BucketLocationConstraintMeSouth1 is a BucketLocationConstraint enum value - BucketLocationConstraintMeSouth1 = "me-south-1" - - // BucketLocationConstraintSaEast1 is a BucketLocationConstraint enum value - BucketLocationConstraintSaEast1 = "sa-east-1" - - // BucketLocationConstraintUsEast2 is a BucketLocationConstraint enum value - BucketLocationConstraintUsEast2 = "us-east-2" - - // BucketLocationConstraintUsGovEast1 is a BucketLocationConstraint enum value - BucketLocationConstraintUsGovEast1 = "us-gov-east-1" - - // BucketLocationConstraintUsGovWest1 is a BucketLocationConstraint enum value - BucketLocationConstraintUsGovWest1 = "us-gov-west-1" - - // BucketLocationConstraintUsWest1 is a BucketLocationConstraint enum value - BucketLocationConstraintUsWest1 = "us-west-1" - - // BucketLocationConstraintUsWest2 is a BucketLocationConstraint enum value - BucketLocationConstraintUsWest2 = "us-west-2" -) - -// BucketLocationConstraint_Values returns all elements of the BucketLocationConstraint enum -func BucketLocationConstraint_Values() []string { - return []string{ - BucketLocationConstraintAfSouth1, - BucketLocationConstraintApEast1, - BucketLocationConstraintApNortheast1, - BucketLocationConstraintApNortheast2, - BucketLocationConstraintApNortheast3, - BucketLocationConstraintApSouth1, - BucketLocationConstraintApSouth2, - BucketLocationConstraintApSoutheast1, - BucketLocationConstraintApSoutheast2, - BucketLocationConstraintApSoutheast3, - BucketLocationConstraintCaCentral1, - BucketLocationConstraintCnNorth1, - BucketLocationConstraintCnNorthwest1, - BucketLocationConstraintEu, - BucketLocationConstraintEuCentral1, - BucketLocationConstraintEuNorth1, - BucketLocationConstraintEuSouth1, - BucketLocationConstraintEuSouth2, - BucketLocationConstraintEuWest1, - BucketLocationConstraintEuWest2, - BucketLocationConstraintEuWest3, - BucketLocationConstraintMeSouth1, - BucketLocationConstraintSaEast1, - BucketLocationConstraintUsEast2, - BucketLocationConstraintUsGovEast1, - BucketLocationConstraintUsGovWest1, - BucketLocationConstraintUsWest1, - BucketLocationConstraintUsWest2, - } -} - -const ( - // BucketLogsPermissionFullControl is a BucketLogsPermission enum value - BucketLogsPermissionFullControl = "FULL_CONTROL" - - // BucketLogsPermissionRead is a BucketLogsPermission enum value - BucketLogsPermissionRead = "READ" - - // BucketLogsPermissionWrite is a BucketLogsPermission enum value - BucketLogsPermissionWrite = "WRITE" -) - -// BucketLogsPermission_Values returns all elements of the BucketLogsPermission enum -func BucketLogsPermission_Values() []string { - return []string{ - BucketLogsPermissionFullControl, - BucketLogsPermissionRead, - BucketLogsPermissionWrite, - } -} - -const ( - // BucketTypeDirectory is a BucketType enum value - BucketTypeDirectory = "Directory" -) - -// BucketType_Values returns all elements of the BucketType enum -func BucketType_Values() []string { - return []string{ - BucketTypeDirectory, - } -} - -const ( - // BucketVersioningStatusEnabled is a BucketVersioningStatus enum value - BucketVersioningStatusEnabled = "Enabled" - - // BucketVersioningStatusSuspended is a BucketVersioningStatus enum value - BucketVersioningStatusSuspended = "Suspended" -) - -// BucketVersioningStatus_Values returns all elements of the BucketVersioningStatus enum -func BucketVersioningStatus_Values() []string { - return []string{ - BucketVersioningStatusEnabled, - BucketVersioningStatusSuspended, - } -} - -const ( - // ChecksumAlgorithmCrc32 is a ChecksumAlgorithm enum value - ChecksumAlgorithmCrc32 = "CRC32" - - // ChecksumAlgorithmCrc32c is a ChecksumAlgorithm enum value - ChecksumAlgorithmCrc32c = "CRC32C" - - // ChecksumAlgorithmSha1 is a ChecksumAlgorithm enum value - ChecksumAlgorithmSha1 = "SHA1" - - // ChecksumAlgorithmSha256 is a ChecksumAlgorithm enum value - ChecksumAlgorithmSha256 = "SHA256" -) - -// ChecksumAlgorithm_Values returns all elements of the ChecksumAlgorithm enum -func ChecksumAlgorithm_Values() []string { - return []string{ - ChecksumAlgorithmCrc32, - ChecksumAlgorithmCrc32c, - ChecksumAlgorithmSha1, - ChecksumAlgorithmSha256, - } -} - -const ( - // ChecksumModeEnabled is a ChecksumMode enum value - ChecksumModeEnabled = "ENABLED" -) - -// ChecksumMode_Values returns all elements of the ChecksumMode enum -func ChecksumMode_Values() []string { - return []string{ - ChecksumModeEnabled, - } -} - -const ( - // CompressionTypeNone is a CompressionType enum value - CompressionTypeNone = "NONE" - - // CompressionTypeGzip is a CompressionType enum value - CompressionTypeGzip = "GZIP" - - // CompressionTypeBzip2 is a CompressionType enum value - CompressionTypeBzip2 = "BZIP2" -) - -// CompressionType_Values returns all elements of the CompressionType enum -func CompressionType_Values() []string { - return []string{ - CompressionTypeNone, - CompressionTypeGzip, - CompressionTypeBzip2, - } -} - -const ( - // DataRedundancySingleAvailabilityZone is a DataRedundancy enum value - DataRedundancySingleAvailabilityZone = "SingleAvailabilityZone" -) - -// DataRedundancy_Values returns all elements of the DataRedundancy enum -func DataRedundancy_Values() []string { - return []string{ - DataRedundancySingleAvailabilityZone, - } -} - -const ( - // DeleteMarkerReplicationStatusEnabled is a DeleteMarkerReplicationStatus enum value - DeleteMarkerReplicationStatusEnabled = "Enabled" - - // DeleteMarkerReplicationStatusDisabled is a DeleteMarkerReplicationStatus enum value - DeleteMarkerReplicationStatusDisabled = "Disabled" -) - -// DeleteMarkerReplicationStatus_Values returns all elements of the DeleteMarkerReplicationStatus enum -func DeleteMarkerReplicationStatus_Values() []string { - return []string{ - DeleteMarkerReplicationStatusEnabled, - DeleteMarkerReplicationStatusDisabled, - } -} - -// Requests Amazon S3 to encode the object keys in the response and specifies -// the encoding method to use. An object key can contain any Unicode character; -// however, the XML 1.0 parser cannot parse some characters, such as characters -// with an ASCII value from 0 to 10. For characters that are not supported in -// XML 1.0, you can add this parameter to request that Amazon S3 encode the -// keys in the response. -const ( - // EncodingTypeUrl is a EncodingType enum value - EncodingTypeUrl = "url" -) - -// EncodingType_Values returns all elements of the EncodingType enum -func EncodingType_Values() []string { - return []string{ - EncodingTypeUrl, - } -} - -// The bucket event for which to send notifications. -const ( - // EventS3ReducedRedundancyLostObject is a Event enum value - EventS3ReducedRedundancyLostObject = "s3:ReducedRedundancyLostObject" - - // EventS3ObjectCreated is a Event enum value - EventS3ObjectCreated = "s3:ObjectCreated:*" - - // EventS3ObjectCreatedPut is a Event enum value - EventS3ObjectCreatedPut = "s3:ObjectCreated:Put" - - // EventS3ObjectCreatedPost is a Event enum value - EventS3ObjectCreatedPost = "s3:ObjectCreated:Post" - - // EventS3ObjectCreatedCopy is a Event enum value - EventS3ObjectCreatedCopy = "s3:ObjectCreated:Copy" - - // EventS3ObjectCreatedCompleteMultipartUpload is a Event enum value - EventS3ObjectCreatedCompleteMultipartUpload = "s3:ObjectCreated:CompleteMultipartUpload" - - // EventS3ObjectRemoved is a Event enum value - EventS3ObjectRemoved = "s3:ObjectRemoved:*" - - // EventS3ObjectRemovedDelete is a Event enum value - EventS3ObjectRemovedDelete = "s3:ObjectRemoved:Delete" - - // EventS3ObjectRemovedDeleteMarkerCreated is a Event enum value - EventS3ObjectRemovedDeleteMarkerCreated = "s3:ObjectRemoved:DeleteMarkerCreated" - - // EventS3ObjectRestore is a Event enum value - EventS3ObjectRestore = "s3:ObjectRestore:*" - - // EventS3ObjectRestorePost is a Event enum value - EventS3ObjectRestorePost = "s3:ObjectRestore:Post" - - // EventS3ObjectRestoreCompleted is a Event enum value - EventS3ObjectRestoreCompleted = "s3:ObjectRestore:Completed" - - // EventS3Replication is a Event enum value - EventS3Replication = "s3:Replication:*" - - // EventS3ReplicationOperationFailedReplication is a Event enum value - EventS3ReplicationOperationFailedReplication = "s3:Replication:OperationFailedReplication" - - // EventS3ReplicationOperationNotTracked is a Event enum value - EventS3ReplicationOperationNotTracked = "s3:Replication:OperationNotTracked" - - // EventS3ReplicationOperationMissedThreshold is a Event enum value - EventS3ReplicationOperationMissedThreshold = "s3:Replication:OperationMissedThreshold" - - // EventS3ReplicationOperationReplicatedAfterThreshold is a Event enum value - EventS3ReplicationOperationReplicatedAfterThreshold = "s3:Replication:OperationReplicatedAfterThreshold" - - // EventS3ObjectRestoreDelete is a Event enum value - EventS3ObjectRestoreDelete = "s3:ObjectRestore:Delete" - - // EventS3LifecycleTransition is a Event enum value - EventS3LifecycleTransition = "s3:LifecycleTransition" - - // EventS3IntelligentTiering is a Event enum value - EventS3IntelligentTiering = "s3:IntelligentTiering" - - // EventS3ObjectAclPut is a Event enum value - EventS3ObjectAclPut = "s3:ObjectAcl:Put" - - // EventS3LifecycleExpiration is a Event enum value - EventS3LifecycleExpiration = "s3:LifecycleExpiration:*" - - // EventS3LifecycleExpirationDelete is a Event enum value - EventS3LifecycleExpirationDelete = "s3:LifecycleExpiration:Delete" - - // EventS3LifecycleExpirationDeleteMarkerCreated is a Event enum value - EventS3LifecycleExpirationDeleteMarkerCreated = "s3:LifecycleExpiration:DeleteMarkerCreated" - - // EventS3ObjectTagging is a Event enum value - EventS3ObjectTagging = "s3:ObjectTagging:*" - - // EventS3ObjectTaggingPut is a Event enum value - EventS3ObjectTaggingPut = "s3:ObjectTagging:Put" - - // EventS3ObjectTaggingDelete is a Event enum value - EventS3ObjectTaggingDelete = "s3:ObjectTagging:Delete" -) - -// Event_Values returns all elements of the Event enum -func Event_Values() []string { - return []string{ - EventS3ReducedRedundancyLostObject, - EventS3ObjectCreated, - EventS3ObjectCreatedPut, - EventS3ObjectCreatedPost, - EventS3ObjectCreatedCopy, - EventS3ObjectCreatedCompleteMultipartUpload, - EventS3ObjectRemoved, - EventS3ObjectRemovedDelete, - EventS3ObjectRemovedDeleteMarkerCreated, - EventS3ObjectRestore, - EventS3ObjectRestorePost, - EventS3ObjectRestoreCompleted, - EventS3Replication, - EventS3ReplicationOperationFailedReplication, - EventS3ReplicationOperationNotTracked, - EventS3ReplicationOperationMissedThreshold, - EventS3ReplicationOperationReplicatedAfterThreshold, - EventS3ObjectRestoreDelete, - EventS3LifecycleTransition, - EventS3IntelligentTiering, - EventS3ObjectAclPut, - EventS3LifecycleExpiration, - EventS3LifecycleExpirationDelete, - EventS3LifecycleExpirationDeleteMarkerCreated, - EventS3ObjectTagging, - EventS3ObjectTaggingPut, - EventS3ObjectTaggingDelete, - } -} - -const ( - // ExistingObjectReplicationStatusEnabled is a ExistingObjectReplicationStatus enum value - ExistingObjectReplicationStatusEnabled = "Enabled" - - // ExistingObjectReplicationStatusDisabled is a ExistingObjectReplicationStatus enum value - ExistingObjectReplicationStatusDisabled = "Disabled" -) - -// ExistingObjectReplicationStatus_Values returns all elements of the ExistingObjectReplicationStatus enum -func ExistingObjectReplicationStatus_Values() []string { - return []string{ - ExistingObjectReplicationStatusEnabled, - ExistingObjectReplicationStatusDisabled, - } -} - -const ( - // ExpirationStatusEnabled is a ExpirationStatus enum value - ExpirationStatusEnabled = "Enabled" - - // ExpirationStatusDisabled is a ExpirationStatus enum value - ExpirationStatusDisabled = "Disabled" -) - -// ExpirationStatus_Values returns all elements of the ExpirationStatus enum -func ExpirationStatus_Values() []string { - return []string{ - ExpirationStatusEnabled, - ExpirationStatusDisabled, - } -} - -const ( - // ExpressionTypeSql is a ExpressionType enum value - ExpressionTypeSql = "SQL" -) - -// ExpressionType_Values returns all elements of the ExpressionType enum -func ExpressionType_Values() []string { - return []string{ - ExpressionTypeSql, - } -} - -const ( - // FileHeaderInfoUse is a FileHeaderInfo enum value - FileHeaderInfoUse = "USE" - - // FileHeaderInfoIgnore is a FileHeaderInfo enum value - FileHeaderInfoIgnore = "IGNORE" - - // FileHeaderInfoNone is a FileHeaderInfo enum value - FileHeaderInfoNone = "NONE" -) - -// FileHeaderInfo_Values returns all elements of the FileHeaderInfo enum -func FileHeaderInfo_Values() []string { - return []string{ - FileHeaderInfoUse, - FileHeaderInfoIgnore, - FileHeaderInfoNone, - } -} - -const ( - // FilterRuleNamePrefix is a FilterRuleName enum value - FilterRuleNamePrefix = "prefix" - - // FilterRuleNameSuffix is a FilterRuleName enum value - FilterRuleNameSuffix = "suffix" -) - -// FilterRuleName_Values returns all elements of the FilterRuleName enum -func FilterRuleName_Values() []string { - return []string{ - FilterRuleNamePrefix, - FilterRuleNameSuffix, - } -} - -const ( - // IntelligentTieringAccessTierArchiveAccess is a IntelligentTieringAccessTier enum value - IntelligentTieringAccessTierArchiveAccess = "ARCHIVE_ACCESS" - - // IntelligentTieringAccessTierDeepArchiveAccess is a IntelligentTieringAccessTier enum value - IntelligentTieringAccessTierDeepArchiveAccess = "DEEP_ARCHIVE_ACCESS" -) - -// IntelligentTieringAccessTier_Values returns all elements of the IntelligentTieringAccessTier enum -func IntelligentTieringAccessTier_Values() []string { - return []string{ - IntelligentTieringAccessTierArchiveAccess, - IntelligentTieringAccessTierDeepArchiveAccess, - } -} - -const ( - // IntelligentTieringStatusEnabled is a IntelligentTieringStatus enum value - IntelligentTieringStatusEnabled = "Enabled" - - // IntelligentTieringStatusDisabled is a IntelligentTieringStatus enum value - IntelligentTieringStatusDisabled = "Disabled" -) - -// IntelligentTieringStatus_Values returns all elements of the IntelligentTieringStatus enum -func IntelligentTieringStatus_Values() []string { - return []string{ - IntelligentTieringStatusEnabled, - IntelligentTieringStatusDisabled, - } -} - -const ( - // InventoryFormatCsv is a InventoryFormat enum value - InventoryFormatCsv = "CSV" - - // InventoryFormatOrc is a InventoryFormat enum value - InventoryFormatOrc = "ORC" - - // InventoryFormatParquet is a InventoryFormat enum value - InventoryFormatParquet = "Parquet" -) - -// InventoryFormat_Values returns all elements of the InventoryFormat enum -func InventoryFormat_Values() []string { - return []string{ - InventoryFormatCsv, - InventoryFormatOrc, - InventoryFormatParquet, - } -} - -const ( - // InventoryFrequencyDaily is a InventoryFrequency enum value - InventoryFrequencyDaily = "Daily" - - // InventoryFrequencyWeekly is a InventoryFrequency enum value - InventoryFrequencyWeekly = "Weekly" -) - -// InventoryFrequency_Values returns all elements of the InventoryFrequency enum -func InventoryFrequency_Values() []string { - return []string{ - InventoryFrequencyDaily, - InventoryFrequencyWeekly, - } -} - -const ( - // InventoryIncludedObjectVersionsAll is a InventoryIncludedObjectVersions enum value - InventoryIncludedObjectVersionsAll = "All" - - // InventoryIncludedObjectVersionsCurrent is a InventoryIncludedObjectVersions enum value - InventoryIncludedObjectVersionsCurrent = "Current" -) - -// InventoryIncludedObjectVersions_Values returns all elements of the InventoryIncludedObjectVersions enum -func InventoryIncludedObjectVersions_Values() []string { - return []string{ - InventoryIncludedObjectVersionsAll, - InventoryIncludedObjectVersionsCurrent, - } -} - -const ( - // InventoryOptionalFieldSize is a InventoryOptionalField enum value - InventoryOptionalFieldSize = "Size" - - // InventoryOptionalFieldLastModifiedDate is a InventoryOptionalField enum value - InventoryOptionalFieldLastModifiedDate = "LastModifiedDate" - - // InventoryOptionalFieldStorageClass is a InventoryOptionalField enum value - InventoryOptionalFieldStorageClass = "StorageClass" - - // InventoryOptionalFieldEtag is a InventoryOptionalField enum value - InventoryOptionalFieldEtag = "ETag" - - // InventoryOptionalFieldIsMultipartUploaded is a InventoryOptionalField enum value - InventoryOptionalFieldIsMultipartUploaded = "IsMultipartUploaded" - - // InventoryOptionalFieldReplicationStatus is a InventoryOptionalField enum value - InventoryOptionalFieldReplicationStatus = "ReplicationStatus" - - // InventoryOptionalFieldEncryptionStatus is a InventoryOptionalField enum value - InventoryOptionalFieldEncryptionStatus = "EncryptionStatus" - - // InventoryOptionalFieldObjectLockRetainUntilDate is a InventoryOptionalField enum value - InventoryOptionalFieldObjectLockRetainUntilDate = "ObjectLockRetainUntilDate" - - // InventoryOptionalFieldObjectLockMode is a InventoryOptionalField enum value - InventoryOptionalFieldObjectLockMode = "ObjectLockMode" - - // InventoryOptionalFieldObjectLockLegalHoldStatus is a InventoryOptionalField enum value - InventoryOptionalFieldObjectLockLegalHoldStatus = "ObjectLockLegalHoldStatus" - - // InventoryOptionalFieldIntelligentTieringAccessTier is a InventoryOptionalField enum value - InventoryOptionalFieldIntelligentTieringAccessTier = "IntelligentTieringAccessTier" - - // InventoryOptionalFieldBucketKeyStatus is a InventoryOptionalField enum value - InventoryOptionalFieldBucketKeyStatus = "BucketKeyStatus" - - // InventoryOptionalFieldChecksumAlgorithm is a InventoryOptionalField enum value - InventoryOptionalFieldChecksumAlgorithm = "ChecksumAlgorithm" - - // InventoryOptionalFieldObjectAccessControlList is a InventoryOptionalField enum value - InventoryOptionalFieldObjectAccessControlList = "ObjectAccessControlList" - - // InventoryOptionalFieldObjectOwner is a InventoryOptionalField enum value - InventoryOptionalFieldObjectOwner = "ObjectOwner" -) - -// InventoryOptionalField_Values returns all elements of the InventoryOptionalField enum -func InventoryOptionalField_Values() []string { - return []string{ - InventoryOptionalFieldSize, - InventoryOptionalFieldLastModifiedDate, - InventoryOptionalFieldStorageClass, - InventoryOptionalFieldEtag, - InventoryOptionalFieldIsMultipartUploaded, - InventoryOptionalFieldReplicationStatus, - InventoryOptionalFieldEncryptionStatus, - InventoryOptionalFieldObjectLockRetainUntilDate, - InventoryOptionalFieldObjectLockMode, - InventoryOptionalFieldObjectLockLegalHoldStatus, - InventoryOptionalFieldIntelligentTieringAccessTier, - InventoryOptionalFieldBucketKeyStatus, - InventoryOptionalFieldChecksumAlgorithm, - InventoryOptionalFieldObjectAccessControlList, - InventoryOptionalFieldObjectOwner, - } -} - -const ( - // JSONTypeDocument is a JSONType enum value - JSONTypeDocument = "DOCUMENT" - - // JSONTypeLines is a JSONType enum value - JSONTypeLines = "LINES" -) - -// JSONType_Values returns all elements of the JSONType enum -func JSONType_Values() []string { - return []string{ - JSONTypeDocument, - JSONTypeLines, - } -} - -const ( - // LocationTypeAvailabilityZone is a LocationType enum value - LocationTypeAvailabilityZone = "AvailabilityZone" -) - -// LocationType_Values returns all elements of the LocationType enum -func LocationType_Values() []string { - return []string{ - LocationTypeAvailabilityZone, - } -} - -const ( - // MFADeleteEnabled is a MFADelete enum value - MFADeleteEnabled = "Enabled" - - // MFADeleteDisabled is a MFADelete enum value - MFADeleteDisabled = "Disabled" -) - -// MFADelete_Values returns all elements of the MFADelete enum -func MFADelete_Values() []string { - return []string{ - MFADeleteEnabled, - MFADeleteDisabled, - } -} - -const ( - // MFADeleteStatusEnabled is a MFADeleteStatus enum value - MFADeleteStatusEnabled = "Enabled" - - // MFADeleteStatusDisabled is a MFADeleteStatus enum value - MFADeleteStatusDisabled = "Disabled" -) - -// MFADeleteStatus_Values returns all elements of the MFADeleteStatus enum -func MFADeleteStatus_Values() []string { - return []string{ - MFADeleteStatusEnabled, - MFADeleteStatusDisabled, - } -} - -const ( - // MetadataDirectiveCopy is a MetadataDirective enum value - MetadataDirectiveCopy = "COPY" - - // MetadataDirectiveReplace is a MetadataDirective enum value - MetadataDirectiveReplace = "REPLACE" -) - -// MetadataDirective_Values returns all elements of the MetadataDirective enum -func MetadataDirective_Values() []string { - return []string{ - MetadataDirectiveCopy, - MetadataDirectiveReplace, - } -} - -const ( - // MetricsStatusEnabled is a MetricsStatus enum value - MetricsStatusEnabled = "Enabled" - - // MetricsStatusDisabled is a MetricsStatus enum value - MetricsStatusDisabled = "Disabled" -) - -// MetricsStatus_Values returns all elements of the MetricsStatus enum -func MetricsStatus_Values() []string { - return []string{ - MetricsStatusEnabled, - MetricsStatusDisabled, - } -} - -const ( - // ObjectAttributesEtag is a ObjectAttributes enum value - ObjectAttributesEtag = "ETag" - - // ObjectAttributesChecksum is a ObjectAttributes enum value - ObjectAttributesChecksum = "Checksum" - - // ObjectAttributesObjectParts is a ObjectAttributes enum value - ObjectAttributesObjectParts = "ObjectParts" - - // ObjectAttributesStorageClass is a ObjectAttributes enum value - ObjectAttributesStorageClass = "StorageClass" - - // ObjectAttributesObjectSize is a ObjectAttributes enum value - ObjectAttributesObjectSize = "ObjectSize" -) - -// ObjectAttributes_Values returns all elements of the ObjectAttributes enum -func ObjectAttributes_Values() []string { - return []string{ - ObjectAttributesEtag, - ObjectAttributesChecksum, - ObjectAttributesObjectParts, - ObjectAttributesStorageClass, - ObjectAttributesObjectSize, - } -} - -const ( - // ObjectCannedACLPrivate is a ObjectCannedACL enum value - ObjectCannedACLPrivate = "private" - - // ObjectCannedACLPublicRead is a ObjectCannedACL enum value - ObjectCannedACLPublicRead = "public-read" - - // ObjectCannedACLPublicReadWrite is a ObjectCannedACL enum value - ObjectCannedACLPublicReadWrite = "public-read-write" - - // ObjectCannedACLAuthenticatedRead is a ObjectCannedACL enum value - ObjectCannedACLAuthenticatedRead = "authenticated-read" - - // ObjectCannedACLAwsExecRead is a ObjectCannedACL enum value - ObjectCannedACLAwsExecRead = "aws-exec-read" - - // ObjectCannedACLBucketOwnerRead is a ObjectCannedACL enum value - ObjectCannedACLBucketOwnerRead = "bucket-owner-read" - - // ObjectCannedACLBucketOwnerFullControl is a ObjectCannedACL enum value - ObjectCannedACLBucketOwnerFullControl = "bucket-owner-full-control" -) - -// ObjectCannedACL_Values returns all elements of the ObjectCannedACL enum -func ObjectCannedACL_Values() []string { - return []string{ - ObjectCannedACLPrivate, - ObjectCannedACLPublicRead, - ObjectCannedACLPublicReadWrite, - ObjectCannedACLAuthenticatedRead, - ObjectCannedACLAwsExecRead, - ObjectCannedACLBucketOwnerRead, - ObjectCannedACLBucketOwnerFullControl, - } -} - -const ( - // ObjectLockEnabledEnabled is a ObjectLockEnabled enum value - ObjectLockEnabledEnabled = "Enabled" -) - -// ObjectLockEnabled_Values returns all elements of the ObjectLockEnabled enum -func ObjectLockEnabled_Values() []string { - return []string{ - ObjectLockEnabledEnabled, - } -} - -const ( - // ObjectLockLegalHoldStatusOn is a ObjectLockLegalHoldStatus enum value - ObjectLockLegalHoldStatusOn = "ON" - - // ObjectLockLegalHoldStatusOff is a ObjectLockLegalHoldStatus enum value - ObjectLockLegalHoldStatusOff = "OFF" -) - -// ObjectLockLegalHoldStatus_Values returns all elements of the ObjectLockLegalHoldStatus enum -func ObjectLockLegalHoldStatus_Values() []string { - return []string{ - ObjectLockLegalHoldStatusOn, - ObjectLockLegalHoldStatusOff, - } -} - -const ( - // ObjectLockModeGovernance is a ObjectLockMode enum value - ObjectLockModeGovernance = "GOVERNANCE" - - // ObjectLockModeCompliance is a ObjectLockMode enum value - ObjectLockModeCompliance = "COMPLIANCE" -) - -// ObjectLockMode_Values returns all elements of the ObjectLockMode enum -func ObjectLockMode_Values() []string { - return []string{ - ObjectLockModeGovernance, - ObjectLockModeCompliance, - } -} - -const ( - // ObjectLockRetentionModeGovernance is a ObjectLockRetentionMode enum value - ObjectLockRetentionModeGovernance = "GOVERNANCE" - - // ObjectLockRetentionModeCompliance is a ObjectLockRetentionMode enum value - ObjectLockRetentionModeCompliance = "COMPLIANCE" -) - -// ObjectLockRetentionMode_Values returns all elements of the ObjectLockRetentionMode enum -func ObjectLockRetentionMode_Values() []string { - return []string{ - ObjectLockRetentionModeGovernance, - ObjectLockRetentionModeCompliance, - } -} - -// The container element for object ownership for a bucket's ownership controls. -// -// BucketOwnerPreferred - Objects uploaded to the bucket change ownership to -// the bucket owner if the objects are uploaded with the bucket-owner-full-control -// canned ACL. -// -// ObjectWriter - The uploading account will own the object if the object is -// uploaded with the bucket-owner-full-control canned ACL. -// -// BucketOwnerEnforced - Access control lists (ACLs) are disabled and no longer -// affect permissions. The bucket owner automatically owns and has full control -// over every object in the bucket. The bucket only accepts PUT requests that -// don't specify an ACL or specify bucket owner full control ACLs (such as the -// predefined bucket-owner-full-control canned ACL or a custom ACL in XML format -// that grants the same permissions). -// -// By default, ObjectOwnership is set to BucketOwnerEnforced and ACLs are disabled. -// We recommend keeping ACLs disabled, except in uncommon use cases where you -// must control access for each object individually. For more information about -// S3 Object Ownership, see Controlling ownership of objects and disabling ACLs -// for your bucket (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html) -// in the Amazon S3 User Guide. -// -// This functionality is not supported for directory buckets. Directory buckets -// use the bucket owner enforced setting for S3 Object Ownership. -const ( - // ObjectOwnershipBucketOwnerPreferred is a ObjectOwnership enum value - ObjectOwnershipBucketOwnerPreferred = "BucketOwnerPreferred" - - // ObjectOwnershipObjectWriter is a ObjectOwnership enum value - ObjectOwnershipObjectWriter = "ObjectWriter" - - // ObjectOwnershipBucketOwnerEnforced is a ObjectOwnership enum value - ObjectOwnershipBucketOwnerEnforced = "BucketOwnerEnforced" -) - -// ObjectOwnership_Values returns all elements of the ObjectOwnership enum -func ObjectOwnership_Values() []string { - return []string{ - ObjectOwnershipBucketOwnerPreferred, - ObjectOwnershipObjectWriter, - ObjectOwnershipBucketOwnerEnforced, - } -} - -const ( - // ObjectStorageClassStandard is a ObjectStorageClass enum value - ObjectStorageClassStandard = "STANDARD" - - // ObjectStorageClassReducedRedundancy is a ObjectStorageClass enum value - ObjectStorageClassReducedRedundancy = "REDUCED_REDUNDANCY" - - // ObjectStorageClassGlacier is a ObjectStorageClass enum value - ObjectStorageClassGlacier = "GLACIER" - - // ObjectStorageClassStandardIa is a ObjectStorageClass enum value - ObjectStorageClassStandardIa = "STANDARD_IA" - - // ObjectStorageClassOnezoneIa is a ObjectStorageClass enum value - ObjectStorageClassOnezoneIa = "ONEZONE_IA" - - // ObjectStorageClassIntelligentTiering is a ObjectStorageClass enum value - ObjectStorageClassIntelligentTiering = "INTELLIGENT_TIERING" - - // ObjectStorageClassDeepArchive is a ObjectStorageClass enum value - ObjectStorageClassDeepArchive = "DEEP_ARCHIVE" - - // ObjectStorageClassOutposts is a ObjectStorageClass enum value - ObjectStorageClassOutposts = "OUTPOSTS" - - // ObjectStorageClassGlacierIr is a ObjectStorageClass enum value - ObjectStorageClassGlacierIr = "GLACIER_IR" - - // ObjectStorageClassSnow is a ObjectStorageClass enum value - ObjectStorageClassSnow = "SNOW" - - // ObjectStorageClassExpressOnezone is a ObjectStorageClass enum value - ObjectStorageClassExpressOnezone = "EXPRESS_ONEZONE" -) - -// ObjectStorageClass_Values returns all elements of the ObjectStorageClass enum -func ObjectStorageClass_Values() []string { - return []string{ - ObjectStorageClassStandard, - ObjectStorageClassReducedRedundancy, - ObjectStorageClassGlacier, - ObjectStorageClassStandardIa, - ObjectStorageClassOnezoneIa, - ObjectStorageClassIntelligentTiering, - ObjectStorageClassDeepArchive, - ObjectStorageClassOutposts, - ObjectStorageClassGlacierIr, - ObjectStorageClassSnow, - ObjectStorageClassExpressOnezone, - } -} - -const ( - // ObjectVersionStorageClassStandard is a ObjectVersionStorageClass enum value - ObjectVersionStorageClassStandard = "STANDARD" -) - -// ObjectVersionStorageClass_Values returns all elements of the ObjectVersionStorageClass enum -func ObjectVersionStorageClass_Values() []string { - return []string{ - ObjectVersionStorageClassStandard, - } -} - -const ( - // OptionalObjectAttributesRestoreStatus is a OptionalObjectAttributes enum value - OptionalObjectAttributesRestoreStatus = "RestoreStatus" -) - -// OptionalObjectAttributes_Values returns all elements of the OptionalObjectAttributes enum -func OptionalObjectAttributes_Values() []string { - return []string{ - OptionalObjectAttributesRestoreStatus, - } -} - -const ( - // OwnerOverrideDestination is a OwnerOverride enum value - OwnerOverrideDestination = "Destination" -) - -// OwnerOverride_Values returns all elements of the OwnerOverride enum -func OwnerOverride_Values() []string { - return []string{ - OwnerOverrideDestination, - } -} - -const ( - // PartitionDateSourceEventTime is a PartitionDateSource enum value - PartitionDateSourceEventTime = "EventTime" - - // PartitionDateSourceDeliveryTime is a PartitionDateSource enum value - PartitionDateSourceDeliveryTime = "DeliveryTime" -) - -// PartitionDateSource_Values returns all elements of the PartitionDateSource enum -func PartitionDateSource_Values() []string { - return []string{ - PartitionDateSourceEventTime, - PartitionDateSourceDeliveryTime, - } -} - -const ( - // PayerRequester is a Payer enum value - PayerRequester = "Requester" - - // PayerBucketOwner is a Payer enum value - PayerBucketOwner = "BucketOwner" -) - -// Payer_Values returns all elements of the Payer enum -func Payer_Values() []string { - return []string{ - PayerRequester, - PayerBucketOwner, - } -} - -const ( - // PermissionFullControl is a Permission enum value - PermissionFullControl = "FULL_CONTROL" - - // PermissionWrite is a Permission enum value - PermissionWrite = "WRITE" - - // PermissionWriteAcp is a Permission enum value - PermissionWriteAcp = "WRITE_ACP" - - // PermissionRead is a Permission enum value - PermissionRead = "READ" - - // PermissionReadAcp is a Permission enum value - PermissionReadAcp = "READ_ACP" -) - -// Permission_Values returns all elements of the Permission enum -func Permission_Values() []string { - return []string{ - PermissionFullControl, - PermissionWrite, - PermissionWriteAcp, - PermissionRead, - PermissionReadAcp, - } -} - -const ( - // ProtocolHttp is a Protocol enum value - ProtocolHttp = "http" - - // ProtocolHttps is a Protocol enum value - ProtocolHttps = "https" -) - -// Protocol_Values returns all elements of the Protocol enum -func Protocol_Values() []string { - return []string{ - ProtocolHttp, - ProtocolHttps, - } -} - -const ( - // QuoteFieldsAlways is a QuoteFields enum value - QuoteFieldsAlways = "ALWAYS" - - // QuoteFieldsAsneeded is a QuoteFields enum value - QuoteFieldsAsneeded = "ASNEEDED" -) - -// QuoteFields_Values returns all elements of the QuoteFields enum -func QuoteFields_Values() []string { - return []string{ - QuoteFieldsAlways, - QuoteFieldsAsneeded, - } -} - -const ( - // ReplicaModificationsStatusEnabled is a ReplicaModificationsStatus enum value - ReplicaModificationsStatusEnabled = "Enabled" - - // ReplicaModificationsStatusDisabled is a ReplicaModificationsStatus enum value - ReplicaModificationsStatusDisabled = "Disabled" -) - -// ReplicaModificationsStatus_Values returns all elements of the ReplicaModificationsStatus enum -func ReplicaModificationsStatus_Values() []string { - return []string{ - ReplicaModificationsStatusEnabled, - ReplicaModificationsStatusDisabled, - } -} - -const ( - // ReplicationRuleStatusEnabled is a ReplicationRuleStatus enum value - ReplicationRuleStatusEnabled = "Enabled" - - // ReplicationRuleStatusDisabled is a ReplicationRuleStatus enum value - ReplicationRuleStatusDisabled = "Disabled" -) - -// ReplicationRuleStatus_Values returns all elements of the ReplicationRuleStatus enum -func ReplicationRuleStatus_Values() []string { - return []string{ - ReplicationRuleStatusEnabled, - ReplicationRuleStatusDisabled, - } -} - -const ( - // ReplicationStatusComplete is a ReplicationStatus enum value - ReplicationStatusComplete = "COMPLETE" - - // ReplicationStatusPending is a ReplicationStatus enum value - ReplicationStatusPending = "PENDING" - - // ReplicationStatusFailed is a ReplicationStatus enum value - ReplicationStatusFailed = "FAILED" - - // ReplicationStatusReplica is a ReplicationStatus enum value - ReplicationStatusReplica = "REPLICA" - - // ReplicationStatusCompleted is a ReplicationStatus enum value - ReplicationStatusCompleted = "COMPLETED" -) - -// ReplicationStatus_Values returns all elements of the ReplicationStatus enum -func ReplicationStatus_Values() []string { - return []string{ - ReplicationStatusComplete, - ReplicationStatusPending, - ReplicationStatusFailed, - ReplicationStatusReplica, - ReplicationStatusCompleted, - } -} - -const ( - // ReplicationTimeStatusEnabled is a ReplicationTimeStatus enum value - ReplicationTimeStatusEnabled = "Enabled" - - // ReplicationTimeStatusDisabled is a ReplicationTimeStatus enum value - ReplicationTimeStatusDisabled = "Disabled" -) - -// ReplicationTimeStatus_Values returns all elements of the ReplicationTimeStatus enum -func ReplicationTimeStatus_Values() []string { - return []string{ - ReplicationTimeStatusEnabled, - ReplicationTimeStatusDisabled, - } -} - -// If present, indicates that the requester was successfully charged for the -// request. -// -// This functionality is not supported for directory buckets. -const ( - // RequestChargedRequester is a RequestCharged enum value - RequestChargedRequester = "requester" -) - -// RequestCharged_Values returns all elements of the RequestCharged enum -func RequestCharged_Values() []string { - return []string{ - RequestChargedRequester, - } -} - -// Confirms that the requester knows that they will be charged for the request. -// Bucket owners need not specify this parameter in their requests. If either -// the source or destination S3 bucket has Requester Pays enabled, the requester -// will pay for corresponding charges to copy the object. For information about -// downloading objects from Requester Pays buckets, see Downloading Objects -// in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html) -// in the Amazon S3 User Guide. -// -// This functionality is not supported for directory buckets. -const ( - // RequestPayerRequester is a RequestPayer enum value - RequestPayerRequester = "requester" -) - -// RequestPayer_Values returns all elements of the RequestPayer enum -func RequestPayer_Values() []string { - return []string{ - RequestPayerRequester, - } -} - -const ( - // RestoreRequestTypeSelect is a RestoreRequestType enum value - RestoreRequestTypeSelect = "SELECT" -) - -// RestoreRequestType_Values returns all elements of the RestoreRequestType enum -func RestoreRequestType_Values() []string { - return []string{ - RestoreRequestTypeSelect, - } -} - -const ( - // ServerSideEncryptionAes256 is a ServerSideEncryption enum value - ServerSideEncryptionAes256 = "AES256" - - // ServerSideEncryptionAwsKms is a ServerSideEncryption enum value - ServerSideEncryptionAwsKms = "aws:kms" - - // ServerSideEncryptionAwsKmsDsse is a ServerSideEncryption enum value - ServerSideEncryptionAwsKmsDsse = "aws:kms:dsse" -) - -// ServerSideEncryption_Values returns all elements of the ServerSideEncryption enum -func ServerSideEncryption_Values() []string { - return []string{ - ServerSideEncryptionAes256, - ServerSideEncryptionAwsKms, - ServerSideEncryptionAwsKmsDsse, - } -} - -const ( - // SessionModeReadOnly is a SessionMode enum value - SessionModeReadOnly = "ReadOnly" - - // SessionModeReadWrite is a SessionMode enum value - SessionModeReadWrite = "ReadWrite" -) - -// SessionMode_Values returns all elements of the SessionMode enum -func SessionMode_Values() []string { - return []string{ - SessionModeReadOnly, - SessionModeReadWrite, - } -} - -const ( - // SseKmsEncryptedObjectsStatusEnabled is a SseKmsEncryptedObjectsStatus enum value - SseKmsEncryptedObjectsStatusEnabled = "Enabled" - - // SseKmsEncryptedObjectsStatusDisabled is a SseKmsEncryptedObjectsStatus enum value - SseKmsEncryptedObjectsStatusDisabled = "Disabled" -) - -// SseKmsEncryptedObjectsStatus_Values returns all elements of the SseKmsEncryptedObjectsStatus enum -func SseKmsEncryptedObjectsStatus_Values() []string { - return []string{ - SseKmsEncryptedObjectsStatusEnabled, - SseKmsEncryptedObjectsStatusDisabled, - } -} - -const ( - // StorageClassStandard is a StorageClass enum value - StorageClassStandard = "STANDARD" - - // StorageClassReducedRedundancy is a StorageClass enum value - StorageClassReducedRedundancy = "REDUCED_REDUNDANCY" - - // StorageClassStandardIa is a StorageClass enum value - StorageClassStandardIa = "STANDARD_IA" - - // StorageClassOnezoneIa is a StorageClass enum value - StorageClassOnezoneIa = "ONEZONE_IA" - - // StorageClassIntelligentTiering is a StorageClass enum value - StorageClassIntelligentTiering = "INTELLIGENT_TIERING" - - // StorageClassGlacier is a StorageClass enum value - StorageClassGlacier = "GLACIER" - - // StorageClassDeepArchive is a StorageClass enum value - StorageClassDeepArchive = "DEEP_ARCHIVE" - - // StorageClassOutposts is a StorageClass enum value - StorageClassOutposts = "OUTPOSTS" - - // StorageClassGlacierIr is a StorageClass enum value - StorageClassGlacierIr = "GLACIER_IR" - - // StorageClassSnow is a StorageClass enum value - StorageClassSnow = "SNOW" - - // StorageClassExpressOnezone is a StorageClass enum value - StorageClassExpressOnezone = "EXPRESS_ONEZONE" -) - -// StorageClass_Values returns all elements of the StorageClass enum -func StorageClass_Values() []string { - return []string{ - StorageClassStandard, - StorageClassReducedRedundancy, - StorageClassStandardIa, - StorageClassOnezoneIa, - StorageClassIntelligentTiering, - StorageClassGlacier, - StorageClassDeepArchive, - StorageClassOutposts, - StorageClassGlacierIr, - StorageClassSnow, - StorageClassExpressOnezone, - } -} - -const ( - // StorageClassAnalysisSchemaVersionV1 is a StorageClassAnalysisSchemaVersion enum value - StorageClassAnalysisSchemaVersionV1 = "V_1" -) - -// StorageClassAnalysisSchemaVersion_Values returns all elements of the StorageClassAnalysisSchemaVersion enum -func StorageClassAnalysisSchemaVersion_Values() []string { - return []string{ - StorageClassAnalysisSchemaVersionV1, - } -} - -const ( - // TaggingDirectiveCopy is a TaggingDirective enum value - TaggingDirectiveCopy = "COPY" - - // TaggingDirectiveReplace is a TaggingDirective enum value - TaggingDirectiveReplace = "REPLACE" -) - -// TaggingDirective_Values returns all elements of the TaggingDirective enum -func TaggingDirective_Values() []string { - return []string{ - TaggingDirectiveCopy, - TaggingDirectiveReplace, - } -} - -const ( - // TierStandard is a Tier enum value - TierStandard = "Standard" - - // TierBulk is a Tier enum value - TierBulk = "Bulk" - - // TierExpedited is a Tier enum value - TierExpedited = "Expedited" -) - -// Tier_Values returns all elements of the Tier enum -func Tier_Values() []string { - return []string{ - TierStandard, - TierBulk, - TierExpedited, - } -} - -const ( - // TransitionStorageClassGlacier is a TransitionStorageClass enum value - TransitionStorageClassGlacier = "GLACIER" - - // TransitionStorageClassStandardIa is a TransitionStorageClass enum value - TransitionStorageClassStandardIa = "STANDARD_IA" - - // TransitionStorageClassOnezoneIa is a TransitionStorageClass enum value - TransitionStorageClassOnezoneIa = "ONEZONE_IA" - - // TransitionStorageClassIntelligentTiering is a TransitionStorageClass enum value - TransitionStorageClassIntelligentTiering = "INTELLIGENT_TIERING" - - // TransitionStorageClassDeepArchive is a TransitionStorageClass enum value - TransitionStorageClassDeepArchive = "DEEP_ARCHIVE" - - // TransitionStorageClassGlacierIr is a TransitionStorageClass enum value - TransitionStorageClassGlacierIr = "GLACIER_IR" -) - -// TransitionStorageClass_Values returns all elements of the TransitionStorageClass enum -func TransitionStorageClass_Values() []string { - return []string{ - TransitionStorageClassGlacier, - TransitionStorageClassStandardIa, - TransitionStorageClassOnezoneIa, - TransitionStorageClassIntelligentTiering, - TransitionStorageClassDeepArchive, - TransitionStorageClassGlacierIr, - } -} - -const ( - // TypeCanonicalUser is a Type enum value - TypeCanonicalUser = "CanonicalUser" - - // TypeAmazonCustomerByEmail is a Type enum value - TypeAmazonCustomerByEmail = "AmazonCustomerByEmail" - - // TypeGroup is a Type enum value - TypeGroup = "Group" -) - -// Type_Values returns all elements of the Type enum -func Type_Values() []string { - return []string{ - TypeCanonicalUser, - TypeAmazonCustomerByEmail, - TypeGroup, - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/body_hash.go b/vendor/github.com/aws/aws-sdk-go/service/s3/body_hash.go deleted file mode 100644 index 407f06b6ed..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/body_hash.go +++ /dev/null @@ -1,202 +0,0 @@ -package s3 - -import ( - "bytes" - "crypto/md5" - "crypto/sha256" - "encoding/base64" - "encoding/hex" - "fmt" - "hash" - "io" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/request" -) - -const ( - contentMD5Header = "Content-Md5" - contentSha256Header = "X-Amz-Content-Sha256" - amzTeHeader = "X-Amz-Te" - amzTxEncodingHeader = "X-Amz-Transfer-Encoding" - - appendMD5TxEncoding = "append-md5" -) - -// computeBodyHashes will add Content MD5 and Content Sha256 hashes to the -// request. If the body is not seekable or S3DisableContentMD5Validation set -// this handler will be ignored. -func computeBodyHashes(r *request.Request) { - if aws.BoolValue(r.Config.S3DisableContentMD5Validation) { - return - } - if r.IsPresigned() { - return - } - if r.Error != nil || !aws.IsReaderSeekable(r.Body) { - return - } - - var md5Hash, sha256Hash hash.Hash - hashers := make([]io.Writer, 0, 2) - - // Determine upfront which hashes can be set without overriding user - // provide header data. - if v := r.HTTPRequest.Header.Get(contentMD5Header); len(v) == 0 { - md5Hash = md5.New() - hashers = append(hashers, md5Hash) - } - - if v := r.HTTPRequest.Header.Get(contentSha256Header); len(v) == 0 { - sha256Hash = sha256.New() - hashers = append(hashers, sha256Hash) - } - - // Create the destination writer based on the hashes that are not already - // provided by the user. - var dst io.Writer - switch len(hashers) { - case 0: - return - case 1: - dst = hashers[0] - default: - dst = io.MultiWriter(hashers...) - } - - if _, err := aws.CopySeekableBody(dst, r.Body); err != nil { - r.Error = awserr.New("BodyHashError", "failed to compute body hashes", err) - return - } - - // For the hashes created, set the associated headers that the user did not - // already provide. - if md5Hash != nil { - sum := make([]byte, md5.Size) - encoded := make([]byte, md5Base64EncLen) - - base64.StdEncoding.Encode(encoded, md5Hash.Sum(sum[0:0])) - r.HTTPRequest.Header[contentMD5Header] = []string{string(encoded)} - } - - if sha256Hash != nil { - encoded := make([]byte, sha256HexEncLen) - sum := make([]byte, sha256.Size) - - hex.Encode(encoded, sha256Hash.Sum(sum[0:0])) - r.HTTPRequest.Header[contentSha256Header] = []string{string(encoded)} - } -} - -const ( - md5Base64EncLen = (md5.Size + 2) / 3 * 4 // base64.StdEncoding.EncodedLen - sha256HexEncLen = sha256.Size * 2 // hex.EncodedLen -) - -// Adds the x-amz-te: append_md5 header to the request. This requests the service -// responds with a trailing MD5 checksum. -// -// Will not ask for append MD5 if disabled, the request is presigned or, -// or the API operation does not support content MD5 validation. -func askForTxEncodingAppendMD5(r *request.Request) { - if aws.BoolValue(r.Config.S3DisableContentMD5Validation) { - return - } - if r.IsPresigned() { - return - } - r.HTTPRequest.Header.Set(amzTeHeader, appendMD5TxEncoding) -} - -func useMD5ValidationReader(r *request.Request) { - if r.Error != nil { - return - } - - if v := r.HTTPResponse.Header.Get(amzTxEncodingHeader); v != appendMD5TxEncoding { - return - } - - var bodyReader *io.ReadCloser - var contentLen int64 - switch tv := r.Data.(type) { - case *GetObjectOutput: - bodyReader = &tv.Body - contentLen = aws.Int64Value(tv.ContentLength) - // Update ContentLength hiden the trailing MD5 checksum. - tv.ContentLength = aws.Int64(contentLen - md5.Size) - tv.ContentRange = aws.String(r.HTTPResponse.Header.Get("X-Amz-Content-Range")) - default: - r.Error = awserr.New("ChecksumValidationError", - fmt.Sprintf("%s: %s header received on unsupported API, %s", - amzTxEncodingHeader, appendMD5TxEncoding, r.Operation.Name, - ), nil) - return - } - - if contentLen < md5.Size { - r.Error = awserr.New("ChecksumValidationError", - fmt.Sprintf("invalid Content-Length %d for %s %s", - contentLen, appendMD5TxEncoding, amzTxEncodingHeader, - ), nil) - return - } - - // Wrap and swap the response body reader with the validation reader. - *bodyReader = newMD5ValidationReader(*bodyReader, contentLen-md5.Size) -} - -type md5ValidationReader struct { - rawReader io.ReadCloser - payload io.Reader - hash hash.Hash - - payloadLen int64 - read int64 -} - -func newMD5ValidationReader(reader io.ReadCloser, payloadLen int64) *md5ValidationReader { - h := md5.New() - return &md5ValidationReader{ - rawReader: reader, - payload: io.TeeReader(&io.LimitedReader{R: reader, N: payloadLen}, h), - hash: h, - payloadLen: payloadLen, - } -} - -func (v *md5ValidationReader) Read(p []byte) (n int, err error) { - n, err = v.payload.Read(p) - if err != nil && err != io.EOF { - return n, err - } - - v.read += int64(n) - - if err == io.EOF { - if v.read != v.payloadLen { - return n, io.ErrUnexpectedEOF - } - expectSum := make([]byte, md5.Size) - actualSum := make([]byte, md5.Size) - if _, sumReadErr := io.ReadFull(v.rawReader, expectSum); sumReadErr != nil { - return n, sumReadErr - } - actualSum = v.hash.Sum(actualSum[0:0]) - if !bytes.Equal(expectSum, actualSum) { - return n, awserr.New("InvalidChecksum", - fmt.Sprintf("expected MD5 checksum %s, got %s", - hex.EncodeToString(expectSum), - hex.EncodeToString(actualSum), - ), - nil) - } - } - - return n, err -} - -func (v *md5ValidationReader) Close() error { - return v.rawReader.Close() -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/bucket_location.go b/vendor/github.com/aws/aws-sdk-go/service/s3/bucket_location.go deleted file mode 100644 index 20828387ea..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/bucket_location.go +++ /dev/null @@ -1,107 +0,0 @@ -package s3 - -import ( - "io/ioutil" - "regexp" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" -) - -var reBucketLocation = regexp.MustCompile(`>([^<>]+)<\/Location`) - -// NormalizeBucketLocation is a utility function which will update the -// passed in value to always be a region ID. Generally this would be used -// with GetBucketLocation API operation. -// -// Replaces empty string with "us-east-1", and "EU" with "eu-west-1". -// -// See http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlocation.html -// for more information on the values that can be returned. -func NormalizeBucketLocation(loc string) string { - switch loc { - case "": - loc = "us-east-1" - case "EU": - loc = "eu-west-1" - } - - return loc -} - -// NormalizeBucketLocationHandler is a request handler which will update the -// GetBucketLocation's result LocationConstraint value to always be a region ID. -// -// Replaces empty string with "us-east-1", and "EU" with "eu-west-1". -// -// See http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlocation.html -// for more information on the values that can be returned. -// -// req, result := svc.GetBucketLocationRequest(&s3.GetBucketLocationInput{ -// Bucket: aws.String(bucket), -// }) -// req.Handlers.Unmarshal.PushBackNamed(NormalizeBucketLocationHandler) -// err := req.Send() -var NormalizeBucketLocationHandler = request.NamedHandler{ - Name: "awssdk.s3.NormalizeBucketLocation", - Fn: func(req *request.Request) { - if req.Error != nil { - return - } - - out := req.Data.(*GetBucketLocationOutput) - loc := NormalizeBucketLocation(aws.StringValue(out.LocationConstraint)) - out.LocationConstraint = aws.String(loc) - }, -} - -// WithNormalizeBucketLocation is a request option which will update the -// GetBucketLocation's result LocationConstraint value to always be a region ID. -// -// Replaces empty string with "us-east-1", and "EU" with "eu-west-1". -// -// See http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlocation.html -// for more information on the values that can be returned. -// -// result, err := svc.GetBucketLocationWithContext(ctx, -// &s3.GetBucketLocationInput{ -// Bucket: aws.String(bucket), -// }, -// s3.WithNormalizeBucketLocation, -// ) -func WithNormalizeBucketLocation(r *request.Request) { - r.Handlers.Unmarshal.PushBackNamed(NormalizeBucketLocationHandler) -} - -func buildGetBucketLocation(r *request.Request) { - if r.DataFilled() { - out := r.Data.(*GetBucketLocationOutput) - b, err := ioutil.ReadAll(r.HTTPResponse.Body) - if err != nil { - r.Error = awserr.New(request.ErrCodeSerialization, - "failed reading response body", err) - return - } - - match := reBucketLocation.FindSubmatch(b) - if len(match) > 1 { - loc := string(match[1]) - out.LocationConstraint = aws.String(loc) - } - } -} - -func populateLocationConstraint(r *request.Request) { - if r.ParamsFilled() && aws.StringValue(r.Config.Region) != "us-east-1" { - in := r.Params.(*CreateBucketInput) - if in.CreateBucketConfiguration == nil { - r.Params = awsutil.CopyOf(r.Params) - in = r.Params.(*CreateBucketInput) - in.CreateBucketConfiguration = &CreateBucketConfiguration{ - LocationConstraint: r.Config.Region, - } - } - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go b/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go deleted file mode 100644 index 229606b708..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go +++ /dev/null @@ -1,89 +0,0 @@ -package s3 - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/endpoints" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/internal/s3shared/arn" - "github.com/aws/aws-sdk-go/internal/s3shared/s3err" -) - -func init() { - initClient = defaultInitClientFn - initRequest = defaultInitRequestFn -} - -func defaultInitClientFn(c *client.Client) { - if c.Config.UseDualStackEndpoint == endpoints.DualStackEndpointStateUnset { - if aws.BoolValue(c.Config.UseDualStack) { - c.Config.UseDualStackEndpoint = endpoints.DualStackEndpointStateEnabled - } else { - c.Config.UseDualStackEndpoint = endpoints.DualStackEndpointStateDisabled - } - } - - // Support building custom endpoints based on config - c.Handlers.Build.PushFront(endpointHandler) - - // Require SSL when using SSE keys - c.Handlers.Validate.PushBack(validateSSERequiresSSL) - c.Handlers.Build.PushBack(computeSSEKeyMD5) - c.Handlers.Build.PushBack(computeCopySourceSSEKeyMD5) - - // S3 uses custom error unmarshaling logic - c.Handlers.UnmarshalError.Clear() - c.Handlers.UnmarshalError.PushBack(unmarshalError) - c.Handlers.UnmarshalError.PushBackNamed(s3err.RequestFailureWrapperHandler()) -} - -func defaultInitRequestFn(r *request.Request) { - // Add request handlers for specific platforms. - // e.g. 100-continue support for PUT requests using Go 1.6 - platformRequestHandlers(r) - - switch r.Operation.Name { - case opGetBucketLocation: - // GetBucketLocation has custom parsing logic - r.Handlers.Unmarshal.PushFront(buildGetBucketLocation) - case opCreateBucket: - // Auto-populate LocationConstraint with current region - r.Handlers.Validate.PushFront(populateLocationConstraint) - case opCopyObject, opUploadPartCopy, opCompleteMultipartUpload: - r.Handlers.Unmarshal.PushFront(copyMultipartStatusOKUnmarshalError) - r.Handlers.Unmarshal.PushBackNamed(s3err.RequestFailureWrapperHandler()) - case opPutObject, opUploadPart: - r.Handlers.Build.PushBack(computeBodyHashes) - // Disabled until #1837 root issue is resolved. - // case opGetObject: - // r.Handlers.Build.PushBack(askForTxEncodingAppendMD5) - // r.Handlers.Unmarshal.PushBack(useMD5ValidationReader) - case opWriteGetObjectResponse: - r.Handlers.Build.PushFront(buildWriteGetObjectResponseEndpoint) - } -} - -// bucketGetter is an accessor interface to grab the "Bucket" field from -// an S3 type. -type bucketGetter interface { - getBucket() string -} - -// sseCustomerKeyGetter is an accessor interface to grab the "SSECustomerKey" -// field from an S3 type. -type sseCustomerKeyGetter interface { - getSSECustomerKey() string -} - -// copySourceSSECustomerKeyGetter is an accessor interface to grab the -// "CopySourceSSECustomerKey" field from an S3 type. -type copySourceSSECustomerKeyGetter interface { - getCopySourceSSECustomerKey() string -} - -// endpointARNGetter is an accessor interface to grab the -// the field corresponding to an endpoint ARN input. -type endpointARNGetter interface { - getEndpointARN() (arn.Resource, error) - hasEndpointARN() bool -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/doc.go b/vendor/github.com/aws/aws-sdk-go/service/s3/doc.go deleted file mode 100644 index c148f757ee..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/doc.go +++ /dev/null @@ -1,26 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package s3 provides the client and types for making API -// requests to Amazon Simple Storage Service. -// -// See https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01 for more information on this service. -// -// See s3 package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/ -// -// # Using the Client -// -// To contact Amazon Simple Storage Service 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 Simple Storage Service client S3 for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/#New -package s3 diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/doc_custom.go b/vendor/github.com/aws/aws-sdk-go/service/s3/doc_custom.go deleted file mode 100644 index 2e8244f8f6..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/doc_custom.go +++ /dev/null @@ -1,109 +0,0 @@ -// Upload Managers -// -// The s3manager package's Uploader provides concurrent upload of content to S3 -// by taking advantage of S3's Multipart APIs. The Uploader also supports both -// io.Reader for streaming uploads, and will also take advantage of io.ReadSeeker -// for optimizations if the Body satisfies that type. Once the Uploader instance -// is created you can call Upload concurrently from multiple goroutines safely. -// -// // The session the S3 Uploader will use -// sess := session.Must(session.NewSession()) -// -// // Create an uploader with the session and default options -// uploader := s3manager.NewUploader(sess) -// -// f, err := os.Open(filename) -// if err != nil { -// return fmt.Errorf("failed to open file %q, %v", filename, err) -// } -// -// // Upload the file to S3. -// result, err := uploader.Upload(&s3manager.UploadInput{ -// Bucket: aws.String(myBucket), -// Key: aws.String(myString), -// Body: f, -// }) -// if err != nil { -// return fmt.Errorf("failed to upload file, %v", err) -// } -// fmt.Printf("file uploaded to, %s\n", aws.StringValue(result.Location)) -// -// See the s3manager package's Uploader type documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3manager/#Uploader -// -// # Download Manager -// -// The s3manager package's Downloader provides concurrently downloading of Objects -// from S3. The Downloader will write S3 Object content with an io.WriterAt. -// Once the Downloader instance is created you can call Download concurrently from -// multiple goroutines safely. -// -// // The session the S3 Downloader will use -// sess := session.Must(session.NewSession()) -// -// // Create a downloader with the session and default options -// downloader := s3manager.NewDownloader(sess) -// -// // Create a file to write the S3 Object contents to. -// f, err := os.Create(filename) -// if err != nil { -// return fmt.Errorf("failed to create file %q, %v", filename, err) -// } -// -// // Write the contents of S3 Object to the file -// n, err := downloader.Download(f, &s3.GetObjectInput{ -// Bucket: aws.String(myBucket), -// Key: aws.String(myString), -// }) -// if err != nil { -// return fmt.Errorf("failed to download file, %v", err) -// } -// fmt.Printf("file downloaded, %d bytes\n", n) -// -// See the s3manager package's Downloader type documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3manager/#Downloader -// -// # Automatic URI cleaning -// -// Interacting with objects whose keys contain adjacent slashes (e.g. bucketname/foo//bar/objectname) -// requires setting DisableRestProtocolURICleaning to true in the aws.Config struct -// used by the service client. -// -// svc := s3.New(sess, &aws.Config{ -// DisableRestProtocolURICleaning: aws.Bool(true), -// }) -// out, err := svc.GetObject(&s3.GetObjectInput { -// Bucket: aws.String("bucketname"), -// Key: aws.String("//foo//bar//moo"), -// }) -// -// # Get Bucket Region -// -// GetBucketRegion will attempt to get the region for a bucket using a region -// hint to determine which AWS partition to perform the query on. Use this utility -// to determine the region a bucket is in. -// -// sess := session.Must(session.NewSession()) -// -// bucket := "my-bucket" -// region, err := s3manager.GetBucketRegion(ctx, sess, bucket, "us-west-2") -// if err != nil { -// if aerr, ok := err.(awserr.Error); ok && aerr.Code() == "NotFound" { -// fmt.Fprintf(os.Stderr, "unable to find bucket %s's region not found\n", bucket) -// } -// return err -// } -// fmt.Printf("Bucket %s is in %s region\n", bucket, region) -// -// See the s3manager package's GetBucketRegion function documentation for more information -// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3manager/#GetBucketRegion -// -// # S3 Crypto Client -// -// The s3crypto package provides the tools to upload and download encrypted -// content from S3. The Encryption and Decryption clients can be used concurrently -// once the client is created. -// -// See the s3crypto package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3crypto/ -package s3 diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint.go b/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint.go deleted file mode 100644 index 71b4386926..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint.go +++ /dev/null @@ -1,298 +0,0 @@ -package s3 - -import ( - "fmt" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/endpoints" - "net/url" - "strings" - - "github.com/aws/aws-sdk-go/aws" - awsarn "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/internal/s3shared" - "github.com/aws/aws-sdk-go/internal/s3shared/arn" -) - -const ( - s3Namespace = "s3" - s3AccessPointNamespace = "s3-accesspoint" - s3ObjectsLambdaNamespace = "s3-object-lambda" - s3OutpostsNamespace = "s3-outposts" -) - -// Used by shapes with members decorated as endpoint ARN. -func parseEndpointARN(v string) (arn.Resource, error) { - return arn.ParseResource(v, accessPointResourceParser) -} - -func accessPointResourceParser(a awsarn.ARN) (arn.Resource, error) { - resParts := arn.SplitResource(a.Resource) - switch resParts[0] { - case "accesspoint": - switch a.Service { - case s3Namespace: - return arn.ParseAccessPointResource(a, resParts[1:]) - case s3ObjectsLambdaNamespace: - return parseS3ObjectLambdaAccessPointResource(a, resParts) - default: - return arn.AccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: fmt.Sprintf("service is not %s or %s", s3Namespace, s3ObjectsLambdaNamespace)} - } - case "outpost": - if a.Service != "s3-outposts" { - return arn.OutpostAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: "service is not s3-outposts"} - } - return parseOutpostAccessPointResource(a, resParts[1:]) - default: - return nil, arn.InvalidARNError{ARN: a, Reason: "unknown resource type"} - } -} - -// parseOutpostAccessPointResource attempts to parse the ARNs resource as an -// outpost access-point resource. -// -// Supported Outpost AccessPoint ARN format: -// - ARN format: arn:{partition}:s3-outposts:{region}:{accountId}:outpost/{outpostId}/accesspoint/{accesspointName} -// - example: arn:aws:s3-outposts:us-west-2:012345678901:outpost/op-1234567890123456/accesspoint/myaccesspoint -func parseOutpostAccessPointResource(a awsarn.ARN, resParts []string) (arn.OutpostAccessPointARN, error) { - // outpost accesspoint arn is only valid if service is s3-outposts - if a.Service != "s3-outposts" { - return arn.OutpostAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: "service is not s3-outposts"} - } - - if len(resParts) == 0 { - return arn.OutpostAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: "outpost resource-id not set"} - } - - if len(resParts) < 3 { - return arn.OutpostAccessPointARN{}, arn.InvalidARNError{ - ARN: a, Reason: "access-point resource not set in Outpost ARN", - } - } - - resID := strings.TrimSpace(resParts[0]) - if len(resID) == 0 { - return arn.OutpostAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: "outpost resource-id not set"} - } - - var outpostAccessPointARN = arn.OutpostAccessPointARN{} - switch resParts[1] { - case "accesspoint": - accessPointARN, err := arn.ParseAccessPointResource(a, resParts[2:]) - if err != nil { - return arn.OutpostAccessPointARN{}, err - } - // set access-point arn - outpostAccessPointARN.AccessPointARN = accessPointARN - default: - return arn.OutpostAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: "access-point resource not set in Outpost ARN"} - } - - // set outpost id - outpostAccessPointARN.OutpostID = resID - return outpostAccessPointARN, nil -} - -func parseS3ObjectLambdaAccessPointResource(a awsarn.ARN, resParts []string) (arn.S3ObjectLambdaAccessPointARN, error) { - if a.Service != s3ObjectsLambdaNamespace { - return arn.S3ObjectLambdaAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: fmt.Sprintf("service is not %s", s3ObjectsLambdaNamespace)} - } - - accessPointARN, err := arn.ParseAccessPointResource(a, resParts[1:]) - if err != nil { - return arn.S3ObjectLambdaAccessPointARN{}, err - } - - if len(accessPointARN.Region) == 0 { - return arn.S3ObjectLambdaAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: fmt.Sprintf("%s region not set", s3ObjectsLambdaNamespace)} - } - - return arn.S3ObjectLambdaAccessPointARN{ - AccessPointARN: accessPointARN, - }, nil -} - -func endpointHandler(req *request.Request) { - endpoint, ok := req.Params.(endpointARNGetter) - if !ok || !endpoint.hasEndpointARN() { - updateBucketEndpointFromParams(req) - return - } - - resource, err := endpoint.getEndpointARN() - if err != nil { - req.Error = s3shared.NewInvalidARNError(nil, err) - return - } - - resReq := s3shared.ResourceRequest{ - Resource: resource, - Request: req, - } - - if len(resReq.Request.ClientInfo.PartitionID) != 0 && resReq.IsCrossPartition() { - req.Error = s3shared.NewClientPartitionMismatchError(resource, - req.ClientInfo.PartitionID, aws.StringValue(req.Config.Region), nil) - return - } - - if !resReq.AllowCrossRegion() && resReq.IsCrossRegion() { - req.Error = s3shared.NewClientRegionMismatchError(resource, - req.ClientInfo.PartitionID, aws.StringValue(req.Config.Region), nil) - return - } - - switch tv := resource.(type) { - case arn.AccessPointARN: - err = updateRequestAccessPointEndpoint(req, tv) - if err != nil { - req.Error = err - } - case arn.S3ObjectLambdaAccessPointARN: - err = updateRequestS3ObjectLambdaAccessPointEndpoint(req, tv) - if err != nil { - req.Error = err - } - case arn.OutpostAccessPointARN: - // outposts does not support FIPS regions - if req.Config.UseFIPSEndpoint == endpoints.FIPSEndpointStateEnabled { - req.Error = s3shared.NewFIPSConfigurationError(resource, req.ClientInfo.PartitionID, - aws.StringValue(req.Config.Region), nil) - return - } - - err = updateRequestOutpostAccessPointEndpoint(req, tv) - if err != nil { - req.Error = err - } - default: - req.Error = s3shared.NewInvalidARNError(resource, nil) - } -} - -func updateBucketEndpointFromParams(r *request.Request) { - bucket, ok := bucketNameFromReqParams(r.Params) - if !ok { - // Ignore operation requests if the bucket name was not provided - // if this is an input validation error the validation handler - // will report it. - return - } - updateEndpointForS3Config(r, bucket) -} - -func updateRequestAccessPointEndpoint(req *request.Request, accessPoint arn.AccessPointARN) error { - // Accelerate not supported - if aws.BoolValue(req.Config.S3UseAccelerate) { - return s3shared.NewClientConfiguredForAccelerateError(accessPoint, - req.ClientInfo.PartitionID, aws.StringValue(req.Config.Region), nil) - } - - // Ignore the disable host prefix for access points - req.Config.DisableEndpointHostPrefix = aws.Bool(false) - - if err := accessPointEndpointBuilder(accessPoint).build(req); err != nil { - return err - } - - removeBucketFromPath(req.HTTPRequest.URL) - - return nil -} - -func updateRequestS3ObjectLambdaAccessPointEndpoint(req *request.Request, accessPoint arn.S3ObjectLambdaAccessPointARN) error { - // DualStack not supported - if isUseDualStackEndpoint(req) { - return s3shared.NewClientConfiguredForDualStackError(accessPoint, - req.ClientInfo.PartitionID, aws.StringValue(req.Config.Region), nil) - } - - // Accelerate not supported - if aws.BoolValue(req.Config.S3UseAccelerate) { - return s3shared.NewClientConfiguredForAccelerateError(accessPoint, - req.ClientInfo.PartitionID, aws.StringValue(req.Config.Region), nil) - } - - // Ignore the disable host prefix for access points - req.Config.DisableEndpointHostPrefix = aws.Bool(false) - - if err := s3ObjectLambdaAccessPointEndpointBuilder(accessPoint).build(req); err != nil { - return err - } - - removeBucketFromPath(req.HTTPRequest.URL) - - return nil -} - -func updateRequestOutpostAccessPointEndpoint(req *request.Request, accessPoint arn.OutpostAccessPointARN) error { - // Accelerate not supported - if aws.BoolValue(req.Config.S3UseAccelerate) { - return s3shared.NewClientConfiguredForAccelerateError(accessPoint, - req.ClientInfo.PartitionID, aws.StringValue(req.Config.Region), nil) - } - - // Dualstack not supported - if isUseDualStackEndpoint(req) { - return s3shared.NewClientConfiguredForDualStackError(accessPoint, - req.ClientInfo.PartitionID, aws.StringValue(req.Config.Region), nil) - } - - // Ignore the disable host prefix for access points - req.Config.DisableEndpointHostPrefix = aws.Bool(false) - - if err := outpostAccessPointEndpointBuilder(accessPoint).build(req); err != nil { - return err - } - - removeBucketFromPath(req.HTTPRequest.URL) - return nil -} - -func removeBucketFromPath(u *url.URL) { - u.Path = strings.Replace(u.Path, "/{Bucket}", "", -1) - if u.Path == "" { - u.Path = "/" - } -} - -func buildWriteGetObjectResponseEndpoint(req *request.Request) { - // DualStack not supported - if isUseDualStackEndpoint(req) { - req.Error = awserr.New("ConfigurationError", "client configured for dualstack but not supported for operation", nil) - return - } - - // Accelerate not supported - if aws.BoolValue(req.Config.S3UseAccelerate) { - req.Error = awserr.New("ConfigurationError", "client configured for accelerate but not supported for operation", nil) - return - } - - signingName := s3ObjectsLambdaNamespace - signingRegion := req.ClientInfo.SigningRegion - - if !hasCustomEndpoint(req) { - endpoint, err := resolveRegionalEndpoint(req, aws.StringValue(req.Config.Region), req.ClientInfo.ResolvedRegion, EndpointsID) - if err != nil { - req.Error = awserr.New(request.ErrCodeSerialization, "failed to resolve endpoint", err) - return - } - signingRegion = endpoint.SigningRegion - - if err = updateRequestEndpoint(req, endpoint.URL); err != nil { - req.Error = err - return - } - updateS3HostPrefixForS3ObjectLambda(req) - } - - redirectSigner(req, signingName, signingRegion) -} - -func isUseDualStackEndpoint(req *request.Request) bool { - if req.Config.UseDualStackEndpoint != endpoints.DualStackEndpointStateUnset { - return req.Config.UseDualStackEndpoint == endpoints.DualStackEndpointStateEnabled - } - return aws.BoolValue(req.Config.UseDualStack) -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint_builder.go b/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint_builder.go deleted file mode 100644 index 7ae18ef548..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint_builder.go +++ /dev/null @@ -1,239 +0,0 @@ -package s3 - -import ( - "net/url" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/endpoints" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/internal/s3shared" - "github.com/aws/aws-sdk-go/internal/s3shared/arn" - "github.com/aws/aws-sdk-go/private/protocol" -) - -const ( - accessPointPrefixLabel = "accesspoint" - accountIDPrefixLabel = "accountID" - accessPointPrefixTemplate = "{" + accessPointPrefixLabel + "}-{" + accountIDPrefixLabel + "}." - - outpostPrefixLabel = "outpost" - outpostAccessPointPrefixTemplate = accessPointPrefixTemplate + "{" + outpostPrefixLabel + "}." -) - -// hasCustomEndpoint returns true if endpoint is a custom endpoint -func hasCustomEndpoint(r *request.Request) bool { - return len(aws.StringValue(r.Config.Endpoint)) > 0 -} - -// accessPointEndpointBuilder represents the endpoint builder for access point arn -type accessPointEndpointBuilder arn.AccessPointARN - -// build builds the endpoint for corresponding access point arn -// -// For building an endpoint from access point arn, format used is: -// - Access point endpoint format : {accesspointName}-{accountId}.s3-accesspoint.{region}.{dnsSuffix} -// - example : myaccesspoint-012345678901.s3-accesspoint.us-west-2.amazonaws.com -// -// Access Point Endpoint requests are signed using "s3" as signing name. -func (a accessPointEndpointBuilder) build(req *request.Request) error { - resolveService := arn.AccessPointARN(a).Service - resolveRegion := arn.AccessPointARN(a).Region - - endpoint, err := resolveRegionalEndpoint(req, resolveRegion, "", resolveService) - if err != nil { - return s3shared.NewFailedToResolveEndpointError(arn.AccessPointARN(a), - req.ClientInfo.PartitionID, resolveRegion, err) - } - - endpoint.URL = endpoints.AddScheme(endpoint.URL, aws.BoolValue(req.Config.DisableSSL)) - - if !hasCustomEndpoint(req) { - if err = updateRequestEndpoint(req, endpoint.URL); err != nil { - return err - } - - // dual stack provided by endpoint resolver - updateS3HostForS3AccessPoint(req) - } - - protocol.HostPrefixBuilder{ - Prefix: accessPointPrefixTemplate, - LabelsFn: a.hostPrefixLabelValues, - }.Build(req) - - // signer redirection - redirectSigner(req, endpoint.SigningName, endpoint.SigningRegion) - - err = protocol.ValidateEndpointHost(req.Operation.Name, req.HTTPRequest.URL.Host) - if err != nil { - return s3shared.NewInvalidARNError(arn.AccessPointARN(a), err) - } - - return nil -} - -func (a accessPointEndpointBuilder) hostPrefixLabelValues() map[string]string { - return map[string]string{ - accessPointPrefixLabel: arn.AccessPointARN(a).AccessPointName, - accountIDPrefixLabel: arn.AccessPointARN(a).AccountID, - } -} - -// s3ObjectLambdaAccessPointEndpointBuilder represents the endpoint builder for an s3 object lambda access point arn -type s3ObjectLambdaAccessPointEndpointBuilder arn.S3ObjectLambdaAccessPointARN - -// build builds the endpoint for corresponding access point arn -// -// For building an endpoint from access point arn, format used is: -// - Access point endpoint format : {accesspointName}-{accountId}.s3-object-lambda.{region}.{dnsSuffix} -// - example : myaccesspoint-012345678901.s3-object-lambda.us-west-2.amazonaws.com -// -// Access Point Endpoint requests are signed using "s3-object-lambda" as signing name. -func (a s3ObjectLambdaAccessPointEndpointBuilder) build(req *request.Request) error { - resolveRegion := arn.S3ObjectLambdaAccessPointARN(a).Region - - endpoint, err := resolveRegionalEndpoint(req, resolveRegion, "", EndpointsID) - if err != nil { - return s3shared.NewFailedToResolveEndpointError(arn.S3ObjectLambdaAccessPointARN(a), - req.ClientInfo.PartitionID, resolveRegion, err) - } - - endpoint.URL = endpoints.AddScheme(endpoint.URL, aws.BoolValue(req.Config.DisableSSL)) - - endpoint.SigningName = s3ObjectsLambdaNamespace - - if !hasCustomEndpoint(req) { - if err = updateRequestEndpoint(req, endpoint.URL); err != nil { - return err - } - - updateS3HostPrefixForS3ObjectLambda(req) - } - - protocol.HostPrefixBuilder{ - Prefix: accessPointPrefixTemplate, - LabelsFn: a.hostPrefixLabelValues, - }.Build(req) - - // signer redirection - redirectSigner(req, endpoint.SigningName, endpoint.SigningRegion) - - err = protocol.ValidateEndpointHost(req.Operation.Name, req.HTTPRequest.URL.Host) - if err != nil { - return s3shared.NewInvalidARNError(arn.S3ObjectLambdaAccessPointARN(a), err) - } - - return nil -} - -func (a s3ObjectLambdaAccessPointEndpointBuilder) hostPrefixLabelValues() map[string]string { - return map[string]string{ - accessPointPrefixLabel: arn.S3ObjectLambdaAccessPointARN(a).AccessPointName, - accountIDPrefixLabel: arn.S3ObjectLambdaAccessPointARN(a).AccountID, - } -} - -// outpostAccessPointEndpointBuilder represents the Endpoint builder for outpost access point arn. -type outpostAccessPointEndpointBuilder arn.OutpostAccessPointARN - -// build builds an endpoint corresponding to the outpost access point arn. -// -// For building an endpoint from outpost access point arn, format used is: -// - Outpost access point endpoint format : {accesspointName}-{accountId}.{outpostId}.s3-outposts.{region}.{dnsSuffix} -// - example : myaccesspoint-012345678901.op-01234567890123456.s3-outposts.us-west-2.amazonaws.com -// -// Outpost AccessPoint Endpoint request are signed using "s3-outposts" as signing name. -func (o outpostAccessPointEndpointBuilder) build(req *request.Request) error { - resolveRegion := o.Region - resolveService := o.Service - - endpointsID := resolveService - if resolveService == s3OutpostsNamespace { - endpointsID = "s3" - } - - endpoint, err := resolveRegionalEndpoint(req, resolveRegion, "", endpointsID) - if err != nil { - return s3shared.NewFailedToResolveEndpointError(o, - req.ClientInfo.PartitionID, resolveRegion, err) - } - - endpoint.URL = endpoints.AddScheme(endpoint.URL, aws.BoolValue(req.Config.DisableSSL)) - - if !hasCustomEndpoint(req) { - if err = updateRequestEndpoint(req, endpoint.URL); err != nil { - return err - } - updateHostPrefix(req, endpointsID, resolveService) - } - - protocol.HostPrefixBuilder{ - Prefix: outpostAccessPointPrefixTemplate, - LabelsFn: o.hostPrefixLabelValues, - }.Build(req) - - // set the signing region, name to resolved names from ARN - redirectSigner(req, resolveService, resolveRegion) - - err = protocol.ValidateEndpointHost(req.Operation.Name, req.HTTPRequest.URL.Host) - if err != nil { - return s3shared.NewInvalidARNError(o, err) - } - - return nil -} - -func (o outpostAccessPointEndpointBuilder) hostPrefixLabelValues() map[string]string { - return map[string]string{ - accessPointPrefixLabel: o.AccessPointName, - accountIDPrefixLabel: o.AccountID, - outpostPrefixLabel: o.OutpostID, - } -} - -func resolveRegionalEndpoint(r *request.Request, region, resolvedRegion, endpointsID string) (endpoints.ResolvedEndpoint, error) { - return r.Config.EndpointResolver.EndpointFor(endpointsID, region, func(opts *endpoints.Options) { - opts.DisableSSL = aws.BoolValue(r.Config.DisableSSL) - opts.UseDualStack = aws.BoolValue(r.Config.UseDualStack) - opts.UseDualStackEndpoint = r.Config.UseDualStackEndpoint - opts.UseFIPSEndpoint = r.Config.UseFIPSEndpoint - opts.S3UsEast1RegionalEndpoint = endpoints.RegionalS3UsEast1Endpoint - opts.ResolvedRegion = resolvedRegion - opts.Logger = r.Config.Logger - opts.LogDeprecated = r.Config.LogLevel.Matches(aws.LogDebugWithDeprecated) - }) -} - -func updateRequestEndpoint(r *request.Request, endpoint string) (err error) { - r.HTTPRequest.URL, err = url.Parse(endpoint + r.Operation.HTTPPath) - if err != nil { - return awserr.New(request.ErrCodeSerialization, - "failed to parse endpoint URL", err) - } - - return nil -} - -// redirectSigner sets signing name, signing region for a request -func redirectSigner(req *request.Request, signingName string, signingRegion string) { - req.ClientInfo.SigningName = signingName - req.ClientInfo.SigningRegion = signingRegion -} - -func updateS3HostForS3AccessPoint(req *request.Request) { - updateHostPrefix(req, "s3", s3AccessPointNamespace) -} - -func updateS3HostPrefixForS3ObjectLambda(req *request.Request) { - updateHostPrefix(req, "s3", s3ObjectsLambdaNamespace) -} - -func updateHostPrefix(req *request.Request, oldEndpointPrefix, newEndpointPrefix string) { - host := req.HTTPRequest.URL.Host - if strings.HasPrefix(host, oldEndpointPrefix) { - // replace service hostlabel oldEndpointPrefix to newEndpointPrefix - req.HTTPRequest.URL.Host = newEndpointPrefix + host[len(oldEndpointPrefix):] - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/errors.go b/vendor/github.com/aws/aws-sdk-go/service/s3/errors.go deleted file mode 100644 index 8a67333ab2..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/errors.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package s3 - -const ( - - // ErrCodeBucketAlreadyExists for service response error code - // "BucketAlreadyExists". - // - // The requested bucket name is not available. The bucket namespace is shared - // by all users of the system. Select a different name and try again. - ErrCodeBucketAlreadyExists = "BucketAlreadyExists" - - // ErrCodeBucketAlreadyOwnedByYou for service response error code - // "BucketAlreadyOwnedByYou". - // - // The bucket you tried to create already exists, and you own it. Amazon S3 - // returns this error in all Amazon Web Services Regions except in the North - // Virginia Region. For legacy compatibility, if you re-create an existing bucket - // that you already own in the North Virginia Region, Amazon S3 returns 200 - // OK and resets the bucket access control lists (ACLs). - ErrCodeBucketAlreadyOwnedByYou = "BucketAlreadyOwnedByYou" - - // ErrCodeInvalidObjectState for service response error code - // "InvalidObjectState". - // - // Object is archived and inaccessible until restored. - // - // If the object you are retrieving is stored in the S3 Glacier Flexible Retrieval - // storage class, the S3 Glacier Deep Archive storage class, the S3 Intelligent-Tiering - // Archive Access tier, or the S3 Intelligent-Tiering Deep Archive Access tier, - // before you can retrieve the object you must first restore a copy using RestoreObject - // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html). - // Otherwise, this operation returns an InvalidObjectState error. For information - // about restoring archived objects, see Restoring Archived Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html) - // in the Amazon S3 User Guide. - ErrCodeInvalidObjectState = "InvalidObjectState" - - // ErrCodeNoSuchBucket for service response error code - // "NoSuchBucket". - // - // The specified bucket does not exist. - ErrCodeNoSuchBucket = "NoSuchBucket" - - // ErrCodeNoSuchKey for service response error code - // "NoSuchKey". - // - // The specified key does not exist. - ErrCodeNoSuchKey = "NoSuchKey" - - // ErrCodeNoSuchUpload for service response error code - // "NoSuchUpload". - // - // The specified multipart upload does not exist. - ErrCodeNoSuchUpload = "NoSuchUpload" - - // ErrCodeObjectAlreadyInActiveTierError for service response error code - // "ObjectAlreadyInActiveTierError". - // - // This action is not allowed against this storage tier. - ErrCodeObjectAlreadyInActiveTierError = "ObjectAlreadyInActiveTierError" - - // ErrCodeObjectNotInActiveTierError for service response error code - // "ObjectNotInActiveTierError". - // - // The source object of the COPY action is not in the active tier and is only - // stored in Amazon S3 Glacier. - ErrCodeObjectNotInActiveTierError = "ObjectNotInActiveTierError" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go b/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go deleted file mode 100644 index 81cdec1ae7..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go +++ /dev/null @@ -1,136 +0,0 @@ -package s3 - -import ( - "fmt" - "net/url" - "regexp" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/request" -) - -// an operationBlacklist is a list of operation names that should a -// request handler should not be executed with. -type operationBlacklist []string - -// Continue will return true of the Request's operation name is not -// in the blacklist. False otherwise. -func (b operationBlacklist) Continue(r *request.Request) bool { - for i := 0; i < len(b); i++ { - if b[i] == r.Operation.Name { - return false - } - } - return true -} - -var accelerateOpBlacklist = operationBlacklist{ - opListBuckets, opCreateBucket, opDeleteBucket, -} - -// Automatically add the bucket name to the endpoint domain -// if possible. This style of bucket is valid for all bucket names which are -// DNS compatible and do not contain "." -func updateEndpointForS3Config(r *request.Request, bucketName string) { - forceHostStyle := aws.BoolValue(r.Config.S3ForcePathStyle) - accelerate := aws.BoolValue(r.Config.S3UseAccelerate) - - if accelerate && accelerateOpBlacklist.Continue(r) { - if forceHostStyle { - if r.Config.Logger != nil { - r.Config.Logger.Log("ERROR: aws.Config.S3UseAccelerate is not compatible with aws.Config.S3ForcePathStyle, ignoring S3ForcePathStyle.") - } - } - updateEndpointForAccelerate(r, bucketName) - } else if !forceHostStyle && r.Operation.Name != opGetBucketLocation { - updateEndpointForHostStyle(r, bucketName) - } -} - -func updateEndpointForHostStyle(r *request.Request, bucketName string) { - if !hostCompatibleBucketName(r.HTTPRequest.URL, bucketName) { - // bucket name must be valid to put into the host - return - } - - moveBucketToHost(r.HTTPRequest.URL, bucketName) -} - -var ( - accelElem = []byte("s3-accelerate.dualstack.") -) - -func updateEndpointForAccelerate(r *request.Request, bucketName string) { - if !hostCompatibleBucketName(r.HTTPRequest.URL, bucketName) { - r.Error = awserr.New("InvalidParameterException", - fmt.Sprintf("bucket name %s is not compatible with S3 Accelerate", bucketName), - nil) - return - } - - parts := strings.Split(r.HTTPRequest.URL.Host, ".") - if len(parts) < 3 { - r.Error = awserr.New("InvalidParameterExecption", - fmt.Sprintf("unable to update endpoint host for S3 accelerate, hostname invalid, %s", - r.HTTPRequest.URL.Host), nil) - return - } - - if parts[0] == "s3" || strings.HasPrefix(parts[0], "s3-") { - parts[0] = "s3-accelerate" - } - for i := 1; i+1 < len(parts); i++ { - if parts[i] == aws.StringValue(r.Config.Region) { - parts = append(parts[:i], parts[i+1:]...) - break - } - } - - r.HTTPRequest.URL.Host = strings.Join(parts, ".") - - moveBucketToHost(r.HTTPRequest.URL, bucketName) -} - -// Attempts to retrieve the bucket name from the request input parameters. -// If no bucket is found, or the field is empty "", false will be returned. -func bucketNameFromReqParams(params interface{}) (string, bool) { - if iface, ok := params.(bucketGetter); ok { - b := iface.getBucket() - return b, len(b) > 0 - } - - return "", false -} - -// hostCompatibleBucketName returns true if the request should -// put the bucket in the host. This is false if S3ForcePathStyle is -// explicitly set or if the bucket is not DNS compatible. -func hostCompatibleBucketName(u *url.URL, bucket string) bool { - // Bucket might be DNS compatible but dots in the hostname will fail - // certificate validation, so do not use host-style. - if u.Scheme == "https" && strings.Contains(bucket, ".") { - return false - } - - // if the bucket is DNS compatible - return dnsCompatibleBucketName(bucket) -} - -var reDomain = regexp.MustCompile(`^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$`) -var reIPAddress = regexp.MustCompile(`^(\d+\.){3}\d+$`) - -// dnsCompatibleBucketName returns true if the bucket name is DNS compatible. -// Buckets created outside of the classic region MUST be DNS compatible. -func dnsCompatibleBucketName(bucket string) bool { - return reDomain.MatchString(bucket) && - !reIPAddress.MatchString(bucket) && - !strings.Contains(bucket, "..") -} - -// moveBucketToHost moves the bucket name from the URI path to URL host. -func moveBucketToHost(u *url.URL, bucket string) { - u.Host = bucket + "." + u.Host - removeBucketFromPath(u) -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers.go b/vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers.go deleted file mode 100644 index 308b7d473e..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers.go +++ /dev/null @@ -1,9 +0,0 @@ -//go:build !go1.6 -// +build !go1.6 - -package s3 - -import "github.com/aws/aws-sdk-go/aws/request" - -func platformRequestHandlers(r *request.Request) { -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers_go1.6.go b/vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers_go1.6.go deleted file mode 100644 index 70feffab75..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers_go1.6.go +++ /dev/null @@ -1,29 +0,0 @@ -//go:build go1.6 -// +build go1.6 - -package s3 - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -func platformRequestHandlers(r *request.Request) { - if r.Operation.HTTPMethod == "PUT" { - // 100-Continue should only be used on put requests. - r.Handlers.Sign.PushBack(add100Continue) - } -} - -func add100Continue(r *request.Request) { - if aws.BoolValue(r.Config.S3Disable100Continue) { - return - } - if r.HTTPRequest.ContentLength < 1024*1024*2 { - // Ignore requests smaller than 2MB. This helps prevent delaying - // requests unnecessarily. - return - } - - r.HTTPRequest.Header.Set("Expect", "100-continue") -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3iface/interface.go b/vendor/github.com/aws/aws-sdk-go/service/s3/s3iface/interface.go deleted file mode 100644 index d13b461703..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/s3iface/interface.go +++ /dev/null @@ -1,490 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package s3iface provides an interface to enable mocking the Amazon Simple Storage Service service client -// for testing your code. -// -// It is important to note that this interface will have breaking changes -// when the service model is updated and adds new API operations, paginators, -// and waiters. -package s3iface - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/service/s3" -) - -// S3API provides an interface to enable mocking the -// s3.S3 service client's API operation, -// paginators, and waiters. This make unit testing your code that calls out -// to the SDK's service client's calls easier. -// -// The best way to use this interface is so the SDK's service client's calls -// can be stubbed out for unit testing your code with the SDK without needing -// to inject custom request handlers into the SDK's request pipeline. -// -// // myFunc uses an SDK service client to make a request to -// // Amazon Simple Storage Service. -// func myFunc(svc s3iface.S3API) bool { -// // Make svc.AbortMultipartUpload request -// } -// -// func main() { -// sess := session.New() -// svc := s3.New(sess) -// -// myFunc(svc) -// } -// -// In your _test.go file: -// -// // Define a mock struct to be used in your unit tests of myFunc. -// type mockS3Client struct { -// s3iface.S3API -// } -// func (m *mockS3Client) AbortMultipartUpload(input *s3.AbortMultipartUploadInput) (*s3.AbortMultipartUploadOutput, error) { -// // mock response/functionality -// } -// -// func TestMyFunc(t *testing.T) { -// // Setup Test -// mockSvc := &mockS3Client{} -// -// myfunc(mockSvc) -// -// // Verify myFunc's functionality -// } -// -// It is important to note that this interface will have breaking changes -// when the service model is updated and adds new API operations, paginators, -// and waiters. Its suggested to use the pattern above for testing, or using -// tooling to generate mocks to satisfy the interfaces. -type S3API interface { - AbortMultipartUpload(*s3.AbortMultipartUploadInput) (*s3.AbortMultipartUploadOutput, error) - AbortMultipartUploadWithContext(aws.Context, *s3.AbortMultipartUploadInput, ...request.Option) (*s3.AbortMultipartUploadOutput, error) - AbortMultipartUploadRequest(*s3.AbortMultipartUploadInput) (*request.Request, *s3.AbortMultipartUploadOutput) - - CompleteMultipartUpload(*s3.CompleteMultipartUploadInput) (*s3.CompleteMultipartUploadOutput, error) - CompleteMultipartUploadWithContext(aws.Context, *s3.CompleteMultipartUploadInput, ...request.Option) (*s3.CompleteMultipartUploadOutput, error) - CompleteMultipartUploadRequest(*s3.CompleteMultipartUploadInput) (*request.Request, *s3.CompleteMultipartUploadOutput) - - CopyObject(*s3.CopyObjectInput) (*s3.CopyObjectOutput, error) - CopyObjectWithContext(aws.Context, *s3.CopyObjectInput, ...request.Option) (*s3.CopyObjectOutput, error) - CopyObjectRequest(*s3.CopyObjectInput) (*request.Request, *s3.CopyObjectOutput) - - CreateBucket(*s3.CreateBucketInput) (*s3.CreateBucketOutput, error) - CreateBucketWithContext(aws.Context, *s3.CreateBucketInput, ...request.Option) (*s3.CreateBucketOutput, error) - CreateBucketRequest(*s3.CreateBucketInput) (*request.Request, *s3.CreateBucketOutput) - - CreateMultipartUpload(*s3.CreateMultipartUploadInput) (*s3.CreateMultipartUploadOutput, error) - CreateMultipartUploadWithContext(aws.Context, *s3.CreateMultipartUploadInput, ...request.Option) (*s3.CreateMultipartUploadOutput, error) - CreateMultipartUploadRequest(*s3.CreateMultipartUploadInput) (*request.Request, *s3.CreateMultipartUploadOutput) - - CreateSession(*s3.CreateSessionInput) (*s3.CreateSessionOutput, error) - CreateSessionWithContext(aws.Context, *s3.CreateSessionInput, ...request.Option) (*s3.CreateSessionOutput, error) - CreateSessionRequest(*s3.CreateSessionInput) (*request.Request, *s3.CreateSessionOutput) - - DeleteBucket(*s3.DeleteBucketInput) (*s3.DeleteBucketOutput, error) - DeleteBucketWithContext(aws.Context, *s3.DeleteBucketInput, ...request.Option) (*s3.DeleteBucketOutput, error) - DeleteBucketRequest(*s3.DeleteBucketInput) (*request.Request, *s3.DeleteBucketOutput) - - DeleteBucketAnalyticsConfiguration(*s3.DeleteBucketAnalyticsConfigurationInput) (*s3.DeleteBucketAnalyticsConfigurationOutput, error) - DeleteBucketAnalyticsConfigurationWithContext(aws.Context, *s3.DeleteBucketAnalyticsConfigurationInput, ...request.Option) (*s3.DeleteBucketAnalyticsConfigurationOutput, error) - DeleteBucketAnalyticsConfigurationRequest(*s3.DeleteBucketAnalyticsConfigurationInput) (*request.Request, *s3.DeleteBucketAnalyticsConfigurationOutput) - - DeleteBucketCors(*s3.DeleteBucketCorsInput) (*s3.DeleteBucketCorsOutput, error) - DeleteBucketCorsWithContext(aws.Context, *s3.DeleteBucketCorsInput, ...request.Option) (*s3.DeleteBucketCorsOutput, error) - DeleteBucketCorsRequest(*s3.DeleteBucketCorsInput) (*request.Request, *s3.DeleteBucketCorsOutput) - - DeleteBucketEncryption(*s3.DeleteBucketEncryptionInput) (*s3.DeleteBucketEncryptionOutput, error) - DeleteBucketEncryptionWithContext(aws.Context, *s3.DeleteBucketEncryptionInput, ...request.Option) (*s3.DeleteBucketEncryptionOutput, error) - DeleteBucketEncryptionRequest(*s3.DeleteBucketEncryptionInput) (*request.Request, *s3.DeleteBucketEncryptionOutput) - - DeleteBucketIntelligentTieringConfiguration(*s3.DeleteBucketIntelligentTieringConfigurationInput) (*s3.DeleteBucketIntelligentTieringConfigurationOutput, error) - DeleteBucketIntelligentTieringConfigurationWithContext(aws.Context, *s3.DeleteBucketIntelligentTieringConfigurationInput, ...request.Option) (*s3.DeleteBucketIntelligentTieringConfigurationOutput, error) - DeleteBucketIntelligentTieringConfigurationRequest(*s3.DeleteBucketIntelligentTieringConfigurationInput) (*request.Request, *s3.DeleteBucketIntelligentTieringConfigurationOutput) - - DeleteBucketInventoryConfiguration(*s3.DeleteBucketInventoryConfigurationInput) (*s3.DeleteBucketInventoryConfigurationOutput, error) - DeleteBucketInventoryConfigurationWithContext(aws.Context, *s3.DeleteBucketInventoryConfigurationInput, ...request.Option) (*s3.DeleteBucketInventoryConfigurationOutput, error) - DeleteBucketInventoryConfigurationRequest(*s3.DeleteBucketInventoryConfigurationInput) (*request.Request, *s3.DeleteBucketInventoryConfigurationOutput) - - DeleteBucketLifecycle(*s3.DeleteBucketLifecycleInput) (*s3.DeleteBucketLifecycleOutput, error) - DeleteBucketLifecycleWithContext(aws.Context, *s3.DeleteBucketLifecycleInput, ...request.Option) (*s3.DeleteBucketLifecycleOutput, error) - DeleteBucketLifecycleRequest(*s3.DeleteBucketLifecycleInput) (*request.Request, *s3.DeleteBucketLifecycleOutput) - - DeleteBucketMetricsConfiguration(*s3.DeleteBucketMetricsConfigurationInput) (*s3.DeleteBucketMetricsConfigurationOutput, error) - DeleteBucketMetricsConfigurationWithContext(aws.Context, *s3.DeleteBucketMetricsConfigurationInput, ...request.Option) (*s3.DeleteBucketMetricsConfigurationOutput, error) - DeleteBucketMetricsConfigurationRequest(*s3.DeleteBucketMetricsConfigurationInput) (*request.Request, *s3.DeleteBucketMetricsConfigurationOutput) - - DeleteBucketOwnershipControls(*s3.DeleteBucketOwnershipControlsInput) (*s3.DeleteBucketOwnershipControlsOutput, error) - DeleteBucketOwnershipControlsWithContext(aws.Context, *s3.DeleteBucketOwnershipControlsInput, ...request.Option) (*s3.DeleteBucketOwnershipControlsOutput, error) - DeleteBucketOwnershipControlsRequest(*s3.DeleteBucketOwnershipControlsInput) (*request.Request, *s3.DeleteBucketOwnershipControlsOutput) - - DeleteBucketPolicy(*s3.DeleteBucketPolicyInput) (*s3.DeleteBucketPolicyOutput, error) - DeleteBucketPolicyWithContext(aws.Context, *s3.DeleteBucketPolicyInput, ...request.Option) (*s3.DeleteBucketPolicyOutput, error) - DeleteBucketPolicyRequest(*s3.DeleteBucketPolicyInput) (*request.Request, *s3.DeleteBucketPolicyOutput) - - DeleteBucketReplication(*s3.DeleteBucketReplicationInput) (*s3.DeleteBucketReplicationOutput, error) - DeleteBucketReplicationWithContext(aws.Context, *s3.DeleteBucketReplicationInput, ...request.Option) (*s3.DeleteBucketReplicationOutput, error) - DeleteBucketReplicationRequest(*s3.DeleteBucketReplicationInput) (*request.Request, *s3.DeleteBucketReplicationOutput) - - DeleteBucketTagging(*s3.DeleteBucketTaggingInput) (*s3.DeleteBucketTaggingOutput, error) - DeleteBucketTaggingWithContext(aws.Context, *s3.DeleteBucketTaggingInput, ...request.Option) (*s3.DeleteBucketTaggingOutput, error) - DeleteBucketTaggingRequest(*s3.DeleteBucketTaggingInput) (*request.Request, *s3.DeleteBucketTaggingOutput) - - DeleteBucketWebsite(*s3.DeleteBucketWebsiteInput) (*s3.DeleteBucketWebsiteOutput, error) - DeleteBucketWebsiteWithContext(aws.Context, *s3.DeleteBucketWebsiteInput, ...request.Option) (*s3.DeleteBucketWebsiteOutput, error) - DeleteBucketWebsiteRequest(*s3.DeleteBucketWebsiteInput) (*request.Request, *s3.DeleteBucketWebsiteOutput) - - DeleteObject(*s3.DeleteObjectInput) (*s3.DeleteObjectOutput, error) - DeleteObjectWithContext(aws.Context, *s3.DeleteObjectInput, ...request.Option) (*s3.DeleteObjectOutput, error) - DeleteObjectRequest(*s3.DeleteObjectInput) (*request.Request, *s3.DeleteObjectOutput) - - DeleteObjectTagging(*s3.DeleteObjectTaggingInput) (*s3.DeleteObjectTaggingOutput, error) - DeleteObjectTaggingWithContext(aws.Context, *s3.DeleteObjectTaggingInput, ...request.Option) (*s3.DeleteObjectTaggingOutput, error) - DeleteObjectTaggingRequest(*s3.DeleteObjectTaggingInput) (*request.Request, *s3.DeleteObjectTaggingOutput) - - DeleteObjects(*s3.DeleteObjectsInput) (*s3.DeleteObjectsOutput, error) - DeleteObjectsWithContext(aws.Context, *s3.DeleteObjectsInput, ...request.Option) (*s3.DeleteObjectsOutput, error) - DeleteObjectsRequest(*s3.DeleteObjectsInput) (*request.Request, *s3.DeleteObjectsOutput) - - DeletePublicAccessBlock(*s3.DeletePublicAccessBlockInput) (*s3.DeletePublicAccessBlockOutput, error) - DeletePublicAccessBlockWithContext(aws.Context, *s3.DeletePublicAccessBlockInput, ...request.Option) (*s3.DeletePublicAccessBlockOutput, error) - DeletePublicAccessBlockRequest(*s3.DeletePublicAccessBlockInput) (*request.Request, *s3.DeletePublicAccessBlockOutput) - - GetBucketAccelerateConfiguration(*s3.GetBucketAccelerateConfigurationInput) (*s3.GetBucketAccelerateConfigurationOutput, error) - GetBucketAccelerateConfigurationWithContext(aws.Context, *s3.GetBucketAccelerateConfigurationInput, ...request.Option) (*s3.GetBucketAccelerateConfigurationOutput, error) - GetBucketAccelerateConfigurationRequest(*s3.GetBucketAccelerateConfigurationInput) (*request.Request, *s3.GetBucketAccelerateConfigurationOutput) - - GetBucketAcl(*s3.GetBucketAclInput) (*s3.GetBucketAclOutput, error) - GetBucketAclWithContext(aws.Context, *s3.GetBucketAclInput, ...request.Option) (*s3.GetBucketAclOutput, error) - GetBucketAclRequest(*s3.GetBucketAclInput) (*request.Request, *s3.GetBucketAclOutput) - - GetBucketAnalyticsConfiguration(*s3.GetBucketAnalyticsConfigurationInput) (*s3.GetBucketAnalyticsConfigurationOutput, error) - GetBucketAnalyticsConfigurationWithContext(aws.Context, *s3.GetBucketAnalyticsConfigurationInput, ...request.Option) (*s3.GetBucketAnalyticsConfigurationOutput, error) - GetBucketAnalyticsConfigurationRequest(*s3.GetBucketAnalyticsConfigurationInput) (*request.Request, *s3.GetBucketAnalyticsConfigurationOutput) - - GetBucketCors(*s3.GetBucketCorsInput) (*s3.GetBucketCorsOutput, error) - GetBucketCorsWithContext(aws.Context, *s3.GetBucketCorsInput, ...request.Option) (*s3.GetBucketCorsOutput, error) - GetBucketCorsRequest(*s3.GetBucketCorsInput) (*request.Request, *s3.GetBucketCorsOutput) - - GetBucketEncryption(*s3.GetBucketEncryptionInput) (*s3.GetBucketEncryptionOutput, error) - GetBucketEncryptionWithContext(aws.Context, *s3.GetBucketEncryptionInput, ...request.Option) (*s3.GetBucketEncryptionOutput, error) - GetBucketEncryptionRequest(*s3.GetBucketEncryptionInput) (*request.Request, *s3.GetBucketEncryptionOutput) - - GetBucketIntelligentTieringConfiguration(*s3.GetBucketIntelligentTieringConfigurationInput) (*s3.GetBucketIntelligentTieringConfigurationOutput, error) - GetBucketIntelligentTieringConfigurationWithContext(aws.Context, *s3.GetBucketIntelligentTieringConfigurationInput, ...request.Option) (*s3.GetBucketIntelligentTieringConfigurationOutput, error) - GetBucketIntelligentTieringConfigurationRequest(*s3.GetBucketIntelligentTieringConfigurationInput) (*request.Request, *s3.GetBucketIntelligentTieringConfigurationOutput) - - GetBucketInventoryConfiguration(*s3.GetBucketInventoryConfigurationInput) (*s3.GetBucketInventoryConfigurationOutput, error) - GetBucketInventoryConfigurationWithContext(aws.Context, *s3.GetBucketInventoryConfigurationInput, ...request.Option) (*s3.GetBucketInventoryConfigurationOutput, error) - GetBucketInventoryConfigurationRequest(*s3.GetBucketInventoryConfigurationInput) (*request.Request, *s3.GetBucketInventoryConfigurationOutput) - - GetBucketLifecycle(*s3.GetBucketLifecycleInput) (*s3.GetBucketLifecycleOutput, error) - GetBucketLifecycleWithContext(aws.Context, *s3.GetBucketLifecycleInput, ...request.Option) (*s3.GetBucketLifecycleOutput, error) - GetBucketLifecycleRequest(*s3.GetBucketLifecycleInput) (*request.Request, *s3.GetBucketLifecycleOutput) - - GetBucketLifecycleConfiguration(*s3.GetBucketLifecycleConfigurationInput) (*s3.GetBucketLifecycleConfigurationOutput, error) - GetBucketLifecycleConfigurationWithContext(aws.Context, *s3.GetBucketLifecycleConfigurationInput, ...request.Option) (*s3.GetBucketLifecycleConfigurationOutput, error) - GetBucketLifecycleConfigurationRequest(*s3.GetBucketLifecycleConfigurationInput) (*request.Request, *s3.GetBucketLifecycleConfigurationOutput) - - GetBucketLocation(*s3.GetBucketLocationInput) (*s3.GetBucketLocationOutput, error) - GetBucketLocationWithContext(aws.Context, *s3.GetBucketLocationInput, ...request.Option) (*s3.GetBucketLocationOutput, error) - GetBucketLocationRequest(*s3.GetBucketLocationInput) (*request.Request, *s3.GetBucketLocationOutput) - - GetBucketLogging(*s3.GetBucketLoggingInput) (*s3.GetBucketLoggingOutput, error) - GetBucketLoggingWithContext(aws.Context, *s3.GetBucketLoggingInput, ...request.Option) (*s3.GetBucketLoggingOutput, error) - GetBucketLoggingRequest(*s3.GetBucketLoggingInput) (*request.Request, *s3.GetBucketLoggingOutput) - - GetBucketMetricsConfiguration(*s3.GetBucketMetricsConfigurationInput) (*s3.GetBucketMetricsConfigurationOutput, error) - GetBucketMetricsConfigurationWithContext(aws.Context, *s3.GetBucketMetricsConfigurationInput, ...request.Option) (*s3.GetBucketMetricsConfigurationOutput, error) - GetBucketMetricsConfigurationRequest(*s3.GetBucketMetricsConfigurationInput) (*request.Request, *s3.GetBucketMetricsConfigurationOutput) - - GetBucketNotification(*s3.GetBucketNotificationConfigurationRequest) (*s3.NotificationConfigurationDeprecated, error) - GetBucketNotificationWithContext(aws.Context, *s3.GetBucketNotificationConfigurationRequest, ...request.Option) (*s3.NotificationConfigurationDeprecated, error) - GetBucketNotificationRequest(*s3.GetBucketNotificationConfigurationRequest) (*request.Request, *s3.NotificationConfigurationDeprecated) - - GetBucketNotificationConfiguration(*s3.GetBucketNotificationConfigurationRequest) (*s3.NotificationConfiguration, error) - GetBucketNotificationConfigurationWithContext(aws.Context, *s3.GetBucketNotificationConfigurationRequest, ...request.Option) (*s3.NotificationConfiguration, error) - GetBucketNotificationConfigurationRequest(*s3.GetBucketNotificationConfigurationRequest) (*request.Request, *s3.NotificationConfiguration) - - GetBucketOwnershipControls(*s3.GetBucketOwnershipControlsInput) (*s3.GetBucketOwnershipControlsOutput, error) - GetBucketOwnershipControlsWithContext(aws.Context, *s3.GetBucketOwnershipControlsInput, ...request.Option) (*s3.GetBucketOwnershipControlsOutput, error) - GetBucketOwnershipControlsRequest(*s3.GetBucketOwnershipControlsInput) (*request.Request, *s3.GetBucketOwnershipControlsOutput) - - GetBucketPolicy(*s3.GetBucketPolicyInput) (*s3.GetBucketPolicyOutput, error) - GetBucketPolicyWithContext(aws.Context, *s3.GetBucketPolicyInput, ...request.Option) (*s3.GetBucketPolicyOutput, error) - GetBucketPolicyRequest(*s3.GetBucketPolicyInput) (*request.Request, *s3.GetBucketPolicyOutput) - - GetBucketPolicyStatus(*s3.GetBucketPolicyStatusInput) (*s3.GetBucketPolicyStatusOutput, error) - GetBucketPolicyStatusWithContext(aws.Context, *s3.GetBucketPolicyStatusInput, ...request.Option) (*s3.GetBucketPolicyStatusOutput, error) - GetBucketPolicyStatusRequest(*s3.GetBucketPolicyStatusInput) (*request.Request, *s3.GetBucketPolicyStatusOutput) - - GetBucketReplication(*s3.GetBucketReplicationInput) (*s3.GetBucketReplicationOutput, error) - GetBucketReplicationWithContext(aws.Context, *s3.GetBucketReplicationInput, ...request.Option) (*s3.GetBucketReplicationOutput, error) - GetBucketReplicationRequest(*s3.GetBucketReplicationInput) (*request.Request, *s3.GetBucketReplicationOutput) - - GetBucketRequestPayment(*s3.GetBucketRequestPaymentInput) (*s3.GetBucketRequestPaymentOutput, error) - GetBucketRequestPaymentWithContext(aws.Context, *s3.GetBucketRequestPaymentInput, ...request.Option) (*s3.GetBucketRequestPaymentOutput, error) - GetBucketRequestPaymentRequest(*s3.GetBucketRequestPaymentInput) (*request.Request, *s3.GetBucketRequestPaymentOutput) - - GetBucketTagging(*s3.GetBucketTaggingInput) (*s3.GetBucketTaggingOutput, error) - GetBucketTaggingWithContext(aws.Context, *s3.GetBucketTaggingInput, ...request.Option) (*s3.GetBucketTaggingOutput, error) - GetBucketTaggingRequest(*s3.GetBucketTaggingInput) (*request.Request, *s3.GetBucketTaggingOutput) - - GetBucketVersioning(*s3.GetBucketVersioningInput) (*s3.GetBucketVersioningOutput, error) - GetBucketVersioningWithContext(aws.Context, *s3.GetBucketVersioningInput, ...request.Option) (*s3.GetBucketVersioningOutput, error) - GetBucketVersioningRequest(*s3.GetBucketVersioningInput) (*request.Request, *s3.GetBucketVersioningOutput) - - GetBucketWebsite(*s3.GetBucketWebsiteInput) (*s3.GetBucketWebsiteOutput, error) - GetBucketWebsiteWithContext(aws.Context, *s3.GetBucketWebsiteInput, ...request.Option) (*s3.GetBucketWebsiteOutput, error) - GetBucketWebsiteRequest(*s3.GetBucketWebsiteInput) (*request.Request, *s3.GetBucketWebsiteOutput) - - GetObject(*s3.GetObjectInput) (*s3.GetObjectOutput, error) - GetObjectWithContext(aws.Context, *s3.GetObjectInput, ...request.Option) (*s3.GetObjectOutput, error) - GetObjectRequest(*s3.GetObjectInput) (*request.Request, *s3.GetObjectOutput) - - GetObjectAcl(*s3.GetObjectAclInput) (*s3.GetObjectAclOutput, error) - GetObjectAclWithContext(aws.Context, *s3.GetObjectAclInput, ...request.Option) (*s3.GetObjectAclOutput, error) - GetObjectAclRequest(*s3.GetObjectAclInput) (*request.Request, *s3.GetObjectAclOutput) - - GetObjectAttributes(*s3.GetObjectAttributesInput) (*s3.GetObjectAttributesOutput, error) - GetObjectAttributesWithContext(aws.Context, *s3.GetObjectAttributesInput, ...request.Option) (*s3.GetObjectAttributesOutput, error) - GetObjectAttributesRequest(*s3.GetObjectAttributesInput) (*request.Request, *s3.GetObjectAttributesOutput) - - GetObjectLegalHold(*s3.GetObjectLegalHoldInput) (*s3.GetObjectLegalHoldOutput, error) - GetObjectLegalHoldWithContext(aws.Context, *s3.GetObjectLegalHoldInput, ...request.Option) (*s3.GetObjectLegalHoldOutput, error) - GetObjectLegalHoldRequest(*s3.GetObjectLegalHoldInput) (*request.Request, *s3.GetObjectLegalHoldOutput) - - GetObjectLockConfiguration(*s3.GetObjectLockConfigurationInput) (*s3.GetObjectLockConfigurationOutput, error) - GetObjectLockConfigurationWithContext(aws.Context, *s3.GetObjectLockConfigurationInput, ...request.Option) (*s3.GetObjectLockConfigurationOutput, error) - GetObjectLockConfigurationRequest(*s3.GetObjectLockConfigurationInput) (*request.Request, *s3.GetObjectLockConfigurationOutput) - - GetObjectRetention(*s3.GetObjectRetentionInput) (*s3.GetObjectRetentionOutput, error) - GetObjectRetentionWithContext(aws.Context, *s3.GetObjectRetentionInput, ...request.Option) (*s3.GetObjectRetentionOutput, error) - GetObjectRetentionRequest(*s3.GetObjectRetentionInput) (*request.Request, *s3.GetObjectRetentionOutput) - - GetObjectTagging(*s3.GetObjectTaggingInput) (*s3.GetObjectTaggingOutput, error) - GetObjectTaggingWithContext(aws.Context, *s3.GetObjectTaggingInput, ...request.Option) (*s3.GetObjectTaggingOutput, error) - GetObjectTaggingRequest(*s3.GetObjectTaggingInput) (*request.Request, *s3.GetObjectTaggingOutput) - - GetObjectTorrent(*s3.GetObjectTorrentInput) (*s3.GetObjectTorrentOutput, error) - GetObjectTorrentWithContext(aws.Context, *s3.GetObjectTorrentInput, ...request.Option) (*s3.GetObjectTorrentOutput, error) - GetObjectTorrentRequest(*s3.GetObjectTorrentInput) (*request.Request, *s3.GetObjectTorrentOutput) - - GetPublicAccessBlock(*s3.GetPublicAccessBlockInput) (*s3.GetPublicAccessBlockOutput, error) - GetPublicAccessBlockWithContext(aws.Context, *s3.GetPublicAccessBlockInput, ...request.Option) (*s3.GetPublicAccessBlockOutput, error) - GetPublicAccessBlockRequest(*s3.GetPublicAccessBlockInput) (*request.Request, *s3.GetPublicAccessBlockOutput) - - HeadBucket(*s3.HeadBucketInput) (*s3.HeadBucketOutput, error) - HeadBucketWithContext(aws.Context, *s3.HeadBucketInput, ...request.Option) (*s3.HeadBucketOutput, error) - HeadBucketRequest(*s3.HeadBucketInput) (*request.Request, *s3.HeadBucketOutput) - - HeadObject(*s3.HeadObjectInput) (*s3.HeadObjectOutput, error) - HeadObjectWithContext(aws.Context, *s3.HeadObjectInput, ...request.Option) (*s3.HeadObjectOutput, error) - HeadObjectRequest(*s3.HeadObjectInput) (*request.Request, *s3.HeadObjectOutput) - - ListBucketAnalyticsConfigurations(*s3.ListBucketAnalyticsConfigurationsInput) (*s3.ListBucketAnalyticsConfigurationsOutput, error) - ListBucketAnalyticsConfigurationsWithContext(aws.Context, *s3.ListBucketAnalyticsConfigurationsInput, ...request.Option) (*s3.ListBucketAnalyticsConfigurationsOutput, error) - ListBucketAnalyticsConfigurationsRequest(*s3.ListBucketAnalyticsConfigurationsInput) (*request.Request, *s3.ListBucketAnalyticsConfigurationsOutput) - - ListBucketIntelligentTieringConfigurations(*s3.ListBucketIntelligentTieringConfigurationsInput) (*s3.ListBucketIntelligentTieringConfigurationsOutput, error) - ListBucketIntelligentTieringConfigurationsWithContext(aws.Context, *s3.ListBucketIntelligentTieringConfigurationsInput, ...request.Option) (*s3.ListBucketIntelligentTieringConfigurationsOutput, error) - ListBucketIntelligentTieringConfigurationsRequest(*s3.ListBucketIntelligentTieringConfigurationsInput) (*request.Request, *s3.ListBucketIntelligentTieringConfigurationsOutput) - - ListBucketInventoryConfigurations(*s3.ListBucketInventoryConfigurationsInput) (*s3.ListBucketInventoryConfigurationsOutput, error) - ListBucketInventoryConfigurationsWithContext(aws.Context, *s3.ListBucketInventoryConfigurationsInput, ...request.Option) (*s3.ListBucketInventoryConfigurationsOutput, error) - ListBucketInventoryConfigurationsRequest(*s3.ListBucketInventoryConfigurationsInput) (*request.Request, *s3.ListBucketInventoryConfigurationsOutput) - - ListBucketMetricsConfigurations(*s3.ListBucketMetricsConfigurationsInput) (*s3.ListBucketMetricsConfigurationsOutput, error) - ListBucketMetricsConfigurationsWithContext(aws.Context, *s3.ListBucketMetricsConfigurationsInput, ...request.Option) (*s3.ListBucketMetricsConfigurationsOutput, error) - ListBucketMetricsConfigurationsRequest(*s3.ListBucketMetricsConfigurationsInput) (*request.Request, *s3.ListBucketMetricsConfigurationsOutput) - - ListBuckets(*s3.ListBucketsInput) (*s3.ListBucketsOutput, error) - ListBucketsWithContext(aws.Context, *s3.ListBucketsInput, ...request.Option) (*s3.ListBucketsOutput, error) - ListBucketsRequest(*s3.ListBucketsInput) (*request.Request, *s3.ListBucketsOutput) - - ListDirectoryBuckets(*s3.ListDirectoryBucketsInput) (*s3.ListDirectoryBucketsOutput, error) - ListDirectoryBucketsWithContext(aws.Context, *s3.ListDirectoryBucketsInput, ...request.Option) (*s3.ListDirectoryBucketsOutput, error) - ListDirectoryBucketsRequest(*s3.ListDirectoryBucketsInput) (*request.Request, *s3.ListDirectoryBucketsOutput) - - ListDirectoryBucketsPages(*s3.ListDirectoryBucketsInput, func(*s3.ListDirectoryBucketsOutput, bool) bool) error - ListDirectoryBucketsPagesWithContext(aws.Context, *s3.ListDirectoryBucketsInput, func(*s3.ListDirectoryBucketsOutput, bool) bool, ...request.Option) error - - ListMultipartUploads(*s3.ListMultipartUploadsInput) (*s3.ListMultipartUploadsOutput, error) - ListMultipartUploadsWithContext(aws.Context, *s3.ListMultipartUploadsInput, ...request.Option) (*s3.ListMultipartUploadsOutput, error) - ListMultipartUploadsRequest(*s3.ListMultipartUploadsInput) (*request.Request, *s3.ListMultipartUploadsOutput) - - ListMultipartUploadsPages(*s3.ListMultipartUploadsInput, func(*s3.ListMultipartUploadsOutput, bool) bool) error - ListMultipartUploadsPagesWithContext(aws.Context, *s3.ListMultipartUploadsInput, func(*s3.ListMultipartUploadsOutput, bool) bool, ...request.Option) error - - ListObjectVersions(*s3.ListObjectVersionsInput) (*s3.ListObjectVersionsOutput, error) - ListObjectVersionsWithContext(aws.Context, *s3.ListObjectVersionsInput, ...request.Option) (*s3.ListObjectVersionsOutput, error) - ListObjectVersionsRequest(*s3.ListObjectVersionsInput) (*request.Request, *s3.ListObjectVersionsOutput) - - ListObjectVersionsPages(*s3.ListObjectVersionsInput, func(*s3.ListObjectVersionsOutput, bool) bool) error - ListObjectVersionsPagesWithContext(aws.Context, *s3.ListObjectVersionsInput, func(*s3.ListObjectVersionsOutput, bool) bool, ...request.Option) error - - ListObjects(*s3.ListObjectsInput) (*s3.ListObjectsOutput, error) - ListObjectsWithContext(aws.Context, *s3.ListObjectsInput, ...request.Option) (*s3.ListObjectsOutput, error) - ListObjectsRequest(*s3.ListObjectsInput) (*request.Request, *s3.ListObjectsOutput) - - ListObjectsPages(*s3.ListObjectsInput, func(*s3.ListObjectsOutput, bool) bool) error - ListObjectsPagesWithContext(aws.Context, *s3.ListObjectsInput, func(*s3.ListObjectsOutput, bool) bool, ...request.Option) error - - ListObjectsV2(*s3.ListObjectsV2Input) (*s3.ListObjectsV2Output, error) - ListObjectsV2WithContext(aws.Context, *s3.ListObjectsV2Input, ...request.Option) (*s3.ListObjectsV2Output, error) - ListObjectsV2Request(*s3.ListObjectsV2Input) (*request.Request, *s3.ListObjectsV2Output) - - ListObjectsV2Pages(*s3.ListObjectsV2Input, func(*s3.ListObjectsV2Output, bool) bool) error - ListObjectsV2PagesWithContext(aws.Context, *s3.ListObjectsV2Input, func(*s3.ListObjectsV2Output, bool) bool, ...request.Option) error - - ListParts(*s3.ListPartsInput) (*s3.ListPartsOutput, error) - ListPartsWithContext(aws.Context, *s3.ListPartsInput, ...request.Option) (*s3.ListPartsOutput, error) - ListPartsRequest(*s3.ListPartsInput) (*request.Request, *s3.ListPartsOutput) - - ListPartsPages(*s3.ListPartsInput, func(*s3.ListPartsOutput, bool) bool) error - ListPartsPagesWithContext(aws.Context, *s3.ListPartsInput, func(*s3.ListPartsOutput, bool) bool, ...request.Option) error - - PutBucketAccelerateConfiguration(*s3.PutBucketAccelerateConfigurationInput) (*s3.PutBucketAccelerateConfigurationOutput, error) - PutBucketAccelerateConfigurationWithContext(aws.Context, *s3.PutBucketAccelerateConfigurationInput, ...request.Option) (*s3.PutBucketAccelerateConfigurationOutput, error) - PutBucketAccelerateConfigurationRequest(*s3.PutBucketAccelerateConfigurationInput) (*request.Request, *s3.PutBucketAccelerateConfigurationOutput) - - PutBucketAcl(*s3.PutBucketAclInput) (*s3.PutBucketAclOutput, error) - PutBucketAclWithContext(aws.Context, *s3.PutBucketAclInput, ...request.Option) (*s3.PutBucketAclOutput, error) - PutBucketAclRequest(*s3.PutBucketAclInput) (*request.Request, *s3.PutBucketAclOutput) - - PutBucketAnalyticsConfiguration(*s3.PutBucketAnalyticsConfigurationInput) (*s3.PutBucketAnalyticsConfigurationOutput, error) - PutBucketAnalyticsConfigurationWithContext(aws.Context, *s3.PutBucketAnalyticsConfigurationInput, ...request.Option) (*s3.PutBucketAnalyticsConfigurationOutput, error) - PutBucketAnalyticsConfigurationRequest(*s3.PutBucketAnalyticsConfigurationInput) (*request.Request, *s3.PutBucketAnalyticsConfigurationOutput) - - PutBucketCors(*s3.PutBucketCorsInput) (*s3.PutBucketCorsOutput, error) - PutBucketCorsWithContext(aws.Context, *s3.PutBucketCorsInput, ...request.Option) (*s3.PutBucketCorsOutput, error) - PutBucketCorsRequest(*s3.PutBucketCorsInput) (*request.Request, *s3.PutBucketCorsOutput) - - PutBucketEncryption(*s3.PutBucketEncryptionInput) (*s3.PutBucketEncryptionOutput, error) - PutBucketEncryptionWithContext(aws.Context, *s3.PutBucketEncryptionInput, ...request.Option) (*s3.PutBucketEncryptionOutput, error) - PutBucketEncryptionRequest(*s3.PutBucketEncryptionInput) (*request.Request, *s3.PutBucketEncryptionOutput) - - PutBucketIntelligentTieringConfiguration(*s3.PutBucketIntelligentTieringConfigurationInput) (*s3.PutBucketIntelligentTieringConfigurationOutput, error) - PutBucketIntelligentTieringConfigurationWithContext(aws.Context, *s3.PutBucketIntelligentTieringConfigurationInput, ...request.Option) (*s3.PutBucketIntelligentTieringConfigurationOutput, error) - PutBucketIntelligentTieringConfigurationRequest(*s3.PutBucketIntelligentTieringConfigurationInput) (*request.Request, *s3.PutBucketIntelligentTieringConfigurationOutput) - - PutBucketInventoryConfiguration(*s3.PutBucketInventoryConfigurationInput) (*s3.PutBucketInventoryConfigurationOutput, error) - PutBucketInventoryConfigurationWithContext(aws.Context, *s3.PutBucketInventoryConfigurationInput, ...request.Option) (*s3.PutBucketInventoryConfigurationOutput, error) - PutBucketInventoryConfigurationRequest(*s3.PutBucketInventoryConfigurationInput) (*request.Request, *s3.PutBucketInventoryConfigurationOutput) - - PutBucketLifecycle(*s3.PutBucketLifecycleInput) (*s3.PutBucketLifecycleOutput, error) - PutBucketLifecycleWithContext(aws.Context, *s3.PutBucketLifecycleInput, ...request.Option) (*s3.PutBucketLifecycleOutput, error) - PutBucketLifecycleRequest(*s3.PutBucketLifecycleInput) (*request.Request, *s3.PutBucketLifecycleOutput) - - PutBucketLifecycleConfiguration(*s3.PutBucketLifecycleConfigurationInput) (*s3.PutBucketLifecycleConfigurationOutput, error) - PutBucketLifecycleConfigurationWithContext(aws.Context, *s3.PutBucketLifecycleConfigurationInput, ...request.Option) (*s3.PutBucketLifecycleConfigurationOutput, error) - PutBucketLifecycleConfigurationRequest(*s3.PutBucketLifecycleConfigurationInput) (*request.Request, *s3.PutBucketLifecycleConfigurationOutput) - - PutBucketLogging(*s3.PutBucketLoggingInput) (*s3.PutBucketLoggingOutput, error) - PutBucketLoggingWithContext(aws.Context, *s3.PutBucketLoggingInput, ...request.Option) (*s3.PutBucketLoggingOutput, error) - PutBucketLoggingRequest(*s3.PutBucketLoggingInput) (*request.Request, *s3.PutBucketLoggingOutput) - - PutBucketMetricsConfiguration(*s3.PutBucketMetricsConfigurationInput) (*s3.PutBucketMetricsConfigurationOutput, error) - PutBucketMetricsConfigurationWithContext(aws.Context, *s3.PutBucketMetricsConfigurationInput, ...request.Option) (*s3.PutBucketMetricsConfigurationOutput, error) - PutBucketMetricsConfigurationRequest(*s3.PutBucketMetricsConfigurationInput) (*request.Request, *s3.PutBucketMetricsConfigurationOutput) - - PutBucketNotification(*s3.PutBucketNotificationInput) (*s3.PutBucketNotificationOutput, error) - PutBucketNotificationWithContext(aws.Context, *s3.PutBucketNotificationInput, ...request.Option) (*s3.PutBucketNotificationOutput, error) - PutBucketNotificationRequest(*s3.PutBucketNotificationInput) (*request.Request, *s3.PutBucketNotificationOutput) - - PutBucketNotificationConfiguration(*s3.PutBucketNotificationConfigurationInput) (*s3.PutBucketNotificationConfigurationOutput, error) - PutBucketNotificationConfigurationWithContext(aws.Context, *s3.PutBucketNotificationConfigurationInput, ...request.Option) (*s3.PutBucketNotificationConfigurationOutput, error) - PutBucketNotificationConfigurationRequest(*s3.PutBucketNotificationConfigurationInput) (*request.Request, *s3.PutBucketNotificationConfigurationOutput) - - PutBucketOwnershipControls(*s3.PutBucketOwnershipControlsInput) (*s3.PutBucketOwnershipControlsOutput, error) - PutBucketOwnershipControlsWithContext(aws.Context, *s3.PutBucketOwnershipControlsInput, ...request.Option) (*s3.PutBucketOwnershipControlsOutput, error) - PutBucketOwnershipControlsRequest(*s3.PutBucketOwnershipControlsInput) (*request.Request, *s3.PutBucketOwnershipControlsOutput) - - PutBucketPolicy(*s3.PutBucketPolicyInput) (*s3.PutBucketPolicyOutput, error) - PutBucketPolicyWithContext(aws.Context, *s3.PutBucketPolicyInput, ...request.Option) (*s3.PutBucketPolicyOutput, error) - PutBucketPolicyRequest(*s3.PutBucketPolicyInput) (*request.Request, *s3.PutBucketPolicyOutput) - - PutBucketReplication(*s3.PutBucketReplicationInput) (*s3.PutBucketReplicationOutput, error) - PutBucketReplicationWithContext(aws.Context, *s3.PutBucketReplicationInput, ...request.Option) (*s3.PutBucketReplicationOutput, error) - PutBucketReplicationRequest(*s3.PutBucketReplicationInput) (*request.Request, *s3.PutBucketReplicationOutput) - - PutBucketRequestPayment(*s3.PutBucketRequestPaymentInput) (*s3.PutBucketRequestPaymentOutput, error) - PutBucketRequestPaymentWithContext(aws.Context, *s3.PutBucketRequestPaymentInput, ...request.Option) (*s3.PutBucketRequestPaymentOutput, error) - PutBucketRequestPaymentRequest(*s3.PutBucketRequestPaymentInput) (*request.Request, *s3.PutBucketRequestPaymentOutput) - - PutBucketTagging(*s3.PutBucketTaggingInput) (*s3.PutBucketTaggingOutput, error) - PutBucketTaggingWithContext(aws.Context, *s3.PutBucketTaggingInput, ...request.Option) (*s3.PutBucketTaggingOutput, error) - PutBucketTaggingRequest(*s3.PutBucketTaggingInput) (*request.Request, *s3.PutBucketTaggingOutput) - - PutBucketVersioning(*s3.PutBucketVersioningInput) (*s3.PutBucketVersioningOutput, error) - PutBucketVersioningWithContext(aws.Context, *s3.PutBucketVersioningInput, ...request.Option) (*s3.PutBucketVersioningOutput, error) - PutBucketVersioningRequest(*s3.PutBucketVersioningInput) (*request.Request, *s3.PutBucketVersioningOutput) - - PutBucketWebsite(*s3.PutBucketWebsiteInput) (*s3.PutBucketWebsiteOutput, error) - PutBucketWebsiteWithContext(aws.Context, *s3.PutBucketWebsiteInput, ...request.Option) (*s3.PutBucketWebsiteOutput, error) - PutBucketWebsiteRequest(*s3.PutBucketWebsiteInput) (*request.Request, *s3.PutBucketWebsiteOutput) - - PutObject(*s3.PutObjectInput) (*s3.PutObjectOutput, error) - PutObjectWithContext(aws.Context, *s3.PutObjectInput, ...request.Option) (*s3.PutObjectOutput, error) - PutObjectRequest(*s3.PutObjectInput) (*request.Request, *s3.PutObjectOutput) - - PutObjectAcl(*s3.PutObjectAclInput) (*s3.PutObjectAclOutput, error) - PutObjectAclWithContext(aws.Context, *s3.PutObjectAclInput, ...request.Option) (*s3.PutObjectAclOutput, error) - PutObjectAclRequest(*s3.PutObjectAclInput) (*request.Request, *s3.PutObjectAclOutput) - - PutObjectLegalHold(*s3.PutObjectLegalHoldInput) (*s3.PutObjectLegalHoldOutput, error) - PutObjectLegalHoldWithContext(aws.Context, *s3.PutObjectLegalHoldInput, ...request.Option) (*s3.PutObjectLegalHoldOutput, error) - PutObjectLegalHoldRequest(*s3.PutObjectLegalHoldInput) (*request.Request, *s3.PutObjectLegalHoldOutput) - - PutObjectLockConfiguration(*s3.PutObjectLockConfigurationInput) (*s3.PutObjectLockConfigurationOutput, error) - PutObjectLockConfigurationWithContext(aws.Context, *s3.PutObjectLockConfigurationInput, ...request.Option) (*s3.PutObjectLockConfigurationOutput, error) - PutObjectLockConfigurationRequest(*s3.PutObjectLockConfigurationInput) (*request.Request, *s3.PutObjectLockConfigurationOutput) - - PutObjectRetention(*s3.PutObjectRetentionInput) (*s3.PutObjectRetentionOutput, error) - PutObjectRetentionWithContext(aws.Context, *s3.PutObjectRetentionInput, ...request.Option) (*s3.PutObjectRetentionOutput, error) - PutObjectRetentionRequest(*s3.PutObjectRetentionInput) (*request.Request, *s3.PutObjectRetentionOutput) - - PutObjectTagging(*s3.PutObjectTaggingInput) (*s3.PutObjectTaggingOutput, error) - PutObjectTaggingWithContext(aws.Context, *s3.PutObjectTaggingInput, ...request.Option) (*s3.PutObjectTaggingOutput, error) - PutObjectTaggingRequest(*s3.PutObjectTaggingInput) (*request.Request, *s3.PutObjectTaggingOutput) - - PutPublicAccessBlock(*s3.PutPublicAccessBlockInput) (*s3.PutPublicAccessBlockOutput, error) - PutPublicAccessBlockWithContext(aws.Context, *s3.PutPublicAccessBlockInput, ...request.Option) (*s3.PutPublicAccessBlockOutput, error) - PutPublicAccessBlockRequest(*s3.PutPublicAccessBlockInput) (*request.Request, *s3.PutPublicAccessBlockOutput) - - RestoreObject(*s3.RestoreObjectInput) (*s3.RestoreObjectOutput, error) - RestoreObjectWithContext(aws.Context, *s3.RestoreObjectInput, ...request.Option) (*s3.RestoreObjectOutput, error) - RestoreObjectRequest(*s3.RestoreObjectInput) (*request.Request, *s3.RestoreObjectOutput) - - SelectObjectContent(*s3.SelectObjectContentInput) (*s3.SelectObjectContentOutput, error) - SelectObjectContentWithContext(aws.Context, *s3.SelectObjectContentInput, ...request.Option) (*s3.SelectObjectContentOutput, error) - SelectObjectContentRequest(*s3.SelectObjectContentInput) (*request.Request, *s3.SelectObjectContentOutput) - - UploadPart(*s3.UploadPartInput) (*s3.UploadPartOutput, error) - UploadPartWithContext(aws.Context, *s3.UploadPartInput, ...request.Option) (*s3.UploadPartOutput, error) - UploadPartRequest(*s3.UploadPartInput) (*request.Request, *s3.UploadPartOutput) - - UploadPartCopy(*s3.UploadPartCopyInput) (*s3.UploadPartCopyOutput, error) - UploadPartCopyWithContext(aws.Context, *s3.UploadPartCopyInput, ...request.Option) (*s3.UploadPartCopyOutput, error) - UploadPartCopyRequest(*s3.UploadPartCopyInput) (*request.Request, *s3.UploadPartCopyOutput) - - WriteGetObjectResponse(*s3.WriteGetObjectResponseInput) (*s3.WriteGetObjectResponseOutput, error) - WriteGetObjectResponseWithContext(aws.Context, *s3.WriteGetObjectResponseInput, ...request.Option) (*s3.WriteGetObjectResponseOutput, error) - WriteGetObjectResponseRequest(*s3.WriteGetObjectResponseInput) (*request.Request, *s3.WriteGetObjectResponseOutput) - - WaitUntilBucketExists(*s3.HeadBucketInput) error - WaitUntilBucketExistsWithContext(aws.Context, *s3.HeadBucketInput, ...request.WaiterOption) error - - WaitUntilBucketNotExists(*s3.HeadBucketInput) error - WaitUntilBucketNotExistsWithContext(aws.Context, *s3.HeadBucketInput, ...request.WaiterOption) error - - WaitUntilObjectExists(*s3.HeadObjectInput) error - WaitUntilObjectExistsWithContext(aws.Context, *s3.HeadObjectInput, ...request.WaiterOption) error - - WaitUntilObjectNotExists(*s3.HeadObjectInput) error - WaitUntilObjectNotExistsWithContext(aws.Context, *s3.HeadObjectInput, ...request.WaiterOption) error -} - -var _ S3API = (*s3.S3)(nil) diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/service.go b/vendor/github.com/aws/aws-sdk-go/service/s3/service.go deleted file mode 100644 index 3e75d0e942..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/service.go +++ /dev/null @@ -1,108 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package s3 - -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/restxml" -) - -// S3 provides the API operation methods for making requests to -// Amazon Simple Storage Service. See this package's package overview docs -// for details on the service. -// -// S3 methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type S3 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 = "s3" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "S3" // ServiceID is a unique identifier of a specific service. -) - -// New creates a new instance of the S3 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 S3 client from just a session. -// svc := s3.New(mySession) -// -// // Create a S3 client with additional configuration -// svc := s3.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *S3 { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = "s3" - } - 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) *S3 { - svc := &S3{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - PartitionID: partitionID, - Endpoint: endpoint, - APIVersion: "2006-03-01", - ResolvedRegion: resolvedRegion, - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.BuildNamedHandler(v4.SignRequestHandler.Name, func(s *v4.Signer) { - s.DisableURIPathEscaping = true - })) - svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) - - svc.Handlers.BuildStream.PushBackNamed(restxml.BuildHandler) - svc.Handlers.UnmarshalStream.PushBackNamed(restxml.UnmarshalHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a S3 operation and runs any -// custom request initialization. -func (c *S3) 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/s3/sse.go b/vendor/github.com/aws/aws-sdk-go/service/s3/sse.go deleted file mode 100644 index 57a0bd92ca..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/sse.go +++ /dev/null @@ -1,84 +0,0 @@ -package s3 - -import ( - "crypto/md5" - "encoding/base64" - "net/http" - - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/request" -) - -var errSSERequiresSSL = awserr.New("ConfigError", "cannot send SSE keys over HTTP.", nil) - -func validateSSERequiresSSL(r *request.Request) { - if r.HTTPRequest.URL.Scheme == "https" { - return - } - - if iface, ok := r.Params.(sseCustomerKeyGetter); ok { - if len(iface.getSSECustomerKey()) > 0 { - r.Error = errSSERequiresSSL - return - } - } - - if iface, ok := r.Params.(copySourceSSECustomerKeyGetter); ok { - if len(iface.getCopySourceSSECustomerKey()) > 0 { - r.Error = errSSERequiresSSL - return - } - } -} - -const ( - sseKeyHeader = "x-amz-server-side-encryption-customer-key" - sseKeyMD5Header = sseKeyHeader + "-md5" -) - -func computeSSEKeyMD5(r *request.Request) { - var key string - if g, ok := r.Params.(sseCustomerKeyGetter); ok { - key = g.getSSECustomerKey() - } - - computeKeyMD5(sseKeyHeader, sseKeyMD5Header, key, r.HTTPRequest) -} - -const ( - copySrcSSEKeyHeader = "x-amz-copy-source-server-side-encryption-customer-key" - copySrcSSEKeyMD5Header = copySrcSSEKeyHeader + "-md5" -) - -func computeCopySourceSSEKeyMD5(r *request.Request) { - var key string - if g, ok := r.Params.(copySourceSSECustomerKeyGetter); ok { - key = g.getCopySourceSSECustomerKey() - } - - computeKeyMD5(copySrcSSEKeyHeader, copySrcSSEKeyMD5Header, key, r.HTTPRequest) -} - -func computeKeyMD5(keyHeader, keyMD5Header, key string, r *http.Request) { - if len(key) == 0 { - // Backwards compatiablity where user just set the header value instead - // of using the API parameter, or setting the header value for an - // operation without the parameters modeled. - key = r.Header.Get(keyHeader) - if len(key) == 0 { - return - } - - // In backwards compatible, the header's value is not base64 encoded, - // and needs to be encoded and updated by the SDK's customizations. - b64Key := base64.StdEncoding.EncodeToString([]byte(key)) - r.Header.Set(keyHeader, b64Key) - } - - // Only update Key's MD5 if not already set. - if len(r.Header.Get(keyMD5Header)) == 0 { - sum := md5.Sum([]byte(key)) - keyMD5 := base64.StdEncoding.EncodeToString(sum[:]) - r.Header.Set(keyMD5Header, keyMD5) - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/statusok_error.go b/vendor/github.com/aws/aws-sdk-go/service/s3/statusok_error.go deleted file mode 100644 index 096adc091d..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/statusok_error.go +++ /dev/null @@ -1,47 +0,0 @@ -package s3 - -import ( - "bytes" - "io" - "io/ioutil" - "net/http" - - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/internal/sdkio" -) - -func copyMultipartStatusOKUnmarshalError(r *request.Request) { - b, err := ioutil.ReadAll(r.HTTPResponse.Body) - r.HTTPResponse.Body.Close() - if err != nil { - r.Error = awserr.NewRequestFailure( - awserr.New(request.ErrCodeSerialization, "unable to read response body", err), - r.HTTPResponse.StatusCode, - r.RequestID, - ) - // Note, some middleware later in the stack like restxml.Unmarshal expect a valid, non-closed Body - // even in case of an error, so we replace it with an empty Reader. - r.HTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(nil)) - return - } - - body := bytes.NewReader(b) - r.HTTPResponse.Body = ioutil.NopCloser(body) - defer body.Seek(0, sdkio.SeekStart) - - unmarshalError(r) - if err, ok := r.Error.(awserr.Error); ok && err != nil { - if err.Code() == request.ErrCodeSerialization && - err.OrigErr() != io.EOF { - r.Error = nil - return - } - // if empty payload - if err.OrigErr() == io.EOF { - r.HTTPResponse.StatusCode = http.StatusInternalServerError - } else { - r.HTTPResponse.StatusCode = http.StatusServiceUnavailable - } - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go b/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go deleted file mode 100644 index 6eecf66910..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go +++ /dev/null @@ -1,114 +0,0 @@ -package s3 - -import ( - "bytes" - "encoding/xml" - "fmt" - "io" - "io/ioutil" - "net/http" - "strings" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil" -) - -type xmlErrorResponse struct { - XMLName xml.Name `xml:"Error"` - Code string `xml:"Code"` - Message string `xml:"Message"` -} - -func unmarshalError(r *request.Request) { - defer r.HTTPResponse.Body.Close() - defer io.Copy(ioutil.Discard, r.HTTPResponse.Body) - - // Bucket exists in a different region, and request needs - // to be made to the correct region. - if r.HTTPResponse.StatusCode == http.StatusMovedPermanently { - msg := fmt.Sprintf( - "incorrect region, the bucket is not in '%s' region at endpoint '%s'", - aws.StringValue(r.Config.Region), - aws.StringValue(r.Config.Endpoint), - ) - if v := r.HTTPResponse.Header.Get("x-amz-bucket-region"); len(v) != 0 { - msg += fmt.Sprintf(", bucket is in '%s' region", v) - } - r.Error = awserr.NewRequestFailure( - awserr.New("BucketRegionError", msg, nil), - r.HTTPResponse.StatusCode, - r.RequestID, - ) - return - } - - // Attempt to parse error from body if it is known - var errResp xmlErrorResponse - var err error - if r.HTTPResponse.StatusCode >= 200 && r.HTTPResponse.StatusCode < 300 { - err = s3unmarshalXMLError(&errResp, r.HTTPResponse.Body) - } else { - err = xmlutil.UnmarshalXMLError(&errResp, r.HTTPResponse.Body) - } - - if err != nil { - var errorMsg string - if err == io.EOF { - errorMsg = "empty response payload" - } else { - errorMsg = "failed to unmarshal error message" - } - - r.Error = awserr.NewRequestFailure( - awserr.New(request.ErrCodeSerialization, - errorMsg, err), - r.HTTPResponse.StatusCode, - r.RequestID, - ) - return - } - - // Fallback to status code converted to message if still no error code - if len(errResp.Code) == 0 { - statusText := http.StatusText(r.HTTPResponse.StatusCode) - errResp.Code = strings.Replace(statusText, " ", "", -1) - errResp.Message = statusText - } - - r.Error = awserr.NewRequestFailure( - awserr.New(errResp.Code, errResp.Message, err), - r.HTTPResponse.StatusCode, - r.RequestID, - ) -} - -// A RequestFailure provides access to the S3 Request ID and Host ID values -// returned from API operation errors. Getting the error as a string will -// return the formated error with the same information as awserr.RequestFailure, -// while also adding the HostID value from the response. -type RequestFailure interface { - awserr.RequestFailure - - // Host ID is the S3 Host ID needed for debug, and contacting support - HostID() string -} - -// s3unmarshalXMLError is s3 specific xml error unmarshaler -// for 200 OK errors and response payloads. -// This function differs from the xmlUtil.UnmarshalXMLError -// func. It does not ignore the EOF error and passes it up. -// Related to bug fix for `s3 200 OK response with empty payload` -func s3unmarshalXMLError(v interface{}, stream io.Reader) error { - var errBuf bytes.Buffer - body := io.TeeReader(stream, &errBuf) - - err := xml.NewDecoder(body).Decode(v) - if err != nil && err != io.EOF { - return awserr.NewUnmarshalError(err, - "failed to unmarshal error message", errBuf.Bytes()) - } - - return err -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/s3/waiters.go deleted file mode 100644 index 2596c694b5..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/waiters.go +++ /dev/null @@ -1,214 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package s3 - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilBucketExists uses the Amazon S3 API operation -// HeadBucket 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 *S3) WaitUntilBucketExists(input *HeadBucketInput) error { - return c.WaitUntilBucketExistsWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilBucketExistsWithContext is an extended version of WaitUntilBucketExists. -// 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 *S3) WaitUntilBucketExistsWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilBucketExists", - MaxAttempts: 20, - Delay: request.ConstantWaiterDelay(5 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.StatusWaiterMatch, - Expected: 200, - }, - { - State: request.SuccessWaiterState, - Matcher: request.StatusWaiterMatch, - Expected: 301, - }, - { - State: request.SuccessWaiterState, - Matcher: request.StatusWaiterMatch, - Expected: 403, - }, - { - State: request.RetryWaiterState, - Matcher: request.StatusWaiterMatch, - Expected: 404, - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *HeadBucketInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.HeadBucketRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilBucketNotExists uses the Amazon S3 API operation -// HeadBucket 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 *S3) WaitUntilBucketNotExists(input *HeadBucketInput) error { - return c.WaitUntilBucketNotExistsWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilBucketNotExistsWithContext is an extended version of WaitUntilBucketNotExists. -// 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 *S3) WaitUntilBucketNotExistsWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilBucketNotExists", - MaxAttempts: 20, - Delay: request.ConstantWaiterDelay(5 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.StatusWaiterMatch, - Expected: 404, - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *HeadBucketInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.HeadBucketRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilObjectExists uses the Amazon S3 API operation -// HeadObject 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 *S3) WaitUntilObjectExists(input *HeadObjectInput) error { - return c.WaitUntilObjectExistsWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilObjectExistsWithContext is an extended version of WaitUntilObjectExists. -// 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 *S3) WaitUntilObjectExistsWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilObjectExists", - MaxAttempts: 20, - Delay: request.ConstantWaiterDelay(5 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.StatusWaiterMatch, - Expected: 200, - }, - { - State: request.RetryWaiterState, - Matcher: request.StatusWaiterMatch, - Expected: 404, - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *HeadObjectInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.HeadObjectRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilObjectNotExists uses the Amazon S3 API operation -// HeadObject 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 *S3) WaitUntilObjectNotExists(input *HeadObjectInput) error { - return c.WaitUntilObjectNotExistsWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilObjectNotExistsWithContext is an extended version of WaitUntilObjectNotExists. -// 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 *S3) WaitUntilObjectNotExistsWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilObjectNotExists", - MaxAttempts: 20, - Delay: request.ConstantWaiterDelay(5 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.StatusWaiterMatch, - Expected: 404, - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *HeadObjectInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.HeadObjectRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} diff --git a/vendor/github.com/cjlapao/common-go/LICENSE b/vendor/github.com/cjlapao/common-go/LICENSE deleted file mode 100644 index b6a97c44e1..0000000000 --- a/vendor/github.com/cjlapao/common-go/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2021 Carlos Lapao - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/github.com/go-playground/validator/v10/.golangci.yaml b/vendor/github.com/go-playground/validator/v10/.golangci.yaml index eab557ee24..dd9c05cc8b 100644 --- a/vendor/github.com/go-playground/validator/v10/.golangci.yaml +++ b/vendor/github.com/go-playground/validator/v10/.golangci.yaml @@ -2,101 +2,53 @@ version: "2" linters: default: all disable: - - asasalint - - asciicheck - - bidichk - - bodyclose - - canonicalheader - - containedctx - - contextcheck + - noinlineerr + - wsl_v5 - copyloopvar - cyclop - - decorder - depguard - dogsled - dupl - dupword - - durationcheck - err113 - - errcheck - - errchkjson - - errname - errorlint - exhaustive - exhaustruct - - exptostd - - fatcontext - forbidigo - forcetypeassert - funlen - - ginkgolinter - - gocheckcompilerdirectives - gochecknoglobals - - gochecknoinits - - gochecksumtype - gocognit - goconst - gocritic - gocyclo - godot - - godox - - goheader - - gomoddirectives - - gomodguard - - goprintffuncname - gosec - gosmopolitan - - govet - - grouper - - iface - - importas - - inamedparam - - ineffassign - interfacebloat - intrange - ireturn - lll - - loggercheck - maintidx - - makezero - - mirror - misspell - mnd - - musttag - nakedret - nestif - - nilerr - - nilnesserr - nilnil - nlreturn - - noctx - - nolintlint - nonamedreturns - - nosprintfhostport - paralleltest - perfsprint - prealloc - - predeclared - - promlinter - - protogetter - - reassign - recvcheck - revive - - rowserrcheck - - sloglint - - spancheck - - sqlclosecheck - staticcheck - tagalign - tagliatelle - - testableexamples - - testifylint - testpackage - thelper - tparallel - unparam - varnamelen - - whitespace - wrapcheck - wsl - - zerologlint \ No newline at end of file diff --git a/vendor/github.com/go-playground/validator/v10/README.md b/vendor/github.com/go-playground/validator/v10/README.md index 368b966a65..28f7e159df 100644 --- a/vendor/github.com/go-playground/validator/v10/README.md +++ b/vendor/github.com/go-playground/validator/v10/README.md @@ -1,6 +1,6 @@ Package validator ================= -![Project status](https://img.shields.io/badge/version-10.25.0-green.svg) +[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/go-playground/validator)](https://github.com/go-playground/validator/releases) [![Build Status](https://github.com/go-playground/validator/actions/workflows/workflow.yml/badge.svg)](https://github.com/go-playground/validator/actions) [![Coverage Status](https://coveralls.io/repos/go-playground/validator/badge.svg?branch=master&service=github)](https://coveralls.io/github/go-playground/validator?branch=master) [![Go Report Card](https://goreportcard.com/badge/github.com/go-playground/validator)](https://goreportcard.com/report/github.com/go-playground/validator) @@ -262,6 +262,8 @@ validate := validator.New(validator.WithRequiredStructEnabled()) | excluded_without | Excluded Without | | excluded_without_all | Excluded Without All | | unique | Unique | +| validateFn | Verify if the method `Validate() error` does not return an error (or any specified method) | + #### Aliases: | Tag | Description | diff --git a/vendor/github.com/go-playground/validator/v10/baked_in.go b/vendor/github.com/go-playground/validator/v10/baked_in.go index 5332cf3fa7..c968ad4ad3 100644 --- a/vendor/github.com/go-playground/validator/v10/baked_in.go +++ b/vendor/github.com/go-playground/validator/v10/baked_in.go @@ -2,10 +2,12 @@ package validator import ( "bytes" + "cmp" "context" "crypto/sha256" "encoding/hex" "encoding/json" + "errors" "fmt" "io/fs" "net" @@ -244,6 +246,7 @@ var ( "cron": isCron, "spicedb": isSpiceDB, "ein": isEIN, + "validateFn": isValidateFn, } ) @@ -294,7 +297,7 @@ func isOneOf(fl FieldLevel) bool { case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: v = strconv.FormatUint(field.Uint(), 10) default: - panic(fmt.Sprintf("Bad field type %T", field.Interface())) + panic(fmt.Sprintf("Bad field type %s", field.Type())) } for i := 0; i < len(vals); i++ { if vals[i] == v { @@ -310,7 +313,7 @@ func isOneOfCI(fl FieldLevel) bool { field := fl.Field() if field.Kind() != reflect.String { - panic(fmt.Sprintf("Bad field type %T", field.Interface())) + panic(fmt.Sprintf("Bad field type %s", field.Type())) } v := field.String() for _, val := range vals { @@ -384,13 +387,13 @@ func isUnique(fl FieldLevel) bool { } if uniqueField.Kind() != field.Kind() { - panic(fmt.Sprintf("Bad field type %T:%T", field.Interface(), uniqueField.Interface())) + panic(fmt.Sprintf("Bad field type %s:%s", field.Type(), uniqueField.Type())) } - return field.Interface() != uniqueField.Interface() + return getValue(field) != getValue(uniqueField) } - panic(fmt.Sprintf("Bad field type %T", field.Interface())) + panic(fmt.Sprintf("Bad field type %s", field.Type())) } } @@ -471,7 +474,7 @@ func isLongitude(fl FieldLevel) bool { case reflect.Float64: v = strconv.FormatFloat(field.Float(), 'f', -1, 64) default: - panic(fmt.Sprintf("Bad field type %T", field.Interface())) + panic(fmt.Sprintf("Bad field type %s", field.Type())) } return longitudeRegex().MatchString(v) @@ -494,7 +497,7 @@ func isLatitude(fl FieldLevel) bool { case reflect.Float64: v = strconv.FormatFloat(field.Float(), 'f', -1, 64) default: - panic(fmt.Sprintf("Bad field type %T", field.Interface())) + panic(fmt.Sprintf("Bad field type %s", field.Type())) } return latitudeRegex().MatchString(v) @@ -945,7 +948,6 @@ func isNeField(fl FieldLevel) bool { } switch kind { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: return field.Int() != currentField.Int() @@ -966,9 +968,8 @@ func isNeField(fl FieldLevel) bool { fieldType := field.Type() if fieldType.ConvertibleTo(timeType) && currentField.Type().ConvertibleTo(timeType) { - - t := currentField.Interface().(time.Time) - fieldTime := field.Interface().(time.Time) + t := getValue(currentField).(time.Time) + fieldTime := getValue(field).(time.Time) return !fieldTime.Equal(t) } @@ -1005,7 +1006,6 @@ func isLteCrossStructField(fl FieldLevel) bool { } switch kind { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: return field.Int() <= topField.Int() @@ -1023,9 +1023,8 @@ func isLteCrossStructField(fl FieldLevel) bool { fieldType := field.Type() if fieldType.ConvertibleTo(timeType) && topField.Type().ConvertibleTo(timeType) { - - fieldTime := field.Convert(timeType).Interface().(time.Time) - topTime := topField.Convert(timeType).Interface().(time.Time) + fieldTime := getValue(field.Convert(timeType)).(time.Time) + topTime := getValue(topField.Convert(timeType)).(time.Time) return fieldTime.Before(topTime) || fieldTime.Equal(topTime) } @@ -1052,7 +1051,6 @@ func isLtCrossStructField(fl FieldLevel) bool { } switch kind { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: return field.Int() < topField.Int() @@ -1070,9 +1068,8 @@ func isLtCrossStructField(fl FieldLevel) bool { fieldType := field.Type() if fieldType.ConvertibleTo(timeType) && topField.Type().ConvertibleTo(timeType) { - - fieldTime := field.Convert(timeType).Interface().(time.Time) - topTime := topField.Convert(timeType).Interface().(time.Time) + fieldTime := getValue(field.Convert(timeType)).(time.Time) + topTime := getValue(topField.Convert(timeType)).(time.Time) return fieldTime.Before(topTime) } @@ -1098,7 +1095,6 @@ func isGteCrossStructField(fl FieldLevel) bool { } switch kind { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: return field.Int() >= topField.Int() @@ -1116,9 +1112,8 @@ func isGteCrossStructField(fl FieldLevel) bool { fieldType := field.Type() if fieldType.ConvertibleTo(timeType) && topField.Type().ConvertibleTo(timeType) { - - fieldTime := field.Convert(timeType).Interface().(time.Time) - topTime := topField.Convert(timeType).Interface().(time.Time) + fieldTime := getValue(field.Convert(timeType)).(time.Time) + topTime := getValue(topField.Convert(timeType)).(time.Time) return fieldTime.After(topTime) || fieldTime.Equal(topTime) } @@ -1144,7 +1139,6 @@ func isGtCrossStructField(fl FieldLevel) bool { } switch kind { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: return field.Int() > topField.Int() @@ -1162,9 +1156,8 @@ func isGtCrossStructField(fl FieldLevel) bool { fieldType := field.Type() if fieldType.ConvertibleTo(timeType) && topField.Type().ConvertibleTo(timeType) { - - fieldTime := field.Convert(timeType).Interface().(time.Time) - topTime := topField.Convert(timeType).Interface().(time.Time) + fieldTime := getValue(field.Convert(timeType)).(time.Time) + topTime := getValue(topField.Convert(timeType)).(time.Time) return fieldTime.After(topTime) } @@ -1190,7 +1183,6 @@ func isNeCrossStructField(fl FieldLevel) bool { } switch kind { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: return topField.Int() != field.Int() @@ -1211,9 +1203,8 @@ func isNeCrossStructField(fl FieldLevel) bool { fieldType := field.Type() if fieldType.ConvertibleTo(timeType) && topField.Type().ConvertibleTo(timeType) { - - t := field.Convert(timeType).Interface().(time.Time) - fieldTime := topField.Convert(timeType).Interface().(time.Time) + t := getValue(field.Convert(timeType)).(time.Time) + fieldTime := getValue(topField.Convert(timeType)).(time.Time) return !fieldTime.Equal(t) } @@ -1239,7 +1230,6 @@ func isEqCrossStructField(fl FieldLevel) bool { } switch kind { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: return topField.Int() == field.Int() @@ -1260,9 +1250,8 @@ func isEqCrossStructField(fl FieldLevel) bool { fieldType := field.Type() if fieldType.ConvertibleTo(timeType) && topField.Type().ConvertibleTo(timeType) { - - t := field.Convert(timeType).Interface().(time.Time) - fieldTime := topField.Convert(timeType).Interface().(time.Time) + t := getValue(field.Convert(timeType)).(time.Time) + fieldTime := getValue(topField.Convert(timeType)).(time.Time) return fieldTime.Equal(t) } @@ -1288,7 +1277,6 @@ func isEqField(fl FieldLevel) bool { } switch kind { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: return field.Int() == currentField.Int() @@ -1309,9 +1297,8 @@ func isEqField(fl FieldLevel) bool { fieldType := field.Type() if fieldType.ConvertibleTo(timeType) && currentField.Type().ConvertibleTo(timeType) { - - t := currentField.Convert(timeType).Interface().(time.Time) - fieldTime := field.Convert(timeType).Interface().(time.Time) + t := getValue(currentField.Convert(timeType)).(time.Time) + fieldTime := getValue(field.Convert(timeType)).(time.Time) return fieldTime.Equal(t) } @@ -1332,7 +1319,6 @@ func isEq(fl FieldLevel) bool { param := fl.Param() switch field.Kind() { - case reflect.String: return field.String() == param @@ -1367,7 +1353,7 @@ func isEq(fl FieldLevel) bool { return field.Bool() == p } - panic(fmt.Sprintf("Bad field type %T", field.Interface())) + panic(fmt.Sprintf("Bad field type %s", field.Type())) } // isEqIgnoreCase is the validation function for validating if the current field's string value is @@ -1382,7 +1368,7 @@ func isEqIgnoreCase(fl FieldLevel) bool { return strings.EqualFold(field.String(), param) } - panic(fmt.Sprintf("Bad field type %T", field.Interface())) + panic(fmt.Sprintf("Bad field type %s", field.Type())) } // isPostcodeByIso3166Alpha2 validates by value which is country code in iso 3166 alpha 2 @@ -1416,7 +1402,7 @@ func isPostcodeByIso3166Alpha2Field(fl FieldLevel) bool { } if kind != reflect.String { - panic(fmt.Sprintf("Bad field type %T", currentField.Interface())) + panic(fmt.Sprintf("Bad field type %s", currentField.Type())) } postcodeRegexInit.Do(initPostcodes) @@ -1472,16 +1458,7 @@ func isURI(fl FieldLevel) bool { return err == nil } - panic(fmt.Sprintf("Bad field type %T", field.Interface())) -} - -// isFileURL is the helper function for validating if the `path` valid file URL as per RFC8089 -func isFileURL(path string) bool { - if !strings.HasPrefix(path, "file:/") { - return false - } - _, err := url.ParseRequestURI(path) - return err == nil + panic(fmt.Sprintf("Bad field type %s", field.Type())) } // isURL is the validation function for validating if the current field's value is a valid URL. @@ -1497,23 +1474,20 @@ func isURL(fl FieldLevel) bool { return false } - if isFileURL(s) { - return true - } - url, err := url.Parse(s) if err != nil || url.Scheme == "" { return false } + isFileScheme := url.Scheme == "file" - if url.Host == "" && url.Fragment == "" && url.Opaque == "" { + if (isFileScheme && (len(url.Path) == 0 || url.Path == "/")) || (!isFileScheme && len(url.Host) == 0 && len(url.Fragment) == 0 && len(url.Opaque) == 0) { return false } return true } - panic(fmt.Sprintf("Bad field type %T", field.Interface())) + panic(fmt.Sprintf("Bad field type %s", field.Type())) } // isHttpURL is the validation function for validating if the current field's value is a valid HTTP(s) URL. @@ -1536,7 +1510,7 @@ func isHttpURL(fl FieldLevel) bool { return url.Scheme == "http" || url.Scheme == "https" } - panic(fmt.Sprintf("Bad field type %T", field.Interface())) + panic(fmt.Sprintf("Bad field type %s", field.Type())) } // isUrnRFC2141 is the validation function for validating if the current field's value is a valid URN as per RFC 2141. @@ -1553,7 +1527,7 @@ func isUrnRFC2141(fl FieldLevel) bool { return match } - panic(fmt.Sprintf("Bad field type %T", field.Interface())) + panic(fmt.Sprintf("Bad field type %s", field.Type())) } // isFile is the validation function for validating if the current field's value is a valid existing file path. @@ -1570,7 +1544,7 @@ func isFile(fl FieldLevel) bool { return !fileInfo.IsDir() } - panic(fmt.Sprintf("Bad field type %T", field.Interface())) + panic(fmt.Sprintf("Bad field type %s", field.Type())) } // isImage is the validation function for validating if the current field's value contains the path to a valid image file @@ -1632,7 +1606,8 @@ func isImage(fl FieldLevel) bool { return true } } - return false + + panic(fmt.Sprintf("Bad field type %s", field.Type())) } // isFilePath is the validation function for validating if the current field's value is a valid file path. @@ -1686,7 +1661,7 @@ func isFilePath(fl FieldLevel) bool { } } - panic(fmt.Sprintf("Bad field type %T", field.Interface())) + panic(fmt.Sprintf("Bad field type %s", field.Type())) } // isE164 is the validation function for validating if the current field's value is a valid e.164 formatted phone number. @@ -1796,7 +1771,7 @@ func hasValue(fl FieldLevel) bool { case reflect.Slice, reflect.Map, reflect.Ptr, reflect.Interface, reflect.Chan, reflect.Func: return !field.IsNil() default: - if fl.(*validate).fldIsPointer && field.Interface() != nil { + if fl.(*validate).fldIsPointer && getValue(field) != nil { return true } return field.IsValid() && !field.IsZero() @@ -1807,10 +1782,13 @@ func hasValue(fl FieldLevel) bool { func hasNotZeroValue(fl FieldLevel) bool { field := fl.Field() switch field.Kind() { - case reflect.Slice, reflect.Map, reflect.Ptr, reflect.Interface, reflect.Chan, reflect.Func: + case reflect.Slice, reflect.Map: + // For slices and maps, consider them "not zero" only if they're both non-nil AND have elements + return !field.IsNil() && field.Len() > 0 + case reflect.Ptr, reflect.Interface, reflect.Chan, reflect.Func: return !field.IsNil() default: - if fl.(*validate).fldIsPointer && field.Interface() != nil { + if fl.(*validate).fldIsPointer && getValue(field) != nil { return !field.IsZero() } return field.IsValid() && !field.IsZero() @@ -1834,7 +1812,7 @@ func requireCheckFieldKind(fl FieldLevel, param string, defaultNotFoundValue boo case reflect.Slice, reflect.Map, reflect.Ptr, reflect.Interface, reflect.Chan, reflect.Func: return field.IsNil() default: - if nullable && field.Interface() != nil { + if nullable && getValue(field) != nil { return false } return field.IsValid() && field.IsZero() @@ -1851,7 +1829,6 @@ func requireCheckFieldValue( } switch kind { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: return field.Int() == asInt(value) @@ -1864,7 +1841,13 @@ func requireCheckFieldValue( case reflect.Float64: return field.Float() == asFloat64(value) - case reflect.Slice, reflect.Map, reflect.Array: + case reflect.Slice, reflect.Map: + if value == "nil" { + return field.IsNil() + } + return int64(field.Len()) == asInt(value) + case reflect.Array: + // Arrays can't be nil, so only compare lengths return int64(field.Len()) == asInt(value) case reflect.Bool: @@ -2019,8 +2002,11 @@ func excludedWithout(fl FieldLevel) bool { // requiredWithout is the validation function // The field under validation must be present and not empty only when any of the other specified fields are not present. func requiredWithout(fl FieldLevel) bool { - if requireCheckFieldKind(fl, strings.TrimSpace(fl.Param()), true) { - return hasValue(fl) + params := parseOneOfParam2(fl.Param()) + for _, param := range params { + if requireCheckFieldKind(fl, param, true) { + return hasValue(fl) + } } return true } @@ -2060,7 +2046,6 @@ func isGteField(fl FieldLevel) bool { } switch kind { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: return field.Int() >= currentField.Int() @@ -2078,9 +2063,8 @@ func isGteField(fl FieldLevel) bool { fieldType := field.Type() if fieldType.ConvertibleTo(timeType) && currentField.Type().ConvertibleTo(timeType) { - - t := currentField.Convert(timeType).Interface().(time.Time) - fieldTime := field.Convert(timeType).Interface().(time.Time) + t := getValue(currentField.Convert(timeType)).(time.Time) + fieldTime := getValue(field.Convert(timeType)).(time.Time) return fieldTime.After(t) || fieldTime.Equal(t) } @@ -2106,7 +2090,6 @@ func isGtField(fl FieldLevel) bool { } switch kind { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: return field.Int() > currentField.Int() @@ -2124,9 +2107,8 @@ func isGtField(fl FieldLevel) bool { fieldType := field.Type() if fieldType.ConvertibleTo(timeType) && currentField.Type().ConvertibleTo(timeType) { - - t := currentField.Convert(timeType).Interface().(time.Time) - fieldTime := field.Convert(timeType).Interface().(time.Time) + t := getValue(currentField.Convert(timeType)).(time.Time) + fieldTime := getValue(field.Convert(timeType)).(time.Time) return fieldTime.After(t) } @@ -2147,7 +2129,6 @@ func isGte(fl FieldLevel) bool { param := fl.Param() switch field.Kind() { - case reflect.String: p := asInt(param) @@ -2181,15 +2162,14 @@ func isGte(fl FieldLevel) bool { case reflect.Struct: if field.Type().ConvertibleTo(timeType) { - now := time.Now().UTC() - t := field.Convert(timeType).Interface().(time.Time) + t := getValue(field.Convert(timeType)).(time.Time) return t.After(now) || t.Equal(now) } } - panic(fmt.Sprintf("Bad field type %T", field.Interface())) + panic(fmt.Sprintf("Bad field type %s", field.Type())) } // isGt is the validation function for validating if the current field's value is greater than the param's value. @@ -2198,7 +2178,6 @@ func isGt(fl FieldLevel) bool { param := fl.Param() switch field.Kind() { - case reflect.String: p := asInt(param) @@ -2232,11 +2211,11 @@ func isGt(fl FieldLevel) bool { case reflect.Struct: if field.Type().ConvertibleTo(timeType) { - return field.Convert(timeType).Interface().(time.Time).After(time.Now().UTC()) + return getValue(field.Convert(timeType)).(time.Time).After(time.Now().UTC()) } } - panic(fmt.Sprintf("Bad field type %T", field.Interface())) + panic(fmt.Sprintf("Bad field type %s", field.Type())) } // hasLengthOf is the validation function for validating if the current field's value is equal to the param's value. @@ -2245,7 +2224,6 @@ func hasLengthOf(fl FieldLevel) bool { param := fl.Param() switch field.Kind() { - case reflect.String: p := asInt(param) @@ -2277,7 +2255,7 @@ func hasLengthOf(fl FieldLevel) bool { return field.Float() == p } - panic(fmt.Sprintf("Bad field type %T", field.Interface())) + panic(fmt.Sprintf("Bad field type %s", field.Type())) } // hasMinOf is the validation function for validating if the current field's value is greater than or equal to the param's value. @@ -2296,7 +2274,6 @@ func isLteField(fl FieldLevel) bool { } switch kind { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: return field.Int() <= currentField.Int() @@ -2314,9 +2291,8 @@ func isLteField(fl FieldLevel) bool { fieldType := field.Type() if fieldType.ConvertibleTo(timeType) && currentField.Type().ConvertibleTo(timeType) { - - t := currentField.Convert(timeType).Interface().(time.Time) - fieldTime := field.Convert(timeType).Interface().(time.Time) + t := getValue(currentField.Convert(timeType)).(time.Time) + fieldTime := getValue(field.Convert(timeType)).(time.Time) return fieldTime.Before(t) || fieldTime.Equal(t) } @@ -2342,7 +2318,6 @@ func isLtField(fl FieldLevel) bool { } switch kind { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: return field.Int() < currentField.Int() @@ -2360,9 +2335,8 @@ func isLtField(fl FieldLevel) bool { fieldType := field.Type() if fieldType.ConvertibleTo(timeType) && currentField.Type().ConvertibleTo(timeType) { - - t := currentField.Convert(timeType).Interface().(time.Time) - fieldTime := field.Convert(timeType).Interface().(time.Time) + t := getValue(currentField.Convert(timeType)).(time.Time) + fieldTime := getValue(field.Convert(timeType)).(time.Time) return fieldTime.Before(t) } @@ -2383,7 +2357,6 @@ func isLte(fl FieldLevel) bool { param := fl.Param() switch field.Kind() { - case reflect.String: p := asInt(param) @@ -2417,15 +2390,14 @@ func isLte(fl FieldLevel) bool { case reflect.Struct: if field.Type().ConvertibleTo(timeType) { - now := time.Now().UTC() - t := field.Convert(timeType).Interface().(time.Time) + t := getValue(field.Convert(timeType)).(time.Time) return t.Before(now) || t.Equal(now) } } - panic(fmt.Sprintf("Bad field type %T", field.Interface())) + panic(fmt.Sprintf("Bad field type %s", field.Type())) } // isLt is the validation function for validating if the current field's value is less than the param's value. @@ -2434,7 +2406,6 @@ func isLt(fl FieldLevel) bool { param := fl.Param() switch field.Kind() { - case reflect.String: p := asInt(param) @@ -2468,11 +2439,11 @@ func isLt(fl FieldLevel) bool { case reflect.Struct: if field.Type().ConvertibleTo(timeType) { - return field.Convert(timeType).Interface().(time.Time).Before(time.Now().UTC()) + return getValue(field.Convert(timeType)).(time.Time).Before(time.Now().UTC()) } } - panic(fmt.Sprintf("Bad field type %T", field.Interface())) + panic(fmt.Sprintf("Bad field type %s", field.Type())) } // hasMaxOf is the validation function for validating if the current field's value is less than or equal to the param's value. @@ -2642,7 +2613,7 @@ func isDir(fl FieldLevel) bool { return fileInfo.IsDir() } - panic(fmt.Sprintf("Bad field type %T", field.Interface())) + panic(fmt.Sprintf("Bad field type %s", field.Type())) } // isDirPath is the validation function for validating if the current field's value is a valid directory. @@ -2699,7 +2670,7 @@ func isDirPath(fl FieldLevel) bool { } } - panic(fmt.Sprintf("Bad field type %T", field.Interface())) + panic(fmt.Sprintf("Bad field type %s", field.Type())) } // isJSON is the validation function for validating if the current field's value is a valid json string. @@ -2714,12 +2685,12 @@ func isJSON(fl FieldLevel) bool { fieldType := field.Type() if fieldType.ConvertibleTo(byteSliceType) { - b := field.Convert(byteSliceType).Interface().([]byte) + b := getValue(field.Convert(byteSliceType)).([]byte) return json.Valid(b) } } - panic(fmt.Sprintf("Bad field type %T", field.Interface())) + panic(fmt.Sprintf("Bad field type %s", field.Type())) } // isJWT is the validation function for validating if the current field's value is a valid JWT string. @@ -2766,7 +2737,7 @@ func isLowercase(fl FieldLevel) bool { return field.String() == strings.ToLower(field.String()) } - panic(fmt.Sprintf("Bad field type %T", field.Interface())) + panic(fmt.Sprintf("Bad field type %s", field.Type())) } // isUppercase is the validation function for validating if the current field's value is an uppercase string. @@ -2780,7 +2751,7 @@ func isUppercase(fl FieldLevel) bool { return field.String() == strings.ToUpper(field.String()) } - panic(fmt.Sprintf("Bad field type %T", field.Interface())) + panic(fmt.Sprintf("Bad field type %s", field.Type())) } // isDatetime is the validation function for validating if the current field's value is a valid datetime string. @@ -2794,7 +2765,7 @@ func isDatetime(fl FieldLevel) bool { return err == nil } - panic(fmt.Sprintf("Bad field type %T", field.Interface())) + panic(fmt.Sprintf("Bad field type %s", field.Type())) } // isTimeZone is the validation function for validating if the current field's value is a valid time zone string. @@ -2816,7 +2787,7 @@ func isTimeZone(fl FieldLevel) bool { return err == nil } - panic(fmt.Sprintf("Bad field type %T", field.Interface())) + panic(fmt.Sprintf("Bad field type %s", field.Type())) } // isIso3166Alpha2 is the validation function for validating if the current field's value is a valid iso3166-1 alpha-2 country code. @@ -2860,7 +2831,7 @@ func isIso3166AlphaNumeric(fl FieldLevel) bool { case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: code = int(field.Uint() % 1000) default: - panic(fmt.Sprintf("Bad field type %T", field.Interface())) + panic(fmt.Sprintf("Bad field type %s", field.Type())) } _, ok := iso3166_1_alpha_numeric[code] @@ -2884,7 +2855,7 @@ func isIso3166AlphaNumericEU(fl FieldLevel) bool { case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: code = int(field.Uint() % 1000) default: - panic(fmt.Sprintf("Bad field type %T", field.Interface())) + panic(fmt.Sprintf("Bad field type %s", field.Type())) } _, ok := iso3166_1_alpha_numeric_eu[code] @@ -2914,7 +2885,7 @@ func isIso4217Numeric(fl FieldLevel) bool { case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: code = int(field.Uint()) default: - panic(fmt.Sprintf("Bad field type %T", field.Interface())) + panic(fmt.Sprintf("Bad field type %s", field.Type())) } _, ok := iso4217_numeric[code] @@ -2930,7 +2901,7 @@ func isBCP47LanguageTag(fl FieldLevel) bool { return err == nil } - panic(fmt.Sprintf("Bad field type %T", field.Interface())) + panic(fmt.Sprintf("Bad field type %s", field.Type())) } // isIsoBicFormat is the validation function for validating if the current field's value is a valid Business Identifier Code (SWIFT code), defined in ISO 9362 @@ -3053,7 +3024,7 @@ func hasLuhnChecksum(fl FieldLevel) bool { case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: str = strconv.FormatUint(field.Uint(), 10) default: - panic(fmt.Sprintf("Bad field type %T", field.Interface())) + panic(fmt.Sprintf("Bad field type %s", field.Type())) } size := len(str) if size < 2 { // there has to be at least one digit that carries a meaning + the checksum @@ -3079,3 +3050,60 @@ func isEIN(fl FieldLevel) bool { return einRegex().MatchString(field.String()) } + +func isValidateFn(fl FieldLevel) bool { + const defaultParam = `Validate` + + field := fl.Field() + validateFn := cmp.Or(fl.Param(), defaultParam) + + ok, err := tryCallValidateFn(field, validateFn) + if err != nil { + return false + } + + return ok +} + +var ( + errMethodNotFound = errors.New(`method not found`) + errMethodReturnNoValues = errors.New(`method return o values (void)`) + errMethodReturnInvalidType = errors.New(`method should return invalid type`) +) + +func tryCallValidateFn(field reflect.Value, validateFn string) (bool, error) { + method := field.MethodByName(validateFn) + if field.CanAddr() && !method.IsValid() { + method = field.Addr().MethodByName(validateFn) + } + + if !method.IsValid() { + return false, fmt.Errorf("unable to call %q on type %q: %w", + validateFn, field.Type().String(), errMethodNotFound) + } + + returnValues := method.Call([]reflect.Value{}) + if len(returnValues) == 0 { + return false, fmt.Errorf("unable to use result of method %q on type %q: %w", + validateFn, field.Type().String(), errMethodReturnNoValues) + } + + firstReturnValue := returnValues[0] + + switch firstReturnValue.Kind() { + case reflect.Bool: + return firstReturnValue.Bool(), nil + case reflect.Interface: + errorType := reflect.TypeOf((*error)(nil)).Elem() + + if firstReturnValue.Type().Implements(errorType) { + return firstReturnValue.IsNil(), nil + } + + return false, fmt.Errorf("unable to use result of method %q on type %q: %w (got interface %v expect error)", + validateFn, field.Type().String(), errMethodReturnInvalidType, firstReturnValue.Type().String()) + default: + return false, fmt.Errorf("unable to use result of method %q on type %q: %w (got %v expect error or bool)", + validateFn, field.Type().String(), errMethodReturnInvalidType, firstReturnValue.Type().String()) + } +} diff --git a/vendor/github.com/go-playground/validator/v10/cache.go b/vendor/github.com/go-playground/validator/v10/cache.go index 41d40bfeac..fb101b064f 100644 --- a/vendor/github.com/go-playground/validator/v10/cache.go +++ b/vendor/github.com/go-playground/validator/v10/cache.go @@ -124,7 +124,6 @@ func (v *Validate) extractStructCache(current reflect.Value, sName string) *cStr var customName string for i := 0; i < numFields; i++ { - fld = typ.Field(i) if !v.privateFieldValidation && !fld.Anonymous && len(fld.PkgPath) > 0 { @@ -191,7 +190,6 @@ func (v *Validate) parseFieldTagsRecursive(tag string, fieldName string, alias s } else { next, curr := v.parseFieldTagsRecursive(tagsVal, fieldName, t, true) current.next, current = next, curr - } continue } @@ -210,7 +208,6 @@ func (v *Validate) parseFieldTagsRecursive(tag string, fieldName string, alias s switch t { case diveTag: current.typeof = typeDive - continue case keysTag: current.typeof = typeKeys @@ -219,8 +216,6 @@ func (v *Validate) parseFieldTagsRecursive(tag string, fieldName string, alias s panic(fmt.Sprintf("'%s' tag must be immediately preceded by the '%s' tag", keysTag, diveTag)) } - current.typeof = typeKeys - // need to pass along only keys tag // need to increment i to skip over the keys tags b := make([]byte, 0, 64) @@ -228,7 +223,6 @@ func (v *Validate) parseFieldTagsRecursive(tag string, fieldName string, alias s i++ for ; i < len(tags); i++ { - b = append(b, tags[i]...) b = append(b, ',') @@ -238,7 +232,6 @@ func (v *Validate) parseFieldTagsRecursive(tag string, fieldName string, alias s } current.keys, _ = v.parseFieldTagsRecursive(string(b[:len(b)-1]), fieldName, "", false) - continue case endKeysTag: current.typeof = typeEndKeys @@ -256,19 +249,15 @@ func (v *Validate) parseFieldTagsRecursive(tag string, fieldName string, alias s case omitempty: current.typeof = typeOmitEmpty - continue case omitnil: current.typeof = typeOmitNil - continue case structOnlyTag: current.typeof = typeStructOnly - continue case noStructLevelTag: current.typeof = typeNoStructLevel - continue default: if t == isdefault { diff --git a/vendor/github.com/go-playground/validator/v10/doc.go b/vendor/github.com/go-playground/validator/v10/doc.go index e7a241fbc4..23cce99164 100644 --- a/vendor/github.com/go-playground/validator/v10/doc.go +++ b/vendor/github.com/go-playground/validator/v10/doc.go @@ -188,7 +188,7 @@ Same as structonly tag except that any struct level validations will not run. # Omit Empty -Allows conditional validation, for example if a field is not set with +Allows conditional validation, for example, if a field is not set with a value (Determined by the "required" validator) then other validation such as min or max won't run, but if a value is set validation will run. @@ -756,6 +756,20 @@ in a field of the struct specified via a parameter. // For slices of struct: Usage: unique=field +# ValidateFn + +This validates that an object responds to a method that can return error or bool. +By default it expects an interface `Validate() error` and check that the method +does not return an error. Other methods can be specified using two signatures: +If the method returns an error, it check if the return value is nil. +If the method returns a boolean, it checks if the value is true. + + // to use the default method Validate() error + Usage: validateFn + + // to use the custom method IsValid() bool (or error) + Usage: validateFn=IsValid + # Alpha Only This validates that a string value contains ASCII alpha characters only diff --git a/vendor/github.com/go-playground/validator/v10/errors.go b/vendor/github.com/go-playground/validator/v10/errors.go index be2676e9e1..fd90625672 100644 --- a/vendor/github.com/go-playground/validator/v10/errors.go +++ b/vendor/github.com/go-playground/validator/v10/errors.go @@ -24,7 +24,6 @@ type InvalidValidationError struct { // Error returns InvalidValidationError message func (e *InvalidValidationError) Error() string { - if e.Type == nil { return "validator: (nil)" } @@ -41,11 +40,9 @@ type ValidationErrors []FieldError // All information to create an error message specific to your application is contained within // the FieldError found within the ValidationErrors array func (ve ValidationErrors) Error() string { - buff := bytes.NewBufferString("") for i := 0; i < len(ve); i++ { - buff.WriteString(ve[i].Error()) buff.WriteString("\n") } @@ -55,7 +52,6 @@ func (ve ValidationErrors) Error() string { // Translate translates all of the ValidationErrors func (ve ValidationErrors) Translate(ut ut.Translator) ValidationErrorsTranslations { - trans := make(ValidationErrorsTranslations) var fe *fieldError @@ -109,22 +105,24 @@ type FieldError interface { // StructNamespace returns the namespace for the field error, with the field's // actual name. // - // eq. "User.FirstName" see Namespace for comparison + // eg. "User.FirstName" see Namespace for comparison // // NOTE: this field can be blank when validating a single primitive field // using validate.Field(...) as there is no way to extract its name StructNamespace() string - // Field returns the fields name with the tag name taking precedence over the + // Field returns the field's name with the tag name taking precedence over the // field's actual name. // - // eq. JSON name "fname" + // `RegisterTagNameFunc` must be registered to get tag value. + // + // eg. JSON name "fname" // see StructField for comparison Field() string // StructField returns the field's actual name from the struct, when able to determine. // - // eq. "FirstName" + // eg. "FirstName" // see Field for comparison StructField() string @@ -204,7 +202,6 @@ func (fe *fieldError) StructNamespace() string { // Field returns the field's name with the tag name taking precedence over the // field's actual name. func (fe *fieldError) Field() string { - return fe.ns[len(fe.ns)-int(fe.fieldLen):] // // return fe.field // fld := fe.ns[len(fe.ns)-int(fe.fieldLen):] diff --git a/vendor/github.com/go-playground/validator/v10/struct_level.go b/vendor/github.com/go-playground/validator/v10/struct_level.go index fa7af9dd50..129b287258 100644 --- a/vendor/github.com/go-playground/validator/v10/struct_level.go +++ b/vendor/github.com/go-playground/validator/v10/struct_level.go @@ -107,7 +107,6 @@ func (v *validate) ExtractType(field reflect.Value) (reflect.Value, reflect.Kind // ReportError reports an error just by passing the field and tag information func (v *validate) ReportError(field interface{}, fieldName, structFieldName, tag, param string) { - fv, kind, _ := v.extractTypeInternal(reflect.ValueOf(field), false) if len(structFieldName) == 0 { @@ -123,7 +122,6 @@ func (v *validate) ReportError(field interface{}, fieldName, structFieldName, ta } if kind == reflect.Invalid { - v.errs = append(v.errs, &fieldError{ v: v.v, @@ -149,7 +147,7 @@ func (v *validate) ReportError(field interface{}, fieldName, structFieldName, ta structNs: v.str2, fieldLen: uint8(len(fieldName)), structfieldLen: uint8(len(structFieldName)), - value: fv.Interface(), + value: getValue(fv), param: param, kind: kind, typ: fv.Type(), @@ -161,11 +159,9 @@ func (v *validate) ReportError(field interface{}, fieldName, structFieldName, ta // // NOTE: this function prepends the current namespace to the relative ones. func (v *validate) ReportValidationErrors(relativeNamespace, relativeStructNamespace string, errs ValidationErrors) { - var err *fieldError for i := 0; i < len(errs); i++ { - err = errs[i].(*fieldError) err.ns = string(append(append(v.ns, relativeNamespace...), err.ns...)) err.structNs = string(append(append(v.actualNs, relativeStructNamespace...), err.structNs...)) diff --git a/vendor/github.com/go-playground/validator/v10/util.go b/vendor/github.com/go-playground/validator/v10/util.go index 9285223a2f..b1fd8cc11a 100644 --- a/vendor/github.com/go-playground/validator/v10/util.go +++ b/vendor/github.com/go-playground/validator/v10/util.go @@ -13,7 +13,6 @@ import ( // It will dive into pointers, customTypes and return you the // underlying value and it's kind. func (v *validate) extractTypeInternal(current reflect.Value, nullable bool) (reflect.Value, reflect.Kind, bool) { - BEGIN: switch current.Kind() { case reflect.Ptr: @@ -44,7 +43,6 @@ BEGIN: default: if v.v.hasCustomFuncs { - if fn, ok := v.v.customFuncs[current.Type()]; ok { current = reflect.ValueOf(fn(current)) goto BEGIN @@ -61,7 +59,6 @@ BEGIN: // NOTE: when not successful ok will be false, this can happen when a nested struct is nil and so the field // could not be retrieved because it didn't exist. func (v *validate) getStructFieldOKInternal(val reflect.Value, namespace string) (current reflect.Value, kind reflect.Kind, nullable bool, found bool) { - BEGIN: current, kind, nullable = v.ExtractType(val) if kind == reflect.Invalid { @@ -74,7 +71,6 @@ BEGIN: } switch kind { - case reflect.Ptr, reflect.Interface: return @@ -85,7 +81,6 @@ BEGIN: var ns string if !typ.ConvertibleTo(timeType) { - idx := strings.Index(namespace, namespaceSeparator) if idx != -1 { @@ -222,7 +217,7 @@ BEGIN: panic("Invalid field namespace") } -// asInt returns the parameter as a int64 +// asInt returns the parameter as an int64 // or panics if it can't convert func asInt(param string) int64 { i, err := strconv.ParseInt(param, 0, 64) @@ -256,7 +251,6 @@ func asIntFromType(t reflect.Type, param string) int64 { // asUint returns the parameter as a uint64 // or panics if it can't convert func asUint(param string) uint64 { - i, err := strconv.ParseUint(param, 0, 64) panicIf(err) @@ -282,7 +276,6 @@ func asFloat32(param string) float64 { // asBool returns the parameter as a bool // or panics if it can't convert func asBool(param string) bool { - i, err := strconv.ParseBool(param) panicIf(err) @@ -303,7 +296,7 @@ func fieldMatchesRegexByStringerValOrString(regexFn func() *regexp.Regexp, fl Fi case reflect.String: return regex.MatchString(fl.Field().String()) default: - if stringer, ok := fl.Field().Interface().(fmt.Stringer); ok { + if stringer, ok := getValue(fl.Field()).(fmt.Stringer); ok { return regex.MatchString(stringer.String()) } else { return regex.MatchString(fl.Field().String()) diff --git a/vendor/github.com/go-playground/validator/v10/validator.go b/vendor/github.com/go-playground/validator/v10/validator.go index d7c2e65863..995b0e19ad 100644 --- a/vendor/github.com/go-playground/validator/v10/validator.go +++ b/vendor/github.com/go-playground/validator/v10/validator.go @@ -32,14 +32,12 @@ type validate struct { // parent and current will be the same the first run of validateStruct func (v *validate) validateStruct(ctx context.Context, parent reflect.Value, current reflect.Value, typ reflect.Type, ns []byte, structNs []byte, ct *cTag) { - cs, ok := v.v.structCache.Get(typ) if !ok { cs = v.v.extractStructCache(current, typ.Name()) } if len(ns) == 0 && len(cs.name) != 0 { - ns = append(ns, cs.name...) ns = append(ns, '.') @@ -50,21 +48,17 @@ func (v *validate) validateStruct(ctx context.Context, parent reflect.Value, cur // ct is nil on top level struct, and structs as fields that have no tag info // so if nil or if not nil and the structonly tag isn't present if ct == nil || ct.typeof != typeStructOnly { - var f *cField for i := 0; i < len(cs.fields); i++ { - f = cs.fields[i] if v.isPartial { - if v.ffn != nil { // used with StructFiltered if v.ffn(append(structNs, f.name...)) { continue } - } else { // used with StructPartial & StructExcept _, ok = v.includeExclude[string(append(structNs, f.name...))] @@ -83,7 +77,6 @@ func (v *validate) validateStruct(ctx context.Context, parent reflect.Value, cur // first iteration will have no info about nostructlevel tag, and is checked prior to // calling the next iteration of validateStruct called from traverseField. if cs.fn != nil { - v.slflParent = parent v.slCurrent = current v.ns = ns @@ -267,7 +260,7 @@ OUTER: return } default: - if v.fldIsPointer && field.Interface() == nil { + if v.fldIsPointer && getValue(field) == nil { return } } @@ -291,7 +284,6 @@ OUTER: reusableCF := &cField{} for i := 0; i < current.Len(); i++ { - i64 = int64(i) v.misc = append(v.misc[0:0], cf.name...) @@ -304,7 +296,6 @@ OUTER: if cf.namesEqual { reusableCF.altName = reusableCF.name } else { - v.misc = append(v.misc[0:0], cf.altName...) v.misc = append(v.misc, '[') v.misc = strconv.AppendInt(v.misc, i64, 10) @@ -321,8 +312,7 @@ OUTER: reusableCF := &cField{} for _, key := range current.MapKeys() { - - pv = fmt.Sprintf("%v", key.Interface()) + pv = fmt.Sprintf("%v", key) v.misc = append(v.misc[0:0], cf.name...) v.misc = append(v.misc, '[') @@ -347,6 +337,18 @@ OUTER: // can be nil when just keys being validated if ct.next != nil { v.traverseField(ctx, parent, current.MapIndex(key), ns, structNs, reusableCF, ct.next) + } else { + // Struct fallback when map values are structs + val := current.MapIndex(key) + switch val.Kind() { + case reflect.Ptr: + if val.Elem().Kind() == reflect.Struct { + // Dive into the struct so its own tags run + v.traverseField(ctx, parent, val, ns, structNs, reusableCF, nil) + } + case reflect.Struct: + v.traverseField(ctx, parent, val, ns, structNs, reusableCF, nil) + } } } else { v.traverseField(ctx, parent, current.MapIndex(key), ns, structNs, reusableCF, ct) @@ -366,7 +368,6 @@ OUTER: v.misc = v.misc[0:0] for { - // set Field Level fields v.slflParent = parent v.flField = current @@ -381,7 +382,6 @@ OUTER: // drain rest of the 'or' values, then continue or leave for { - ct = ct.next if ct == nil { @@ -418,7 +418,6 @@ OUTER: } if ct.hasAlias { - v.errs = append(v.errs, &fieldError{ v: v.v, @@ -434,9 +433,7 @@ OUTER: typ: typ, }, ) - } else { - tVal := string(v.misc)[1:] v.errs = append(v.errs, @@ -500,7 +497,6 @@ OUTER: ct = ct.next } } - } func getValue(val reflect.Value) interface{} { diff --git a/vendor/github.com/go-playground/validator/v10/validator_instance.go b/vendor/github.com/go-playground/validator/v10/validator_instance.go index 779f689a8f..9362cd731a 100644 --- a/vendor/github.com/go-playground/validator/v10/validator_instance.go +++ b/vendor/github.com/go-playground/validator/v10/validator_instance.go @@ -104,7 +104,6 @@ type Validate struct { // in essence only parsing your validation tags once per struct type. // Using multiple instances neglects the benefit of caching. func New(options ...Option) *Validate { - tc := new(tagCache) tc.m.Store(make(map[string]*cTag)) @@ -126,7 +125,6 @@ func New(options ...Option) *Validate { // must copy validators for separate validations to be used in each instance for k, val := range bakedInValidators { - switch k { // these require that even if the value is nil that the validation should run, omitempty still overrides this behaviour case requiredIfTag, requiredUnlessTag, requiredWithTag, requiredWithAllTag, requiredWithoutTag, requiredWithoutAllTag, @@ -233,30 +231,12 @@ func (v *Validate) RegisterValidationCtx(tag string, fn FuncCtx, callValidationE return v.registerValidation(tag, fn, false, nilCheckable) } -func (v *Validate) registerValidation(tag string, fn FuncCtx, bakedIn bool, nilCheckable bool) error { - if len(tag) == 0 { - return errors.New("function Key cannot be empty") - } - - if fn == nil { - return errors.New("function cannot be empty") - } - - _, ok := restrictedTags[tag] - if !bakedIn && (ok || strings.ContainsAny(tag, restrictedTagChars)) { - panic(fmt.Sprintf(restrictedTagErr, tag)) - } - v.validations[tag] = internalValidationFuncWrapper{fn: fn, runValidationOnNil: nilCheckable} - return nil -} - // RegisterAlias registers a mapping of a single validation tag that // defines a common or complex set of validation(s) to simplify adding validation // to structs. // // NOTE: this function is not thread-safe it is intended that these all be registered prior to any validation func (v *Validate) RegisterAlias(alias, tags string) { - _, ok := restrictedTags[alias] if ok || strings.ContainsAny(alias, restrictedTagChars) { @@ -280,7 +260,6 @@ func (v *Validate) RegisterStructValidation(fn StructLevelFunc, types ...interfa // NOTE: // - this method is not thread-safe it is intended that these all be registered prior to any validation func (v *Validate) RegisterStructValidationCtx(fn StructLevelFuncCtx, types ...interface{}) { - if v.structLevelFuncs == nil { v.structLevelFuncs = make(map[reflect.Type]StructLevelFuncCtx) } @@ -327,7 +306,6 @@ func (v *Validate) RegisterStructValidationMapRules(rules map[string]string, typ // // NOTE: this method is not thread-safe it is intended that these all be registered prior to any validation func (v *Validate) RegisterCustomTypeFunc(fn CustomTypeFunc, types ...interface{}) { - if v.customFuncs == nil { v.customFuncs = make(map[reflect.Type]CustomTypeFunc) } @@ -341,7 +319,6 @@ func (v *Validate) RegisterCustomTypeFunc(fn CustomTypeFunc, types ...interface{ // RegisterTranslation registers translations against the provided tag. func (v *Validate) RegisterTranslation(tag string, trans ut.Translator, registerFn RegisterTranslationsFunc, translationFn TranslationFunc) (err error) { - if v.transTagFunc == nil { v.transTagFunc = make(map[ut.Translator]map[string]TranslationFunc) } @@ -375,7 +352,6 @@ func (v *Validate) Struct(s interface{}) error { // It returns InvalidValidationError for bad values passed in and nil or ValidationErrors as error otherwise. // You will need to assert the error if it's not nil eg. err.(validator.ValidationErrors) to access the array of errors. func (v *Validate) StructCtx(ctx context.Context, s interface{}) (err error) { - val := reflect.ValueOf(s) top := val @@ -492,10 +468,8 @@ func (v *Validate) StructPartialCtx(ctx context.Context, s interface{}, fields . name := typ.Name() for _, k := range fields { - flds := strings.Split(k, namespaceSeparator) if len(flds) > 0 { - vd.misc = append(vd.misc[0:0], name...) // Don't append empty name for unnamed structs if len(vd.misc) != 0 { @@ -503,7 +477,6 @@ func (v *Validate) StructPartialCtx(ctx context.Context, s interface{}, fields . } for _, s := range flds { - idx := strings.Index(s, leftBracket) if idx != -1 { @@ -519,7 +492,6 @@ func (v *Validate) StructPartialCtx(ctx context.Context, s interface{}, fields . idx = strings.Index(s, leftBracket) } } else { - vd.misc = append(vd.misc, s...) vd.includeExclude[string(vd.misc)] = struct{}{} } @@ -582,7 +554,6 @@ func (v *Validate) StructExceptCtx(ctx context.Context, s interface{}, fields .. name := typ.Name() for _, key := range fields { - vd.misc = vd.misc[0:0] if len(name) > 0 { @@ -709,3 +680,20 @@ func (v *Validate) VarWithValueCtx(ctx context.Context, field interface{}, other v.pool.Put(vd) return } + +func (v *Validate) registerValidation(tag string, fn FuncCtx, bakedIn bool, nilCheckable bool) error { + if len(tag) == 0 { + return errors.New("function Key cannot be empty") + } + + if fn == nil { + return errors.New("function cannot be empty") + } + + _, ok := restrictedTags[tag] + if !bakedIn && (ok || strings.ContainsAny(tag, restrictedTagChars)) { + panic(fmt.Sprintf(restrictedTagErr, tag)) + } + v.validations[tag] = internalValidationFuncWrapper{fn: fn, runValidationOnNil: nilCheckable} + return nil +} diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/.release-please-manifest.json b/vendor/github.com/microsoft/kiota-abstractions-go/.release-please-manifest.json new file mode 100644 index 0000000000..93cff0a7f8 --- /dev/null +++ b/vendor/github.com/microsoft/kiota-abstractions-go/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "1.9.2" +} \ No newline at end of file diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/CHANGELOG.md b/vendor/github.com/microsoft/kiota-abstractions-go/CHANGELOG.md index 8f1660c099..c618c17123 100644 --- a/vendor/github.com/microsoft/kiota-abstractions-go/CHANGELOG.md +++ b/vendor/github.com/microsoft/kiota-abstractions-go/CHANGELOG.md @@ -2,15 +2,176 @@ All notable changes to this project will be documented in this file. -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.9.2](https://github.com/microsoft/kiota-abstractions-go/compare/v1.9.1...v1.9.2) (2025-04-02) -## [Unreleased] + +### Bug Fixes + +* drop dependency on common-go ([#199](https://github.com/microsoft/kiota-abstractions-go/issues/199)) ([5702488](https://github.com/microsoft/kiota-abstractions-go/commit/57024882f125ff719a2155293d5e28716f2ba9db)) + +## [1.9.1](https://github.com/microsoft/kiota-abstractions-go/compare/v1.9.0...v1.9.1) (2025-03-24) + + +### Bug Fixes + +* upgrades common go dependency to solve triming issues ([5769aa7](https://github.com/microsoft/kiota-abstractions-go/commit/5769aa7c12ddcd01862ded353ffe4b966da25b55)) +* upgrades common go dependency to solve triming issues ([73349ca](https://github.com/microsoft/kiota-abstractions-go/commit/73349ca6ebe5122fad13eb85fd957490ea8cfeea)) + +## [1.9.0](https://github.com/microsoft/kiota-abstractions-go/compare/v1.8.1...v1.9.0) (2025-03-13) + + +### Features + +* upgrades required go version from go1.18 to go 1.22 ([526145f](https://github.com/microsoft/kiota-abstractions-go/commit/526145f3f219287feffe814d2f3efb2d9b7e233d)) + +## [1.8.1] - 2024-07-09 + +### Changed + +- Fixed outdated reference to std uri template. + +## [1.8.0] - 2024-07-09 + +### Changed + +- Removed native support for date in `std-uritemplate` [#1.8.0](https://github.com/microsoft/kiota-abstractions-go/issues/183) + +### Added + +## [1.7.0] - 2024-07-09 + +- Added accessors for headers and status to `ApiErrorable` [#177](https://github.com/microsoft/kiota-abstractions-go/issues/177) + +### Changed + +## [1.6.1] - 2024-07-09 + +- Corrected two instances of `octet-steam` to `octet-stream` [#173](https://github.com/microsoft/kiota-abstractions-go/pull/173), [#174](https://github.com/microsoft/kiota-abstractions-go/pull/174) + +## [1.6.0] - 2024-02-29 + +### Added + +- Added support for untyped nodes. (https://github.com/microsoft/kiota/pull/4095) + +## [1.5.6] - 2024-01-18 + +### Changed + +- The input contains http or https which function will return an error. [#130](https://github.com/microsoft/kiota-abstractions-go/issues/130) + +## [1.5.5] - 2024-01-17 + +### Changed + +- Fixed a bug where reseting properties to null would be impossible with the in memory backing store. [microsoftgraph/msgraph-sdk-go#643](https://github.com/microsoftgraph/msgraph-sdk-go/issues/643) + +## [1.5.4] - 2024-01-16 + +### Changed + +- Fix bug where empty string query parameters are added to the request. [#133](https://github.com/microsoft/kiota-abstractions-go/issues/133) + +## [1.5.3] - 2023-11-24 + +### Added + +- Added support for multi valued query and path parameters of type other than string. [#124](https://github.com/microsoft/kiota-abstractions-go/pull/124) + +## [1.5.2] - 2023-11-22 + +### Added + +- Added ApiErrorable interface. [microsoft/kiota-http-go#110](https://github.com/microsoft/kiota-http-go/issues/110) + +## [1.5.1] - 2023-11-15 + +### Added + +- Added support for query an path parameters of enum type. [microsoft/kiota#3693](https://github.com/microsoft/kiota/issues/3693) + +## [1.5.0] - 2023-11-08 ### Added +- Added request information methods to reduce the amount of generated code. + +## [1.4.0] - 2023-11-01 + +### Added + +- Added serialization helpers. [microsoft/kiota#3406](https://github.com/microsoft/kiota/issues/3406) + +## [1.3.1] - 2023-10-31 + ### Changed +- Fixed an issue where query parameters of type array of anything else than string would not be expanded properly. [#114](https://github.com/microsoft/kiota-abstractions-go/issues/114) + +## [1.3.0] - 2023-10-12 + +### Added + +- Added an overload method to set binary content with their content type. + +## [1.2.3] - 2023-10-05 + +### Added + +- A tryAdd method to RequestHeaders + +## [1.2.2] - 2023-09-21 + +### Changed + +- Switched the RFC 6570 implementation to std-uritemplate + +## [1.2.1] - 2023-09-06 + +### Changed + +- Fixed a bug where serialization registries would always replace existing values. [#95](https://github.com/microsoft/kiota-abstractions-go/issues/95) + +## [1.2.0] - 2023-07-26 + +### Added + +- Added support for multipart request body. + +## [1.1.0] - 2023-05-04 + +### Added + +- Added an interface to represent composed types. + +## [1.0.0] - 2023-05-04 + +### Changed + +- GA Release. + +## [0.20.0] - 2023-04-12 + +### Added + +- Adds response headers to Api Error class + +### Changed + +## [0.19.1] - 2023-04-12 + +### Added + +### Changed + +- Fixes concurrent map write panics when enabling backing stores. + +## [0.19.0] - 2023-03-22 + +### Added + +- Adds base request builder class to reduce generated code duplication. + ## [0.18.0] - 2023-03-20 ### Added diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/CODE_OF_CONDUCT.md b/vendor/github.com/microsoft/kiota-abstractions-go/CODE_OF_CONDUCT.md index c72a5749c5..686e5e7a09 100644 --- a/vendor/github.com/microsoft/kiota-abstractions-go/CODE_OF_CONDUCT.md +++ b/vendor/github.com/microsoft/kiota-abstractions-go/CODE_OF_CONDUCT.md @@ -1,9 +1,10 @@ -# Microsoft Open Source Code of Conduct - -This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). - -Resources: - -- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) -- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) -- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns +# Microsoft Open Source Code of Conduct + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). + +Resources: + +- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) +- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns +- Employees can reach out at [aka.ms/opensource/moderation-support](https://aka.ms/opensource/moderation-support) diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/CONTRIBUTING.md b/vendor/github.com/microsoft/kiota-abstractions-go/CONTRIBUTING.md new file mode 100644 index 0000000000..b1349c1901 --- /dev/null +++ b/vendor/github.com/microsoft/kiota-abstractions-go/CONTRIBUTING.md @@ -0,0 +1,52 @@ +# Contributing to the Kiota abstractions for Go + +The Kiota abstractions for Go is available for all manner of contribution. There are a couple of different recommended paths to get contributions into the released version of this SDK. + +__NOTE__ A signed a contribution license agreement is required for all contributions, and is checked automatically on new pull requests. Please read and sign [the agreement](https://cla.microsoft.com/) before starting any work for this repository. + +## File issues + +The best way to get started with a contribution is to start a dialog with the owners of this repository. Sometimes features will be under development or out of scope for this SDK and it's best to check before starting work on contribution. + +## Submit pull requests for trivial changes + +If you are making a change that does not affect the interface components and does not affect other downstream callers, feel free to make a pull request against the __dev__ branch. The dev branch will be updated frequently. + +Revisions of this nature will result in a 0.0.X change of the version number. + +## Submit pull requests for features + +If major functionality is being added, or there will need to be gestation time for a change, it should be submitted against the __feature__ branch. + +Revisions of this nature will result in a 0.X.X change of the version number. + +## Commit message format + +To support our automated release process, pull requests are required to follow the [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/) +format. + +Each commit message consists of a **header**, an optional **body** and an optional **footer**. The header is the first line of the commit and +MUST have a **type** (see below for a list of types) and a **description**. An optional **scope** can be added to the header to give extra context. + +``` +[optional scope]: + + + + +``` + +The recommended commit types used are: + + - **feat** for feature updates (increments the _minor_ version) + - **fix** for bug fixes (increments the _patch_ version) + - **perf** for performance related changes e.g. optimizing an algorithm + - **refactor** for code refactoring changes + - **test** for test suite updates e.g. adding a test or fixing a test + - **style** for changes that don't affect the meaning of code. e.g. formatting changes + - **docs** for documentation updates e.g. ReadMe update or code documentation updates + - **build** for build system changes (gradle updates, external dependency updates) + - **ci** for CI configuration file changes e.g. updating a pipeline + - **chore** for miscallaneous non-sdk changesin the repo e.g. removing an unused file + +Adding a footer with the prefix **BREAKING CHANGE:** will cause an increment of the _major_ version. \ No newline at end of file diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/api_client_builder.go b/vendor/github.com/microsoft/kiota-abstractions-go/api_client_builder.go index 4122d8af9a..2ac0a91930 100644 --- a/vendor/github.com/microsoft/kiota-abstractions-go/api_client_builder.go +++ b/vendor/github.com/microsoft/kiota-abstractions-go/api_client_builder.go @@ -1,23 +1,21 @@ package abstractions import ( - "github.com/microsoft/kiota-abstractions-go/store" - sync "sync" - s "github.com/microsoft/kiota-abstractions-go/serialization" + "github.com/microsoft/kiota-abstractions-go/store" ) -var serializerMutex sync.Mutex -var deserializerMutex sync.Mutex - // RegisterDefaultSerializer registers the default serializer to the registry singleton to be used by the request adapter. func RegisterDefaultSerializer(metaFactory func() s.SerializationWriterFactory) { factory := metaFactory() contentType, err := factory.GetValidContentType() if err == nil && contentType != "" { - serializerMutex.Lock() - s.DefaultSerializationWriterFactoryInstance.ContentTypeAssociatedFactories[contentType] = factory - serializerMutex.Unlock() + registry := s.DefaultSerializationWriterFactoryInstance + registry.Lock() + if _, ok := registry.ContentTypeAssociatedFactories[contentType]; !ok { + registry.ContentTypeAssociatedFactories[contentType] = factory + } + registry.Unlock() } } @@ -26,9 +24,12 @@ func RegisterDefaultDeserializer(metaFactory func() s.ParseNodeFactory) { factory := metaFactory() contentType, err := factory.GetValidContentType() if err == nil && contentType != "" { - deserializerMutex.Lock() - s.DefaultParseNodeFactoryInstance.ContentTypeAssociatedFactories[contentType] = factory - deserializerMutex.Unlock() + registry := s.DefaultParseNodeFactoryInstance + registry.Lock() + if _, ok := registry.ContentTypeAssociatedFactories[contentType]; !ok { + registry.ContentTypeAssociatedFactories[contentType] = factory + } + registry.Unlock() } } @@ -45,6 +46,8 @@ func EnableBackingStoreForSerializationWriterFactory(factory s.SerializationWrit } func enableBackingStoreForSerializationRegistry(registry *s.SerializationWriterFactoryRegistry) { + registry.Lock() + defer registry.Unlock() for key, value := range registry.ContentTypeAssociatedFactories { if _, ok := value.(*store.BackingStoreSerializationWriterProxyFactory); !ok { registry.ContentTypeAssociatedFactories[key] = store.NewBackingStoreSerializationWriterProxyFactory(value) @@ -65,6 +68,8 @@ func EnableBackingStoreForParseNodeFactory(factory s.ParseNodeFactory) s.ParseNo } func enableBackingStoreForParseNodeRegistry(registry *s.ParseNodeFactoryRegistry) { + registry.Lock() + defer registry.Unlock() for key, value := range registry.ContentTypeAssociatedFactories { if _, ok := value.(*store.BackingStoreParseNodeFactory); !ok { registry.ContentTypeAssociatedFactories[key] = store.NewBackingStoreParseNodeFactory(value) diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/api_error.go b/vendor/github.com/microsoft/kiota-abstractions-go/api_error.go index d8aaa0e657..9fa99b48f8 100644 --- a/vendor/github.com/microsoft/kiota-abstractions-go/api_error.go +++ b/vendor/github.com/microsoft/kiota-abstractions-go/api_error.go @@ -2,10 +2,18 @@ package abstractions import "fmt" +type ApiErrorable interface { + SetResponseHeaders(ResponseHeaders *ResponseHeaders) + SetStatusCode(ResponseStatusCode int) + GetResponseHeaders() *ResponseHeaders + GetStatusCode() int +} + // ApiError is the parent type for errors thrown by the client when receiving failed responses to its requests type ApiError struct { Message string ResponseStatusCode int + ResponseHeaders *ResponseHeaders } func (e *ApiError) Error() string { @@ -18,5 +26,21 @@ func (e *ApiError) Error() string { // NewApiError creates a new ApiError instance func NewApiError() *ApiError { - return &ApiError{} + return &ApiError{ResponseHeaders: NewResponseHeaders()} +} + +func (e *ApiError) SetResponseHeaders(ResponseHeaders *ResponseHeaders) { + e.ResponseHeaders = ResponseHeaders +} + +func (e *ApiError) SetStatusCode(ResponseStatusCode int) { + e.ResponseStatusCode = ResponseStatusCode +} + +func (e *ApiError) GetResponseHeaders() *ResponseHeaders { + return e.ResponseHeaders +} + +func (e *ApiError) GetStatusCode() int { + return e.ResponseStatusCode } diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/authentication/allowed_hosts_validator.go b/vendor/github.com/microsoft/kiota-abstractions-go/authentication/allowed_hosts_validator.go index c5bc78d781..052882de74 100644 --- a/vendor/github.com/microsoft/kiota-abstractions-go/authentication/allowed_hosts_validator.go +++ b/vendor/github.com/microsoft/kiota-abstractions-go/authentication/allowed_hosts_validator.go @@ -1,22 +1,35 @@ package authentication import ( + "errors" u "net/url" "strings" ) -// AllowedHostsValidator Maintains a list of valid hosts and allows authentication providers to check whether a host is valid before authenticating a request +// AllowedHostsValidator maintains a list of valid hosts and allows authentication providers to check whether a host is valid before authenticating a request type AllowedHostsValidator struct { validHosts map[string]bool } -// NewAllowedHostsValidator creates a new AllowedHostsValidator object with provided values. +// ErrInvalidHostPrefix indicates that a host should not contain the http or https prefix. +var ErrInvalidHostPrefix = errors.New("host should not contain http or https prefix") + +// Deprecated: NewAllowedHostsValidator creates a new AllowedHostsValidator object with provided values. func NewAllowedHostsValidator(validHosts []string) AllowedHostsValidator { result := AllowedHostsValidator{} result.SetAllowedHosts(validHosts) return result } +// NewAllowedHostsValidatorErrorCheck creates a new AllowedHostsValidator object with provided values and performs error checking. +func NewAllowedHostsValidatorErrorCheck(validHosts []string) (*AllowedHostsValidator, error) { + result := &AllowedHostsValidator{} + if err := result.SetAllowedHostsErrorCheck(validHosts); err != nil { + return nil, err + } + return result, nil +} + // GetAllowedHosts returns the list of valid hosts. func (v *AllowedHostsValidator) GetAllowedHosts() map[string]bool { hosts := make(map[string]bool, len(v.validHosts)) @@ -26,7 +39,7 @@ func (v *AllowedHostsValidator) GetAllowedHosts() map[string]bool { return hosts } -// SetAllowedHosts sets the list of valid hosts. +// Deprecated: SetAllowedHosts sets the list of valid hosts. func (v *AllowedHostsValidator) SetAllowedHosts(hosts []string) { v.validHosts = make(map[string]bool, len(hosts)) if len(hosts) > 0 { @@ -36,6 +49,21 @@ func (v *AllowedHostsValidator) SetAllowedHosts(hosts []string) { } } +// SetAllowedHostsErrorCheck sets the list of valid hosts with error checking. +func (v *AllowedHostsValidator) SetAllowedHostsErrorCheck(hosts []string) error { + v.validHosts = make(map[string]bool, len(hosts)) + if len(hosts) > 0 { + for _, host := range hosts { + lowerHost := strings.ToLower(host) + if strings.HasPrefix(lowerHost, "http://") || strings.HasPrefix(lowerHost, "https://") { + return ErrInvalidHostPrefix + } + v.validHosts[lowerHost] = true + } + } + return nil +} + // IsValidHost returns true if the host is valid. func (v *AllowedHostsValidator) IsUrlHostValid(uri *u.URL) bool { if uri == nil { diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/authentication/api_key_authentication_provider.go b/vendor/github.com/microsoft/kiota-abstractions-go/authentication/api_key_authentication_provider.go index fb2be2c79a..82b18fd1fc 100644 --- a/vendor/github.com/microsoft/kiota-abstractions-go/authentication/api_key_authentication_provider.go +++ b/vendor/github.com/microsoft/kiota-abstractions-go/authentication/api_key_authentication_provider.go @@ -41,12 +41,16 @@ func NewApiKeyAuthenticationProviderWithValidHosts(apiKey string, parameterName if len(parameterName) == 0 { return nil, errors.New("parameterName cannot be empty") } - validator := NewAllowedHostsValidator(validHosts) + + validator, err := NewAllowedHostsValidatorErrorCheck(validHosts) + if err != nil { + return nil, err + } return &ApiKeyAuthenticationProvider{ apiKey: apiKey, parameterName: parameterName, keyLocation: keyLocation, - validator: &validator, + validator: validator, }, nil } diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/base_request_builder.go b/vendor/github.com/microsoft/kiota-abstractions-go/base_request_builder.go new file mode 100644 index 0000000000..d3aa3d995d --- /dev/null +++ b/vendor/github.com/microsoft/kiota-abstractions-go/base_request_builder.go @@ -0,0 +1,29 @@ +package abstractions + +// BaseRequestBuilder is the base class for all request builders. +type BaseRequestBuilder struct { + // Path parameters for the request + PathParameters map[string]string + // The request adapter to use to execute the requests. + RequestAdapter RequestAdapter + // Url template to use to build the URL for the current request builder + UrlTemplate string +} + +// NewBaseRequestBuilder creates a new BaseRequestBuilder instance. +func NewBaseRequestBuilder(requestAdapter RequestAdapter, urlTemplate string, pathParameters map[string]string) *BaseRequestBuilder { + if requestAdapter == nil { + panic("requestAdapter cannot be nil") + } + pathParametersCopy := make(map[string]string) + if pathParameters != nil { + for idx, item := range pathParameters { + pathParametersCopy[idx] = item + } + } + return &BaseRequestBuilder{ + RequestAdapter: requestAdapter, + UrlTemplate: urlTemplate, + PathParameters: pathParametersCopy, + } +} diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/headers.go b/vendor/github.com/microsoft/kiota-abstractions-go/headers.go new file mode 100644 index 0000000000..23c94bd69e --- /dev/null +++ b/vendor/github.com/microsoft/kiota-abstractions-go/headers.go @@ -0,0 +1,111 @@ +package abstractions + +import "strings" + +type header struct { + headers map[string]map[string]struct{} +} + +type void struct{} + +var voidInstance void + +func normalizeHeaderKey(key string) string { + return strings.ToLower(strings.Trim(key, " ")) +} + +//Add adds a new header or append a new value to an existing header +func (r *header) Add(key string, value string, additionalValues ...string) { + normalizedKey := normalizeHeaderKey(key) + if normalizedKey == "" || value == "" { + return + } + if r.headers == nil { + r.headers = make(map[string]map[string]struct{}) + } + if r.headers[normalizedKey] == nil { + r.headers[normalizedKey] = make(map[string]struct{}) + } + r.headers[normalizedKey][value] = voidInstance + for _, v := range additionalValues { + r.headers[normalizedKey][v] = voidInstance + } +} + +//Get returns the values for the specific header +func (r *header) Get(key string) []string { + if r.headers == nil { + return nil + } + normalizedKey := normalizeHeaderKey(key) + if r.headers[normalizedKey] == nil { + return make([]string, 0) + } + values := make([]string, 0, len(r.headers[normalizedKey])) + for k := range r.headers[normalizedKey] { + values = append(values, k) + } + return values +} + +//Remove removes the specific header and all its values +func (r *header) Remove(key string) { + if r.headers == nil { + return + } + normalizedKey := normalizeHeaderKey(key) + delete(r.headers, normalizedKey) +} + +//RemoveValue remove the value for the specific header +func (r *header) RemoveValue(key string, value string) { + if r.headers == nil { + return + } + normalizedKey := normalizeHeaderKey(key) + if r.headers[normalizedKey] == nil { + return + } + delete(r.headers[normalizedKey], value) + if len(r.headers[normalizedKey]) == 0 { + delete(r.headers, normalizedKey) + } +} + +//ContainsKey check if the key exists in the headers +func (r *header) ContainsKey(key string) bool { + if r.headers == nil { + return false + } + normalizedKey := normalizeHeaderKey(key) + return r.headers[normalizedKey] != nil +} + +//Clear clear all headers +func (r *header) Clear() { + r.headers = nil +} + +//AddAll adds all headers from the other headers +func (r *header) AddAll(other *header) { + if other == nil || other.headers == nil { + return + } + for k, v := range other.headers { + for k2 := range v { + r.Add(k, k2) + } + } +} + +//ListKeys returns all the keys in the headers +func (r *header) ListKeys() []string { + if r.headers == nil { + return make([]string, 0) + } + keys := make([]string, 0, len(r.headers)) + for k := range r.headers { + keys = append(keys, k) + } + return keys +} diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/multipart_body.go b/vendor/github.com/microsoft/kiota-abstractions-go/multipart_body.go new file mode 100644 index 0000000000..3494fa47a4 --- /dev/null +++ b/vendor/github.com/microsoft/kiota-abstractions-go/multipart_body.go @@ -0,0 +1,191 @@ +package abstractions + +import ( + "errors" + "strings" + + "github.com/google/uuid" + "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MultipartBody represents a multipart body for a request or a response. +type MultipartBody interface { + serialization.Parsable + // AddOrReplacePart adds or replaces a part in the multipart body. + AddOrReplacePart(name string, contentType string, content any) error + // GetPartValue gets the value of a part in the multipart body. + GetPartValue(name string) (any, error) + // RemovePart removes a part from the multipart body. + RemovePart(name string) error + // SetRequestAdapter sets the request adapter to use for serialization. + SetRequestAdapter(requestAdapter RequestAdapter) + // GetRequestAdapter gets the request adapter to use for serialization. + GetRequestAdapter() RequestAdapter + // GetBoundary returns the boundary used in the multipart body. + GetBoundary() string +} +type multipartBody struct { + parts map[string]multipartEntry + originalNamesMap map[string]string + boundary string + requestAdapter RequestAdapter +} + +func NewMultipartBody() MultipartBody { + return &multipartBody{ + parts: make(map[string]multipartEntry), + originalNamesMap: make(map[string]string), + boundary: strings.ReplaceAll(uuid.New().String(), "-", ""), + } +} +func normalizePartName(original string) string { + return strings.ToLower(original) +} +func stringReference(original string) *string { + return &original +} + +// AddOrReplacePart adds or replaces a part in the multipart body. +func (m *multipartBody) AddOrReplacePart(name string, contentType string, content any) error { + if name == "" { + return errors.New("name cannot be empty") + } + if contentType == "" { + return errors.New("contentType cannot be empty") + } + if content == nil { + return errors.New("content cannot be nil") + } + normalizedName := normalizePartName(name) + m.parts[normalizedName] = multipartEntry{ + ContentType: contentType, + Content: content, + } + m.originalNamesMap[normalizedName] = name + + return nil +} + +// GetPartValue gets the value of a part in the multipart body. +func (m *multipartBody) GetPartValue(name string) (any, error) { + if name == "" { + return nil, errors.New("name cannot be empty") + } + normalizedName := normalizePartName(name) + if part, ok := m.parts[normalizedName]; ok { + return part.Content, nil + } + return nil, nil +} + +// RemovePart removes a part from the multipart body. +func (m *multipartBody) RemovePart(name string) error { + if name == "" { + return errors.New("name cannot be empty") + } + normalizedName := normalizePartName(name) + delete(m.parts, normalizedName) + delete(m.originalNamesMap, normalizedName) + return nil +} + +// Serialize writes the objects properties to the current writer. +func (m *multipartBody) Serialize(writer serialization.SerializationWriter) error { + if writer == nil { + return errors.New("writer cannot be nil") + } + if m.requestAdapter == nil { + return errors.New("requestAdapter cannot be nil") + } + serializationWriterFactory := m.requestAdapter.GetSerializationWriterFactory() + if serializationWriterFactory == nil { + return errors.New("serializationWriterFactory cannot be nil") + } + if len(m.parts) == 0 { + return errors.New("no parts to serialize") + } + + first := true + for partName, part := range m.parts { + if first { + first = false + } else { + if err := writer.WriteStringValue("", stringReference("")); err != nil { + return err + } + } + if err := writer.WriteStringValue("", stringReference("--"+m.boundary)); err != nil { + return err + } + if err := writer.WriteStringValue("Content-Type", stringReference(part.ContentType)); err != nil { + return err + } + partOriginalName := m.originalNamesMap[partName] + if err := writer.WriteStringValue("Content-Disposition", stringReference("form-data; name=\""+partOriginalName+"\"")); err != nil { + return err + } + if err := writer.WriteStringValue("", stringReference("")); err != nil { + return err + } + if parsable, ok := part.Content.(serialization.Parsable); ok { + partWriter, error := serializationWriterFactory.GetSerializationWriter(part.ContentType) + defer partWriter.Close() + if error != nil { + return error + } + if error = partWriter.WriteObjectValue("", parsable); error != nil { + return error + } + partContent, error := partWriter.GetSerializedContent() + if error != nil { + return error + } + if error = writer.WriteByteArrayValue("", partContent); error != nil { + return error + } + } else if str, ok := part.Content.(string); ok { + if error := writer.WriteStringValue("", stringReference(str)); error != nil { + return error + } + } else if byteArray, ok := part.Content.([]byte); ok { + if error := writer.WriteByteArrayValue("", byteArray); error != nil { + return error + } + } else { + return errors.New("unsupported part type") + } + } + if err := writer.WriteStringValue("", stringReference("")); err != nil { + return err + } + if err := writer.WriteStringValue("", stringReference("--"+m.boundary+"--")); err != nil { + return err + } + + return nil +} + +// GetFieldDeserializers returns the deserialization information for this object. +func (m *multipartBody) GetFieldDeserializers() map[string]func(serialization.ParseNode) error { + panic("not implemented") +} + +// GetRequestAdapter gets the request adapter to use for serialization. +func (m *multipartBody) GetRequestAdapter() RequestAdapter { + return m.requestAdapter +} + +// SetRequestAdapter sets the request adapter to use for serialization. +func (m *multipartBody) SetRequestAdapter(requestAdapter RequestAdapter) { + m.requestAdapter = requestAdapter +} + +// GetBoundary returns the boundary used in the multipart body. +func (m *multipartBody) GetBoundary() string { + return m.boundary +} + +type multipartEntry struct { + ContentType string + Content any +} diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/release-please-config.json b/vendor/github.com/microsoft/kiota-abstractions-go/release-please-config.json new file mode 100644 index 0000000000..56a97d39ab --- /dev/null +++ b/vendor/github.com/microsoft/kiota-abstractions-go/release-please-config.json @@ -0,0 +1,14 @@ +{ + "release-type": "go", + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": true, + "include-component-in-tag": false, + "include-v-in-tag": true, + "packages": { + ".": { + "package-name": "github.com/microsoft/kiota-abstractions-go", + "changelog-path": "CHANGELOG.md" + } + }, + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" + } diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/request_configuration.go b/vendor/github.com/microsoft/kiota-abstractions-go/request_configuration.go new file mode 100644 index 0000000000..7b23c6b91e --- /dev/null +++ b/vendor/github.com/microsoft/kiota-abstractions-go/request_configuration.go @@ -0,0 +1,15 @@ +package abstractions + +// RequestConfiguration represents a set of options to be used when making HTTP requests. +type RequestConfiguration[T any] struct { + // Request headers + Headers *RequestHeaders + // Request options + Options []RequestOption + // Query parameters + QueryParameters *T +} + +// DefaultQueryParameters is a placeholder for operations without any query parameter documented. +type DefaultQueryParameters struct { +} diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/request_headers.go b/vendor/github.com/microsoft/kiota-abstractions-go/request_headers.go index a167e4fa2b..e1523fa2e3 100644 --- a/vendor/github.com/microsoft/kiota-abstractions-go/request_headers.go +++ b/vendor/github.com/microsoft/kiota-abstractions-go/request_headers.go @@ -1,100 +1,18 @@ package abstractions -import "strings" - -//RequestHeaders represents a collection of request headers +// RequestHeaders represents a collection of request headers type RequestHeaders struct { - headers map[string]map[string]struct{} + header } -//NewRequestHeaders creates a new RequestHeaders +// NewRequestHeaders creates a new RequestHeaders func NewRequestHeaders() *RequestHeaders { return &RequestHeaders{ - headers: make(map[string]map[string]struct{}), + header{make(map[string]map[string]struct{})}, } } -func (r *RequestHeaders) normalizeHeaderKey(key string) string { - return strings.ToLower(strings.Trim(key, " ")) -} - -type void struct{} - -var voidInstance void - -//Add adds a new header or append a new value to an existing header -func (r *RequestHeaders) Add(key string, value string, additionalValues ...string) { - normalizedKey := r.normalizeHeaderKey(key) - if normalizedKey == "" || value == "" { - return - } - if r.headers == nil { - r.headers = make(map[string]map[string]struct{}) - } - if r.headers[normalizedKey] == nil { - r.headers[normalizedKey] = make(map[string]struct{}) - } - r.headers[normalizedKey][value] = voidInstance - for _, v := range additionalValues { - r.headers[normalizedKey][v] = voidInstance - } -} - -//Get returns the values for the specific header -func (r *RequestHeaders) Get(key string) []string { - if r.headers == nil { - return nil - } - normalizedKey := r.normalizeHeaderKey(key) - if r.headers[normalizedKey] == nil { - return make([]string, 0) - } - values := make([]string, 0, len(r.headers[normalizedKey])) - for k := range r.headers[normalizedKey] { - values = append(values, k) - } - return values -} - -//Remove removes the specific header and all its values -func (r *RequestHeaders) Remove(key string) { - if r.headers == nil { - return - } - normalizedKey := r.normalizeHeaderKey(key) - delete(r.headers, normalizedKey) -} - -//RemoveValue remove the value for the specific header -func (r *RequestHeaders) RemoveValue(key string, value string) { - if r.headers == nil { - return - } - normalizedKey := r.normalizeHeaderKey(key) - if r.headers[normalizedKey] == nil { - return - } - delete(r.headers[normalizedKey], value) - if len(r.headers[normalizedKey]) == 0 { - delete(r.headers, normalizedKey) - } -} - -//ContainsKey check if the key exists in the headers -func (r *RequestHeaders) ContainsKey(key string) bool { - if r.headers == nil { - return false - } - normalizedKey := r.normalizeHeaderKey(key) - return r.headers[normalizedKey] != nil -} - -//Clear clear all headers -func (r *RequestHeaders) Clear() { - r.headers = nil -} - -//AddAll adds all headers from the other RequestHeaders +// AddAll adds all headers from the other headers func (r *RequestHeaders) AddAll(other *RequestHeaders) { if other == nil || other.headers == nil { return @@ -106,14 +24,12 @@ func (r *RequestHeaders) AddAll(other *RequestHeaders) { } } -//ListKeys returns all the keys in the headers -func (r *RequestHeaders) ListKeys() []string { - if r.headers == nil { - return make([]string, 0) - } - keys := make([]string, 0, len(r.headers)) - for k := range r.headers { - keys = append(keys, k) +// TryAdd adds the header if it's not already present +func (r *RequestHeaders) TryAdd(key string, value string) bool { + if r.ContainsKey(key) { + return false } - return keys + + r.Add(key, value) + return true } diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/request_information.go b/vendor/github.com/microsoft/kiota-abstractions-go/request_information.go index 6004b3d61e..e9a0d94d52 100644 --- a/vendor/github.com/microsoft/kiota-abstractions-go/request_information.go +++ b/vendor/github.com/microsoft/kiota-abstractions-go/request_information.go @@ -1,482 +1,636 @@ -package abstractions - -import ( - "context" - "errors" - "time" - - "reflect" - "strconv" - "strings" - - u "net/url" - - "github.com/google/uuid" - s "github.com/microsoft/kiota-abstractions-go/serialization" - t "github.com/yosida95/uritemplate/v3" - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/trace" -) - -// RequestInformation represents an abstract HTTP request. -type RequestInformation struct { - // The HTTP method of the request. - Method HttpMethod - uri *u.URL - // The Request Headers. - Headers *RequestHeaders - // The Query Parameters of the request. - QueryParameters map[string]string - // The Request Body. - Content []byte - // The path parameters to use for the URL template when generating the URI. - PathParameters map[string]string - // The Url template for the current request. - UrlTemplate string - options map[string]RequestOption -} - -const raw_url_key = "request-raw-url" - -// NewRequestInformation creates a new RequestInformation object with default values. -func NewRequestInformation() *RequestInformation { - return &RequestInformation{ - Headers: NewRequestHeaders(), - QueryParameters: make(map[string]string), - options: make(map[string]RequestOption), - PathParameters: make(map[string]string), - } -} - -// GetUri returns the URI of the request. -func (request *RequestInformation) GetUri() (*u.URL, error) { - if request.uri != nil { - return request.uri, nil - } else if request.UrlTemplate == "" { - return nil, errors.New("uri cannot be empty") - } else if request.PathParameters == nil { - return nil, errors.New("uri template parameters cannot be nil") - } else if request.QueryParameters == nil { - return nil, errors.New("uri query parameters cannot be nil") - } else if request.PathParameters[raw_url_key] != "" { - uri, err := u.Parse(request.PathParameters[raw_url_key]) - if err != nil { - return nil, err - } - request.SetUri(*uri) - return request.uri, nil - } else { - _, baseurlExists := request.PathParameters["baseurl"] - if !baseurlExists && strings.Contains(strings.ToLower(request.UrlTemplate), "{+baseurl}") { - return nil, errors.New("pathParameters must contain a value for \"baseurl\" for the url to be built") - } - - uriTemplate, err := t.New(request.UrlTemplate) - if err != nil { - return nil, err - } - values := t.Values{} - varNames := uriTemplate.Varnames() - normalizedNames := make(map[string]string) - for _, varName := range varNames { - normalizedNames[strings.ToLower(varName)] = varName - } - for key, value := range request.PathParameters { - addParameterWithOriginalName(key, value, normalizedNames, values) - } - for key, value := range request.QueryParameters { - addParameterWithOriginalName(key, value, normalizedNames, values) - } - url, err := uriTemplate.Expand(values) - if err != nil { - return nil, err - } - uri, err := u.Parse(url) - return uri, err - } -} - -// addParameterWithOriginalName adds the URI template parameter to the template using the right casing, because of go conventions, casing might have changed for the generated property -func addParameterWithOriginalName(key string, value string, normalizedNames map[string]string, values t.Values) { - lowercaseKey := strings.ToLower(key) - if paramName, ok := normalizedNames[lowercaseKey]; ok { - values.Set(paramName, t.String(value)) - } else { - values.Set(key, t.String(value)) - } -} - -// SetUri updates the URI for the request from a raw URL. -func (request *RequestInformation) SetUri(url u.URL) { - request.uri = &url - for k := range request.PathParameters { - delete(request.PathParameters, k) - } - for k := range request.QueryParameters { - delete(request.QueryParameters, k) - } -} - -// AddRequestOptions adds an option to the request to be read by the middleware infrastructure. -func (request *RequestInformation) AddRequestOptions(options []RequestOption) { - if options == nil { - return - } - if request.options == nil { - request.options = make(map[string]RequestOption, len(options)) - } - for _, option := range options { - request.options[option.GetKey().Key] = option - } -} - -// GetRequestOptions returns the options for this request. Options are unique by type. If an option of the same type is added twice, the last one wins. -func (request *RequestInformation) GetRequestOptions() []RequestOption { - if request.options == nil { - return []RequestOption{} - } - result := make([]RequestOption, len(request.options)) - idx := 0 - for _, option := range request.options { - result[idx] = option - idx++ - } - return result -} - -const contentTypeHeader = "Content-Type" -const binaryContentType = "application/octet-steam" - -// SetStreamContent sets the request body to a binary stream. -func (request *RequestInformation) SetStreamContent(content []byte) { - request.Content = content - if request.Headers != nil { - request.Headers.Add(contentTypeHeader, binaryContentType) - } -} - -func (request *RequestInformation) setContentAndContentType(writer s.SerializationWriter, contentType string) error { - content, err := writer.GetSerializedContent() - if err != nil { - return err - } else if content == nil { - return errors.New("content cannot be nil") - } - request.Content = content - if request.Headers != nil { - request.Headers.Add(contentTypeHeader, contentType) - } - return nil -} - -func (request *RequestInformation) getSerializationWriter(requestAdapter RequestAdapter, contentType string, items ...interface{}) (s.SerializationWriter, error) { - if contentType == "" { - return nil, errors.New("content type cannot be empty") - } else if requestAdapter == nil { - return nil, errors.New("requestAdapter cannot be nil") - } else if len(items) == 0 { - return nil, errors.New("items cannot be nil or empty") - } - factory := requestAdapter.GetSerializationWriterFactory() - if factory == nil { - return nil, errors.New("factory cannot be nil") - } - writer, err := factory.GetSerializationWriter(contentType) - if err != nil { - return nil, err - } else if writer == nil { - return nil, errors.New("writer cannot be nil") - } else { - return writer, nil - } -} - -func (r *RequestInformation) setRequestType(result interface{}, span trace.Span) { - if result != nil { - span.SetAttributes(attribute.String("com.microsoft.kiota.request.type", reflect.TypeOf(result).String())) - } -} - -const observabilityTracerName = "github.com/microsoft/kiota-abstractions-go" - -// SetContentFromParsable sets the request body from a model with the specified content type. -func (request *RequestInformation) SetContentFromParsable(ctx context.Context, requestAdapter RequestAdapter, contentType string, item s.Parsable) error { - _, span := otel.GetTracerProvider().Tracer(observabilityTracerName).Start(ctx, "SetContentFromParsable") - defer span.End() - - writer, err := request.getSerializationWriter(requestAdapter, contentType, item) - if err != nil { - span.RecordError(err) - return err - } - defer writer.Close() - request.setRequestType(item, span) - err = writer.WriteObjectValue("", item) - if err != nil { - span.RecordError(err) - return err - } - err = request.setContentAndContentType(writer, contentType) - if err != nil { - span.RecordError(err) - return err - } - return nil -} - -// SetContentFromParsableCollection sets the request body from a model with the specified content type. -func (request *RequestInformation) SetContentFromParsableCollection(ctx context.Context, requestAdapter RequestAdapter, contentType string, items []s.Parsable) error { - _, span := otel.GetTracerProvider().Tracer(observabilityTracerName).Start(ctx, "SetContentFromParsableCollection") - defer span.End() - - writer, err := request.getSerializationWriter(requestAdapter, contentType, items) - if err != nil { - span.RecordError(err) - return err - } - defer writer.Close() - if len(items) > 0 { - request.setRequestType(items[0], span) - } - err = writer.WriteCollectionOfObjectValues("", items) - if err != nil { - span.RecordError(err) - return err - } - err = request.setContentAndContentType(writer, contentType) - if err != nil { - span.RecordError(err) - return err - } - return nil -} - -// SetContentFromScalar sets the request body from a scalar value with the specified content type. -func (request *RequestInformation) SetContentFromScalar(ctx context.Context, requestAdapter RequestAdapter, contentType string, item interface{}) error { - _, span := otel.GetTracerProvider().Tracer(observabilityTracerName).Start(ctx, "SetContentFromScalar") - defer span.End() - writer, err := request.getSerializationWriter(requestAdapter, contentType, item) - if err != nil { - span.RecordError(err) - return err - } - defer writer.Close() - request.setRequestType(item, span) - - if sv, ok := item.(*string); ok { - err = writer.WriteStringValue("", sv) - } else if bv, ok := item.(*bool); ok { - err = writer.WriteBoolValue("", bv) - } else if byv, ok := item.(*byte); ok { - err = writer.WriteByteValue("", byv) - } else if i8v, ok := item.(*int8); ok { - err = writer.WriteInt8Value("", i8v) - } else if i32v, ok := item.(*int32); ok { - err = writer.WriteInt32Value("", i32v) - } else if i64v, ok := item.(*int64); ok { - err = writer.WriteInt64Value("", i64v) - } else if f32v, ok := item.(*float32); ok { - err = writer.WriteFloat32Value("", f32v) - } else if f64v, ok := item.(*float64); ok { - err = writer.WriteFloat64Value("", f64v) - } else if uv, ok := item.(*uuid.UUID); ok { - err = writer.WriteUUIDValue("", uv) - } else if tv, ok := item.(*time.Time); ok { - err = writer.WriteTimeValue("", tv) - } else if dv, ok := item.(*s.ISODuration); ok { - err = writer.WriteISODurationValue("", dv) - } else if tov, ok := item.(*s.TimeOnly); ok { - err = writer.WriteTimeOnlyValue("", tov) - } else if dov, ok := item.(*s.DateOnly); ok { - err = writer.WriteDateOnlyValue("", dov) - } - if err != nil { - span.RecordError(err) - return err - } - err = request.setContentAndContentType(writer, contentType) - if err != nil { - span.RecordError(err) - return err - } - return nil -} - -// SetContentFromScalarCollection sets the request body from a scalar value with the specified content type. -func (request *RequestInformation) SetContentFromScalarCollection(ctx context.Context, requestAdapter RequestAdapter, contentType string, items []interface{}) error { - _, span := otel.GetTracerProvider().Tracer(observabilityTracerName).Start(ctx, "SetContentFromScalarCollection") - defer span.End() - writer, err := request.getSerializationWriter(requestAdapter, contentType, items...) - if err != nil { - span.RecordError(err) - return err - } - defer writer.Close() - if len(items) > 0 { - value := items[0] - request.setRequestType(value, span) - if _, ok := value.(string); ok { - sc := make([]string, len(items)) - for i, v := range items { - if sv, ok := v.(string); ok { - sc[i] = sv - } - } - err = writer.WriteCollectionOfStringValues("", sc) - } else if _, ok := value.(bool); ok { - bc := make([]bool, len(items)) - for i, v := range items { - if sv, ok := v.(bool); ok { - bc[i] = sv - } - } - err = writer.WriteCollectionOfBoolValues("", bc) - } else if _, ok := value.(byte); ok { - byc := make([]byte, len(items)) - for i, v := range items { - if sv, ok := v.(byte); ok { - byc[i] = sv - } - } - err = writer.WriteCollectionOfByteValues("", byc) - } else if _, ok := value.(int8); ok { - i8c := make([]int8, len(items)) - for i, v := range items { - if sv, ok := v.(int8); ok { - i8c[i] = sv - } - } - err = writer.WriteCollectionOfInt8Values("", i8c) - } else if _, ok := value.(int32); ok { - i32c := make([]int32, len(items)) - for i, v := range items { - if sv, ok := v.(int32); ok { - i32c[i] = sv - } - } - err = writer.WriteCollectionOfInt32Values("", i32c) - } else if _, ok := value.(int64); ok { - i64c := make([]int64, len(items)) - for i, v := range items { - if sv, ok := v.(int64); ok { - i64c[i] = sv - } - } - err = writer.WriteCollectionOfInt64Values("", i64c) - } else if _, ok := value.(float32); ok { - f32c := make([]float32, len(items)) - for i, v := range items { - if sv, ok := v.(float32); ok { - f32c[i] = sv - } - } - err = writer.WriteCollectionOfFloat32Values("", f32c) - } else if _, ok := value.(float64); ok { - f64c := make([]float64, len(items)) - for i, v := range items { - if sv, ok := v.(float64); ok { - f64c[i] = sv - } - } - err = writer.WriteCollectionOfFloat64Values("", f64c) - } else if _, ok := value.(uuid.UUID); ok { - uc := make([]uuid.UUID, len(items)) - for i, v := range items { - if sv, ok := v.(uuid.UUID); ok { - uc[i] = sv - } - } - err = writer.WriteCollectionOfUUIDValues("", uc) - } else if _, ok := value.(time.Time); ok { - tc := make([]time.Time, len(items)) - for i, v := range items { - if sv, ok := v.(time.Time); ok { - tc[i] = sv - } - } - err = writer.WriteCollectionOfTimeValues("", tc) - } else if _, ok := value.(s.ISODuration); ok { - dc := make([]s.ISODuration, len(items)) - for i, v := range items { - if sv, ok := v.(s.ISODuration); ok { - dc[i] = sv - } - } - err = writer.WriteCollectionOfISODurationValues("", dc) - } else if _, ok := value.(s.TimeOnly); ok { - toc := make([]s.TimeOnly, len(items)) - for i, v := range items { - if sv, ok := v.(s.TimeOnly); ok { - toc[i] = sv - } - } - err = writer.WriteCollectionOfTimeOnlyValues("", toc) - } else if _, ok := value.(s.DateOnly); ok { - doc := make([]s.DateOnly, len(items)) - for i, v := range items { - if sv, ok := v.(s.DateOnly); ok { - doc[i] = sv - } - } - err = writer.WriteCollectionOfDateOnlyValues("", doc) - } else if _, ok := value.(byte); ok { - ba := make([]byte, len(items)) - for i, v := range items { - if sv, ok := v.(byte); ok { - ba[i] = sv - } - } - err = writer.WriteByteArrayValue("", ba) - } - } - if err != nil { - span.RecordError(err) - return err - } - err = request.setContentAndContentType(writer, contentType) - if err != nil { - span.RecordError(err) - return err - } - return nil -} - -// AddQueryParameters adds the query parameters to the request by reading the properties from the provided object. -func (request *RequestInformation) AddQueryParameters(source interface{}) { - if source == nil || request == nil { - return - } - valOfP := reflect.ValueOf(source) - fields := reflect.TypeOf(source) - numOfFields := fields.NumField() - for i := 0; i < numOfFields; i++ { - field := fields.Field(i) - fieldName := field.Name - fieldValue := valOfP.Field(i) - tagValue := field.Tag.Get("uriparametername") - if tagValue != "" { - fieldName = tagValue - } - value := fieldValue.Interface() - if value == nil { - continue - } - str, ok := value.(*string) - if ok && str != nil && *str != "" { - request.QueryParameters[fieldName] = *str - } - bl, ok := value.(*bool) - if ok && bl != nil { - request.QueryParameters[fieldName] = strconv.FormatBool(*bl) - } - it, ok := value.(*int32) - if ok && it != nil { - request.QueryParameters[fieldName] = strconv.FormatInt(int64(*it), 10) - } - arr, ok := value.([]string) - if ok && len(arr) > 0 { - request.QueryParameters[fieldName] = strings.Join(arr, ",") - } - } -} +package abstractions + +import ( + "context" + "errors" + "time" + + "reflect" + "strconv" + "strings" + + u "net/url" + + "github.com/google/uuid" + s "github.com/microsoft/kiota-abstractions-go/serialization" + stduritemplate "github.com/std-uritemplate/std-uritemplate/go/v2" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/trace" +) + +// RequestInformation represents an abstract HTTP request. +type RequestInformation struct { + // The HTTP method of the request. + Method HttpMethod + uri *u.URL + // The Request Headers. + Headers *RequestHeaders + // The Query Parameters of the request. + // Deprecated: use QueryParametersAny instead + QueryParameters map[string]string + // The Query Parameters of the request. + QueryParametersAny map[string]any + // The Request Body. + Content []byte + // The path parameters to use for the URL template when generating the URI. + // Deprecated: use PathParametersAny instead + PathParameters map[string]string + // The path parameters to use for the URL template when generating the URI. + PathParametersAny map[string]any + // The Url template for the current request. + UrlTemplate string + options map[string]RequestOption +} + +const raw_url_key = "request-raw-url" + +// NewRequestInformation creates a new RequestInformation object with default values. +func NewRequestInformation() *RequestInformation { + return &RequestInformation{ + Headers: NewRequestHeaders(), + QueryParameters: make(map[string]string), + QueryParametersAny: make(map[string]any), + options: make(map[string]RequestOption), + PathParameters: make(map[string]string), + PathParametersAny: make(map[string]any), + } +} + +// NewRequestInformationWithMethodAndUrlTemplateAndPathParameters creates a new RequestInformation object with the specified method and URL template and path parameters. +func NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(method HttpMethod, urlTemplate string, pathParameters map[string]string) *RequestInformation { + value := NewRequestInformation() + value.Method = method + value.UrlTemplate = urlTemplate + value.PathParameters = pathParameters + return value +} +func ConfigureRequestInformation[T any](request *RequestInformation, config *RequestConfiguration[T]) { + if request == nil { + return + } + if config == nil { + return + } + if config.QueryParameters != nil { + request.AddQueryParameters(*(config.QueryParameters)) + } + request.Headers.AddAll(config.Headers) + request.AddRequestOptions(config.Options) +} + +// GetUri returns the URI of the request. +func (request *RequestInformation) GetUri() (*u.URL, error) { + if request.uri != nil { + return request.uri, nil + } else if request.UrlTemplate == "" { + return nil, errors.New("uri cannot be empty") + } else if request.PathParameters == nil { + return nil, errors.New("uri template parameters cannot be nil") + } else if request.QueryParameters == nil { + return nil, errors.New("uri query parameters cannot be nil") + } else if request.QueryParametersAny == nil { + return nil, errors.New("uri query parameters cannot be nil") + } else if request.PathParameters[raw_url_key] != "" { + uri, err := u.Parse(request.PathParameters[raw_url_key]) + if err != nil { + return nil, err + } + request.SetUri(*uri) + return request.uri, nil + } else { + _, baseurlExists := request.PathParameters["baseurl"] + if !baseurlExists && strings.Contains(strings.ToLower(request.UrlTemplate), "{+baseurl}") { + return nil, errors.New("pathParameters must contain a value for \"baseurl\" for the url to be built") + } + + substitutions := make(map[string]any) + for key, value := range request.PathParameters { + substitutions[key] = request.sanitizeValue(value) + } + for key, value := range request.PathParametersAny { + substitutions[key] = request.normalizeParameters(reflect.ValueOf(value), request.sanitizeValue(value), false) + } + for key, value := range request.QueryParameters { + substitutions[key] = request.sanitizeValue(value) + } + for key, value := range request.QueryParametersAny { + substitutions[key] = request.sanitizeValue(value) + } + url, err := stduritemplate.Expand(request.UrlTemplate, substitutions) + if err != nil { + return nil, err + } + uri, err := u.Parse(url) + return uri, err + } +} + +func castItem[T any, R interface{}](collection []T, mutator func(t T) R) []R { + if len(collection) > 0 { + cast := make([]R, len(collection)) + for i, v := range collection { + cast[i] = mutator(v) + } + return cast + } + return nil +} + +func (request *RequestInformation) sanitizeValue(value any) any { + if value == nil { + return nil + } + + switch v := value.(type) { + case *time.Time: + return v.Format(time.RFC3339) + case time.Time: + return v.Format(time.RFC3339) + case []*time.Time: + return castItem(v, func(t *time.Time) string { + return t.Format(time.RFC3339) + }) + case []time.Time: + return castItem(v, func(t time.Time) string { + return t.Format(time.RFC3339) + }) + case *s.ISODuration: + return v.String() + case s.ISODuration: + return v.String() + case []*s.ISODuration: + return castItem(v, func(v *s.ISODuration) string { + return v.String() + }) + case []s.ISODuration: + return castItem(v, func(v s.ISODuration) string { + return v.String() + }) + case *s.TimeOnly: + return v.String() + case s.TimeOnly: + return v.String() + case []*s.TimeOnly: + return castItem(v, func(v *s.TimeOnly) string { + return v.String() + }) + case []s.TimeOnly: + return castItem(v, func(v s.TimeOnly) string { + return v.String() + }) + case *s.DateOnly: + return v.String() + case s.DateOnly: + return v.String() + case []*s.DateOnly: + return castItem(v, func(v *s.DateOnly) string { + return v.String() + }) + case []s.DateOnly: + return castItem(v, func(v s.DateOnly) string { + return v.String() + }) + } + + return value +} + +// SetUri updates the URI for the request from a raw URL. +func (request *RequestInformation) SetUri(url u.URL) { + request.uri = &url + for k := range request.PathParameters { + delete(request.PathParameters, k) + } + for k := range request.QueryParameters { + delete(request.QueryParameters, k) + } + for k := range request.QueryParametersAny { + delete(request.QueryParametersAny, k) + } +} + +// AddRequestOptions adds an option to the request to be read by the middleware infrastructure. +func (request *RequestInformation) AddRequestOptions(options []RequestOption) { + if options == nil { + return + } + if request.options == nil { + request.options = make(map[string]RequestOption, len(options)) + } + for _, option := range options { + request.options[option.GetKey().Key] = option + } +} + +// GetRequestOptions returns the options for this request. Options are unique by type. If an option of the same type is added twice, the last one wins. +func (request *RequestInformation) GetRequestOptions() []RequestOption { + if request.options == nil { + return []RequestOption{} + } + result := make([]RequestOption, len(request.options)) + idx := 0 + for _, option := range request.options { + result[idx] = option + idx++ + } + return result +} + +const contentTypeHeader = "Content-Type" +const binaryContentType = "application/octet-stream" + +// SetStreamContent sets the request body to a binary stream. +// Deprecated: Use SetStreamContentAndContentType instead. +func (request *RequestInformation) SetStreamContent(content []byte) { + request.SetStreamContentAndContentType(content, binaryContentType) +} + +// SetStreamContentAndContentType sets the request body to a binary stream with the specified content type. +func (request *RequestInformation) SetStreamContentAndContentType(content []byte, contentType string) { + request.Content = content + if request.Headers != nil { + request.Headers.Add(contentTypeHeader, contentType) + } +} + +func (request *RequestInformation) setContentAndContentType(writer s.SerializationWriter, contentType string) error { + content, err := writer.GetSerializedContent() + if err != nil { + return err + } else if content == nil { + return errors.New("content cannot be nil") + } + request.Content = content + if request.Headers != nil { + request.Headers.TryAdd(contentTypeHeader, contentType) + } + return nil +} + +func (request *RequestInformation) getSerializationWriter(requestAdapter RequestAdapter, contentType string, items ...interface{}) (s.SerializationWriter, error) { + if contentType == "" { + return nil, errors.New("content type cannot be empty") + } else if requestAdapter == nil { + return nil, errors.New("requestAdapter cannot be nil") + } else if len(items) == 0 { + return nil, errors.New("items cannot be nil or empty") + } + factory := requestAdapter.GetSerializationWriterFactory() + if factory == nil { + return nil, errors.New("factory cannot be nil") + } + writer, err := factory.GetSerializationWriter(contentType) + if err != nil { + return nil, err + } else if writer == nil { + return nil, errors.New("writer cannot be nil") + } else { + return writer, nil + } +} + +func (r *RequestInformation) setRequestType(result interface{}, span trace.Span) { + if result != nil { + span.SetAttributes(attribute.String("com.microsoft.kiota.request.type", reflect.TypeOf(result).String())) + } +} + +const observabilityTracerName = "github.com/microsoft/kiota-abstractions-go" + +// SetContentFromParsable sets the request body from a model with the specified content type. +func (request *RequestInformation) SetContentFromParsable(ctx context.Context, requestAdapter RequestAdapter, contentType string, item s.Parsable) error { + _, span := otel.GetTracerProvider().Tracer(observabilityTracerName).Start(ctx, "SetContentFromParsable") + defer span.End() + + writer, err := request.getSerializationWriter(requestAdapter, contentType, item) + if err != nil { + span.RecordError(err) + return err + } + defer writer.Close() + if multipartBody, ok := item.(MultipartBody); ok { + contentType += "; boundary=" + multipartBody.GetBoundary() + multipartBody.SetRequestAdapter(requestAdapter) + } + request.setRequestType(item, span) + err = writer.WriteObjectValue("", item) + if err != nil { + span.RecordError(err) + return err + } + err = request.setContentAndContentType(writer, contentType) + if err != nil { + span.RecordError(err) + return err + } + return nil +} + +// SetContentFromParsableCollection sets the request body from a model with the specified content type. +func (request *RequestInformation) SetContentFromParsableCollection(ctx context.Context, requestAdapter RequestAdapter, contentType string, items []s.Parsable) error { + _, span := otel.GetTracerProvider().Tracer(observabilityTracerName).Start(ctx, "SetContentFromParsableCollection") + defer span.End() + + writer, err := request.getSerializationWriter(requestAdapter, contentType, items) + if err != nil { + span.RecordError(err) + return err + } + defer writer.Close() + if len(items) > 0 { + request.setRequestType(items[0], span) + } + err = writer.WriteCollectionOfObjectValues("", items) + if err != nil { + span.RecordError(err) + return err + } + err = request.setContentAndContentType(writer, contentType) + if err != nil { + span.RecordError(err) + return err + } + return nil +} + +// SetContentFromScalar sets the request body from a scalar value with the specified content type. +func (request *RequestInformation) SetContentFromScalar(ctx context.Context, requestAdapter RequestAdapter, contentType string, item interface{}) error { + _, span := otel.GetTracerProvider().Tracer(observabilityTracerName).Start(ctx, "SetContentFromScalar") + defer span.End() + writer, err := request.getSerializationWriter(requestAdapter, contentType, item) + if err != nil { + span.RecordError(err) + return err + } + defer writer.Close() + request.setRequestType(item, span) + + if sv, ok := item.(*string); ok { + err = writer.WriteStringValue("", sv) + } else if bv, ok := item.(*bool); ok { + err = writer.WriteBoolValue("", bv) + } else if byv, ok := item.(*byte); ok { + err = writer.WriteByteValue("", byv) + } else if i8v, ok := item.(*int8); ok { + err = writer.WriteInt8Value("", i8v) + } else if i32v, ok := item.(*int32); ok { + err = writer.WriteInt32Value("", i32v) + } else if i64v, ok := item.(*int64); ok { + err = writer.WriteInt64Value("", i64v) + } else if f32v, ok := item.(*float32); ok { + err = writer.WriteFloat32Value("", f32v) + } else if f64v, ok := item.(*float64); ok { + err = writer.WriteFloat64Value("", f64v) + } else if uv, ok := item.(*uuid.UUID); ok { + err = writer.WriteUUIDValue("", uv) + } else if tv, ok := item.(*time.Time); ok { + err = writer.WriteTimeValue("", tv) + } else if dv, ok := item.(*s.ISODuration); ok { + err = writer.WriteISODurationValue("", dv) + } else if tov, ok := item.(*s.TimeOnly); ok { + err = writer.WriteTimeOnlyValue("", tov) + } else if dov, ok := item.(*s.DateOnly); ok { + err = writer.WriteDateOnlyValue("", dov) + } + if err != nil { + span.RecordError(err) + return err + } + err = request.setContentAndContentType(writer, contentType) + if err != nil { + span.RecordError(err) + return err + } + return nil +} + +// SetContentFromScalarCollection sets the request body from a scalar value with the specified content type. +func (request *RequestInformation) SetContentFromScalarCollection(ctx context.Context, requestAdapter RequestAdapter, contentType string, items []interface{}) error { + _, span := otel.GetTracerProvider().Tracer(observabilityTracerName).Start(ctx, "SetContentFromScalarCollection") + defer span.End() + writer, err := request.getSerializationWriter(requestAdapter, contentType, items...) + if err != nil { + span.RecordError(err) + return err + } + defer writer.Close() + if len(items) > 0 { + value := items[0] + request.setRequestType(value, span) + if _, ok := value.(string); ok { + sc := make([]string, len(items)) + for i, v := range items { + if sv, ok := v.(string); ok { + sc[i] = sv + } + } + err = writer.WriteCollectionOfStringValues("", sc) + } else if _, ok := value.(bool); ok { + bc := make([]bool, len(items)) + for i, v := range items { + if sv, ok := v.(bool); ok { + bc[i] = sv + } + } + err = writer.WriteCollectionOfBoolValues("", bc) + } else if _, ok := value.(byte); ok { + byc := make([]byte, len(items)) + for i, v := range items { + if sv, ok := v.(byte); ok { + byc[i] = sv + } + } + err = writer.WriteCollectionOfByteValues("", byc) + } else if _, ok := value.(int8); ok { + i8c := make([]int8, len(items)) + for i, v := range items { + if sv, ok := v.(int8); ok { + i8c[i] = sv + } + } + err = writer.WriteCollectionOfInt8Values("", i8c) + } else if _, ok := value.(int32); ok { + i32c := make([]int32, len(items)) + for i, v := range items { + if sv, ok := v.(int32); ok { + i32c[i] = sv + } + } + err = writer.WriteCollectionOfInt32Values("", i32c) + } else if _, ok := value.(int64); ok { + i64c := make([]int64, len(items)) + for i, v := range items { + if sv, ok := v.(int64); ok { + i64c[i] = sv + } + } + err = writer.WriteCollectionOfInt64Values("", i64c) + } else if _, ok := value.(float32); ok { + f32c := make([]float32, len(items)) + for i, v := range items { + if sv, ok := v.(float32); ok { + f32c[i] = sv + } + } + err = writer.WriteCollectionOfFloat32Values("", f32c) + } else if _, ok := value.(float64); ok { + f64c := make([]float64, len(items)) + for i, v := range items { + if sv, ok := v.(float64); ok { + f64c[i] = sv + } + } + err = writer.WriteCollectionOfFloat64Values("", f64c) + } else if _, ok := value.(uuid.UUID); ok { + uc := make([]uuid.UUID, len(items)) + for i, v := range items { + if sv, ok := v.(uuid.UUID); ok { + uc[i] = sv + } + } + err = writer.WriteCollectionOfUUIDValues("", uc) + } else if _, ok := value.(time.Time); ok { + tc := make([]time.Time, len(items)) + for i, v := range items { + if sv, ok := v.(time.Time); ok { + tc[i] = sv + } + } + err = writer.WriteCollectionOfTimeValues("", tc) + } else if _, ok := value.(s.ISODuration); ok { + dc := make([]s.ISODuration, len(items)) + for i, v := range items { + if sv, ok := v.(s.ISODuration); ok { + dc[i] = sv + } + } + err = writer.WriteCollectionOfISODurationValues("", dc) + } else if _, ok := value.(s.TimeOnly); ok { + toc := make([]s.TimeOnly, len(items)) + for i, v := range items { + if sv, ok := v.(s.TimeOnly); ok { + toc[i] = sv + } + } + err = writer.WriteCollectionOfTimeOnlyValues("", toc) + } else if _, ok := value.(s.DateOnly); ok { + doc := make([]s.DateOnly, len(items)) + for i, v := range items { + if sv, ok := v.(s.DateOnly); ok { + doc[i] = sv + } + } + err = writer.WriteCollectionOfDateOnlyValues("", doc) + } else if _, ok := value.(byte); ok { + ba := make([]byte, len(items)) + for i, v := range items { + if sv, ok := v.(byte); ok { + ba[i] = sv + } + } + err = writer.WriteByteArrayValue("", ba) + } + } + if err != nil { + span.RecordError(err) + return err + } + err = request.setContentAndContentType(writer, contentType) + if err != nil { + span.RecordError(err) + return err + } + return nil +} + +// AddQueryParameters adds the query parameters to the request by reading the properties from the provided object. +func (request *RequestInformation) AddQueryParameters(source any) { + if source == nil || request == nil { + return + } + valOfP := reflect.ValueOf(source) + fields := reflect.TypeOf(source) + numOfFields := fields.NumField() + for i := 0; i < numOfFields; i++ { + field := fields.Field(i) + fieldName := field.Name + fieldValue := valOfP.Field(i) + tagValue := field.Tag.Get("uriparametername") + if tagValue != "" { + fieldName = tagValue + } + value := request.sanitizeValue(fieldValue.Interface()) + valueOfValue := reflect.ValueOf(value) + if valueOfValue.IsNil() { + continue + } + str, ok := value.(*string) + if ok && str != nil { + request.QueryParameters[fieldName] = *str + } + bl, ok := value.(*bool) + if ok && bl != nil { + request.QueryParameters[fieldName] = strconv.FormatBool(*bl) + } + it, ok := value.(*int32) + if ok && it != nil { + request.QueryParameters[fieldName] = strconv.FormatInt(int64(*it), 10) + } + strArr, ok := value.([]string) + if ok && len(strArr) > 0 { + // populating both query parameter fields to avoid breaking compatibility with code reading this field + request.QueryParameters[fieldName] = strings.Join(strArr, ",") + + tmp := make([]any, len(strArr)) + for i, v := range strArr { + tmp[i] = v + } + request.QueryParametersAny[fieldName] = tmp + } + if arr, ok := value.([]any); ok && len(arr) > 0 { + request.QueryParametersAny[fieldName] = arr + } + normalizedValue := request.normalizeParameters(valueOfValue, value, true) + if normalizedValue != nil { + request.QueryParametersAny[fieldName] = normalizedValue + } + } +} + +// Normalize different types to values that can be rendered in an URL: +// enum -> string (name) +// []enum -> []string (containing names) +// []non_interface -> []any (like []int64 -> []any) +func (request *RequestInformation) normalizeParameters(valueOfValue reflect.Value, value any, returnNilIfNotNormalizable bool) any { + if valueOfValue.Kind() == reflect.Slice && valueOfValue.Len() > 0 { + //type assertions to "enums" don't work if you don't know the enum type in advance, we need to use reflection + enumArr := valueOfValue.Slice(0, valueOfValue.Len()) + if _, ok := enumArr.Index(0).Interface().(kiotaEnum); ok { + // testing the first value is an enum to avoid iterating over the whole array if it's not + strRepresentations := make([]string, valueOfValue.Len()) + for i := range strRepresentations { + strRepresentations[i] = enumArr.Index(i).Interface().(kiotaEnum).String() + } + return strRepresentations + } else { + anySlice := make([]any, valueOfValue.Len()) + for i := range anySlice { + anySlice[i] = enumArr.Index(i).Interface() + } + return anySlice + } + } else if enum, ok := value.(kiotaEnum); ok { + return enum.String() + } + + if returnNilIfNotNormalizable { + return nil + } else { + return value + } +} + +type kiotaEnum interface { + String() string +} diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/response_headers.go b/vendor/github.com/microsoft/kiota-abstractions-go/response_headers.go new file mode 100644 index 0000000000..9aaad74873 --- /dev/null +++ b/vendor/github.com/microsoft/kiota-abstractions-go/response_headers.go @@ -0,0 +1,25 @@ +package abstractions + +//ResponseHeaders represents a collection of response headers +type ResponseHeaders struct { + header +} + +//NewResponseHeaders creates a new ResponseHeaders +func NewResponseHeaders() *ResponseHeaders { + return &ResponseHeaders{ + header{make(map[string]map[string]struct{})}, + } +} + +//AddAll adds all headers from the other headers +func (r *ResponseHeaders) AddAll(other *ResponseHeaders) { + if other == nil || other.headers == nil { + return + } + for k, v := range other.headers { + for k2 := range v { + r.Add(k, k2) + } + } +} diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/serialization/composed_type_wrapper.go b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/composed_type_wrapper.go new file mode 100644 index 0000000000..8cef8dce34 --- /dev/null +++ b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/composed_type_wrapper.go @@ -0,0 +1,7 @@ +package serialization + +// ComposedTypeWrapper defines a contract for models that are wrappers for composed types. +type ComposedTypeWrapper interface { + // GetIsComposedType returns true if the type is composed, false otherwise. + GetIsComposedType() bool +} diff --git a/vendor/github.com/cjlapao/common-go/duration/main.go b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/duration.go similarity index 71% rename from vendor/github.com/cjlapao/common-go/duration/main.go rename to vendor/github.com/microsoft/kiota-abstractions-go/serialization/duration.go index f93d27b954..1ad612f99e 100644 --- a/vendor/github.com/cjlapao/common-go/duration/main.go +++ b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/duration.go @@ -1,5 +1,6 @@ -// Package duration provides a partial implementation of ISO8601 durations. (no months) -package duration +// duration provides a partial implementation of ISO8601 durations. (no months) + +package serialization import ( "bytes" @@ -8,25 +9,22 @@ import ( "math" "regexp" "strconv" - "text/template" "time" ) var ( - // ErrBadFormat is returned when parsing fails - ErrBadFormat = errors.New("bad format string") - - ErrWeeksNotWithYearsOrMonth = errors.New("weeks are not allowed with years or months") + // errBadFormat is returned when parsing fails + errBadFormat = errors.New("bad format string") - ErrMonthsInDurationUseOverload = errors.New("months are not allowed with the ToDuration method, use the overload instead") + errWeeksNotWithYearsOrMonth = errors.New("weeks are not allowed with years or months") - tmpl = template.Must(template.New("duration").Parse(`P{{if .Years}}{{.Years}}Y{{end}}{{if .Months}}{{.Months}}M{{end}}{{if .Weeks}}{{.Weeks}}W{{end}}{{if .Days}}{{.Days}}D{{end}}{{if .HasTimePart}}T{{end }}{{if .Hours}}{{.Hours}}H{{end}}{{if .Minutes}}{{.Minutes}}M{{end}}{{if .Seconds}}{{.Seconds}}S{{end}}`)) + errMonthsInDurationUseOverload = errors.New("months are not allowed with the ToDuration method, use the overload instead") full = regexp.MustCompile(`P((?P\d+)Y)?((?P\d+)M)?((?P\d+)D)?(T((?P\d+)H)?((?P\d+)M)?((?P\d+(?:\.\d+))S)?)?`) week = regexp.MustCompile(`P((?P\d+)W)`) ) -type Duration struct { +type duration struct { Years int Months int Weeks int @@ -37,7 +35,7 @@ type Duration struct { MilliSeconds int } -func FromString(dur string) (*Duration, error) { +func durationFromString(dur string) (*duration, error) { var ( match []string re *regexp.Regexp @@ -50,10 +48,10 @@ func FromString(dur string) (*Duration, error) { match = full.FindStringSubmatch(dur) re = full } else { - return nil, ErrBadFormat + return nil, errBadFormat } - d := &Duration{} + d := &duration{} for i, name := range re.SubexpNames() { part := match[i] @@ -93,18 +91,39 @@ func FromString(dur string) (*Duration, error) { } // String prints out the value passed in. -func (d *Duration) String() string { +func (d *duration) string() string { var s bytes.Buffer - err := d.Normalize() + err := d.normalize() if err != nil { panic(err) } - err = tmpl.Execute(&s, d) - if err != nil { - panic(err) + s.WriteString("P") + if d.Years > 0 { + s.WriteString(fmt.Sprintf("%dY", d.Years)) + } + if d.Months > 0 { + s.WriteString(fmt.Sprintf("%dM", d.Months)) + } + if d.Weeks > 0 { + s.WriteString(fmt.Sprintf("%dW", d.Weeks)) + } + if d.Days > 0 { + s.WriteString(fmt.Sprintf("%dD", d.Days)) + } + if d.hasTimePart() { + s.WriteString("T") + if d.Hours > 0 { + s.WriteString(fmt.Sprintf("%dH", d.Hours)) + } + if d.Minutes > 0 { + s.WriteString(fmt.Sprintf("%dM", d.Minutes)) + } + if d.Seconds > 0 { + s.WriteString(fmt.Sprintf("%dS", d.Seconds)) + } } return s.String() @@ -114,7 +133,7 @@ func (d *Duration) String() string { // e.g. if you have a duration of 10 day, 25 hour, and 61 minute, it will be normalized to 1 week 5 days, 2 hours, and 1 minute. // this function does not normalize days to months, weeks to months or weeks to years as they do not always convert with the same value. // it also won't normalize days to weeks if months or years are present, and will return an error if the value is invalid -func (d *Duration) Normalize() error { +func (d *duration) normalize() error { msToS := 1000 StoM := 60 MtoH := 60 @@ -147,7 +166,7 @@ func (d *Duration) Normalize() error { } if d.Weeks != 0 && (d.Years != 0 || d.Months != 0) { - return ErrWeeksNotWithYearsOrMonth + return errWeeksNotWithYearsOrMonth } return nil @@ -156,25 +175,25 @@ func (d *Duration) Normalize() error { // a year is not always 52 weeks, so we don't normalize that } -func (d *Duration) HasTimePart() bool { +func (d *duration) hasTimePart() bool { return d.Hours != 0 || d.Minutes != 0 || d.Seconds != 0 } -func (d *Duration) ToDuration() (time.Duration, error) { +func (d *duration) toDuration() (time.Duration, error) { if d.Months != 0 { - return 0, ErrMonthsInDurationUseOverload + return 0, errMonthsInDurationUseOverload } - return d.ToDurationWithMonths(31) + return d.toDurationWithMonths(31) } -func (d *Duration) ToDurationWithMonths(daysInAMonth int) (time.Duration, error) { +func (d *duration) toDurationWithMonths(daysInAMonth int) (time.Duration, error) { day := time.Hour * 24 year := day * 365 month := day * time.Duration(daysInAMonth) tot := time.Duration(0) - err := d.Normalize() + err := d.normalize() if err != nil { return tot, err } diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/serialization/iso_duration.go b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/iso_duration.go index c06546c1e2..a287d3f509 100644 --- a/vendor/github.com/microsoft/kiota-abstractions-go/serialization/iso_duration.go +++ b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/iso_duration.go @@ -2,13 +2,11 @@ package serialization import ( "time" - - cjl "github.com/cjlapao/common-go/duration" ) // ISODuration represents an ISO 8601 duration type ISODuration struct { - duration cjl.Duration + duration duration } // GetYears returns the number of years. @@ -83,7 +81,7 @@ func (i ISODuration) SetMilliSeconds(milliSeconds int) { // ParseISODuration parses a string into an ISODuration following the ISO 8601 standard. func ParseISODuration(s string) (*ISODuration, error) { - d, err := cjl.FromString(s) + d, err := durationFromString(s) if err != nil { return nil, err } @@ -95,7 +93,7 @@ func ParseISODuration(s string) (*ISODuration, error) { // NewISODuration creates a new ISODuration from primitive values. func NewDuration(years int, weeks int, days int, hours int, minutes int, seconds int, milliSeconds int) *ISODuration { return &ISODuration{ - duration: cjl.Duration{ + duration: duration{ Years: years, Weeks: weeks, Days: days, @@ -109,7 +107,7 @@ func NewDuration(years int, weeks int, days int, hours int, minutes int, seconds // String returns the ISO 8601 representation of the duration. func (i ISODuration) String() string { - return i.duration.String() + return i.duration.string() } // FromDuration returns an ISODuration from a time.Duration. @@ -119,5 +117,5 @@ func FromDuration(d time.Duration) *ISODuration { // ToDuration returns the time.Duration representation of the ISODuration. func (d ISODuration) ToDuration() (time.Duration, error) { - return d.duration.ToDuration() + return d.duration.toDuration() } diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/serialization/kiota_json_serializer.go b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/kiota_json_serializer.go new file mode 100644 index 0000000000..80aa59ef79 --- /dev/null +++ b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/kiota_json_serializer.go @@ -0,0 +1,23 @@ +package serialization + +var jsonContentType = "application/json" + +// SerializeToJson serializes the given model to JSON +func SerializeToJson(model Parsable) ([]byte, error) { + return Serialize(jsonContentType, model) +} + +// SerializeCollectionToJson serializes the given models to JSON +func SerializeCollectionToJson(models []Parsable) ([]byte, error) { + return SerializeCollection(jsonContentType, models) +} + +// DeserializeFromJson deserializes the given JSON to a model +func DeserializeFromJson(content []byte, parsableFactory ParsableFactory) (Parsable, error) { + return Deserialize(jsonContentType, content, parsableFactory) +} + +// DeserializeCollectionFromJson deserializes the given JSON to a collection of models +func DeserializeCollectionFromJson(content []byte, parsableFactory ParsableFactory) ([]Parsable, error) { + return DeserializeCollection(jsonContentType, content, parsableFactory) +} diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/serialization/kiota_serializer.go b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/kiota_serializer.go new file mode 100644 index 0000000000..7cc44c6003 --- /dev/null +++ b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/kiota_serializer.go @@ -0,0 +1,88 @@ +package serialization + +import ( + "errors" +) + +// Serialize serializes the given model into a byte array. +func Serialize(contentType string, model Parsable) ([]byte, error) { + writer, err := getSerializationWriter(contentType, model) + if err != nil { + return nil, err + } + defer writer.Close() + err = writer.WriteObjectValue("", model) + if err != nil { + return nil, err + } + return writer.GetSerializedContent() +} + +// SerializeCollection serializes the given models into a byte array. +func SerializeCollection(contentType string, models []Parsable) ([]byte, error) { + writer, err := getSerializationWriter(contentType, models) + if err != nil { + return nil, err + } + defer writer.Close() + err = writer.WriteCollectionOfObjectValues("", models) + if err != nil { + return nil, err + } + return writer.GetSerializedContent() +} +func getSerializationWriter(contentType string, value interface{}) (SerializationWriter, error) { + if contentType == "" { + return nil, errors.New("the content type is empty") + } + if value == nil { + return nil, errors.New("the value is empty") + } + writer, err := DefaultSerializationWriterFactoryInstance.GetSerializationWriter(contentType) + if err != nil { + return nil, err + } + return writer, nil +} + +// Deserialize deserializes the given byte array into a model. +func Deserialize(contentType string, content []byte, parsableFactory ParsableFactory) (Parsable, error) { + node, err := getParseNode(contentType, content, parsableFactory) + if err != nil { + return nil, err + } + result, err := node.GetObjectValue(parsableFactory) + if err != nil { + return nil, err + } + return result, nil +} +func getParseNode(contentType string, content []byte, parsableFactory ParsableFactory) (ParseNode, error) { + if contentType == "" { + return nil, errors.New("the content type is empty") + } + if content == nil || len(content) == 0 { + return nil, errors.New("the content is empty") + } + if parsableFactory == nil { + return nil, errors.New("the parsable factory is empty") + } + node, err := DefaultParseNodeFactoryInstance.GetRootParseNode(contentType, content) + if err != nil { + return nil, err + } + return node, nil +} + +// DeserializeCollection deserializes the given byte array into a collection of models. +func DeserializeCollection(contentType string, content []byte, parsableFactory ParsableFactory) ([]Parsable, error) { + node, err := getParseNode(contentType, content, parsableFactory) + if err != nil { + return nil, err + } + result, err := node.GetCollectionOfObjectValues(parsableFactory) + if err != nil { + return nil, err + } + return result, nil +} diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/serialization/parse_node.go b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/parse_node.go index a1f0ba7243..35f9a26a1e 100644 --- a/vendor/github.com/microsoft/kiota-abstractions-go/serialization/parse_node.go +++ b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/parse_node.go @@ -6,7 +6,7 @@ import ( "github.com/google/uuid" ) -// ParseNode Interface for a deserialization node in a parse tree. This interace provides an abstraction layer over serialization formats, libraries and implementations. +// ParseNode Interface for a deserialization node in a parse tree. This interface provides an abstraction layer over serialization formats, libraries and implementations. type ParseNode interface { // GetChildNode returns a new parse node for the given identifier. GetChildNode(index string) (ParseNode, error) diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/serialization/parse_node_factory_registry.go b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/parse_node_factory_registry.go index 3365b8c0dc..4230b4f837 100644 --- a/vendor/github.com/microsoft/kiota-abstractions-go/serialization/parse_node_factory_registry.go +++ b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/parse_node_factory_registry.go @@ -1,45 +1,64 @@ -package serialization - -import ( - "errors" - re "regexp" - "strings" -) - -// ParseNodeFactoryRegistry holds a list of all the registered factories for the various types of nodes. -type ParseNodeFactoryRegistry struct { - ContentTypeAssociatedFactories map[string]ParseNodeFactory -} - -// DefaultParseNodeFactoryInstance is the default singleton instance of the registry to be used when registering new factories that should be available by default. -var DefaultParseNodeFactoryInstance = &ParseNodeFactoryRegistry{ - ContentTypeAssociatedFactories: make(map[string]ParseNodeFactory), -} - -// GetValidContentType returns the valid content type for the ParseNodeFactoryRegistry -func (m *ParseNodeFactoryRegistry) GetValidContentType() (string, error) { - return "", errors.New("the registry supports multiple content types. Get the registered factory instead") -} - -var contentTypeVendorCleanupPattern = re.MustCompile("[^/]+\\+") - -// GetRootParseNode returns a new ParseNode instance that is the root of the content -func (m *ParseNodeFactoryRegistry) GetRootParseNode(contentType string, content []byte) (ParseNode, error) { - if contentType == "" { - return nil, errors.New("contentType is required") - } - if content == nil { - return nil, errors.New("content is required") - } - vendorSpecificContentType := strings.Split(contentType, ";")[0] - factory, ok := m.ContentTypeAssociatedFactories[vendorSpecificContentType] - if ok { - return factory.GetRootParseNode(vendorSpecificContentType, content) - } - cleanedContentType := contentTypeVendorCleanupPattern.ReplaceAllString(vendorSpecificContentType, "") - factory, ok = m.ContentTypeAssociatedFactories[cleanedContentType] - if ok { - return factory.GetRootParseNode(cleanedContentType, content) - } - return nil, errors.New("content type " + cleanedContentType + " does not have a factory registered to be parsed") -} +package serialization + +import ( + "errors" + re "regexp" + "strings" + "sync" +) + +// ParseNodeFactoryRegistry holds a list of all the registered factories for the various types of nodes. +type ParseNodeFactoryRegistry struct { + lock *sync.Mutex + + // ContentTypeAssociatedFactories maps content types onto the relevant factory. + // + // When interacting with this field, please make use of Lock and Unlock methods to ensure thread safety. + ContentTypeAssociatedFactories map[string]ParseNodeFactory +} + +func NewParseNodeFactoryRegistry() *ParseNodeFactoryRegistry { + return &ParseNodeFactoryRegistry{ + lock: &sync.Mutex{}, + ContentTypeAssociatedFactories: make(map[string]ParseNodeFactory), + } +} + +// DefaultParseNodeFactoryInstance is the default singleton instance of the registry to be used when registering new factories that should be available by default. +var DefaultParseNodeFactoryInstance = NewParseNodeFactoryRegistry() + +// GetValidContentType returns the valid content type for the ParseNodeFactoryRegistry +func (m *ParseNodeFactoryRegistry) GetValidContentType() (string, error) { + return "", errors.New("the registry supports multiple content types. Get the registered factory instead") +} + +var contentTypeVendorCleanupPattern = re.MustCompile("[^/]+\\+") + +// GetRootParseNode returns a new ParseNode instance that is the root of the content +func (m *ParseNodeFactoryRegistry) GetRootParseNode(contentType string, content []byte) (ParseNode, error) { + if contentType == "" { + return nil, errors.New("contentType is required") + } + if content == nil { + return nil, errors.New("content is required") + } + vendorSpecificContentType := strings.Split(contentType, ";")[0] + factory, ok := m.ContentTypeAssociatedFactories[vendorSpecificContentType] + if ok { + return factory.GetRootParseNode(vendorSpecificContentType, content) + } + cleanedContentType := contentTypeVendorCleanupPattern.ReplaceAllString(vendorSpecificContentType, "") + factory, ok = m.ContentTypeAssociatedFactories[cleanedContentType] + if ok { + return factory.GetRootParseNode(cleanedContentType, content) + } + return nil, errors.New("content type " + cleanedContentType + " does not have a factory registered to be parsed") +} + +func (m *ParseNodeFactoryRegistry) Lock() { + m.lock.Lock() +} + +func (m *ParseNodeFactoryRegistry) Unlock() { + m.lock.Unlock() +} diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/serialization/serialization_writer_factory_registry.go b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/serialization_writer_factory_registry.go index 19309cb21f..d6fcac6688 100644 --- a/vendor/github.com/microsoft/kiota-abstractions-go/serialization/serialization_writer_factory_registry.go +++ b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/serialization_writer_factory_registry.go @@ -1,40 +1,58 @@ -package serialization - -import ( - "errors" - "strings" -) - -// SerializationWriterFactoryRegistry is a factory holds a list of all the registered factories for the various types of nodes. -type SerializationWriterFactoryRegistry struct { - // ContentTypeAssociatedFactories list of factories that are registered by content type. - ContentTypeAssociatedFactories map[string]SerializationWriterFactory -} - -// DefaultSerializationWriterFactoryInstance is the default singleton instance of the registry to be used when registering new factories that should be available by default. -var DefaultSerializationWriterFactoryInstance = &SerializationWriterFactoryRegistry{ - ContentTypeAssociatedFactories: make(map[string]SerializationWriterFactory), -} - -// GetValidContentType returns the valid content type for the SerializationWriterFactoryRegistry -func (m *SerializationWriterFactoryRegistry) GetValidContentType() (string, error) { - return "", errors.New("the registry supports multiple content types. Get the registered factory instead") -} - -// GetSerializationWriter returns the relevant SerializationWriter instance for the given content type -func (m *SerializationWriterFactoryRegistry) GetSerializationWriter(contentType string) (SerializationWriter, error) { - if contentType == "" { - return nil, errors.New("the content type is empty") - } - vendorSpecificContentType := strings.Split(contentType, ";")[0] - factory, ok := m.ContentTypeAssociatedFactories[vendorSpecificContentType] - if ok { - return factory.GetSerializationWriter(contentType) - } - cleanedContentType := contentTypeVendorCleanupPattern.ReplaceAllString(vendorSpecificContentType, "") - factory, ok = m.ContentTypeAssociatedFactories[cleanedContentType] - if ok { - return factory.GetSerializationWriter(cleanedContentType) - } - return nil, errors.New("Content type " + cleanedContentType + " does not have a factory registered to be parsed") -} +package serialization + +import ( + "errors" + "strings" + "sync" +) + +// SerializationWriterFactoryRegistry is a factory holds a list of all the registered factories for the various types of nodes. +type SerializationWriterFactoryRegistry struct { + lock *sync.Mutex + + // ContentTypeAssociatedFactories list of factories that are registered by content type. + // + // When interacting with this field, please make use of Lock and Unlock methods to ensure thread safety. + ContentTypeAssociatedFactories map[string]SerializationWriterFactory +} + +func NewSerializationWriterFactoryRegistry() *SerializationWriterFactoryRegistry { + return &SerializationWriterFactoryRegistry{ + lock: &sync.Mutex{}, + ContentTypeAssociatedFactories: make(map[string]SerializationWriterFactory), + } +} + +// DefaultSerializationWriterFactoryInstance is the default singleton instance of the registry to be used when registering new factories that should be available by default. +var DefaultSerializationWriterFactoryInstance = NewSerializationWriterFactoryRegistry() + +// GetValidContentType returns the valid content type for the SerializationWriterFactoryRegistry +func (m *SerializationWriterFactoryRegistry) GetValidContentType() (string, error) { + return "", errors.New("the registry supports multiple content types. Get the registered factory instead") +} + +// GetSerializationWriter returns the relevant SerializationWriter instance for the given content type +func (m *SerializationWriterFactoryRegistry) GetSerializationWriter(contentType string) (SerializationWriter, error) { + if contentType == "" { + return nil, errors.New("the content type is empty") + } + vendorSpecificContentType := strings.Split(contentType, ";")[0] + factory, ok := m.ContentTypeAssociatedFactories[vendorSpecificContentType] + if ok { + return factory.GetSerializationWriter(contentType) + } + cleanedContentType := contentTypeVendorCleanupPattern.ReplaceAllString(vendorSpecificContentType, "") + factory, ok = m.ContentTypeAssociatedFactories[cleanedContentType] + if ok { + return factory.GetSerializationWriter(cleanedContentType) + } + return nil, errors.New("Content type " + cleanedContentType + " does not have a factory registered to be parsed") +} + +func (m *SerializationWriterFactoryRegistry) Lock() { + m.lock.Lock() +} + +func (m *SerializationWriterFactoryRegistry) Unlock() { + m.lock.Unlock() +} diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_array.go b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_array.go new file mode 100644 index 0000000000..3a46606a36 --- /dev/null +++ b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_array.go @@ -0,0 +1,18 @@ +package serialization + +// UntypedArray defines an untyped collection. +type UntypedArray struct { + UntypedNode +} + +// GetValue returns a collection of UntypedNode. +func (un *UntypedArray) GetValue() []UntypedNodeable { + return un.value.([]UntypedNodeable) +} + +// NewUntypedArray creates a new UntypedArray object. +func NewUntypedArray(collection []UntypedNodeable) *UntypedArray { + m := &UntypedArray{} + m.value = collection + return m +} diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_boolean.go b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_boolean.go new file mode 100644 index 0000000000..c7636407b1 --- /dev/null +++ b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_boolean.go @@ -0,0 +1,22 @@ +package serialization + +// UntypedBoolean defines an untyped boolean object. +type UntypedBoolean struct { + UntypedNode +} + +// GetValue returns the bool value. +func (un *UntypedBoolean) GetValue() *bool { + castValue, ok := un.value.(*bool) + if ok { + return castValue + } + return nil +} + +// NewUntypedBoolean creates a new UntypedBoolean object. +func NewUntypedBoolean(boolValue bool) *UntypedBoolean { + m := &UntypedBoolean{} + m.value = &boolValue + return m +} diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_double.go b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_double.go new file mode 100644 index 0000000000..a1fabf63ce --- /dev/null +++ b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_double.go @@ -0,0 +1,22 @@ +package serialization + +// UntypedDouble defines an untyped float64 object. +type UntypedDouble struct { + UntypedNode +} + +// GetValue returns the float64 value. +func (un *UntypedDouble) GetValue() *float64 { + castValue, ok := un.value.(*float64) + if ok { + return castValue + } + return nil +} + +// NewUntypedDouble creates a new UntypedDouble object. +func NewUntypedDouble(float64Value float64) *UntypedDouble { + m := &UntypedDouble{} + m.value = &float64Value + return m +} diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_float.go b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_float.go new file mode 100644 index 0000000000..6d5f313037 --- /dev/null +++ b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_float.go @@ -0,0 +1,22 @@ +package serialization + +// UntypedFloat defines an untyped float32 value. +type UntypedFloat struct { + UntypedNode +} + +// GetValue returns the float32 value. +func (un *UntypedFloat) GetValue() *float32 { + castValue, ok := un.value.(*float32) + if ok { + return castValue + } + return nil +} + +// NewUntypedFloat creates a new UntypedFloat object. +func NewUntypedFloat(float32Value float32) *UntypedFloat { + m := &UntypedFloat{} + m.value = &float32Value + return m +} diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_integer.go b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_integer.go new file mode 100644 index 0000000000..126af28e12 --- /dev/null +++ b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_integer.go @@ -0,0 +1,22 @@ +package serialization + +// UntypedInteger defines an untyped integer value. +type UntypedInteger struct { + UntypedNode +} + +// GetValue returns the int32 value. +func (un *UntypedInteger) GetValue() *int32 { + castValue, ok := un.value.(*int32) + if ok { + return castValue + } + return nil +} + +// NewUntypedInteger creates a new UntypedInteger object. +func NewUntypedInteger(int32Value int32) *UntypedInteger { + m := &UntypedInteger{} + m.value = &int32Value + return m +} diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_long.go b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_long.go new file mode 100644 index 0000000000..616e07c69c --- /dev/null +++ b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_long.go @@ -0,0 +1,22 @@ +package serialization + +// UntypedLong defines an untyped int64 value. +type UntypedLong struct { + UntypedNode +} + +// GetValue returns the int64 value. +func (un *UntypedLong) GetValue() *int64 { + castValue, ok := un.value.(*int64) + if ok { + return castValue + } + return nil +} + +// NewUntypedLong creates a new UntypedLong object. +func NewUntypedLong(int64Value int64) *UntypedLong { + m := &UntypedLong{} + m.value = &int64Value + return m +} diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_node.go b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_node.go new file mode 100644 index 0000000000..c8c6765852 --- /dev/null +++ b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_node.go @@ -0,0 +1,44 @@ +package serialization + +type UntypedNodeable interface { + Parsable + GetIsUntypedNode() bool +} + +// Base model for an untyped object. +type UntypedNode struct { + value any +} + +// GetIsUntypedNode returns true if the node is untyped, false otherwise. +func (m *UntypedNode) GetIsUntypedNode() bool { + return true +} + +// GetValue gets the underlying object value. +func (m *UntypedNode) GetValue() any { + return m.value +} + +// Serialize writes the objects properties to the current writer. +func (m *UntypedNode) Serialize(writer SerializationWriter) error { + // Serialize the entity + return nil +} + +// GetFieldDeserializers returns the deserialization information for this object. +func (m *UntypedNode) GetFieldDeserializers() map[string]func(ParseNode) error { + return make(map[string]func(ParseNode) error) +} + +// NewUntypedNode instantiates a new untyped node and sets the default values. +func NewUntypedNode(value any) *UntypedNode { + m := &UntypedNode{} + m.value = value + return m +} + +// CreateUntypedNodeFromDiscriminatorValue a new untyped node and from a parse node. +func CreateUntypedNodeFromDiscriminatorValue(parseNode ParseNode) (Parsable, error) { + return NewUntypedNode(nil), nil +} diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_null.go b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_null.go new file mode 100644 index 0000000000..ab6b64c7b9 --- /dev/null +++ b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_null.go @@ -0,0 +1,17 @@ +package serialization + +// UntypedNull defines a untyped nil object. +type UntypedNull struct { + UntypedNode +} + +// GetValue returns a nil value. +func (un *UntypedNull) GetValue() any { + return nil +} + +// NewUntypedString creates a new UntypedNull object. +func NewUntypedNull() *UntypedNull { + m := &UntypedNull{} + return m +} diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_object.go b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_object.go new file mode 100644 index 0000000000..8b963dc555 --- /dev/null +++ b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_object.go @@ -0,0 +1,22 @@ +package serialization + +// UntypedObject defines an untyped object. +type UntypedObject struct { + UntypedNode +} + +// GetValue gets a map of the properties of the object. +func (un *UntypedObject) GetValue() map[string]UntypedNodeable { + castValue, ok := un.value.(map[string]UntypedNodeable) + if ok { + return castValue + } + return nil +} + +// NewUntypedObject creates a new UntypedObject object. +func NewUntypedObject(properties map[string]UntypedNodeable) *UntypedObject { + m := &UntypedObject{} + m.value = properties + return m +} diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_string.go b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_string.go new file mode 100644 index 0000000000..3acea5bfae --- /dev/null +++ b/vendor/github.com/microsoft/kiota-abstractions-go/serialization/untyped_string.go @@ -0,0 +1,22 @@ +package serialization + +// UntypedString defines an untyped string object. +type UntypedString struct { + UntypedNode +} + +// GetValue returns the string object. +func (un *UntypedString) GetValue() *string { + castValue, ok := un.value.(*string) + if ok { + return castValue + } + return nil +} + +// NewUntypedString creates a new UntypedString object. +func NewUntypedString(stringValue string) *UntypedString { + m := &UntypedString{} + m.value = &stringValue + return m +} diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/store/inmemory_backing_store.go b/vendor/github.com/microsoft/kiota-abstractions-go/store/inmemory_backing_store.go index 44d0e8cff2..5698519539 100644 --- a/vendor/github.com/microsoft/kiota-abstractions-go/store/inmemory_backing_store.go +++ b/vendor/github.com/microsoft/kiota-abstractions-go/store/inmemory_backing_store.go @@ -2,9 +2,10 @@ package store import ( "errors" - "github.com/google/uuid" "reflect" "strings" + + "github.com/google/uuid" ) // BackingStoreSubscriber is a function signature for a listener to any changes to a backing store @@ -97,7 +98,8 @@ func (i *InMemoryBackingStore) Enumerate() map[string]interface{} { func (i *InMemoryBackingStore) EnumerateKeysForValuesChangedToNil() []string { keys := make([]string, 0) for k, v := range i.store { - if i.changedValues[k] && v == nil { + valueOfV := reflect.ValueOf(v) + if i.changedValues[k] && (v == nil || valueOfV.Kind() == reflect.Ptr && valueOfV.IsNil()) { keys = append(keys, k) } } diff --git a/vendor/github.com/microsoft/kiota-abstractions-go/utils.go b/vendor/github.com/microsoft/kiota-abstractions-go/utils.go index b4bc0f0955..bcc851f838 100644 --- a/vendor/github.com/microsoft/kiota-abstractions-go/utils.go +++ b/vendor/github.com/microsoft/kiota-abstractions-go/utils.go @@ -37,7 +37,7 @@ func SetObjectValueFromSource[T interface{}](source func(ctor serialization.Pars return nil } -// SetCollectionValue is a utility function that receives a collection that can be cast to Parsable and a function that epects the results +// SetCollectionValue is a utility function that receives a collection that can be cast to Parsable and a function that expects the results // // source is any function that receives a `ParsableFactory` and returns a slice of Parsable or error // ctor is a ParsableFactory @@ -56,7 +56,8 @@ func SetCollectionValue[T interface{}](source func(ctor serialization.ParsableFa // CollectionApply applies an operation to every element of the slice and returns a result of the modified collection // -// is a slice of all the elementents to be mutated +// is a slice of all the elementents to be mutated +// // mutator applies an operation to the collection and returns a response of type `R` func CollectionApply[T any, R interface{}](collection []T, mutator func(t T) R) []R { cast := make([]R, len(collection)) @@ -138,7 +139,7 @@ func p[T interface{}](t T) *T { return &t } -// GetValueOrDefault Converts a Pointer to a value or retuns a default value +// GetValueOrDefault Converts a Pointer to a value or returns a default value func GetValueOrDefault[T interface{}](source func() *T, defaultValue T) T { result := source() if result != nil { diff --git a/vendor/github.com/microsoft/kiota-authentication-azure-go/.release-please-manifest.json b/vendor/github.com/microsoft/kiota-authentication-azure-go/.release-please-manifest.json new file mode 100644 index 0000000000..6a7753e332 --- /dev/null +++ b/vendor/github.com/microsoft/kiota-authentication-azure-go/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "1.3.0" +} \ No newline at end of file diff --git a/vendor/github.com/microsoft/kiota-authentication-azure-go/CHANGELOG.md b/vendor/github.com/microsoft/kiota-authentication-azure-go/CHANGELOG.md index abd4bde349..20c775b5ad 100644 --- a/vendor/github.com/microsoft/kiota-authentication-azure-go/CHANGELOG.md +++ b/vendor/github.com/microsoft/kiota-authentication-azure-go/CHANGELOG.md @@ -2,12 +2,58 @@ All notable changes to this project will be documented in this file. -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.3.0](https://github.com/microsoft/kiota-authentication-azure-go/compare/v1.2.1...v1.3.0) (2025-04-02) + + +### Features + +* add support for Continous Access Evaluation (CAE) ([e33d461](https://github.com/microsoft/kiota-authentication-azure-go/commit/e33d46169c9a88a463a20c6cee61eedcaa83099c)) + + +### Bug Fixes + +* Don't error on CAE claims ([e33d461](https://github.com/microsoft/kiota-authentication-azure-go/commit/e33d46169c9a88a463a20c6cee61eedcaa83099c)) +* removes common go dependency ([f58f8df](https://github.com/microsoft/kiota-authentication-azure-go/commit/f58f8df7ded784abbb66030eaf6b26c08c078696)) +* removes common go dependency ([b05ac0b](https://github.com/microsoft/kiota-authentication-azure-go/commit/b05ac0bb228526bc56a9d2172ffb975e7ca24f73)) + +## [1.2.1](https://github.com/microsoft/kiota-authentication-azure-go/compare/v1.2.0...v1.2.1) (2025-03-24) + + +### Bug Fixes + +* upgrades common go dependency to solve triming issues ([5ab48d3](https://github.com/microsoft/kiota-authentication-azure-go/commit/5ab48d33da0a32efcbd44c75a43d8e1d4cc7e0ff)) +* upgrades common go dependency to solve triming issues ([9360b98](https://github.com/microsoft/kiota-authentication-azure-go/commit/9360b98797f0d00bc31fc3bbe17af772479da5af)) + +## [1.2.0](https://github.com/microsoft/kiota-authentication-azure-go/compare/v1.1.0...v1.2.0) (2025-03-13) + + +### Features + +* upgrades required go version from go1.18 to go 1.22 ([35f8bd7](https://github.com/microsoft/kiota-authentication-azure-go/commit/35f8bd73366e25d6ba19b2e2a19056a2baae0356)) + +## [1.1.0] - 2024-08-08 -## [Unreleased] +### Changed -### Added +- Continuous Access Evaluation is now enabled by default. + +## [1.0.2] - 2024-01-19 + +### Changed + +- Validates that provided valid hosts don't start with a scheme. + +## [1.0.1] - 2023-10-13 + +### Changed + +- Allow http on localhost. + +## [1.0.0] - 2023-05-04 + +### Changed + +- GA Release. ## [0.6.0] - 2023-01-17 @@ -63,4 +109,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- Initial tagged release of the library. +- Initial tagged release of the library. diff --git a/vendor/github.com/microsoft/kiota-authentication-azure-go/CODE_OF_CONDUCT.md b/vendor/github.com/microsoft/kiota-authentication-azure-go/CODE_OF_CONDUCT.md index c72a5749c5..686e5e7a09 100644 --- a/vendor/github.com/microsoft/kiota-authentication-azure-go/CODE_OF_CONDUCT.md +++ b/vendor/github.com/microsoft/kiota-authentication-azure-go/CODE_OF_CONDUCT.md @@ -1,9 +1,10 @@ -# Microsoft Open Source Code of Conduct - -This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). - -Resources: - -- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) -- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) -- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns +# Microsoft Open Source Code of Conduct + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). + +Resources: + +- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) +- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns +- Employees can reach out at [aka.ms/opensource/moderation-support](https://aka.ms/opensource/moderation-support) diff --git a/vendor/github.com/microsoft/kiota-authentication-azure-go/CONTRIBUTING.md b/vendor/github.com/microsoft/kiota-authentication-azure-go/CONTRIBUTING.md new file mode 100644 index 0000000000..8043f0396b --- /dev/null +++ b/vendor/github.com/microsoft/kiota-authentication-azure-go/CONTRIBUTING.md @@ -0,0 +1,52 @@ +# Contributing to the Kiota Azure authentication provider for Go + +The Kiota Azure authentication provider for Go is available for all manner of contribution. There are a couple of different recommended paths to get contributions into the released version of this SDK. + +__NOTE__ A signed a contribution license agreement is required for all contributions, and is checked automatically on new pull requests. Please read and sign [the agreement](https://cla.microsoft.com/) before starting any work for this repository. + +## File issues + +The best way to get started with a contribution is to start a dialog with the owners of this repository. Sometimes features will be under development or out of scope for this SDK and it's best to check before starting work on contribution. + +## Submit pull requests for trivial changes + +If you are making a change that does not affect the interface components and does not affect other downstream callers, feel free to make a pull request against the __dev__ branch. The dev branch will be updated frequently. + +Revisions of this nature will result in a 0.0.X change of the version number. + +## Submit pull requests for features + +If major functionality is being added, or there will need to be gestation time for a change, it should be submitted against the __feature__ branch. + +Revisions of this nature will result in a 0.X.X change of the version number. + +## Commit message format + +To support our automated release process, pull requests are required to follow the [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/) +format. + +Each commit message consists of a **header**, an optional **body** and an optional **footer**. The header is the first line of the commit and +MUST have a **type** (see below for a list of types) and a **description**. An optional **scope** can be added to the header to give extra context. + +``` +[optional scope]: + + + + +``` + +The recommended commit types used are: + + - **feat** for feature updates (increments the _minor_ version) + - **fix** for bug fixes (increments the _patch_ version) + - **perf** for performance related changes e.g. optimizing an algorithm + - **refactor** for code refactoring changes + - **test** for test suite updates e.g. adding a test or fixing a test + - **style** for changes that don't affect the meaning of code. e.g. formatting changes + - **docs** for documentation updates e.g. ReadMe update or code documentation updates + - **build** for build system changes (gradle updates, external dependency updates) + - **ci** for CI configuration file changes e.g. updating a pipeline + - **chore** for miscallaneous non-sdk changesin the repo e.g. removing an unused file + +Adding a footer with the prefix **BREAKING CHANGE:** will cause an increment of the _major_ version. \ No newline at end of file diff --git a/vendor/github.com/microsoft/kiota-authentication-azure-go/azure_identity_access_token_provider.go b/vendor/github.com/microsoft/kiota-authentication-azure-go/azure_identity_access_token_provider.go index 2157bdb8d4..f6db3a19c2 100644 --- a/vendor/github.com/microsoft/kiota-authentication-azure-go/azure_identity_access_token_provider.go +++ b/vendor/github.com/microsoft/kiota-authentication-azure-go/azure_identity_access_token_provider.go @@ -1,127 +1,151 @@ -package microsoft_kiota_authentication_azure - -import ( - "context" - "encoding/base64" - "errors" - "strings" - - u "net/url" - - azcore "github.com/Azure/azure-sdk-for-go/sdk/azcore" - azpolicy "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - absauth "github.com/microsoft/kiota-abstractions-go/authentication" - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/attribute" -) - -// AzureIdentityAccessTokenProvider implementation of AccessTokenProvider that supports implementations of TokenCredential from Azure.Identity. -type AzureIdentityAccessTokenProvider struct { - scopes []string - credential azcore.TokenCredential - allowedHostsValidator *absauth.AllowedHostsValidator - // The observation options for the request adapter. - observabilityOptions ObservabilityOptions -} - -// ObservabilityOptions holds the tracing, metrics and logging configuration for the request adapter -type ObservabilityOptions struct { -} - -func (o ObservabilityOptions) GetTracerInstrumentationName() string { - return "github.com/microsoft/kiota-authentication-azure-go" -} - -// NewAzureIdentityAccessTokenProvider creates a new instance of the AzureIdentityAccessTokenProvider using ":///.default" as the default scope. -func NewAzureIdentityAccessTokenProvider(credential azcore.TokenCredential) (*AzureIdentityAccessTokenProvider, error) { - return NewAzureIdentityAccessTokenProviderWithScopes(credential, nil) -} - -// NewAzureIdentityAccessTokenProviderWithScopes creates a new instance of the AzureIdentityAccessTokenProvider. -func NewAzureIdentityAccessTokenProviderWithScopes(credential azcore.TokenCredential, scopes []string) (*AzureIdentityAccessTokenProvider, error) { - return NewAzureIdentityAccessTokenProviderWithScopesAndValidHosts(credential, scopes, nil) -} - -// NewAzureIdentityAccessTokenProviderWithScopesAndValidHosts creates a new instance of the AzureIdentityAccessTokenProvider. -func NewAzureIdentityAccessTokenProviderWithScopesAndValidHosts(credential azcore.TokenCredential, scopes []string, validHosts []string) (*AzureIdentityAccessTokenProvider, error) { - return NewAzureIdentityAccessTokenProviderWithScopesAndValidHostsAndObservabilityOptions(credential, scopes, validHosts, ObservabilityOptions{}) -} - -// NewAzureIdentityAccessTokenProviderWithScopesAndValidHosts creates a new instance of the AzureIdentityAccessTokenProvider. -func NewAzureIdentityAccessTokenProviderWithScopesAndValidHostsAndObservabilityOptions(credential azcore.TokenCredential, scopes []string, validHosts []string, observabilityOptions ObservabilityOptions) (*AzureIdentityAccessTokenProvider, error) { - if credential == nil { - return nil, errors.New("credential cannot be nil") - } - scopesLen := len(scopes) - finalScopes := make([]string, scopesLen) - if scopesLen > 0 { - copy(finalScopes, scopes) - } - validator := absauth.NewAllowedHostsValidator(validHosts) - result := &AzureIdentityAccessTokenProvider{ - credential: credential, - scopes: finalScopes, - allowedHostsValidator: &validator, - observabilityOptions: observabilityOptions, - } - - return result, nil -} - -const claimsKey = "claims" - -// GetAuthorizationToken returns the access token for the provided url. -func (p *AzureIdentityAccessTokenProvider) GetAuthorizationToken(ctx context.Context, url *u.URL, additionalAuthenticationContext map[string]interface{}) (string, error) { - ctx, span := otel.GetTracerProvider().Tracer(p.observabilityOptions.GetTracerInstrumentationName()).Start(ctx, "GetAuthorizationToken") - defer span.End() - if !(*(p.allowedHostsValidator)).IsUrlHostValid(url) { - span.SetAttributes(attribute.Bool("com.microsoft.kiota.authentication.is_url_valid", false)) - return "", nil - } - if !strings.EqualFold(url.Scheme, "https") { - span.SetAttributes(attribute.Bool("com.microsoft.kiota.authentication.is_url_valid", false)) - err := errors.New("url scheme must be https") - span.RecordError(err) - return "", err - } - span.SetAttributes(attribute.Bool("com.microsoft.kiota.authentication.is_url_valid", true)) - - claims := "" - - if additionalAuthenticationContext != nil && - additionalAuthenticationContext[claimsKey] != nil { - if rawClaims, ok := additionalAuthenticationContext[claimsKey].(string); ok { - decodedClaims, err := base64.StdEncoding.DecodeString(rawClaims) - if err != nil { - span.RecordError(err) - return "", err - } - claims = string(decodedClaims) - err = errors.New("received a claim for CAE but azure identity doesn't support claims: " + claims + " https://github.com/Azure/azure-sdk-for-go/issues/14284") - span.RecordError(err) - return "", err - } - } - span.SetAttributes(attribute.Bool("com.microsoft.kiota.authentication.additional_claims_provided", claims != "")) - - if len(p.scopes) == 0 { - p.scopes = append(p.scopes, url.Scheme+"://"+url.Host+"/.default") - } - - options := azpolicy.TokenRequestOptions{ - Scopes: p.scopes, - //TODO pass the claims once the API is updated to support it https://github.com/Azure/azure-sdk-for-go/issues/14284 - } - span.SetAttributes(attribute.String("com.microsoft.kiota.authentication.scopes", strings.Join(p.scopes, ","))) - token, err := p.credential.GetToken(ctx, options) - if err != nil { - span.RecordError(err) - return "", err - } - return token.Token, nil -} - -// GetAllowedHostsValidator returns the hosts validator. -func (p *AzureIdentityAccessTokenProvider) GetAllowedHostsValidator() *absauth.AllowedHostsValidator { - return p.allowedHostsValidator -} +package microsoft_kiota_authentication_azure + +import ( + "context" + "encoding/base64" + "errors" + u "net/url" + "strings" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + azpolicy "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + absauth "github.com/microsoft/kiota-abstractions-go/authentication" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" +) + +// AzureIdentityAccessTokenProvider implementation of AccessTokenProvider that supports implementations of TokenCredential from Azure.Identity. +type AzureIdentityAccessTokenProvider struct { + scopes []string + credential azcore.TokenCredential + allowedHostsValidator *absauth.AllowedHostsValidator + // The observation options for the request adapter. + observabilityOptions ObservabilityOptions + isCaeEnabled bool +} + +var _ absauth.AccessTokenProvider = (*AzureIdentityAccessTokenProvider)(nil) + +// ObservabilityOptions holds the tracing, metrics and logging configuration for the request adapter +type ObservabilityOptions struct { +} + +var LocalhostStrings = [4]string{"localhost", "[::1]", "::1", "127.0.0.1"} + +func (o ObservabilityOptions) GetTracerInstrumentationName() string { + return "github.com/microsoft/kiota-authentication-azure-go" +} + +// NewAzureIdentityAccessTokenProvider creates a new instance of the AzureIdentityAccessTokenProvider using ":///.default" as the default scope. +func NewAzureIdentityAccessTokenProvider(credential azcore.TokenCredential) (*AzureIdentityAccessTokenProvider, error) { + return NewAzureIdentityAccessTokenProviderWithScopes(credential, nil) +} + +// NewAzureIdentityAccessTokenProviderWithScopes creates a new instance of the AzureIdentityAccessTokenProvider. +func NewAzureIdentityAccessTokenProviderWithScopes(credential azcore.TokenCredential, scopes []string) (*AzureIdentityAccessTokenProvider, error) { + return NewAzureIdentityAccessTokenProviderWithScopesAndValidHosts(credential, scopes, nil) +} + +// NewAzureIdentityAccessTokenProviderWithScopesAndValidHosts creates a new instance of the AzureIdentityAccessTokenProvider. +func NewAzureIdentityAccessTokenProviderWithScopesAndValidHosts(credential azcore.TokenCredential, scopes []string, validHosts []string) (*AzureIdentityAccessTokenProvider, error) { + return NewAzureIdentityAccessTokenProviderWithScopesAndValidHostsAndObservabilityOptions(credential, scopes, validHosts, ObservabilityOptions{}) +} + +// NewAzureIdentityAccessTokenProviderWithScopesAndValidHostsAndObservabilityOptions creates a new instance of the AzureIdentityAccessTokenProvider. +func NewAzureIdentityAccessTokenProviderWithScopesAndValidHostsAndObservabilityOptions(credential azcore.TokenCredential, scopes []string, validHosts []string, observabilityOptions ObservabilityOptions) (*AzureIdentityAccessTokenProvider, error) { + return NewAzureIdentityAccessTokenProviderWithScopesAndValidHostsAndObservabilityOptionsAndIsCaeEnabled(credential, scopes, validHosts, observabilityOptions, true) +} + +// NewAzureIdentityAccessTokenProviderWithScopesAndValidHostsAndObservabilityOptionsAndIsCaeEnabled creates a new instance of the AzureIdentityAccessTokenProvider. +func NewAzureIdentityAccessTokenProviderWithScopesAndValidHostsAndObservabilityOptionsAndIsCaeEnabled(credential azcore.TokenCredential, scopes []string, validHosts []string, observabilityOptions ObservabilityOptions, isCaeEnabled bool) (*AzureIdentityAccessTokenProvider, error) { + if credential == nil { + return nil, errors.New("credential cannot be nil") + } + scopesLen := len(scopes) + finalScopes := make([]string, scopesLen) + if scopesLen > 0 { + copy(finalScopes, scopes) + } + validator, err := absauth.NewAllowedHostsValidatorErrorCheck(validHosts) + if err != nil { + return nil, err + } + return &AzureIdentityAccessTokenProvider{ + credential: credential, + scopes: finalScopes, + allowedHostsValidator: validator, + observabilityOptions: observabilityOptions, + isCaeEnabled: isCaeEnabled, + }, nil +} + +const claimsKey = "claims" + +// GetAuthorizationToken returns the access token for the provided url. +func (p *AzureIdentityAccessTokenProvider) GetAuthorizationToken(ctx context.Context, url *u.URL, additionalAuthenticationContext map[string]interface{}) (string, error) { + ctx, span := otel.GetTracerProvider().Tracer(p.observabilityOptions.GetTracerInstrumentationName()).Start(ctx, "GetAuthorizationToken") + defer span.End() + if !(*(p.allowedHostsValidator)).IsUrlHostValid(url) { + span.SetAttributes(attribute.Bool("com.microsoft.kiota.authentication.is_url_valid", false)) + return "", nil + } + if !strings.EqualFold(url.Scheme, "https") && !isLocalhost(url.Host) { + span.SetAttributes(attribute.Bool("com.microsoft.kiota.authentication.is_url_valid", false)) + err := errors.New("url scheme must be https") + span.RecordError(err) + return "", err + } + span.SetAttributes(attribute.Bool("com.microsoft.kiota.authentication.is_url_valid", true)) + + claims := "" + + if additionalAuthenticationContext != nil && + additionalAuthenticationContext[claimsKey] != nil { + if rawClaims, ok := additionalAuthenticationContext[claimsKey].(string); ok { + decodedClaims, err := base64.StdEncoding.DecodeString(rawClaims) + if err != nil { + span.RecordError(err) + return "", err + } + claims = string(decodedClaims) + } + } + span.SetAttributes(attribute.Bool("com.microsoft.kiota.authentication.additional_claims_provided", claims != "")) + + if len(p.scopes) == 0 { + p.scopes = append(p.scopes, url.Scheme+"://"+url.Host+"/.default") + } + + options := azpolicy.TokenRequestOptions{ + Scopes: p.scopes, + EnableCAE: p.isCaeEnabled, + Claims: claims, + } + span.SetAttributes(attribute.String("com.microsoft.kiota.authentication.scopes", strings.Join(p.scopes, ","))) + token, err := p.credential.GetToken(ctx, options) + if err != nil { + span.RecordError(err) + return "", err + } + return token.Token, nil +} + +// GetAllowedHostsValidator returns the hosts validator. +func (p *AzureIdentityAccessTokenProvider) GetAllowedHostsValidator() *absauth.AllowedHostsValidator { + return p.allowedHostsValidator +} + +func isLocalhost(host string) bool { + normalizedHost := strings.ToLower(host) + for _, localhostString := range LocalhostStrings { + if strings.HasPrefix(normalizedHost, localhostString) { + return isValidRemainder(strings.TrimPrefix(normalizedHost, localhostString)) + } + } + + return false +} + +func isValidRemainder(remainder string) bool { + return remainder == "" || strings.HasPrefix(remainder, ":") +} diff --git a/vendor/github.com/microsoft/kiota-authentication-azure-go/azure_identity_authentication_provider.go b/vendor/github.com/microsoft/kiota-authentication-azure-go/azure_identity_authentication_provider.go index cbd53cc1f5..76d456fd59 100644 --- a/vendor/github.com/microsoft/kiota-authentication-azure-go/azure_identity_authentication_provider.go +++ b/vendor/github.com/microsoft/kiota-authentication-azure-go/azure_identity_authentication_provider.go @@ -29,7 +29,12 @@ func NewAzureIdentityAuthenticationProviderWithScopesAndValidHosts(credential az // NewAzureIdentityAuthenticationProviderWithScopesAndValidHostsAndObservabilityOptions creates a new instance of the AzureIdentityAuthenticationProvider. func NewAzureIdentityAuthenticationProviderWithScopesAndValidHostsAndObservabilityOptions(credential azcore.TokenCredential, scopes []string, validHosts []string, observabilityOptions ObservabilityOptions) (*AzureIdentityAuthenticationProvider, error) { - accessTokenProvider, err := NewAzureIdentityAccessTokenProviderWithScopesAndValidHostsAndObservabilityOptions(credential, scopes, validHosts, observabilityOptions) + return NewAzureIdentityAuthenticationProviderWithScopesAndValidHostsAndObservabilityOptionsAndIsCaeEnabled(credential, scopes, validHosts, observabilityOptions, true) +} + +// NewAzureIdentityAuthenticationProviderWithScopesAndValidHostsAndObservabilityOptionsAndIsCaeEnabled creates a new instance of the AzureIdentityAuthenticationProvider. +func NewAzureIdentityAuthenticationProviderWithScopesAndValidHostsAndObservabilityOptionsAndIsCaeEnabled(credential azcore.TokenCredential, scopes []string, validHosts []string, observabilityOptions ObservabilityOptions, isCaeEnabled bool) (*AzureIdentityAuthenticationProvider, error) { + accessTokenProvider, err := NewAzureIdentityAccessTokenProviderWithScopesAndValidHostsAndObservabilityOptionsAndIsCaeEnabled(credential, scopes, validHosts, observabilityOptions, isCaeEnabled) if err != nil { return nil, err } diff --git a/vendor/github.com/microsoft/kiota-authentication-azure-go/release-please-config.json b/vendor/github.com/microsoft/kiota-authentication-azure-go/release-please-config.json new file mode 100644 index 0000000000..3fa2fadacb --- /dev/null +++ b/vendor/github.com/microsoft/kiota-authentication-azure-go/release-please-config.json @@ -0,0 +1,14 @@ +{ + "release-type": "go", + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": true, + "include-component-in-tag": false, + "include-v-in-tag": true, + "packages": { + ".": { + "package-name": "github.com/microsoft/kiota-authentication-azure-go", + "changelog-path": "CHANGELOG.md" + } + }, + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" + } diff --git a/vendor/github.com/microsoft/kiota-http-go/.release-please-manifest.json b/vendor/github.com/microsoft/kiota-http-go/.release-please-manifest.json new file mode 100644 index 0000000000..a53bae24be --- /dev/null +++ b/vendor/github.com/microsoft/kiota-http-go/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "1.5.4" +} \ No newline at end of file diff --git a/vendor/github.com/microsoft/kiota-http-go/CHANGELOG.md b/vendor/github.com/microsoft/kiota-http-go/CHANGELOG.md index bb9203f19e..64ac638fbd 100644 --- a/vendor/github.com/microsoft/kiota-http-go/CHANGELOG.md +++ b/vendor/github.com/microsoft/kiota-http-go/CHANGELOG.md @@ -2,13 +2,176 @@ All notable changes to this project will be documented in this file. -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.5.4](https://github.com/microsoft/kiota-http-go/compare/v1.5.3...v1.5.4) (2025-06-06) + + +### Bug Fixes + +* retry handler exponential backoff ([#205](https://github.com/microsoft/kiota-http-go/issues/205)) ([2f2a350](https://github.com/microsoft/kiota-http-go/commit/2f2a3500e91531c248d1eb28997c4ca3bc361a85)) + +## [1.5.3](https://github.com/microsoft/kiota-http-go/compare/v1.5.2...v1.5.3) (2025-04-03) + + +### Bug Fixes + +* adding middleware with options errors with "unsupported option type" ([beeb32d](https://github.com/microsoft/kiota-http-go/commit/beeb32db1f6a5ebabfd4efdf66d701a6d12ed43f)) + +## [1.5.2](https://github.com/microsoft/kiota-http-go/compare/v1.5.1...v1.5.2) (2025-04-02) + + +### Bug Fixes + +* removes common go dependency ([42c2137](https://github.com/microsoft/kiota-http-go/commit/42c21377c7d3af3863bfcfcf28956cdaad99c850)) +* removes common go dependency ([df1bf28](https://github.com/microsoft/kiota-http-go/commit/df1bf281692b9b3dede2f1a845cb590c0a490717)) + +## [1.5.1](https://github.com/microsoft/kiota-http-go/compare/v1.5.0...v1.5.1) (2025-03-24) + + +### Bug Fixes + +* upgrades common go dependency to solve triming issues ([4a57c46](https://github.com/microsoft/kiota-http-go/commit/4a57c4687dec3e8d6801538c458cab19f47a480d)) +* upgrades common go dependency to solve triming issues ([d1aa07f](https://github.com/microsoft/kiota-http-go/commit/d1aa07f2a1b9c0d21f5808a8be41c65f236c8929)) + +## [1.5.0](https://github.com/microsoft/kiota-http-go/compare/v1.4.7...v1.5.0) (2025-03-13) + + +### Features + +* upgrades required go version from go1.18 to go 1.22 ([2e60cd5](https://github.com/microsoft/kiota-http-go/commit/2e60cd5800241b2c08b21ab523d9ffc216383db0)) + +## [1.4.7] - 2024-12-13 -## [Unreleased] +### Changed + +- Updated HTTP span attributes to comply with updated OpenTelemetry semantic conventions. [#182](https://github.com/microsoft/kiota-http-go/issues/182) + +## [1.4.6] - 2024-12-13 + +### Changed + +- Fixed a bug where headers inspection handler would fail upon receiving an error. + +## [1.4.5] - 2024-09-03 + +### Changed + +- Fixed a bug in compression middleware which caused empty body to send on retries + +## [1.4.4] - 2024-08-13 + +### Changed + +- Added `http.request.resend_delay` as a span attribute for the retry handler +- Changed the `http.retry_count` span attribute to `http.request.resend_count` to conform to OpenTelemetry specs. + +## [1.4.3] - 2024-07-22 + +### Changed + +- Fixed a bug to prevent double request compression by the compression handler. + +## [1.4.2] - 2024-07-16 + +### Changed + +- Prevent compression if Content-Range header is present. +- Fix bug which leads to a missing Content-Length header. + +## [1.4.1] - 2024-05-09 + +### Changed + +- Allow custom response handlers to return nil result values. + +## [1.4.0] - 2024-05-09 + +- Support retry after as a date. + +## [1.3.3] - 2024-03-19 + +- Fix bug where overriding http.DefaultTransport with an implementation other than http.Transport would result in an interface conversion panic + +### Changed + +## [1.3.2] - 2024-02-28 + +### Changed + +- Fix bug with headers inspection handler using wrong key. + +## [1.3.1] - 2024-02-09 + +### Changed + +- Fix bug that resulted in the error "content is empty" being returned instead of HTTP status information if the request returned no content and an unsuccessful status code. + +## [1.3.0] - 2024-01-22 ### Added +- Added support to override default middleware with function `GetDefaultMiddlewaresWithOptions`. + +## [1.2.1] - 2023-01-22 + +### Changed + +- Fix bug passing no timeout in client as 0 timeout in context . + +## [1.2.0] - 2024-01-22 + +### Added + +- Adds support for XXX status code. + +## [1.1.2] - 2024-01-20 + +### Changed + +- Changed the code by replacing ioutil.ReadAll and ioutil.NopCloser with io.ReadAll and io.NopCloser, respectively, due to their deprecation. + +## [1.1.1] - 2023-11-22 + +### Added + +- Added response headers and status code to returned error in `throwIfFailedResponse`. + +## [1.1.0] - 2023-08-11 + +### Added + +- Added headers inspection middleware and option. + +## [1.0.1] - 2023-07-19 + +### Changed + +- Bug Fix: Update Host for Redirect URL in go client. + +## [1.0.0] - 2023-05-04 + +### Changed + +- GA Release. + +## [0.17.0] - 2023-04-26 + +### Added + +- Adds Response Headers to the ApiError returned on Api requests errors. + +## [0.16.2] - 2023-04-17 + +### Added + +- Exit retry handler earlier if context is done. +- Adds exported method `ReplacePathTokens` that can be used to process url replacement logic globally. + +## [0.16.1] - 2023-03-20 + +### Added + +- Context deadline for requests defaults to client timeout when not provided. + ## [0.16.0] - 2023-03-01 ### Added @@ -156,4 +319,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- Initial tagged release of the library. +- Initial tagged release of the library. diff --git a/vendor/github.com/microsoft/kiota-http-go/CODE_OF_CONDUCT.md b/vendor/github.com/microsoft/kiota-http-go/CODE_OF_CONDUCT.md index c72a5749c5..686e5e7a09 100644 --- a/vendor/github.com/microsoft/kiota-http-go/CODE_OF_CONDUCT.md +++ b/vendor/github.com/microsoft/kiota-http-go/CODE_OF_CONDUCT.md @@ -1,9 +1,10 @@ -# Microsoft Open Source Code of Conduct - -This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). - -Resources: - -- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) -- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) -- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns +# Microsoft Open Source Code of Conduct + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). + +Resources: + +- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) +- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns +- Employees can reach out at [aka.ms/opensource/moderation-support](https://aka.ms/opensource/moderation-support) diff --git a/vendor/github.com/microsoft/kiota-http-go/CONTRIBUTING.md b/vendor/github.com/microsoft/kiota-http-go/CONTRIBUTING.md new file mode 100644 index 0000000000..9f1a2b1e38 --- /dev/null +++ b/vendor/github.com/microsoft/kiota-http-go/CONTRIBUTING.md @@ -0,0 +1,52 @@ +# Contributing to the Kiota HTTP adapter for Go + +The Kiota HTTP adapter for Go is available for all manner of contribution. There are a couple of different recommended paths to get contributions into the released version of this SDK. + +__NOTE__ A signed a contribution license agreement is required for all contributions, and is checked automatically on new pull requests. Please read and sign [the agreement](https://cla.microsoft.com/) before starting any work for this repository. + +## File issues + +The best way to get started with a contribution is to start a dialog with the owners of this repository. Sometimes features will be under development or out of scope for this SDK and it's best to check before starting work on contribution. + +## Submit pull requests for trivial changes + +If you are making a change that does not affect the interface components and does not affect other downstream callers, feel free to make a pull request against the __dev__ branch. The dev branch will be updated frequently. + +Revisions of this nature will result in a 0.0.X change of the version number. + +## Submit pull requests for features + +If major functionality is being added, or there will need to be gestation time for a change, it should be submitted against the __feature__ branch. + +Revisions of this nature will result in a 0.X.X change of the version number. + +## Commit message format + +To support our automated release process, pull requests are required to follow the [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/) +format. + +Each commit message consists of a **header**, an optional **body** and an optional **footer**. The header is the first line of the commit and +MUST have a **type** (see below for a list of types) and a **description**. An optional **scope** can be added to the header to give extra context. + +``` +[optional scope]: + + + + +``` + +The recommended commit types used are: + + - **feat** for feature updates (increments the _minor_ version) + - **fix** for bug fixes (increments the _patch_ version) + - **perf** for performance related changes e.g. optimizing an algorithm + - **refactor** for code refactoring changes + - **test** for test suite updates e.g. adding a test or fixing a test + - **style** for changes that don't affect the meaning of code. e.g. formatting changes + - **docs** for documentation updates e.g. ReadMe update or code documentation updates + - **build** for build system changes (gradle updates, external dependency updates) + - **ci** for CI configuration file changes e.g. updating a pipeline + - **chore** for miscallaneous non-sdk changesin the repo e.g. removing an unused file + +Adding a footer with the prefix **BREAKING CHANGE:** will cause an increment of the _major_ version. \ No newline at end of file diff --git a/vendor/github.com/microsoft/kiota-http-go/compression_handler.go b/vendor/github.com/microsoft/kiota-http-go/compression_handler.go index e02201e79d..17e41efe65 100644 --- a/vendor/github.com/microsoft/kiota-http-go/compression_handler.go +++ b/vendor/github.com/microsoft/kiota-http-go/compression_handler.go @@ -1,145 +1,173 @@ -package nethttplibrary - -import ( - "bytes" - "compress/gzip" - "io" - "io/ioutil" - "net/http" - - abstractions "github.com/microsoft/kiota-abstractions-go" - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/trace" -) - -// CompressionHandler represents a compression middleware -type CompressionHandler struct { - options CompressionOptions -} - -// CompressionOptions is a configuration object for the CompressionHandler middleware -type CompressionOptions struct { - enableCompression bool -} - -type compression interface { - abstractions.RequestOption - ShouldCompress() bool -} - -var compressKey = abstractions.RequestOptionKey{Key: "CompressionHandler"} - -// NewCompressionHandler creates an instance of a compression middleware -func NewCompressionHandler() *CompressionHandler { - options := NewCompressionOptions(true) - return NewCompressionHandlerWithOptions(options) -} - -// NewCompressionHandlerWithOptions creates an instance of the compression middlerware with -// specified configurations. -func NewCompressionHandlerWithOptions(option CompressionOptions) *CompressionHandler { - return &CompressionHandler{options: option} -} - -// NewCompressionOptions creates a configuration object for the CompressionHandler -func NewCompressionOptions(enableCompression bool) CompressionOptions { - return CompressionOptions{enableCompression: enableCompression} -} - -// GetKey returns CompressionOptions unique name in context object -func (o CompressionOptions) GetKey() abstractions.RequestOptionKey { - return compressKey -} - -// ShouldCompress reads compression setting form CompressionOptions -func (o CompressionOptions) ShouldCompress() bool { - return o.enableCompression -} - -// Intercept is invoked by the middleware pipeline to either move the request/response -// to the next middleware in the pipeline -func (c *CompressionHandler) Intercept(pipeline Pipeline, middlewareIndex int, req *http.Request) (*http.Response, error) { - reqOption, ok := req.Context().Value(compressKey).(compression) - if !ok { - reqOption = c.options - } - - obsOptions := GetObservabilityOptionsFromRequest(req) - ctx := req.Context() - var span trace.Span - if obsOptions != nil { - ctx, span = otel.GetTracerProvider().Tracer(obsOptions.GetTracerInstrumentationName()).Start(ctx, "CompressionHandler_Intercept") - span.SetAttributes(attribute.Bool("com.microsoft.kiota.handler.compression.enable", true)) - defer span.End() - req = req.WithContext(ctx) - } - - if !reqOption.ShouldCompress() || req.Body == nil { - return pipeline.Next(req, middlewareIndex) - } - if span != nil { - span.SetAttributes(attribute.Bool("http.request_body_compressed", true)) - } - - unCompressedBody, err := ioutil.ReadAll(req.Body) - unCompressedContentLength := req.ContentLength - if err != nil { - if span != nil { - span.RecordError(err) - } - return nil, err - } - - compressedBody, size, err := compressReqBody(unCompressedBody) - if err != nil { - if span != nil { - span.RecordError(err) - } - return nil, err - } - - req.Header.Set("Content-Encoding", "gzip") - req.Body = compressedBody - req.ContentLength = int64(size) - - if span != nil { - span.SetAttributes(attribute.Int64("http.request_content_length", req.ContentLength)) - } - - // Sending request with compressed body - resp, err := pipeline.Next(req, middlewareIndex) - if err != nil { - return nil, err - } - - // If response has status 415 retry request with uncompressed body - if resp.StatusCode == 415 { - delete(req.Header, "Content-Encoding") - req.Body = ioutil.NopCloser(bytes.NewBuffer(unCompressedBody)) - req.ContentLength = unCompressedContentLength - - if span != nil { - span.SetAttributes(attribute.Int64("http.request_content_length", req.ContentLength), - attribute.Int("http.request_content_length", 415)) - } - - return pipeline.Next(req, middlewareIndex) - } - - return resp, nil -} - -func compressReqBody(reqBody []byte) (io.ReadCloser, int, error) { - var buffer bytes.Buffer - gzipWriter := gzip.NewWriter(&buffer) - if _, err := gzipWriter.Write(reqBody); err != nil { - return nil, 0, err - } - - if err := gzipWriter.Close(); err != nil { - return nil, 0, err - } - - return ioutil.NopCloser(&buffer), buffer.Len(), nil -} +package nethttplibrary + +import ( + "bytes" + "compress/gzip" + "io" + "net/http" + "strings" + + abstractions "github.com/microsoft/kiota-abstractions-go" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/trace" +) + +// CompressionHandler represents a compression middleware +type CompressionHandler struct { + options CompressionOptions +} + +// CompressionOptions is a configuration object for the CompressionHandler middleware +type CompressionOptions struct { + enableCompression bool +} + +type compression interface { + abstractions.RequestOption + ShouldCompress() bool +} + +var compressKey = abstractions.RequestOptionKey{Key: "CompressionHandler"} + +// NewCompressionHandler creates an instance of a compression middleware +func NewCompressionHandler() *CompressionHandler { + options := NewCompressionOptionsReference(true) + return NewCompressionHandlerWithOptions(*options) +} + +// NewCompressionHandlerWithOptions creates an instance of the compression middleware with +// specified configurations. +func NewCompressionHandlerWithOptions(option CompressionOptions) *CompressionHandler { + return &CompressionHandler{options: option} +} + +// NewCompressionOptions creates a configuration object for the CompressionHandler +// +// Deprecated: This function is deprecated, and superseded by NewCompressionOptionsReference, +// which returns a pointer instead of plain value. +func NewCompressionOptions(enableCompression bool) CompressionOptions { + return CompressionOptions{enableCompression: enableCompression} +} + +// NewCompressionOptionsReference creates a configuration object for the CompressionHandler. +// +// This function supersedes the NewCompressionOptions function and returns a pointer, +// which is expected by GetDefaultMiddlewaresWithOptions. +func NewCompressionOptionsReference(enableCompression bool) *CompressionOptions { + options := CompressionOptions{enableCompression: enableCompression} + return &options +} + +// GetKey returns CompressionOptions unique name in context object +func (o CompressionOptions) GetKey() abstractions.RequestOptionKey { + return compressKey +} + +// ShouldCompress reads compression setting form CompressionOptions +func (o CompressionOptions) ShouldCompress() bool { + return o.enableCompression +} + +// Intercept is invoked by the middleware pipeline to either move the request/response +// to the next middleware in the pipeline +func (c *CompressionHandler) Intercept(pipeline Pipeline, middlewareIndex int, req *http.Request) (*http.Response, error) { + reqOption, ok := req.Context().Value(compressKey).(compression) + if !ok { + reqOption = c.options + } + + obsOptions := GetObservabilityOptionsFromRequest(req) + ctx := req.Context() + var span trace.Span + if obsOptions != nil { + ctx, span = otel.GetTracerProvider().Tracer(obsOptions.GetTracerInstrumentationName()).Start(ctx, "CompressionHandler_Intercept") + span.SetAttributes(attribute.Bool("com.microsoft.kiota.handler.compression.enable", true)) + defer span.End() + req = req.WithContext(ctx) + } + + if !reqOption.ShouldCompress() || contentRangeBytesIsPresent(req.Header) || contentEncodingIsPresent(req.Header) || req.Body == nil { + return pipeline.Next(req, middlewareIndex) + } + if span != nil { + span.SetAttributes(attribute.Bool("http.request_body_compressed", true)) + } + + unCompressedBody, err := io.ReadAll(req.Body) + unCompressedContentLength := req.ContentLength + if err != nil { + if span != nil { + span.RecordError(err) + } + return nil, err + } + + compressedBody, size, err := compressReqBody(unCompressedBody) + if err != nil { + if span != nil { + span.RecordError(err) + } + return nil, err + } + + req.Header.Set("Content-Encoding", "gzip") + req.Body = compressedBody + req.ContentLength = int64(size) + + if span != nil { + span.SetAttributes(httpRequestBodySizeAttribute.Int(int(req.ContentLength))) + } + + // Sending request with compressed body + resp, err := pipeline.Next(req, middlewareIndex) + if err != nil { + return nil, err + } + + // If response has status 415 retry request with uncompressed body + if resp.StatusCode == 415 { + delete(req.Header, "Content-Encoding") + req.Body = io.NopCloser(bytes.NewBuffer(unCompressedBody)) + req.ContentLength = unCompressedContentLength + + if span != nil { + span.SetAttributes(httpRequestBodySizeAttribute.Int(int(req.ContentLength)), + httpResponseStatusCodeAttribute.Int(415)) + } + + return pipeline.Next(req, middlewareIndex) + } + + return resp, nil +} + +func contentRangeBytesIsPresent(header http.Header) bool { + contentRanges, _ := header["Content-Range"] + for _, contentRange := range contentRanges { + if strings.Contains(strings.ToLower(contentRange), "bytes") { + return true + } + } + return false +} + +func contentEncodingIsPresent(header http.Header) bool { + _, ok := header["Content-Encoding"] + return ok +} + +func compressReqBody(reqBody []byte) (io.ReadSeekCloser, int, error) { + var buffer bytes.Buffer + gzipWriter := gzip.NewWriter(&buffer) + if _, err := gzipWriter.Write(reqBody); err != nil { + return nil, 0, err + } + + if err := gzipWriter.Close(); err != nil { + return nil, 0, err + } + + reader := bytes.NewReader(buffer.Bytes()) + return NopCloser(reader), buffer.Len(), nil +} diff --git a/vendor/github.com/microsoft/kiota-http-go/headers_inspection_handler.go b/vendor/github.com/microsoft/kiota-http-go/headers_inspection_handler.go new file mode 100644 index 0000000000..d02033ef74 --- /dev/null +++ b/vendor/github.com/microsoft/kiota-http-go/headers_inspection_handler.go @@ -0,0 +1,120 @@ +package nethttplibrary + +import ( + nethttp "net/http" + + abstractions "github.com/microsoft/kiota-abstractions-go" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/trace" +) + +// HeadersInspectionHandlerOptions is the options to use when inspecting headers +type HeadersInspectionOptions struct { + InspectRequestHeaders bool + InspectResponseHeaders bool + RequestHeaders *abstractions.RequestHeaders + ResponseHeaders *abstractions.ResponseHeaders +} + +// NewHeadersInspectionOptions creates a new HeadersInspectionOptions with default options +func NewHeadersInspectionOptions() *HeadersInspectionOptions { + return &HeadersInspectionOptions{ + RequestHeaders: abstractions.NewRequestHeaders(), + ResponseHeaders: abstractions.NewResponseHeaders(), + } +} + +type headersInspectionOptionsInt interface { + abstractions.RequestOption + GetInspectRequestHeaders() bool + GetInspectResponseHeaders() bool + GetRequestHeaders() *abstractions.RequestHeaders + GetResponseHeaders() *abstractions.ResponseHeaders +} + +var headersInspectionKeyValue = abstractions.RequestOptionKey{ + Key: "nethttplibrary.HeadersInspectionOptions", +} + +// GetInspectRequestHeaders returns true if the request headers should be inspected +func (o *HeadersInspectionOptions) GetInspectRequestHeaders() bool { + return o.InspectRequestHeaders +} + +// GetInspectResponseHeaders returns true if the response headers should be inspected +func (o *HeadersInspectionOptions) GetInspectResponseHeaders() bool { + return o.InspectResponseHeaders +} + +// GetRequestHeaders returns the request headers +func (o *HeadersInspectionOptions) GetRequestHeaders() *abstractions.RequestHeaders { + return o.RequestHeaders +} + +// GetResponseHeaders returns the response headers +func (o *HeadersInspectionOptions) GetResponseHeaders() *abstractions.ResponseHeaders { + return o.ResponseHeaders +} + +// GetKey returns the key for the HeadersInspectionOptions +func (o *HeadersInspectionOptions) GetKey() abstractions.RequestOptionKey { + return headersInspectionKeyValue +} + +// HeadersInspectionHandler allows inspecting of the headers of the request and response via a request option +type HeadersInspectionHandler struct { + options HeadersInspectionOptions +} + +// NewHeadersInspectionHandler creates a new HeadersInspectionHandler with default options +func NewHeadersInspectionHandler() *HeadersInspectionHandler { + return NewHeadersInspectionHandlerWithOptions(*NewHeadersInspectionOptions()) +} + +// NewHeadersInspectionHandlerWithOptions creates a new HeadersInspectionHandler with the given options +func NewHeadersInspectionHandlerWithOptions(options HeadersInspectionOptions) *HeadersInspectionHandler { + return &HeadersInspectionHandler{options: options} +} + +// Intercept implements the interface and evaluates whether to retry a failed request. +func (middleware HeadersInspectionHandler) Intercept(pipeline Pipeline, middlewareIndex int, req *nethttp.Request) (*nethttp.Response, error) { + obsOptions := GetObservabilityOptionsFromRequest(req) + ctx := req.Context() + var span trace.Span + var observabilityName string + if obsOptions != nil { + observabilityName = obsOptions.GetTracerInstrumentationName() + ctx, span = otel.GetTracerProvider().Tracer(observabilityName).Start(ctx, "HeadersInspectionHandler_Intercept") + span.SetAttributes(attribute.Bool("com.microsoft.kiota.handler.headersInspection.enable", true)) + defer span.End() + req = req.WithContext(ctx) + } + reqOption, ok := req.Context().Value(headersInspectionKeyValue).(headersInspectionOptionsInt) + if !ok { + reqOption = &middleware.options + } + if reqOption.GetInspectRequestHeaders() { + for k, v := range req.Header { + if len(v) == 1 { + reqOption.GetRequestHeaders().Add(k, v[0]) + } else { + reqOption.GetRequestHeaders().Add(k, v[0], v[1:]...) + } + } + } + response, err := pipeline.Next(req, middlewareIndex) + if err != nil { + return response, err + } + if reqOption.GetInspectResponseHeaders() { + for k, v := range response.Header { + if len(v) == 1 { + reqOption.GetResponseHeaders().Add(k, v[0]) + } else { + reqOption.GetResponseHeaders().Add(k, v[0], v[1:]...) + } + } + } + return response, err +} diff --git a/vendor/github.com/microsoft/kiota-http-go/kiota_client_factory.go b/vendor/github.com/microsoft/kiota-http-go/kiota_client_factory.go index 8700bf14be..df5306b062 100644 --- a/vendor/github.com/microsoft/kiota-http-go/kiota_client_factory.go +++ b/vendor/github.com/microsoft/kiota-http-go/kiota_client_factory.go @@ -3,6 +3,8 @@ package nethttplibrary import ( + "errors" + abs "github.com/microsoft/kiota-abstractions-go" nethttp "net/http" "net/url" "time" @@ -70,17 +72,85 @@ func getDefaultClientWithoutMiddleware() *nethttp.Client { CheckRedirect: func(req *nethttp.Request, via []*nethttp.Request) error { return nethttp.ErrUseLastResponse }, - Timeout: time.Second * 30, + Timeout: time.Second * 100, } } // GetDefaultMiddlewares creates a new default set of middlewares for the Kiota request adapter func GetDefaultMiddlewares() []Middleware { - return []Middleware{ - NewRetryHandler(), - NewRedirectHandler(), - NewCompressionHandler(), - NewParametersNameDecodingHandler(), - NewUserAgentHandler(), + return getDefaultMiddleWare(make(map[abs.RequestOptionKey]Middleware)) +} + +// GetDefaultMiddlewaresWithOptions creates a new default set of middlewares for the Kiota request adapter with options +func GetDefaultMiddlewaresWithOptions(requestOptions ...abs.RequestOption) ([]Middleware, error) { + if len(requestOptions) == 0 { + return GetDefaultMiddlewares(), nil + } + + // map of middleware options + middlewareMap := make(map[abs.RequestOptionKey]Middleware) + + for _, element := range requestOptions { + switch v := element.(type) { + case *RetryHandlerOptions: + middlewareMap[retryKeyValue] = NewRetryHandlerWithOptions(*v) + case *RedirectHandlerOptions: + middlewareMap[redirectKeyValue] = NewRedirectHandlerWithOptions(*v) + case *CompressionOptions: + middlewareMap[compressKey] = NewCompressionHandlerWithOptions(*v) + case CompressionOptions: + println("deprecation notice: function GetDefaultMiddlewaresWithOptions expects a pointer to CompressionOptions. Use the NewCompressionOptionsReference convenience function.") + middlewareMap[compressKey] = NewCompressionHandlerWithOptions(v) + case *ParametersNameDecodingOptions: + middlewareMap[parametersNameDecodingKeyValue] = NewParametersNameDecodingHandlerWithOptions(*v) + case *UserAgentHandlerOptions: + middlewareMap[userAgentKeyValue] = NewUserAgentHandlerWithOptions(v) + case *HeadersInspectionOptions: + middlewareMap[headersInspectionKeyValue] = NewHeadersInspectionHandlerWithOptions(*v) + default: + // none of the above types + return nil, errors.New("unsupported option type") + } + } + + middleware := getDefaultMiddleWare(middlewareMap) + return middleware, nil +} + +// getDefaultMiddleWare creates a new default set of middlewares for the Kiota request adapter +func getDefaultMiddleWare(middlewareMap map[abs.RequestOptionKey]Middleware) []Middleware { + middlewareSource := map[abs.RequestOptionKey]func() Middleware{ + retryKeyValue: func() Middleware { + return NewRetryHandler() + }, + redirectKeyValue: func() Middleware { + return NewRedirectHandler() + }, + compressKey: func() Middleware { + return NewCompressionHandler() + }, + parametersNameDecodingKeyValue: func() Middleware { + return NewParametersNameDecodingHandler() + }, + userAgentKeyValue: func() Middleware { + return NewUserAgentHandler() + }, + headersInspectionKeyValue: func() Middleware { + return NewHeadersInspectionHandler() + }, } + + // loop over middlewareSource and add any middleware that wasn't provided in the requestOptions + for key, value := range middlewareSource { + if _, ok := middlewareMap[key]; !ok { + middlewareMap[key] = value() + } + } + + var middleware []Middleware + for _, value := range middlewareMap { + middleware = append(middleware, value) + } + + return middleware } diff --git a/vendor/github.com/microsoft/kiota-http-go/nethttp_request_adapter.go b/vendor/github.com/microsoft/kiota-http-go/nethttp_request_adapter.go index 79906f2f97..4bf170af64 100644 --- a/vendor/github.com/microsoft/kiota-http-go/nethttp_request_adapter.go +++ b/vendor/github.com/microsoft/kiota-http-go/nethttp_request_adapter.go @@ -4,19 +4,17 @@ import ( "bytes" "context" "errors" - "github.com/microsoft/kiota-abstractions-go/store" "io" - "io/ioutil" nethttp "net/http" "reflect" "regexp" "strconv" "strings" - "time" abs "github.com/microsoft/kiota-abstractions-go" absauth "github.com/microsoft/kiota-abstractions-go/authentication" absser "github.com/microsoft/kiota-abstractions-go/serialization" + "github.com/microsoft/kiota-abstractions-go/store" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" @@ -150,15 +148,15 @@ func (a *NetHttpRequestAdapter) getHttpResponseMessage(ctx context.Context, requ contentLenHeader := response.Header.Get("Content-Length") if contentLenHeader != "" { contentLen, _ := strconv.Atoi(contentLenHeader) - spanForAttributes.SetAttributes(attribute.Int("http.response_content_length", contentLen)) + spanForAttributes.SetAttributes(httpResponseBodySizeAttribute.Int(contentLen)) } contentTypeHeader := response.Header.Get("Content-Type") if contentTypeHeader != "" { - spanForAttributes.SetAttributes(attribute.String("http.response_content_type", contentTypeHeader)) + spanForAttributes.SetAttributes(httpResponseHeaderContentTypeAttribute.String(contentTypeHeader)) } spanForAttributes.SetAttributes( - attribute.Int("http.status_code", response.StatusCode), - attribute.String("http.flavor", response.Proto), + httpResponseStatusCodeAttribute.Int(response.StatusCode), + networkProtocolNameAttribute.String(response.Proto), ) } return a.retryCAEResponseIfRequired(ctx, response, requestInfo, claims, spanForAttributes) @@ -179,7 +177,7 @@ func (a *NetHttpRequestAdapter) retryCAEResponseIfRequired(ctx context.Context, authenticateHeaderVal := response.Header.Get("WWW-Authenticate") if authenticateHeaderVal != "" && reBearer.Match([]byte(authenticateHeaderVal)) { span.AddEvent(AuthenticateChallengedEventKey) - spanForAttributes.SetAttributes(attribute.Int("http.retry_count", 1)) + spanForAttributes.SetAttributes(httpRequestResendCountAttribute.Int(1)) responseClaims := "" parametersRaw := string(reBearer.ReplaceAll([]byte(authenticateHeaderVal), []byte(""))) parameters := strings.Split(parametersRaw, ",") @@ -211,15 +209,14 @@ func (a *NetHttpRequestAdapter) setBaseUrlForRequestInformation(requestInfo *abs requestInfo.PathParameters["baseurl"] = a.GetBaseUrl() } -const requestTimeOutInSeconds = 100 - func (a *NetHttpRequestAdapter) prepareContext(ctx context.Context, requestInfo *abs.RequestInformation) context.Context { if ctx == nil { ctx = context.Background() } // set deadline if not set in receiving context - if _, deadlineSet := ctx.Deadline(); !deadlineSet { - ctx, _ = context.WithTimeout(ctx, time.Second*requestTimeOutInSeconds) + // ignore if timeout is 0 as it means no timeout + if _, deadlineSet := ctx.Deadline(); !deadlineSet && a.httpClient.Timeout != 0 { + ctx, _ = context.WithTimeout(ctx, a.httpClient.Timeout) } for _, value := range requestInfo.GetRequestOptions() { @@ -256,19 +253,19 @@ func (a *NetHttpRequestAdapter) getRequestFromRequestInformation(ctx context.Con if spanForAttributes == nil { spanForAttributes = span } - spanForAttributes.SetAttributes(attribute.String("http.method", requestInfo.Method.String())) + spanForAttributes.SetAttributes(httpRequestMethodAttribute.String(requestInfo.Method.String())) uri, err := requestInfo.GetUri() if err != nil { spanForAttributes.RecordError(err) return nil, err } spanForAttributes.SetAttributes( - attribute.String("http.scheme", uri.Scheme), - attribute.String("http.host", uri.Host), + serverAddressAttribute.String(uri.Scheme), + urlSchemeAttribute.String(uri.Host), ) if a.observabilityOptions.IncludeEUIIAttributes { - spanForAttributes.SetAttributes(attribute.String("http.uri", uri.String())) + spanForAttributes.SetAttributes(urlFullAttribute.String(uri.String())) } request, err := nethttp.NewRequestWithContext(ctx, requestInfo.Method.String(), uri.String(), nil) @@ -293,13 +290,14 @@ func (a *NetHttpRequestAdapter) getRequestFromRequestInformation(ctx context.Con } if request.Header.Get("Content-Type") != "" { spanForAttributes.SetAttributes( - attribute.String("http.request_content_type", request.Header.Get("Content-Type")), + httpRequestHeaderContentTypeAttribute.String(request.Header.Get("Content-Type")), ) } if request.Header.Get("Content-Length") != "" { contentLenVal, _ := strconv.Atoi(request.Header.Get("Content-Length")) + request.ContentLength = int64(contentLenVal) spanForAttributes.SetAttributes( - attribute.Int("http.request_content_length", contentLenVal), + httpRequestBodySizeAttribute.Int(contentLenVal), ) } } @@ -315,7 +313,7 @@ func (a *NetHttpRequestAdapter) startTracingSpan(ctx context.Context, requestInf decodedUriTemplate := decodeUriEncodedString(requestInfo.UrlTemplate, []byte{'-', '.', '~', '$'}) telemetryPathValue := queryParametersCleanupRegex.ReplaceAll([]byte(decodedUriTemplate), []byte("")) ctx, span := otel.GetTracerProvider().Tracer(a.observabilityOptions.GetTracerInstrumentationName()).Start(ctx, methodName+" - "+string(telemetryPathValue)) - span.SetAttributes(attribute.String("http.uri_template", decodedUriTemplate)) + span.SetAttributes(urlUriTemplateAttribute.String(decodedUriTemplate)) return ctx, span } @@ -340,6 +338,9 @@ func (a *NetHttpRequestAdapter) Send(ctx context.Context, requestInfo *abs.Reque span.RecordError(err) return nil, err } + if result == nil { + return nil, nil + } return result.(absser.Parsable), nil } else if response != nil { defer a.purge(response) @@ -397,6 +398,9 @@ func (a *NetHttpRequestAdapter) SendEnum(ctx context.Context, requestInfo *abs.R span.RecordError(err) return nil, err } + if result == nil { + return nil, nil + } return result.(absser.Parsable), nil } else if response != nil { defer a.purge(response) @@ -448,6 +452,9 @@ func (a *NetHttpRequestAdapter) SendCollection(ctx context.Context, requestInfo span.RecordError(err) return nil, err } + if result == nil { + return nil, nil + } return result.([]absser.Parsable), nil } else if response != nil { defer a.purge(response) @@ -499,6 +506,9 @@ func (a *NetHttpRequestAdapter) SendEnumCollection(ctx context.Context, requestI span.RecordError(err) return nil, err } + if result == nil { + return nil, nil + } return result.([]any), nil } else if response != nil { defer a.purge(response) @@ -558,6 +568,9 @@ func (a *NetHttpRequestAdapter) SendPrimitive(ctx context.Context, requestInfo * span.RecordError(err) return nil, err } + if result == nil { + return nil, nil + } return result.(absser.Parsable), nil } else if response != nil { defer a.purge(response) @@ -569,7 +582,7 @@ func (a *NetHttpRequestAdapter) SendPrimitive(ctx context.Context, requestInfo * return nil, nil } if typeName == "[]byte" { - res, err := ioutil.ReadAll(response.Body) + res, err := io.ReadAll(response.Body) if err != nil { span.RecordError(err) return nil, err @@ -639,6 +652,9 @@ func (a *NetHttpRequestAdapter) SendPrimitiveCollection(ctx context.Context, req span.RecordError(err) return nil, err } + if result == nil { + return nil, nil + } return result.([]any), nil } else if response != nil { defer a.purge(response) @@ -705,7 +721,12 @@ func (a *NetHttpRequestAdapter) SendNoContent(ctx context.Context, requestInfo * func (a *NetHttpRequestAdapter) getRootParseNode(ctx context.Context, response *nethttp.Response, spanForAttributes trace.Span) (absser.ParseNode, context.Context, error) { ctx, span := otel.GetTracerProvider().Tracer(a.observabilityOptions.GetTracerInstrumentationName()).Start(ctx, "getRootParseNode") defer span.End() - body, err := ioutil.ReadAll(response.Body) + + if response.ContentLength == 0 { + return nil, ctx, nil + } + + body, err := io.ReadAll(response.Body) if err != nil { spanForAttributes.RecordError(err) return nil, ctx, err @@ -721,7 +742,7 @@ func (a *NetHttpRequestAdapter) getRootParseNode(ctx context.Context, response * return rootNode, ctx, err } func (a *NetHttpRequestAdapter) purge(response *nethttp.Response) error { - _, _ = ioutil.ReadAll(response.Body) //we don't care about errors comming from reading the body, just trying to purge anything that maybe left + _, _ = io.ReadAll(response.Body) //we don't care about errors comming from reading the body, just trying to purge anything that maybe left err := response.Body.Close() if err != nil { return err @@ -747,6 +768,12 @@ func (a *NetHttpRequestAdapter) throwIfFailedResponse(ctx context.Context, respo spanForAttributes.SetStatus(codes.Error, "received_error_response") statusAsString := strconv.Itoa(response.StatusCode) + responseHeaders := abs.NewResponseHeaders() + for key, values := range response.Header { + for i := range values { + responseHeaders.Add(key, values[i]) + } + } var errorCtor absser.ParsableFactory = nil if len(errorMappings) != 0 { if errorMappings[statusAsString] != nil { @@ -755,6 +782,8 @@ func (a *NetHttpRequestAdapter) throwIfFailedResponse(ctx context.Context, respo errorCtor = errorMappings["4XX"] } else if response.StatusCode >= 500 && response.StatusCode < 600 && errorMappings["5XX"] != nil { errorCtor = errorMappings["5XX"] + } else if errorMappings["XXX"] != nil && response.StatusCode >= 400 && response.StatusCode < 600 { + errorCtor = errorMappings["XXX"] } } @@ -763,6 +792,7 @@ func (a *NetHttpRequestAdapter) throwIfFailedResponse(ctx context.Context, respo err := &abs.ApiError{ Message: "The server returned an unexpected status code and no error factory is registered for this code: " + statusAsString, ResponseStatusCode: response.StatusCode, + ResponseHeaders: responseHeaders, } spanForAttributes.RecordError(err) return err @@ -779,6 +809,7 @@ func (a *NetHttpRequestAdapter) throwIfFailedResponse(ctx context.Context, respo err := &abs.ApiError{ Message: "The server returned an unexpected status code with no response body: " + statusAsString, ResponseStatusCode: response.StatusCode, + ResponseHeaders: responseHeaders, } spanForAttributes.RecordError(err) return err @@ -790,18 +821,26 @@ func (a *NetHttpRequestAdapter) throwIfFailedResponse(ctx context.Context, respo errValue, err := rootNode.GetObjectValue(errorCtor) if err != nil { spanForAttributes.RecordError(err) - if apiError, ok := err.(*abs.ApiError); ok { - apiError.ResponseStatusCode = response.StatusCode + if apiErrorable, ok := err.(abs.ApiErrorable); ok { + apiErrorable.SetResponseHeaders(responseHeaders) + apiErrorable.SetStatusCode(response.StatusCode) } return err } else if errValue == nil { return &abs.ApiError{ Message: "The server returned an unexpected status code but the error could not be deserialized: " + statusAsString, ResponseStatusCode: response.StatusCode, + ResponseHeaders: responseHeaders, } } + if apiErrorable, ok := errValue.(abs.ApiErrorable); ok { + apiErrorable.SetResponseHeaders(responseHeaders) + apiErrorable.SetStatusCode(response.StatusCode) + } + err = errValue.(error) + spanForAttributes.RecordError(err) return err } diff --git a/vendor/github.com/microsoft/kiota-http-go/parameters_name_decoding_handler.go b/vendor/github.com/microsoft/kiota-http-go/parameters_name_decoding_handler.go index 5d66c8ee5e..3a169caf5c 100644 --- a/vendor/github.com/microsoft/kiota-http-go/parameters_name_decoding_handler.go +++ b/vendor/github.com/microsoft/kiota-http-go/parameters_name_decoding_handler.go @@ -71,7 +71,6 @@ func (handler *ParametersNameDecodingHandler) Intercept(pipeline Pipeline, middl ctx := req.Context() if obsOptions != nil { ctx, span := otel.GetTracerProvider().Tracer(obsOptions.GetTracerInstrumentationName()).Start(ctx, "ParametersNameDecodingHandler_Intercept") - span.SetAttributes(attribute.Bool("com.microsoft.kiota.handler.parameters_name_decoding.enable", reqOption.GetEnable())) req = req.WithContext(ctx) defer span.End() diff --git a/vendor/github.com/microsoft/kiota-http-go/pipeline.go b/vendor/github.com/microsoft/kiota-http-go/pipeline.go index 0135ac1a34..3112abf48a 100644 --- a/vendor/github.com/microsoft/kiota-http-go/pipeline.go +++ b/vendor/github.com/microsoft/kiota-http-go/pipeline.go @@ -60,7 +60,11 @@ func (transport *customTransport) RoundTrip(req *nethttp.Request) (*nethttp.Resp // GetDefaultTransport returns the default http transport used by the library func GetDefaultTransport() nethttp.RoundTripper { - defaultTransport := nethttp.DefaultTransport.(*nethttp.Transport).Clone() + defaultTransport, ok := nethttp.DefaultTransport.(*nethttp.Transport) + if !ok { + return nethttp.DefaultTransport + } + defaultTransport = defaultTransport.Clone() defaultTransport.ForceAttemptHTTP2 = true defaultTransport.DisableCompression = false return defaultTransport diff --git a/vendor/github.com/microsoft/kiota-http-go/redirect_handler.go b/vendor/github.com/microsoft/kiota-http-go/redirect_handler.go index bbbdb5faf0..f6f63bb1a2 100644 --- a/vendor/github.com/microsoft/kiota-http-go/redirect_handler.go +++ b/vendor/github.com/microsoft/kiota-http-go/redirect_handler.go @@ -1,176 +1,179 @@ -package nethttplibrary - -import ( - "context" - "errors" - "fmt" - nethttp "net/http" - "net/url" - "strings" - - abs "github.com/microsoft/kiota-abstractions-go" - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/trace" -) - -// RedirectHandler handles redirect responses and follows them according to the options specified. -type RedirectHandler struct { - // options to use when evaluating whether to redirect or not - options RedirectHandlerOptions -} - -// NewRedirectHandler creates a new redirect handler with the default options. -func NewRedirectHandler() *RedirectHandler { - return NewRedirectHandlerWithOptions(RedirectHandlerOptions{ - MaxRedirects: defaultMaxRedirects, - ShouldRedirect: func(req *nethttp.Request, res *nethttp.Response) bool { - return true - }, - }) -} - -// NewRedirectHandlerWithOptions creates a new redirect handler with the specified options. -func NewRedirectHandlerWithOptions(options RedirectHandlerOptions) *RedirectHandler { - return &RedirectHandler{options: options} -} - -// RedirectHandlerOptions to use when evaluating whether to redirect or not. -type RedirectHandlerOptions struct { - // A callback that determines whether to redirect or not. - ShouldRedirect func(req *nethttp.Request, res *nethttp.Response) bool - // The maximum number of redirects to follow. - MaxRedirects int -} - -var redirectKeyValue = abs.RequestOptionKey{ - Key: "RedirectHandler", -} - -type redirectHandlerOptionsInt interface { - abs.RequestOption - GetShouldRedirect() func(req *nethttp.Request, res *nethttp.Response) bool - GetMaxRedirect() int -} - -// GetKey returns the key value to be used when the option is added to the request context -func (options *RedirectHandlerOptions) GetKey() abs.RequestOptionKey { - return redirectKeyValue -} - -// GetShouldRedirect returns the redirection evaluation function. -func (options *RedirectHandlerOptions) GetShouldRedirect() func(req *nethttp.Request, res *nethttp.Response) bool { - return options.ShouldRedirect -} - -// GetMaxRedirect returns the maximum number of redirects to follow. -func (options *RedirectHandlerOptions) GetMaxRedirect() int { - if options == nil || options.MaxRedirects < 1 { - return defaultMaxRedirects - } else if options.MaxRedirects > absoluteMaxRedirects { - return absoluteMaxRedirects - } else { - return options.MaxRedirects - } -} - -const defaultMaxRedirects = 5 -const absoluteMaxRedirects = 20 -const movedPermanently = 301 -const found = 302 -const seeOther = 303 -const temporaryRedirect = 307 -const permanentRedirect = 308 -const locationHeader = "Location" - -// Intercept implements the interface and evaluates whether to follow a redirect response. -func (middleware RedirectHandler) Intercept(pipeline Pipeline, middlewareIndex int, req *nethttp.Request) (*nethttp.Response, error) { - obsOptions := GetObservabilityOptionsFromRequest(req) - ctx := req.Context() - var span trace.Span - var observabilityName string - if obsOptions != nil { - observabilityName = obsOptions.GetTracerInstrumentationName() - ctx, span = otel.GetTracerProvider().Tracer(observabilityName).Start(ctx, "RedirectHandler_Intercept") - span.SetAttributes(attribute.Bool("com.microsoft.kiota.handler.redirect.enable", true)) - defer span.End() - req = req.WithContext(ctx) - } - response, err := pipeline.Next(req, middlewareIndex) - if err != nil { - return response, err - } - reqOption, ok := req.Context().Value(redirectKeyValue).(redirectHandlerOptionsInt) - if !ok { - reqOption = &middleware.options - } - return middleware.redirectRequest(ctx, pipeline, middlewareIndex, reqOption, req, response, 0, observabilityName) -} - -func (middleware RedirectHandler) redirectRequest(ctx context.Context, pipeline Pipeline, middlewareIndex int, reqOption redirectHandlerOptionsInt, req *nethttp.Request, response *nethttp.Response, redirectCount int, observabilityName string) (*nethttp.Response, error) { - shouldRedirect := reqOption.GetShouldRedirect() != nil && reqOption.GetShouldRedirect()(req, response) || reqOption.GetShouldRedirect() == nil - if middleware.isRedirectResponse(response) && - redirectCount < reqOption.GetMaxRedirect() && - shouldRedirect { - redirectCount++ - redirectRequest, err := middleware.getRedirectRequest(req, response) - if err != nil { - return response, err - } - if observabilityName != "" { - ctx, span := otel.GetTracerProvider().Tracer(observabilityName).Start(ctx, "RedirectHandler_Intercept - redirect "+fmt.Sprint(redirectCount)) - span.SetAttributes(attribute.Int("com.microsoft.kiota.handler.redirect.count", redirectCount), - attribute.Int("http.status_code", response.StatusCode), - ) - defer span.End() - redirectRequest = redirectRequest.WithContext(ctx) - } - - result, err := pipeline.Next(redirectRequest, middlewareIndex) - if err != nil { - return result, err - } - return middleware.redirectRequest(ctx, pipeline, middlewareIndex, reqOption, redirectRequest, result, redirectCount, observabilityName) - } - return response, nil -} - -func (middleware RedirectHandler) isRedirectResponse(response *nethttp.Response) bool { - if response == nil { - return false - } - locationHeader := response.Header.Get(locationHeader) - if locationHeader == "" { - return false - } - statusCode := response.StatusCode - return statusCode == movedPermanently || statusCode == found || statusCode == seeOther || statusCode == temporaryRedirect || statusCode == permanentRedirect -} - -func (middleware RedirectHandler) getRedirectRequest(request *nethttp.Request, response *nethttp.Response) (*nethttp.Request, error) { - if request == nil || response == nil { - return nil, errors.New("request or response is nil") - } - locationHeaderValue := response.Header.Get(locationHeader) - if locationHeaderValue[0] == '/' { - locationHeaderValue = request.URL.Scheme + "://" + request.URL.Host + locationHeaderValue - } - result := request.Clone(request.Context()) - targetUrl, err := url.Parse(locationHeaderValue) - if err != nil { - return nil, err - } - result.URL = targetUrl - sameHost := strings.EqualFold(targetUrl.Host, request.URL.Host) - sameScheme := strings.EqualFold(targetUrl.Scheme, request.URL.Scheme) - if !sameHost || !sameScheme { - result.Header.Del("Authorization") - } - if response.StatusCode == seeOther { - result.Method = nethttp.MethodGet - result.Header.Del("Content-Type") - result.Header.Del("Content-Length") - result.Body = nil - } - return result, nil -} +package nethttplibrary + +import ( + "context" + "errors" + "fmt" + nethttp "net/http" + "net/url" + "strings" + + abs "github.com/microsoft/kiota-abstractions-go" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/trace" +) + +// RedirectHandler handles redirect responses and follows them according to the options specified. +type RedirectHandler struct { + // options to use when evaluating whether to redirect or not + options RedirectHandlerOptions +} + +// NewRedirectHandler creates a new redirect handler with the default options. +func NewRedirectHandler() *RedirectHandler { + return NewRedirectHandlerWithOptions(RedirectHandlerOptions{ + MaxRedirects: defaultMaxRedirects, + ShouldRedirect: func(req *nethttp.Request, res *nethttp.Response) bool { + return true + }, + }) +} + +// NewRedirectHandlerWithOptions creates a new redirect handler with the specified options. +func NewRedirectHandlerWithOptions(options RedirectHandlerOptions) *RedirectHandler { + return &RedirectHandler{options: options} +} + +// RedirectHandlerOptions to use when evaluating whether to redirect or not. +type RedirectHandlerOptions struct { + // A callback that determines whether to redirect or not. + ShouldRedirect func(req *nethttp.Request, res *nethttp.Response) bool + // The maximum number of redirects to follow. + MaxRedirects int +} + +var redirectKeyValue = abs.RequestOptionKey{ + Key: "RedirectHandler", +} + +type redirectHandlerOptionsInt interface { + abs.RequestOption + GetShouldRedirect() func(req *nethttp.Request, res *nethttp.Response) bool + GetMaxRedirect() int +} + +// GetKey returns the key value to be used when the option is added to the request context +func (options *RedirectHandlerOptions) GetKey() abs.RequestOptionKey { + return redirectKeyValue +} + +// GetShouldRedirect returns the redirection evaluation function. +func (options *RedirectHandlerOptions) GetShouldRedirect() func(req *nethttp.Request, res *nethttp.Response) bool { + return options.ShouldRedirect +} + +// GetMaxRedirect returns the maximum number of redirects to follow. +func (options *RedirectHandlerOptions) GetMaxRedirect() int { + if options == nil || options.MaxRedirects < 1 { + return defaultMaxRedirects + } else if options.MaxRedirects > absoluteMaxRedirects { + return absoluteMaxRedirects + } else { + return options.MaxRedirects + } +} + +const defaultMaxRedirects = 5 +const absoluteMaxRedirects = 20 +const movedPermanently = 301 +const found = 302 +const seeOther = 303 +const temporaryRedirect = 307 +const permanentRedirect = 308 +const locationHeader = "Location" + +// Intercept implements the interface and evaluates whether to follow a redirect response. +func (middleware RedirectHandler) Intercept(pipeline Pipeline, middlewareIndex int, req *nethttp.Request) (*nethttp.Response, error) { + obsOptions := GetObservabilityOptionsFromRequest(req) + ctx := req.Context() + var span trace.Span + var observabilityName string + if obsOptions != nil { + observabilityName = obsOptions.GetTracerInstrumentationName() + ctx, span = otel.GetTracerProvider().Tracer(observabilityName).Start(ctx, "RedirectHandler_Intercept") + span.SetAttributes(attribute.Bool("com.microsoft.kiota.handler.redirect.enable", true)) + defer span.End() + req = req.WithContext(ctx) + } + response, err := pipeline.Next(req, middlewareIndex) + if err != nil { + return response, err + } + reqOption, ok := req.Context().Value(redirectKeyValue).(redirectHandlerOptionsInt) + if !ok { + reqOption = &middleware.options + } + return middleware.redirectRequest(ctx, pipeline, middlewareIndex, reqOption, req, response, 0, observabilityName) +} + +func (middleware RedirectHandler) redirectRequest(ctx context.Context, pipeline Pipeline, middlewareIndex int, reqOption redirectHandlerOptionsInt, req *nethttp.Request, response *nethttp.Response, redirectCount int, observabilityName string) (*nethttp.Response, error) { + shouldRedirect := reqOption.GetShouldRedirect() != nil && reqOption.GetShouldRedirect()(req, response) || reqOption.GetShouldRedirect() == nil + if middleware.isRedirectResponse(response) && + redirectCount < reqOption.GetMaxRedirect() && + shouldRedirect { + redirectCount++ + redirectRequest, err := middleware.getRedirectRequest(req, response) + if err != nil { + return response, err + } + if observabilityName != "" { + ctx, span := otel.GetTracerProvider().Tracer(observabilityName).Start(ctx, "RedirectHandler_Intercept - redirect "+fmt.Sprint(redirectCount)) + span.SetAttributes(attribute.Int("com.microsoft.kiota.handler.redirect.count", redirectCount), + httpResponseStatusCodeAttribute.Int(response.StatusCode), + ) + defer span.End() + redirectRequest = redirectRequest.WithContext(ctx) + } + + result, err := pipeline.Next(redirectRequest, middlewareIndex) + if err != nil { + return result, err + } + return middleware.redirectRequest(ctx, pipeline, middlewareIndex, reqOption, redirectRequest, result, redirectCount, observabilityName) + } + return response, nil +} + +func (middleware RedirectHandler) isRedirectResponse(response *nethttp.Response) bool { + if response == nil { + return false + } + locationHeader := response.Header.Get(locationHeader) + if locationHeader == "" { + return false + } + statusCode := response.StatusCode + return statusCode == movedPermanently || statusCode == found || statusCode == seeOther || statusCode == temporaryRedirect || statusCode == permanentRedirect +} + +func (middleware RedirectHandler) getRedirectRequest(request *nethttp.Request, response *nethttp.Response) (*nethttp.Request, error) { + if request == nil || response == nil { + return nil, errors.New("request or response is nil") + } + locationHeaderValue := response.Header.Get(locationHeader) + if locationHeaderValue[0] == '/' { + locationHeaderValue = request.URL.Scheme + "://" + request.URL.Host + locationHeaderValue + } + result := request.Clone(request.Context()) + targetUrl, err := url.Parse(locationHeaderValue) + if err != nil { + return nil, err + } + result.URL = targetUrl + if result.Host != targetUrl.Host { + result.Host = targetUrl.Host + } + sameHost := strings.EqualFold(targetUrl.Host, request.URL.Host) + sameScheme := strings.EqualFold(targetUrl.Scheme, request.URL.Scheme) + if !sameHost || !sameScheme { + result.Header.Del("Authorization") + } + if response.StatusCode == seeOther { + result.Method = nethttp.MethodGet + result.Header.Del("Content-Type") + result.Header.Del("Content-Length") + result.Body = nil + } + return result, nil +} diff --git a/vendor/github.com/microsoft/kiota-http-go/release-please-config.json b/vendor/github.com/microsoft/kiota-http-go/release-please-config.json new file mode 100644 index 0000000000..3eff8e19d4 --- /dev/null +++ b/vendor/github.com/microsoft/kiota-http-go/release-please-config.json @@ -0,0 +1,17 @@ +{ + "release-type": "go", + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": true, + "include-component-in-tag": false, + "include-v-in-tag": true, + "packages": { + ".": { + "package-name": "github.com/microsoft/kiota-http-go", + "changelog-path": "CHANGELOG.md", + "extra-files": [ + "user_agent_handler.go" + ] + } + }, + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" + } diff --git a/vendor/github.com/microsoft/kiota-http-go/retry_handler.go b/vendor/github.com/microsoft/kiota-http-go/retry_handler.go index ee60aa8861..e1bc1ec3d6 100644 --- a/vendor/github.com/microsoft/kiota-http-go/retry_handler.go +++ b/vendor/github.com/microsoft/kiota-http-go/retry_handler.go @@ -1,181 +1,204 @@ -package nethttplibrary - -import ( - "context" - "fmt" - "io" - "math" - nethttp "net/http" - "strconv" - "time" - - abs "github.com/microsoft/kiota-abstractions-go" - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/trace" -) - -// RetryHandler handles transient HTTP responses and retries the request given the retry options -type RetryHandler struct { - // default options to use when evaluating the response - options RetryHandlerOptions -} - -// NewRetryHandler creates a new RetryHandler with default options -func NewRetryHandler() *RetryHandler { - return NewRetryHandlerWithOptions(RetryHandlerOptions{ - ShouldRetry: func(delay time.Duration, executionCount int, request *nethttp.Request, response *nethttp.Response) bool { - return true - }, - }) -} - -// NewRetryHandlerWithOptions creates a new RetryHandler with the given options -func NewRetryHandlerWithOptions(options RetryHandlerOptions) *RetryHandler { - return &RetryHandler{options: options} -} - -const defaultMaxRetries = 3 -const absoluteMaxRetries = 10 -const defaultDelaySeconds = 3 -const absoluteMaxDelaySeconds = 180 - -// RetryHandlerOptions to apply when evaluating the response for retrial -type RetryHandlerOptions struct { - // Callback to determine if the request should be retried - ShouldRetry func(delay time.Duration, executionCount int, request *nethttp.Request, response *nethttp.Response) bool - // The maximum number of times a request can be retried - MaxRetries int - // The delay in seconds between retries - DelaySeconds int -} - -type retryHandlerOptionsInt interface { - abs.RequestOption - GetShouldRetry() func(delay time.Duration, executionCount int, request *nethttp.Request, response *nethttp.Response) bool - GetDelaySeconds() int - GetMaxRetries() int -} - -var retryKeyValue = abs.RequestOptionKey{ - Key: "RetryHandler", -} - -// GetKey returns the key value to be used when the option is added to the request context -func (options *RetryHandlerOptions) GetKey() abs.RequestOptionKey { - return retryKeyValue -} - -// GetShouldRetry returns the should retry callback function which evaluates the response for retrial -func (options *RetryHandlerOptions) GetShouldRetry() func(delay time.Duration, executionCount int, request *nethttp.Request, response *nethttp.Response) bool { - return options.ShouldRetry -} - -// GetDelaySeconds returns the delays in seconds between retries -func (options *RetryHandlerOptions) GetDelaySeconds() int { - if options.DelaySeconds < 1 { - return defaultDelaySeconds - } else if options.DelaySeconds > absoluteMaxDelaySeconds { - return absoluteMaxDelaySeconds - } else { - return options.DelaySeconds - } -} - -// GetMaxRetries returns the maximum number of times a request can be retried -func (options *RetryHandlerOptions) GetMaxRetries() int { - if options.MaxRetries < 1 { - return defaultMaxRetries - } else if options.MaxRetries > absoluteMaxRetries { - return absoluteMaxRetries - } else { - return options.MaxRetries - } -} - -const retryAttemptHeader = "Retry-Attempt" -const retryAfterHeader = "Retry-After" - -const tooManyRequests = 429 -const serviceUnavailable = 503 -const gatewayTimeout = 504 - -// Intercept implements the interface and evaluates whether to retry a failed request. -func (middleware RetryHandler) Intercept(pipeline Pipeline, middlewareIndex int, req *nethttp.Request) (*nethttp.Response, error) { - obsOptions := GetObservabilityOptionsFromRequest(req) - ctx := req.Context() - var span trace.Span - var observabilityName string - if obsOptions != nil { - observabilityName = obsOptions.GetTracerInstrumentationName() - ctx, span = otel.GetTracerProvider().Tracer(observabilityName).Start(ctx, "RetryHandler_Intercept") - span.SetAttributes(attribute.Bool("com.microsoft.kiota.handler.retry.enable", true)) - defer span.End() - req = req.WithContext(ctx) - } - response, err := pipeline.Next(req, middlewareIndex) - if err != nil { - return response, err - } - reqOption, ok := req.Context().Value(retryKeyValue).(retryHandlerOptionsInt) - if !ok { - reqOption = &middleware.options - } - return middleware.retryRequest(ctx, pipeline, middlewareIndex, reqOption, req, response, 0, 0, observabilityName) -} - -func (middleware RetryHandler) retryRequest(ctx context.Context, pipeline Pipeline, middlewareIndex int, options retryHandlerOptionsInt, req *nethttp.Request, resp *nethttp.Response, executionCount int, cumulativeDelay time.Duration, observabilityName string) (*nethttp.Response, error) { - if middleware.isRetriableErrorCode(resp.StatusCode) && - middleware.isRetriableRequest(req) && - executionCount < options.GetMaxRetries() && - cumulativeDelay < time.Duration(absoluteMaxDelaySeconds)*time.Second && - options.GetShouldRetry()(cumulativeDelay, executionCount, req, resp) { - executionCount++ - delay := middleware.getRetryDelay(req, resp, options, executionCount) - cumulativeDelay += delay - req.Header.Set(retryAttemptHeader, strconv.Itoa(executionCount)) - if req.Body != nil { - s, ok := req.Body.(io.Seeker) - if ok { - s.Seek(0, io.SeekStart) - } - } - if observabilityName != "" { - ctx, span := otel.GetTracerProvider().Tracer(observabilityName).Start(ctx, "RetryHandler_Intercept - attempt "+fmt.Sprint(executionCount)) - span.SetAttributes(attribute.Int("http.retry_count", executionCount), - attribute.Int("http.status_code", resp.StatusCode), - ) - defer span.End() - req = req.WithContext(ctx) - } - time.Sleep(delay) - response, err := pipeline.Next(req, middlewareIndex) - if err != nil { - return response, err - } - return middleware.retryRequest(ctx, pipeline, middlewareIndex, options, req, response, executionCount, cumulativeDelay, observabilityName) - } - return resp, nil -} - -func (middleware RetryHandler) isRetriableErrorCode(code int) bool { - return code == tooManyRequests || code == serviceUnavailable || code == gatewayTimeout -} -func (middleware RetryHandler) isRetriableRequest(req *nethttp.Request) bool { - isBodiedMethod := req.Method == "POST" || req.Method == "PUT" || req.Method == "PATCH" - if isBodiedMethod && req.Body != nil { - return req.ContentLength != -1 - } - return true -} - -func (middleware RetryHandler) getRetryDelay(req *nethttp.Request, resp *nethttp.Response, options retryHandlerOptionsInt, executionCount int) time.Duration { - retryAfter := resp.Header.Get(retryAfterHeader) - if retryAfter != "" { - retryAfterDelay, err := strconv.ParseFloat(retryAfter, 64) - if err == nil { - return time.Duration(retryAfterDelay) * time.Second - } - } //TODO parse the header if it's a date - return time.Duration(math.Pow(float64(options.GetDelaySeconds()), float64(executionCount))) * time.Second -} +package nethttplibrary + +import ( + "context" + "fmt" + "io" + "math/rand" + nethttp "net/http" + "strconv" + "time" + + abs "github.com/microsoft/kiota-abstractions-go" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/trace" +) + +// RetryHandler handles transient HTTP responses and retries the request given the retry options +type RetryHandler struct { + // default options to use when evaluating the response + options RetryHandlerOptions +} + +// NewRetryHandler creates a new RetryHandler with default options +func NewRetryHandler() *RetryHandler { + return NewRetryHandlerWithOptions(RetryHandlerOptions{ + ShouldRetry: func(delay time.Duration, executionCount int, request *nethttp.Request, response *nethttp.Response) bool { + return true + }, + }) +} + +// NewRetryHandlerWithOptions creates a new RetryHandler with the given options +func NewRetryHandlerWithOptions(options RetryHandlerOptions) *RetryHandler { + return &RetryHandler{options: options} +} + +const defaultMaxRetries = 3 +const absoluteMaxRetries = 10 +const defaultDelaySeconds = 3 +const absoluteMaxDelaySeconds = 180 + +// RetryHandlerOptions to apply when evaluating the response for retrial +type RetryHandlerOptions struct { + // Callback to determine if the request should be retried + ShouldRetry func(delay time.Duration, executionCount int, request *nethttp.Request, response *nethttp.Response) bool + // The maximum number of times a request can be retried + MaxRetries int + // The delay in seconds between retries + DelaySeconds int +} + +type retryHandlerOptionsInt interface { + abs.RequestOption + GetShouldRetry() func(delay time.Duration, executionCount int, request *nethttp.Request, response *nethttp.Response) bool + GetDelaySeconds() int + GetMaxRetries() int +} + +var retryKeyValue = abs.RequestOptionKey{ + Key: "RetryHandler", +} + +// GetKey returns the key value to be used when the option is added to the request context +func (options *RetryHandlerOptions) GetKey() abs.RequestOptionKey { + return retryKeyValue +} + +// GetShouldRetry returns the should retry callback function which evaluates the response for retrial +func (options *RetryHandlerOptions) GetShouldRetry() func(delay time.Duration, executionCount int, request *nethttp.Request, response *nethttp.Response) bool { + return options.ShouldRetry +} + +// GetDelaySeconds returns the delays in seconds between retries +func (options *RetryHandlerOptions) GetDelaySeconds() int { + if options.DelaySeconds < 1 { + return defaultDelaySeconds + } else if options.DelaySeconds > absoluteMaxDelaySeconds { + return absoluteMaxDelaySeconds + } else { + return options.DelaySeconds + } +} + +// GetMaxRetries returns the maximum number of times a request can be retried +func (options *RetryHandlerOptions) GetMaxRetries() int { + if options.MaxRetries < 1 { + return defaultMaxRetries + } else if options.MaxRetries > absoluteMaxRetries { + return absoluteMaxRetries + } else { + return options.MaxRetries + } +} + +const retryAttemptHeader = "Retry-Attempt" +const retryAfterHeader = "Retry-After" + +const tooManyRequests = 429 +const serviceUnavailable = 503 +const gatewayTimeout = 504 + +// Intercept implements the interface and evaluates whether to retry a failed request. +func (middleware RetryHandler) Intercept(pipeline Pipeline, middlewareIndex int, req *nethttp.Request) (*nethttp.Response, error) { + obsOptions := GetObservabilityOptionsFromRequest(req) + ctx := req.Context() + var span trace.Span + var observabilityName string + if obsOptions != nil { + observabilityName = obsOptions.GetTracerInstrumentationName() + ctx, span = otel.GetTracerProvider().Tracer(observabilityName).Start(ctx, "RetryHandler_Intercept") + span.SetAttributes(attribute.Bool("com.microsoft.kiota.handler.retry.enable", true)) + defer span.End() + req = req.WithContext(ctx) + } + response, err := pipeline.Next(req, middlewareIndex) + if err != nil { + return response, err + } + reqOption, ok := req.Context().Value(retryKeyValue).(retryHandlerOptionsInt) + if !ok { + reqOption = &middleware.options + } + return middleware.retryRequest(ctx, pipeline, middlewareIndex, reqOption, req, response, 0, 0, observabilityName) +} + +func (middleware RetryHandler) retryRequest(ctx context.Context, pipeline Pipeline, middlewareIndex int, options retryHandlerOptionsInt, req *nethttp.Request, resp *nethttp.Response, executionCount int, cumulativeDelay time.Duration, observabilityName string) (*nethttp.Response, error) { + if middleware.isRetriableErrorCode(resp.StatusCode) && + middleware.isRetriableRequest(req) && + executionCount < options.GetMaxRetries() && + cumulativeDelay < time.Duration(absoluteMaxDelaySeconds)*time.Second && + options.GetShouldRetry()(cumulativeDelay, executionCount, req, resp) { + executionCount++ + delay := middleware.getRetryDelay(req, resp, options, executionCount) + cumulativeDelay += delay + req.Header.Set(retryAttemptHeader, strconv.Itoa(executionCount)) + if req.Body != nil { + s, ok := req.Body.(io.Seeker) + if ok { + s.Seek(0, io.SeekStart) + } + } + if observabilityName != "" { + ctx, span := otel.GetTracerProvider().Tracer(observabilityName).Start(ctx, "RetryHandler_Intercept - attempt "+fmt.Sprint(executionCount)) + span.SetAttributes(attribute.Int("http.request.resend_count", executionCount), + + httpResponseStatusCodeAttribute.Int(resp.StatusCode), + attribute.Float64("http.request.resend_delay", delay.Seconds()), + ) + defer span.End() + req = req.WithContext(ctx) + } + t := time.NewTimer(delay) + select { + case <-ctx.Done(): + // Return without retrying if the context was cancelled. + return nil, ctx.Err() + + // Leaving this case empty causes it to exit the switch-block. + case <-t.C: + } + response, err := pipeline.Next(req, middlewareIndex) + if err != nil { + return response, err + } + return middleware.retryRequest(ctx, pipeline, middlewareIndex, options, req, response, executionCount, cumulativeDelay, observabilityName) + } + return resp, nil +} + +func (middleware RetryHandler) isRetriableErrorCode(code int) bool { + return code == tooManyRequests || code == serviceUnavailable || code == gatewayTimeout +} +func (middleware RetryHandler) isRetriableRequest(req *nethttp.Request) bool { + isBodiedMethod := req.Method == "POST" || req.Method == "PUT" || req.Method == "PATCH" + if isBodiedMethod && req.Body != nil { + return req.ContentLength != -1 + } + return true +} + +func (middleware RetryHandler) getRetryDelay(req *nethttp.Request, resp *nethttp.Response, options retryHandlerOptionsInt, executionCount int) time.Duration { + retryAfter := resp.Header.Get(retryAfterHeader) + if retryAfter != "" { + retryAfterDelay, err := strconv.ParseFloat(retryAfter, 64) + if err == nil { + return time.Duration(retryAfterDelay) * time.Second + } + + // parse the header if it's a date + t, err := time.Parse(time.RFC1123, retryAfter) + if err == nil { + return t.Sub(time.Now()) + } + } + return exponentialBackOffDelay(options.GetDelaySeconds(), executionCount) +} + +func exponentialBackOffDelay(delaySeconds, executionCount int) time.Duration { + exp := executionCount - 1 // executionCount is 1 for first retry + delay := time.Duration(delaySeconds*(1<[optional scope]: + + + + +``` + +The recommended commit types used are: + + - **feat** for feature updates (increments the _minor_ version) + - **fix** for bug fixes (increments the _patch_ version) + - **perf** for performance related changes e.g. optimizing an algorithm + - **refactor** for code refactoring changes + - **test** for test suite updates e.g. adding a test or fixing a test + - **style** for changes that don't affect the meaning of code. e.g. formatting changes + - **docs** for documentation updates e.g. ReadMe update or code documentation updates + - **build** for build system changes (gradle updates, external dependency updates) + - **ci** for CI configuration file changes e.g. updating a pipeline + - **chore** for miscallaneous non-sdk changesin the repo e.g. removing an unused file + +Adding a footer with the prefix **BREAKING CHANGE:** will cause an increment of the _major_ version. \ No newline at end of file diff --git a/vendor/github.com/microsoft/kiota-serialization-form-go/release-please-config.json b/vendor/github.com/microsoft/kiota-serialization-form-go/release-please-config.json new file mode 100644 index 0000000000..7260f9119c --- /dev/null +++ b/vendor/github.com/microsoft/kiota-serialization-form-go/release-please-config.json @@ -0,0 +1,14 @@ +{ + "release-type": "go", + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": true, + "include-component-in-tag": false, + "include-v-in-tag": true, + "packages": { + ".": { + "package-name": "github.com/microsoft/kiota-serialization-form-go", + "changelog-path": "CHANGELOG.md" + } + }, + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" + } diff --git a/vendor/github.com/microsoft/kiota-serialization-json-go/.release-please-manifest.json b/vendor/github.com/microsoft/kiota-serialization-json-go/.release-please-manifest.json new file mode 100644 index 0000000000..feeed79700 --- /dev/null +++ b/vendor/github.com/microsoft/kiota-serialization-json-go/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "1.1.2" +} \ No newline at end of file diff --git a/vendor/github.com/microsoft/kiota-serialization-json-go/CHANGELOG.md b/vendor/github.com/microsoft/kiota-serialization-json-go/CHANGELOG.md index 97375a7a18..4061f6a042 100644 --- a/vendor/github.com/microsoft/kiota-serialization-json-go/CHANGELOG.md +++ b/vendor/github.com/microsoft/kiota-serialization-json-go/CHANGELOG.md @@ -2,15 +2,112 @@ All notable changes to this project will be documented in this file. -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.1.2](https://github.com/microsoft/kiota-serialization-json-go/compare/v1.1.1...v1.1.2) (2025-04-02) -## [Unreleased] + +### Bug Fixes + +* removes common go dependency ([93eee3a](https://github.com/microsoft/kiota-serialization-json-go/commit/93eee3ae3298de814ea2a4d034a65aa925ccef41)) +* removes common go dependency ([5c4a75c](https://github.com/microsoft/kiota-serialization-json-go/commit/5c4a75c9a22d47d2ae4ef82016526324f268169e)) + +## [1.1.1](https://github.com/microsoft/kiota-serialization-json-go/compare/v1.1.0...v1.1.1) (2025-03-24) + + +### Bug Fixes + +* upgrades common go dependency to solve triming issues ([90291c0](https://github.com/microsoft/kiota-serialization-json-go/commit/90291c0a596279e3c45e2eb0cb814db19ce1df99)) +* upgrades common go dependency to solve triming issues ([ce4848e](https://github.com/microsoft/kiota-serialization-json-go/commit/ce4848ed57426b7669e0587a6f2971cc923630ee)) + +## [1.1.0](https://github.com/microsoft/kiota-serialization-json-go/compare/v1.0.9...v1.1.0) (2025-03-13) + + +### Features + +* upgrades required go version from go1.18 to go 1.22 ([22ec699](https://github.com/microsoft/kiota-serialization-json-go/commit/22ec69982c170452e7aa565465f4729effbe9695)) + +## [1.0.9](https://github.com/microsoft/kiota-serialization-json-go/compare/v1.0.8...v1.0.9) (2024-12-17) + + +### Bug Fixes + +* changelog cleanup ([1c16092](https://github.com/microsoft/kiota-serialization-json-go/commit/1c1609263beb65dedf4793304411aa22e8cf768e)) + +## [1.0.8] - 2024-08-13 + +### Changed + +- Modified how number values are derived, allowing values to be cast as the various types. + +### Fixed + +- Panicing when type is asserted to be what it isn't. + +## [1.0.7] - 2024-02-29 + +### Added + +- Adds support for serialization and deserialization untyped nodes. + +## [1.0.6] - 2024-02-12 + +### Changed + +- Fixes serilaization of `null` values in collections of Objects. + +## [1.0.5] - 2024-01-10 + +### Changed + +- Fixes some special character escaping when serializing strings to JSON. Previous incorrect escaping could lead to deserialization errors if old serialized data is read again. + +## [1.0.4] - 2023-07-12 + +### Changed + +- Fixes parsing time parsing without timezone information. + +## [1.0.3] - 2023-06-28 + +### Changed + +- Fixes serialization of composed types for scalar values. + +## [1.0.2] - 2023-06-14 + +- Safely serialize null values in collections of Objects, Enums or primitives. + +### Changed + +## [1.0.1] - 2023-05-25 + +- Fixes bug where slices backing data from `GetSerializedContent` could be overwritten before they were used but after `JsonSerializationWriter.Close()` was called. + +### Added + +## [1.0.0] - 2023-05-04 + +### Changed + +- GA Release. + +## [0.9.3] - 2023-04-24 ### Changed +- Use buffer pool for `JsonSerializationWriter`. + +## [0.9.2] - 2023-04-17 + +### Changed + +- Improve `JsonSerializationWriter` serialization performance. + +## [0.9.1] - 2023-04-05 + ### Added +- Improve error messaging for serialization error. + ## [0.9.0] - 2023-03-30 ### Added @@ -73,7 +170,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [0.5.5] - 2022-07-12 -- Fixed bug where string literals of `\t` and `\r` would result in generating an invalid JSON. +- Fixed bug where string literals of `\t` and `\r` would result in generating an invalid JSON. ### Changed @@ -99,14 +196,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - - Updated supported types for Additional Data, unsupported types now throwing an error instead of ignoring. - - Changed logic that trims excessive commas to be called only once on serialization. +- Updated supported types for Additional Data, unsupported types now throwing an error instead of ignoring. +- Changed logic that trims excessive commas to be called only once on serialization. ## [0.5.0] - 2022-05-26 ### Changed - - Updated reference to abstractions to support enum responses. +- Updated reference to abstractions to support enum responses. ## [0.4.0] - 2022-05-19 diff --git a/vendor/github.com/microsoft/kiota-serialization-json-go/CODE_OF_CONDUCT.md b/vendor/github.com/microsoft/kiota-serialization-json-go/CODE_OF_CONDUCT.md index f9ba8cf65f..686e5e7a09 100644 --- a/vendor/github.com/microsoft/kiota-serialization-json-go/CODE_OF_CONDUCT.md +++ b/vendor/github.com/microsoft/kiota-serialization-json-go/CODE_OF_CONDUCT.md @@ -7,3 +7,4 @@ Resources: - [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) - [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) - Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns +- Employees can reach out at [aka.ms/opensource/moderation-support](https://aka.ms/opensource/moderation-support) diff --git a/vendor/github.com/microsoft/kiota-serialization-json-go/CONTRIBUTING.md b/vendor/github.com/microsoft/kiota-serialization-json-go/CONTRIBUTING.md new file mode 100644 index 0000000000..5f2fbb0c3f --- /dev/null +++ b/vendor/github.com/microsoft/kiota-serialization-json-go/CONTRIBUTING.md @@ -0,0 +1,52 @@ +# Contributing to the Kiota JSON serialization for Go + +The Kiota JSON serialization for Go is available for all manner of contribution. There are a couple of different recommended paths to get contributions into the released version of this SDK. + +__NOTE__ A signed a contribution license agreement is required for all contributions, and is checked automatically on new pull requests. Please read and sign [the agreement](https://cla.microsoft.com/) before starting any work for this repository. + +## File issues + +The best way to get started with a contribution is to start a dialog with the owners of this repository. Sometimes features will be under development or out of scope for this SDK and it's best to check before starting work on contribution. + +## Submit pull requests for trivial changes + +If you are making a change that does not affect the interface components and does not affect other downstream callers, feel free to make a pull request against the __dev__ branch. The dev branch will be updated frequently. + +Revisions of this nature will result in a 0.0.X change of the version number. + +## Submit pull requests for features + +If major functionality is being added, or there will need to be gestation time for a change, it should be submitted against the __feature__ branch. + +Revisions of this nature will result in a 0.X.X change of the version number. + +## Commit message format + +To support our automated release process, pull requests are required to follow the [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/) +format. + +Each commit message consists of a __header__, an optional __body__ and an optional __footer__. The header is the first line of the commit and +MUST have a __type__ (see below for a list of types) and a __description__. An optional __scope__ can be added to the header to give extra context. + +``` +[optional scope]: + + + + +``` + +The recommended commit types used are: + +- __feat__ for feature updates (increments the _minor_ version) +- __fix__ for bug fixes (increments the _patch_ version) +- __perf__ for performance related changes e.g. optimizing an algorithm +- __refactor__ for code refactoring changes +- __test__ for test suite updates e.g. adding a test or fixing a test +- __style__ for changes that don't affect the meaning of code. e.g. formatting changes +- __docs__ for documentation updates e.g. ReadMe update or code documentation updates +- __build__ for build system changes (gradle updates, external dependency updates) +- __ci__ for CI configuration file changes e.g. updating a pipeline +- __chore__ for miscallaneous non-sdk changesin the repo e.g. removing an unused file + +Adding a footer with the prefix __BREAKING CHANGE:__ will cause an increment of the _major_ version. diff --git a/vendor/github.com/microsoft/kiota-serialization-json-go/json_parse_node.go b/vendor/github.com/microsoft/kiota-serialization-json-go/json_parse_node.go index 472f03c086..c6235ac87e 100644 --- a/vendor/github.com/microsoft/kiota-serialization-json-go/json_parse_node.go +++ b/vendor/github.com/microsoft/kiota-serialization-json-go/json_parse_node.go @@ -7,10 +7,12 @@ import ( "encoding/base64" "encoding/json" "errors" + "fmt" "io" "time" "github.com/google/uuid" + abstractions "github.com/microsoft/kiota-abstractions-go" absser "github.com/microsoft/kiota-abstractions-go/serialization" ) @@ -34,6 +36,7 @@ func NewJsonParseNode(content []byte) (*JsonParseNode, error) { value, err := loadJsonTree(decoder) return value, err } + func loadJsonTree(decoder *json.Decoder) (*JsonParseNode, error) { for { token, err := decoder.Token() @@ -86,11 +89,11 @@ func loadJsonTree(decoder *json.Decoder) (*JsonParseNode, error) { i, err := number.Int64() c := &JsonParseNode{} if err == nil { - c.SetValue(&i) + c.setValue(&i) } else { f, err := number.Float64() if err == nil { - c.SetValue(&f) + c.setValue(&f) } else { return nil, err } @@ -99,42 +102,42 @@ func loadJsonTree(decoder *json.Decoder) (*JsonParseNode, error) { case string: v := token.(string) c := &JsonParseNode{} - c.SetValue(&v) + c.setValue(&v) return c, nil case bool: c := &JsonParseNode{} v := token.(bool) - c.SetValue(&v) + c.setValue(&v) return c, nil case int8: c := &JsonParseNode{} v := token.(int8) - c.SetValue(&v) + c.setValue(&v) return c, nil case byte: c := &JsonParseNode{} v := token.(byte) - c.SetValue(&v) + c.setValue(&v) return c, nil case float64: c := &JsonParseNode{} v := token.(float64) - c.SetValue(&v) + c.setValue(&v) return c, nil case float32: c := &JsonParseNode{} v := token.(float32) - c.SetValue(&v) + c.setValue(&v) return c, nil case int32: c := &JsonParseNode{} v := token.(int32) - c.SetValue(&v) + c.setValue(&v) return c, nil case int64: c := &JsonParseNode{} v := token.(int64) - c.SetValue(&v) + c.setValue(&v) return c, nil case nil: return nil, nil @@ -144,13 +147,21 @@ func loadJsonTree(decoder *json.Decoder) (*JsonParseNode, error) { return nil, nil } -// SetValue sets the value represented by the node +// SetValue is obsolete, parse nodes are not meant to be settable externally func (n *JsonParseNode) SetValue(value interface{}) { + n.setValue(value) +} + +// setValue sets the value represented by the node +func (n *JsonParseNode) setValue(value interface{}) { n.value = value } // GetChildNode returns a new parse node for the given identifier. func (n *JsonParseNode) GetChildNode(index string) (absser.ParseNode, error) { + if isNil(n) || isNil(n.value) { + return nil, nil + } if index == "" { return nil, errors.New("index is empty") } @@ -176,16 +187,72 @@ func (n *JsonParseNode) GetChildNode(index string) (absser.ParseNode, error) { // GetObjectValue returns the Parsable value from the node. func (n *JsonParseNode) GetObjectValue(ctor absser.ParsableFactory) (absser.Parsable, error) { + if isNil(n) || isNil(n.value) { + return nil, nil + } if ctor == nil { return nil, errors.New("constructor is nil") } - if n == nil || n.value == nil { - return nil, nil - } result, err := ctor(n) if err != nil { return nil, err } + + _, isUntypedNode := result.(absser.UntypedNodeable) + if isUntypedNode { + switch value := n.value.(type) { + case *bool: + return absser.NewUntypedBoolean(*value), nil + case *string: + return absser.NewUntypedString(*value), nil + case *float32: + return absser.NewUntypedFloat(*value), nil + case *float64: + return absser.NewUntypedDouble(*value), nil + case *int32: + return absser.NewUntypedInteger(*value), nil + case *int64: + return absser.NewUntypedLong(*value), nil + case nil: + return absser.NewUntypedNull(), nil + case map[string]*JsonParseNode: + properties := make(map[string]absser.UntypedNodeable) + for key, value := range value { + parsable, err := value.GetObjectValue(absser.CreateUntypedNodeFromDiscriminatorValue) + if err != nil { + return nil, errors.New("cannot parse object value") + } + if parsable == nil { + parsable = absser.NewUntypedNull() + } + property, ok := parsable.(absser.UntypedNodeable) + if ok { + properties[key] = property + } + } + return absser.NewUntypedObject(properties), nil + case []*JsonParseNode: + collection := make([]absser.UntypedNodeable, len(value)) + for index, node := range value { + parsable, err := node.GetObjectValue(absser.CreateUntypedNodeFromDiscriminatorValue) + if err != nil { + return nil, errors.New("cannot parse object value") + } + if parsable == nil { + parsable = absser.NewUntypedNull() + } + property, ok := parsable.(absser.UntypedNodeable) + if ok { + collection[index] = property + } + + } + return absser.NewUntypedArray(collection), nil + default: + return absser.NewUntypedNode(value), nil + } + } + abstractions.InvokeParsableAction(n.GetOnBeforeAssignFieldValues(), result) properties, ok := n.value.(map[string]*JsonParseNode) fields := result.GetFieldDeserializers() @@ -234,7 +301,7 @@ func (n *JsonParseNode) GetObjectValue(ctor absser.ParsableFactory) (absser.Pars // GetCollectionOfObjectValues returns the collection of Parsable values from the node. func (n *JsonParseNode) GetCollectionOfObjectValues(ctor absser.ParsableFactory) ([]absser.Parsable, error) { - if n == nil || n.value == nil { + if isNil(n) || isNil(n.value) { return nil, nil } if ctor == nil { @@ -246,18 +313,22 @@ func (n *JsonParseNode) GetCollectionOfObjectValues(ctor absser.ParsableFactory) } result := make([]absser.Parsable, len(nodes)) for i, v := range nodes { - val, err := (*v).GetObjectValue(ctor) - if err != nil { - return nil, err + if v != nil { + val, err := (*v).GetObjectValue(ctor) + if err != nil { + return nil, err + } + result[i] = val + } else { + result[i] = nil } - result[i] = val } return result, nil } // GetCollectionOfPrimitiveValues returns the collection of primitive values from the node. func (n *JsonParseNode) GetCollectionOfPrimitiveValues(targetType string) ([]interface{}, error) { - if n == nil || n.value == nil { + if isNil(n) || isNil(n.value) { return nil, nil } if targetType == "" { @@ -269,15 +340,23 @@ func (n *JsonParseNode) GetCollectionOfPrimitiveValues(targetType string) ([]int } result := make([]interface{}, len(nodes)) for i, v := range nodes { - val, err := v.getPrimitiveValue(targetType) - if err != nil { - return nil, err + if v != nil { + val, err := v.getPrimitiveValue(targetType) + if err != nil { + return nil, err + } + result[i] = val + } else { + result[i] = nil } - result[i] = val } return result, nil } + func (n *JsonParseNode) getPrimitiveValue(targetType string) (interface{}, error) { + if isNil(n) || isNil(n.value) { + return nil, nil + } switch targetType { case "string": return n.GetStringValue() @@ -308,13 +387,13 @@ func (n *JsonParseNode) getPrimitiveValue(targetType string) (interface{}, error case "base64": return n.GetByteArrayValue() default: - return nil, errors.New("targetType is not supported") + return nil, fmt.Errorf("targetType %s is not supported", targetType) } } // GetCollectionOfEnumValues returns the collection of Enum values from the node. func (n *JsonParseNode) GetCollectionOfEnumValues(parser absser.EnumFactory) ([]interface{}, error) { - if n == nil || n.value == nil { + if isNil(n) || isNil(n.value) { return nil, nil } if parser == nil { @@ -326,101 +405,134 @@ func (n *JsonParseNode) GetCollectionOfEnumValues(parser absser.EnumFactory) ([] } result := make([]interface{}, len(nodes)) for i, v := range nodes { - val, err := v.GetEnumValue(parser) - if err != nil { - return nil, err + if v != nil { + val, err := v.GetEnumValue(parser) + if err != nil { + return nil, err + } + result[i] = val + } else { + result[i] = nil } - result[i] = val } return result, nil } // GetStringValue returns a String value from the nodes. func (n *JsonParseNode) GetStringValue() (*string, error) { - if n == nil || n.value == nil { + if isNil(n) || isNil(n.value) { return nil, nil } - res, ok := n.value.(*string) - if ok { - return res, nil - } else { - return nil, nil + + val, ok := n.value.(*string) + if !ok { + return nil, fmt.Errorf("type '%T' is not compatible with type string", n.value) } + return val, nil } // GetBoolValue returns a Bool value from the nodes. func (n *JsonParseNode) GetBoolValue() (*bool, error) { - if n == nil || n.value == nil { + if isNil(n) || isNil(n.value) { return nil, nil } - return n.value.(*bool), nil + + val, ok := n.value.(*bool) + if !ok { + return nil, fmt.Errorf("type '%T' is not compatible with type bool", n.value) + } + return val, nil } // GetInt8Value returns a int8 value from the nodes. func (n *JsonParseNode) GetInt8Value() (*int8, error) { - if n == nil || n.value == nil { + if isNil(n) || isNil(n.value) { return nil, nil } - return n.value.(*int8), nil + var val int8 + + if err := as(n.value, &val); err != nil { + return nil, err + } + + return &val, nil } // GetBoolValue returns a Bool value from the nodes. func (n *JsonParseNode) GetByteValue() (*byte, error) { - if n == nil || n.value == nil { + if isNil(n) || isNil(n.value) { return nil, nil } - return n.value.(*byte), nil + var val byte + + if err := as(n.value, &val); err != nil { + return nil, err + } + + return &val, nil } // GetFloat32Value returns a Float32 value from the nodes. func (n *JsonParseNode) GetFloat32Value() (*float32, error) { - v, err := n.GetFloat64Value() - if err != nil { - return nil, err - } - if v == nil { + if isNil(n) || isNil(n.value) { return nil, nil } - cast := float32(*v) - return &cast, nil + var val float32 + + if err := as(n.value, &val); err != nil { + return nil, err + } + + return &val, nil } // GetFloat64Value returns a Float64 value from the nodes. func (n *JsonParseNode) GetFloat64Value() (*float64, error) { - if n == nil || n.value == nil { + if isNil(n) || isNil(n.value) { return nil, nil } - return n.value.(*float64), nil + var val float64 + + if err := as(n.value, &val); err != nil { + return nil, err + } + + return &val, nil } // GetInt32Value returns a Int32 value from the nodes. func (n *JsonParseNode) GetInt32Value() (*int32, error) { - v, err := n.GetFloat64Value() - if err != nil { - return nil, err - } - if v == nil { + if isNil(n) || isNil(n.value) { return nil, nil } - cast := int32(*v) - return &cast, nil + var val int32 + + if err := as(n.value, &val); err != nil { + return nil, err + } + + return &val, nil } // GetInt64Value returns a Int64 value from the nodes. func (n *JsonParseNode) GetInt64Value() (*int64, error) { - v, err := n.GetFloat64Value() - if err != nil { - return nil, err - } - if v == nil { + if isNil(n) || isNil(n.value) { return nil, nil } - cast := int64(*v) - return &cast, nil + var val int64 + + if err := as(n.value, &val); err != nil { + return nil, err + } + + return &val, nil } // GetTimeValue returns a Time value from the nodes. func (n *JsonParseNode) GetTimeValue() (*time.Time, error) { + if isNil(n) || isNil(n.value) { + return nil, nil + } v, err := n.GetStringValue() if err != nil { return nil, err @@ -428,12 +540,20 @@ func (n *JsonParseNode) GetTimeValue() (*time.Time, error) { if v == nil { return nil, nil } + + // if string does not have timezone information, add local timezone + if len(*v) == 19 { + *v = *v + time.Now().Format("-07:00") + } parsed, err := time.Parse(time.RFC3339, *v) return &parsed, err } // GetISODurationValue returns a ISODuration value from the nodes. func (n *JsonParseNode) GetISODurationValue() (*absser.ISODuration, error) { + if isNil(n) || isNil(n.value) { + return nil, nil + } v, err := n.GetStringValue() if err != nil { return nil, err @@ -446,6 +566,9 @@ func (n *JsonParseNode) GetISODurationValue() (*absser.ISODuration, error) { // GetTimeOnlyValue returns a TimeOnly value from the nodes. func (n *JsonParseNode) GetTimeOnlyValue() (*absser.TimeOnly, error) { + if isNil(n) || isNil(n.value) { + return nil, nil + } v, err := n.GetStringValue() if err != nil { return nil, err @@ -458,6 +581,9 @@ func (n *JsonParseNode) GetTimeOnlyValue() (*absser.TimeOnly, error) { // GetDateOnlyValue returns a DateOnly value from the nodes. func (n *JsonParseNode) GetDateOnlyValue() (*absser.DateOnly, error) { + if isNil(n) || isNil(n.value) { + return nil, nil + } v, err := n.GetStringValue() if err != nil { return nil, err @@ -470,6 +596,9 @@ func (n *JsonParseNode) GetDateOnlyValue() (*absser.DateOnly, error) { // GetUUIDValue returns a UUID value from the nodes. func (n *JsonParseNode) GetUUIDValue() (*uuid.UUID, error) { + if isNil(n) || isNil(n.value) { + return nil, nil + } v, err := n.GetStringValue() if err != nil { return nil, err @@ -483,6 +612,9 @@ func (n *JsonParseNode) GetUUIDValue() (*uuid.UUID, error) { // GetEnumValue returns a Enum value from the nodes. func (n *JsonParseNode) GetEnumValue(parser absser.EnumFactory) (interface{}, error) { + if isNil(n) || isNil(n.value) { + return nil, nil + } if parser == nil { return nil, errors.New("parser is nil") } @@ -498,6 +630,9 @@ func (n *JsonParseNode) GetEnumValue(parser absser.EnumFactory) (interface{}, er // GetByteArrayValue returns a ByteArray value from the nodes. func (n *JsonParseNode) GetByteArrayValue() ([]byte, error) { + if isNil(n) || isNil(n.value) { + return nil, nil + } s, err := n.GetStringValue() if err != nil { return nil, err @@ -510,7 +645,7 @@ func (n *JsonParseNode) GetByteArrayValue() ([]byte, error) { // GetRawValue returns a ByteArray value from the nodes. func (n *JsonParseNode) GetRawValue() (interface{}, error) { - if n == nil || n.value == nil { + if isNil(n) || isNil(n.value) { return nil, nil } switch v := n.value.(type) { diff --git a/vendor/github.com/microsoft/kiota-serialization-json-go/json_parse_node_factory.go b/vendor/github.com/microsoft/kiota-serialization-json-go/json_parse_node_factory.go index ef55ce955e..8e1e0a7543 100644 --- a/vendor/github.com/microsoft/kiota-serialization-json-go/json_parse_node_factory.go +++ b/vendor/github.com/microsoft/kiota-serialization-json-go/json_parse_node_factory.go @@ -10,7 +10,7 @@ import ( type JsonParseNodeFactory struct { } -// Creates a new JsonParseNodeFactory +// NewJsonParseNodeFactory creates a new JsonParseNodeFactory func NewJsonParseNodeFactory() *JsonParseNodeFactory { return &JsonParseNodeFactory{} } diff --git a/vendor/github.com/microsoft/kiota-serialization-json-go/json_serialization_writer.go b/vendor/github.com/microsoft/kiota-serialization-json-go/json_serialization_writer.go index 43c42c9707..f136c08c8d 100644 --- a/vendor/github.com/microsoft/kiota-serialization-json-go/json_serialization_writer.go +++ b/vendor/github.com/microsoft/kiota-serialization-json-go/json_serialization_writer.go @@ -1,10 +1,12 @@ package jsonserialization import ( + "bytes" "encoding/base64" "encoding/json" "strconv" "strings" + "sync" "time" "github.com/google/uuid" @@ -13,9 +15,16 @@ import ( absser "github.com/microsoft/kiota-abstractions-go/serialization" ) +var buffPool = sync.Pool{ + New: func() interface{} { + return new(bytes.Buffer) + }, +} + // JsonSerializationWriter implements SerializationWriter for JSON. type JsonSerializationWriter struct { - writer []string + writer *bytes.Buffer + separatorIndices []int onBeforeAssignFieldValues absser.ParsableAction onAfterAssignFieldValues absser.ParsableAction onStartObjectSerialization absser.ParsableWriter @@ -24,40 +33,59 @@ type JsonSerializationWriter struct { // NewJsonSerializationWriter creates a new instance of the JsonSerializationWriter. func NewJsonSerializationWriter() *JsonSerializationWriter { return &JsonSerializationWriter{ - writer: make([]string, 0), + writer: buffPool.Get().(*bytes.Buffer), + separatorIndices: make([]int, 0), } } -func (w *JsonSerializationWriter) writeRawValue(value string) { - w.writer = append(w.writer, value) +func (w *JsonSerializationWriter) getWriter() *bytes.Buffer { + if w.writer == nil { + panic("The writer has already been closed. Call Reset instead of Close to reuse it or instantiate a new one.") + } + + return w.writer } -func (w *JsonSerializationWriter) writeStringValue(value string) { +func (w *JsonSerializationWriter) writeRawValue(value ...string) { + writer := w.getWriter() - value = strings.ReplaceAll( - strings.ReplaceAll( - strings.ReplaceAll(value, - "\\", "\\\\", - ), - "\"", - "\\\""), - "\n", - "\\n") - value = strings.ReplaceAll(strings.ReplaceAll(value, "\t", "\\t"), "\r", "\\r") - w.writeRawValue("\"" + value + "\"") + for _, v := range value { + writer.WriteString(v) + } +} +func (w *JsonSerializationWriter) writeStringValue(value string) { + builder := &strings.Builder{} + // Allocate at least enough space for the string and quotes. However, it's + // possible that slightly overallocating may be a better strategy because then + // it would at least be able to handle a few character escape sequences + // without another allocation. + builder.Grow(len(value) + 2) + + // Turning off HTML escaping may not be strictly necessary but it matches with + // the current behavior. Testing with Exchange mail shows that it will + // accept and properly interpret data sent with and without HTML escaping + // enabled when creating emails with body content type HTML and HTML tags in + // the body content. + enc := json.NewEncoder(builder) + enc.SetEscapeHTML(false) + enc.SetIndent("", "") + enc.Encode(value) + + // Note that builder.String() returns a slice referencing the internal memory + // of builder. This means it's unsafe to continue holding that reference once + // this function exits (for example some conditions where a pool was used to + // reduce strings.Builder allocations). We can use it here directly since + // writeRawValue calls WriteString on a different buffer which should cause a + // copy of the contents. If that's changed though this will need updated. + s := builder.String() + // Need to trim off the trailing newline the encoder adds. + w.writeRawValue(s[:len(s)-1]) } func (w *JsonSerializationWriter) writePropertyName(key string) { - w.writeRawValue("\"" + key + "\":") + w.writeRawValue("\"", key, "\":") } func (w *JsonSerializationWriter) writePropertySeparator() { + w.separatorIndices = append(w.separatorIndices, w.getWriter().Len()) w.writeRawValue(",") } -func (w *JsonSerializationWriter) trimLastPropertySeparator() { - for idx, s := range w.writer { - writerLen := len(w.writer) - if s == "," && (idx == writerLen-1 || (idx < writerLen-1 && (w.writer[idx+1] == "]" || w.writer[idx+1] == "}" || w.writer[idx+1] == ","))) { - w.writer[idx] = "" - } - } -} func (w *JsonSerializationWriter) writeArrayStart() { w.writeRawValue("[") } @@ -251,11 +279,80 @@ func (w *JsonSerializationWriter) WriteByteArrayValue(key string, value []byte) func (w *JsonSerializationWriter) WriteObjectValue(key string, item absser.Parsable, additionalValuesToMerge ...absser.Parsable) error { additionalValuesLen := len(additionalValuesToMerge) if item != nil || additionalValuesLen > 0 { + untypedNode, isUntypedNode := item.(absser.UntypedNodeable) + if isUntypedNode { + switch value := untypedNode.(type) { + case *absser.UntypedBoolean: + w.WriteBoolValue(key, value.GetValue()) + return nil + case *absser.UntypedFloat: + w.WriteFloat32Value(key, value.GetValue()) + return nil + case *absser.UntypedDouble: + w.WriteFloat64Value(key, value.GetValue()) + return nil + case *absser.UntypedInteger: + w.WriteInt32Value(key, value.GetValue()) + return nil + case *absser.UntypedLong: + w.WriteInt64Value(key, value.GetValue()) + return nil + case *absser.UntypedNull: + w.WriteNullValue(key) + return nil + case *absser.UntypedString: + w.WriteStringValue(key, value.GetValue()) + return nil + case *absser.UntypedObject: + if key != "" { + w.writePropertyName(key) + } + properties := value.GetValue() + if properties != nil { + w.writeObjectStart() + for objectKey, val := range properties { + err := w.WriteObjectValue(objectKey, val) + if err != nil { + return err + } + } + w.writeObjectEnd() + if key != "" { + w.writePropertySeparator() + } + } + return nil + case *absser.UntypedArray: + if key != "" { + w.writePropertyName(key) + } + values := value.GetValue() + if values != nil { + w.writeArrayStart() + for _, val := range values { + err := w.WriteObjectValue("", val) + if err != nil { + return err + } + w.writePropertySeparator() + } + w.writeArrayEnd() + } + if key != "" { + w.writePropertySeparator() + } + return nil + } + } + if key != "" { w.writePropertyName(key) } abstractions.InvokeParsableAction(w.GetOnBeforeSerialization(), item) - w.writeObjectStart() + _, isComposedTypeWrapper := item.(absser.ComposedTypeWrapper) + if !isComposedTypeWrapper { + w.writeObjectStart() + } if item != nil { err := abstractions.InvokeParsableWriter(w.GetOnStartObjectSerialization(), item, w) if err != nil { @@ -282,7 +379,9 @@ func (w *JsonSerializationWriter) WriteObjectValue(key string, item absser.Parsa abstractions.InvokeParsableAction(w.GetOnAfterObjectSerialization(), additionalValue) } - w.writeObjectEnd() + if !isComposedTypeWrapper { + w.writeObjectEnd() + } if key != "" { w.writePropertySeparator() } @@ -298,9 +397,16 @@ func (w *JsonSerializationWriter) WriteCollectionOfObjectValues(key string, coll } w.writeArrayStart() for _, item := range collection { - err := w.WriteObjectValue("", item) - if err != nil { - return err + if item != nil { + err := w.WriteObjectValue("", item) + if err != nil { + return err + } + } else { + err := w.WriteNullValue("") + if err != nil { + return err + } } w.writePropertySeparator() } @@ -614,14 +720,27 @@ func (w *JsonSerializationWriter) WriteCollectionOfInt8Values(key string, collec // GetSerializedContent returns the resulting byte array from the serialization writer. func (w *JsonSerializationWriter) GetSerializedContent() ([]byte, error) { - w.trimLastPropertySeparator() - resultStr := strings.Join(w.writer, "") - return []byte(resultStr), nil + trimmed := w.getWriter().Bytes() + buffLen := len(trimmed) + + for i := len(w.separatorIndices) - 1; i >= 0; i-- { + idx := w.separatorIndices[i] + + if idx == buffLen-1 { + trimmed = trimmed[:idx] + } else if trimmed[idx+1] == byte(']') || trimmed[idx+1] == byte('}') { + trimmed = append(trimmed[:idx], trimmed[idx+1:]...) + } + } + + trimmedCopy := make([]byte, len(trimmed)) + copy(trimmedCopy, trimmed) + + return trimmedCopy, nil } // WriteAnyValue an unknown value as a parameter. func (w *JsonSerializationWriter) WriteAnyValue(key string, value interface{}) error { - if value != nil { body, err := json.Marshal(value) if err != nil { @@ -769,6 +888,8 @@ func (w *JsonSerializationWriter) WriteAdditionalData(value map[string]interface err = w.WriteDateOnlyValue(key, value) case absser.DateOnly: err = w.WriteDateOnlyValue(key, &value) + case absser.UntypedNodeable: + err = w.WriteObjectValue(key, value) default: err = w.WriteAnyValue(key, &value) } @@ -777,8 +898,24 @@ func (w *JsonSerializationWriter) WriteAdditionalData(value map[string]interface return err } -// Close clears the internal buffer. +// Reset sets the internal buffer to empty, allowing the writer to be reused. +func (w *JsonSerializationWriter) Reset() error { + w.getWriter().Reset() + w.separatorIndices = w.separatorIndices[:0] + return nil +} + +// Close relases the internal buffer. Subsequent calls to the writer will panic. func (w *JsonSerializationWriter) Close() error { - w.writer = make([]string, 0) + if w.writer == nil { + return nil + } + + w.writer.Reset() + buffPool.Put(w.writer) + + w.writer = nil + w.separatorIndices = nil + return nil } diff --git a/vendor/github.com/microsoft/kiota-serialization-json-go/release-please-config.json b/vendor/github.com/microsoft/kiota-serialization-json-go/release-please-config.json new file mode 100644 index 0000000000..3f2cd6e1e4 --- /dev/null +++ b/vendor/github.com/microsoft/kiota-serialization-json-go/release-please-config.json @@ -0,0 +1,14 @@ +{ + "release-type": "go", + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": true, + "include-component-in-tag": false, + "include-v-in-tag": true, + "packages": { + ".": { + "package-name": "github.com/microsoft/kiota-serialization-json-go", + "changelog-path": "CHANGELOG.md" + } + }, + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" +} \ No newline at end of file diff --git a/vendor/github.com/microsoft/kiota-serialization-json-go/util.go b/vendor/github.com/microsoft/kiota-serialization-json-go/util.go new file mode 100644 index 0000000000..0d017ecc81 --- /dev/null +++ b/vendor/github.com/microsoft/kiota-serialization-json-go/util.go @@ -0,0 +1,147 @@ +package jsonserialization + +import ( + "fmt" + "math" + "reflect" +) + +type numericRange struct { + min float64 + max float64 + allowDecimal bool +} + +var ( + numericTypeRanges = map[reflect.Kind]numericRange{ + reflect.Int8: {math.MinInt8, math.MaxInt8, false}, + reflect.Uint8: {0, math.MaxUint8, false}, + reflect.Int16: {math.MinInt16, math.MaxInt16, false}, + reflect.Uint16: {0, math.MaxUint16, false}, + reflect.Int32: {math.MinInt32, math.MaxInt32, false}, + reflect.Uint32: {0, math.MaxUint32, false}, + reflect.Int64: {math.MinInt64, math.MaxInt64, false}, + reflect.Uint64: {0, math.MaxUint64, false}, + reflect.Float32: {-math.MaxFloat32, math.MaxFloat32, true}, + reflect.Float64: {-math.MaxFloat64, math.MaxFloat64, true}, + } +) + +type number interface { + int | int8 | uint8 | int16 | uint16 | int32 | uint32 | int64 | uint64 | float32 | float64 +} + +// isCompatible checks if the value is compatible with the type tp. +// It intentionally excludes checking if types are pointers to allow for possibility. +func isCompatible(value interface{}, tp reflect.Type) bool { + // Can't join with lower, number types are always "convertible" just not losslessly. + if isNumericType(value) && isNumericType(tp) { + //NOTE: no need to check if number is compatible with another, always yes, just overflows + //Check if number value is TRULY compatible + return isCompatibleInt(value, tp) + } + + return reflect.TypeOf(value).ConvertibleTo(tp) +} + +// isNil checks if a value is nil or a nil interface, including nested pointers. +func isNil(a interface{}) bool { + if a == nil { + return true + } + val := reflect.ValueOf(a) + for val.Kind() == reflect.Ptr || val.Kind() == reflect.Interface { + if val.IsNil() { + return true + } + val = val.Elem() + } + switch val.Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.Interface, reflect.Slice: + return val.IsNil() + } + return false +} + +// as converts the value to the type T. +func as[T any](in interface{}, out T) error { + // No point in trying anything if already nil + if isNil(in) { + return nil + } + + // Make sure nothing is a pointer + valValue := reflect.ValueOf(in) + for valValue.Kind() == reflect.Ptr { + valValue = valValue.Elem() + in = valValue.Interface() + } + + outVal := reflect.ValueOf(out) + if outVal.Kind() != reflect.Pointer || isNil(out) { + return fmt.Errorf("out is not pointer or is nil") + } + + nestedOutVal := outVal.Elem() + // Handle the case where out is a pointer to an interface + if nestedOutVal.Kind() == reflect.Interface && !nestedOutVal.IsNil() { + nestedOutVal = nestedOutVal.Elem() + } + + outType := nestedOutVal.Type() + + if !isCompatible(in, outType) { + return fmt.Errorf("value '%v' is not compatible with type %T", in, nestedOutVal.Interface()) + } + + outVal.Elem().Set(valValue.Convert(outType)) + return nil +} + +// isNumericType checks if the given type is a numeric type. +func isNumericType(in interface{}) bool { + + if in == nil { + return false + } + + tp, ok := in.(reflect.Type) + if !ok { + tp = reflect.TypeOf(in) + } + + switch tp.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, + reflect.Float32, reflect.Float64: + return true + default: + return false + } +} + +// isCompatibleInt checks if the given value is compatible with the specified integer type. +// It returns true if the value falls within the valid range for the type and has no decimal places. +// Otherwise, it returns false. +func isCompatibleInt(in interface{}, tp reflect.Type) bool { + if !isNumericType(in) || !isNumericType(tp) { + return false + } + + inFloat := reflect.ValueOf(in).Convert(reflect.TypeOf(float64(0))).Float() + hasDecimal := hasDecimalPlace(inFloat) + + if rangeInfo, ok := numericTypeRanges[tp.Kind()]; ok { + if inFloat >= rangeInfo.min && inFloat <= rangeInfo.max { + return rangeInfo.allowDecimal || !hasDecimal + } + } + return false +} + +// hasDecimalPlace checks if the given float64 value has a decimal place. +// It returns true if the fractional part of the value is greater than 0.0 (indicating a decimal). +// Otherwise, it returns false. +func hasDecimalPlace(value float64) bool { + return value != float64(int64(value)) +} diff --git a/vendor/github.com/microsoft/kiota-serialization-text-go/.release-please-manifest.json b/vendor/github.com/microsoft/kiota-serialization-text-go/.release-please-manifest.json new file mode 100644 index 0000000000..feeed79700 --- /dev/null +++ b/vendor/github.com/microsoft/kiota-serialization-text-go/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "1.1.2" +} \ No newline at end of file diff --git a/vendor/github.com/microsoft/kiota-serialization-text-go/CHANGELOG.md b/vendor/github.com/microsoft/kiota-serialization-text-go/CHANGELOG.md index 7213455709..360d2b248c 100644 --- a/vendor/github.com/microsoft/kiota-serialization-text-go/CHANGELOG.md +++ b/vendor/github.com/microsoft/kiota-serialization-text-go/CHANGELOG.md @@ -2,15 +2,41 @@ All notable changes to this project will be documented in this file. -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.1.2](https://github.com/microsoft/kiota-serialization-text-go/compare/v1.1.1...v1.1.2) (2025-04-02) -## [Unreleased] -### Added +### Bug Fixes + +* removes common go dependency ([ba74296](https://github.com/microsoft/kiota-serialization-text-go/commit/ba74296bef18a77d0c367dda4a3908c04c38f9ed)) +* removes common go dependency ([b2692be](https://github.com/microsoft/kiota-serialization-text-go/commit/b2692be0cef923152a0697665f94753653051f89)) + +## [1.1.1](https://github.com/microsoft/kiota-serialization-text-go/compare/v1.1.0...v1.1.1) (2025-03-24) + + +### Bug Fixes + +* upgrades common go dependency to solve triming issues ([da7894d](https://github.com/microsoft/kiota-serialization-text-go/commit/da7894dfc2fc351c8337c3570f50548994624098)) +* upgrades common go dependency to solve triming issues ([c5b463c](https://github.com/microsoft/kiota-serialization-text-go/commit/c5b463c8f5308d4aea15fc520dacb6c9e6b89b7d)) + +## [1.1.0](https://github.com/microsoft/kiota-serialization-text-go/compare/v1.0.0...v1.1.0) (2025-03-13) + + +### Features + +* upgrades required go version from go1.18 to go 1.22 ([c0886ad](https://github.com/microsoft/kiota-serialization-text-go/commit/c0886ad112bff2cf3fbea56dcd45922685d2e565)) + +## [1.0.0] - 2023-05-04 + +### Changed + +- GA Release. + +## [0.7.1] - 2023-04-17 ### Changed +- Implement serialization and parseNode listeners. + ## [0.7.0] - 2023-01-23 ### Added diff --git a/vendor/github.com/microsoft/kiota-serialization-text-go/CODE_OF_CONDUCT.md b/vendor/github.com/microsoft/kiota-serialization-text-go/CODE_OF_CONDUCT.md index f9ba8cf65f..686e5e7a09 100644 --- a/vendor/github.com/microsoft/kiota-serialization-text-go/CODE_OF_CONDUCT.md +++ b/vendor/github.com/microsoft/kiota-serialization-text-go/CODE_OF_CONDUCT.md @@ -7,3 +7,4 @@ Resources: - [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) - [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) - Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns +- Employees can reach out at [aka.ms/opensource/moderation-support](https://aka.ms/opensource/moderation-support) diff --git a/vendor/github.com/microsoft/kiota-serialization-text-go/CONTRIBUTING.md b/vendor/github.com/microsoft/kiota-serialization-text-go/CONTRIBUTING.md new file mode 100644 index 0000000000..d9ae9697e7 --- /dev/null +++ b/vendor/github.com/microsoft/kiota-serialization-text-go/CONTRIBUTING.md @@ -0,0 +1,52 @@ +# Contributing to the Kiota text serialization for Go + +The Kiota text serialization for Go is available for all manner of contribution. There are a couple of different recommended paths to get contributions into the released version of this SDK. + +__NOTE__ A signed a contribution license agreement is required for all contributions, and is checked automatically on new pull requests. Please read and sign [the agreement](https://cla.microsoft.com/) before starting any work for this repository. + +## File issues + +The best way to get started with a contribution is to start a dialog with the owners of this repository. Sometimes features will be under development or out of scope for this SDK and it's best to check before starting work on contribution. + +## Submit pull requests for trivial changes + +If you are making a change that does not affect the interface components and does not affect other downstream callers, feel free to make a pull request against the __dev__ branch. The dev branch will be updated frequently. + +Revisions of this nature will result in a 0.0.X change of the version number. + +## Submit pull requests for features + +If major functionality is being added, or there will need to be gestation time for a change, it should be submitted against the __feature__ branch. + +Revisions of this nature will result in a 0.X.X change of the version number. + +## Commit message format + +To support our automated release process, pull requests are required to follow the [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/) +format. + +Each commit message consists of a **header**, an optional **body** and an optional **footer**. The header is the first line of the commit and +MUST have a **type** (see below for a list of types) and a **description**. An optional **scope** can be added to the header to give extra context. + +``` +[optional scope]: + + + + +``` + +The recommended commit types used are: + + - **feat** for feature updates (increments the _minor_ version) + - **fix** for bug fixes (increments the _patch_ version) + - **perf** for performance related changes e.g. optimizing an algorithm + - **refactor** for code refactoring changes + - **test** for test suite updates e.g. adding a test or fixing a test + - **style** for changes that don't affect the meaning of code. e.g. formatting changes + - **docs** for documentation updates e.g. ReadMe update or code documentation updates + - **build** for build system changes (gradle updates, external dependency updates) + - **ci** for CI configuration file changes e.g. updating a pipeline + - **chore** for miscallaneous non-sdk changesin the repo e.g. removing an unused file + +Adding a footer with the prefix **BREAKING CHANGE:** will cause an increment of the _major_ version. \ No newline at end of file diff --git a/vendor/github.com/microsoft/kiota-serialization-text-go/release-please-config.json b/vendor/github.com/microsoft/kiota-serialization-text-go/release-please-config.json new file mode 100644 index 0000000000..b51481a996 --- /dev/null +++ b/vendor/github.com/microsoft/kiota-serialization-text-go/release-please-config.json @@ -0,0 +1,14 @@ +{ + "release-type": "go", + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": true, + "include-component-in-tag": false, + "include-v-in-tag": true, + "packages": { + ".": { + "package-name": "github.com/microsoft/kiota-serialization-text-go", + "changelog-path": "CHANGELOG.md" + } + }, + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" + } diff --git a/vendor/github.com/microsoft/kiota-serialization-text-go/text_parse_node.go b/vendor/github.com/microsoft/kiota-serialization-text-go/text_parse_node.go index 5f2fd5fe7f..7bf7f0b9f6 100644 --- a/vendor/github.com/microsoft/kiota-serialization-text-go/text_parse_node.go +++ b/vendor/github.com/microsoft/kiota-serialization-text-go/text_parse_node.go @@ -14,7 +14,9 @@ import ( // TextParseNode is a ParseNode implementation for JSON. type TextParseNode struct { - value string + value string + onBeforeAssignFieldValues absser.ParsableAction + onAfterAssignFieldValues absser.ParsableAction } // NewTextParseNode creates a new TextParseNode. @@ -251,20 +253,22 @@ func (n *TextParseNode) GetRawValue() (interface{}, error) { // GetOnBeforeAssignFieldValues returns a ByteArray value from the nodes. func (n *TextParseNode) GetOnBeforeAssignFieldValues() absser.ParsableAction { - return nil + return n.onBeforeAssignFieldValues } // SetOnBeforeAssignFieldValues returns a ByteArray value from the nodes. func (n *TextParseNode) SetOnBeforeAssignFieldValues(action absser.ParsableAction) error { - return UnsupportedMethodError + n.onBeforeAssignFieldValues = action + return nil } // GetOnAfterAssignFieldValues returns a ByteArray value from the nodes. func (n *TextParseNode) GetOnAfterAssignFieldValues() absser.ParsableAction { - return nil + return n.onAfterAssignFieldValues } // SetOnAfterAssignFieldValues returns a ByteArray value from the nodes. func (n *TextParseNode) SetOnAfterAssignFieldValues(action absser.ParsableAction) error { - return UnsupportedMethodError + n.onAfterAssignFieldValues = action + return nil } diff --git a/vendor/github.com/microsoft/kiota-serialization-text-go/text_serialization_writer.go b/vendor/github.com/microsoft/kiota-serialization-text-go/text_serialization_writer.go index 84690b9fcc..59aa66a12d 100644 --- a/vendor/github.com/microsoft/kiota-serialization-text-go/text_serialization_writer.go +++ b/vendor/github.com/microsoft/kiota-serialization-text-go/text_serialization_writer.go @@ -14,11 +14,13 @@ import ( var NoStructuredDataError = errors.New("text does not support structured data") var OnlyOneValue = errors.New("text serialization writer can only write one value") -var UnsupportedMethodError = errors.New("text does not support current method") // TextSerializationWriter implements SerializationWriter for JSON. type TextSerializationWriter struct { - writer []string + writer []string + onBeforeAssignFieldValues absser.ParsableAction + onAfterAssignFieldValues absser.ParsableAction + onStartObjectSerialization absser.ParsableWriter } // NewTextSerializationWriter creates a new instance of the TextSerializationWriter. @@ -257,25 +259,28 @@ func (w *TextSerializationWriter) WriteNullValue(key string) error { } func (w *TextSerializationWriter) GetOnBeforeSerialization() absser.ParsableAction { - return nil + return w.onBeforeAssignFieldValues } func (w *TextSerializationWriter) SetOnBeforeSerialization(action absser.ParsableAction) error { - return UnsupportedMethodError + w.onBeforeAssignFieldValues = action + return nil } func (w *TextSerializationWriter) GetOnAfterObjectSerialization() absser.ParsableAction { - return nil + return w.onAfterAssignFieldValues } func (w *TextSerializationWriter) SetOnAfterObjectSerialization(action absser.ParsableAction) error { - return UnsupportedMethodError + w.onAfterAssignFieldValues = action + return nil } func (w *TextSerializationWriter) GetOnStartObjectSerialization() absser.ParsableWriter { - return nil + return w.onStartObjectSerialization } func (w *TextSerializationWriter) SetOnStartObjectSerialization(writer absser.ParsableWriter) error { - return UnsupportedMethodError + w.onStartObjectSerialization = writer + return nil } diff --git a/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/.release-please-manifest.json b/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/.release-please-manifest.json new file mode 100644 index 0000000000..06ef89597f --- /dev/null +++ b/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "1.2.1" +} \ No newline at end of file diff --git a/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/CHANGELOG.md b/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/CHANGELOG.md index a748c9236a..b230effdd4 100644 --- a/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/CHANGELOG.md +++ b/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/CHANGELOG.md @@ -2,15 +2,86 @@ All notable changes to this project will be documented in this file. -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.2.1](https://github.com/microsoftgraph/msgraph-sdk-go-core/compare/v1.2.0...v1.2.1) (2024-08-26) -## [Unreleased] + +### Bug Fixes + +* repeated slice uploading on large file upload task ([cb329cc](https://github.com/microsoftgraph/msgraph-sdk-go-core/commit/cb329cc395946a619cda5501da88dcda15d84d9b)) + +## [1.2.0](https://github.com/microsoftgraph/msgraph-sdk-go-core/compare/v1.1.0...v1.2.0) (2024-07-15) + + +### Features + +* add git release config ([69234a2](https://github.com/microsoftgraph/msgraph-sdk-go-core/commit/69234a236c1d212941e742593ce43d2a35a1212b)) + + +### Bug Fixes + +* allows registration of page iterator headers ([#309](https://github.com/microsoftgraph/msgraph-sdk-go-core/issues/309)) ([d4b0806](https://github.com/microsoftgraph/msgraph-sdk-go-core/commit/d4b0806dadcc3ccdf07a8eca8ca7b93150094d7f)) +* content range order during upload ([#304](https://github.com/microsoftgraph/msgraph-sdk-go-core/issues/304)) ([f241e94](https://github.com/microsoftgraph/msgraph-sdk-go-core/commit/f241e947b28de38e8f7bc8c3d4eb6eb95b9afbdb)) + +## [1.1.0](https://github.com/microsoftgraph/msgraph-sdk-go-core/compare/v1.0.2...v1.1.0) (2024-07-10) + + +### Features + +* add git release config ([69234a2](https://github.com/microsoftgraph/msgraph-sdk-go-core/commit/69234a236c1d212941e742593ce43d2a35a1212b)) + + +### Bug Fixes + +* content range order during upload ([#304](https://github.com/microsoftgraph/msgraph-sdk-go-core/issues/304)) ([f241e94](https://github.com/microsoftgraph/msgraph-sdk-go-core/commit/f241e947b28de38e8f7bc8c3d4eb6eb95b9afbdb)) + +## [1.1.0] - 2024-02-02 ### Added +- Added support for large file uploads. + +## [1.0.2] - 2023-12-01 + +### Changed + +- Fixed a bug where GetBatchResponseById failed to deserialize error response bodies. + +## [1.0.1] - 2023-11-24 + +### Changed + +- Fixed a bug where page iterator would panic if it couldn't find the GetValue method on the collection. + +## [1.0.0] - 2023-05-04 + ### Changed +- GA Release. + +## [0.36.2] - 2023-05-01 + +### Added + +- `PageIterator` exposes `odata.nextLink` and `odata.deltaLink` of most recent page. + +## [0.36.1] - 2023-04-17 + +### Added + +- Adds url token replacement to batch requests. + +## [0.36.0] - 2023-03-27 + +### Added + +- Adds `BatchRequestCollection` support. + +## [0.35.0] - 2023-03-23 + +### Added + +- `PageIterator` uses generics to define return type. + ## [0.34.1] - 2023-03-06 ### Changed diff --git a/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/CODE_OF_CONDUCT.md b/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000..686e5e7a09 --- /dev/null +++ b/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/CODE_OF_CONDUCT.md @@ -0,0 +1,10 @@ +# Microsoft Open Source Code of Conduct + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). + +Resources: + +- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) +- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns +- Employees can reach out at [aka.ms/opensource/moderation-support](https://aka.ms/opensource/moderation-support) diff --git a/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/CONTRIBUTING.md b/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/CONTRIBUTING.md index 72cd68a87d..45581ead9d 100644 --- a/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/CONTRIBUTING.md +++ b/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/CONTRIBUTING.md @@ -19,3 +19,34 @@ Revisions of this nature will result in a 0.0.X change of the version number. If major functionality is being added, or there will need to be gestation time for a change, it should be submitted against the __feature__ branch. Revisions of this nature will result in a 0.X.X change of the version number. + +## Commit message format + +To support our automated release process, pull requests are required to follow the [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/) +format. + +Each commit message consists of a **header**, an optional **body** and an optional **footer**. The header is the first line of the commit and +MUST have a **type** (see below for a list of types) and a **description**. An optional **scope** can be added to the header to give extra context. + +``` +[optional scope]: + + + + +``` + +The recommended commit types used are: + + - **feat** for feature updates (increments the _minor_ version) + - **fix** for bug fixes (increments the _patch_ version) + - **perf** for performance related changes e.g. optimizing an algorithm + - **refactor** for code refactoring changes + - **test** for test suite updates e.g. adding a test or fixing a test + - **style** for changes that don't affect the meaning of code. e.g. formatting changes + - **docs** for documentation updates e.g. ReadMe update or code documentation updates + - **build** for build system changes (gradle updates, external dependency updates) + - **ci** for CI configuration file changes e.g. updating a pipeline + - **chore** for miscallaneous non-sdk changesin the repo e.g. removing an unused file + +Adding a footer with the prefix **BREAKING CHANGE:** will cause an increment of the _major_ version. \ No newline at end of file diff --git a/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/README.md b/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/README.md index eefcce324c..8953aa6630 100644 --- a/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/README.md +++ b/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/README.md @@ -6,7 +6,7 @@ Get started with the Microsoft Graph Core SDK for Go by integrating the [Microso > **Note:** Although you can use this library directly, we recommend you use the [v1](https://github.com/microsoftgraph/msgraph-sdk-go) or [beta](https://github.com/microsoftgraph/msgraph-beta-sdk-go) library which rely on this library and additionally provide a fluent style Go API and models. > -> **Note:** the Microsoft Graph Go SDK is currently in Community Preview. During this period we're expecting breaking changes to happen to the SDK based on community's feedback. Checkout the [known limitations](https://github.com/microsoftgraph/msgraph-sdk-go-core/issues/1). +> **Note:** The Microsoft Graph Go SDK is currently in Release Candidate (RC) version starting from version 0.34.1. The SDK is still undergoing testing but minimum breaking changes should be expected. Checkout the [known limitations](https://github.com/microsoftgraph/msgraph-sdk-go-core/issues/1). ## Samples and usage guide diff --git a/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/authentication/azure_identity_access_token_provider.go b/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/authentication/azure_identity_access_token_provider.go index dc836ca055..fd89a62d12 100644 --- a/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/authentication/azure_identity_access_token_provider.go +++ b/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/authentication/azure_identity_access_token_provider.go @@ -31,7 +31,7 @@ func NewAzureIdentityAccessTokenProviderWithScopesAndValidHostsAndObservabilityO if err != nil { return nil, err } - if len(scopes) == 0 { + if len(validHosts) == 0 { base.GetAllowedHostsValidator().SetAllowedHosts([]string{"graph.microsoft.com", "graph.microsoft.us", "dod-graph.microsoft.us", "graph.microsoft.de", "microsoftgraph.chinacloudapi.cn", "canary.graph.microsoft.com"}) } result := &AzureIdentityAccessTokenProvider{ diff --git a/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/batch_request_collection.go b/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/batch_request_collection.go new file mode 100644 index 0000000000..338e846efc --- /dev/null +++ b/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/batch_request_collection.go @@ -0,0 +1,71 @@ +package msgraphgocore + +import ( + "context" + "errors" + abstractions "github.com/microsoft/kiota-abstractions-go" +) + +type BatchRequestCollection struct { + batchRequest *batchRequest + batchLimit int +} + +const MaxBatchRequests = 4 + +// NewBatchRequestCollection creates an instance of a BatchRequestCollection with a default request limit +func NewBatchRequestCollection(adapter abstractions.RequestAdapter) *BatchRequestCollection { + return NewBatchRequestCollectionWithLimit(adapter, MaxBatchRequests) +} + +// NewBatchRequestCollectionWithLimit creates an instance of a BatchRequestCollection with a defined limit in requests +func NewBatchRequestCollectionWithLimit(adapter abstractions.RequestAdapter, batchLimit int) *BatchRequestCollection { + return &BatchRequestCollection{ + batchRequest: &batchRequest{ + adapter: adapter, + }, + batchLimit: batchLimit, + } +} + +// AddBatchRequestStep converts RequestInformation to a BatchItem and adds it to a BatchRequestCollection +func (b *BatchRequestCollection) AddBatchRequestStep(reqInfo abstractions.RequestInformation) (BatchItem, error) { + return b.batchRequest.addLimitedBatchRequestStep(reqInfo, -1) +} + +// Send serializes and sends the batch request to the server +func (b *BatchRequestCollection) Send(ctx context.Context, adapter abstractions.RequestAdapter) (BatchResponse, error) { + // spit request with a max of 19 + requestItems := chunkSlice(b.batchRequest.requests, 19) + + if len(requestItems) > b.batchLimit { + return nil, errors.New("exceeded max number of batch requests") + } + + // execute requests + response := NewBatchResponse() + for _, requests := range requestItems { + batch := NewBatchRequest(b.batchRequest.adapter) + batch.SetRequests(requests) + res, err := batch.Send(ctx, adapter) + if err != nil { + return nil, err + } + response.AddResponses(res.GetResponses()) + } + + return response, nil +} + +func chunkSlice[T interface{}](slice []T, chunkSize int) [][]T { + var chunks [][]T + for i := 0; i < len(slice); i += chunkSize { + end := i + chunkSize + if end > len(slice) { + end = len(slice) + } + + chunks = append(chunks, slice[i:end]) + } + return chunks +} diff --git a/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/batch_requests.go b/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/batch_requests.go index 2263c4ddf9..2d35befb08 100644 --- a/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/batch_requests.go +++ b/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/batch_requests.go @@ -16,6 +16,7 @@ import ( abstractions "github.com/microsoft/kiota-abstractions-go" "github.com/microsoft/kiota-abstractions-go/serialization" absser "github.com/microsoft/kiota-abstractions-go/serialization" + nethttplibrary "github.com/microsoft/kiota-http-go" ) const BatchRequestErrorRegistryKey = "BATCH_REQUEST_ERROR_REGISTRY_KEY" @@ -101,7 +102,11 @@ func (br *batchRequest) GetFieldDeserializers() map[string]func(serialization.Pa // // You can add upto 20 BatchItems to a BatchRequest func (br *batchRequest) AddBatchRequestStep(reqInfo abstractions.RequestInformation) (BatchItem, error) { - if len(br.GetRequests()) > 19 { + return br.addLimitedBatchRequestStep(reqInfo, 19) +} + +func (br *batchRequest) addLimitedBatchRequestStep(reqInfo abstractions.RequestInformation, requestLimit int) (BatchItem, error) { + if requestLimit != -1 && len(br.GetRequests()) > requestLimit { return nil, errors.New("batch items limit exceeded. BatchRequest has a limit of 20 batch items") } @@ -125,6 +130,7 @@ func (br *batchRequest) toBatchItem(requestInfo abstractions.RequestInformation) if err != nil { return nil, err } + uriString := nethttplibrary.ReplacePathTokens(uri.String(), ReplacementPairs) var body map[string]interface{} if requestInfo.Content != nil { @@ -152,7 +158,7 @@ func (br *batchRequest) toBatchItem(requestInfo abstractions.RequestInformation) if err != nil { return nil, err } - var finalUrl = strings.Replace(uri.String(), baseUri.String(), "", 1) + var finalUrl = strings.Replace(uriString, baseUri.String(), "", 1) request.SetUrl(&finalUrl) return request, nil @@ -204,13 +210,24 @@ func getRootParseNode(responseItem BatchItem) (absser.ParseNode, error) { if contentType == "" { return nil, nil } - var buf bytes.Buffer - enc := gob.NewEncoder(&buf) - err := enc.Encode(responseItem.GetBody()) - if err != nil { - return nil, err + + var ( + content []byte + err error + ) + if contentType == jsonContentType { + if content, err = json.Marshal(responseItem.GetBody()); err != nil { + return nil, err + } + } else { + var buf bytes.Buffer + if err = gob.NewEncoder(&buf).Encode(responseItem.GetBody()); err != nil { + return nil, err + } + content = buf.Bytes() } - return serialization.DefaultParseNodeFactoryInstance.GetRootParseNode(contentType, buf.Bytes()) + + return serialization.DefaultParseNodeFactoryInstance.GetRootParseNode(contentType, content) } func throwErrors(responseItem BatchItem, typeName string) error { @@ -260,7 +277,7 @@ func GetBatchResponseById[T serialization.Parsable](resp BatchResponse, itemId s item := resp.GetResponseById(itemId) if *item.GetStatus() >= 400 { - return res, throwErrors(item, reflect.TypeOf(new(T)).Name()) + return res, throwErrors(item, reflect.TypeOf(new(T)).Elem().Name()) } jsonStr, err := json.Marshal(item.GetBody()) @@ -276,7 +293,7 @@ func GetBatchResponseById[T serialization.Parsable](resp BatchResponse, itemId s } result, err := parseNode.GetObjectValue(constructor) - return result.(T), nil + return result.(T), err } func getErrorMapper(key string) abstractions.ErrorMappings { diff --git a/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/batch_response_model.go b/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/batch_response_model.go index deee7e7382..647004f5d1 100644 --- a/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/batch_response_model.go +++ b/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/batch_response_model.go @@ -10,6 +10,13 @@ type batchResponse struct { isIndexed bool } +func NewBatchResponse() BatchResponse { + return &batchResponse{ + indexResponse: make(map[string]BatchItem), + isIndexed: false, + } +} + // GetResponses returns a slice of BatchItem to the user func (br *batchResponse) GetResponses() []BatchItem { return br.responses @@ -20,6 +27,13 @@ func (br *batchResponse) SetResponses(responses []BatchItem) { br.responses = responses } +// AddResponses adds elements to existing response +func (br *batchResponse) AddResponses(responses []BatchItem) { + for _, v := range responses { + br.responses = append(br.responses, v) + } +} + // GetResponseById returns a response payload as a batch item func (br *batchResponse) GetResponseById(itemId string) BatchItem { if !br.isIndexed { @@ -36,11 +50,7 @@ func (br *batchResponse) GetResponseById(itemId string) BatchItem { // CreateBatchResponseDiscriminator creates a new instance of the appropriate class based on discriminator value func CreateBatchResponseDiscriminator(serialization.ParseNode) (serialization.Parsable, error) { - res := batchResponse{ - indexResponse: make(map[string]BatchItem), - isIndexed: false, - } - return &res, nil + return NewBatchResponse(), nil } // BatchResponse instance of batch request result payload @@ -48,7 +58,10 @@ type BatchResponse interface { serialization.Parsable GetResponses() []BatchItem SetResponses(responses []BatchItem) + AddResponses(responses []BatchItem) GetResponseById(itemId string) BatchItem + GetFailedResponses() map[string]int32 + GetStatusCodes() map[string]int32 } // Serialize serializes information the current object @@ -75,3 +88,23 @@ func (br *batchResponse) GetFieldDeserializers() map[string]func(serialization.P } return res } + +// GetFailedResponses returns a map of responses that failed +func (br *batchResponse) GetFailedResponses() map[string]int32 { + statuses := make(map[string]int32) + for _, response := range br.GetResponses() { + if *response.GetStatus() > 399 && *response.GetStatus() < 600 { + statuses[*response.GetId()] = *response.GetStatus() + } + } + return statuses +} + +// GetStatusCodes returns a map of responses statuses and the status codes +func (br *batchResponse) GetStatusCodes() map[string]int32 { + statuses := make(map[string]int32) + for _, response := range br.GetResponses() { + statuses[*response.GetId()] = *response.GetStatus() + } + return statuses +} diff --git a/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/graph_client_factory.go b/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/graph_client_factory.go index e2677a24fc..698ddfd933 100644 --- a/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/graph_client_factory.go +++ b/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/graph_client_factory.go @@ -6,12 +6,14 @@ import ( khttp "github.com/microsoft/kiota-http-go" ) +var ReplacementPairs = map[string]string{"/users/me-token-to-replace": "/me"} + // GetDefaultMiddlewaresWithOptions creates a default slice of middleware for the Graph Client. func GetDefaultMiddlewaresWithOptions(options *GraphClientOptions) []khttp.Middleware { kiotaMiddlewares := khttp.GetDefaultMiddlewares() graphMiddlewares := []khttp.Middleware{ NewGraphTelemetryHandler(options), - khttp.NewUrlReplaceHandler(), + khttp.NewUrlReplaceHandler(true, ReplacementPairs), } graphMiddlewaresLen := len(graphMiddlewares) resultMiddlewares := make([]khttp.Middleware, len(kiotaMiddlewares)+graphMiddlewaresLen) diff --git a/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/page_iterator.go b/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/page_iterator.go index 063d45589d..5729edf5da 100644 --- a/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/page_iterator.go +++ b/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/page_iterator.go @@ -3,29 +3,34 @@ package msgraphgocore import ( "context" "errors" - abstractions "github.com/microsoft/kiota-abstractions-go" - "github.com/microsoft/kiota-abstractions-go/serialization" "net/url" "reflect" + + abstractions "github.com/microsoft/kiota-abstractions-go" + "github.com/microsoft/kiota-abstractions-go/serialization" ) +const PageIteratorErrorRegistryKey = "PAGE_ITERATOR_ERROR_REGISTRY_KEY" + // PageIterator represents an iterator object that can be used to get subsequent pages of a collection. -type PageIterator struct { - currentPage PageResult +type PageIterator[T interface{}] struct { + currentPage PageResult[T] reqAdapter abstractions.RequestAdapter pauseIndex int constructorFunc serialization.ParsableFactory headers *abstractions.RequestHeaders reqOptions []abstractions.RequestOption + errorMappings abstractions.ErrorMappings } // PageResult represents a page object built from a graph response object -type PageResult struct { - oDataNextLink *string - value []interface{} +type PageResult[T interface{}] struct { + oDataNextLink *string + oDataDeltaLink *string + value []T } -func (p *PageResult) getValue() []interface{} { +func (p *PageResult[T]) getValue() []T { if p == nil { return nil } @@ -33,7 +38,7 @@ func (p *PageResult) getValue() []interface{} { return p.value } -func (p *PageResult) getOdataNextLink() *string { +func (p *PageResult[T]) getOdataNextLink() *string { if p == nil { return nil } @@ -45,22 +50,25 @@ func (p *PageResult) getOdataNextLink() *string { // // It has three parameters. res is the graph response from the initial request and represents the first page. // reqAdapter is used for getting the next page and constructorFunc is used for serializing next page's response to the specified type. -func NewPageIterator(res interface{}, reqAdapter abstractions.RequestAdapter, constructorFunc serialization.ParsableFactory) (*PageIterator, error) { +func NewPageIterator[T interface{}](res interface{}, reqAdapter abstractions.RequestAdapter, constructorFunc serialization.ParsableFactory) (*PageIterator[T], error) { if reqAdapter == nil { return nil, errors.New("reqAdapter can't be nil") } - page, err := convertToPage(res) + page, err := convertToPage[T](res) if err != nil { return nil, err } - return &PageIterator{ + errorMapping := getErrorMapper(PageIteratorErrorRegistryKey) + + return &PageIterator[T]{ currentPage: page, reqAdapter: reqAdapter, pauseIndex: 0, constructorFunc: constructorFunc, headers: abstractions.NewRequestHeaders(), + errorMappings: errorMapping, }, nil } @@ -78,7 +86,7 @@ func NewPageIterator(res interface{}, reqAdapter abstractions.RequestAdapter, co // return true // } // err := pageIterator.Iterate(context.Background(), callbackFunc) -func (pI *PageIterator) Iterate(context context.Context, callback func(pageItem interface{}) bool) error { +func (pI *PageIterator[T]) Iterate(context context.Context, callback func(pageItem T) bool) error { for { keepIterating := pI.enumerate(callback) @@ -87,6 +95,10 @@ func (pI *PageIterator) Iterate(context context.Context, callback func(pageItem return nil } + if pI.currentPage.getOdataNextLink() == nil || *pI.currentPage.getOdataNextLink() == "" { + return nil + } + nextPage, err := pI.next(context) if err != nil { return err @@ -100,28 +112,34 @@ func (pI *PageIterator) Iterate(context context.Context, callback func(pageItem // SetHeaders provides headers for requests made to get subsequent pages // // Headers in the initial request -- request to get the first page -- are not included in subsequent page requests. -func (pI *PageIterator) SetHeaders(headers *abstractions.RequestHeaders) { +func (pI *PageIterator[T]) SetHeaders(headers *abstractions.RequestHeaders) { pI.headers = headers } // SetReqOptions provides configuration for handlers during requests for subsequent pages -func (pI *PageIterator) SetReqOptions(reqOptions []abstractions.RequestOption) { +func (pI *PageIterator[T]) SetReqOptions(reqOptions []abstractions.RequestOption) { pI.reqOptions = reqOptions } -func (pI *PageIterator) next(context context.Context) (PageResult, error) { - var page PageResult +// GetOdataNextLink returns the @odata.nextLink value in the current page result. +func (pI *PageIterator[T]) GetOdataNextLink() *string { + return pI.currentPage.oDataNextLink +} - if pI.currentPage.getOdataNextLink() == nil || *pI.currentPage.getOdataNextLink() == "" { - return page, nil - } +// GetOdataDeltaLink returns the @odata.deltaLink value in current paged result. +func (pI *PageIterator[T]) GetOdataDeltaLink() *string { + return pI.currentPage.oDataDeltaLink +} + +func (pI *PageIterator[T]) next(context context.Context) (PageResult[T], error) { + var page PageResult[T] resp, err := pI.fetchNextPage(context) if err != nil { return page, err } - page, err = convertToPage(resp) + page, err = convertToPage[T](resp) if err != nil { return page, err } @@ -129,7 +147,7 @@ func (pI *PageIterator) next(context context.Context) (PageResult, error) { return page, nil } -func (pI *PageIterator) fetchNextPage(context context.Context) (serialization.Parsable, error) { +func (pI *PageIterator[T]) fetchNextPage(context context.Context) (serialization.Parsable, error) { var graphResponse serialization.Parsable var err error @@ -148,7 +166,7 @@ func (pI *PageIterator) fetchNextPage(context context.Context) (serialization.Pa requestInfo.Headers.AddAll(pI.headers) requestInfo.AddRequestOptions(pI.reqOptions) - graphResponse, err = pI.reqAdapter.Send(context, requestInfo, pI.constructorFunc, nil) + graphResponse, err = pI.reqAdapter.Send(context, requestInfo, pI.constructorFunc, pI.errorMappings) if err != nil { return nil, err } @@ -156,7 +174,7 @@ func (pI *PageIterator) fetchNextPage(context context.Context) (serialization.Pa return graphResponse, nil } -func (pI *PageIterator) enumerate(callback func(item interface{}) bool) bool { +func (pI *PageIterator[T]) enumerate(callback func(item T) bool) bool { keepIterating := true pageItems := pI.currentPage.getValue() @@ -174,11 +192,11 @@ func (pI *PageIterator) enumerate(callback func(item interface{}) bool) bool { for i := pI.pauseIndex; i < len(pageItems); i++ { keepIterating = callback(pageItems[i]) + // Set pauseIndex so that we know where to resume from. + // Resumes from the next item + pI.pauseIndex = i + 1 + if !keepIterating { - // Callback returned false, pause! stop enumerating page items. Set pauseIndex so that we know - // where to resume from. - // Resumes from the next item - pI.pauseIndex = i + 1 break } } @@ -191,24 +209,29 @@ type PageWithOdataNextLink interface { GetOdataNextLink() *string } -func convertToPage(response interface{}) (PageResult, error) { - var page PageResult +// PageWithOdataDeltaLink represents a contract with the GetOdataDeltaLink() method +type PageWithOdataDeltaLink interface { + GetOdataDeltaLink() *string +} + +func convertToPage[T interface{}](response interface{}) (PageResult[T], error) { + var page PageResult[T] if response == nil { return page, errors.New("response cannot be nil") } method := reflect.ValueOf(response).MethodByName("GetValue") - if method.IsNil() { + if method.Kind() == reflect.Invalid { return page, errors.New("value property missing in response object") } value := method.Call(nil)[0] // Collect all entities in the value slice. // This converts a graph slice ie []graph.User to a dynamic slice []interface{} - collected := make([]interface{}, 0) + collected := make([]T, 0) for i := 0; i < value.Len(); i++ { - collected = append(collected, value.Index(i).Interface()) + collected = append(collected, value.Index(i).Interface().(T)) } parsablePage, ok := response.(PageWithOdataNextLink) @@ -216,6 +239,11 @@ func convertToPage(response interface{}) (PageResult, error) { return page, errors.New("response does not have next link accessor") } + deltablePage, ok := response.(PageWithOdataDeltaLink) + if ok { + page.oDataDeltaLink = deltablePage.GetOdataDeltaLink() + } + page.oDataNextLink = parsablePage.GetOdataNextLink() page.value = collected diff --git a/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/release-please-config.json b/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/release-please-config.json new file mode 100644 index 0000000000..fba2305a69 --- /dev/null +++ b/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/release-please-config.json @@ -0,0 +1,17 @@ +{ + "release-type": "go", + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": true, + "include-component-in-tag": false, + "include-v-in-tag": true, + "packages": { + ".": { + "package-name": "github.com/microsoftgraph/msgraph-sdk-go-core", + "changelog-path": "CHANGELOG.md", + "extra-files": [ + "version.go" + ] + } + }, + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" + } diff --git a/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/version.go b/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/version.go index 8265ee0b52..05f135c494 100644 --- a/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/version.go +++ b/vendor/github.com/microsoftgraph/msgraph-sdk-go-core/version.go @@ -1,3 +1,7 @@ package msgraphgocore -var CoreVersion = "0.34.0" +/** The SDK version */ +// x-release-please-start-version +var CoreVersion = "1.2.1" + +// x-release-please-end diff --git a/vendor/github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1/doc.go b/vendor/github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1/doc.go index 9b77a72e6f..68eb3ac0f0 100644 --- a/vendor/github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1/doc.go +++ b/vendor/github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1/doc.go @@ -15,9 +15,6 @@ limitations under the License. */ // Package v1 contains API Schema definitions for the cloudcredential v1 API group -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential -// +k8s:defaulter-gen=TypeMeta +// +k8s:deepcopy-gen=package // +groupName=cloudcredential.openshift.io package v1 diff --git a/vendor/github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1/register.go b/vendor/github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1/register.go index e596e7d097..5f938d9f15 100644 --- a/vendor/github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1/register.go +++ b/vendor/github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1/register.go @@ -54,7 +54,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &CredentialsRequest{}, &CredentialsRequestList{}, - &AlibabaCloudProviderStatus{}, &AlibabaCloudProviderSpec{}, &AWSProviderStatus{}, &AWSProviderSpec{}, &AzureProviderStatus{}, &AzureProviderSpec{}, &GCPProviderStatus{}, &GCPProviderSpec{}, diff --git a/vendor/github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1/types_alibaba.go b/vendor/github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1/types_alibaba.go deleted file mode 100644 index 5c7f183b48..0000000000 --- a/vendor/github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1/types_alibaba.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Copyright 2021 The OpenShift Authors. - -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. -*/ - -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// TODO: these types should eventually be broken out, along with the actuator, to a separate repo. - -// AlibabaCloudProviderSpec contains the required information to create a user policy in AlibabaCloud. -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type AlibabaCloudProviderSpec struct { - metav1.TypeMeta `json:",inline"` - // StatementEntries contains a list of policy statements that should be associated with this credentials access key. - StatementEntries []AlibabaStatementEntry `json:"statementEntries"` -} - -// StatementEntry models an AlibabaCloud policy statement entry. -type AlibabaStatementEntry struct { - // Effect indicates if this policy statement is to Allow or Deny. - Effect string `json:"effect"` - // Action describes the particular AlibabaCloud service actions that should be allowed or denied. - Action []string `json:"action"` - // Resource specifies the object(s) this statement should apply to. (or "*" for all) - Resource string `json:"resource"` -} - -// AlibabaCloudProviderStatus containes the status of the credentials request in AlibabaCloud. -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type AlibabaCloudProviderStatus struct { - metav1.TypeMeta `json:",inline"` -} diff --git a/vendor/github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1/types_credentialsrequest.go b/vendor/github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1/types_credentialsrequest.go index 1c44e6f9ed..3e02f10058 100644 --- a/vendor/github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1/types_credentialsrequest.go +++ b/vendor/github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1/types_credentialsrequest.go @@ -102,6 +102,12 @@ type CredentialsRequestStatus struct { // +optional LastSyncCloudCredsSecretResourceVersion string `json:"lastSyncCloudCredsSecretResourceVersion,omitempty"` + // LastSyncInfrastructureResourceVersion is the resource version of the + // Infrastructure resource. It is used to determine if the user provided tags have + // been updated since the last sync. + // +optional + LastSyncInfrastructureResourceVersion string `json:"lastSyncInfrastructureResourceVersion,omitempty"` + // ProviderStatus contains cloud provider specific status. // +kubebuilder:pruning:PreserveUnknownFields ProviderStatus *runtime.RawExtension `json:"providerStatus,omitempty"` diff --git a/vendor/github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1/types_gcp.go b/vendor/github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1/types_gcp.go index a91dd80bc7..c6c35bec38 100644 --- a/vendor/github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1/types_gcp.go +++ b/vendor/github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1/types_gcp.go @@ -39,6 +39,18 @@ type GCPProviderSpec struct { // have the necessary services enabled // +optional SkipServiceCheck bool `json:"skipServiceCheck,omitempty"` + + // The following fields are only required for Google Workload Identity Federation. + + // ServiceAccountEmail that will be impersonated during Workload Identity Federation. + // +optional + ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` + + // Audience that will be used with Workload Identity Federation. + // It should be formatted as follows: + // "//iam.googleapis.com/projects//locations/global/workloadIdentityPools//providers/" + // For more information see https://cloud.google.com/iam/docs/workload-identity-federation-with-other-providers#create-credential-config + Audience string `json:"audience,omitempty"` } // GCPProviderStatus contains the status of the GCP credentials request. diff --git a/vendor/github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1/zz_generated.deepcopy.go index 778b67fb8c..a569187069 100644 --- a/vendor/github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1/zz_generated.deepcopy.go @@ -92,84 +92,6 @@ func (in *AccessPolicy) DeepCopy() *AccessPolicy { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AlibabaCloudProviderSpec) DeepCopyInto(out *AlibabaCloudProviderSpec) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.StatementEntries != nil { - in, out := &in.StatementEntries, &out.StatementEntries - *out = make([]AlibabaStatementEntry, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlibabaCloudProviderSpec. -func (in *AlibabaCloudProviderSpec) DeepCopy() *AlibabaCloudProviderSpec { - if in == nil { - return nil - } - out := new(AlibabaCloudProviderSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AlibabaCloudProviderSpec) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AlibabaCloudProviderStatus) DeepCopyInto(out *AlibabaCloudProviderStatus) { - *out = *in - out.TypeMeta = in.TypeMeta - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlibabaCloudProviderStatus. -func (in *AlibabaCloudProviderStatus) DeepCopy() *AlibabaCloudProviderStatus { - if in == nil { - return nil - } - out := new(AlibabaCloudProviderStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AlibabaCloudProviderStatus) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AlibabaStatementEntry) DeepCopyInto(out *AlibabaStatementEntry) { - *out = *in - if in.Action != nil { - in, out := &in.Action, &out.Action - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlibabaStatementEntry. -func (in *AlibabaStatementEntry) DeepCopy() *AlibabaStatementEntry { - if in == nil { - return nil - } - out := new(AlibabaStatementEntry) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AzureProviderSpec) DeepCopyInto(out *AzureProviderSpec) { *out = *in diff --git a/vendor/github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1/zz_generated.defaults.go b/vendor/github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1/zz_generated.defaults.go new file mode 100644 index 0000000000..88694caacb --- /dev/null +++ b/vendor/github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1/zz_generated.defaults.go @@ -0,0 +1,17 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/vendor/github.com/openshift/cloud-credential-operator/pkg/aws/client.go b/vendor/github.com/openshift/cloud-credential-operator/pkg/aws/client.go index 389a882c4c..5d1e8888a8 100644 --- a/vendor/github.com/openshift/cloud-credential-operator/pkg/aws/client.go +++ b/vendor/github.com/openshift/cloud-credential-operator/pkg/aws/client.go @@ -17,18 +17,20 @@ limitations under the License. package aws import ( + "context" + "errors" + "fmt" "strings" - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/credentials" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/cloudfront" - "github.com/aws/aws-sdk-go/service/cloudfront/cloudfrontiface" - "github.com/aws/aws-sdk-go/service/iam" - "github.com/aws/aws-sdk-go/service/iam/iamiface" - "github.com/aws/aws-sdk-go/service/s3" - "github.com/aws/aws-sdk-go/service/s3/s3iface" + awssdk "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/config" + "github.com/aws/aws-sdk-go-v2/credentials" + "github.com/aws/aws-sdk-go-v2/service/cloudfront" + "github.com/aws/aws-sdk-go-v2/service/iam" + "github.com/aws/aws-sdk-go-v2/service/s3" + "github.com/aws/smithy-go" + smithymiddleware "github.com/aws/smithy-go/middleware" "github.com/openshift/cloud-credential-operator/pkg/version" ) @@ -38,56 +40,55 @@ import ( // Client is a wrapper object for actual AWS SDK clients to allow for easier testing. type Client interface { //IAM - CreateAccessKey(*iam.CreateAccessKeyInput) (*iam.CreateAccessKeyOutput, error) - CreateOpenIDConnectProvider(*iam.CreateOpenIDConnectProviderInput) (*iam.CreateOpenIDConnectProviderOutput, error) - CreateRole(*iam.CreateRoleInput) (*iam.CreateRoleOutput, error) - CreateUser(*iam.CreateUserInput) (*iam.CreateUserOutput, error) - DeleteAccessKey(*iam.DeleteAccessKeyInput) (*iam.DeleteAccessKeyOutput, error) - DeleteUser(*iam.DeleteUserInput) (*iam.DeleteUserOutput, error) - DeleteUserPolicy(*iam.DeleteUserPolicyInput) (*iam.DeleteUserPolicyOutput, error) - GetOpenIDConnectProvider(input *iam.GetOpenIDConnectProviderInput) (*iam.GetOpenIDConnectProviderOutput, error) - GetRole(input *iam.GetRoleInput) (*iam.GetRoleOutput, error) - ListRoles(input *iam.ListRolesInput) (*iam.ListRolesOutput, error) - DeleteRole(input *iam.DeleteRoleInput) (*iam.DeleteRoleOutput, error) - ListRolePolicies(input *iam.ListRolePoliciesInput) (*iam.ListRolePoliciesOutput, error) - DeleteRolePolicy(input *iam.DeleteRolePolicyInput) (*iam.DeleteRolePolicyOutput, error) - GetUser(*iam.GetUserInput) (*iam.GetUserOutput, error) - GetUserPolicy(*iam.GetUserPolicyInput) (*iam.GetUserPolicyOutput, error) - ListAccessKeys(*iam.ListAccessKeysInput) (*iam.ListAccessKeysOutput, error) - ListOpenIDConnectProviders(*iam.ListOpenIDConnectProvidersInput) (*iam.ListOpenIDConnectProvidersOutput, error) - DeleteOpenIDConnectProvider(input *iam.DeleteOpenIDConnectProviderInput) (*iam.DeleteOpenIDConnectProviderOutput, error) - ListUserPolicies(*iam.ListUserPoliciesInput) (*iam.ListUserPoliciesOutput, error) - PutRolePolicy(*iam.PutRolePolicyInput) (*iam.PutRolePolicyOutput, error) - PutUserPolicy(*iam.PutUserPolicyInput) (*iam.PutUserPolicyOutput, error) - SimulatePrincipalPolicy(*iam.SimulatePrincipalPolicyInput) (*iam.SimulatePolicyResponse, error) - SimulatePrincipalPolicyPages(*iam.SimulatePrincipalPolicyInput, func(*iam.SimulatePolicyResponse, bool) bool) error - TagOpenIDConnectProvider(*iam.TagOpenIDConnectProviderInput) (*iam.TagOpenIDConnectProviderOutput, error) - TagUser(*iam.TagUserInput) (*iam.TagUserOutput, error) - UpdateAssumeRolePolicy(*iam.UpdateAssumeRolePolicyInput) (*iam.UpdateAssumeRolePolicyOutput, error) + CreateAccessKey(context.Context, *iam.CreateAccessKeyInput, ...func(*iam.Options)) (*iam.CreateAccessKeyOutput, error) + CreateOpenIDConnectProvider(context.Context, *iam.CreateOpenIDConnectProviderInput, ...func(*iam.Options)) (*iam.CreateOpenIDConnectProviderOutput, error) + CreateRole(context.Context, *iam.CreateRoleInput, ...func(*iam.Options)) (*iam.CreateRoleOutput, error) + CreateUser(context.Context, *iam.CreateUserInput, ...func(*iam.Options)) (*iam.CreateUserOutput, error) + DeleteAccessKey(context.Context, *iam.DeleteAccessKeyInput, ...func(*iam.Options)) (*iam.DeleteAccessKeyOutput, error) + DeleteUser(context.Context, *iam.DeleteUserInput, ...func(*iam.Options)) (*iam.DeleteUserOutput, error) + DeleteUserPolicy(context.Context, *iam.DeleteUserPolicyInput, ...func(*iam.Options)) (*iam.DeleteUserPolicyOutput, error) + GetOpenIDConnectProvider(context.Context, *iam.GetOpenIDConnectProviderInput, ...func(*iam.Options)) (*iam.GetOpenIDConnectProviderOutput, error) + GetRole(context.Context, *iam.GetRoleInput, ...func(*iam.Options)) (*iam.GetRoleOutput, error) + ListRoles(context.Context, *iam.ListRolesInput, ...func(*iam.Options)) (*iam.ListRolesOutput, error) + DeleteRole(context.Context, *iam.DeleteRoleInput, ...func(*iam.Options)) (*iam.DeleteRoleOutput, error) + ListRolePolicies(context.Context, *iam.ListRolePoliciesInput, ...func(*iam.Options)) (*iam.ListRolePoliciesOutput, error) + DeleteRolePolicy(context.Context, *iam.DeleteRolePolicyInput, ...func(*iam.Options)) (*iam.DeleteRolePolicyOutput, error) + GetUser(context.Context, *iam.GetUserInput, ...func(*iam.Options)) (*iam.GetUserOutput, error) + GetUserPolicy(context.Context, *iam.GetUserPolicyInput, ...func(*iam.Options)) (*iam.GetUserPolicyOutput, error) + ListAccessKeys(context.Context, *iam.ListAccessKeysInput, ...func(*iam.Options)) (*iam.ListAccessKeysOutput, error) + ListOpenIDConnectProviders(context.Context, *iam.ListOpenIDConnectProvidersInput, ...func(*iam.Options)) (*iam.ListOpenIDConnectProvidersOutput, error) + DeleteOpenIDConnectProvider(context.Context, *iam.DeleteOpenIDConnectProviderInput, ...func(*iam.Options)) (*iam.DeleteOpenIDConnectProviderOutput, error) + ListUserPolicies(context.Context, *iam.ListUserPoliciesInput, ...func(*iam.Options)) (*iam.ListUserPoliciesOutput, error) + PutRolePolicy(context.Context, *iam.PutRolePolicyInput, ...func(*iam.Options)) (*iam.PutRolePolicyOutput, error) + PutUserPolicy(context.Context, *iam.PutUserPolicyInput, ...func(*iam.Options)) (*iam.PutUserPolicyOutput, error) + SimulatePrincipalPolicy(context.Context, *iam.SimulatePrincipalPolicyInput, ...func(*iam.Options)) (*iam.SimulatePrincipalPolicyOutput, error) + TagOpenIDConnectProvider(context.Context, *iam.TagOpenIDConnectProviderInput, ...func(*iam.Options)) (*iam.TagOpenIDConnectProviderOutput, error) + TagUser(context.Context, *iam.TagUserInput, ...func(*iam.Options)) (*iam.TagUserOutput, error) + UpdateAssumeRolePolicy(context.Context, *iam.UpdateAssumeRolePolicyInput, ...func(*iam.Options)) (*iam.UpdateAssumeRolePolicyOutput, error) //S3 - CreateBucket(*s3.CreateBucketInput) (*s3.CreateBucketOutput, error) - PutBucketTagging(*s3.PutBucketTaggingInput) (*s3.PutBucketTaggingOutput, error) - GetBucketTagging(input *s3.GetBucketTaggingInput) (*s3.GetBucketTaggingOutput, error) - DeleteBucket(input *s3.DeleteBucketInput) (*s3.DeleteBucketOutput, error) - PutObject(*s3.PutObjectInput) (*s3.PutObjectOutput, error) - ListObjects(input *s3.ListObjectsInput) (*s3.ListObjectsOutput, error) - GetObjectTagging(input *s3.GetObjectTaggingInput) (*s3.GetObjectTaggingOutput, error) - DeleteObject(input *s3.DeleteObjectInput) (*s3.DeleteObjectOutput, error) - PutPublicAccessBlock(input *s3.PutPublicAccessBlockInput) (*s3.PutPublicAccessBlockOutput, error) - PutBucketPolicy(input *s3.PutBucketPolicyInput) (*s3.PutBucketPolicyOutput, error) + CreateBucket(context.Context, *s3.CreateBucketInput, ...func(*s3.Options)) (*s3.CreateBucketOutput, error) + PutBucketTagging(context.Context, *s3.PutBucketTaggingInput, ...func(*s3.Options)) (*s3.PutBucketTaggingOutput, error) + GetBucketTagging(context.Context, *s3.GetBucketTaggingInput, ...func(*s3.Options)) (*s3.GetBucketTaggingOutput, error) + DeleteBucket(context.Context, *s3.DeleteBucketInput, ...func(*s3.Options)) (*s3.DeleteBucketOutput, error) + PutObject(context.Context, *s3.PutObjectInput, ...func(*s3.Options)) (*s3.PutObjectOutput, error) + ListObjects(context.Context, *s3.ListObjectsInput, ...func(*s3.Options)) (*s3.ListObjectsOutput, error) + GetObjectTagging(context.Context, *s3.GetObjectTaggingInput, ...func(*s3.Options)) (*s3.GetObjectTaggingOutput, error) + DeleteObject(context.Context, *s3.DeleteObjectInput, ...func(*s3.Options)) (*s3.DeleteObjectOutput, error) + PutPublicAccessBlock(context.Context, *s3.PutPublicAccessBlockInput, ...func(*s3.Options)) (*s3.PutPublicAccessBlockOutput, error) + PutBucketPolicy(context.Context, *s3.PutBucketPolicyInput, ...func(*s3.Options)) (*s3.PutBucketPolicyOutput, error) //CloudFront - CreateCloudFrontOriginAccessIdentity(input *cloudfront.CreateCloudFrontOriginAccessIdentityInput) (*cloudfront.CreateCloudFrontOriginAccessIdentityOutput, error) - DeleteCloudFrontOriginAccessIdentity(input *cloudfront.DeleteCloudFrontOriginAccessIdentityInput) (*cloudfront.DeleteCloudFrontOriginAccessIdentityOutput, error) - GetCloudFrontOriginAccessIdentity(input *cloudfront.GetCloudFrontOriginAccessIdentityInput) (*cloudfront.GetCloudFrontOriginAccessIdentityOutput, error) - ListCloudFrontOriginAccessIdentities(input *cloudfront.ListCloudFrontOriginAccessIdentitiesInput) (*cloudfront.ListCloudFrontOriginAccessIdentitiesOutput, error) - CreateCloudFrontDistributionWithTags(input *cloudfront.CreateDistributionWithTagsInput) (*cloudfront.CreateDistributionWithTagsOutput, error) - DeleteCloudFrontDistribution(input *cloudfront.DeleteDistributionInput) (*cloudfront.DeleteDistributionOutput, error) - GetCloudFrontDistribution(input *cloudfront.GetDistributionInput) (*cloudfront.GetDistributionOutput, error) - UpdateCloudFrontDistribution(input *cloudfront.UpdateDistributionInput) (*cloudfront.UpdateDistributionOutput, error) - ListCloudFrontDistributions(input *cloudfront.ListDistributionsInput) (*cloudfront.ListDistributionsOutput, error) - ListTagsForCloudFrontResource(input *cloudfront.ListTagsForResourceInput) (*cloudfront.ListTagsForResourceOutput, error) + CreateCloudFrontOriginAccessIdentity(context.Context, *cloudfront.CreateCloudFrontOriginAccessIdentityInput, ...func(*cloudfront.Options)) (*cloudfront.CreateCloudFrontOriginAccessIdentityOutput, error) + DeleteCloudFrontOriginAccessIdentity(context.Context, *cloudfront.DeleteCloudFrontOriginAccessIdentityInput, ...func(*cloudfront.Options)) (*cloudfront.DeleteCloudFrontOriginAccessIdentityOutput, error) + GetCloudFrontOriginAccessIdentity(context.Context, *cloudfront.GetCloudFrontOriginAccessIdentityInput, ...func(*cloudfront.Options)) (*cloudfront.GetCloudFrontOriginAccessIdentityOutput, error) + ListCloudFrontOriginAccessIdentities(context.Context, *cloudfront.ListCloudFrontOriginAccessIdentitiesInput, ...func(*cloudfront.Options)) (*cloudfront.ListCloudFrontOriginAccessIdentitiesOutput, error) + CreateDistributionWithTags(context.Context, *cloudfront.CreateDistributionWithTagsInput, ...func(*cloudfront.Options)) (*cloudfront.CreateDistributionWithTagsOutput, error) + DeleteDistribution(context.Context, *cloudfront.DeleteDistributionInput, ...func(*cloudfront.Options)) (*cloudfront.DeleteDistributionOutput, error) + GetDistribution(context.Context, *cloudfront.GetDistributionInput, ...func(*cloudfront.Options)) (*cloudfront.GetDistributionOutput, error) + UpdateDistribution(context.Context, *cloudfront.UpdateDistributionInput, ...func(*cloudfront.Options)) (*cloudfront.UpdateDistributionOutput, error) + ListDistributions(context.Context, *cloudfront.ListDistributionsInput, ...func(*cloudfront.Options)) (*cloudfront.ListDistributionsOutput, error) + ListTagsForResource(context.Context, *cloudfront.ListTagsForResourceInput, ...func(*cloudfront.Options)) (*cloudfront.ListTagsForResourceOutput, error) } // ClientParams holds the various optional tunables that can be used to modify the AWS @@ -100,210 +101,206 @@ type ClientParams struct { } type awsClient struct { - iamClient iamiface.IAMAPI - s3Client s3iface.S3API - cloudFrontClient cloudfrontiface.CloudFrontAPI + iamClient *iam.Client + s3Client *s3.Client + cloudFrontClient *cloudfront.Client } -func (c *awsClient) CreateAccessKey(input *iam.CreateAccessKeyInput) (*iam.CreateAccessKeyOutput, error) { - return c.iamClient.CreateAccessKey(input) +func (c *awsClient) CreateAccessKey(ctx context.Context, input *iam.CreateAccessKeyInput, opts ...func(*iam.Options)) (*iam.CreateAccessKeyOutput, error) { + return c.iamClient.CreateAccessKey(ctx, input, opts...) } -func (c *awsClient) CreateRole(input *iam.CreateRoleInput) (*iam.CreateRoleOutput, error) { - return c.iamClient.CreateRole(input) +func (c *awsClient) CreateRole(ctx context.Context, input *iam.CreateRoleInput, opts ...func(*iam.Options)) (*iam.CreateRoleOutput, error) { + return c.iamClient.CreateRole(ctx, input, opts...) } -func (c *awsClient) CreateUser(input *iam.CreateUserInput) (*iam.CreateUserOutput, error) { - return c.iamClient.CreateUser(input) +func (c *awsClient) CreateUser(ctx context.Context, input *iam.CreateUserInput, opts ...func(*iam.Options)) (*iam.CreateUserOutput, error) { + return c.iamClient.CreateUser(ctx, input, opts...) } -func (c *awsClient) DeleteAccessKey(input *iam.DeleteAccessKeyInput) (*iam.DeleteAccessKeyOutput, error) { - return c.iamClient.DeleteAccessKey(input) +func (c *awsClient) DeleteAccessKey(ctx context.Context, input *iam.DeleteAccessKeyInput, opts ...func(*iam.Options)) (*iam.DeleteAccessKeyOutput, error) { + return c.iamClient.DeleteAccessKey(ctx, input, opts...) } -func (c *awsClient) DeleteUser(input *iam.DeleteUserInput) (*iam.DeleteUserOutput, error) { - return c.iamClient.DeleteUser(input) +func (c *awsClient) DeleteUser(ctx context.Context, input *iam.DeleteUserInput, opts ...func(*iam.Options)) (*iam.DeleteUserOutput, error) { + return c.iamClient.DeleteUser(ctx, input, opts...) } -func (c *awsClient) DeleteUserPolicy(input *iam.DeleteUserPolicyInput) (*iam.DeleteUserPolicyOutput, error) { - return c.iamClient.DeleteUserPolicy(input) +func (c *awsClient) DeleteUserPolicy(ctx context.Context, input *iam.DeleteUserPolicyInput, opts ...func(*iam.Options)) (*iam.DeleteUserPolicyOutput, error) { + return c.iamClient.DeleteUserPolicy(ctx, input, opts...) } -func (c *awsClient) GetUser(input *iam.GetUserInput) (*iam.GetUserOutput, error) { - return c.iamClient.GetUser(input) +func (c *awsClient) GetUser(ctx context.Context, input *iam.GetUserInput, opts ...func(*iam.Options)) (*iam.GetUserOutput, error) { + return c.iamClient.GetUser(ctx, input, opts...) } -func (c *awsClient) ListAccessKeys(input *iam.ListAccessKeysInput) (*iam.ListAccessKeysOutput, error) { - return c.iamClient.ListAccessKeys(input) +func (c *awsClient) ListAccessKeys(ctx context.Context, input *iam.ListAccessKeysInput, opts ...func(*iam.Options)) (*iam.ListAccessKeysOutput, error) { + return c.iamClient.ListAccessKeys(ctx, input, opts...) } -func (c *awsClient) ListUserPolicies(input *iam.ListUserPoliciesInput) (*iam.ListUserPoliciesOutput, error) { - return c.iamClient.ListUserPolicies(input) +func (c *awsClient) ListUserPolicies(ctx context.Context, input *iam.ListUserPoliciesInput, opts ...func(*iam.Options)) (*iam.ListUserPoliciesOutput, error) { + return c.iamClient.ListUserPolicies(ctx, input, opts...) } -func (c *awsClient) PutRolePolicy(input *iam.PutRolePolicyInput) (*iam.PutRolePolicyOutput, error) { - return c.iamClient.PutRolePolicy(input) +func (c *awsClient) PutRolePolicy(ctx context.Context, input *iam.PutRolePolicyInput, opts ...func(*iam.Options)) (*iam.PutRolePolicyOutput, error) { + return c.iamClient.PutRolePolicy(ctx, input, opts...) } -func (c *awsClient) PutUserPolicy(input *iam.PutUserPolicyInput) (*iam.PutUserPolicyOutput, error) { - return c.iamClient.PutUserPolicy(input) +func (c *awsClient) PutUserPolicy(ctx context.Context, input *iam.PutUserPolicyInput, opts ...func(*iam.Options)) (*iam.PutUserPolicyOutput, error) { + return c.iamClient.PutUserPolicy(ctx, input, opts...) } -func (c *awsClient) GetRole(input *iam.GetRoleInput) (*iam.GetRoleOutput, error) { - return c.iamClient.GetRole(input) +func (c *awsClient) GetRole(ctx context.Context, input *iam.GetRoleInput, opts ...func(*iam.Options)) (*iam.GetRoleOutput, error) { + return c.iamClient.GetRole(ctx, input, opts...) } -func (c *awsClient) GetUserPolicy(input *iam.GetUserPolicyInput) (*iam.GetUserPolicyOutput, error) { - return c.iamClient.GetUserPolicy(input) +func (c *awsClient) GetUserPolicy(ctx context.Context, input *iam.GetUserPolicyInput, opts ...func(*iam.Options)) (*iam.GetUserPolicyOutput, error) { + return c.iamClient.GetUserPolicy(ctx, input, opts...) } -func (c *awsClient) SimulatePrincipalPolicy(input *iam.SimulatePrincipalPolicyInput) (*iam.SimulatePolicyResponse, error) { - return c.iamClient.SimulatePrincipalPolicy(input) +func (c *awsClient) SimulatePrincipalPolicy(ctx context.Context, input *iam.SimulatePrincipalPolicyInput, opts ...func(*iam.Options)) (*iam.SimulatePrincipalPolicyOutput, error) { + return c.iamClient.SimulatePrincipalPolicy(ctx, input, opts...) } -func (c *awsClient) SimulatePrincipalPolicyPages(input *iam.SimulatePrincipalPolicyInput, fn func(*iam.SimulatePolicyResponse, bool) bool) error { - return c.iamClient.SimulatePrincipalPolicyPages(input, fn) +func (c *awsClient) TagUser(ctx context.Context, input *iam.TagUserInput, opts ...func(*iam.Options)) (*iam.TagUserOutput, error) { + return c.iamClient.TagUser(ctx, input, opts...) } -func (c *awsClient) TagUser(input *iam.TagUserInput) (*iam.TagUserOutput, error) { - return c.iamClient.TagUser(input) +func (c *awsClient) ListOpenIDConnectProviders(ctx context.Context, input *iam.ListOpenIDConnectProvidersInput, opts ...func(*iam.Options)) (*iam.ListOpenIDConnectProvidersOutput, error) { + return c.iamClient.ListOpenIDConnectProviders(ctx, input, opts...) } -func (c *awsClient) ListOpenIDConnectProviders(input *iam.ListOpenIDConnectProvidersInput) (*iam.ListOpenIDConnectProvidersOutput, error) { - return c.iamClient.ListOpenIDConnectProviders(input) +func (c *awsClient) CreateOpenIDConnectProvider(ctx context.Context, input *iam.CreateOpenIDConnectProviderInput, opts ...func(*iam.Options)) (*iam.CreateOpenIDConnectProviderOutput, error) { + return c.iamClient.CreateOpenIDConnectProvider(ctx, input, opts...) } -func (c *awsClient) CreateOpenIDConnectProvider(input *iam.CreateOpenIDConnectProviderInput) (*iam.CreateOpenIDConnectProviderOutput, error) { - return c.iamClient.CreateOpenIDConnectProvider(input) +func (c *awsClient) TagOpenIDConnectProvider(ctx context.Context, input *iam.TagOpenIDConnectProviderInput, opts ...func(*iam.Options)) (*iam.TagOpenIDConnectProviderOutput, error) { + return c.iamClient.TagOpenIDConnectProvider(ctx, input, opts...) } -func (c *awsClient) TagOpenIDConnectProvider(input *iam.TagOpenIDConnectProviderInput) (*iam.TagOpenIDConnectProviderOutput, error) { - return c.iamClient.TagOpenIDConnectProvider(input) +func (c *awsClient) UpdateAssumeRolePolicy(ctx context.Context, input *iam.UpdateAssumeRolePolicyInput, opts ...func(*iam.Options)) (*iam.UpdateAssumeRolePolicyOutput, error) { + return c.iamClient.UpdateAssumeRolePolicy(ctx, input, opts...) } -func (c *awsClient) UpdateAssumeRolePolicy(input *iam.UpdateAssumeRolePolicyInput) (*iam.UpdateAssumeRolePolicyOutput, error) { - return c.iamClient.UpdateAssumeRolePolicy(input) +func (c *awsClient) GetOpenIDConnectProvider(ctx context.Context, input *iam.GetOpenIDConnectProviderInput, opts ...func(*iam.Options)) (*iam.GetOpenIDConnectProviderOutput, error) { + return c.iamClient.GetOpenIDConnectProvider(ctx, input, opts...) } -func (c *awsClient) GetOpenIDConnectProvider(input *iam.GetOpenIDConnectProviderInput) (*iam.GetOpenIDConnectProviderOutput, error) { - return c.iamClient.GetOpenIDConnectProvider(input) +func (c *awsClient) DeleteOpenIDConnectProvider(ctx context.Context, input *iam.DeleteOpenIDConnectProviderInput, opts ...func(*iam.Options)) (*iam.DeleteOpenIDConnectProviderOutput, error) { + return c.iamClient.DeleteOpenIDConnectProvider(ctx, input, opts...) } -func (c *awsClient) DeleteOpenIDConnectProvider(input *iam.DeleteOpenIDConnectProviderInput) (*iam.DeleteOpenIDConnectProviderOutput, error) { - return c.iamClient.DeleteOpenIDConnectProvider(input) +func (c *awsClient) ListRoles(ctx context.Context, input *iam.ListRolesInput, opts ...func(*iam.Options)) (*iam.ListRolesOutput, error) { + return c.iamClient.ListRoles(ctx, input, opts...) } -func (c *awsClient) ListRoles(input *iam.ListRolesInput) (*iam.ListRolesOutput, error) { - return c.iamClient.ListRoles(input) +func (c *awsClient) DeleteRole(ctx context.Context, input *iam.DeleteRoleInput, opts ...func(*iam.Options)) (*iam.DeleteRoleOutput, error) { + return c.iamClient.DeleteRole(ctx, input, opts...) } -func (c *awsClient) DeleteRole(input *iam.DeleteRoleInput) (*iam.DeleteRoleOutput, error) { - return c.iamClient.DeleteRole(input) +func (c *awsClient) ListRolePolicies(ctx context.Context, input *iam.ListRolePoliciesInput, opts ...func(*iam.Options)) (*iam.ListRolePoliciesOutput, error) { + return c.iamClient.ListRolePolicies(ctx, input, opts...) } -func (c *awsClient) ListRolePolicies(input *iam.ListRolePoliciesInput) (*iam.ListRolePoliciesOutput, error) { - return c.iamClient.ListRolePolicies(input) +func (c *awsClient) DeleteRolePolicy(ctx context.Context, input *iam.DeleteRolePolicyInput, opts ...func(*iam.Options)) (*iam.DeleteRolePolicyOutput, error) { + return c.iamClient.DeleteRolePolicy(ctx, input, opts...) } -func (c *awsClient) DeleteRolePolicy(input *iam.DeleteRolePolicyInput) (*iam.DeleteRolePolicyOutput, error) { - return c.iamClient.DeleteRolePolicy(input) +func (c *awsClient) CreateBucket(ctx context.Context, input *s3.CreateBucketInput, opts ...func(*s3.Options)) (*s3.CreateBucketOutput, error) { + return c.s3Client.CreateBucket(ctx, input, opts...) } -func (c *awsClient) CreateBucket(input *s3.CreateBucketInput) (*s3.CreateBucketOutput, error) { - return c.s3Client.CreateBucket(input) +func (c *awsClient) PutBucketTagging(ctx context.Context, input *s3.PutBucketTaggingInput, opts ...func(*s3.Options)) (*s3.PutBucketTaggingOutput, error) { + return c.s3Client.PutBucketTagging(ctx, input, opts...) } -func (c *awsClient) PutBucketTagging(input *s3.PutBucketTaggingInput) (*s3.PutBucketTaggingOutput, error) { - return c.s3Client.PutBucketTagging(input) +func (c *awsClient) GetBucketTagging(ctx context.Context, input *s3.GetBucketTaggingInput, opts ...func(*s3.Options)) (*s3.GetBucketTaggingOutput, error) { + return c.s3Client.GetBucketTagging(ctx, input, opts...) } -func (c *awsClient) GetBucketTagging(input *s3.GetBucketTaggingInput) (*s3.GetBucketTaggingOutput, error) { - return c.s3Client.GetBucketTagging(input) +func (c *awsClient) DeleteBucket(ctx context.Context, input *s3.DeleteBucketInput, opts ...func(*s3.Options)) (*s3.DeleteBucketOutput, error) { + return c.s3Client.DeleteBucket(ctx, input, opts...) } -func (c *awsClient) DeleteBucket(input *s3.DeleteBucketInput) (*s3.DeleteBucketOutput, error) { - return c.s3Client.DeleteBucket(input) +func (c *awsClient) PutObject(ctx context.Context, input *s3.PutObjectInput, opts ...func(*s3.Options)) (*s3.PutObjectOutput, error) { + return c.s3Client.PutObject(ctx, input, opts...) } -func (c *awsClient) PutObject(input *s3.PutObjectInput) (*s3.PutObjectOutput, error) { - return c.s3Client.PutObject(input) +func (c *awsClient) ListObjects(ctx context.Context, input *s3.ListObjectsInput, opts ...func(*s3.Options)) (*s3.ListObjectsOutput, error) { + return c.s3Client.ListObjects(ctx, input, opts...) } -func (c *awsClient) ListObjects(input *s3.ListObjectsInput) (*s3.ListObjectsOutput, error) { - return c.s3Client.ListObjects(input) +func (c *awsClient) GetObjectTagging(ctx context.Context, input *s3.GetObjectTaggingInput, opts ...func(*s3.Options)) (*s3.GetObjectTaggingOutput, error) { + return c.s3Client.GetObjectTagging(ctx, input, opts...) } -func (c *awsClient) GetObjectTagging(input *s3.GetObjectTaggingInput) (*s3.GetObjectTaggingOutput, error) { - return c.s3Client.GetObjectTagging(input) +func (c *awsClient) DeleteObject(ctx context.Context, input *s3.DeleteObjectInput, opts ...func(*s3.Options)) (*s3.DeleteObjectOutput, error) { + return c.s3Client.DeleteObject(ctx, input, opts...) } -func (c *awsClient) DeleteObject(input *s3.DeleteObjectInput) (*s3.DeleteObjectOutput, error) { - return c.s3Client.DeleteObject(input) +func (c *awsClient) PutPublicAccessBlock(ctx context.Context, input *s3.PutPublicAccessBlockInput, opts ...func(*s3.Options)) (*s3.PutPublicAccessBlockOutput, error) { + return c.s3Client.PutPublicAccessBlock(ctx, input, opts...) } -func (c *awsClient) PutPublicAccessBlock(input *s3.PutPublicAccessBlockInput) (*s3.PutPublicAccessBlockOutput, error) { - return c.s3Client.PutPublicAccessBlock(input) +func (c *awsClient) PutBucketPolicy(ctx context.Context, input *s3.PutBucketPolicyInput, opts ...func(*s3.Options)) (*s3.PutBucketPolicyOutput, error) { + return c.s3Client.PutBucketPolicy(ctx, input, opts...) } -func (c *awsClient) PutBucketPolicy(input *s3.PutBucketPolicyInput) (*s3.PutBucketPolicyOutput, error) { - return c.s3Client.PutBucketPolicy(input) +func (c *awsClient) CreateCloudFrontOriginAccessIdentity(ctx context.Context, input *cloudfront.CreateCloudFrontOriginAccessIdentityInput, opts ...func(*cloudfront.Options)) (*cloudfront.CreateCloudFrontOriginAccessIdentityOutput, error) { + return c.cloudFrontClient.CreateCloudFrontOriginAccessIdentity(ctx, input, opts...) } -func (c *awsClient) CreateCloudFrontOriginAccessIdentity(input *cloudfront.CreateCloudFrontOriginAccessIdentityInput) (*cloudfront.CreateCloudFrontOriginAccessIdentityOutput, error) { - return c.cloudFrontClient.CreateCloudFrontOriginAccessIdentity(input) +func (c *awsClient) DeleteCloudFrontOriginAccessIdentity(ctx context.Context, input *cloudfront.DeleteCloudFrontOriginAccessIdentityInput, opts ...func(*cloudfront.Options)) (*cloudfront.DeleteCloudFrontOriginAccessIdentityOutput, error) { + return c.cloudFrontClient.DeleteCloudFrontOriginAccessIdentity(ctx, input, opts...) } -func (c *awsClient) DeleteCloudFrontOriginAccessIdentity(input *cloudfront.DeleteCloudFrontOriginAccessIdentityInput) (*cloudfront.DeleteCloudFrontOriginAccessIdentityOutput, error) { - return c.cloudFrontClient.DeleteCloudFrontOriginAccessIdentity(input) +func (c *awsClient) GetCloudFrontOriginAccessIdentity(ctx context.Context, input *cloudfront.GetCloudFrontOriginAccessIdentityInput, opts ...func(*cloudfront.Options)) (*cloudfront.GetCloudFrontOriginAccessIdentityOutput, error) { + return c.cloudFrontClient.GetCloudFrontOriginAccessIdentity(ctx, input, opts...) } -func (c *awsClient) GetCloudFrontOriginAccessIdentity(input *cloudfront.GetCloudFrontOriginAccessIdentityInput) (*cloudfront.GetCloudFrontOriginAccessIdentityOutput, error) { - return c.cloudFrontClient.GetCloudFrontOriginAccessIdentity(input) +func (c *awsClient) ListCloudFrontOriginAccessIdentities(ctx context.Context, input *cloudfront.ListCloudFrontOriginAccessIdentitiesInput, opts ...func(*cloudfront.Options)) (*cloudfront.ListCloudFrontOriginAccessIdentitiesOutput, error) { + return c.cloudFrontClient.ListCloudFrontOriginAccessIdentities(ctx, input, opts...) } - -func (c *awsClient) ListCloudFrontOriginAccessIdentities(input *cloudfront.ListCloudFrontOriginAccessIdentitiesInput) (*cloudfront.ListCloudFrontOriginAccessIdentitiesOutput, error) { - return c.cloudFrontClient.ListCloudFrontOriginAccessIdentities(input) -} -func (c *awsClient) CreateCloudFrontDistributionWithTags(input *cloudfront.CreateDistributionWithTagsInput) (*cloudfront.CreateDistributionWithTagsOutput, error) { - return c.cloudFrontClient.CreateDistributionWithTags(input) +func (c *awsClient) CreateDistributionWithTags(ctx context.Context, input *cloudfront.CreateDistributionWithTagsInput, opts ...func(*cloudfront.Options)) (*cloudfront.CreateDistributionWithTagsOutput, error) { + return c.cloudFrontClient.CreateDistributionWithTags(ctx, input, opts...) } -func (c *awsClient) DeleteCloudFrontDistribution(input *cloudfront.DeleteDistributionInput) (*cloudfront.DeleteDistributionOutput, error) { - return c.cloudFrontClient.DeleteDistribution(input) +func (c *awsClient) DeleteDistribution(ctx context.Context, input *cloudfront.DeleteDistributionInput, opts ...func(*cloudfront.Options)) (*cloudfront.DeleteDistributionOutput, error) { + return c.cloudFrontClient.DeleteDistribution(ctx, input, opts...) } -func (c *awsClient) GetCloudFrontDistribution(input *cloudfront.GetDistributionInput) (*cloudfront.GetDistributionOutput, error) { - return c.cloudFrontClient.GetDistribution(input) +func (c *awsClient) GetDistribution(ctx context.Context, input *cloudfront.GetDistributionInput, opts ...func(*cloudfront.Options)) (*cloudfront.GetDistributionOutput, error) { + return c.cloudFrontClient.GetDistribution(ctx, input, opts...) } -func (c *awsClient) UpdateCloudFrontDistribution(input *cloudfront.UpdateDistributionInput) (*cloudfront.UpdateDistributionOutput, error) { - return c.cloudFrontClient.UpdateDistribution(input) +func (c *awsClient) UpdateDistribution(ctx context.Context, input *cloudfront.UpdateDistributionInput, opts ...func(*cloudfront.Options)) (*cloudfront.UpdateDistributionOutput, error) { + return c.cloudFrontClient.UpdateDistribution(ctx, input, opts...) } -func (c *awsClient) ListCloudFrontDistributions(input *cloudfront.ListDistributionsInput) (*cloudfront.ListDistributionsOutput, error) { - return c.cloudFrontClient.ListDistributions(input) +func (c *awsClient) ListDistributions(ctx context.Context, input *cloudfront.ListDistributionsInput, opts ...func(*cloudfront.Options)) (*cloudfront.ListDistributionsOutput, error) { + return c.cloudFrontClient.ListDistributions(ctx, input, opts...) } -func (c *awsClient) ListTagsForCloudFrontResource(input *cloudfront.ListTagsForResourceInput) (*cloudfront.ListTagsForResourceOutput, error) { - return c.cloudFrontClient.ListTagsForResource(input) +func (c *awsClient) ListTagsForResource(ctx context.Context, input *cloudfront.ListTagsForResourceInput, opts ...func(*cloudfront.Options)) (*cloudfront.ListTagsForResourceOutput, error) { + return c.cloudFrontClient.ListTagsForResource(ctx, input, opts...) } // NewClient creates our client wrapper object for the actual AWS clients we use. func NewClient(accessKeyID, secretAccessKey []byte, params *ClientParams) (Client, error) { - var awsOpts session.Options - + awsOpts := []func(o *config.LoadOptions) error{} agentText := "defaultAgent" + var endpoint string if params != nil { if params.Region != "" { - awsOpts.Config.Region = aws.String(params.Region) + awsOpts = append(awsOpts, config.WithRegion(params.Region)) } if params.Endpoint != "" { - awsOpts.Config.Endpoint = aws.String(params.Endpoint) + endpoint = params.Endpoint } if params.CABundle != "" { - awsOpts.CustomCABundle = strings.NewReader(params.CABundle) + awsOpts = append(awsOpts, config.WithCustomCABundle(strings.NewReader(params.CABundle))) } if params.InfraName != "" { @@ -311,27 +308,57 @@ func NewClient(accessKeyID, secretAccessKey []byte, params *ClientParams) (Clien } } - awsOpts.Config.Credentials = credentials.NewStaticCredentials( - string(accessKeyID), string(secretAccessKey), "") - - s, err := session.NewSessionWithOptions(awsOpts) + awsOpts = append(awsOpts, + config.WithCredentialsProvider( + credentials.NewStaticCredentialsProvider( + string(accessKeyID), string(secretAccessKey), ""), + ), + ) + + agentKey := fmt.Sprintf("%s/%s", "openshift.io cloud-credential-operator", version.Get().String()) + awsOpts = append(awsOpts, + config.WithAPIOptions([]func(*smithymiddleware.Stack) error{ + middleware.AddUserAgentKeyValue(agentKey, agentText), + }), + ) + + cfg, err := config.LoadDefaultConfig(context.TODO(), awsOpts...) if err != nil { return nil, err } - s.Handlers.Build.PushBackNamed(request.NamedHandler{ - Name: "openshift.io/cloud-credential-operator", - Fn: request.MakeAddToUserAgentHandler("openshift.io cloud-credential-operator", version.Get().String(), agentText), - }) + client, err := NewClientFromConfig(cfg, endpoint) + if err != nil { + return nil, err + } - return NewClientFromSession(s), nil + return client, nil } -// NewClientFromSession will return a basic Client using only the provided awsSession -func NewClientFromSession(sess *session.Session) Client { - return &awsClient{ - iamClient: iam.New(sess), - s3Client: s3.New(sess), - cloudFrontClient: cloudfront.New(sess), +// NewClientFromConfig will return a basic Client using only the provided aws.Config +func NewClientFromConfig(cfg awssdk.Config, endpoint string) (Client, error) { + iamOpts := []func(o *iam.Options){} + s3Opts := []func(o *s3.Options){} + cfOpts := []func(o *cloudfront.Options){} + + if endpoint != "" { + iamOpts = append(iamOpts, func(o *iam.Options) { + o.BaseEndpoint = &endpoint + }) } + + return &awsClient{ + iamClient: iam.NewFromConfig(cfg, iamOpts...), + s3Client: s3.NewFromConfig(cfg, s3Opts...), + cloudFrontClient: cloudfront.NewFromConfig(cfg, cfOpts...), + }, nil +} + +func ErrCodeEquals(err error, code string) bool { + var awsErr smithy.APIError + return err != nil && errors.As(err, &awsErr) && awsErr.ErrorCode() == code +} + +func NewAPIError(code, message string) error { + return &smithy.GenericAPIError{Code: code, Message: message} } diff --git a/vendor/github.com/openshift/cloud-credential-operator/pkg/aws/utils.go b/vendor/github.com/openshift/cloud-credential-operator/pkg/aws/utils.go index e4d3a4ad34..0322f5c948 100644 --- a/vendor/github.com/openshift/cloud-credential-operator/pkg/aws/utils.go +++ b/vendor/github.com/openshift/cloud-credential-operator/pkg/aws/utils.go @@ -1,18 +1,19 @@ package aws import ( + "context" "fmt" log "github.com/sirupsen/logrus" minterv1 "github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1" - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/arn" - "github.com/aws/aws-sdk-go/service/iam" + awssdk "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/aws/arn" + "github.com/aws/aws-sdk-go-v2/service/iam" + iamtypes "github.com/aws/aws-sdk-go-v2/service/iam/types" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/serializer" ) // credMintingActions is a list of AWS verbs needed to run in the mode where the @@ -92,11 +93,6 @@ var ( } credentailRequestScheme = runtime.NewScheme() - credentialRequestCodec = serializer.NewCodecFactory(credentailRequestScheme) -) - -const ( - infrastructureConfigName = "cluster" ) func init() { @@ -112,19 +108,19 @@ type SimulateParams struct { } // CheckCloudCredCreation will see whether we have enough permissions to create new sub-creds -func CheckCloudCredCreation(awsClient Client, logger log.FieldLogger) (bool, error) { +func CheckCloudCredCreation(ctx context.Context, awsClient Client, logger log.FieldLogger) (bool, error) { // Empty SimulateParams{} b/c creating IAM users and assigning policies // are all IAM API alls which are not region-specific - return CheckPermissionsAgainstActions(awsClient, credMintingActions, &SimulateParams{}, logger) + return CheckPermissionsAgainstActions(ctx, awsClient, credMintingActions, &SimulateParams{}, logger) } // getClientDetails will return the *iam.User associated with the provided client's credentials, // a boolean indicating whether the user is the 'root' account, and any error encountered // while trying to gather the info. -func getClientDetails(awsClient Client) (*iam.User, bool, error) { +func getClientDetails(ctx context.Context, awsClient Client) (*iamtypes.User, bool, error) { rootUser := false - user, err := awsClient.GetUser(nil) + user, err := awsClient.GetUser(ctx, &iam.GetUserInput{}) if err != nil { return nil, rootUser, fmt.Errorf("error querying username: %v", err) } @@ -143,9 +139,9 @@ func getClientDetails(awsClient Client) (*iam.User, bool, error) { // CheckPermissionsUsingQueryClient will use queryClient to query whether the credentials in targetClient can perform the actions // listed in the statementEntries. queryClient will need iam:GetUser and iam:SimulatePrincipalPolicy -func CheckPermissionsUsingQueryClient(queryClient, targetClient Client, statementEntries []minterv1.StatementEntry, +func CheckPermissionsUsingQueryClient(ctx context.Context, queryClient, targetClient Client, statementEntries []minterv1.StatementEntry, params *SimulateParams, logger log.FieldLogger) (bool, error) { - targetUser, isRoot, err := getClientDetails(targetClient) + targetUser, isRoot, err := getClientDetails(ctx, targetClient) if err != nil { return false, fmt.Errorf("error gathering AWS credentials details: %v", err) } @@ -155,25 +151,23 @@ func CheckPermissionsUsingQueryClient(queryClient, targetClient Client, statemen return true, nil } - allowList := []*string{} + allowList := []string{} for _, statement := range statementEntries { - for _, action := range statement.Action { - allowList = append(allowList, aws.String(action)) - } + allowList = append(allowList, statement.Action...) } input := &iam.SimulatePrincipalPolicyInput{ PolicySourceArn: targetUser.Arn, ActionNames: allowList, - ContextEntries: []*iam.ContextEntry{}, + ContextEntries: []iamtypes.ContextEntry{}, } if params != nil { if params.Region != "" { - input.ContextEntries = append(input.ContextEntries, &iam.ContextEntry{ - ContextKeyName: aws.String("aws:RequestedRegion"), - ContextKeyType: aws.String("string"), - ContextKeyValues: []*string{aws.String(params.Region)}, + input.ContextEntries = append(input.ContextEntries, iamtypes.ContextEntry{ + ContextKeyName: awssdk.String("aws:RequestedRegion"), + ContextKeyType: iamtypes.ContextKeyTypeEnumString, + ContextKeyValues: []string{params.Region}, }) } } @@ -181,20 +175,21 @@ func CheckPermissionsUsingQueryClient(queryClient, targetClient Client, statemen // Either all actions are allowed and we'll return 'true', or it's a failure allClear := true - err = queryClient.SimulatePrincipalPolicyPages(input, func(response *iam.SimulatePolicyResponse, lastPage bool) bool { + paginator := iam.NewSimulatePrincipalPolicyPaginator(queryClient, input) + for paginator.HasMorePages() { + response, err := paginator.NextPage(ctx) + if err != nil { + return false, fmt.Errorf("error simulating policy: %v", err) + } for _, result := range response.EvaluationResults { - if *result.EvalDecision != "allowed" { + if result.EvalDecision != iamtypes.PolicyEvaluationDecisionTypeAllowed { // Don't bail out after the first failure, so we can log the full list // of failed/denied actions logger.WithField("action", *result.EvalActionName).Warning("Action not allowed with tested creds") allClear = false } } - return !lastPage - }) - if err != nil { - return false, fmt.Errorf("error simulating policy: %v", err) } if !allClear { @@ -208,15 +203,15 @@ func CheckPermissionsUsingQueryClient(queryClient, targetClient Client, statemen // CheckPermissionsAgainstStatementList will test to see whether the list of actions in the provided // list of StatementEntries can work with the credentials used by the passed-in awsClient -func CheckPermissionsAgainstStatementList(awsClient Client, statementEntries []minterv1.StatementEntry, +func CheckPermissionsAgainstStatementList(ctx context.Context, awsClient Client, statementEntries []minterv1.StatementEntry, params *SimulateParams, logger log.FieldLogger) (bool, error) { - return CheckPermissionsUsingQueryClient(awsClient, awsClient, statementEntries, params, logger) + return CheckPermissionsUsingQueryClient(ctx, awsClient, awsClient, statementEntries, params, logger) } // CheckPermissionsAgainstActions will take the static list of Actions to check whether the provided // awsClient creds have sufficient permissions to perform the actions. // Will return true/false indicating whether the permissions are sufficient. -func CheckPermissionsAgainstActions(awsClient Client, actionList []string, params *SimulateParams, logger log.FieldLogger) (bool, error) { +func CheckPermissionsAgainstActions(ctx context.Context, awsClient Client, actionList []string, params *SimulateParams, logger log.FieldLogger) (bool, error) { statementList := []minterv1.StatementEntry{ { Action: actionList, @@ -225,41 +220,13 @@ func CheckPermissionsAgainstActions(awsClient Client, actionList []string, param }, } - return CheckPermissionsAgainstStatementList(awsClient, statementList, params, logger) + return CheckPermissionsAgainstStatementList(ctx, awsClient, statementList, params, logger) } // CheckCloudCredPassthrough will see if the provided creds are good enough to pass through // to other components as-is based on the static list of permissions needed by the various // users of CredentialsRequests // TODO: move away from static list (to dynamic passthrough validation?) -func CheckCloudCredPassthrough(awsClient Client, params *SimulateParams, logger log.FieldLogger) (bool, error) { - return CheckPermissionsAgainstActions(awsClient, credPassthroughActions, params, logger) -} - -func readCredentialRequest(cr []byte) (*minterv1.CredentialsRequest, error) { - - newObj, err := runtime.Decode(credentialRequestCodec.UniversalDecoder(minterv1.SchemeGroupVersion), cr) - if err != nil { - return nil, fmt.Errorf("error decoding credentialrequest: %v", err) - } - return newObj.(*minterv1.CredentialsRequest), nil -} - -func getCredentialRequestStatements(crBytes []byte) ([]minterv1.StatementEntry, error) { - statementList := []minterv1.StatementEntry{} - - cr, err := readCredentialRequest(crBytes) - if err != nil { - return statementList, err - } - - awsSpec := minterv1.AWSProviderSpec{} - err = minterv1.Codec.DecodeProviderSpec(cr.Spec.ProviderSpec, &awsSpec) - if err != nil { - return statementList, fmt.Errorf("error decoding spec.ProviderSpec: %v", err) - } - - statementList = append(statementList, awsSpec.StatementEntries...) - - return statementList, nil +func CheckCloudCredPassthrough(ctx context.Context, awsClient Client, params *SimulateParams, logger log.FieldLogger) (bool, error) { + return CheckPermissionsAgainstActions(ctx, awsClient, credPassthroughActions, params, logger) } diff --git a/vendor/github.com/std-uritemplate/std-uritemplate/go/v2/LICENSE b/vendor/github.com/std-uritemplate/std-uritemplate/go/v2/LICENSE new file mode 100644 index 0000000000..c5127d773b --- /dev/null +++ b/vendor/github.com/std-uritemplate/std-uritemplate/go/v2/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2023 std-uritemplate + + 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/std-uritemplate/std-uritemplate/go/v2/stduritemplate.go b/vendor/github.com/std-uritemplate/std-uritemplate/go/v2/stduritemplate.go new file mode 100644 index 0000000000..283161e7fc --- /dev/null +++ b/vendor/github.com/std-uritemplate/std-uritemplate/go/v2/stduritemplate.go @@ -0,0 +1,709 @@ +package stduritemplate + +import ( + "fmt" + "net/url" + "sort" + "strconv" + "strings" + "unicode/utf8" +) + +type Substitutions map[string]any + +// Public API +func Expand(template string, substitutions Substitutions) (string, error) { + return expandImpl(template, substitutions) +} + +// Private implementation +type Op rune + +const ( + OpUndefined Op = 0 + OpNone Op = -1 + OpPlus Op = '+' + OpHash Op = '#' + OpDot Op = '.' + OpSlash Op = '/' + OpSemicolon Op = ';' + OpQuestionMark Op = '?' + OpAmp Op = '&' +) + +const ( + SubstitutionTypeEmpty = "EMPTY" + SubstitutionTypeString = "STRING" + SubstitutionTypeList = "LIST" + SubstitutionTypeMap = "MAP" +) + +func validateLiteral(c rune, col int) error { + switch c { + case '+', '#', '/', ';', '?', '&', ' ', '!', '=', '$', '|', '*', ':', '~', '-': + return fmt.Errorf("illegal character identified in the token at col: %d", col) + default: + return nil + } +} + +func getMaxChar(buffer *strings.Builder, col int) (int, error) { + if buffer == nil || buffer.Len() == 0 { + return -1, nil + } + value := buffer.String() + + if value == "" { + return -1, nil + } + + maxChar, err := strconv.Atoi(value) + if err != nil { + return 0, fmt.Errorf("cannot parse max chars at col: %d", col) + } + return maxChar, nil +} + +func getOperator(c rune, token *strings.Builder, col int) (Op, error) { + switch c { + case '+': + return OpPlus, nil + case '#': + return OpHash, nil + case '.': + return OpDot, nil + case '/': + return OpSlash, nil + case ';': + return OpSemicolon, nil + case '?': + return OpQuestionMark, nil + case '&': + return OpAmp, nil + default: + err := validateLiteral(c, col) + if err != nil { + return OpUndefined, err + } + token.WriteRune(c) + return OpNone, nil + } +} + +func expandImpl(str string, substitutions Substitutions) (string, error) { + var result strings.Builder + + var token = &strings.Builder{} + var toToken = false + var operator = OpUndefined + var composite bool + var maxCharBuffer = &strings.Builder{} + var toMaxCharBuffer = false + var firstToken = true + + for i, character := range str { + switch character { + case '{': + toToken = true + token.Reset() + firstToken = true + case '}': + if toToken { + maxChar, err := getMaxChar(maxCharBuffer, i) + if err != nil { + return "", err + } + expanded, err := expandToken(operator, token.String(), composite, maxChar, firstToken, substitutions, &result, i) + if err != nil { + return "", err + } + if expanded && firstToken { + firstToken = false + } + toToken = false + token.Reset() + operator = OpUndefined + composite = false + toMaxCharBuffer = false + maxCharBuffer.Reset() + } else { + return "", fmt.Errorf("failed to expand token, invalid at col: %d", i) + } + case ',': + if toToken { + maxChar, err := getMaxChar(maxCharBuffer, i) + if err != nil { + return "", err + } + expanded, err := expandToken(operator, token.String(), composite, maxChar, firstToken, substitutions, &result, i) + if err != nil { + return "", err + } + if expanded && firstToken { + firstToken = false + } + token.Reset() + composite = false + toMaxCharBuffer = false + maxCharBuffer.Reset() + break + } + // Intentional fall-through for commas outside the {} + fallthrough + default: + if toToken { + switch { + case operator == OpUndefined: + var err error + operator, err = getOperator(character, token, i) + if err != nil { + return "", err + } + case toMaxCharBuffer: + if _, err := strconv.Atoi(string(character)); err == nil { + maxCharBuffer.WriteRune(character) + } else { + return "", fmt.Errorf("illegal character identified in the token at col: %d", i) + } + default: + switch character { + case ':': + toMaxCharBuffer = true + maxCharBuffer.Reset() + case '*': + composite = true + default: + if err := validateLiteral(character, i); err != nil { + return "", err + } + token.WriteRune(character) + } + } + } else { + result.WriteRune(character) + } + } + } + + if !toToken { + return result.String(), nil + } + + return "", fmt.Errorf("unterminated token") +} + +func addPrefix(op Op, result *strings.Builder) { + switch op { + case OpHash, OpDot, OpSlash, OpSemicolon, OpQuestionMark, OpAmp: + result.WriteRune(rune(op)) + default: + return + } +} + +func addSeparator(op Op, result *strings.Builder) { + switch op { + case OpDot, OpSlash, OpSemicolon: + result.WriteRune(rune(op)) + case OpQuestionMark, OpAmp: + result.WriteByte('&') + default: + result.WriteByte(',') + return + } +} + +func addValue(op Op, token string, value string, result *strings.Builder, maxChar int) { + switch op { + case OpPlus, OpHash: + addExpandedValue("", value, result, maxChar, false) + case OpQuestionMark, OpAmp: + result.WriteString(token + "=") + addExpandedValue("", value, result, maxChar, true) + case OpSemicolon: + result.WriteString(token) + if value != "" { + result.WriteByte('=') + } + addExpandedValue("", value, result, maxChar, true) + case OpDot, OpSlash, OpNone: + addExpandedValue("", value, result, maxChar, true) + } +} + +func addValueElement(op Op, _, value string, result *strings.Builder, maxChar int) { + switch op { + case OpPlus, OpHash: + addExpandedValue("", value, result, maxChar, false) + case OpQuestionMark, OpAmp, OpSemicolon, OpDot, OpSlash, OpNone: + addExpandedValue("", value, result, maxChar, true) + } +} + +func isSurrogate(str string) bool { + _, width := utf8.DecodeRuneInString(str) + return width > 1 +} + +func isIprivate(cp rune) bool { + return 0xE000 <= cp && cp <= 0xF8FF +} + +func isUcschar(cp rune) bool { + return (0xA0 <= cp && cp <= 0xD7FF) || + (0xF900 <= cp && cp <= 0xFDCF) || + (0xFDF0 <= cp && cp <= 0xFFEF) +} + +func addExpandedValue(prefix string, value string, result *strings.Builder, maxChar int, replaceReserved bool) { + max := maxChar + if maxChar == -1 || maxChar > len(value) { + max = len(value) + } + reservedBuffer := &strings.Builder{} + toReserved := false + + if max > 0 && prefix != "" { + result.WriteString(prefix) + } + + for i, character := range value { + if i >= max { + break + } + + if character == '%' && !replaceReserved { + reservedBuffer.Reset() + toReserved = true + } + + toAppend := string(character) + if isSurrogate(toAppend) || replaceReserved || isUcschar(character) || isIprivate(character) { + toAppend = url.QueryEscape(toAppend) + } + + if toReserved { + reservedBuffer.WriteString(toAppend) + + if reservedBuffer.Len() == 3 { + encoded := true + reserved := reservedBuffer.String() + unescaped, err := url.QueryUnescape(reserved) + if err != nil { + encoded = (reserved == unescaped) + } + + if encoded { + result.WriteString(reserved) + } else { + result.WriteString("%25") + // only if !replaceReserved + result.WriteString(reservedBuffer.String()[1:]) + } + reservedBuffer.Reset() + toReserved = false + } + } else { + switch character { + case ' ': + result.WriteString("%20") + case '%': + result.WriteString("%25") + default: + result.WriteString(toAppend) + } + } + } + + if toReserved { + result.WriteString("%25") + result.WriteString(reservedBuffer.String()[1:]) + } +} + +func getSubstitutionType(value any, col int) string { + switch value.(type) { + case nil: + return SubstitutionTypeEmpty + case string, float32, float64, int, int8, int16, int32, int64, bool: + return SubstitutionTypeString + case []string, []float32, []float64, []int, []int8, []int16, []int32, []int64, []bool, []any: + return SubstitutionTypeList + case map[string]string, map[string]float32, map[string]float64, map[string]int, map[string]int8, map[string]int16, map[string]int32, map[string]int64, map[string]bool, map[string]any: + return SubstitutionTypeMap + default: + return fmt.Sprintf("illegal class passed as substitution, found %T at col: %d", value, col) + } +} + +func isEmpty(substType string, value any) bool { + switch substType { + case SubstitutionTypeString: + switch value.(type) { + case string: + return value == nil + default: // primitives are value types + return false + } + case SubstitutionTypeList: + return getListLength(value) == 0 + case SubstitutionTypeMap: + return getMapLength(value) == 0 + default: + return true + } +} + +func getListLength(value any) int { + switch value.(type) { + case []string: + return len(value.([]string)) + case []float32: + return len(value.([]float32)) + case []float64: + return len(value.([]float64)) + case []int: + return len(value.([]int)) + case []int8: + return len(value.([]int8)) + case []int16: + return len(value.([]int16)) + case []int32: + return len(value.([]int32)) + case []int64: + return len(value.([]int64)) + case []bool: + return len(value.([]bool)) + case []any: + return len(value.([]any)) + } + return 0 +} + +func getMapLength(value any) int { + switch value.(type) { + case map[string]string: + return len(value.(map[string]string)) + case map[string]float32: + return len(value.(map[string]float32)) + case map[string]float64: + return len(value.(map[string]float64)) + case map[string]int: + return len(value.(map[string]int)) + case map[string]int8: + return len(value.(map[string]int8)) + case map[string]int16: + return len(value.(map[string]int16)) + case map[string]int32: + return len(value.(map[string]int32)) + case map[string]int64: + return len(value.(map[string]int64)) + case map[string]bool: + return len(value.(map[string]bool)) + case map[string]any: + return len(value.(map[string]any)) + } + return 0 +} + +func convertNativeList(value any) ([]string, error) { + var stringList = make([]string, getListLength(value)) + switch value.(type) { + case []string: + for index, val := range value.([]string) { + str, err := convertNativeTypes(val) + if err != nil { + return nil, err + } + stringList[index] = str + } + case []float32: + for index, val := range value.([]float32) { + str, err := convertNativeTypes(val) + if err != nil { + return nil, err + } + stringList[index] = str + } + case []float64: + for index, val := range value.([]float64) { + str, err := convertNativeTypes(val) + if err != nil { + return nil, err + } + stringList[index] = str + } + case []int: + for index, val := range value.([]int) { + str, err := convertNativeTypes(val) + if err != nil { + return nil, err + } + stringList[index] = str + } + case []int8: + for index, val := range value.([]int8) { + str, err := convertNativeTypes(val) + if err != nil { + return nil, err + } + stringList[index] = str + } + case []int16: + for index, val := range value.([]int16) { + str, err := convertNativeTypes(val) + if err != nil { + return nil, err + } + stringList[index] = str + } + case []int32: + for index, val := range value.([]int32) { + str, err := convertNativeTypes(val) + if err != nil { + return nil, err + } + stringList[index] = str + } + case []int64: + for index, val := range value.([]int64) { + str, err := convertNativeTypes(val) + if err != nil { + return nil, err + } + stringList[index] = str + } + case []bool: + for index, val := range value.([]bool) { + str, err := convertNativeTypes(val) + if err != nil { + return nil, err + } + stringList[index] = str + } + case []any: + for index, val := range value.([]any) { + str, err := convertNativeTypes(val) + if err != nil { + return nil, err + } + stringList[index] = str + } + default: + return nil, fmt.Errorf("unrecognized type: %s", value) + } + return stringList, nil +} + +func convertNativeMap(value any) (map[string]string, error) { + var stringMap = make(map[string]string, getMapLength(value)) + switch value.(type) { + case map[string]string: + for key, val := range value.(map[string]string) { + str, err := convertNativeTypes(val) + if err != nil { + return nil, err + } + stringMap[key] = str + } + case map[string]float32: + for key, val := range value.(map[string]float32) { + str, err := convertNativeTypes(val) + if err != nil { + return nil, err + } + stringMap[key] = str + } + case map[string]float64: + for key, val := range value.(map[string]float64) { + str, err := convertNativeTypes(val) + if err != nil { + return nil, err + } + stringMap[key] = str + } + case map[string]int: + for key, val := range value.(map[string]int) { + str, err := convertNativeTypes(val) + if err != nil { + return nil, err + } + stringMap[key] = str + } + case map[string]int8: + for key, val := range value.(map[string]int8) { + str, err := convertNativeTypes(val) + if err != nil { + return nil, err + } + stringMap[key] = str + } + case map[string]int16: + for key, val := range value.(map[string]int16) { + str, err := convertNativeTypes(val) + if err != nil { + return nil, err + } + stringMap[key] = str + } + case map[string]int32: + for key, val := range value.(map[string]int32) { + str, err := convertNativeTypes(val) + if err != nil { + return nil, err + } + stringMap[key] = str + } + case map[string]int64: + for key, val := range value.(map[string]int64) { + str, err := convertNativeTypes(val) + if err != nil { + return nil, err + } + stringMap[key] = str + } + case map[string]bool: + for key, val := range value.(map[string]bool) { + str, err := convertNativeTypes(val) + if err != nil { + return nil, err + } + stringMap[key] = str + } + case map[string]any: + for key, val := range value.(map[string]any) { + str, err := convertNativeTypes(val) + if err != nil { + return nil, err + } + stringMap[key] = str + } + default: + return nil, fmt.Errorf("unrecognized type: %s", value) + } + return stringMap, nil +} + +func convertNativeTypes(value any) (string, error) { + switch value.(type) { + case string, float32, float64, int, int8, int16, int32, int64, bool: + return fmt.Sprintf("%v", value), nil + default: + return "", fmt.Errorf("unrecognized type: %s", value) + } +} + +func expandToken( + operator Op, + token string, + composite bool, + maxChar int, + firstToken bool, + substitutions Substitutions, + result *strings.Builder, + col int, +) (bool, error) { + if len(token) == 0 { + return false, fmt.Errorf("found an empty token at col: %d", col) + } + + value, ok := substitutions[token] + if !ok { + return false, nil + } + + substType := getSubstitutionType(value, col) + if substType == SubstitutionTypeEmpty || isEmpty(substType, value) { + return false, nil + } + + if firstToken { + addPrefix(operator, result) + } else { + addSeparator(operator, result) + } + + switch substType { + case SubstitutionTypeString: + stringValue, err := convertNativeTypes(value) + if err != nil { + return false, err + } + addStringValue(operator, token, stringValue, result, maxChar) + case SubstitutionTypeList: + listValue, err := convertNativeList(value) + if err != nil { + return false, err + } + addListValue(operator, token, listValue, result, maxChar, composite) + case SubstitutionTypeMap: + mapValue, err := convertNativeMap(value) + if err != nil { + return false, err + } + err = addMapValue(operator, token, mapValue, result, maxChar, composite) + if err != nil { + return false, err + } + } + + return true, nil +} + +func addStringValue(operator Op, token string, value string, result *strings.Builder, maxChar int) { + addValue(operator, token, value, result, maxChar) +} + +func addListValue(operator Op, token string, value []string, result *strings.Builder, maxChar int, composite bool) { + first := true + for _, v := range value { + if first { + addValue(operator, token, v, result, maxChar) + first = false + } else { + if composite { + addSeparator(operator, result) + addValue(operator, token, v, result, maxChar) + } else { + result.WriteString(",") + addValueElement(operator, token, v, result, maxChar) + } + } + } +} + +func addMapValue(operator Op, token string, value map[string]string, result *strings.Builder, maxChar int, composite bool) error { + if maxChar != -1 { + return fmt.Errorf("value trimming is not allowed on Maps") + } + + // workaround to make Map ordering not random + // https://github.com/uri-templates/uritemplate-test/pull/58#issuecomment-1640029982 + keys := make([]string, 0, len(value)) + for k := range value { + keys = append(keys, k) + } + sort.Strings(keys) + for i := range keys { + k := keys[i] + v := value[k] + + if composite { + if i > 0 { + addSeparator(operator, result) + } + addValueElement(operator, token, k, result, maxChar) + result.WriteString("=") + } else { + if i == 0 { + addValue(operator, token, k, result, maxChar) + } else { + result.WriteString(",") + addValueElement(operator, token, k, result, maxChar) + } + result.WriteString(",") + } + addValueElement(operator, token, v, result, maxChar) + } + return nil +} diff --git a/vendor/github.com/yosida95/uritemplate/v3/LICENSE b/vendor/github.com/yosida95/uritemplate/v3/LICENSE deleted file mode 100644 index 79e8f87572..0000000000 --- a/vendor/github.com/yosida95/uritemplate/v3/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (C) 2016, Kohei YOSHIDA . All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/yosida95/uritemplate/v3/README.rst b/vendor/github.com/yosida95/uritemplate/v3/README.rst deleted file mode 100644 index 6815d0a465..0000000000 --- a/vendor/github.com/yosida95/uritemplate/v3/README.rst +++ /dev/null @@ -1,46 +0,0 @@ -uritemplate -=========== - -`uritemplate`_ is a Go implementation of `URI Template`_ [RFC6570] with -full functionality of URI Template Level 4. - -uritemplate can also generate a regexp that matches expansion of the -URI Template from a URI Template. - -Getting Started ---------------- - -Installation -~~~~~~~~~~~~ - -.. code-block:: sh - - $ go get -u github.com/yosida95/uritemplate/v3 - -Documentation -~~~~~~~~~~~~~ - -The documentation is available on GoDoc_. - -Examples --------- - -See `examples on GoDoc`_. - -License -------- - -`uritemplate`_ is distributed under the BSD 3-Clause license. -PLEASE READ ./LICENSE carefully and follow its clauses to use this software. - -Author ------- - -yosida95_ - - -.. _`URI Template`: https://tools.ietf.org/html/rfc6570 -.. _Godoc: https://godoc.org/github.com/yosida95/uritemplate -.. _`examples on GoDoc`: https://godoc.org/github.com/yosida95/uritemplate#pkg-examples -.. _yosida95: https://yosida95.com/ -.. _uritemplate: https://github.com/yosida95/uritemplate diff --git a/vendor/github.com/yosida95/uritemplate/v3/compile.go b/vendor/github.com/yosida95/uritemplate/v3/compile.go deleted file mode 100644 index bd774d15d0..0000000000 --- a/vendor/github.com/yosida95/uritemplate/v3/compile.go +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright (C) 2016 Kohei YOSHIDA. All rights reserved. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of The BSD 3-Clause License -// that can be found in the LICENSE file. - -package uritemplate - -import ( - "fmt" - "unicode/utf8" -) - -type compiler struct { - prog *prog -} - -func (c *compiler) init() { - c.prog = &prog{} -} - -func (c *compiler) op(opcode progOpcode) uint32 { - i := len(c.prog.op) - c.prog.op = append(c.prog.op, progOp{code: opcode}) - return uint32(i) -} - -func (c *compiler) opWithRune(opcode progOpcode, r rune) uint32 { - addr := c.op(opcode) - (&c.prog.op[addr]).r = r - return addr -} - -func (c *compiler) opWithRuneClass(opcode progOpcode, rc runeClass) uint32 { - addr := c.op(opcode) - (&c.prog.op[addr]).rc = rc - return addr -} - -func (c *compiler) opWithAddr(opcode progOpcode, absaddr uint32) uint32 { - addr := c.op(opcode) - (&c.prog.op[addr]).i = absaddr - return addr -} - -func (c *compiler) opWithAddrDelta(opcode progOpcode, delta uint32) uint32 { - return c.opWithAddr(opcode, uint32(len(c.prog.op))+delta) -} - -func (c *compiler) opWithName(opcode progOpcode, name string) uint32 { - addr := c.op(opcode) - (&c.prog.op[addr]).name = name - return addr -} - -func (c *compiler) compileString(str string) { - for i := 0; i < len(str); { - // NOTE(yosida95): It is confirmed at parse time that literals - // consist of only valid-UTF8 runes. - r, size := utf8.DecodeRuneInString(str[i:]) - c.opWithRune(opRune, r) - i += size - } -} - -func (c *compiler) compileRuneClass(rc runeClass, maxlen int) { - for i := 0; i < maxlen; i++ { - if i > 0 { - c.opWithAddrDelta(opSplit, 7) - } - c.opWithAddrDelta(opSplit, 3) // raw rune or pct-encoded - c.opWithRuneClass(opRuneClass, rc) // raw rune - c.opWithAddrDelta(opJmp, 4) // - c.opWithRune(opRune, '%') // pct-encoded - c.opWithRuneClass(opRuneClass, runeClassPctE) // - c.opWithRuneClass(opRuneClass, runeClassPctE) // - } -} - -func (c *compiler) compileRuneClassInfinite(rc runeClass) { - start := c.opWithAddrDelta(opSplit, 3) // raw rune or pct-encoded - c.opWithRuneClass(opRuneClass, rc) // raw rune - c.opWithAddrDelta(opJmp, 4) // - c.opWithRune(opRune, '%') // pct-encoded - c.opWithRuneClass(opRuneClass, runeClassPctE) // - c.opWithRuneClass(opRuneClass, runeClassPctE) // - c.opWithAddrDelta(opSplit, 2) // loop - c.opWithAddr(opJmp, start) // -} - -func (c *compiler) compileVarspecValue(spec varspec, expr *expression) { - var specname string - if spec.maxlen > 0 { - specname = fmt.Sprintf("%s:%d", spec.name, spec.maxlen) - } else { - specname = spec.name - } - - c.prog.numCap++ - - c.opWithName(opCapStart, specname) - - split := c.op(opSplit) - if spec.maxlen > 0 { - c.compileRuneClass(expr.allow, spec.maxlen) - } else { - c.compileRuneClassInfinite(expr.allow) - } - - capEnd := c.opWithName(opCapEnd, specname) - c.prog.op[split].i = capEnd -} - -func (c *compiler) compileVarspec(spec varspec, expr *expression) { - switch { - case expr.named && spec.explode: - split1 := c.op(opSplit) - noop := c.op(opNoop) - c.compileString(spec.name) - - split2 := c.op(opSplit) - c.opWithRune(opRune, '=') - c.compileVarspecValue(spec, expr) - - split3 := c.op(opSplit) - c.compileString(expr.sep) - c.opWithAddr(opJmp, noop) - - c.prog.op[split2].i = uint32(len(c.prog.op)) - c.compileString(expr.ifemp) - c.opWithAddr(opJmp, split3) - - c.prog.op[split1].i = uint32(len(c.prog.op)) - c.prog.op[split3].i = uint32(len(c.prog.op)) - - case expr.named && !spec.explode: - c.compileString(spec.name) - - split2 := c.op(opSplit) - c.opWithRune(opRune, '=') - - split3 := c.op(opSplit) - - split4 := c.op(opSplit) - c.compileVarspecValue(spec, expr) - - split5 := c.op(opSplit) - c.prog.op[split4].i = split5 - c.compileString(",") - c.opWithAddr(opJmp, split4) - - c.prog.op[split3].i = uint32(len(c.prog.op)) - c.compileString(",") - jmp1 := c.op(opJmp) - - c.prog.op[split2].i = uint32(len(c.prog.op)) - c.compileString(expr.ifemp) - - c.prog.op[split5].i = uint32(len(c.prog.op)) - c.prog.op[jmp1].i = uint32(len(c.prog.op)) - - case !expr.named: - start := uint32(len(c.prog.op)) - c.compileVarspecValue(spec, expr) - - split1 := c.op(opSplit) - jmp := c.op(opJmp) - - c.prog.op[split1].i = uint32(len(c.prog.op)) - if spec.explode { - c.compileString(expr.sep) - } else { - c.opWithRune(opRune, ',') - } - c.opWithAddr(opJmp, start) - - c.prog.op[jmp].i = uint32(len(c.prog.op)) - } -} - -func (c *compiler) compileExpression(expr *expression) { - if len(expr.vars) < 1 { - return - } - - split1 := c.op(opSplit) - c.compileString(expr.first) - - for i, size := 0, len(expr.vars); i < size; i++ { - spec := expr.vars[i] - - split2 := c.op(opSplit) - if i > 0 { - split3 := c.op(opSplit) - c.compileString(expr.sep) - c.prog.op[split3].i = uint32(len(c.prog.op)) - } - c.compileVarspec(spec, expr) - c.prog.op[split2].i = uint32(len(c.prog.op)) - } - - c.prog.op[split1].i = uint32(len(c.prog.op)) -} - -func (c *compiler) compileLiterals(lt literals) { - c.compileString(string(lt)) -} - -func (c *compiler) compile(tmpl *Template) { - c.op(opLineBegin) - for i := range tmpl.exprs { - expr := tmpl.exprs[i] - switch expr := expr.(type) { - default: - panic("unhandled expression") - case *expression: - c.compileExpression(expr) - case literals: - c.compileLiterals(expr) - } - } - c.op(opLineEnd) - c.op(opEnd) -} diff --git a/vendor/github.com/yosida95/uritemplate/v3/equals.go b/vendor/github.com/yosida95/uritemplate/v3/equals.go deleted file mode 100644 index aa59a5c030..0000000000 --- a/vendor/github.com/yosida95/uritemplate/v3/equals.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (C) 2016 Kohei YOSHIDA. All rights reserved. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of The BSD 3-Clause License -// that can be found in the LICENSE file. - -package uritemplate - -type CompareFlags uint8 - -const ( - CompareVarname CompareFlags = 1 << iota -) - -// Equals reports whether or not two URI Templates t1 and t2 are equivalent. -func Equals(t1 *Template, t2 *Template, flags CompareFlags) bool { - if len(t1.exprs) != len(t2.exprs) { - return false - } - for i := 0; i < len(t1.exprs); i++ { - switch t1 := t1.exprs[i].(type) { - case literals: - t2, ok := t2.exprs[i].(literals) - if !ok { - return false - } - if t1 != t2 { - return false - } - case *expression: - t2, ok := t2.exprs[i].(*expression) - if !ok { - return false - } - if t1.op != t2.op || len(t1.vars) != len(t2.vars) { - return false - } - for n := 0; n < len(t1.vars); n++ { - v1 := t1.vars[n] - v2 := t2.vars[n] - if flags&CompareVarname == CompareVarname && v1.name != v2.name { - return false - } - if v1.maxlen != v2.maxlen || v1.explode != v2.explode { - return false - } - } - default: - panic("unhandled case") - } - } - return true -} diff --git a/vendor/github.com/yosida95/uritemplate/v3/error.go b/vendor/github.com/yosida95/uritemplate/v3/error.go deleted file mode 100644 index 2fd34a8080..0000000000 --- a/vendor/github.com/yosida95/uritemplate/v3/error.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (C) 2016 Kohei YOSHIDA. All rights reserved. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of The BSD 3-Clause License -// that can be found in the LICENSE file. - -package uritemplate - -import ( - "fmt" -) - -func errorf(pos int, format string, a ...interface{}) error { - msg := fmt.Sprintf(format, a...) - return fmt.Errorf("uritemplate:%d:%s", pos, msg) -} diff --git a/vendor/github.com/yosida95/uritemplate/v3/escape.go b/vendor/github.com/yosida95/uritemplate/v3/escape.go deleted file mode 100644 index 6d27e693af..0000000000 --- a/vendor/github.com/yosida95/uritemplate/v3/escape.go +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (C) 2016 Kohei YOSHIDA. All rights reserved. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of The BSD 3-Clause License -// that can be found in the LICENSE file. - -package uritemplate - -import ( - "strings" - "unicode" - "unicode/utf8" -) - -var ( - hex = []byte("0123456789ABCDEF") - // reserved = gen-delims / sub-delims - // gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@" - // sub-delims = "!" / "$" / "&" / "’" / "(" / ")" - // / "*" / "+" / "," / ";" / "=" - rangeReserved = &unicode.RangeTable{ - R16: []unicode.Range16{ - {Lo: 0x21, Hi: 0x21, Stride: 1}, // '!' - {Lo: 0x23, Hi: 0x24, Stride: 1}, // '#' - '$' - {Lo: 0x26, Hi: 0x2C, Stride: 1}, // '&' - ',' - {Lo: 0x2F, Hi: 0x2F, Stride: 1}, // '/' - {Lo: 0x3A, Hi: 0x3B, Stride: 1}, // ':' - ';' - {Lo: 0x3D, Hi: 0x3D, Stride: 1}, // '=' - {Lo: 0x3F, Hi: 0x40, Stride: 1}, // '?' - '@' - {Lo: 0x5B, Hi: 0x5B, Stride: 1}, // '[' - {Lo: 0x5D, Hi: 0x5D, Stride: 1}, // ']' - }, - LatinOffset: 9, - } - reReserved = `\x21\x23\x24\x26-\x2c\x2f\x3a\x3b\x3d\x3f\x40\x5b\x5d` - // ALPHA = %x41-5A / %x61-7A - // DIGIT = %x30-39 - // unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" - rangeUnreserved = &unicode.RangeTable{ - R16: []unicode.Range16{ - {Lo: 0x2D, Hi: 0x2E, Stride: 1}, // '-' - '.' - {Lo: 0x30, Hi: 0x39, Stride: 1}, // '0' - '9' - {Lo: 0x41, Hi: 0x5A, Stride: 1}, // 'A' - 'Z' - {Lo: 0x5F, Hi: 0x5F, Stride: 1}, // '_' - {Lo: 0x61, Hi: 0x7A, Stride: 1}, // 'a' - 'z' - {Lo: 0x7E, Hi: 0x7E, Stride: 1}, // '~' - }, - } - reUnreserved = `\x2d\x2e\x30-\x39\x41-\x5a\x5f\x61-\x7a\x7e` -) - -type runeClass uint8 - -const ( - runeClassU runeClass = 1 << iota - runeClassR - runeClassPctE - runeClassLast - - runeClassUR = runeClassU | runeClassR -) - -var runeClassNames = []string{ - "U", - "R", - "pct-encoded", -} - -func (rc runeClass) String() string { - ret := make([]string, 0, len(runeClassNames)) - for i, j := 0, runeClass(1); j < runeClassLast; j <<= 1 { - if rc&j == j { - ret = append(ret, runeClassNames[i]) - } - i++ - } - return strings.Join(ret, "+") -} - -func pctEncode(w *strings.Builder, r rune) { - if s := r >> 24 & 0xff; s > 0 { - w.Write([]byte{'%', hex[s/16], hex[s%16]}) - } - if s := r >> 16 & 0xff; s > 0 { - w.Write([]byte{'%', hex[s/16], hex[s%16]}) - } - if s := r >> 8 & 0xff; s > 0 { - w.Write([]byte{'%', hex[s/16], hex[s%16]}) - } - if s := r & 0xff; s > 0 { - w.Write([]byte{'%', hex[s/16], hex[s%16]}) - } -} - -func unhex(c byte) byte { - switch { - case '0' <= c && c <= '9': - return c - '0' - case 'a' <= c && c <= 'f': - return c - 'a' + 10 - case 'A' <= c && c <= 'F': - return c - 'A' + 10 - } - return 0 -} - -func ishex(c byte) bool { - switch { - case '0' <= c && c <= '9': - return true - case 'a' <= c && c <= 'f': - return true - case 'A' <= c && c <= 'F': - return true - default: - return false - } -} - -func pctDecode(s string) string { - size := len(s) - for i := 0; i < len(s); { - switch s[i] { - case '%': - size -= 2 - i += 3 - default: - i++ - } - } - if size == len(s) { - return s - } - - buf := make([]byte, size) - j := 0 - for i := 0; i < len(s); { - switch c := s[i]; c { - case '%': - buf[j] = unhex(s[i+1])<<4 | unhex(s[i+2]) - i += 3 - j++ - default: - buf[j] = c - i++ - j++ - } - } - return string(buf) -} - -type escapeFunc func(*strings.Builder, string) error - -func escapeLiteral(w *strings.Builder, v string) error { - w.WriteString(v) - return nil -} - -func escapeExceptU(w *strings.Builder, v string) error { - for i := 0; i < len(v); { - r, size := utf8.DecodeRuneInString(v[i:]) - if r == utf8.RuneError { - return errorf(i, "invalid encoding") - } - if unicode.Is(rangeUnreserved, r) { - w.WriteRune(r) - } else { - pctEncode(w, r) - } - i += size - } - return nil -} - -func escapeExceptUR(w *strings.Builder, v string) error { - for i := 0; i < len(v); { - r, size := utf8.DecodeRuneInString(v[i:]) - if r == utf8.RuneError { - return errorf(i, "invalid encoding") - } - // TODO(yosida95): is pct-encoded triplets allowed here? - if unicode.In(r, rangeUnreserved, rangeReserved) { - w.WriteRune(r) - } else { - pctEncode(w, r) - } - i += size - } - return nil -} diff --git a/vendor/github.com/yosida95/uritemplate/v3/expression.go b/vendor/github.com/yosida95/uritemplate/v3/expression.go deleted file mode 100644 index 4858c2ddef..0000000000 --- a/vendor/github.com/yosida95/uritemplate/v3/expression.go +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (C) 2016 Kohei YOSHIDA. All rights reserved. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of The BSD 3-Clause License -// that can be found in the LICENSE file. - -package uritemplate - -import ( - "regexp" - "strconv" - "strings" -) - -type template interface { - expand(*strings.Builder, Values) error - regexp(*strings.Builder) -} - -type literals string - -func (l literals) expand(b *strings.Builder, _ Values) error { - b.WriteString(string(l)) - return nil -} - -func (l literals) regexp(b *strings.Builder) { - b.WriteString("(?:") - b.WriteString(regexp.QuoteMeta(string(l))) - b.WriteByte(')') -} - -type varspec struct { - name string - maxlen int - explode bool -} - -type expression struct { - vars []varspec - op parseOp - first string - sep string - named bool - ifemp string - escape escapeFunc - allow runeClass -} - -func (e *expression) init() { - switch e.op { - case parseOpSimple: - e.sep = "," - e.escape = escapeExceptU - e.allow = runeClassU - case parseOpPlus: - e.sep = "," - e.escape = escapeExceptUR - e.allow = runeClassUR - case parseOpCrosshatch: - e.first = "#" - e.sep = "," - e.escape = escapeExceptUR - e.allow = runeClassUR - case parseOpDot: - e.first = "." - e.sep = "." - e.escape = escapeExceptU - e.allow = runeClassU - case parseOpSlash: - e.first = "/" - e.sep = "/" - e.escape = escapeExceptU - e.allow = runeClassU - case parseOpSemicolon: - e.first = ";" - e.sep = ";" - e.named = true - e.escape = escapeExceptU - e.allow = runeClassU - case parseOpQuestion: - e.first = "?" - e.sep = "&" - e.named = true - e.ifemp = "=" - e.escape = escapeExceptU - e.allow = runeClassU - case parseOpAmpersand: - e.first = "&" - e.sep = "&" - e.named = true - e.ifemp = "=" - e.escape = escapeExceptU - e.allow = runeClassU - } -} - -func (e *expression) expand(w *strings.Builder, values Values) error { - first := true - for _, varspec := range e.vars { - value := values.Get(varspec.name) - if !value.Valid() { - continue - } - - if first { - w.WriteString(e.first) - first = false - } else { - w.WriteString(e.sep) - } - - if err := value.expand(w, varspec, e); err != nil { - return err - } - - } - return nil -} - -func (e *expression) regexp(b *strings.Builder) { - if e.first != "" { - b.WriteString("(?:") // $1 - b.WriteString(regexp.QuoteMeta(e.first)) - } - b.WriteByte('(') // $2 - runeClassToRegexp(b, e.allow, e.named || e.vars[0].explode) - if len(e.vars) > 1 || e.vars[0].explode { - max := len(e.vars) - 1 - for i := 0; i < len(e.vars); i++ { - if e.vars[i].explode { - max = -1 - break - } - } - - b.WriteString("(?:") // $3 - b.WriteString(regexp.QuoteMeta(e.sep)) - runeClassToRegexp(b, e.allow, e.named || max < 0) - b.WriteByte(')') // $3 - if max > 0 { - b.WriteString("{0,") - b.WriteString(strconv.Itoa(max)) - b.WriteByte('}') - } else { - b.WriteByte('*') - } - } - b.WriteByte(')') // $2 - if e.first != "" { - b.WriteByte(')') // $1 - } - b.WriteByte('?') -} - -func runeClassToRegexp(b *strings.Builder, class runeClass, named bool) { - b.WriteString("(?:(?:[") - if class&runeClassR == 0 { - b.WriteString(`\x2c`) - if named { - b.WriteString(`\x3d`) - } - } - if class&runeClassU == runeClassU { - b.WriteString(reUnreserved) - } - if class&runeClassR == runeClassR { - b.WriteString(reReserved) - } - b.WriteString("]") - b.WriteString("|%[[:xdigit:]][[:xdigit:]]") - b.WriteString(")*)") -} diff --git a/vendor/github.com/yosida95/uritemplate/v3/machine.go b/vendor/github.com/yosida95/uritemplate/v3/machine.go deleted file mode 100644 index 7b1d0b518d..0000000000 --- a/vendor/github.com/yosida95/uritemplate/v3/machine.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (C) 2016 Kohei YOSHIDA. All rights reserved. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of The BSD 3-Clause License -// that can be found in the LICENSE file. - -package uritemplate - -// threadList implements https://research.swtch.com/sparse. -type threadList struct { - dense []threadEntry - sparse []uint32 -} - -type threadEntry struct { - pc uint32 - t *thread -} - -type thread struct { - op *progOp - cap map[string][]int -} diff --git a/vendor/github.com/yosida95/uritemplate/v3/match.go b/vendor/github.com/yosida95/uritemplate/v3/match.go deleted file mode 100644 index 02fe6385a3..0000000000 --- a/vendor/github.com/yosida95/uritemplate/v3/match.go +++ /dev/null @@ -1,213 +0,0 @@ -// Copyright (C) 2016 Kohei YOSHIDA. All rights reserved. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of The BSD 3-Clause License -// that can be found in the LICENSE file. - -package uritemplate - -import ( - "bytes" - "unicode" - "unicode/utf8" -) - -type matcher struct { - prog *prog - - list1 threadList - list2 threadList - matched bool - cap map[string][]int - - input string -} - -func (m *matcher) at(pos int) (rune, int, bool) { - if l := len(m.input); pos < l { - c := m.input[pos] - if c < utf8.RuneSelf { - return rune(c), 1, pos+1 < l - } - r, size := utf8.DecodeRuneInString(m.input[pos:]) - return r, size, pos+size < l - } - return -1, 0, false -} - -func (m *matcher) add(list *threadList, pc uint32, pos int, next bool, cap map[string][]int) { - if i := list.sparse[pc]; i < uint32(len(list.dense)) && list.dense[i].pc == pc { - return - } - - n := len(list.dense) - list.dense = list.dense[:n+1] - list.sparse[pc] = uint32(n) - - e := &list.dense[n] - e.pc = pc - e.t = nil - - op := &m.prog.op[pc] - switch op.code { - default: - panic("unhandled opcode") - case opRune, opRuneClass, opEnd: - e.t = &thread{ - op: &m.prog.op[pc], - cap: make(map[string][]int, len(m.cap)), - } - for k, v := range cap { - e.t.cap[k] = make([]int, len(v)) - copy(e.t.cap[k], v) - } - case opLineBegin: - if pos == 0 { - m.add(list, pc+1, pos, next, cap) - } - case opLineEnd: - if !next { - m.add(list, pc+1, pos, next, cap) - } - case opCapStart, opCapEnd: - ocap := make(map[string][]int, len(m.cap)) - for k, v := range cap { - ocap[k] = make([]int, len(v)) - copy(ocap[k], v) - } - ocap[op.name] = append(ocap[op.name], pos) - m.add(list, pc+1, pos, next, ocap) - case opSplit: - m.add(list, pc+1, pos, next, cap) - m.add(list, op.i, pos, next, cap) - case opJmp: - m.add(list, op.i, pos, next, cap) - case opJmpIfNotDefined: - m.add(list, pc+1, pos, next, cap) - m.add(list, op.i, pos, next, cap) - case opJmpIfNotFirst: - m.add(list, pc+1, pos, next, cap) - m.add(list, op.i, pos, next, cap) - case opJmpIfNotEmpty: - m.add(list, op.i, pos, next, cap) - m.add(list, pc+1, pos, next, cap) - case opNoop: - m.add(list, pc+1, pos, next, cap) - } -} - -func (m *matcher) step(clist *threadList, nlist *threadList, r rune, pos int, nextPos int, next bool) { - debug.Printf("===== %q =====", string(r)) - for i := 0; i < len(clist.dense); i++ { - e := clist.dense[i] - if debug { - var buf bytes.Buffer - dumpProg(&buf, m.prog, e.pc) - debug.Printf("\n%s", buf.String()) - } - if e.t == nil { - continue - } - - t := e.t - op := t.op - switch op.code { - default: - panic("unhandled opcode") - case opRune: - if op.r == r { - m.add(nlist, e.pc+1, nextPos, next, t.cap) - } - case opRuneClass: - ret := false - if !ret && op.rc&runeClassU == runeClassU { - ret = ret || unicode.Is(rangeUnreserved, r) - } - if !ret && op.rc&runeClassR == runeClassR { - ret = ret || unicode.Is(rangeReserved, r) - } - if !ret && op.rc&runeClassPctE == runeClassPctE { - ret = ret || unicode.Is(unicode.ASCII_Hex_Digit, r) - } - if ret { - m.add(nlist, e.pc+1, nextPos, next, t.cap) - } - case opEnd: - m.matched = true - for k, v := range t.cap { - m.cap[k] = make([]int, len(v)) - copy(m.cap[k], v) - } - clist.dense = clist.dense[:0] - } - } - clist.dense = clist.dense[:0] -} - -func (m *matcher) match() bool { - pos := 0 - clist, nlist := &m.list1, &m.list2 - for { - if len(clist.dense) == 0 && m.matched { - break - } - r, width, next := m.at(pos) - if !m.matched { - m.add(clist, 0, pos, next, m.cap) - } - m.step(clist, nlist, r, pos, pos+width, next) - - if width < 1 { - break - } - pos += width - - clist, nlist = nlist, clist - } - return m.matched -} - -func (tmpl *Template) Match(expansion string) Values { - tmpl.mu.Lock() - if tmpl.prog == nil { - c := compiler{} - c.init() - c.compile(tmpl) - tmpl.prog = c.prog - } - prog := tmpl.prog - tmpl.mu.Unlock() - - n := len(prog.op) - m := matcher{ - prog: prog, - list1: threadList{ - dense: make([]threadEntry, 0, n), - sparse: make([]uint32, n), - }, - list2: threadList{ - dense: make([]threadEntry, 0, n), - sparse: make([]uint32, n), - }, - cap: make(map[string][]int, prog.numCap), - input: expansion, - } - if !m.match() { - return nil - } - - match := make(Values, len(m.cap)) - for name, indices := range m.cap { - v := Value{V: make([]string, len(indices)/2)} - for i := range v.V { - v.V[i] = pctDecode(expansion[indices[2*i]:indices[2*i+1]]) - } - if len(v.V) == 1 { - v.T = ValueTypeString - } else { - v.T = ValueTypeList - } - match[name] = v - } - return match -} diff --git a/vendor/github.com/yosida95/uritemplate/v3/parse.go b/vendor/github.com/yosida95/uritemplate/v3/parse.go deleted file mode 100644 index fd38a682f1..0000000000 --- a/vendor/github.com/yosida95/uritemplate/v3/parse.go +++ /dev/null @@ -1,277 +0,0 @@ -// Copyright (C) 2016 Kohei YOSHIDA. All rights reserved. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of The BSD 3-Clause License -// that can be found in the LICENSE file. - -package uritemplate - -import ( - "fmt" - "unicode" - "unicode/utf8" -) - -type parseOp int - -const ( - parseOpSimple parseOp = iota - parseOpPlus - parseOpCrosshatch - parseOpDot - parseOpSlash - parseOpSemicolon - parseOpQuestion - parseOpAmpersand -) - -var ( - rangeVarchar = &unicode.RangeTable{ - R16: []unicode.Range16{ - {Lo: 0x0030, Hi: 0x0039, Stride: 1}, // '0' - '9' - {Lo: 0x0041, Hi: 0x005A, Stride: 1}, // 'A' - 'Z' - {Lo: 0x005F, Hi: 0x005F, Stride: 1}, // '_' - {Lo: 0x0061, Hi: 0x007A, Stride: 1}, // 'a' - 'z' - }, - LatinOffset: 4, - } - rangeLiterals = &unicode.RangeTable{ - R16: []unicode.Range16{ - {Lo: 0x0021, Hi: 0x0021, Stride: 1}, // '!' - {Lo: 0x0023, Hi: 0x0024, Stride: 1}, // '#' - '$' - {Lo: 0x0026, Hi: 0x003B, Stride: 1}, // '&' ''' '(' - ';'. '''/27 used to be excluded but an errata is in the review process https://www.rfc-editor.org/errata/eid6937 - {Lo: 0x003D, Hi: 0x003D, Stride: 1}, // '=' - {Lo: 0x003F, Hi: 0x005B, Stride: 1}, // '?' - '[' - {Lo: 0x005D, Hi: 0x005D, Stride: 1}, // ']' - {Lo: 0x005F, Hi: 0x005F, Stride: 1}, // '_' - {Lo: 0x0061, Hi: 0x007A, Stride: 1}, // 'a' - 'z' - {Lo: 0x007E, Hi: 0x007E, Stride: 1}, // '~' - {Lo: 0x00A0, Hi: 0xD7FF, Stride: 1}, // ucschar - {Lo: 0xE000, Hi: 0xF8FF, Stride: 1}, // iprivate - {Lo: 0xF900, Hi: 0xFDCF, Stride: 1}, // ucschar - {Lo: 0xFDF0, Hi: 0xFFEF, Stride: 1}, // ucschar - }, - R32: []unicode.Range32{ - {Lo: 0x00010000, Hi: 0x0001FFFD, Stride: 1}, // ucschar - {Lo: 0x00020000, Hi: 0x0002FFFD, Stride: 1}, // ucschar - {Lo: 0x00030000, Hi: 0x0003FFFD, Stride: 1}, // ucschar - {Lo: 0x00040000, Hi: 0x0004FFFD, Stride: 1}, // ucschar - {Lo: 0x00050000, Hi: 0x0005FFFD, Stride: 1}, // ucschar - {Lo: 0x00060000, Hi: 0x0006FFFD, Stride: 1}, // ucschar - {Lo: 0x00070000, Hi: 0x0007FFFD, Stride: 1}, // ucschar - {Lo: 0x00080000, Hi: 0x0008FFFD, Stride: 1}, // ucschar - {Lo: 0x00090000, Hi: 0x0009FFFD, Stride: 1}, // ucschar - {Lo: 0x000A0000, Hi: 0x000AFFFD, Stride: 1}, // ucschar - {Lo: 0x000B0000, Hi: 0x000BFFFD, Stride: 1}, // ucschar - {Lo: 0x000C0000, Hi: 0x000CFFFD, Stride: 1}, // ucschar - {Lo: 0x000D0000, Hi: 0x000DFFFD, Stride: 1}, // ucschar - {Lo: 0x000E1000, Hi: 0x000EFFFD, Stride: 1}, // ucschar - {Lo: 0x000F0000, Hi: 0x000FFFFD, Stride: 1}, // iprivate - {Lo: 0x00100000, Hi: 0x0010FFFD, Stride: 1}, // iprivate - }, - LatinOffset: 10, - } -) - -type parser struct { - r string - start int - stop int - state parseState -} - -func (p *parser) errorf(i rune, format string, a ...interface{}) error { - return fmt.Errorf("%s: %s%s", fmt.Sprintf(format, a...), p.r[0:p.stop], string(i)) -} - -func (p *parser) rune() (rune, int) { - r, size := utf8.DecodeRuneInString(p.r[p.stop:]) - if r != utf8.RuneError { - p.stop += size - } - return r, size -} - -func (p *parser) unread(r rune) { - p.stop -= utf8.RuneLen(r) -} - -type parseState int - -const ( - parseStateDefault = parseState(iota) - parseStateOperator - parseStateVarList - parseStateVarName - parseStatePrefix -) - -func (p *parser) setState(state parseState) { - p.state = state - p.start = p.stop -} - -func (p *parser) parseURITemplate() (*Template, error) { - tmpl := Template{ - raw: p.r, - exprs: []template{}, - } - - var exp *expression - for { - r, size := p.rune() - if r == utf8.RuneError { - if size == 0 { - if p.state != parseStateDefault { - return nil, p.errorf('_', "incomplete expression") - } - if p.start < p.stop { - tmpl.exprs = append(tmpl.exprs, literals(p.r[p.start:p.stop])) - } - return &tmpl, nil - } - return nil, p.errorf('_', "invalid UTF-8 sequence") - } - - switch p.state { - case parseStateDefault: - switch r { - case '{': - if stop := p.stop - size; stop > p.start { - tmpl.exprs = append(tmpl.exprs, literals(p.r[p.start:stop])) - } - exp = &expression{} - tmpl.exprs = append(tmpl.exprs, exp) - p.setState(parseStateOperator) - case '%': - p.unread(r) - if err := p.consumeTriplet(); err != nil { - return nil, err - } - default: - if !unicode.Is(rangeLiterals, r) { - p.unread(r) - return nil, p.errorf('_', "unacceptable character (hint: use %%XX encoding)") - } - } - case parseStateOperator: - switch r { - default: - p.unread(r) - exp.op = parseOpSimple - case '+': - exp.op = parseOpPlus - case '#': - exp.op = parseOpCrosshatch - case '.': - exp.op = parseOpDot - case '/': - exp.op = parseOpSlash - case ';': - exp.op = parseOpSemicolon - case '?': - exp.op = parseOpQuestion - case '&': - exp.op = parseOpAmpersand - case '=', ',', '!', '@', '|': // op-reserved - return nil, p.errorf('|', "unimplemented operator (op-reserved)") - } - p.setState(parseStateVarName) - case parseStateVarList: - switch r { - case ',': - p.setState(parseStateVarName) - case '}': - exp.init() - p.setState(parseStateDefault) - default: - p.unread(r) - return nil, p.errorf('_', "unrecognized value modifier") - } - case parseStateVarName: - switch r { - case ':', '*': - name := p.r[p.start : p.stop-size] - if !isValidVarname(name) { - return nil, p.errorf('|', "unacceptable variable name") - } - explode := r == '*' - exp.vars = append(exp.vars, varspec{ - name: name, - explode: explode, - }) - if explode { - p.setState(parseStateVarList) - } else { - p.setState(parseStatePrefix) - } - case ',', '}': - p.unread(r) - name := p.r[p.start:p.stop] - if !isValidVarname(name) { - return nil, p.errorf('|', "unacceptable variable name") - } - exp.vars = append(exp.vars, varspec{ - name: name, - }) - p.setState(parseStateVarList) - case '%': - p.unread(r) - if err := p.consumeTriplet(); err != nil { - return nil, err - } - case '.': - if dot := p.stop - size; dot == p.start || p.r[dot-1] == '.' { - return nil, p.errorf('|', "unacceptable variable name") - } - default: - if !unicode.Is(rangeVarchar, r) { - p.unread(r) - return nil, p.errorf('_', "unacceptable variable name") - } - } - case parseStatePrefix: - spec := &(exp.vars[len(exp.vars)-1]) - switch { - case '0' <= r && r <= '9': - spec.maxlen *= 10 - spec.maxlen += int(r - '0') - if spec.maxlen == 0 || spec.maxlen > 9999 { - return nil, p.errorf('|', "max-length must be (0, 9999]") - } - default: - p.unread(r) - if spec.maxlen == 0 { - return nil, p.errorf('_', "max-length must be (0, 9999]") - } - p.setState(parseStateVarList) - } - default: - p.unread(r) - panic(p.errorf('_', "unhandled parseState(%d)", p.state)) - } - } -} - -func isValidVarname(name string) bool { - if l := len(name); l == 0 || name[0] == '.' || name[l-1] == '.' { - return false - } - for i := 1; i < len(name)-1; i++ { - switch c := name[i]; c { - case '.': - if name[i-1] == '.' { - return false - } - } - } - return true -} - -func (p *parser) consumeTriplet() error { - if len(p.r)-p.stop < 3 || p.r[p.stop] != '%' || !ishex(p.r[p.stop+1]) || !ishex(p.r[p.stop+2]) { - return p.errorf('_', "incomplete pct-encodeed") - } - p.stop += 3 - return nil -} diff --git a/vendor/github.com/yosida95/uritemplate/v3/prog.go b/vendor/github.com/yosida95/uritemplate/v3/prog.go deleted file mode 100644 index 97af4f0eab..0000000000 --- a/vendor/github.com/yosida95/uritemplate/v3/prog.go +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (C) 2016 Kohei YOSHIDA. All rights reserved. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of The BSD 3-Clause License -// that can be found in the LICENSE file. - -package uritemplate - -import ( - "bytes" - "strconv" -) - -type progOpcode uint16 - -const ( - // match - opRune progOpcode = iota - opRuneClass - opLineBegin - opLineEnd - // capture - opCapStart - opCapEnd - // stack - opSplit - opJmp - opJmpIfNotDefined - opJmpIfNotEmpty - opJmpIfNotFirst - // result - opEnd - // fake - opNoop - opcodeMax -) - -var opcodeNames = []string{ - // match - "opRune", - "opRuneClass", - "opLineBegin", - "opLineEnd", - // capture - "opCapStart", - "opCapEnd", - // stack - "opSplit", - "opJmp", - "opJmpIfNotDefined", - "opJmpIfNotEmpty", - "opJmpIfNotFirst", - // result - "opEnd", -} - -func (code progOpcode) String() string { - if code >= opcodeMax { - return "" - } - return opcodeNames[code] -} - -type progOp struct { - code progOpcode - r rune - rc runeClass - i uint32 - - name string -} - -func dumpProgOp(b *bytes.Buffer, op *progOp) { - b.WriteString(op.code.String()) - switch op.code { - case opRune: - b.WriteString("(") - b.WriteString(strconv.QuoteToASCII(string(op.r))) - b.WriteString(")") - case opRuneClass: - b.WriteString("(") - b.WriteString(op.rc.String()) - b.WriteString(")") - case opCapStart, opCapEnd: - b.WriteString("(") - b.WriteString(strconv.QuoteToASCII(op.name)) - b.WriteString(")") - case opSplit: - b.WriteString(" -> ") - b.WriteString(strconv.FormatInt(int64(op.i), 10)) - case opJmp, opJmpIfNotFirst: - b.WriteString(" -> ") - b.WriteString(strconv.FormatInt(int64(op.i), 10)) - case opJmpIfNotDefined, opJmpIfNotEmpty: - b.WriteString("(") - b.WriteString(strconv.QuoteToASCII(op.name)) - b.WriteString(")") - b.WriteString(" -> ") - b.WriteString(strconv.FormatInt(int64(op.i), 10)) - } -} - -type prog struct { - op []progOp - numCap int -} - -func dumpProg(b *bytes.Buffer, prog *prog, pc uint32) { - for i := range prog.op { - op := prog.op[i] - - pos := strconv.Itoa(i) - if uint32(i) == pc { - pos = "*" + pos - } - b.WriteString(" "[len(pos):]) - b.WriteString(pos) - - b.WriteByte('\t') - dumpProgOp(b, &op) - - b.WriteByte('\n') - } -} - -func (p *prog) String() string { - b := bytes.Buffer{} - dumpProg(&b, p, 0) - return b.String() -} diff --git a/vendor/github.com/yosida95/uritemplate/v3/uritemplate.go b/vendor/github.com/yosida95/uritemplate/v3/uritemplate.go deleted file mode 100644 index dbd2673753..0000000000 --- a/vendor/github.com/yosida95/uritemplate/v3/uritemplate.go +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (C) 2016 Kohei YOSHIDA. All rights reserved. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of The BSD 3-Clause License -// that can be found in the LICENSE file. - -package uritemplate - -import ( - "log" - "regexp" - "strings" - "sync" -) - -var ( - debug = debugT(false) -) - -type debugT bool - -func (t debugT) Printf(format string, v ...interface{}) { - if t { - log.Printf(format, v...) - } -} - -// Template represents a URI Template. -type Template struct { - raw string - exprs []template - - // protects the rest of fields - mu sync.Mutex - varnames []string - re *regexp.Regexp - prog *prog -} - -// New parses and constructs a new Template instance based on the template. -// New returns an error if the template cannot be recognized. -func New(template string) (*Template, error) { - return (&parser{r: template}).parseURITemplate() -} - -// MustNew panics if the template cannot be recognized. -func MustNew(template string) *Template { - ret, err := New(template) - if err != nil { - panic(err) - } - return ret -} - -// Raw returns a raw URI template passed to New in string. -func (t *Template) Raw() string { - return t.raw -} - -// Varnames returns variable names used in the template. -func (t *Template) Varnames() []string { - t.mu.Lock() - defer t.mu.Unlock() - if t.varnames != nil { - return t.varnames - } - - reg := map[string]struct{}{} - t.varnames = []string{} - for i := range t.exprs { - expr, ok := t.exprs[i].(*expression) - if !ok { - continue - } - for _, spec := range expr.vars { - if _, ok := reg[spec.name]; ok { - continue - } - reg[spec.name] = struct{}{} - t.varnames = append(t.varnames, spec.name) - } - } - - return t.varnames -} - -// Expand returns a URI reference corresponding to the template expanded using the passed variables. -func (t *Template) Expand(vars Values) (string, error) { - var w strings.Builder - for i := range t.exprs { - expr := t.exprs[i] - if err := expr.expand(&w, vars); err != nil { - return w.String(), err - } - } - return w.String(), nil -} - -// Regexp converts the template to regexp and returns compiled *regexp.Regexp. -func (t *Template) Regexp() *regexp.Regexp { - t.mu.Lock() - defer t.mu.Unlock() - if t.re != nil { - return t.re - } - - var b strings.Builder - b.WriteByte('^') - for _, expr := range t.exprs { - expr.regexp(&b) - } - b.WriteByte('$') - t.re = regexp.MustCompile(b.String()) - - return t.re -} diff --git a/vendor/github.com/yosida95/uritemplate/v3/value.go b/vendor/github.com/yosida95/uritemplate/v3/value.go deleted file mode 100644 index 0550eabdbf..0000000000 --- a/vendor/github.com/yosida95/uritemplate/v3/value.go +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright (C) 2016 Kohei YOSHIDA. All rights reserved. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of The BSD 3-Clause License -// that can be found in the LICENSE file. - -package uritemplate - -import "strings" - -// A varname containing pct-encoded characters is not the same variable as -// a varname with those same characters decoded. -// -// -- https://tools.ietf.org/html/rfc6570#section-2.3 -type Values map[string]Value - -func (v Values) Set(name string, value Value) { - v[name] = value -} - -func (v Values) Get(name string) Value { - if v == nil { - return Value{} - } - return v[name] -} - -type ValueType uint8 - -const ( - ValueTypeString = iota - ValueTypeList - ValueTypeKV - valueTypeLast -) - -var valueTypeNames = []string{ - "String", - "List", - "KV", -} - -func (vt ValueType) String() string { - if vt < valueTypeLast { - return valueTypeNames[vt] - } - return "" -} - -type Value struct { - T ValueType - V []string -} - -func (v Value) String() string { - if v.Valid() && v.T == ValueTypeString { - return v.V[0] - } - return "" -} - -func (v Value) List() []string { - if v.Valid() && v.T == ValueTypeList { - return v.V - } - return nil -} - -func (v Value) KV() []string { - if v.Valid() && v.T == ValueTypeKV { - return v.V - } - return nil -} - -func (v Value) Valid() bool { - switch v.T { - default: - return false - case ValueTypeString: - return len(v.V) > 0 - case ValueTypeList: - return len(v.V) > 0 - case ValueTypeKV: - return len(v.V) > 0 && len(v.V)%2 == 0 - } -} - -func (v Value) expand(w *strings.Builder, spec varspec, exp *expression) error { - switch v.T { - case ValueTypeString: - val := v.V[0] - var maxlen int - if max := len(val); spec.maxlen < 1 || spec.maxlen > max { - maxlen = max - } else { - maxlen = spec.maxlen - } - - if exp.named { - w.WriteString(spec.name) - if val == "" { - w.WriteString(exp.ifemp) - return nil - } - w.WriteByte('=') - } - return exp.escape(w, val[:maxlen]) - case ValueTypeList: - var sep string - if spec.explode { - sep = exp.sep - } else { - sep = "," - } - - var pre string - var preifemp string - if spec.explode && exp.named { - pre = spec.name + "=" - preifemp = spec.name + exp.ifemp - } - - if !spec.explode && exp.named { - w.WriteString(spec.name) - w.WriteByte('=') - } - for i := range v.V { - val := v.V[i] - if i > 0 { - w.WriteString(sep) - } - if val == "" { - w.WriteString(preifemp) - continue - } - w.WriteString(pre) - - if err := exp.escape(w, val); err != nil { - return err - } - } - case ValueTypeKV: - var sep string - var kvsep string - if spec.explode { - sep = exp.sep - kvsep = "=" - } else { - sep = "," - kvsep = "," - } - - var ifemp string - var kescape escapeFunc - if spec.explode && exp.named { - ifemp = exp.ifemp - kescape = escapeLiteral - } else { - ifemp = "," - kescape = exp.escape - } - - if !spec.explode && exp.named { - w.WriteString(spec.name) - w.WriteByte('=') - } - - for i := 0; i < len(v.V); i += 2 { - if i > 0 { - w.WriteString(sep) - } - if err := kescape(w, v.V[i]); err != nil { - return err - } - if v.V[i+1] == "" { - w.WriteString(ifemp) - continue - } - w.WriteString(kvsep) - - if err := exp.escape(w, v.V[i+1]); err != nil { - return err - } - } - } - return nil -} - -// String returns Value that represents string. -func String(v string) Value { - return Value{ - T: ValueTypeString, - V: []string{v}, - } -} - -// List returns Value that represents list. -func List(v ...string) Value { - return Value{ - T: ValueTypeList, - V: v, - } -} - -// KV returns Value that represents associative list. -// KV panics if len(kv) is not even. -func KV(kv ...string) Value { - if len(kv)%2 != 0 { - panic("uritemplate.go: count of the kv must be even number") - } - return Value{ - T: ValueTypeKV, - V: kv, - } -} diff --git a/vendor/go.mongodb.org/mongo-driver/bson/bsonrw/extjson_writer.go b/vendor/go.mongodb.org/mongo-driver/bson/bsonrw/extjson_writer.go index 57781ff9f3..86a293570f 100644 --- a/vendor/go.mongodb.org/mongo-driver/bson/bsonrw/extjson_writer.go +++ b/vendor/go.mongodb.org/mongo-driver/bson/bsonrw/extjson_writer.go @@ -468,12 +468,13 @@ func (ejvw *extJSONValueWriter) WriteRegex(pattern string, options string) error return err } + options = sortStringAlphebeticAscending(options) var buf bytes.Buffer buf.WriteString(`{"$regularExpression":{"pattern":`) writeStringWithEscapes(pattern, &buf, ejvw.escapeHTML) - buf.WriteString(`,"options":"`) - buf.WriteString(sortStringAlphebeticAscending(options)) - buf.WriteString(`"}},`) + buf.WriteString(`,"options":`) + writeStringWithEscapes(options, &buf, ejvw.escapeHTML) + buf.WriteString(`}},`) ejvw.buf = append(ejvw.buf, buf.Bytes()...) diff --git a/vendor/go.opentelemetry.io/contrib/detectors/gcp/cloud-function.go b/vendor/go.opentelemetry.io/contrib/detectors/gcp/cloud-function.go index eb2a6fab59..0f0f68c0af 100644 --- a/vendor/go.opentelemetry.io/contrib/detectors/gcp/cloud-function.go +++ b/vendor/go.opentelemetry.io/contrib/detectors/gcp/cloud-function.go @@ -10,7 +10,7 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/sdk/resource" - semconv "go.opentelemetry.io/otel/semconv/v1.26.0" + semconv "go.opentelemetry.io/otel/semconv/v1.34.0" ) const ( diff --git a/vendor/go.opentelemetry.io/contrib/detectors/gcp/cloud-run.go b/vendor/go.opentelemetry.io/contrib/detectors/gcp/cloud-run.go index 7754b46683..8c2ce3e3ec 100644 --- a/vendor/go.opentelemetry.io/contrib/detectors/gcp/cloud-run.go +++ b/vendor/go.opentelemetry.io/contrib/detectors/gcp/cloud-run.go @@ -13,7 +13,7 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/sdk/resource" - semconv "go.opentelemetry.io/otel/semconv/v1.26.0" + semconv "go.opentelemetry.io/otel/semconv/v1.34.0" ) const serviceNamespace = "cloud-run-managed" diff --git a/vendor/go.opentelemetry.io/contrib/detectors/gcp/detector.go b/vendor/go.opentelemetry.io/contrib/detectors/gcp/detector.go index b9eb1e1e14..4449a82133 100644 --- a/vendor/go.opentelemetry.io/contrib/detectors/gcp/detector.go +++ b/vendor/go.opentelemetry.io/contrib/detectors/gcp/detector.go @@ -13,7 +13,7 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/sdk/resource" - semconv "go.opentelemetry.io/otel/semconv/v1.26.0" + semconv "go.opentelemetry.io/otel/semconv/v1.34.0" ) // NewDetector returns a resource detector which detects resource attributes on: @@ -84,8 +84,8 @@ func (d *detector) Detect(ctx context.Context) (*resource.Resource, error) { b.add(semconv.HostTypeKey, d.detector.GCEHostType) b.add(semconv.HostIDKey, d.detector.GCEHostID) b.add(semconv.HostNameKey, d.detector.GCEHostName) - b.add(semconv.GCPGceInstanceNameKey, d.detector.GCEInstanceName) - b.add(semconv.GCPGceInstanceHostnameKey, d.detector.GCEInstanceHostname) + b.add(semconv.GCPGCEInstanceNameKey, d.detector.GCEInstanceName) + b.add(semconv.GCPGCEInstanceHostnameKey, d.detector.GCEInstanceHostname) default: // We don't support this platform yet, so just return with what we have } diff --git a/vendor/go.opentelemetry.io/contrib/detectors/gcp/gce.go b/vendor/go.opentelemetry.io/contrib/detectors/gcp/gce.go index 2a29c420b4..e66b10f1e3 100644 --- a/vendor/go.opentelemetry.io/contrib/detectors/gcp/gce.go +++ b/vendor/go.opentelemetry.io/contrib/detectors/gcp/gce.go @@ -14,7 +14,7 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/sdk/resource" - semconv "go.opentelemetry.io/otel/semconv/v1.26.0" + semconv "go.opentelemetry.io/otel/semconv/v1.34.0" ) // GCE collects resource information of GCE computing instances. diff --git a/vendor/go.opentelemetry.io/contrib/detectors/gcp/gke.go b/vendor/go.opentelemetry.io/contrib/detectors/gcp/gke.go index 0588ad6a48..be4b531726 100644 --- a/vendor/go.opentelemetry.io/contrib/detectors/gcp/gke.go +++ b/vendor/go.opentelemetry.io/contrib/detectors/gcp/gke.go @@ -12,7 +12,7 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/sdk/resource" - semconv "go.opentelemetry.io/otel/semconv/v1.26.0" + semconv "go.opentelemetry.io/otel/semconv/v1.34.0" ) // GKE collects resource information of GKE computing instances. diff --git a/vendor/go.opentelemetry.io/contrib/detectors/gcp/version.go b/vendor/go.opentelemetry.io/contrib/detectors/gcp/version.go index e005e91667..d1152ec458 100644 --- a/vendor/go.opentelemetry.io/contrib/detectors/gcp/version.go +++ b/vendor/go.opentelemetry.io/contrib/detectors/gcp/version.go @@ -5,7 +5,7 @@ package gcp // import "go.opentelemetry.io/contrib/detectors/gcp" // Version is the current release version of the GCP resource detector. func Version() string { - return "1.36.0" + return "1.37.0" // This string is updated by the pre_release.sh script during release } diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/config.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/config.go index 296407f38e..e3b5ff1fcc 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/config.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/config.go @@ -4,6 +4,8 @@ package otelgrpc // import "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" import ( + "context" + "google.golang.org/grpc/stats" "go.opentelemetry.io/otel" @@ -39,6 +41,9 @@ type config struct { SpanAttributes []attribute.KeyValue MetricAttributes []attribute.KeyValue + PublicEndpoint bool + PublicEndpointFn func(ctx context.Context, info *stats.RPCTagInfo) bool + ReceivedEvent bool SentEvent bool } @@ -61,6 +66,38 @@ func newConfig(opts []Option) *config { return c } +type publicEndpointOption struct{ p bool } + +func (o publicEndpointOption) apply(c *config) { + c.PublicEndpoint = o.p +} + +// WithPublicEndpoint configures the Handler to link the span with an incoming +// span context. If this option is not provided, then the association is a child +// association instead of a link. +func WithPublicEndpoint() Option { + return publicEndpointOption{p: true} +} + +type publicEndpointFnOption struct { + fn func(context.Context, *stats.RPCTagInfo) bool +} + +func (o publicEndpointFnOption) apply(c *config) { + if o.fn != nil { + c.PublicEndpointFn = o.fn + } +} + +// WithPublicEndpointFn runs with every request, and allows conditionally +// configuring the Handler to link the span with an incoming span context. If +// this option is not provided or returns false, then the association is a +// child association instead of a link. +// Note: WithPublicEndpoint takes precedence over WithPublicEndpointFn. +func WithPublicEndpointFn(fn func(context.Context, *stats.RPCTagInfo) bool) Option { + return publicEndpointFnOption{fn: fn} +} + type propagatorsOption struct{ p propagation.TextMapPropagator } func (o propagatorsOption) apply(c *config) { diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go index f63513d456..7fc8193f6f 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go @@ -4,7 +4,7 @@ package otelgrpc // import "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" // gRPC tracing middleware -// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/rpc.md +// https://opentelemetry.io/docs/specs/semconv/rpc/ import ( "context" "errors" @@ -15,14 +15,13 @@ import ( "google.golang.org/grpc" grpc_codes "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" - "google.golang.org/grpc/peer" "google.golang.org/grpc/status" "google.golang.org/protobuf/proto" "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/internal" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" - semconv "go.opentelemetry.io/otel/semconv/v1.30.0" + semconv "go.opentelemetry.io/otel/semconv/v1.34.0" "go.opentelemetry.io/otel/trace" ) @@ -196,118 +195,11 @@ func StreamClientInterceptor(opts ...Option) grpc.StreamClientInterceptor { } } -// serverStream wraps around the embedded grpc.ServerStream, and intercepts the RecvMsg and -// SendMsg method call. -type serverStream struct { - grpc.ServerStream - ctx context.Context - - receivedMessageID int - sentMessageID int - - receivedEvent bool - sentEvent bool -} - -func (w *serverStream) Context() context.Context { - return w.ctx -} - -func (w *serverStream) RecvMsg(m interface{}) error { - err := w.ServerStream.RecvMsg(m) - - if err == nil { - w.receivedMessageID++ - if w.receivedEvent { - messageReceived.Event(w.Context(), w.receivedMessageID, m) - } - } - - return err -} - -func (w *serverStream) SendMsg(m interface{}) error { - err := w.ServerStream.SendMsg(m) - - w.sentMessageID++ - if w.sentEvent { - messageSent.Event(w.Context(), w.sentMessageID, m) - } - - return err -} - -func wrapServerStream(ctx context.Context, ss grpc.ServerStream, cfg *config) *serverStream { - return &serverStream{ - ServerStream: ss, - ctx: ctx, - receivedEvent: cfg.ReceivedEvent, - sentEvent: cfg.SentEvent, - } -} - -// StreamServerInterceptor returns a grpc.StreamServerInterceptor suitable -// for use in a grpc.NewServer call. -// -// Deprecated: Use [NewServerHandler] instead. -func StreamServerInterceptor(opts ...Option) grpc.StreamServerInterceptor { - cfg := newConfig(opts) - tracer := cfg.TracerProvider.Tracer( - ScopeName, - trace.WithInstrumentationVersion(Version()), - ) - - return func( - srv interface{}, - ss grpc.ServerStream, - info *grpc.StreamServerInfo, - handler grpc.StreamHandler, - ) error { - ctx := ss.Context() - i := &InterceptorInfo{ - StreamServerInfo: info, - Type: StreamServer, - } - if cfg.InterceptorFilter != nil && !cfg.InterceptorFilter(i) { - return handler(srv, wrapServerStream(ctx, ss, cfg)) - } - - ctx = extract(ctx, cfg.Propagators) - name, attr := telemetryAttributes(info.FullMethod, peerFromCtx(ctx)) - - startOpts := append([]trace.SpanStartOption{ - trace.WithSpanKind(trace.SpanKindServer), - trace.WithAttributes(attr...), - }, - cfg.SpanStartOptions..., - ) - - ctx, span := tracer.Start( - trace.ContextWithRemoteSpanContext(ctx, trace.SpanContextFromContext(ctx)), - name, - startOpts..., - ) - defer span.End() - - err := handler(srv, wrapServerStream(ctx, ss, cfg)) - if err != nil { - s, _ := status.FromError(err) - statusCode, msg := serverStatus(s) - span.SetStatus(statusCode, msg) - span.SetAttributes(statusCodeAttr(s.Code())) - } else { - span.SetAttributes(statusCodeAttr(grpc_codes.OK)) - } - - return err - } -} - // telemetryAttributes returns a span name and span and metric attributes from // the gRPC method and peer address. -func telemetryAttributes(fullMethod, sererAddr string) (string, []attribute.KeyValue) { +func telemetryAttributes(fullMethod, serverAddr string) (string, []attribute.KeyValue) { name, methodAttrs := internal.ParseFullMethod(fullMethod) - srvAttrs := serverAddrAttrs(sererAddr) + srvAttrs := serverAddrAttrs(serverAddr) attrs := make([]attribute.KeyValue, 0, 1+len(methodAttrs)+len(srvAttrs)) attrs = append(attrs, semconv.RPCSystemGRPC) @@ -333,15 +225,6 @@ func serverAddrAttrs(hostport string) []attribute.KeyValue { } } -// peerFromCtx returns a peer address from a context, if one exists. -func peerFromCtx(ctx context.Context) string { - p, ok := peer.FromContext(ctx) - if !ok { - return "" - } - return p.Addr.String() -} - // statusCodeAttr returns status code attribute based on given gRPC code. func statusCodeAttr(c grpc_codes.Code) attribute.KeyValue { return semconv.RPCGRPCStatusCodeKey.Int64(int64(c)) diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/internal/parse.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/internal/parse.go index 1fa73c2f94..9b98644fe2 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/internal/parse.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/internal/parse.go @@ -8,7 +8,7 @@ import ( "strings" "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.30.0" + semconv "go.opentelemetry.io/otel/semconv/v1.34.0" ) // ParseFullMethod returns a span name following the OpenTelemetry semantic diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go index 9bec51df33..17404c8d77 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go @@ -17,8 +17,8 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/noop" - semconv "go.opentelemetry.io/otel/semconv/v1.30.0" + semconv "go.opentelemetry.io/otel/semconv/v1.34.0" + "go.opentelemetry.io/otel/semconv/v1.34.0/rpcconv" "go.opentelemetry.io/otel/trace" "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/internal" @@ -38,11 +38,11 @@ type serverHandler struct { tracer trace.Tracer - duration metric.Float64Histogram - inSize metric.Int64Histogram - outSize metric.Int64Histogram - inMsg metric.Int64Histogram - outMsg metric.Int64Histogram + duration rpcconv.ServerDuration + inSize rpcconv.ServerRequestSize + outSize rpcconv.ServerResponseSize + inMsg rpcconv.ServerRequestsPerRPC + outMsg rpcconv.ServerResponsesPerRPC } // NewServerHandler creates a stats.Handler for a gRPC server. @@ -62,64 +62,29 @@ func NewServerHandler(opts ...Option) stats.Handler { ) var err error - h.duration, err = meter.Float64Histogram( - semconv.RPCServerDurationName, - metric.WithDescription(semconv.RPCServerDurationDescription), - metric.WithUnit(semconv.RPCServerDurationUnit), - ) + h.duration, err = rpcconv.NewServerDuration(meter) if err != nil { otel.Handle(err) - if h.duration == nil { - h.duration = noop.Float64Histogram{} - } } - h.inSize, err = meter.Int64Histogram( - semconv.RPCServerRequestSizeName, - metric.WithDescription(semconv.RPCServerRequestSizeDescription), - metric.WithUnit(semconv.RPCServerRequestSizeUnit), - ) + h.inSize, err = rpcconv.NewServerRequestSize(meter) if err != nil { otel.Handle(err) - if h.inSize == nil { - h.inSize = noop.Int64Histogram{} - } } - h.outSize, err = meter.Int64Histogram( - semconv.RPCServerResponseSizeName, - metric.WithDescription(semconv.RPCServerResponseSizeDescription), - metric.WithUnit(semconv.RPCServerResponseSizeUnit), - ) + h.outSize, err = rpcconv.NewServerResponseSize(meter) if err != nil { otel.Handle(err) - if h.outSize == nil { - h.outSize = noop.Int64Histogram{} - } } - h.inMsg, err = meter.Int64Histogram( - semconv.RPCServerRequestsPerRPCName, - metric.WithDescription(semconv.RPCServerRequestsPerRPCDescription), - metric.WithUnit(semconv.RPCServerRequestsPerRPCUnit), - ) + h.inMsg, err = rpcconv.NewServerRequestsPerRPC(meter) if err != nil { otel.Handle(err) - if h.inMsg == nil { - h.inMsg = noop.Int64Histogram{} - } } - h.outMsg, err = meter.Int64Histogram( - semconv.RPCServerResponsesPerRPCName, - metric.WithDescription(semconv.RPCServerResponsesPerRPCDescription), - metric.WithUnit(semconv.RPCServerResponsesPerRPCUnit), - ) + h.outMsg, err = rpcconv.NewServerResponsesPerRPC(meter) if err != nil { otel.Handle(err) - if h.outMsg == nil { - h.outMsg = noop.Int64Histogram{} - } } return h @@ -147,11 +112,21 @@ func (h *serverHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) cont } if record { + opts := []trace.SpanStartOption{ + trace.WithSpanKind(trace.SpanKindServer), + trace.WithAttributes(append(attrs, h.SpanAttributes...)...), + } + if h.PublicEndpoint || (h.PublicEndpointFn != nil && h.PublicEndpointFn(ctx, info)) { + opts = append(opts, trace.WithNewRoot()) + // Linking incoming span context if any for public endpoint. + if s := trace.SpanContextFromContext(ctx); s.IsValid() && s.IsRemote() { + opts = append(opts, trace.WithLinks(trace.Link{SpanContext: s})) + } + } ctx, _ = h.tracer.Start( trace.ContextWithRemoteSpanContext(ctx, trace.SpanContextFromContext(ctx)), name, - trace.WithSpanKind(trace.SpanKindServer), - trace.WithAttributes(append(attrs, h.SpanAttributes...)...), + opts..., ) } @@ -165,7 +140,16 @@ func (h *serverHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) cont // HandleRPC processes the RPC stats. func (h *serverHandler) HandleRPC(ctx context.Context, rs stats.RPCStats) { - h.handleRPC(ctx, rs, h.duration, h.inSize, h.outSize, h.inMsg, h.outMsg, serverStatus) + h.handleRPC( + ctx, + rs, + h.duration.Inst(), + h.inSize, + h.outSize, + h.inMsg.Inst(), + h.outMsg.Inst(), + serverStatus, + ) } type clientHandler struct { @@ -173,11 +157,11 @@ type clientHandler struct { tracer trace.Tracer - duration metric.Float64Histogram - inSize metric.Int64Histogram - outSize metric.Int64Histogram - inMsg metric.Int64Histogram - outMsg metric.Int64Histogram + duration rpcconv.ClientDuration + inSize rpcconv.ClientResponseSize + outSize rpcconv.ClientRequestSize + inMsg rpcconv.ClientResponsesPerRPC + outMsg rpcconv.ClientRequestsPerRPC } // NewClientHandler creates a stats.Handler for a gRPC client. @@ -197,64 +181,29 @@ func NewClientHandler(opts ...Option) stats.Handler { ) var err error - h.duration, err = meter.Float64Histogram( - semconv.RPCClientDurationName, - metric.WithDescription(semconv.RPCClientDurationDescription), - metric.WithUnit(semconv.RPCClientDurationUnit), - ) + h.duration, err = rpcconv.NewClientDuration(meter) if err != nil { otel.Handle(err) - if h.duration == nil { - h.duration = noop.Float64Histogram{} - } } - h.outSize, err = meter.Int64Histogram( - semconv.RPCClientRequestSizeName, - metric.WithDescription(semconv.RPCClientRequestSizeDescription), - metric.WithUnit(semconv.RPCClientRequestSizeUnit), - ) + h.inSize, err = rpcconv.NewClientResponseSize(meter) if err != nil { otel.Handle(err) - if h.outSize == nil { - h.outSize = noop.Int64Histogram{} - } } - h.inSize, err = meter.Int64Histogram( - semconv.RPCClientResponseSizeName, - metric.WithDescription(semconv.RPCClientResponseSizeDescription), - metric.WithUnit(semconv.RPCClientResponseSizeUnit), - ) + h.outSize, err = rpcconv.NewClientRequestSize(meter) if err != nil { otel.Handle(err) - if h.inSize == nil { - h.inSize = noop.Int64Histogram{} - } } - h.outMsg, err = meter.Int64Histogram( - semconv.RPCClientRequestsPerRPCName, - metric.WithDescription(semconv.RPCClientRequestsPerRPCDescription), - metric.WithUnit(semconv.RPCClientRequestsPerRPCUnit), - ) + h.inMsg, err = rpcconv.NewClientResponsesPerRPC(meter) if err != nil { otel.Handle(err) - if h.outMsg == nil { - h.outMsg = noop.Int64Histogram{} - } } - h.inMsg, err = meter.Int64Histogram( - semconv.RPCClientResponsesPerRPCName, - metric.WithDescription(semconv.RPCClientResponsesPerRPCDescription), - metric.WithUnit(semconv.RPCClientResponsesPerRPCUnit), - ) + h.outMsg, err = rpcconv.NewClientRequestsPerRPC(meter) if err != nil { otel.Handle(err) - if h.inMsg == nil { - h.inMsg = noop.Int64Histogram{} - } } return h @@ -290,7 +239,13 @@ func (h *clientHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) cont // HandleRPC processes the RPC stats. func (h *clientHandler) HandleRPC(ctx context.Context, rs stats.RPCStats) { h.handleRPC( - ctx, rs, h.duration, h.inSize, h.outSize, h.inMsg, h.outMsg, + ctx, + rs, + h.duration.Inst(), + h.inSize, + h.outSize, + h.inMsg.Inst(), + h.outMsg.Inst(), func(s *status.Status) (codes.Code, string) { return codes.Error, s.Message() }, @@ -307,11 +262,16 @@ func (h *clientHandler) HandleConn(context.Context, stats.ConnStats) { // no-op } +type int64Hist interface { + Record(context.Context, int64, ...attribute.KeyValue) +} + func (c *config) handleRPC( ctx context.Context, rs stats.RPCStats, duration metric.Float64Histogram, - inSize, outSize, inMsg, outMsg metric.Int64Histogram, + inSize, outSize int64Hist, + inMsg, outMsg metric.Int64Histogram, recordStatus func(*status.Status) (codes.Code, string), ) { gctx, _ := ctx.Value(gRPCContextKey{}).(*gRPCContext) @@ -327,7 +287,7 @@ func (c *config) handleRPC( case *stats.InPayload: if gctx != nil { messageId = atomic.AddInt64(&gctx.inMessages, 1) - inSize.Record(ctx, int64(rs.Length), metric.WithAttributes(gctx.metricAttrs...)) + inSize.Record(ctx, int64(rs.Length), gctx.metricAttrs...) } if c.ReceivedEvent && span.IsRecording() { @@ -343,7 +303,7 @@ func (c *config) handleRPC( case *stats.OutPayload: if gctx != nil { messageId = atomic.AddInt64(&gctx.outMessages, 1) - outSize.Record(ctx, int64(rs.Length), metric.WithAttributes(gctx.metricAttrs...)) + outSize.Record(ctx, int64(rs.Length), gctx.metricAttrs...) } if c.SentEvent && span.IsRecording() { diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/version.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/version.go index b1feeca494..8849d79b81 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/version.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/version.go @@ -5,6 +5,6 @@ package otelgrpc // import "go.opentelemetry.io/contrib/instrumentation/google.g // Version is the current release version of the gRPC instrumentation. func Version() string { - return "0.61.0" + return "0.62.0" // This string is updated by the pre_release.sh script during release } diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/env.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/env.go index 7cb9693d98..7edc8d10ff 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/env.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/env.go @@ -17,6 +17,7 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/semconv/v1.34.0/httpconv" ) // OTelSemConvStabilityOptIn is an environment variable. @@ -40,9 +41,9 @@ type HTTPServer struct { serverLatencyMeasure metric.Float64Histogram // New metrics - requestBodySizeHistogram metric.Int64Histogram - responseBodySizeHistogram metric.Int64Histogram - requestDurationHistogram metric.Float64Histogram + requestBodySizeHistogram httpconv.ServerRequestBodySize + responseBodySizeHistogram httpconv.ServerResponseBodySize + requestDurationHistogram httpconv.ServerRequestDuration } // RequestTraceAttrs returns trace attributes for an HTTP request received by a @@ -146,17 +147,15 @@ var ( ) func (s HTTPServer) RecordMetrics(ctx context.Context, md ServerMetricData) { - if s.requestDurationHistogram != nil && s.requestBodySizeHistogram != nil && s.responseBodySizeHistogram != nil { - attributes := CurrentHTTPServer{}.MetricAttributes(md.ServerName, md.Req, md.StatusCode, md.AdditionalAttributes) - o := metric.WithAttributeSet(attribute.NewSet(attributes...)) - recordOpts := metricRecordOptionPool.Get().(*[]metric.RecordOption) - *recordOpts = append(*recordOpts, o) - s.requestBodySizeHistogram.Record(ctx, md.RequestSize, *recordOpts...) - s.responseBodySizeHistogram.Record(ctx, md.ResponseSize, *recordOpts...) - s.requestDurationHistogram.Record(ctx, md.ElapsedTime/1000.0, o) - *recordOpts = (*recordOpts)[:0] - metricRecordOptionPool.Put(recordOpts) - } + attributes := CurrentHTTPServer{}.MetricAttributes(md.ServerName, md.Req, md.StatusCode, md.AdditionalAttributes) + o := metric.WithAttributeSet(attribute.NewSet(attributes...)) + recordOpts := metricRecordOptionPool.Get().(*[]metric.RecordOption) + *recordOpts = append(*recordOpts, o) + s.requestBodySizeHistogram.Inst().Record(ctx, md.RequestSize, *recordOpts...) + s.responseBodySizeHistogram.Inst().Record(ctx, md.ResponseSize, *recordOpts...) + s.requestDurationHistogram.Inst().Record(ctx, md.ElapsedTime/1000.0, o) + *recordOpts = (*recordOpts)[:0] + metricRecordOptionPool.Put(recordOpts) if s.duplicate && s.requestBytesCounter != nil && s.responseBytesCounter != nil && s.serverLatencyMeasure != nil { attributes := OldHTTPServer{}.MetricAttributes(md.ServerName, md.Req, md.StatusCode, md.AdditionalAttributes) @@ -188,7 +187,23 @@ func NewHTTPServer(meter metric.Meter) HTTPServer { server := HTTPServer{ duplicate: duplicate, } - server.requestBodySizeHistogram, server.responseBodySizeHistogram, server.requestDurationHistogram = CurrentHTTPServer{}.createMeasures(meter) + + var err error + server.requestBodySizeHistogram, err = httpconv.NewServerRequestBodySize(meter) + handleErr(err) + + server.responseBodySizeHistogram, err = httpconv.NewServerResponseBodySize(meter) + handleErr(err) + + server.requestDurationHistogram, err = httpconv.NewServerRequestDuration( + meter, + metric.WithExplicitBucketBoundaries( + 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, + 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10, + ), + ) + handleErr(err) + if duplicate { server.requestBytesCounter, server.responseBytesCounter, server.serverLatencyMeasure = OldHTTPServer{}.createMeasures(meter) } @@ -204,8 +219,8 @@ type HTTPClient struct { latencyMeasure metric.Float64Histogram // new metrics - requestBodySize metric.Int64Histogram - requestDuration metric.Float64Histogram + requestBodySize httpconv.ClientRequestBodySize + requestDuration httpconv.ClientRequestDuration } func NewHTTPClient(meter metric.Meter) HTTPClient { @@ -214,7 +229,17 @@ func NewHTTPClient(meter metric.Meter) HTTPClient { client := HTTPClient{ duplicate: duplicate, } - client.requestBodySize, client.requestDuration = CurrentHTTPClient{}.createMeasures(meter) + + var err error + client.requestBodySize, err = httpconv.NewClientRequestBodySize(meter) + handleErr(err) + + client.requestDuration, err = httpconv.NewClientRequestDuration( + meter, + metric.WithExplicitBucketBoundaries(0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10), + ) + handleErr(err) + if duplicate { client.requestBytesCounter, client.responseBytesCounter, client.latencyMeasure = OldHTTPClient{}.createMeasures(meter) } @@ -290,13 +315,8 @@ func (c HTTPClient) MetricOptions(ma MetricAttributes) map[string]MetricOpts { } func (s HTTPClient) RecordMetrics(ctx context.Context, md MetricData, opts map[string]MetricOpts) { - if s.requestBodySize == nil || s.requestDuration == nil { - // This will happen if an HTTPClient{} is used instead of NewHTTPClient(). - return - } - - s.requestBodySize.Record(ctx, md.RequestSize, opts["new"].MeasurementOption()) - s.requestDuration.Record(ctx, md.ElapsedTime/1000, opts["new"].MeasurementOption()) + s.requestBodySize.Inst().Record(ctx, md.RequestSize, opts["new"].MeasurementOption()) + s.requestDuration.Inst().Record(ctx, md.ElapsedTime/1000, opts["new"].MeasurementOption()) if s.duplicate { s.requestBytesCounter.Add(ctx, md.RequestSize, opts["old"].AddOptions()) diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/gen.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/gen.go index f2cf8a152d..b4036dd906 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/gen.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/gen.go @@ -5,10 +5,12 @@ package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/ // Generate semconv package: //go:generate gotmpl --body=../../../../../../internal/shared/semconv/bench_test.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=bench_test.go +//go:generate gotmpl --body=../../../../../../internal/shared/semconv/common_test.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=common_test.go //go:generate gotmpl --body=../../../../../../internal/shared/semconv/env.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=env.go //go:generate gotmpl --body=../../../../../../internal/shared/semconv/env_test.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=env_test.go //go:generate gotmpl --body=../../../../../../internal/shared/semconv/httpconv.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=httpconv.go //go:generate gotmpl --body=../../../../../../internal/shared/semconv/httpconv_test.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=httpconv_test.go +//go:generate gotmpl --body=../../../../../../internal/shared/semconv/httpconvtest_test.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=httpconvtest_test.go //go:generate gotmpl --body=../../../../../../internal/shared/semconv/util.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=util.go //go:generate gotmpl --body=../../../../../../internal/shared/semconv/util_test.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=util_test.go //go:generate gotmpl --body=../../../../../../internal/shared/semconv/v1.20.0.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=v1.20.0.go diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/httpconv.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/httpconv.go index 53976b0d5a..9766f3ac85 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/httpconv.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/httpconv.go @@ -17,9 +17,7 @@ import ( "strings" "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/noop" - semconvNew "go.opentelemetry.io/otel/semconv/v1.26.0" + semconvNew "go.opentelemetry.io/otel/semconv/v1.34.0" ) type RequestTraceAttrsOpts struct { @@ -247,36 +245,6 @@ func (n CurrentHTTPServer) Route(route string) attribute.KeyValue { return semconvNew.HTTPRoute(route) } -func (n CurrentHTTPServer) createMeasures(meter metric.Meter) (metric.Int64Histogram, metric.Int64Histogram, metric.Float64Histogram) { - if meter == nil { - return noop.Int64Histogram{}, noop.Int64Histogram{}, noop.Float64Histogram{} - } - - var err error - requestBodySizeHistogram, err := meter.Int64Histogram( - semconvNew.HTTPServerRequestBodySizeName, - metric.WithUnit(semconvNew.HTTPServerRequestBodySizeUnit), - metric.WithDescription(semconvNew.HTTPServerRequestBodySizeDescription), - ) - handleErr(err) - - responseBodySizeHistogram, err := meter.Int64Histogram( - semconvNew.HTTPServerResponseBodySizeName, - metric.WithUnit(semconvNew.HTTPServerResponseBodySizeUnit), - metric.WithDescription(semconvNew.HTTPServerResponseBodySizeDescription), - ) - handleErr(err) - requestDurationHistogram, err := meter.Float64Histogram( - semconvNew.HTTPServerRequestDurationName, - metric.WithUnit(semconvNew.HTTPServerRequestDurationUnit), - metric.WithDescription(semconvNew.HTTPServerRequestDurationDescription), - metric.WithExplicitBucketBoundaries(0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10), - ) - handleErr(err) - - return requestBodySizeHistogram, responseBodySizeHistogram, requestDurationHistogram -} - func (n CurrentHTTPServer) MetricAttributes(server string, req *http.Request, statusCode int, additionalAttributes []attribute.KeyValue) []attribute.KeyValue { num := len(additionalAttributes) + 3 var host string @@ -472,30 +440,6 @@ func (n CurrentHTTPClient) method(method string) (attribute.KeyValue, attribute. return semconvNew.HTTPRequestMethodGet, orig } -func (n CurrentHTTPClient) createMeasures(meter metric.Meter) (metric.Int64Histogram, metric.Float64Histogram) { - if meter == nil { - return noop.Int64Histogram{}, noop.Float64Histogram{} - } - - var err error - requestBodySize, err := meter.Int64Histogram( - semconvNew.HTTPClientRequestBodySizeName, - metric.WithUnit(semconvNew.HTTPClientRequestBodySizeUnit), - metric.WithDescription(semconvNew.HTTPClientRequestBodySizeDescription), - ) - handleErr(err) - - requestDuration, err := meter.Float64Histogram( - semconvNew.HTTPClientRequestDurationName, - metric.WithUnit(semconvNew.HTTPClientRequestDurationUnit), - metric.WithDescription(semconvNew.HTTPClientRequestDurationDescription), - metric.WithExplicitBucketBoundaries(0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10), - ) - handleErr(err) - - return requestBodySize, requestDuration -} - func (n CurrentHTTPClient) MetricAttributes(req *http.Request, statusCode int, additionalAttributes []attribute.KeyValue) []attribute.KeyValue { num := len(additionalAttributes) + 2 var h string diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/util.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/util.go index bc1f7751db..e4ebf85814 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/util.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/util.go @@ -14,7 +14,7 @@ import ( "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" - semconvNew "go.opentelemetry.io/otel/semconv/v1.26.0" + semconvNew "go.opentelemetry.io/otel/semconv/v1.34.0" ) // SplitHostPort splits a network address hostport of the form "host", diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go index 44b86ad860..e4c02a4296 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go @@ -129,6 +129,41 @@ func (t *Transport) RoundTrip(r *http.Request) (*http.Response, error) { t.propagators.Inject(ctx, propagation.HeaderCarrier(r.Header)) res, err := t.rt.RoundTrip(r) + + // Defer metrics recording function to record the metrics on error or no error. + defer func() { + metricAttributes := semconv.MetricAttributes{ + Req: r, + AdditionalAttributes: append(labeler.Get(), t.metricAttributesFromRequest(r)...), + } + + if err == nil { + metricAttributes.StatusCode = res.StatusCode + } + + metricOpts := t.semconv.MetricOptions(metricAttributes) + + metricData := semconv.MetricData{ + RequestSize: bw.BytesRead(), + } + + if err == nil { + // For handling response bytes we leverage a callback when the client reads the http response + readRecordFunc := func(n int64) { + t.semconv.RecordResponseSize(ctx, n, metricOpts) + } + + res.Body = newWrappedBody(span, readRecordFunc, res.Body) + } + + // Use floating point division here for higher precision (instead of Millisecond method). + elapsedTime := float64(time.Since(requestStartTime)) / float64(time.Millisecond) + + metricData.ElapsedTime = elapsedTime + + t.semconv.RecordMetrics(ctx, metricData, metricOpts) + }() + if err != nil { // set error type attribute if the error is part of the predefined // error types. @@ -141,35 +176,14 @@ func (t *Transport) RoundTrip(r *http.Request) (*http.Response, error) { span.SetStatus(codes.Error, err.Error()) span.End() - return res, err - } - // metrics - metricOpts := t.semconv.MetricOptions(semconv.MetricAttributes{ - Req: r, - StatusCode: res.StatusCode, - AdditionalAttributes: append(labeler.Get(), t.metricAttributesFromRequest(r)...), - }) - - // For handling response bytes we leverage a callback when the client reads the http response - readRecordFunc := func(n int64) { - t.semconv.RecordResponseSize(ctx, n, metricOpts) + return res, err } // traces span.SetAttributes(t.semconv.ResponseTraceAttrs(res)...) span.SetStatus(t.semconv.Status(res.StatusCode)) - res.Body = newWrappedBody(span, readRecordFunc, res.Body) - - // Use floating point division here for higher precision (instead of Millisecond method). - elapsedTime := float64(time.Since(requestStartTime)) / float64(time.Millisecond) - - t.semconv.RecordMetrics(ctx, semconv.MetricData{ - RequestSize: bw.BytesRead(), - ElapsedTime: elapsedTime, - }, metricOpts) - return res, nil } diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go index 6be4c1fde2..2fe5a13618 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go @@ -5,6 +5,6 @@ package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http // Version is the current release version of the otelhttp instrumentation. func Version() string { - return "0.61.0" + return "0.62.0" // This string is updated by the pre_release.sh script during release } diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.30.0/MIGRATION.md b/vendor/go.opentelemetry.io/otel/semconv/v1.30.0/MIGRATION.md deleted file mode 100644 index 8a11ea28d3..0000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.30.0/MIGRATION.md +++ /dev/null @@ -1,155 +0,0 @@ -# Semantic Convention Changes - -The `go.opentelemetry.io/otel/semconv/v1.30.0` should be a drop-in replacement for `go.opentelemetry.io/otel/semconv/v1.28.0` with the following exceptions. - -Note: `go.opentelemetry.io/otel/semconv/v1.29.0` does not exist due to bugs from the upstream [OpenTelemetry Semantic Conventions]. - -## Dropped deprecations - -The following declarations have been deprecated in the [OpenTelemetry Semantic Conventions]. -Refer to the respective documentation in that repository for deprecation instructions for each type. - -- `CodeColumn` -- `CodeColumnKey` -- `CodeFunction` -- `CodeFunctionKey` -- `DBCassandraConsistencyLevelAll` -- `DBCassandraConsistencyLevelAny` -- `DBCassandraConsistencyLevelEachQuorum` -- `DBCassandraConsistencyLevelKey` -- `DBCassandraConsistencyLevelLocalOne` -- `DBCassandraConsistencyLevelLocalQuorum` -- `DBCassandraConsistencyLevelLocalSerial` -- `DBCassandraConsistencyLevelOne` -- `DBCassandraConsistencyLevelQuorum` -- `DBCassandraConsistencyLevelSerial` -- `DBCassandraConsistencyLevelThree` -- `DBCassandraConsistencyLevelTwo` -- `DBCassandraCoordinatorDC` -- `DBCassandraCoordinatorDCKey` -- `DBCassandraCoordinatorID` -- `DBCassandraCoordinatorIDKey` -- `DBCassandraIdempotence` -- `DBCassandraIdempotenceKey` -- `DBCassandraPageSize` -- `DBCassandraPageSizeKey` -- `DBCassandraSpeculativeExecutionCount` -- `DBCassandraSpeculativeExecutionCountKey` -- `DBCosmosDBClientID` -- `DBCosmosDBClientIDKey` -- `DBCosmosDBConnectionModeDirect` -- `DBCosmosDBConnectionModeGateway` -- `DBCosmosDBConnectionModeKey` -- `DBCosmosDBOperationTypeBatch` -- `DBCosmosDBOperationTypeCreate` -- `DBCosmosDBOperationTypeDelete` -- `DBCosmosDBOperationTypeExecute` -- `DBCosmosDBOperationTypeExecuteJavascript` -- `DBCosmosDBOperationTypeHead` -- `DBCosmosDBOperationTypeHeadFeed` -- `DBCosmosDBOperationTypeInvalid` -- `DBCosmosDBOperationTypeKey` -- `DBCosmosDBOperationTypePatch` -- `DBCosmosDBOperationTypeQuery` -- `DBCosmosDBOperationTypeQueryPlan` -- `DBCosmosDBOperationTypeRead` -- `DBCosmosDBOperationTypeReadFeed` -- `DBCosmosDBOperationTypeReplace` -- `DBCosmosDBOperationTypeUpsert` -- `DBCosmosDBRequestCharge` -- `DBCosmosDBRequestChargeKey` -- `DBCosmosDBRequestContentLength` -- `DBCosmosDBRequestContentLengthKey` -- `DBCosmosDBSubStatusCode` -- `DBCosmosDBSubStatusCodeKey` -- `DBElasticsearchNodeName` -- `DBElasticsearchNodeNameKey` -- `DBSystemAdabas` -- `DBSystemCache` -- `DBSystemCassandra` -- `DBSystemClickhouse` -- `DBSystemCloudscape` -- `DBSystemCockroachdb` -- `DBSystemColdfusion` -- `DBSystemCosmosDB` -- `DBSystemCouchDB` -- `DBSystemCouchbase` -- `DBSystemDb2` -- `DBSystemDerby` -- `DBSystemDynamoDB` -- `DBSystemEDB` -- `DBSystemElasticsearch` -- `DBSystemFilemaker` -- `DBSystemFirebird` -- `DBSystemFirstSQL` -- `DBSystemGeode` -- `DBSystemH2` -- `DBSystemHBase` -- `DBSystemHSQLDB` -- `DBSystemHanaDB` -- `DBSystemHive` -- `DBSystemInfluxdb` -- `DBSystemInformix` -- `DBSystemIngres` -- `DBSystemInstantDB` -- `DBSystemInterbase` -- `DBSystemIntersystemsCache` -- `DBSystemKey` -- `DBSystemMSSQL` -- `DBSystemMariaDB` -- `DBSystemMaxDB` -- `DBSystemMemcached` -- `DBSystemMongoDB` -- `DBSystemMssqlcompact` -- `DBSystemMySQL` -- `DBSystemNeo4j` -- `DBSystemNetezza` -- `DBSystemOpensearch` -- `DBSystemOracle` -- `DBSystemOtherSQL` -- `DBSystemPervasive` -- `DBSystemPointbase` -- `DBSystemPostgreSQL` -- `DBSystemProgress` -- `DBSystemRedis` -- `DBSystemRedshift` -- `DBSystemSpanner` -- `DBSystemSqlite` -- `DBSystemSybase` -- `DBSystemTeradata` -- `DBSystemTrino` -- `DBSystemVertica` -- `EventName` -- `EventNameKey` -- `ExceptionEscaped` -- `ExceptionEscapedKey` -- `GenAIOpenaiRequestSeed` -- `GenAIOpenaiRequestSeedKey` -- `ProcessExecutableBuildIDProfiling` -- `ProcessExecutableBuildIDProfilingKey` -- `SystemNetworkStateClose` -- `SystemNetworkStateCloseWait` -- `SystemNetworkStateClosing` -- `SystemNetworkStateDelete` -- `SystemNetworkStateEstablished` -- `SystemNetworkStateFinWait1` -- `SystemNetworkStateFinWait2` -- `SystemNetworkStateKey` -- `SystemNetworkStateLastAck` -- `SystemNetworkStateListen` -- `SystemNetworkStateSynRecv` -- `SystemNetworkStateSynSent` -- `SystemNetworkStateTimeWait` -- `VCSRepositoryChangeID` -- `VCSRepositoryChangeIDKey` -- `VCSRepositoryChangeTitle` -- `VCSRepositoryChangeTitleKey` -- `VCSRepositoryRefName` -- `VCSRepositoryRefNameKey` -- `VCSRepositoryRefRevision` -- `VCSRepositoryRefRevisionKey` -- `VCSRepositoryRefTypeBranch` -- `VCSRepositoryRefTypeKey` -- `VCSRepositoryRefTypeTag` - -[OpenTelemetry Semantic Conventions]: https://github.com/open-telemetry/semantic-conventions diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.30.0/README.md b/vendor/go.opentelemetry.io/otel/semconv/v1.30.0/README.md deleted file mode 100644 index 072ea6928f..0000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.30.0/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Semconv v1.30.0 - -[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/semconv/v1.30.0)](https://pkg.go.dev/go.opentelemetry.io/otel/semconv/v1.30.0) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.30.0/metric.go b/vendor/go.opentelemetry.io/otel/semconv/v1.30.0/metric.go deleted file mode 100644 index fe6beb91dd..0000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.30.0/metric.go +++ /dev/null @@ -1,1750 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated from semantic convention specification. DO NOT EDIT. - -package semconv // import "go.opentelemetry.io/otel/semconv/v1.30.0" - -const ( - // AzureCosmosDBClientActiveInstanceCount is the metric conforming to the - // "azure.cosmosdb.client.active_instance.count" semantic conventions. It - // represents the number of active client instances. - // Instrument: updowncounter - // Unit: {instance} - // Stability: development - AzureCosmosDBClientActiveInstanceCountName = "azure.cosmosdb.client.active_instance.count" - AzureCosmosDBClientActiveInstanceCountUnit = "{instance}" - AzureCosmosDBClientActiveInstanceCountDescription = "Number of active client instances" - // AzureCosmosDBClientOperationRequestCharge is the metric conforming to the - // "azure.cosmosdb.client.operation.request_charge" semantic conventions. It - // represents the [Request units] consumed by the operation. - // - // [Request units]: https://learn.microsoft.com/azure/cosmos-db/request-units - // Instrument: histogram - // Unit: {request_unit} - // Stability: development - AzureCosmosDBClientOperationRequestChargeName = "azure.cosmosdb.client.operation.request_charge" - AzureCosmosDBClientOperationRequestChargeUnit = "{request_unit}" - AzureCosmosDBClientOperationRequestChargeDescription = "[Request units](https://learn.microsoft.com/azure/cosmos-db/request-units) consumed by the operation" - // CICDPipelineRunActive is the metric conforming to the - // "cicd.pipeline.run.active" semantic conventions. It represents the number of - // pipeline runs currently active in the system by state. - // Instrument: updowncounter - // Unit: {run} - // Stability: development - CICDPipelineRunActiveName = "cicd.pipeline.run.active" - CICDPipelineRunActiveUnit = "{run}" - CICDPipelineRunActiveDescription = "The number of pipeline runs currently active in the system by state." - // CICDPipelineRunDuration is the metric conforming to the - // "cicd.pipeline.run.duration" semantic conventions. It represents the - // duration of a pipeline run grouped by pipeline, state and result. - // Instrument: histogram - // Unit: s - // Stability: development - CICDPipelineRunDurationName = "cicd.pipeline.run.duration" - CICDPipelineRunDurationUnit = "s" - CICDPipelineRunDurationDescription = "Duration of a pipeline run grouped by pipeline, state and result." - // CICDPipelineRunErrors is the metric conforming to the - // "cicd.pipeline.run.errors" semantic conventions. It represents the number of - // errors encountered in pipeline runs (eg. compile, test failures). - // Instrument: counter - // Unit: {error} - // Stability: development - CICDPipelineRunErrorsName = "cicd.pipeline.run.errors" - CICDPipelineRunErrorsUnit = "{error}" - CICDPipelineRunErrorsDescription = "The number of errors encountered in pipeline runs (eg. compile, test failures)." - // CICDSystemErrors is the metric conforming to the "cicd.system.errors" - // semantic conventions. It represents the number of errors in a component of - // the CICD system (eg. controller, scheduler, agent). - // Instrument: counter - // Unit: {error} - // Stability: development - CICDSystemErrorsName = "cicd.system.errors" - CICDSystemErrorsUnit = "{error}" - CICDSystemErrorsDescription = "The number of errors in a component of the CICD system (eg. controller, scheduler, agent)." - // CICDWorkerCount is the metric conforming to the "cicd.worker.count" semantic - // conventions. It represents the number of workers on the CICD system by - // state. - // Instrument: updowncounter - // Unit: {count} - // Stability: development - CICDWorkerCountName = "cicd.worker.count" - CICDWorkerCountUnit = "{count}" - CICDWorkerCountDescription = "The number of workers on the CICD system by state." - // ContainerCPUTime is the metric conforming to the "container.cpu.time" - // semantic conventions. It represents the total CPU time consumed. - // Instrument: counter - // Unit: s - // Stability: development - ContainerCPUTimeName = "container.cpu.time" - ContainerCPUTimeUnit = "s" - ContainerCPUTimeDescription = "Total CPU time consumed" - // ContainerCPUUsage is the metric conforming to the "container.cpu.usage" - // semantic conventions. It represents the container's CPU usage, measured in - // cpus. Range from 0 to the number of allocatable CPUs. - // Instrument: gauge - // Unit: {cpu} - // Stability: development - ContainerCPUUsageName = "container.cpu.usage" - ContainerCPUUsageUnit = "{cpu}" - ContainerCPUUsageDescription = "Container's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs" - // ContainerDiskIo is the metric conforming to the "container.disk.io" semantic - // conventions. It represents the disk bytes for the container. - // Instrument: counter - // Unit: By - // Stability: development - ContainerDiskIoName = "container.disk.io" - ContainerDiskIoUnit = "By" - ContainerDiskIoDescription = "Disk bytes for the container." - // ContainerMemoryUsage is the metric conforming to the - // "container.memory.usage" semantic conventions. It represents the memory - // usage of the container. - // Instrument: counter - // Unit: By - // Stability: development - ContainerMemoryUsageName = "container.memory.usage" - ContainerMemoryUsageUnit = "By" - ContainerMemoryUsageDescription = "Memory usage of the container." - // ContainerNetworkIo is the metric conforming to the "container.network.io" - // semantic conventions. It represents the network bytes for the container. - // Instrument: counter - // Unit: By - // Stability: development - ContainerNetworkIoName = "container.network.io" - ContainerNetworkIoUnit = "By" - ContainerNetworkIoDescription = "Network bytes for the container." - // ContainerUptime is the metric conforming to the "container.uptime" semantic - // conventions. It represents the time the container has been running. - // Instrument: gauge - // Unit: s - // Stability: development - ContainerUptimeName = "container.uptime" - ContainerUptimeUnit = "s" - ContainerUptimeDescription = "The time the container has been running" - // DBClientConnectionCount is the metric conforming to the - // "db.client.connection.count" semantic conventions. It represents the number - // of connections that are currently in state described by the `state` - // attribute. - // Instrument: updowncounter - // Unit: {connection} - // Stability: development - DBClientConnectionCountName = "db.client.connection.count" - DBClientConnectionCountUnit = "{connection}" - DBClientConnectionCountDescription = "The number of connections that are currently in state described by the `state` attribute" - // DBClientConnectionCreateTime is the metric conforming to the - // "db.client.connection.create_time" semantic conventions. It represents the - // time it took to create a new connection. - // Instrument: histogram - // Unit: s - // Stability: development - DBClientConnectionCreateTimeName = "db.client.connection.create_time" - DBClientConnectionCreateTimeUnit = "s" - DBClientConnectionCreateTimeDescription = "The time it took to create a new connection" - // DBClientConnectionIdleMax is the metric conforming to the - // "db.client.connection.idle.max" semantic conventions. It represents the - // maximum number of idle open connections allowed. - // Instrument: updowncounter - // Unit: {connection} - // Stability: development - DBClientConnectionIdleMaxName = "db.client.connection.idle.max" - DBClientConnectionIdleMaxUnit = "{connection}" - DBClientConnectionIdleMaxDescription = "The maximum number of idle open connections allowed" - // DBClientConnectionIdleMin is the metric conforming to the - // "db.client.connection.idle.min" semantic conventions. It represents the - // minimum number of idle open connections allowed. - // Instrument: updowncounter - // Unit: {connection} - // Stability: development - DBClientConnectionIdleMinName = "db.client.connection.idle.min" - DBClientConnectionIdleMinUnit = "{connection}" - DBClientConnectionIdleMinDescription = "The minimum number of idle open connections allowed" - // DBClientConnectionMax is the metric conforming to the - // "db.client.connection.max" semantic conventions. It represents the maximum - // number of open connections allowed. - // Instrument: updowncounter - // Unit: {connection} - // Stability: development - DBClientConnectionMaxName = "db.client.connection.max" - DBClientConnectionMaxUnit = "{connection}" - DBClientConnectionMaxDescription = "The maximum number of open connections allowed" - // DBClientConnectionPendingRequests is the metric conforming to the - // "db.client.connection.pending_requests" semantic conventions. It represents - // the number of current pending requests for an open connection. - // Instrument: updowncounter - // Unit: {request} - // Stability: development - DBClientConnectionPendingRequestsName = "db.client.connection.pending_requests" - DBClientConnectionPendingRequestsUnit = "{request}" - DBClientConnectionPendingRequestsDescription = "The number of current pending requests for an open connection" - // DBClientConnectionTimeouts is the metric conforming to the - // "db.client.connection.timeouts" semantic conventions. It represents the - // number of connection timeouts that have occurred trying to obtain a - // connection from the pool. - // Instrument: counter - // Unit: {timeout} - // Stability: development - DBClientConnectionTimeoutsName = "db.client.connection.timeouts" - DBClientConnectionTimeoutsUnit = "{timeout}" - DBClientConnectionTimeoutsDescription = "The number of connection timeouts that have occurred trying to obtain a connection from the pool" - // DBClientConnectionUseTime is the metric conforming to the - // "db.client.connection.use_time" semantic conventions. It represents the time - // between borrowing a connection and returning it to the pool. - // Instrument: histogram - // Unit: s - // Stability: development - DBClientConnectionUseTimeName = "db.client.connection.use_time" - DBClientConnectionUseTimeUnit = "s" - DBClientConnectionUseTimeDescription = "The time between borrowing a connection and returning it to the pool" - // DBClientConnectionWaitTime is the metric conforming to the - // "db.client.connection.wait_time" semantic conventions. It represents the - // time it took to obtain an open connection from the pool. - // Instrument: histogram - // Unit: s - // Stability: development - DBClientConnectionWaitTimeName = "db.client.connection.wait_time" - DBClientConnectionWaitTimeUnit = "s" - DBClientConnectionWaitTimeDescription = "The time it took to obtain an open connection from the pool" - // DBClientConnectionsCreateTime is the metric conforming to the - // "db.client.connections.create_time" semantic conventions. It represents the - // deprecated, use `db.client.connection.create_time` instead. Note: the unit - // also changed from `ms` to `s`. - // Instrument: histogram - // Unit: ms - // Stability: development - // Deprecated: Replaced by `db.client.connection.create_time`. Note: the unit also changed from `ms` to `s`. - DBClientConnectionsCreateTimeName = "db.client.connections.create_time" - DBClientConnectionsCreateTimeUnit = "ms" - DBClientConnectionsCreateTimeDescription = "Deprecated, use `db.client.connection.create_time` instead. Note: the unit also changed from `ms` to `s`." - // DBClientConnectionsIdleMax is the metric conforming to the - // "db.client.connections.idle.max" semantic conventions. It represents the - // deprecated, use `db.client.connection.idle.max` instead. - // Instrument: updowncounter - // Unit: {connection} - // Stability: development - // Deprecated: Replaced by `db.client.connection.idle.max`. - DBClientConnectionsIdleMaxName = "db.client.connections.idle.max" - DBClientConnectionsIdleMaxUnit = "{connection}" - DBClientConnectionsIdleMaxDescription = "Deprecated, use `db.client.connection.idle.max` instead." - // DBClientConnectionsIdleMin is the metric conforming to the - // "db.client.connections.idle.min" semantic conventions. It represents the - // deprecated, use `db.client.connection.idle.min` instead. - // Instrument: updowncounter - // Unit: {connection} - // Stability: development - // Deprecated: Replaced by `db.client.connection.idle.min`. - DBClientConnectionsIdleMinName = "db.client.connections.idle.min" - DBClientConnectionsIdleMinUnit = "{connection}" - DBClientConnectionsIdleMinDescription = "Deprecated, use `db.client.connection.idle.min` instead." - // DBClientConnectionsMax is the metric conforming to the - // "db.client.connections.max" semantic conventions. It represents the - // deprecated, use `db.client.connection.max` instead. - // Instrument: updowncounter - // Unit: {connection} - // Stability: development - // Deprecated: Replaced by `db.client.connection.max`. - DBClientConnectionsMaxName = "db.client.connections.max" - DBClientConnectionsMaxUnit = "{connection}" - DBClientConnectionsMaxDescription = "Deprecated, use `db.client.connection.max` instead." - // DBClientConnectionsPendingRequests is the metric conforming to the - // "db.client.connections.pending_requests" semantic conventions. It represents - // the deprecated, use `db.client.connection.pending_requests` instead. - // Instrument: updowncounter - // Unit: {request} - // Stability: development - // Deprecated: Replaced by `db.client.connection.pending_requests`. - DBClientConnectionsPendingRequestsName = "db.client.connections.pending_requests" - DBClientConnectionsPendingRequestsUnit = "{request}" - DBClientConnectionsPendingRequestsDescription = "Deprecated, use `db.client.connection.pending_requests` instead." - // DBClientConnectionsTimeouts is the metric conforming to the - // "db.client.connections.timeouts" semantic conventions. It represents the - // deprecated, use `db.client.connection.timeouts` instead. - // Instrument: counter - // Unit: {timeout} - // Stability: development - // Deprecated: Replaced by `db.client.connection.timeouts`. - DBClientConnectionsTimeoutsName = "db.client.connections.timeouts" - DBClientConnectionsTimeoutsUnit = "{timeout}" - DBClientConnectionsTimeoutsDescription = "Deprecated, use `db.client.connection.timeouts` instead." - // DBClientConnectionsUsage is the metric conforming to the - // "db.client.connections.usage" semantic conventions. It represents the - // deprecated, use `db.client.connection.count` instead. - // Instrument: updowncounter - // Unit: {connection} - // Stability: development - // Deprecated: Replaced by `db.client.connection.count`. - DBClientConnectionsUsageName = "db.client.connections.usage" - DBClientConnectionsUsageUnit = "{connection}" - DBClientConnectionsUsageDescription = "Deprecated, use `db.client.connection.count` instead." - // DBClientConnectionsUseTime is the metric conforming to the - // "db.client.connections.use_time" semantic conventions. It represents the - // deprecated, use `db.client.connection.use_time` instead. Note: the unit also - // changed from `ms` to `s`. - // Instrument: histogram - // Unit: ms - // Stability: development - // Deprecated: Replaced by `db.client.connection.use_time`. Note: the unit also changed from `ms` to `s`. - DBClientConnectionsUseTimeName = "db.client.connections.use_time" - DBClientConnectionsUseTimeUnit = "ms" - DBClientConnectionsUseTimeDescription = "Deprecated, use `db.client.connection.use_time` instead. Note: the unit also changed from `ms` to `s`." - // DBClientConnectionsWaitTime is the metric conforming to the - // "db.client.connections.wait_time" semantic conventions. It represents the - // deprecated, use `db.client.connection.wait_time` instead. Note: the unit - // also changed from `ms` to `s`. - // Instrument: histogram - // Unit: ms - // Stability: development - // Deprecated: Replaced by `db.client.connection.wait_time`. Note: the unit also changed from `ms` to `s`. - DBClientConnectionsWaitTimeName = "db.client.connections.wait_time" - DBClientConnectionsWaitTimeUnit = "ms" - DBClientConnectionsWaitTimeDescription = "Deprecated, use `db.client.connection.wait_time` instead. Note: the unit also changed from `ms` to `s`." - // DBClientCosmosDBActiveInstanceCount is the metric conforming to the - // "db.client.cosmosdb.active_instance.count" semantic conventions. It - // represents the deprecated, use `azure.cosmosdb.client.active_instance.count` - // instead. - // Instrument: updowncounter - // Unit: {instance} - // Stability: development - // Deprecated: Replaced by `azure.cosmosdb.client.active_instance.count`. - DBClientCosmosDBActiveInstanceCountName = "db.client.cosmosdb.active_instance.count" - DBClientCosmosDBActiveInstanceCountUnit = "{instance}" - DBClientCosmosDBActiveInstanceCountDescription = "Deprecated, use `azure.cosmosdb.client.active_instance.count` instead." - // DBClientCosmosDBOperationRequestCharge is the metric conforming to the - // "db.client.cosmosdb.operation.request_charge" semantic conventions. It - // represents the deprecated, use - // `azure.cosmosdb.client.operation.request_charge` instead. - // Instrument: histogram - // Unit: {request_unit} - // Stability: development - // Deprecated: Replaced by `azure.cosmosdb.client.operation.request_charge`. - DBClientCosmosDBOperationRequestChargeName = "db.client.cosmosdb.operation.request_charge" - DBClientCosmosDBOperationRequestChargeUnit = "{request_unit}" - DBClientCosmosDBOperationRequestChargeDescription = "Deprecated, use `azure.cosmosdb.client.operation.request_charge` instead." - // DBClientOperationDuration is the metric conforming to the - // "db.client.operation.duration" semantic conventions. It represents the - // duration of database client operations. - // Instrument: histogram - // Unit: s - // Stability: release_candidate - DBClientOperationDurationName = "db.client.operation.duration" - DBClientOperationDurationUnit = "s" - DBClientOperationDurationDescription = "Duration of database client operations." - // DBClientResponseReturnedRows is the metric conforming to the - // "db.client.response.returned_rows" semantic conventions. It represents the - // actual number of records returned by the database operation. - // Instrument: histogram - // Unit: {row} - // Stability: development - DBClientResponseReturnedRowsName = "db.client.response.returned_rows" - DBClientResponseReturnedRowsUnit = "{row}" - DBClientResponseReturnedRowsDescription = "The actual number of records returned by the database operation." - // DNSLookupDuration is the metric conforming to the "dns.lookup.duration" - // semantic conventions. It represents the measures the time taken to perform a - // DNS lookup. - // Instrument: histogram - // Unit: s - // Stability: development - DNSLookupDurationName = "dns.lookup.duration" - DNSLookupDurationUnit = "s" - DNSLookupDurationDescription = "Measures the time taken to perform a DNS lookup." - // FaaSColdstarts is the metric conforming to the "faas.coldstarts" semantic - // conventions. It represents the number of invocation cold starts. - // Instrument: counter - // Unit: {coldstart} - // Stability: development - FaaSColdstartsName = "faas.coldstarts" - FaaSColdstartsUnit = "{coldstart}" - FaaSColdstartsDescription = "Number of invocation cold starts" - // FaaSCPUUsage is the metric conforming to the "faas.cpu_usage" semantic - // conventions. It represents the distribution of CPU usage per invocation. - // Instrument: histogram - // Unit: s - // Stability: development - FaaSCPUUsageName = "faas.cpu_usage" - FaaSCPUUsageUnit = "s" - FaaSCPUUsageDescription = "Distribution of CPU usage per invocation" - // FaaSErrors is the metric conforming to the "faas.errors" semantic - // conventions. It represents the number of invocation errors. - // Instrument: counter - // Unit: {error} - // Stability: development - FaaSErrorsName = "faas.errors" - FaaSErrorsUnit = "{error}" - FaaSErrorsDescription = "Number of invocation errors" - // FaaSInitDuration is the metric conforming to the "faas.init_duration" - // semantic conventions. It represents the measures the duration of the - // function's initialization, such as a cold start. - // Instrument: histogram - // Unit: s - // Stability: development - FaaSInitDurationName = "faas.init_duration" - FaaSInitDurationUnit = "s" - FaaSInitDurationDescription = "Measures the duration of the function's initialization, such as a cold start" - // FaaSInvocations is the metric conforming to the "faas.invocations" semantic - // conventions. It represents the number of successful invocations. - // Instrument: counter - // Unit: {invocation} - // Stability: development - FaaSInvocationsName = "faas.invocations" - FaaSInvocationsUnit = "{invocation}" - FaaSInvocationsDescription = "Number of successful invocations" - // FaaSInvokeDuration is the metric conforming to the "faas.invoke_duration" - // semantic conventions. It represents the measures the duration of the - // function's logic execution. - // Instrument: histogram - // Unit: s - // Stability: development - FaaSInvokeDurationName = "faas.invoke_duration" - FaaSInvokeDurationUnit = "s" - FaaSInvokeDurationDescription = "Measures the duration of the function's logic execution" - // FaaSMemUsage is the metric conforming to the "faas.mem_usage" semantic - // conventions. It represents the distribution of max memory usage per - // invocation. - // Instrument: histogram - // Unit: By - // Stability: development - FaaSMemUsageName = "faas.mem_usage" - FaaSMemUsageUnit = "By" - FaaSMemUsageDescription = "Distribution of max memory usage per invocation" - // FaaSNetIo is the metric conforming to the "faas.net_io" semantic - // conventions. It represents the distribution of net I/O usage per invocation. - // Instrument: histogram - // Unit: By - // Stability: development - FaaSNetIoName = "faas.net_io" - FaaSNetIoUnit = "By" - FaaSNetIoDescription = "Distribution of net I/O usage per invocation" - // FaaSTimeouts is the metric conforming to the "faas.timeouts" semantic - // conventions. It represents the number of invocation timeouts. - // Instrument: counter - // Unit: {timeout} - // Stability: development - FaaSTimeoutsName = "faas.timeouts" - FaaSTimeoutsUnit = "{timeout}" - FaaSTimeoutsDescription = "Number of invocation timeouts" - // GenAIClientOperationDuration is the metric conforming to the - // "gen_ai.client.operation.duration" semantic conventions. It represents the - // genAI operation duration. - // Instrument: histogram - // Unit: s - // Stability: development - GenAIClientOperationDurationName = "gen_ai.client.operation.duration" - GenAIClientOperationDurationUnit = "s" - GenAIClientOperationDurationDescription = "GenAI operation duration" - // GenAIClientTokenUsage is the metric conforming to the - // "gen_ai.client.token.usage" semantic conventions. It represents the measures - // number of input and output tokens used. - // Instrument: histogram - // Unit: {token} - // Stability: development - GenAIClientTokenUsageName = "gen_ai.client.token.usage" - GenAIClientTokenUsageUnit = "{token}" - GenAIClientTokenUsageDescription = "Measures number of input and output tokens used" - // GenAIServerRequestDuration is the metric conforming to the - // "gen_ai.server.request.duration" semantic conventions. It represents the - // generative AI server request duration such as time-to-last byte or last - // output token. - // Instrument: histogram - // Unit: s - // Stability: development - GenAIServerRequestDurationName = "gen_ai.server.request.duration" - GenAIServerRequestDurationUnit = "s" - GenAIServerRequestDurationDescription = "Generative AI server request duration such as time-to-last byte or last output token" - // GenAIServerTimePerOutputToken is the metric conforming to the - // "gen_ai.server.time_per_output_token" semantic conventions. It represents - // the time per output token generated after the first token for successful - // responses. - // Instrument: histogram - // Unit: s - // Stability: development - GenAIServerTimePerOutputTokenName = "gen_ai.server.time_per_output_token" - GenAIServerTimePerOutputTokenUnit = "s" - GenAIServerTimePerOutputTokenDescription = "Time per output token generated after the first token for successful responses" - // GenAIServerTimeToFirstToken is the metric conforming to the - // "gen_ai.server.time_to_first_token" semantic conventions. It represents the - // time to generate first token for successful responses. - // Instrument: histogram - // Unit: s - // Stability: development - GenAIServerTimeToFirstTokenName = "gen_ai.server.time_to_first_token" - GenAIServerTimeToFirstTokenUnit = "s" - GenAIServerTimeToFirstTokenDescription = "Time to generate first token for successful responses" - // GoConfigGogc is the metric conforming to the "go.config.gogc" semantic - // conventions. It represents the heap size target percentage configured by the - // user, otherwise 100. - // Instrument: updowncounter - // Unit: % - // Stability: development - GoConfigGogcName = "go.config.gogc" - GoConfigGogcUnit = "%" - GoConfigGogcDescription = "Heap size target percentage configured by the user, otherwise 100." - // GoGoroutineCount is the metric conforming to the "go.goroutine.count" - // semantic conventions. It represents the count of live goroutines. - // Instrument: updowncounter - // Unit: {goroutine} - // Stability: development - GoGoroutineCountName = "go.goroutine.count" - GoGoroutineCountUnit = "{goroutine}" - GoGoroutineCountDescription = "Count of live goroutines." - // GoMemoryAllocated is the metric conforming to the "go.memory.allocated" - // semantic conventions. It represents the memory allocated to the heap by the - // application. - // Instrument: counter - // Unit: By - // Stability: development - GoMemoryAllocatedName = "go.memory.allocated" - GoMemoryAllocatedUnit = "By" - GoMemoryAllocatedDescription = "Memory allocated to the heap by the application." - // GoMemoryAllocations is the metric conforming to the "go.memory.allocations" - // semantic conventions. It represents the count of allocations to the heap by - // the application. - // Instrument: counter - // Unit: {allocation} - // Stability: development - GoMemoryAllocationsName = "go.memory.allocations" - GoMemoryAllocationsUnit = "{allocation}" - GoMemoryAllocationsDescription = "Count of allocations to the heap by the application." - // GoMemoryGCGoal is the metric conforming to the "go.memory.gc.goal" semantic - // conventions. It represents the heap size target for the end of the GC cycle. - // Instrument: updowncounter - // Unit: By - // Stability: development - GoMemoryGCGoalName = "go.memory.gc.goal" - GoMemoryGCGoalUnit = "By" - GoMemoryGCGoalDescription = "Heap size target for the end of the GC cycle." - // GoMemoryLimit is the metric conforming to the "go.memory.limit" semantic - // conventions. It represents the go runtime memory limit configured by the - // user, if a limit exists. - // Instrument: updowncounter - // Unit: By - // Stability: development - GoMemoryLimitName = "go.memory.limit" - GoMemoryLimitUnit = "By" - GoMemoryLimitDescription = "Go runtime memory limit configured by the user, if a limit exists." - // GoMemoryUsed is the metric conforming to the "go.memory.used" semantic - // conventions. It represents the memory used by the Go runtime. - // Instrument: updowncounter - // Unit: By - // Stability: development - GoMemoryUsedName = "go.memory.used" - GoMemoryUsedUnit = "By" - GoMemoryUsedDescription = "Memory used by the Go runtime." - // GoProcessorLimit is the metric conforming to the "go.processor.limit" - // semantic conventions. It represents the number of OS threads that can - // execute user-level Go code simultaneously. - // Instrument: updowncounter - // Unit: {thread} - // Stability: development - GoProcessorLimitName = "go.processor.limit" - GoProcessorLimitUnit = "{thread}" - GoProcessorLimitDescription = "The number of OS threads that can execute user-level Go code simultaneously." - // GoScheduleDuration is the metric conforming to the "go.schedule.duration" - // semantic conventions. It represents the time goroutines have spent in the - // scheduler in a runnable state before actually running. - // Instrument: histogram - // Unit: s - // Stability: development - GoScheduleDurationName = "go.schedule.duration" - GoScheduleDurationUnit = "s" - GoScheduleDurationDescription = "The time goroutines have spent in the scheduler in a runnable state before actually running." - // HTTPClientActiveRequests is the metric conforming to the - // "http.client.active_requests" semantic conventions. It represents the number - // of active HTTP requests. - // Instrument: updowncounter - // Unit: {request} - // Stability: development - HTTPClientActiveRequestsName = "http.client.active_requests" - HTTPClientActiveRequestsUnit = "{request}" - HTTPClientActiveRequestsDescription = "Number of active HTTP requests." - // HTTPClientConnectionDuration is the metric conforming to the - // "http.client.connection.duration" semantic conventions. It represents the - // duration of the successfully established outbound HTTP connections. - // Instrument: histogram - // Unit: s - // Stability: development - HTTPClientConnectionDurationName = "http.client.connection.duration" - HTTPClientConnectionDurationUnit = "s" - HTTPClientConnectionDurationDescription = "The duration of the successfully established outbound HTTP connections." - // HTTPClientOpenConnections is the metric conforming to the - // "http.client.open_connections" semantic conventions. It represents the - // number of outbound HTTP connections that are currently active or idle on the - // client. - // Instrument: updowncounter - // Unit: {connection} - // Stability: development - HTTPClientOpenConnectionsName = "http.client.open_connections" - HTTPClientOpenConnectionsUnit = "{connection}" - HTTPClientOpenConnectionsDescription = "Number of outbound HTTP connections that are currently active or idle on the client." - // HTTPClientRequestBodySize is the metric conforming to the - // "http.client.request.body.size" semantic conventions. It represents the size - // of HTTP client request bodies. - // Instrument: histogram - // Unit: By - // Stability: development - HTTPClientRequestBodySizeName = "http.client.request.body.size" - HTTPClientRequestBodySizeUnit = "By" - HTTPClientRequestBodySizeDescription = "Size of HTTP client request bodies." - // HTTPClientRequestDuration is the metric conforming to the - // "http.client.request.duration" semantic conventions. It represents the - // duration of HTTP client requests. - // Instrument: histogram - // Unit: s - // Stability: stable - HTTPClientRequestDurationName = "http.client.request.duration" - HTTPClientRequestDurationUnit = "s" - HTTPClientRequestDurationDescription = "Duration of HTTP client requests." - // HTTPClientResponseBodySize is the metric conforming to the - // "http.client.response.body.size" semantic conventions. It represents the - // size of HTTP client response bodies. - // Instrument: histogram - // Unit: By - // Stability: development - HTTPClientResponseBodySizeName = "http.client.response.body.size" - HTTPClientResponseBodySizeUnit = "By" - HTTPClientResponseBodySizeDescription = "Size of HTTP client response bodies." - // HTTPServerActiveRequests is the metric conforming to the - // "http.server.active_requests" semantic conventions. It represents the number - // of active HTTP server requests. - // Instrument: updowncounter - // Unit: {request} - // Stability: development - HTTPServerActiveRequestsName = "http.server.active_requests" - HTTPServerActiveRequestsUnit = "{request}" - HTTPServerActiveRequestsDescription = "Number of active HTTP server requests." - // HTTPServerRequestBodySize is the metric conforming to the - // "http.server.request.body.size" semantic conventions. It represents the size - // of HTTP server request bodies. - // Instrument: histogram - // Unit: By - // Stability: development - HTTPServerRequestBodySizeName = "http.server.request.body.size" - HTTPServerRequestBodySizeUnit = "By" - HTTPServerRequestBodySizeDescription = "Size of HTTP server request bodies." - // HTTPServerRequestDuration is the metric conforming to the - // "http.server.request.duration" semantic conventions. It represents the - // duration of HTTP server requests. - // Instrument: histogram - // Unit: s - // Stability: stable - HTTPServerRequestDurationName = "http.server.request.duration" - HTTPServerRequestDurationUnit = "s" - HTTPServerRequestDurationDescription = "Duration of HTTP server requests." - // HTTPServerResponseBodySize is the metric conforming to the - // "http.server.response.body.size" semantic conventions. It represents the - // size of HTTP server response bodies. - // Instrument: histogram - // Unit: By - // Stability: development - HTTPServerResponseBodySizeName = "http.server.response.body.size" - HTTPServerResponseBodySizeUnit = "By" - HTTPServerResponseBodySizeDescription = "Size of HTTP server response bodies." - // HwEnergy is the metric conforming to the "hw.energy" semantic conventions. - // It represents the energy consumed by the component. - // Instrument: counter - // Unit: J - // Stability: development - HwEnergyName = "hw.energy" - HwEnergyUnit = "J" - HwEnergyDescription = "Energy consumed by the component" - // HwErrors is the metric conforming to the "hw.errors" semantic conventions. - // It represents the number of errors encountered by the component. - // Instrument: counter - // Unit: {error} - // Stability: development - HwErrorsName = "hw.errors" - HwErrorsUnit = "{error}" - HwErrorsDescription = "Number of errors encountered by the component" - // HwPower is the metric conforming to the "hw.power" semantic conventions. It - // represents the instantaneous power consumed by the component. - // Instrument: gauge - // Unit: W - // Stability: development - HwPowerName = "hw.power" - HwPowerUnit = "W" - HwPowerDescription = "Instantaneous power consumed by the component" - // HwStatus is the metric conforming to the "hw.status" semantic conventions. - // It represents the operational status: `1` (true) or `0` (false) for each of - // the possible states. - // Instrument: updowncounter - // Unit: 1 - // Stability: development - HwStatusName = "hw.status" - HwStatusUnit = "1" - HwStatusDescription = "Operational status: `1` (true) or `0` (false) for each of the possible states" - // K8SCronJobActiveJobs is the metric conforming to the - // "k8s.cronjob.active_jobs" semantic conventions. It represents the number of - // actively running jobs for a cronjob. - // Instrument: updowncounter - // Unit: {job} - // Stability: development - K8SCronJobActiveJobsName = "k8s.cronjob.active_jobs" - K8SCronJobActiveJobsUnit = "{job}" - K8SCronJobActiveJobsDescription = "The number of actively running jobs for a cronjob" - // K8SDaemonSetCurrentScheduledNodes is the metric conforming to the - // "k8s.daemonset.current_scheduled_nodes" semantic conventions. It represents - // the number of nodes that are running at least 1 daemon pod and are supposed - // to run the daemon pod. - // Instrument: updowncounter - // Unit: {node} - // Stability: development - K8SDaemonSetCurrentScheduledNodesName = "k8s.daemonset.current_scheduled_nodes" - K8SDaemonSetCurrentScheduledNodesUnit = "{node}" - K8SDaemonSetCurrentScheduledNodesDescription = "Number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod" - // K8SDaemonSetDesiredScheduledNodes is the metric conforming to the - // "k8s.daemonset.desired_scheduled_nodes" semantic conventions. It represents - // the number of nodes that should be running the daemon pod (including nodes - // currently running the daemon pod). - // Instrument: updowncounter - // Unit: {node} - // Stability: development - K8SDaemonSetDesiredScheduledNodesName = "k8s.daemonset.desired_scheduled_nodes" - K8SDaemonSetDesiredScheduledNodesUnit = "{node}" - K8SDaemonSetDesiredScheduledNodesDescription = "Number of nodes that should be running the daemon pod (including nodes currently running the daemon pod)" - // K8SDaemonSetMisscheduledNodes is the metric conforming to the - // "k8s.daemonset.misscheduled_nodes" semantic conventions. It represents the - // number of nodes that are running the daemon pod, but are not supposed to run - // the daemon pod. - // Instrument: updowncounter - // Unit: {node} - // Stability: development - K8SDaemonSetMisscheduledNodesName = "k8s.daemonset.misscheduled_nodes" - K8SDaemonSetMisscheduledNodesUnit = "{node}" - K8SDaemonSetMisscheduledNodesDescription = "Number of nodes that are running the daemon pod, but are not supposed to run the daemon pod" - // K8SDaemonSetReadyNodes is the metric conforming to the - // "k8s.daemonset.ready_nodes" semantic conventions. It represents the number - // of nodes that should be running the daemon pod and have one or more of the - // daemon pod running and ready. - // Instrument: updowncounter - // Unit: {node} - // Stability: development - K8SDaemonSetReadyNodesName = "k8s.daemonset.ready_nodes" - K8SDaemonSetReadyNodesUnit = "{node}" - K8SDaemonSetReadyNodesDescription = "Number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready" - // K8SDeploymentAvailablePods is the metric conforming to the - // "k8s.deployment.available_pods" semantic conventions. It represents the - // total number of available replica pods (ready for at least minReadySeconds) - // targeted by this deployment. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SDeploymentAvailablePodsName = "k8s.deployment.available_pods" - K8SDeploymentAvailablePodsUnit = "{pod}" - K8SDeploymentAvailablePodsDescription = "Total number of available replica pods (ready for at least minReadySeconds) targeted by this deployment" - // K8SDeploymentDesiredPods is the metric conforming to the - // "k8s.deployment.desired_pods" semantic conventions. It represents the number - // of desired replica pods in this deployment. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SDeploymentDesiredPodsName = "k8s.deployment.desired_pods" - K8SDeploymentDesiredPodsUnit = "{pod}" - K8SDeploymentDesiredPodsDescription = "Number of desired replica pods in this deployment" - // K8SHpaCurrentPods is the metric conforming to the "k8s.hpa.current_pods" - // semantic conventions. It represents the current number of replica pods - // managed by this horizontal pod autoscaler, as last seen by the autoscaler. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SHpaCurrentPodsName = "k8s.hpa.current_pods" - K8SHpaCurrentPodsUnit = "{pod}" - K8SHpaCurrentPodsDescription = "Current number of replica pods managed by this horizontal pod autoscaler, as last seen by the autoscaler" - // K8SHpaDesiredPods is the metric conforming to the "k8s.hpa.desired_pods" - // semantic conventions. It represents the desired number of replica pods - // managed by this horizontal pod autoscaler, as last calculated by the - // autoscaler. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SHpaDesiredPodsName = "k8s.hpa.desired_pods" - K8SHpaDesiredPodsUnit = "{pod}" - K8SHpaDesiredPodsDescription = "Desired number of replica pods managed by this horizontal pod autoscaler, as last calculated by the autoscaler" - // K8SHpaMaxPods is the metric conforming to the "k8s.hpa.max_pods" semantic - // conventions. It represents the upper limit for the number of replica pods to - // which the autoscaler can scale up. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SHpaMaxPodsName = "k8s.hpa.max_pods" - K8SHpaMaxPodsUnit = "{pod}" - K8SHpaMaxPodsDescription = "The upper limit for the number of replica pods to which the autoscaler can scale up" - // K8SHpaMinPods is the metric conforming to the "k8s.hpa.min_pods" semantic - // conventions. It represents the lower limit for the number of replica pods to - // which the autoscaler can scale down. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SHpaMinPodsName = "k8s.hpa.min_pods" - K8SHpaMinPodsUnit = "{pod}" - K8SHpaMinPodsDescription = "The lower limit for the number of replica pods to which the autoscaler can scale down" - // K8SJobActivePods is the metric conforming to the "k8s.job.active_pods" - // semantic conventions. It represents the number of pending and actively - // running pods for a job. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SJobActivePodsName = "k8s.job.active_pods" - K8SJobActivePodsUnit = "{pod}" - K8SJobActivePodsDescription = "The number of pending and actively running pods for a job" - // K8SJobDesiredSuccessfulPods is the metric conforming to the - // "k8s.job.desired_successful_pods" semantic conventions. It represents the - // desired number of successfully finished pods the job should be run with. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SJobDesiredSuccessfulPodsName = "k8s.job.desired_successful_pods" - K8SJobDesiredSuccessfulPodsUnit = "{pod}" - K8SJobDesiredSuccessfulPodsDescription = "The desired number of successfully finished pods the job should be run with" - // K8SJobFailedPods is the metric conforming to the "k8s.job.failed_pods" - // semantic conventions. It represents the number of pods which reached phase - // Failed for a job. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SJobFailedPodsName = "k8s.job.failed_pods" - K8SJobFailedPodsUnit = "{pod}" - K8SJobFailedPodsDescription = "The number of pods which reached phase Failed for a job" - // K8SJobMaxParallelPods is the metric conforming to the - // "k8s.job.max_parallel_pods" semantic conventions. It represents the max - // desired number of pods the job should run at any given time. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SJobMaxParallelPodsName = "k8s.job.max_parallel_pods" - K8SJobMaxParallelPodsUnit = "{pod}" - K8SJobMaxParallelPodsDescription = "The max desired number of pods the job should run at any given time" - // K8SJobSuccessfulPods is the metric conforming to the - // "k8s.job.successful_pods" semantic conventions. It represents the number of - // pods which reached phase Succeeded for a job. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SJobSuccessfulPodsName = "k8s.job.successful_pods" - K8SJobSuccessfulPodsUnit = "{pod}" - K8SJobSuccessfulPodsDescription = "The number of pods which reached phase Succeeded for a job" - // K8SNamespacePhase is the metric conforming to the "k8s.namespace.phase" - // semantic conventions. It represents the describes number of K8s namespaces - // that are currently in a given phase. - // Instrument: updowncounter - // Unit: {namespace} - // Stability: development - K8SNamespacePhaseName = "k8s.namespace.phase" - K8SNamespacePhaseUnit = "{namespace}" - K8SNamespacePhaseDescription = "Describes number of K8s namespaces that are currently in a given phase." - // K8SNodeCPUTime is the metric conforming to the "k8s.node.cpu.time" semantic - // conventions. It represents the total CPU time consumed. - // Instrument: counter - // Unit: s - // Stability: development - K8SNodeCPUTimeName = "k8s.node.cpu.time" - K8SNodeCPUTimeUnit = "s" - K8SNodeCPUTimeDescription = "Total CPU time consumed" - // K8SNodeCPUUsage is the metric conforming to the "k8s.node.cpu.usage" - // semantic conventions. It represents the node's CPU usage, measured in cpus. - // Range from 0 to the number of allocatable CPUs. - // Instrument: gauge - // Unit: {cpu} - // Stability: development - K8SNodeCPUUsageName = "k8s.node.cpu.usage" - K8SNodeCPUUsageUnit = "{cpu}" - K8SNodeCPUUsageDescription = "Node's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs" - // K8SNodeMemoryUsage is the metric conforming to the "k8s.node.memory.usage" - // semantic conventions. It represents the memory usage of the Node. - // Instrument: gauge - // Unit: By - // Stability: development - K8SNodeMemoryUsageName = "k8s.node.memory.usage" - K8SNodeMemoryUsageUnit = "By" - K8SNodeMemoryUsageDescription = "Memory usage of the Node" - // K8SNodeNetworkErrors is the metric conforming to the - // "k8s.node.network.errors" semantic conventions. It represents the node - // network errors. - // Instrument: counter - // Unit: {error} - // Stability: development - K8SNodeNetworkErrorsName = "k8s.node.network.errors" - K8SNodeNetworkErrorsUnit = "{error}" - K8SNodeNetworkErrorsDescription = "Node network errors" - // K8SNodeNetworkIo is the metric conforming to the "k8s.node.network.io" - // semantic conventions. It represents the network bytes for the Node. - // Instrument: counter - // Unit: By - // Stability: development - K8SNodeNetworkIoName = "k8s.node.network.io" - K8SNodeNetworkIoUnit = "By" - K8SNodeNetworkIoDescription = "Network bytes for the Node" - // K8SNodeUptime is the metric conforming to the "k8s.node.uptime" semantic - // conventions. It represents the time the Node has been running. - // Instrument: gauge - // Unit: s - // Stability: development - K8SNodeUptimeName = "k8s.node.uptime" - K8SNodeUptimeUnit = "s" - K8SNodeUptimeDescription = "The time the Node has been running" - // K8SPodCPUTime is the metric conforming to the "k8s.pod.cpu.time" semantic - // conventions. It represents the total CPU time consumed. - // Instrument: counter - // Unit: s - // Stability: development - K8SPodCPUTimeName = "k8s.pod.cpu.time" - K8SPodCPUTimeUnit = "s" - K8SPodCPUTimeDescription = "Total CPU time consumed" - // K8SPodCPUUsage is the metric conforming to the "k8s.pod.cpu.usage" semantic - // conventions. It represents the pod's CPU usage, measured in cpus. Range from - // 0 to the number of allocatable CPUs. - // Instrument: gauge - // Unit: {cpu} - // Stability: development - K8SPodCPUUsageName = "k8s.pod.cpu.usage" - K8SPodCPUUsageUnit = "{cpu}" - K8SPodCPUUsageDescription = "Pod's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs" - // K8SPodMemoryUsage is the metric conforming to the "k8s.pod.memory.usage" - // semantic conventions. It represents the memory usage of the Pod. - // Instrument: gauge - // Unit: By - // Stability: development - K8SPodMemoryUsageName = "k8s.pod.memory.usage" - K8SPodMemoryUsageUnit = "By" - K8SPodMemoryUsageDescription = "Memory usage of the Pod" - // K8SPodNetworkErrors is the metric conforming to the "k8s.pod.network.errors" - // semantic conventions. It represents the pod network errors. - // Instrument: counter - // Unit: {error} - // Stability: development - K8SPodNetworkErrorsName = "k8s.pod.network.errors" - K8SPodNetworkErrorsUnit = "{error}" - K8SPodNetworkErrorsDescription = "Pod network errors" - // K8SPodNetworkIo is the metric conforming to the "k8s.pod.network.io" - // semantic conventions. It represents the network bytes for the Pod. - // Instrument: counter - // Unit: By - // Stability: development - K8SPodNetworkIoName = "k8s.pod.network.io" - K8SPodNetworkIoUnit = "By" - K8SPodNetworkIoDescription = "Network bytes for the Pod" - // K8SPodUptime is the metric conforming to the "k8s.pod.uptime" semantic - // conventions. It represents the time the Pod has been running. - // Instrument: gauge - // Unit: s - // Stability: development - K8SPodUptimeName = "k8s.pod.uptime" - K8SPodUptimeUnit = "s" - K8SPodUptimeDescription = "The time the Pod has been running" - // K8SReplicaSetAvailablePods is the metric conforming to the - // "k8s.replicaset.available_pods" semantic conventions. It represents the - // total number of available replica pods (ready for at least minReadySeconds) - // targeted by this replicaset. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SReplicaSetAvailablePodsName = "k8s.replicaset.available_pods" - K8SReplicaSetAvailablePodsUnit = "{pod}" - K8SReplicaSetAvailablePodsDescription = "Total number of available replica pods (ready for at least minReadySeconds) targeted by this replicaset" - // K8SReplicaSetDesiredPods is the metric conforming to the - // "k8s.replicaset.desired_pods" semantic conventions. It represents the number - // of desired replica pods in this replicaset. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SReplicaSetDesiredPodsName = "k8s.replicaset.desired_pods" - K8SReplicaSetDesiredPodsUnit = "{pod}" - K8SReplicaSetDesiredPodsDescription = "Number of desired replica pods in this replicaset" - // K8SReplicationControllerAvailablePods is the metric conforming to the - // "k8s.replication_controller.available_pods" semantic conventions. It - // represents the total number of available replica pods (ready for at least - // minReadySeconds) targeted by this replication controller. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SReplicationControllerAvailablePodsName = "k8s.replication_controller.available_pods" - K8SReplicationControllerAvailablePodsUnit = "{pod}" - K8SReplicationControllerAvailablePodsDescription = "Total number of available replica pods (ready for at least minReadySeconds) targeted by this replication controller" - // K8SReplicationControllerDesiredPods is the metric conforming to the - // "k8s.replication_controller.desired_pods" semantic conventions. It - // represents the number of desired replica pods in this replication - // controller. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SReplicationControllerDesiredPodsName = "k8s.replication_controller.desired_pods" - K8SReplicationControllerDesiredPodsUnit = "{pod}" - K8SReplicationControllerDesiredPodsDescription = "Number of desired replica pods in this replication controller" - // K8SStatefulSetCurrentPods is the metric conforming to the - // "k8s.statefulset.current_pods" semantic conventions. It represents the - // number of replica pods created by the statefulset controller from the - // statefulset version indicated by currentRevision. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SStatefulSetCurrentPodsName = "k8s.statefulset.current_pods" - K8SStatefulSetCurrentPodsUnit = "{pod}" - K8SStatefulSetCurrentPodsDescription = "The number of replica pods created by the statefulset controller from the statefulset version indicated by currentRevision" - // K8SStatefulSetDesiredPods is the metric conforming to the - // "k8s.statefulset.desired_pods" semantic conventions. It represents the - // number of desired replica pods in this statefulset. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SStatefulSetDesiredPodsName = "k8s.statefulset.desired_pods" - K8SStatefulSetDesiredPodsUnit = "{pod}" - K8SStatefulSetDesiredPodsDescription = "Number of desired replica pods in this statefulset" - // K8SStatefulSetReadyPods is the metric conforming to the - // "k8s.statefulset.ready_pods" semantic conventions. It represents the number - // of replica pods created for this statefulset with a Ready Condition. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SStatefulSetReadyPodsName = "k8s.statefulset.ready_pods" - K8SStatefulSetReadyPodsUnit = "{pod}" - K8SStatefulSetReadyPodsDescription = "The number of replica pods created for this statefulset with a Ready Condition" - // K8SStatefulSetUpdatedPods is the metric conforming to the - // "k8s.statefulset.updated_pods" semantic conventions. It represents the - // number of replica pods created by the statefulset controller from the - // statefulset version indicated by updateRevision. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SStatefulSetUpdatedPodsName = "k8s.statefulset.updated_pods" - K8SStatefulSetUpdatedPodsUnit = "{pod}" - K8SStatefulSetUpdatedPodsDescription = "Number of replica pods created by the statefulset controller from the statefulset version indicated by updateRevision" - // KestrelActiveConnections is the metric conforming to the - // "kestrel.active_connections" semantic conventions. It represents the number - // of connections that are currently active on the server. - // Instrument: updowncounter - // Unit: {connection} - // Stability: stable - KestrelActiveConnectionsName = "kestrel.active_connections" - KestrelActiveConnectionsUnit = "{connection}" - KestrelActiveConnectionsDescription = "Number of connections that are currently active on the server." - // KestrelActiveTLSHandshakes is the metric conforming to the - // "kestrel.active_tls_handshakes" semantic conventions. It represents the - // number of TLS handshakes that are currently in progress on the server. - // Instrument: updowncounter - // Unit: {handshake} - // Stability: stable - KestrelActiveTLSHandshakesName = "kestrel.active_tls_handshakes" - KestrelActiveTLSHandshakesUnit = "{handshake}" - KestrelActiveTLSHandshakesDescription = "Number of TLS handshakes that are currently in progress on the server." - // KestrelConnectionDuration is the metric conforming to the - // "kestrel.connection.duration" semantic conventions. It represents the - // duration of connections on the server. - // Instrument: histogram - // Unit: s - // Stability: stable - KestrelConnectionDurationName = "kestrel.connection.duration" - KestrelConnectionDurationUnit = "s" - KestrelConnectionDurationDescription = "The duration of connections on the server." - // KestrelQueuedConnections is the metric conforming to the - // "kestrel.queued_connections" semantic conventions. It represents the number - // of connections that are currently queued and are waiting to start. - // Instrument: updowncounter - // Unit: {connection} - // Stability: stable - KestrelQueuedConnectionsName = "kestrel.queued_connections" - KestrelQueuedConnectionsUnit = "{connection}" - KestrelQueuedConnectionsDescription = "Number of connections that are currently queued and are waiting to start." - // KestrelQueuedRequests is the metric conforming to the - // "kestrel.queued_requests" semantic conventions. It represents the number of - // HTTP requests on multiplexed connections (HTTP/2 and HTTP/3) that are - // currently queued and are waiting to start. - // Instrument: updowncounter - // Unit: {request} - // Stability: stable - KestrelQueuedRequestsName = "kestrel.queued_requests" - KestrelQueuedRequestsUnit = "{request}" - KestrelQueuedRequestsDescription = "Number of HTTP requests on multiplexed connections (HTTP/2 and HTTP/3) that are currently queued and are waiting to start." - // KestrelRejectedConnections is the metric conforming to the - // "kestrel.rejected_connections" semantic conventions. It represents the - // number of connections rejected by the server. - // Instrument: counter - // Unit: {connection} - // Stability: stable - KestrelRejectedConnectionsName = "kestrel.rejected_connections" - KestrelRejectedConnectionsUnit = "{connection}" - KestrelRejectedConnectionsDescription = "Number of connections rejected by the server." - // KestrelTLSHandshakeDuration is the metric conforming to the - // "kestrel.tls_handshake.duration" semantic conventions. It represents the - // duration of TLS handshakes on the server. - // Instrument: histogram - // Unit: s - // Stability: stable - KestrelTLSHandshakeDurationName = "kestrel.tls_handshake.duration" - KestrelTLSHandshakeDurationUnit = "s" - KestrelTLSHandshakeDurationDescription = "The duration of TLS handshakes on the server." - // KestrelUpgradedConnections is the metric conforming to the - // "kestrel.upgraded_connections" semantic conventions. It represents the - // number of connections that are currently upgraded (WebSockets). . - // Instrument: updowncounter - // Unit: {connection} - // Stability: stable - KestrelUpgradedConnectionsName = "kestrel.upgraded_connections" - KestrelUpgradedConnectionsUnit = "{connection}" - KestrelUpgradedConnectionsDescription = "Number of connections that are currently upgraded (WebSockets). ." - // MessagingClientConsumedMessages is the metric conforming to the - // "messaging.client.consumed.messages" semantic conventions. It represents the - // number of messages that were delivered to the application. - // Instrument: counter - // Unit: {message} - // Stability: development - MessagingClientConsumedMessagesName = "messaging.client.consumed.messages" - MessagingClientConsumedMessagesUnit = "{message}" - MessagingClientConsumedMessagesDescription = "Number of messages that were delivered to the application." - // MessagingClientOperationDuration is the metric conforming to the - // "messaging.client.operation.duration" semantic conventions. It represents - // the duration of messaging operation initiated by a producer or consumer - // client. - // Instrument: histogram - // Unit: s - // Stability: development - MessagingClientOperationDurationName = "messaging.client.operation.duration" - MessagingClientOperationDurationUnit = "s" - MessagingClientOperationDurationDescription = "Duration of messaging operation initiated by a producer or consumer client." - // MessagingClientPublishedMessages is the metric conforming to the - // "messaging.client.published.messages" semantic conventions. It represents - // the deprecated. Use `messaging.client.sent.messages` instead. - // Instrument: counter - // Unit: {message} - // Stability: development - // Deprecated: Replaced by `messaging.client.sent.messages`. - MessagingClientPublishedMessagesName = "messaging.client.published.messages" - MessagingClientPublishedMessagesUnit = "{message}" - MessagingClientPublishedMessagesDescription = "Deprecated. Use `messaging.client.sent.messages` instead." - // MessagingClientSentMessages is the metric conforming to the - // "messaging.client.sent.messages" semantic conventions. It represents the - // number of messages producer attempted to send to the broker. - // Instrument: counter - // Unit: {message} - // Stability: development - MessagingClientSentMessagesName = "messaging.client.sent.messages" - MessagingClientSentMessagesUnit = "{message}" - MessagingClientSentMessagesDescription = "Number of messages producer attempted to send to the broker." - // MessagingProcessDuration is the metric conforming to the - // "messaging.process.duration" semantic conventions. It represents the - // duration of processing operation. - // Instrument: histogram - // Unit: s - // Stability: development - MessagingProcessDurationName = "messaging.process.duration" - MessagingProcessDurationUnit = "s" - MessagingProcessDurationDescription = "Duration of processing operation." - // MessagingProcessMessages is the metric conforming to the - // "messaging.process.messages" semantic conventions. It represents the - // deprecated. Use `messaging.client.consumed.messages` instead. - // Instrument: counter - // Unit: {message} - // Stability: development - // Deprecated: Replaced by `messaging.client.consumed.messages`. - MessagingProcessMessagesName = "messaging.process.messages" - MessagingProcessMessagesUnit = "{message}" - MessagingProcessMessagesDescription = "Deprecated. Use `messaging.client.consumed.messages` instead." - // MessagingPublishDuration is the metric conforming to the - // "messaging.publish.duration" semantic conventions. It represents the - // deprecated. Use `messaging.client.operation.duration` instead. - // Instrument: histogram - // Unit: s - // Stability: development - // Deprecated: Replaced by `messaging.client.operation.duration`. - MessagingPublishDurationName = "messaging.publish.duration" - MessagingPublishDurationUnit = "s" - MessagingPublishDurationDescription = "Deprecated. Use `messaging.client.operation.duration` instead." - // MessagingPublishMessages is the metric conforming to the - // "messaging.publish.messages" semantic conventions. It represents the - // deprecated. Use `messaging.client.produced.messages` instead. - // Instrument: counter - // Unit: {message} - // Stability: development - // Deprecated: Replaced by `messaging.client.produced.messages`. - MessagingPublishMessagesName = "messaging.publish.messages" - MessagingPublishMessagesUnit = "{message}" - MessagingPublishMessagesDescription = "Deprecated. Use `messaging.client.produced.messages` instead." - // MessagingReceiveDuration is the metric conforming to the - // "messaging.receive.duration" semantic conventions. It represents the - // deprecated. Use `messaging.client.operation.duration` instead. - // Instrument: histogram - // Unit: s - // Stability: development - // Deprecated: Replaced by `messaging.client.operation.duration`. - MessagingReceiveDurationName = "messaging.receive.duration" - MessagingReceiveDurationUnit = "s" - MessagingReceiveDurationDescription = "Deprecated. Use `messaging.client.operation.duration` instead." - // MessagingReceiveMessages is the metric conforming to the - // "messaging.receive.messages" semantic conventions. It represents the - // deprecated. Use `messaging.client.consumed.messages` instead. - // Instrument: counter - // Unit: {message} - // Stability: development - // Deprecated: Replaced by `messaging.client.consumed.messages`. - MessagingReceiveMessagesName = "messaging.receive.messages" - MessagingReceiveMessagesUnit = "{message}" - MessagingReceiveMessagesDescription = "Deprecated. Use `messaging.client.consumed.messages` instead." - // ProcessContextSwitches is the metric conforming to the - // "process.context_switches" semantic conventions. It represents the number of - // times the process has been context switched. - // Instrument: counter - // Unit: {count} - // Stability: development - ProcessContextSwitchesName = "process.context_switches" - ProcessContextSwitchesUnit = "{count}" - ProcessContextSwitchesDescription = "Number of times the process has been context switched." - // ProcessCPUTime is the metric conforming to the "process.cpu.time" semantic - // conventions. It represents the total CPU seconds broken down by different - // states. - // Instrument: counter - // Unit: s - // Stability: development - ProcessCPUTimeName = "process.cpu.time" - ProcessCPUTimeUnit = "s" - ProcessCPUTimeDescription = "Total CPU seconds broken down by different states." - // ProcessCPUUtilization is the metric conforming to the - // "process.cpu.utilization" semantic conventions. It represents the difference - // in process.cpu.time since the last measurement, divided by the elapsed time - // and number of CPUs available to the process. - // Instrument: gauge - // Unit: 1 - // Stability: development - ProcessCPUUtilizationName = "process.cpu.utilization" - ProcessCPUUtilizationUnit = "1" - ProcessCPUUtilizationDescription = "Difference in process.cpu.time since the last measurement, divided by the elapsed time and number of CPUs available to the process." - // ProcessDiskIo is the metric conforming to the "process.disk.io" semantic - // conventions. It represents the disk bytes transferred. - // Instrument: counter - // Unit: By - // Stability: development - ProcessDiskIoName = "process.disk.io" - ProcessDiskIoUnit = "By" - ProcessDiskIoDescription = "Disk bytes transferred." - // ProcessMemoryUsage is the metric conforming to the "process.memory.usage" - // semantic conventions. It represents the amount of physical memory in use. - // Instrument: updowncounter - // Unit: By - // Stability: development - ProcessMemoryUsageName = "process.memory.usage" - ProcessMemoryUsageUnit = "By" - ProcessMemoryUsageDescription = "The amount of physical memory in use." - // ProcessMemoryVirtual is the metric conforming to the - // "process.memory.virtual" semantic conventions. It represents the amount of - // committed virtual memory. - // Instrument: updowncounter - // Unit: By - // Stability: development - ProcessMemoryVirtualName = "process.memory.virtual" - ProcessMemoryVirtualUnit = "By" - ProcessMemoryVirtualDescription = "The amount of committed virtual memory." - // ProcessNetworkIo is the metric conforming to the "process.network.io" - // semantic conventions. It represents the network bytes transferred. - // Instrument: counter - // Unit: By - // Stability: development - ProcessNetworkIoName = "process.network.io" - ProcessNetworkIoUnit = "By" - ProcessNetworkIoDescription = "Network bytes transferred." - // ProcessOpenFileDescriptorCount is the metric conforming to the - // "process.open_file_descriptor.count" semantic conventions. It represents the - // number of file descriptors in use by the process. - // Instrument: updowncounter - // Unit: {count} - // Stability: development - ProcessOpenFileDescriptorCountName = "process.open_file_descriptor.count" - ProcessOpenFileDescriptorCountUnit = "{count}" - ProcessOpenFileDescriptorCountDescription = "Number of file descriptors in use by the process." - // ProcessPagingFaults is the metric conforming to the "process.paging.faults" - // semantic conventions. It represents the number of page faults the process - // has made. - // Instrument: counter - // Unit: {fault} - // Stability: development - ProcessPagingFaultsName = "process.paging.faults" - ProcessPagingFaultsUnit = "{fault}" - ProcessPagingFaultsDescription = "Number of page faults the process has made." - // ProcessThreadCount is the metric conforming to the "process.thread.count" - // semantic conventions. It represents the process threads count. - // Instrument: updowncounter - // Unit: {thread} - // Stability: development - ProcessThreadCountName = "process.thread.count" - ProcessThreadCountUnit = "{thread}" - ProcessThreadCountDescription = "Process threads count." - // ProcessUptime is the metric conforming to the "process.uptime" semantic - // conventions. It represents the time the process has been running. - // Instrument: gauge - // Unit: s - // Stability: development - ProcessUptimeName = "process.uptime" - ProcessUptimeUnit = "s" - ProcessUptimeDescription = "The time the process has been running." - // RPCClientDuration is the metric conforming to the "rpc.client.duration" - // semantic conventions. It represents the measures the duration of outbound - // RPC. - // Instrument: histogram - // Unit: ms - // Stability: development - RPCClientDurationName = "rpc.client.duration" - RPCClientDurationUnit = "ms" - RPCClientDurationDescription = "Measures the duration of outbound RPC." - // RPCClientRequestSize is the metric conforming to the - // "rpc.client.request.size" semantic conventions. It represents the measures - // the size of RPC request messages (uncompressed). - // Instrument: histogram - // Unit: By - // Stability: development - RPCClientRequestSizeName = "rpc.client.request.size" - RPCClientRequestSizeUnit = "By" - RPCClientRequestSizeDescription = "Measures the size of RPC request messages (uncompressed)." - // RPCClientRequestsPerRPC is the metric conforming to the - // "rpc.client.requests_per_rpc" semantic conventions. It represents the - // measures the number of messages received per RPC. - // Instrument: histogram - // Unit: {count} - // Stability: development - RPCClientRequestsPerRPCName = "rpc.client.requests_per_rpc" - RPCClientRequestsPerRPCUnit = "{count}" - RPCClientRequestsPerRPCDescription = "Measures the number of messages received per RPC." - // RPCClientResponseSize is the metric conforming to the - // "rpc.client.response.size" semantic conventions. It represents the measures - // the size of RPC response messages (uncompressed). - // Instrument: histogram - // Unit: By - // Stability: development - RPCClientResponseSizeName = "rpc.client.response.size" - RPCClientResponseSizeUnit = "By" - RPCClientResponseSizeDescription = "Measures the size of RPC response messages (uncompressed)." - // RPCClientResponsesPerRPC is the metric conforming to the - // "rpc.client.responses_per_rpc" semantic conventions. It represents the - // measures the number of messages sent per RPC. - // Instrument: histogram - // Unit: {count} - // Stability: development - RPCClientResponsesPerRPCName = "rpc.client.responses_per_rpc" - RPCClientResponsesPerRPCUnit = "{count}" - RPCClientResponsesPerRPCDescription = "Measures the number of messages sent per RPC." - // RPCServerDuration is the metric conforming to the "rpc.server.duration" - // semantic conventions. It represents the measures the duration of inbound - // RPC. - // Instrument: histogram - // Unit: ms - // Stability: development - RPCServerDurationName = "rpc.server.duration" - RPCServerDurationUnit = "ms" - RPCServerDurationDescription = "Measures the duration of inbound RPC." - // RPCServerRequestSize is the metric conforming to the - // "rpc.server.request.size" semantic conventions. It represents the measures - // the size of RPC request messages (uncompressed). - // Instrument: histogram - // Unit: By - // Stability: development - RPCServerRequestSizeName = "rpc.server.request.size" - RPCServerRequestSizeUnit = "By" - RPCServerRequestSizeDescription = "Measures the size of RPC request messages (uncompressed)." - // RPCServerRequestsPerRPC is the metric conforming to the - // "rpc.server.requests_per_rpc" semantic conventions. It represents the - // measures the number of messages received per RPC. - // Instrument: histogram - // Unit: {count} - // Stability: development - RPCServerRequestsPerRPCName = "rpc.server.requests_per_rpc" - RPCServerRequestsPerRPCUnit = "{count}" - RPCServerRequestsPerRPCDescription = "Measures the number of messages received per RPC." - // RPCServerResponseSize is the metric conforming to the - // "rpc.server.response.size" semantic conventions. It represents the measures - // the size of RPC response messages (uncompressed). - // Instrument: histogram - // Unit: By - // Stability: development - RPCServerResponseSizeName = "rpc.server.response.size" - RPCServerResponseSizeUnit = "By" - RPCServerResponseSizeDescription = "Measures the size of RPC response messages (uncompressed)." - // RPCServerResponsesPerRPC is the metric conforming to the - // "rpc.server.responses_per_rpc" semantic conventions. It represents the - // measures the number of messages sent per RPC. - // Instrument: histogram - // Unit: {count} - // Stability: development - RPCServerResponsesPerRPCName = "rpc.server.responses_per_rpc" - RPCServerResponsesPerRPCUnit = "{count}" - RPCServerResponsesPerRPCDescription = "Measures the number of messages sent per RPC." - // SignalrServerActiveConnections is the metric conforming to the - // "signalr.server.active_connections" semantic conventions. It represents the - // number of connections that are currently active on the server. - // Instrument: updowncounter - // Unit: {connection} - // Stability: stable - SignalrServerActiveConnectionsName = "signalr.server.active_connections" - SignalrServerActiveConnectionsUnit = "{connection}" - SignalrServerActiveConnectionsDescription = "Number of connections that are currently active on the server." - // SignalrServerConnectionDuration is the metric conforming to the - // "signalr.server.connection.duration" semantic conventions. It represents the - // duration of connections on the server. - // Instrument: histogram - // Unit: s - // Stability: stable - SignalrServerConnectionDurationName = "signalr.server.connection.duration" - SignalrServerConnectionDurationUnit = "s" - SignalrServerConnectionDurationDescription = "The duration of connections on the server." - // SystemCPUFrequency is the metric conforming to the "system.cpu.frequency" - // semantic conventions. It represents the reports the current frequency of the - // CPU in Hz. - // Instrument: gauge - // Unit: {Hz} - // Stability: development - SystemCPUFrequencyName = "system.cpu.frequency" - SystemCPUFrequencyUnit = "{Hz}" - SystemCPUFrequencyDescription = "Reports the current frequency of the CPU in Hz" - // SystemCPULogicalCount is the metric conforming to the - // "system.cpu.logical.count" semantic conventions. It represents the reports - // the number of logical (virtual) processor cores created by the operating - // system to manage multitasking. - // Instrument: updowncounter - // Unit: {cpu} - // Stability: development - SystemCPULogicalCountName = "system.cpu.logical.count" - SystemCPULogicalCountUnit = "{cpu}" - SystemCPULogicalCountDescription = "Reports the number of logical (virtual) processor cores created by the operating system to manage multitasking" - // SystemCPUPhysicalCount is the metric conforming to the - // "system.cpu.physical.count" semantic conventions. It represents the reports - // the number of actual physical processor cores on the hardware. - // Instrument: updowncounter - // Unit: {cpu} - // Stability: development - SystemCPUPhysicalCountName = "system.cpu.physical.count" - SystemCPUPhysicalCountUnit = "{cpu}" - SystemCPUPhysicalCountDescription = "Reports the number of actual physical processor cores on the hardware" - // SystemCPUTime is the metric conforming to the "system.cpu.time" semantic - // conventions. It represents the seconds each logical CPU spent on each mode. - // Instrument: counter - // Unit: s - // Stability: development - SystemCPUTimeName = "system.cpu.time" - SystemCPUTimeUnit = "s" - SystemCPUTimeDescription = "Seconds each logical CPU spent on each mode" - // SystemCPUUtilization is the metric conforming to the - // "system.cpu.utilization" semantic conventions. It represents the difference - // in system.cpu.time since the last measurement, divided by the elapsed time - // and number of logical CPUs. - // Instrument: gauge - // Unit: 1 - // Stability: development - SystemCPUUtilizationName = "system.cpu.utilization" - SystemCPUUtilizationUnit = "1" - SystemCPUUtilizationDescription = "Difference in system.cpu.time since the last measurement, divided by the elapsed time and number of logical CPUs" - // SystemDiskIo is the metric conforming to the "system.disk.io" semantic - // conventions. - // Instrument: counter - // Unit: By - // Stability: development - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemDiskIoName = "system.disk.io" - SystemDiskIoUnit = "By" - // SystemDiskIoTime is the metric conforming to the "system.disk.io_time" - // semantic conventions. It represents the time disk spent activated. - // Instrument: counter - // Unit: s - // Stability: development - SystemDiskIoTimeName = "system.disk.io_time" - SystemDiskIoTimeUnit = "s" - SystemDiskIoTimeDescription = "Time disk spent activated" - // SystemDiskLimit is the metric conforming to the "system.disk.limit" semantic - // conventions. It represents the total storage capacity of the disk. - // Instrument: updowncounter - // Unit: By - // Stability: development - SystemDiskLimitName = "system.disk.limit" - SystemDiskLimitUnit = "By" - SystemDiskLimitDescription = "The total storage capacity of the disk" - // SystemDiskMerged is the metric conforming to the "system.disk.merged" - // semantic conventions. - // Instrument: counter - // Unit: {operation} - // Stability: development - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemDiskMergedName = "system.disk.merged" - SystemDiskMergedUnit = "{operation}" - // SystemDiskOperationTime is the metric conforming to the - // "system.disk.operation_time" semantic conventions. It represents the sum of - // the time each operation took to complete. - // Instrument: counter - // Unit: s - // Stability: development - SystemDiskOperationTimeName = "system.disk.operation_time" - SystemDiskOperationTimeUnit = "s" - SystemDiskOperationTimeDescription = "Sum of the time each operation took to complete" - // SystemDiskOperations is the metric conforming to the - // "system.disk.operations" semantic conventions. - // Instrument: counter - // Unit: {operation} - // Stability: development - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemDiskOperationsName = "system.disk.operations" - SystemDiskOperationsUnit = "{operation}" - // SystemFilesystemLimit is the metric conforming to the - // "system.filesystem.limit" semantic conventions. It represents the total - // storage capacity of the filesystem. - // Instrument: updowncounter - // Unit: By - // Stability: development - SystemFilesystemLimitName = "system.filesystem.limit" - SystemFilesystemLimitUnit = "By" - SystemFilesystemLimitDescription = "The total storage capacity of the filesystem" - // SystemFilesystemUsage is the metric conforming to the - // "system.filesystem.usage" semantic conventions. It represents the reports a - // filesystem's space usage across different states. - // Instrument: updowncounter - // Unit: By - // Stability: development - SystemFilesystemUsageName = "system.filesystem.usage" - SystemFilesystemUsageUnit = "By" - SystemFilesystemUsageDescription = "Reports a filesystem's space usage across different states." - // SystemFilesystemUtilization is the metric conforming to the - // "system.filesystem.utilization" semantic conventions. - // Instrument: gauge - // Unit: 1 - // Stability: development - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemFilesystemUtilizationName = "system.filesystem.utilization" - SystemFilesystemUtilizationUnit = "1" - // SystemLinuxMemoryAvailable is the metric conforming to the - // "system.linux.memory.available" semantic conventions. It represents an - // estimate of how much memory is available for starting new applications, - // without causing swapping. - // Instrument: updowncounter - // Unit: By - // Stability: development - SystemLinuxMemoryAvailableName = "system.linux.memory.available" - SystemLinuxMemoryAvailableUnit = "By" - SystemLinuxMemoryAvailableDescription = "An estimate of how much memory is available for starting new applications, without causing swapping" - // SystemLinuxMemorySlabUsage is the metric conforming to the - // "system.linux.memory.slab.usage" semantic conventions. It represents the - // reports the memory used by the Linux kernel for managing caches of - // frequently used objects. - // Instrument: updowncounter - // Unit: By - // Stability: development - SystemLinuxMemorySlabUsageName = "system.linux.memory.slab.usage" - SystemLinuxMemorySlabUsageUnit = "By" - SystemLinuxMemorySlabUsageDescription = "Reports the memory used by the Linux kernel for managing caches of frequently used objects." - // SystemMemoryLimit is the metric conforming to the "system.memory.limit" - // semantic conventions. It represents the total memory available in the - // system. - // Instrument: updowncounter - // Unit: By - // Stability: development - SystemMemoryLimitName = "system.memory.limit" - SystemMemoryLimitUnit = "By" - SystemMemoryLimitDescription = "Total memory available in the system." - // SystemMemoryShared is the metric conforming to the "system.memory.shared" - // semantic conventions. It represents the shared memory used (mostly by - // tmpfs). - // Instrument: updowncounter - // Unit: By - // Stability: development - SystemMemorySharedName = "system.memory.shared" - SystemMemorySharedUnit = "By" - SystemMemorySharedDescription = "Shared memory used (mostly by tmpfs)." - // SystemMemoryUsage is the metric conforming to the "system.memory.usage" - // semantic conventions. It represents the reports memory in use by state. - // Instrument: updowncounter - // Unit: By - // Stability: development - SystemMemoryUsageName = "system.memory.usage" - SystemMemoryUsageUnit = "By" - SystemMemoryUsageDescription = "Reports memory in use by state." - // SystemMemoryUtilization is the metric conforming to the - // "system.memory.utilization" semantic conventions. - // Instrument: gauge - // Unit: 1 - // Stability: development - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemMemoryUtilizationName = "system.memory.utilization" - SystemMemoryUtilizationUnit = "1" - // SystemNetworkConnections is the metric conforming to the - // "system.network.connections" semantic conventions. - // Instrument: updowncounter - // Unit: {connection} - // Stability: development - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemNetworkConnectionsName = "system.network.connections" - SystemNetworkConnectionsUnit = "{connection}" - // SystemNetworkDropped is the metric conforming to the - // "system.network.dropped" semantic conventions. It represents the count of - // packets that are dropped or discarded even though there was no error. - // Instrument: counter - // Unit: {packet} - // Stability: development - SystemNetworkDroppedName = "system.network.dropped" - SystemNetworkDroppedUnit = "{packet}" - SystemNetworkDroppedDescription = "Count of packets that are dropped or discarded even though there was no error" - // SystemNetworkErrors is the metric conforming to the "system.network.errors" - // semantic conventions. It represents the count of network errors detected. - // Instrument: counter - // Unit: {error} - // Stability: development - SystemNetworkErrorsName = "system.network.errors" - SystemNetworkErrorsUnit = "{error}" - SystemNetworkErrorsDescription = "Count of network errors detected" - // SystemNetworkIo is the metric conforming to the "system.network.io" semantic - // conventions. - // Instrument: counter - // Unit: By - // Stability: development - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemNetworkIoName = "system.network.io" - SystemNetworkIoUnit = "By" - // SystemNetworkPackets is the metric conforming to the - // "system.network.packets" semantic conventions. - // Instrument: counter - // Unit: {packet} - // Stability: development - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemNetworkPacketsName = "system.network.packets" - SystemNetworkPacketsUnit = "{packet}" - // SystemPagingFaults is the metric conforming to the "system.paging.faults" - // semantic conventions. - // Instrument: counter - // Unit: {fault} - // Stability: development - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemPagingFaultsName = "system.paging.faults" - SystemPagingFaultsUnit = "{fault}" - // SystemPagingOperations is the metric conforming to the - // "system.paging.operations" semantic conventions. - // Instrument: counter - // Unit: {operation} - // Stability: development - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemPagingOperationsName = "system.paging.operations" - SystemPagingOperationsUnit = "{operation}" - // SystemPagingUsage is the metric conforming to the "system.paging.usage" - // semantic conventions. It represents the unix swap or windows pagefile usage. - // Instrument: updowncounter - // Unit: By - // Stability: development - SystemPagingUsageName = "system.paging.usage" - SystemPagingUsageUnit = "By" - SystemPagingUsageDescription = "Unix swap or windows pagefile usage" - // SystemPagingUtilization is the metric conforming to the - // "system.paging.utilization" semantic conventions. - // Instrument: gauge - // Unit: 1 - // Stability: development - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemPagingUtilizationName = "system.paging.utilization" - SystemPagingUtilizationUnit = "1" - // SystemProcessCount is the metric conforming to the "system.process.count" - // semantic conventions. It represents the total number of processes in each - // state. - // Instrument: updowncounter - // Unit: {process} - // Stability: development - SystemProcessCountName = "system.process.count" - SystemProcessCountUnit = "{process}" - SystemProcessCountDescription = "Total number of processes in each state" - // SystemProcessCreated is the metric conforming to the - // "system.process.created" semantic conventions. It represents the total - // number of processes created over uptime of the host. - // Instrument: counter - // Unit: {process} - // Stability: development - SystemProcessCreatedName = "system.process.created" - SystemProcessCreatedUnit = "{process}" - SystemProcessCreatedDescription = "Total number of processes created over uptime of the host" - // SystemUptime is the metric conforming to the "system.uptime" semantic - // conventions. It represents the time the system has been running. - // Instrument: gauge - // Unit: s - // Stability: development - SystemUptimeName = "system.uptime" - SystemUptimeUnit = "s" - SystemUptimeDescription = "The time the system has been running" - // VCSChangeCount is the metric conforming to the "vcs.change.count" semantic - // conventions. It represents the number of changes (pull requests/merge - // requests/changelists) in a repository, categorized by their state (e.g. open - // or merged). - // Instrument: updowncounter - // Unit: {change} - // Stability: development - VCSChangeCountName = "vcs.change.count" - VCSChangeCountUnit = "{change}" - VCSChangeCountDescription = "The number of changes (pull requests/merge requests/changelists) in a repository, categorized by their state (e.g. open or merged)" - // VCSChangeDuration is the metric conforming to the "vcs.change.duration" - // semantic conventions. It represents the time duration a change (pull - // request/merge request/changelist) has been in a given state. - // Instrument: gauge - // Unit: s - // Stability: development - VCSChangeDurationName = "vcs.change.duration" - VCSChangeDurationUnit = "s" - VCSChangeDurationDescription = "The time duration a change (pull request/merge request/changelist) has been in a given state." - // VCSChangeTimeToApproval is the metric conforming to the - // "vcs.change.time_to_approval" semantic conventions. It represents the amount - // of time since its creation it took a change (pull request/merge - // request/changelist) to get the first approval. - // Instrument: gauge - // Unit: s - // Stability: development - VCSChangeTimeToApprovalName = "vcs.change.time_to_approval" - VCSChangeTimeToApprovalUnit = "s" - VCSChangeTimeToApprovalDescription = "The amount of time since its creation it took a change (pull request/merge request/changelist) to get the first approval." - // VCSChangeTimeToMerge is the metric conforming to the - // "vcs.change.time_to_merge" semantic conventions. It represents the amount of - // time since its creation it took a change (pull request/merge - // request/changelist) to get merged into the target(base) ref. - // Instrument: gauge - // Unit: s - // Stability: development - VCSChangeTimeToMergeName = "vcs.change.time_to_merge" - VCSChangeTimeToMergeUnit = "s" - VCSChangeTimeToMergeDescription = "The amount of time since its creation it took a change (pull request/merge request/changelist) to get merged into the target(base) ref." - // VCSContributorCount is the metric conforming to the "vcs.contributor.count" - // semantic conventions. It represents the number of unique contributors to a - // repository. - // Instrument: gauge - // Unit: {contributor} - // Stability: development - VCSContributorCountName = "vcs.contributor.count" - VCSContributorCountUnit = "{contributor}" - VCSContributorCountDescription = "The number of unique contributors to a repository" - // VCSRefCount is the metric conforming to the "vcs.ref.count" semantic - // conventions. It represents the number of refs of type branch or tag in a - // repository. - // Instrument: updowncounter - // Unit: {ref} - // Stability: development - VCSRefCountName = "vcs.ref.count" - VCSRefCountUnit = "{ref}" - VCSRefCountDescription = "The number of refs of type branch or tag in a repository." - // VCSRefLinesDelta is the metric conforming to the "vcs.ref.lines_delta" - // semantic conventions. It represents the number of lines added/removed in a - // ref (branch) relative to the ref from the `vcs.ref.base.name` attribute. - // Instrument: gauge - // Unit: {line} - // Stability: development - VCSRefLinesDeltaName = "vcs.ref.lines_delta" - VCSRefLinesDeltaUnit = "{line}" - VCSRefLinesDeltaDescription = "The number of lines added/removed in a ref (branch) relative to the ref from the `vcs.ref.base.name` attribute." - // VCSRefRevisionsDelta is the metric conforming to the - // "vcs.ref.revisions_delta" semantic conventions. It represents the number of - // revisions (commits) a ref (branch) is ahead/behind the branch from the - // `vcs.ref.base.name` attribute. - // Instrument: gauge - // Unit: {revision} - // Stability: development - VCSRefRevisionsDeltaName = "vcs.ref.revisions_delta" - VCSRefRevisionsDeltaUnit = "{revision}" - VCSRefRevisionsDeltaDescription = "The number of revisions (commits) a ref (branch) is ahead/behind the branch from the `vcs.ref.base.name` attribute" - // VCSRefTime is the metric conforming to the "vcs.ref.time" semantic - // conventions. It represents the time a ref (branch) created from the default - // branch (trunk) has existed. The `ref.type` attribute will always be `branch` - // . - // Instrument: gauge - // Unit: s - // Stability: development - VCSRefTimeName = "vcs.ref.time" - VCSRefTimeUnit = "s" - VCSRefTimeDescription = "Time a ref (branch) created from the default branch (trunk) has existed. The `ref.type` attribute will always be `branch`" - // VCSRepositoryCount is the metric conforming to the "vcs.repository.count" - // semantic conventions. It represents the number of repositories in an - // organization. - // Instrument: updowncounter - // Unit: {repository} - // Stability: development - VCSRepositoryCountName = "vcs.repository.count" - VCSRepositoryCountUnit = "{repository}" - VCSRepositoryCountDescription = "The number of repositories in an organization." -) \ No newline at end of file diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/MIGRATION.md b/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/MIGRATION.md new file mode 100644 index 0000000000..02b56115e3 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/MIGRATION.md @@ -0,0 +1,4 @@ + +# Migration from v1.33.0 to v1.34.0 + +The `go.opentelemetry.io/otel/semconv/v1.34.0` package should be a drop-in replacement for `go.opentelemetry.io/otel/semconv/v1.33.0`. diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/README.md b/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/README.md new file mode 100644 index 0000000000..fab06c9752 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/README.md @@ -0,0 +1,3 @@ +# Semconv v1.34.0 + +[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/semconv/v1.34.0)](https://pkg.go.dev/go.opentelemetry.io/otel/semconv/v1.34.0) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.30.0/attribute_group.go b/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/attribute_group.go similarity index 81% rename from vendor/go.opentelemetry.io/otel/semconv/v1.30.0/attribute_group.go rename to vendor/go.opentelemetry.io/otel/semconv/v1.34.0/attribute_group.go index 60f3df0db5..98c0fddaa3 100644 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.30.0/attribute_group.go +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/attribute_group.go @@ -3,12 +3,28 @@ // Code generated from semantic convention specification. DO NOT EDIT. -package semconv // import "go.opentelemetry.io/otel/semconv/v1.30.0" +package semconv // import "go.opentelemetry.io/otel/semconv/v1.34.0" import "go.opentelemetry.io/otel/attribute" // Namespace: android const ( + // AndroidAppStateKey is the attribute Key conforming to the "android.app.state" + // semantic conventions. It represents the this attribute represents the state + // of the application. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "created" + // Note: The Android lifecycle states are defined in + // [Activity lifecycle callbacks], and from which the `OS identifiers` are + // derived. + // + // [Activity lifecycle callbacks]: https://developer.android.com/guide/components/activities/activity-lifecycle#lc + AndroidAppStateKey = attribute.Key("android.app.state") + // AndroidOSAPILevelKey is the attribute Key conforming to the // "android.os.api_level" semantic conventions. It represents the uniquely // identifies the framework API revision offered by a version (`os.version`) of @@ -34,6 +50,155 @@ func AndroidOSAPILevel(val string) attribute.KeyValue { return AndroidOSAPILevelKey.String(val) } +// Enum values for android.app.state +var ( + // Any time before Activity.onResume() or, if the app has no Activity, + // Context.startService() has been called in the app for the first time. + // + // Stability: development + AndroidAppStateCreated = AndroidAppStateKey.String("created") + // Any time after Activity.onPause() or, if the app has no Activity, + // Context.stopService() has been called when the app was in the foreground + // state. + // + // Stability: development + AndroidAppStateBackground = AndroidAppStateKey.String("background") + // Any time after Activity.onResume() or, if the app has no Activity, + // Context.startService() has been called when the app was in either the created + // or background states. + // + // Stability: development + AndroidAppStateForeground = AndroidAppStateKey.String("foreground") +) + +// Namespace: app +const ( + // AppInstallationIDKey is the attribute Key conforming to the + // "app.installation.id" semantic conventions. It represents a unique identifier + // representing the installation of an application on a specific device. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "2ab2916d-a51f-4ac8-80ee-45ac31a28092" + // Note: Its value SHOULD persist across launches of the same application + // installation, including through application upgrades. + // It SHOULD change if the application is uninstalled or if all applications of + // the vendor are uninstalled. + // Additionally, users might be able to reset this value (e.g. by clearing + // application data). + // If an app is installed multiple times on the same device (e.g. in different + // accounts on Android), each `app.installation.id` SHOULD have a different + // value. + // If multiple OpenTelemetry SDKs are used within the same application, they + // SHOULD use the same value for `app.installation.id`. + // Hardware IDs (e.g. serial number, IMEI, MAC address) MUST NOT be used as the + // `app.installation.id`. + // + // For iOS, this value SHOULD be equal to the [vendor identifier]. + // + // For Android, examples of `app.installation.id` implementations include: + // + // - [Firebase Installation ID]. + // - A globally unique UUID which is persisted across sessions in your + // application. + // - [App set ID]. + // - [`Settings.getString(Settings.Secure.ANDROID_ID)`]. + // + // More information about Android identifier best practices can be found [here] + // . + // + // [vendor identifier]: https://developer.apple.com/documentation/uikit/uidevice/identifierforvendor + // [Firebase Installation ID]: https://firebase.google.com/docs/projects/manage-installations + // [App set ID]: https://developer.android.com/identity/app-set-id + // [`Settings.getString(Settings.Secure.ANDROID_ID)`]: https://developer.android.com/reference/android/provider/Settings.Secure#ANDROID_ID + // [here]: https://developer.android.com/training/articles/user-data-ids + AppInstallationIDKey = attribute.Key("app.installation.id") + + // AppScreenCoordinateXKey is the attribute Key conforming to the + // "app.screen.coordinate.x" semantic conventions. It represents the x + // (horizontal) coordinate of a screen coordinate, in screen pixels. + // + // Type: int + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 0, 131 + AppScreenCoordinateXKey = attribute.Key("app.screen.coordinate.x") + + // AppScreenCoordinateYKey is the attribute Key conforming to the + // "app.screen.coordinate.y" semantic conventions. It represents the y + // (vertical) component of a screen coordinate, in screen pixels. + // + // Type: int + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 12, 99 + AppScreenCoordinateYKey = attribute.Key("app.screen.coordinate.y") + + // AppWidgetIDKey is the attribute Key conforming to the "app.widget.id" + // semantic conventions. It represents an identifier that uniquely + // differentiates this widget from other widgets in the same application. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "f9bc787d-ff05-48ad-90e1-fca1d46130b3", "submit_order_1829" + // Note: A widget is an application component, typically an on-screen visual GUI + // element. + AppWidgetIDKey = attribute.Key("app.widget.id") + + // AppWidgetNameKey is the attribute Key conforming to the "app.widget.name" + // semantic conventions. It represents the name of an application widget. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "submit", "attack", "Clear Cart" + // Note: A widget is an application component, typically an on-screen visual GUI + // element. + AppWidgetNameKey = attribute.Key("app.widget.name") +) + +// AppInstallationID returns an attribute KeyValue conforming to the +// "app.installation.id" semantic conventions. It represents a unique identifier +// representing the installation of an application on a specific device. +func AppInstallationID(val string) attribute.KeyValue { + return AppInstallationIDKey.String(val) +} + +// AppScreenCoordinateX returns an attribute KeyValue conforming to the +// "app.screen.coordinate.x" semantic conventions. It represents the x +// (horizontal) coordinate of a screen coordinate, in screen pixels. +func AppScreenCoordinateX(val int) attribute.KeyValue { + return AppScreenCoordinateXKey.Int(val) +} + +// AppScreenCoordinateY returns an attribute KeyValue conforming to the +// "app.screen.coordinate.y" semantic conventions. It represents the y (vertical) +// component of a screen coordinate, in screen pixels. +func AppScreenCoordinateY(val int) attribute.KeyValue { + return AppScreenCoordinateYKey.Int(val) +} + +// AppWidgetID returns an attribute KeyValue conforming to the "app.widget.id" +// semantic conventions. It represents an identifier that uniquely differentiates +// this widget from other widgets in the same application. +func AppWidgetID(val string) attribute.KeyValue { + return AppWidgetIDKey.String(val) +} + +// AppWidgetName returns an attribute KeyValue conforming to the +// "app.widget.name" semantic conventions. It represents the name of an +// application widget. +func AppWidgetName(val string) attribute.KeyValue { + return AppWidgetNameKey.String(val) +} + // Namespace: artifact const ( // ArtifactAttestationFilenameKey is the attribute Key conforming to the @@ -219,6 +384,35 @@ func ArtifactVersion(val string) attribute.KeyValue { // Namespace: aws const ( + // AWSBedrockGuardrailIDKey is the attribute Key conforming to the + // "aws.bedrock.guardrail.id" semantic conventions. It represents the unique + // identifier of the AWS Bedrock Guardrail. A [guardrail] helps safeguard and + // prevent unwanted behavior from model responses or user messages. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "sgi5gkybzqak" + // + // [guardrail]: https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html + AWSBedrockGuardrailIDKey = attribute.Key("aws.bedrock.guardrail.id") + + // AWSBedrockKnowledgeBaseIDKey is the attribute Key conforming to the + // "aws.bedrock.knowledge_base.id" semantic conventions. It represents the + // unique identifier of the AWS Bedrock Knowledge base. A [knowledge base] is a + // bank of information that can be queried by models to generate more relevant + // responses and augment prompts. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "XFWUPB9PAW" + // + // [knowledge base]: https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html + AWSBedrockKnowledgeBaseIDKey = attribute.Key("aws.bedrock.knowledge_base.id") + // AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to the // "aws.dynamodb.attribute_definitions" semantic conventions. It represents the // JSON-serialized value of each item in the `AttributeDefinitions` request @@ -599,6 +793,21 @@ const ( // "wzHcyEWfmOGDIE5QOhTAqFDoDWP3y8IUvpNINCwL9N4TEHbUw0/gZJ+VZTmCNCWR7fezEN3eCiQ=" AWSExtendedRequestIDKey = attribute.Key("aws.extended_request_id") + // AWSKinesisStreamNameKey is the attribute Key conforming to the + // "aws.kinesis.stream_name" semantic conventions. It represents the name of the + // AWS Kinesis [stream] the request refers to. Corresponds to the + // `--stream-name` parameter of the Kinesis [describe-stream] operation. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "some-stream-name" + // + // [stream]: https://docs.aws.amazon.com/streams/latest/dev/introduction.html + // [describe-stream]: https://docs.aws.amazon.com/cli/latest/reference/kinesis/describe-stream.html + AWSKinesisStreamNameKey = attribute.Key("aws.kinesis.stream_name") + // AWSLambdaInvokedARNKey is the attribute Key conforming to the // "aws.lambda.invoked_arn" semantic conventions. It represents the full invoked // ARN as provided on the `Context` passed to the function ( @@ -613,6 +822,24 @@ const ( // Note: This may be different from `cloud.resource_id` if an alias is involved. AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn") + // AWSLambdaResourceMappingIDKey is the attribute Key conforming to the + // "aws.lambda.resource_mapping.id" semantic conventions. It represents the UUID + // of the [AWS Lambda EvenSource Mapping]. An event source is mapped to a lambda + // function. It's contents are read by Lambda and used to trigger a function. + // This isn't available in the lambda execution context or the lambda runtime + // environtment. This is going to be populated by the AWS SDK for each language + // when that UUID is present. Some of these operations are + // Create/Delete/Get/List/Update EventSourceMapping. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "587ad24b-03b9-4413-8202-bbd56b36e5b7" + // + // [AWS Lambda EvenSource Mapping]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html + AWSLambdaResourceMappingIDKey = attribute.Key("aws.lambda.resource_mapping.id") + // AWSLogGroupARNsKey is the attribute Key conforming to the // "aws.log.group.arns" semantic conventions. It represents the Amazon Resource // Name(s) (ARN) of the AWS log group(s). @@ -833,8 +1060,89 @@ const ( // [upload-part]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html // [upload-part-copy]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html AWSS3UploadIDKey = attribute.Key("aws.s3.upload_id") + + // AWSSecretsmanagerSecretARNKey is the attribute Key conforming to the + // "aws.secretsmanager.secret.arn" semantic conventions. It represents the ARN + // of the Secret stored in the Secrets Mangger. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // "arn:aws:secretsmanager:us-east-1:123456789012:secret:SecretName-6RandomCharacters" + AWSSecretsmanagerSecretARNKey = attribute.Key("aws.secretsmanager.secret.arn") + + // AWSSNSTopicARNKey is the attribute Key conforming to the "aws.sns.topic.arn" + // semantic conventions. It represents the ARN of the AWS SNS Topic. An Amazon + // SNS [topic] is a logical access point that acts as a communication channel. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "arn:aws:sns:us-east-1:123456789012:mystack-mytopic-NZJ5JSMVGFIE" + // + // [topic]: https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html + AWSSNSTopicARNKey = attribute.Key("aws.sns.topic.arn") + + // AWSSQSQueueURLKey is the attribute Key conforming to the "aws.sqs.queue.url" + // semantic conventions. It represents the URL of the AWS SQS Queue. It's a + // unique identifier for a queue in Amazon Simple Queue Service (SQS) and is + // used to access the queue and perform actions on it. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "https://sqs.us-east-1.amazonaws.com/123456789012/MyQueue" + AWSSQSQueueURLKey = attribute.Key("aws.sqs.queue.url") + + // AWSStepFunctionsActivityARNKey is the attribute Key conforming to the + // "aws.step_functions.activity.arn" semantic conventions. It represents the ARN + // of the AWS Step Functions Activity. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "arn:aws:states:us-east-1:123456789012:activity:get-greeting" + AWSStepFunctionsActivityARNKey = attribute.Key("aws.step_functions.activity.arn") + + // AWSStepFunctionsStateMachineARNKey is the attribute Key conforming to the + // "aws.step_functions.state_machine.arn" semantic conventions. It represents + // the ARN of the AWS Step Functions State Machine. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // "arn:aws:states:us-east-1:123456789012:stateMachine:myStateMachine:1" + AWSStepFunctionsStateMachineARNKey = attribute.Key("aws.step_functions.state_machine.arn") ) +// AWSBedrockGuardrailID returns an attribute KeyValue conforming to the +// "aws.bedrock.guardrail.id" semantic conventions. It represents the unique +// identifier of the AWS Bedrock Guardrail. A [guardrail] helps safeguard and +// prevent unwanted behavior from model responses or user messages. +// +// [guardrail]: https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html +func AWSBedrockGuardrailID(val string) attribute.KeyValue { + return AWSBedrockGuardrailIDKey.String(val) +} + +// AWSBedrockKnowledgeBaseID returns an attribute KeyValue conforming to the +// "aws.bedrock.knowledge_base.id" semantic conventions. It represents the unique +// identifier of the AWS Bedrock Knowledge base. A [knowledge base] is a bank of +// information that can be queried by models to generate more relevant responses +// and augment prompts. +// +// [knowledge base]: https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html +func AWSBedrockKnowledgeBaseID(val string) attribute.KeyValue { + return AWSBedrockKnowledgeBaseIDKey.String(val) +} + // AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming to // the "aws.dynamodb.attribute_definitions" semantic conventions. It represents // the JSON-serialized value of each item in the `AttributeDefinitions` request @@ -1059,6 +1367,17 @@ func AWSExtendedRequestID(val string) attribute.KeyValue { return AWSExtendedRequestIDKey.String(val) } +// AWSKinesisStreamName returns an attribute KeyValue conforming to the +// "aws.kinesis.stream_name" semantic conventions. It represents the name of the +// AWS Kinesis [stream] the request refers to. Corresponds to the `--stream-name` +// parameter of the Kinesis [describe-stream] operation. +// +// [stream]: https://docs.aws.amazon.com/streams/latest/dev/introduction.html +// [describe-stream]: https://docs.aws.amazon.com/cli/latest/reference/kinesis/describe-stream.html +func AWSKinesisStreamName(val string) attribute.KeyValue { + return AWSKinesisStreamNameKey.String(val) +} + // AWSLambdaInvokedARN returns an attribute KeyValue conforming to the // "aws.lambda.invoked_arn" semantic conventions. It represents the full invoked // ARN as provided on the `Context` passed to the function ( @@ -1068,6 +1387,20 @@ func AWSLambdaInvokedARN(val string) attribute.KeyValue { return AWSLambdaInvokedARNKey.String(val) } +// AWSLambdaResourceMappingID returns an attribute KeyValue conforming to the +// "aws.lambda.resource_mapping.id" semantic conventions. It represents the UUID +// of the [AWS Lambda EvenSource Mapping]. An event source is mapped to a lambda +// function. It's contents are read by Lambda and used to trigger a function. +// This isn't available in the lambda execution context or the lambda runtime +// environtment. This is going to be populated by the AWS SDK for each language +// when that UUID is present. Some of these operations are +// Create/Delete/Get/List/Update EventSourceMapping. +// +// [AWS Lambda EvenSource Mapping]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html +func AWSLambdaResourceMappingID(val string) attribute.KeyValue { + return AWSLambdaResourceMappingIDKey.String(val) +} + // AWSLogGroupARNs returns an attribute KeyValue conforming to the // "aws.log.group.arns" semantic conventions. It represents the Amazon Resource // Name(s) (ARN) of the AWS log group(s). @@ -1151,6 +1484,45 @@ func AWSS3UploadID(val string) attribute.KeyValue { return AWSS3UploadIDKey.String(val) } +// AWSSecretsmanagerSecretARN returns an attribute KeyValue conforming to the +// "aws.secretsmanager.secret.arn" semantic conventions. It represents the ARN of +// the Secret stored in the Secrets Mangger. +func AWSSecretsmanagerSecretARN(val string) attribute.KeyValue { + return AWSSecretsmanagerSecretARNKey.String(val) +} + +// AWSSNSTopicARN returns an attribute KeyValue conforming to the +// "aws.sns.topic.arn" semantic conventions. It represents the ARN of the AWS SNS +// Topic. An Amazon SNS [topic] is a logical access point that acts as a +// communication channel. +// +// [topic]: https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html +func AWSSNSTopicARN(val string) attribute.KeyValue { + return AWSSNSTopicARNKey.String(val) +} + +// AWSSQSQueueURL returns an attribute KeyValue conforming to the +// "aws.sqs.queue.url" semantic conventions. It represents the URL of the AWS SQS +// Queue. It's a unique identifier for a queue in Amazon Simple Queue Service +// (SQS) and is used to access the queue and perform actions on it. +func AWSSQSQueueURL(val string) attribute.KeyValue { + return AWSSQSQueueURLKey.String(val) +} + +// AWSStepFunctionsActivityARN returns an attribute KeyValue conforming to the +// "aws.step_functions.activity.arn" semantic conventions. It represents the ARN +// of the AWS Step Functions Activity. +func AWSStepFunctionsActivityARN(val string) attribute.KeyValue { + return AWSStepFunctionsActivityARNKey.String(val) +} + +// AWSStepFunctionsStateMachineARN returns an attribute KeyValue conforming to +// the "aws.step_functions.state_machine.arn" semantic conventions. It represents +// the ARN of the AWS Step Functions State Machine. +func AWSStepFunctionsStateMachineARN(val string) attribute.KeyValue { + return AWSStepFunctionsStateMachineARNKey.String(val) +} + // Enum values for aws.ecs.launchtype var ( // ec2 @@ -1609,6 +1981,17 @@ var ( // Namespace: cicd const ( + // CICDPipelineActionNameKey is the attribute Key conforming to the + // "cicd.pipeline.action.name" semantic conventions. It represents the kind of + // action a pipeline run is performing. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "BUILD", "RUN", "SYNC" + CICDPipelineActionNameKey = attribute.Key("cicd.pipeline.action.name") + // CICDPipelineNameKey is the attribute Key conforming to the // "cicd.pipeline.name" semantic conventions. It represents the human readable // name of the pipeline within a CI/CD system. @@ -1654,6 +2037,21 @@ const ( // Examples: "pending", "executing", "finalizing" CICDPipelineRunStateKey = attribute.Key("cicd.pipeline.run.state") + // CICDPipelineRunURLFullKey is the attribute Key conforming to the + // "cicd.pipeline.run.url.full" semantic conventions. It represents the [URL] of + // the pipeline run, providing the complete address in order to locate and + // identify the pipeline run. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // "https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763?pr=1075" + // + // [URL]: https://wikipedia.org/wiki/URL + CICDPipelineRunURLFullKey = attribute.Key("cicd.pipeline.run.url.full") + // CICDPipelineTaskNameKey is the attribute Key conforming to the // "cicd.pipeline.task.name" semantic conventions. It represents the human // readable name of a task within a pipeline. Task here most closely aligns with @@ -1680,10 +2078,21 @@ const ( // Examples: "12097" CICDPipelineTaskRunIDKey = attribute.Key("cicd.pipeline.task.run.id") + // CICDPipelineTaskRunResultKey is the attribute Key conforming to the + // "cicd.pipeline.task.run.result" semantic conventions. It represents the + // result of a task run. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "success", "failure", "timeout", "skipped" + CICDPipelineTaskRunResultKey = attribute.Key("cicd.pipeline.task.run.result") + // CICDPipelineTaskRunURLFullKey is the attribute Key conforming to the // "cicd.pipeline.task.run.url.full" semantic conventions. It represents the - // [URL] of the pipeline run providing the complete address in order to locate - // and identify the pipeline run. + // [URL] of the pipeline task run, providing the complete address in order to + // locate and identify the pipeline task run. // // Type: string // RequirementLevel: Recommended @@ -1717,6 +2126,28 @@ const ( // Examples: "controller", "scheduler", "agent" CICDSystemComponentKey = attribute.Key("cicd.system.component") + // CICDWorkerIDKey is the attribute Key conforming to the "cicd.worker.id" + // semantic conventions. It represents the unique identifier of a worker within + // a CICD system. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "abc123", "10.0.1.2", "controller" + CICDWorkerIDKey = attribute.Key("cicd.worker.id") + + // CICDWorkerNameKey is the attribute Key conforming to the "cicd.worker.name" + // semantic conventions. It represents the name of a worker within a CICD + // system. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "agent-abc", "controller", "Ubuntu LTS" + CICDWorkerNameKey = attribute.Key("cicd.worker.name") + // CICDWorkerStateKey is the attribute Key conforming to the "cicd.worker.state" // semantic conventions. It represents the state of a CICD worker / agent. // @@ -1726,6 +2157,20 @@ const ( // // Examples: "idle", "busy", "down" CICDWorkerStateKey = attribute.Key("cicd.worker.state") + + // CICDWorkerURLFullKey is the attribute Key conforming to the + // "cicd.worker.url.full" semantic conventions. It represents the [URL] of the + // worker, providing the complete address in order to locate and identify the + // worker. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "https://cicd.example.org/worker/abc123" + // + // [URL]: https://wikipedia.org/wiki/URL + CICDWorkerURLFullKey = attribute.Key("cicd.worker.url.full") ) // CICDPipelineName returns an attribute KeyValue conforming to the @@ -1742,6 +2187,16 @@ func CICDPipelineRunID(val string) attribute.KeyValue { return CICDPipelineRunIDKey.String(val) } +// CICDPipelineRunURLFull returns an attribute KeyValue conforming to the +// "cicd.pipeline.run.url.full" semantic conventions. It represents the [URL] of +// the pipeline run, providing the complete address in order to locate and +// identify the pipeline run. +// +// [URL]: https://wikipedia.org/wiki/URL +func CICDPipelineRunURLFull(val string) attribute.KeyValue { + return CICDPipelineRunURLFullKey.String(val) +} + // CICDPipelineTaskName returns an attribute KeyValue conforming to the // "cicd.pipeline.task.name" semantic conventions. It represents the human // readable name of a task within a pipeline. Task here most closely aligns with @@ -1762,8 +2217,8 @@ func CICDPipelineTaskRunID(val string) attribute.KeyValue { // CICDPipelineTaskRunURLFull returns an attribute KeyValue conforming to the // "cicd.pipeline.task.run.url.full" semantic conventions. It represents the -// [URL] of the pipeline run providing the complete address in order to locate -// and identify the pipeline run. +// [URL] of the pipeline task run, providing the complete address in order to +// locate and identify the pipeline task run. // // [URL]: https://wikipedia.org/wiki/URL func CICDPipelineTaskRunURLFull(val string) attribute.KeyValue { @@ -1777,6 +2232,43 @@ func CICDSystemComponent(val string) attribute.KeyValue { return CICDSystemComponentKey.String(val) } +// CICDWorkerID returns an attribute KeyValue conforming to the "cicd.worker.id" +// semantic conventions. It represents the unique identifier of a worker within a +// CICD system. +func CICDWorkerID(val string) attribute.KeyValue { + return CICDWorkerIDKey.String(val) +} + +// CICDWorkerName returns an attribute KeyValue conforming to the +// "cicd.worker.name" semantic conventions. It represents the name of a worker +// within a CICD system. +func CICDWorkerName(val string) attribute.KeyValue { + return CICDWorkerNameKey.String(val) +} + +// CICDWorkerURLFull returns an attribute KeyValue conforming to the +// "cicd.worker.url.full" semantic conventions. It represents the [URL] of the +// worker, providing the complete address in order to locate and identify the +// worker. +// +// [URL]: https://wikipedia.org/wiki/URL +func CICDWorkerURLFull(val string) attribute.KeyValue { + return CICDWorkerURLFullKey.String(val) +} + +// Enum values for cicd.pipeline.action.name +var ( + // The pipeline run is executing a build. + // Stability: development + CICDPipelineActionNameBuild = CICDPipelineActionNameKey.String("BUILD") + // The pipeline run is executing. + // Stability: development + CICDPipelineActionNameRun = CICDPipelineActionNameKey.String("RUN") + // The pipeline run is executing a sync. + // Stability: development + CICDPipelineActionNameSync = CICDPipelineActionNameKey.String("SYNC") +) + // Enum values for cicd.pipeline.result var ( // The pipeline run finished successfully. @@ -1820,6 +2312,31 @@ var ( CICDPipelineRunStateFinalizing = CICDPipelineRunStateKey.String("finalizing") ) +// Enum values for cicd.pipeline.task.run.result +var ( + // The task run finished successfully. + // Stability: development + CICDPipelineTaskRunResultSuccess = CICDPipelineTaskRunResultKey.String("success") + // The task run did not finish successfully, eg. due to a compile error or a + // failing test. Such failures are usually detected by non-zero exit codes of + // the tools executed in the task run. + // Stability: development + CICDPipelineTaskRunResultFailure = CICDPipelineTaskRunResultKey.String("failure") + // The task run failed due to an error in the CICD system, eg. due to the worker + // being killed. + // Stability: development + CICDPipelineTaskRunResultError = CICDPipelineTaskRunResultKey.String("error") + // A timeout caused the task run to be interrupted. + // Stability: development + CICDPipelineTaskRunResultTimeout = CICDPipelineTaskRunResultKey.String("timeout") + // The task run was cancelled, eg. by a user manually cancelling the task run. + // Stability: development + CICDPipelineTaskRunResultCancellation = CICDPipelineTaskRunResultKey.String("cancellation") + // The task run was skipped, eg. due to a precondition not being met. + // Stability: development + CICDPipelineTaskRunResultSkip = CICDPipelineTaskRunResultKey.String("skip") +) + // Enum values for cicd.pipeline.task.type var ( // build @@ -1943,7 +2460,11 @@ const ( CloudProviderKey = attribute.Key("cloud.provider") // CloudRegionKey is the attribute Key conforming to the "cloud.region" semantic - // conventions. It represents the geographical region the resource is running. + // conventions. It represents the geographical region within a cloud provider. + // When associated with a resource, this attribute specifies the region where + // the resource operates. When calling services or APIs deployed on a cloud, + // this attribute identifies the region where the called destination is + // deployed. // // Type: string // RequirementLevel: Recommended @@ -2002,7 +2523,7 @@ const ( // // [ARN]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // [fully qualified resource ID]: https://learn.microsoft.com/rest/api/resources/resources/get-by-id - // [full resource name]: https://cloud.google.com/apis/design/resource_names#full_resource_name + // [full resource name]: https://google.aip.dev/122#full-resource-names // [ARN]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // [alias suffix]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html // [URI of the resource]: https://cloud.google.com/iam/docs/full-resource-names @@ -2027,8 +2548,11 @@ func CloudAvailabilityZone(val string) attribute.KeyValue { } // CloudRegion returns an attribute KeyValue conforming to the "cloud.region" -// semantic conventions. It represents the geographical region the resource is -// running. +// semantic conventions. It represents the geographical region within a cloud +// provider. When associated with a resource, this attribute specifies the region +// where the resource operates. When calling services or APIs deployed on a +// cloud, this attribute identifies the region where the called destination is +// deployed. func CloudRegion(val string) attribute.KeyValue { return CloudRegionKey.String(val) } @@ -2041,7 +2565,7 @@ func CloudRegion(val string) attribute.KeyValue { // // [ARN]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // [fully qualified resource ID]: https://learn.microsoft.com/rest/api/resources/resources/get-by-id -// [full resource name]: https://cloud.google.com/apis/design/resource_names#full_resource_name +// [full resource name]: https://google.aip.dev/122#full-resource-names func CloudResourceID(val string) attribute.KeyValue { return CloudResourceIDKey.String(val) } @@ -2053,10 +2577,10 @@ var ( CloudPlatformAlibabaCloudECS = CloudPlatformKey.String("alibaba_cloud_ecs") // Alibaba Cloud Function Compute // Stability: development - CloudPlatformAlibabaCloudFc = CloudPlatformKey.String("alibaba_cloud_fc") + CloudPlatformAlibabaCloudFC = CloudPlatformKey.String("alibaba_cloud_fc") // Red Hat OpenShift on Alibaba Cloud // Stability: development - CloudPlatformAlibabaCloudOpenshift = CloudPlatformKey.String("alibaba_cloud_openshift") + CloudPlatformAlibabaCloudOpenShift = CloudPlatformKey.String("alibaba_cloud_openshift") // AWS Elastic Compute Cloud // Stability: development CloudPlatformAWSEC2 = CloudPlatformKey.String("aws_ec2") @@ -2077,7 +2601,7 @@ var ( CloudPlatformAWSAppRunner = CloudPlatformKey.String("aws_app_runner") // Red Hat OpenShift on AWS (ROSA) // Stability: development - CloudPlatformAWSOpenshift = CloudPlatformKey.String("aws_openshift") + CloudPlatformAWSOpenShift = CloudPlatformKey.String("aws_openshift") // Azure Virtual Machines // Stability: development CloudPlatformAzureVM = CloudPlatformKey.String("azure_vm") @@ -2098,7 +2622,7 @@ var ( CloudPlatformAzureAppService = CloudPlatformKey.String("azure_app_service") // Azure Red Hat OpenShift // Stability: development - CloudPlatformAzureOpenshift = CloudPlatformKey.String("azure_openshift") + CloudPlatformAzureOpenShift = CloudPlatformKey.String("azure_openshift") // Google Bare Metal Solution (BMS) // Stability: development CloudPlatformGCPBareMetalSolution = CloudPlatformKey.String("gcp_bare_metal_solution") @@ -2119,25 +2643,25 @@ var ( CloudPlatformGCPAppEngine = CloudPlatformKey.String("gcp_app_engine") // Red Hat OpenShift on Google Cloud // Stability: development - CloudPlatformGCPOpenshift = CloudPlatformKey.String("gcp_openshift") + CloudPlatformGCPOpenShift = CloudPlatformKey.String("gcp_openshift") // Red Hat OpenShift on IBM Cloud // Stability: development - CloudPlatformIbmCloudOpenshift = CloudPlatformKey.String("ibm_cloud_openshift") + CloudPlatformIBMCloudOpenShift = CloudPlatformKey.String("ibm_cloud_openshift") // Compute on Oracle Cloud Infrastructure (OCI) // Stability: development CloudPlatformOracleCloudCompute = CloudPlatformKey.String("oracle_cloud_compute") // Kubernetes Engine (OKE) on Oracle Cloud Infrastructure (OCI) // Stability: development - CloudPlatformOracleCloudOke = CloudPlatformKey.String("oracle_cloud_oke") + CloudPlatformOracleCloudOKE = CloudPlatformKey.String("oracle_cloud_oke") // Tencent Cloud Cloud Virtual Machine (CVM) // Stability: development - CloudPlatformTencentCloudCvm = CloudPlatformKey.String("tencent_cloud_cvm") + CloudPlatformTencentCloudCVM = CloudPlatformKey.String("tencent_cloud_cvm") // Tencent Cloud Elastic Kubernetes Service (EKS) // Stability: development CloudPlatformTencentCloudEKS = CloudPlatformKey.String("tencent_cloud_eks") // Tencent Cloud Serverless Cloud Function (SCF) // Stability: development - CloudPlatformTencentCloudScf = CloudPlatformKey.String("tencent_cloud_scf") + CloudPlatformTencentCloudSCF = CloudPlatformKey.String("tencent_cloud_scf") ) // Enum values for cloud.provider @@ -2159,7 +2683,7 @@ var ( CloudProviderHeroku = CloudProviderKey.String("heroku") // IBM Cloud // Stability: development - CloudProviderIbmCloud = CloudProviderKey.String("ibm_cloud") + CloudProviderIBMCloud = CloudProviderKey.String("ibm_cloud") // Oracle Cloud Infrastructure (OCI) // Stability: development CloudProviderOracleCloud = CloudProviderKey.String("oracle_cloud") @@ -2170,7 +2694,7 @@ var ( // Namespace: cloudevents const ( - // CloudeventsEventIDKey is the attribute Key conforming to the + // CloudEventsEventIDKey is the attribute Key conforming to the // "cloudevents.event_id" semantic conventions. It represents the [event_id] // uniquely identifies the event. // @@ -2181,9 +2705,9 @@ const ( // Examples: "123e4567-e89b-12d3-a456-426614174000", "0001" // // [event_id]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id - CloudeventsEventIDKey = attribute.Key("cloudevents.event_id") + CloudEventsEventIDKey = attribute.Key("cloudevents.event_id") - // CloudeventsEventSourceKey is the attribute Key conforming to the + // CloudEventsEventSourceKey is the attribute Key conforming to the // "cloudevents.event_source" semantic conventions. It represents the [source] // identifies the context in which an event happened. // @@ -2195,9 +2719,9 @@ const ( // "my-service" // // [source]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1 - CloudeventsEventSourceKey = attribute.Key("cloudevents.event_source") + CloudEventsEventSourceKey = attribute.Key("cloudevents.event_source") - // CloudeventsEventSpecVersionKey is the attribute Key conforming to the + // CloudEventsEventSpecVersionKey is the attribute Key conforming to the // "cloudevents.event_spec_version" semantic conventions. It represents the // [version of the CloudEvents specification] which the event uses. // @@ -2208,9 +2732,9 @@ const ( // Examples: 1.0 // // [version of the CloudEvents specification]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion - CloudeventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version") + CloudEventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version") - // CloudeventsEventSubjectKey is the attribute Key conforming to the + // CloudEventsEventSubjectKey is the attribute Key conforming to the // "cloudevents.event_subject" semantic conventions. It represents the [subject] // of the event in the context of the event producer (identified by source). // @@ -2221,9 +2745,9 @@ const ( // Examples: mynewfile.jpg // // [subject]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject - CloudeventsEventSubjectKey = attribute.Key("cloudevents.event_subject") + CloudEventsEventSubjectKey = attribute.Key("cloudevents.event_subject") - // CloudeventsEventTypeKey is the attribute Key conforming to the + // CloudEventsEventTypeKey is the attribute Key conforming to the // "cloudevents.event_type" semantic conventions. It represents the [event_type] // contains a value describing the type of event related to the originating // occurrence. @@ -2235,58 +2759,58 @@ const ( // Examples: "com.github.pull_request.opened", "com.example.object.deleted.v2" // // [event_type]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type - CloudeventsEventTypeKey = attribute.Key("cloudevents.event_type") + CloudEventsEventTypeKey = attribute.Key("cloudevents.event_type") ) -// CloudeventsEventID returns an attribute KeyValue conforming to the +// CloudEventsEventID returns an attribute KeyValue conforming to the // "cloudevents.event_id" semantic conventions. It represents the [event_id] // uniquely identifies the event. // // [event_id]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id -func CloudeventsEventID(val string) attribute.KeyValue { - return CloudeventsEventIDKey.String(val) +func CloudEventsEventID(val string) attribute.KeyValue { + return CloudEventsEventIDKey.String(val) } -// CloudeventsEventSource returns an attribute KeyValue conforming to the +// CloudEventsEventSource returns an attribute KeyValue conforming to the // "cloudevents.event_source" semantic conventions. It represents the [source] // identifies the context in which an event happened. // // [source]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1 -func CloudeventsEventSource(val string) attribute.KeyValue { - return CloudeventsEventSourceKey.String(val) +func CloudEventsEventSource(val string) attribute.KeyValue { + return CloudEventsEventSourceKey.String(val) } -// CloudeventsEventSpecVersion returns an attribute KeyValue conforming to the +// CloudEventsEventSpecVersion returns an attribute KeyValue conforming to the // "cloudevents.event_spec_version" semantic conventions. It represents the // [version of the CloudEvents specification] which the event uses. // // [version of the CloudEvents specification]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion -func CloudeventsEventSpecVersion(val string) attribute.KeyValue { - return CloudeventsEventSpecVersionKey.String(val) +func CloudEventsEventSpecVersion(val string) attribute.KeyValue { + return CloudEventsEventSpecVersionKey.String(val) } -// CloudeventsEventSubject returns an attribute KeyValue conforming to the +// CloudEventsEventSubject returns an attribute KeyValue conforming to the // "cloudevents.event_subject" semantic conventions. It represents the [subject] // of the event in the context of the event producer (identified by source). // // [subject]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject -func CloudeventsEventSubject(val string) attribute.KeyValue { - return CloudeventsEventSubjectKey.String(val) +func CloudEventsEventSubject(val string) attribute.KeyValue { + return CloudEventsEventSubjectKey.String(val) } -// CloudeventsEventType returns an attribute KeyValue conforming to the +// CloudEventsEventType returns an attribute KeyValue conforming to the // "cloudevents.event_type" semantic conventions. It represents the [event_type] // contains a value describing the type of event related to the originating // occurrence. // // [event_type]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type -func CloudeventsEventType(val string) attribute.KeyValue { - return CloudeventsEventTypeKey.String(val) +func CloudEventsEventType(val string) attribute.KeyValue { + return CloudEventsEventTypeKey.String(val) } // Namespace: cloudfoundry const ( - // CloudfoundryAppIDKey is the attribute Key conforming to the + // CloudFoundryAppIDKey is the attribute Key conforming to the // "cloudfoundry.app.id" semantic conventions. It represents the guid of the // application. // @@ -2298,9 +2822,9 @@ const ( // Note: Application instrumentation should use the value from environment // variable `VCAP_APPLICATION.application_id`. This is the same value as // reported by `cf app --guid`. - CloudfoundryAppIDKey = attribute.Key("cloudfoundry.app.id") + CloudFoundryAppIDKey = attribute.Key("cloudfoundry.app.id") - // CloudfoundryAppInstanceIDKey is the attribute Key conforming to the + // CloudFoundryAppInstanceIDKey is the attribute Key conforming to the // "cloudfoundry.app.instance.id" semantic conventions. It represents the index // of the application instance. 0 when just one instance is active. // @@ -2319,9 +2843,9 @@ const ( // variable `CF_INSTANCE_INDEX`. // // [Loggregator v2 envelope]: https://github.com/cloudfoundry/loggregator-api#v2-envelope - CloudfoundryAppInstanceIDKey = attribute.Key("cloudfoundry.app.instance.id") + CloudFoundryAppInstanceIDKey = attribute.Key("cloudfoundry.app.instance.id") - // CloudfoundryAppNameKey is the attribute Key conforming to the + // CloudFoundryAppNameKey is the attribute Key conforming to the // "cloudfoundry.app.name" semantic conventions. It represents the name of the // application. // @@ -2333,9 +2857,9 @@ const ( // Note: Application instrumentation should use the value from environment // variable `VCAP_APPLICATION.application_name`. This is the same value // as reported by `cf apps`. - CloudfoundryAppNameKey = attribute.Key("cloudfoundry.app.name") + CloudFoundryAppNameKey = attribute.Key("cloudfoundry.app.name") - // CloudfoundryOrgIDKey is the attribute Key conforming to the + // CloudFoundryOrgIDKey is the attribute Key conforming to the // "cloudfoundry.org.id" semantic conventions. It represents the guid of the // CloudFoundry org the application is running in. // @@ -2347,9 +2871,9 @@ const ( // Note: Application instrumentation should use the value from environment // variable `VCAP_APPLICATION.org_id`. This is the same value as // reported by `cf org --guid`. - CloudfoundryOrgIDKey = attribute.Key("cloudfoundry.org.id") + CloudFoundryOrgIDKey = attribute.Key("cloudfoundry.org.id") - // CloudfoundryOrgNameKey is the attribute Key conforming to the + // CloudFoundryOrgNameKey is the attribute Key conforming to the // "cloudfoundry.org.name" semantic conventions. It represents the name of the // CloudFoundry organization the app is running in. // @@ -2361,9 +2885,9 @@ const ( // Note: Application instrumentation should use the value from environment // variable `VCAP_APPLICATION.org_name`. This is the same value as // reported by `cf orgs`. - CloudfoundryOrgNameKey = attribute.Key("cloudfoundry.org.name") + CloudFoundryOrgNameKey = attribute.Key("cloudfoundry.org.name") - // CloudfoundryProcessIDKey is the attribute Key conforming to the + // CloudFoundryProcessIDKey is the attribute Key conforming to the // "cloudfoundry.process.id" semantic conventions. It represents the UID // identifying the process. // @@ -2376,9 +2900,9 @@ const ( // variable `VCAP_APPLICATION.process_id`. It is supposed to be equal to // `VCAP_APPLICATION.app_id` for applications deployed to the runtime. // For system components, this could be the actual PID. - CloudfoundryProcessIDKey = attribute.Key("cloudfoundry.process.id") + CloudFoundryProcessIDKey = attribute.Key("cloudfoundry.process.id") - // CloudfoundryProcessTypeKey is the attribute Key conforming to the + // CloudFoundryProcessTypeKey is the attribute Key conforming to the // "cloudfoundry.process.type" semantic conventions. It represents the type of // process. // @@ -2390,9 +2914,9 @@ const ( // Note: CloudFoundry applications can consist of multiple jobs. Usually the // main process will be of type `web`. There can be additional background // tasks or side-cars with different process types. - CloudfoundryProcessTypeKey = attribute.Key("cloudfoundry.process.type") + CloudFoundryProcessTypeKey = attribute.Key("cloudfoundry.process.type") - // CloudfoundrySpaceIDKey is the attribute Key conforming to the + // CloudFoundrySpaceIDKey is the attribute Key conforming to the // "cloudfoundry.space.id" semantic conventions. It represents the guid of the // CloudFoundry space the application is running in. // @@ -2404,9 +2928,9 @@ const ( // Note: Application instrumentation should use the value from environment // variable `VCAP_APPLICATION.space_id`. This is the same value as // reported by `cf space --guid`. - CloudfoundrySpaceIDKey = attribute.Key("cloudfoundry.space.id") + CloudFoundrySpaceIDKey = attribute.Key("cloudfoundry.space.id") - // CloudfoundrySpaceNameKey is the attribute Key conforming to the + // CloudFoundrySpaceNameKey is the attribute Key conforming to the // "cloudfoundry.space.name" semantic conventions. It represents the name of the // CloudFoundry space the application is running in. // @@ -2418,9 +2942,9 @@ const ( // Note: Application instrumentation should use the value from environment // variable `VCAP_APPLICATION.space_name`. This is the same value as // reported by `cf spaces`. - CloudfoundrySpaceNameKey = attribute.Key("cloudfoundry.space.name") + CloudFoundrySpaceNameKey = attribute.Key("cloudfoundry.space.name") - // CloudfoundrySystemIDKey is the attribute Key conforming to the + // CloudFoundrySystemIDKey is the attribute Key conforming to the // "cloudfoundry.system.id" semantic conventions. It represents a guid or // another name describing the event source. // @@ -2441,9 +2965,9 @@ const ( // // [Loggregator v2 envelope]: https://github.com/cloudfoundry/loggregator-api#v2-envelope // [Bosh spec]: https://bosh.io/docs/jobs/#properties-spec - CloudfoundrySystemIDKey = attribute.Key("cloudfoundry.system.id") + CloudFoundrySystemIDKey = attribute.Key("cloudfoundry.system.id") - // CloudfoundrySystemInstanceIDKey is the attribute Key conforming to the + // CloudFoundrySystemInstanceIDKey is the attribute Key conforming to the // "cloudfoundry.system.instance.id" semantic conventions. It represents a guid // describing the concrete instance of the event source. // @@ -2463,84 +2987,84 @@ const ( // // [Loggregator v2 envelope]: https://github.com/cloudfoundry/loggregator-api#v2-envelope // [Bosh spec]: https://bosh.io/docs/jobs/#properties-spec - CloudfoundrySystemInstanceIDKey = attribute.Key("cloudfoundry.system.instance.id") + CloudFoundrySystemInstanceIDKey = attribute.Key("cloudfoundry.system.instance.id") ) -// CloudfoundryAppID returns an attribute KeyValue conforming to the +// CloudFoundryAppID returns an attribute KeyValue conforming to the // "cloudfoundry.app.id" semantic conventions. It represents the guid of the // application. -func CloudfoundryAppID(val string) attribute.KeyValue { - return CloudfoundryAppIDKey.String(val) +func CloudFoundryAppID(val string) attribute.KeyValue { + return CloudFoundryAppIDKey.String(val) } -// CloudfoundryAppInstanceID returns an attribute KeyValue conforming to the +// CloudFoundryAppInstanceID returns an attribute KeyValue conforming to the // "cloudfoundry.app.instance.id" semantic conventions. It represents the index // of the application instance. 0 when just one instance is active. -func CloudfoundryAppInstanceID(val string) attribute.KeyValue { - return CloudfoundryAppInstanceIDKey.String(val) +func CloudFoundryAppInstanceID(val string) attribute.KeyValue { + return CloudFoundryAppInstanceIDKey.String(val) } -// CloudfoundryAppName returns an attribute KeyValue conforming to the +// CloudFoundryAppName returns an attribute KeyValue conforming to the // "cloudfoundry.app.name" semantic conventions. It represents the name of the // application. -func CloudfoundryAppName(val string) attribute.KeyValue { - return CloudfoundryAppNameKey.String(val) +func CloudFoundryAppName(val string) attribute.KeyValue { + return CloudFoundryAppNameKey.String(val) } -// CloudfoundryOrgID returns an attribute KeyValue conforming to the +// CloudFoundryOrgID returns an attribute KeyValue conforming to the // "cloudfoundry.org.id" semantic conventions. It represents the guid of the // CloudFoundry org the application is running in. -func CloudfoundryOrgID(val string) attribute.KeyValue { - return CloudfoundryOrgIDKey.String(val) +func CloudFoundryOrgID(val string) attribute.KeyValue { + return CloudFoundryOrgIDKey.String(val) } -// CloudfoundryOrgName returns an attribute KeyValue conforming to the +// CloudFoundryOrgName returns an attribute KeyValue conforming to the // "cloudfoundry.org.name" semantic conventions. It represents the name of the // CloudFoundry organization the app is running in. -func CloudfoundryOrgName(val string) attribute.KeyValue { - return CloudfoundryOrgNameKey.String(val) +func CloudFoundryOrgName(val string) attribute.KeyValue { + return CloudFoundryOrgNameKey.String(val) } -// CloudfoundryProcessID returns an attribute KeyValue conforming to the +// CloudFoundryProcessID returns an attribute KeyValue conforming to the // "cloudfoundry.process.id" semantic conventions. It represents the UID // identifying the process. -func CloudfoundryProcessID(val string) attribute.KeyValue { - return CloudfoundryProcessIDKey.String(val) +func CloudFoundryProcessID(val string) attribute.KeyValue { + return CloudFoundryProcessIDKey.String(val) } -// CloudfoundryProcessType returns an attribute KeyValue conforming to the +// CloudFoundryProcessType returns an attribute KeyValue conforming to the // "cloudfoundry.process.type" semantic conventions. It represents the type of // process. -func CloudfoundryProcessType(val string) attribute.KeyValue { - return CloudfoundryProcessTypeKey.String(val) +func CloudFoundryProcessType(val string) attribute.KeyValue { + return CloudFoundryProcessTypeKey.String(val) } -// CloudfoundrySpaceID returns an attribute KeyValue conforming to the +// CloudFoundrySpaceID returns an attribute KeyValue conforming to the // "cloudfoundry.space.id" semantic conventions. It represents the guid of the // CloudFoundry space the application is running in. -func CloudfoundrySpaceID(val string) attribute.KeyValue { - return CloudfoundrySpaceIDKey.String(val) +func CloudFoundrySpaceID(val string) attribute.KeyValue { + return CloudFoundrySpaceIDKey.String(val) } -// CloudfoundrySpaceName returns an attribute KeyValue conforming to the +// CloudFoundrySpaceName returns an attribute KeyValue conforming to the // "cloudfoundry.space.name" semantic conventions. It represents the name of the // CloudFoundry space the application is running in. -func CloudfoundrySpaceName(val string) attribute.KeyValue { - return CloudfoundrySpaceNameKey.String(val) +func CloudFoundrySpaceName(val string) attribute.KeyValue { + return CloudFoundrySpaceNameKey.String(val) } -// CloudfoundrySystemID returns an attribute KeyValue conforming to the +// CloudFoundrySystemID returns an attribute KeyValue conforming to the // "cloudfoundry.system.id" semantic conventions. It represents a guid or another // name describing the event source. -func CloudfoundrySystemID(val string) attribute.KeyValue { - return CloudfoundrySystemIDKey.String(val) +func CloudFoundrySystemID(val string) attribute.KeyValue { + return CloudFoundrySystemIDKey.String(val) } -// CloudfoundrySystemInstanceID returns an attribute KeyValue conforming to the +// CloudFoundrySystemInstanceID returns an attribute KeyValue conforming to the // "cloudfoundry.system.instance.id" semantic conventions. It represents a guid // describing the concrete instance of the event source. -func CloudfoundrySystemInstanceID(val string) attribute.KeyValue { - return CloudfoundrySystemInstanceIDKey.String(val) +func CloudFoundrySystemInstanceID(val string) attribute.KeyValue { + return CloudFoundrySystemInstanceIDKey.String(val) } // Namespace: code @@ -2548,110 +3072,123 @@ const ( // CodeColumnNumberKey is the attribute Key conforming to the // "code.column.number" semantic conventions. It represents the column number in // `code.file.path` best representing the operation. It SHOULD point within the - // code unit named in `code.function.name`. + // code unit named in `code.function.name`. This attribute MUST NOT be used on + // the Profile signal since the data is already captured in 'message Line'. This + // constraint is imposed to prevent redundancy and maintain data integrity. // // Type: int // RequirementLevel: Recommended - // Stability: Development + // Stability: Stable CodeColumnNumberKey = attribute.Key("code.column.number") // CodeFilePathKey is the attribute Key conforming to the "code.file.path" // semantic conventions. It represents the source code file name that identifies // the code unit as uniquely as possible (preferably an absolute file path). + // This attribute MUST NOT be used on the Profile signal since the data is + // already captured in 'message Function'. This constraint is imposed to prevent + // redundancy and maintain data integrity. // // Type: string // RequirementLevel: Recommended - // Stability: Development + // Stability: Stable // // Examples: /usr/local/MyApplication/content_root/app/index.php CodeFilePathKey = attribute.Key("code.file.path") - // CodeFilepathKey is the attribute Key conforming to the "code.filepath" - // semantic conventions. It represents the deprecated, use `code.file.path` - // instead. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: /usr/local/MyApplication/content_root/app/index.php - CodeFilepathKey = attribute.Key("code.filepath") - // CodeFunctionNameKey is the attribute Key conforming to the // "code.function.name" semantic conventions. It represents the method or - // function name, or equivalent (usually rightmost part of the code unit's - // name). + // function fully-qualified name without arguments. The value should fit the + // natural representation of the language runtime, which is also likely the same + // used within `code.stacktrace` attribute value. This attribute MUST NOT be + // used on the Profile signal since the data is already captured in 'message + // Function'. This constraint is imposed to prevent redundancy and maintain data + // integrity. // // Type: string // RequirementLevel: Recommended - // Stability: Development + // Stability: Stable // - // Examples: serveRequest + // Examples: "com.example.MyHttpService.serveRequest", + // "GuzzleHttp\Client::transfer", "fopen" + // Note: Values and format depends on each language runtime, thus it is + // impossible to provide an exhaustive list of examples. + // The values are usually the same (or prefixes of) the ones found in native + // stack trace representation stored in + // `code.stacktrace` without information on arguments. + // + // Examples: + // + // - Java method: `com.example.MyHttpService.serveRequest` + // - Java anonymous class method: `com.mycompany.Main$1.myMethod` + // - Java lambda method: + // `com.mycompany.Main$$Lambda/0x0000748ae4149c00.myMethod` + // - PHP function: `GuzzleHttp\Client::transfer` + // - Go function: `github.com/my/repo/pkg.foo.func5` + // - Elixir: `OpenTelemetry.Ctx.new` + // - Erlang: `opentelemetry_ctx:new` + // - Rust: `playground::my_module::my_cool_func` + // - C function: `fopen` CodeFunctionNameKey = attribute.Key("code.function.name") // CodeLineNumberKey is the attribute Key conforming to the "code.line.number" // semantic conventions. It represents the line number in `code.file.path` best // representing the operation. It SHOULD point within the code unit named in - // `code.function.name`. + // `code.function.name`. This attribute MUST NOT be used on the Profile signal + // since the data is already captured in 'message Line'. This constraint is + // imposed to prevent redundancy and maintain data integrity. // // Type: int // RequirementLevel: Recommended - // Stability: Development + // Stability: Stable CodeLineNumberKey = attribute.Key("code.line.number") - // CodeNamespaceKey is the attribute Key conforming to the "code.namespace" - // semantic conventions. It represents the "namespace" within which - // `code.function.name` is defined. Usually the qualified class or module name, - // such that `code.namespace` + some separator + `code.function.name` form a - // unique identifier for the code unit. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: com.example.MyHttpService - CodeNamespaceKey = attribute.Key("code.namespace") - // CodeStacktraceKey is the attribute Key conforming to the "code.stacktrace" // semantic conventions. It represents a stacktrace as a string in the natural - // representation for the language runtime. The representation is to be - // determined and documented by each language SIG. + // representation for the language runtime. The representation is identical to + // [`exception.stacktrace`]. This attribute MUST NOT be used on the Profile + // signal since the data is already captured in 'message Location'. This + // constraint is imposed to prevent redundancy and maintain data integrity. // // Type: string // RequirementLevel: Recommended - // Stability: Development + // Stability: Stable // // Examples: at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at // com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at // com.example.GenerateTrace.main(GenerateTrace.java:5) + // + // [`exception.stacktrace`]: /docs/exceptions/exceptions-spans.md#stacktrace-representation CodeStacktraceKey = attribute.Key("code.stacktrace") ) // CodeColumnNumber returns an attribute KeyValue conforming to the // "code.column.number" semantic conventions. It represents the column number in // `code.file.path` best representing the operation. It SHOULD point within the -// code unit named in `code.function.name`. +// code unit named in `code.function.name`. This attribute MUST NOT be used on +// the Profile signal since the data is already captured in 'message Line'. This +// constraint is imposed to prevent redundancy and maintain data integrity. func CodeColumnNumber(val int) attribute.KeyValue { return CodeColumnNumberKey.Int(val) } // CodeFilePath returns an attribute KeyValue conforming to the "code.file.path" // semantic conventions. It represents the source code file name that identifies -// the code unit as uniquely as possible (preferably an absolute file path). +// the code unit as uniquely as possible (preferably an absolute file path). This +// attribute MUST NOT be used on the Profile signal since the data is already +// captured in 'message Function'. This constraint is imposed to prevent +// redundancy and maintain data integrity. func CodeFilePath(val string) attribute.KeyValue { return CodeFilePathKey.String(val) } -// CodeFilepath returns an attribute KeyValue conforming to the "code.filepath" -// semantic conventions. It represents the deprecated, use `code.file.path` -// instead. -func CodeFilepath(val string) attribute.KeyValue { - return CodeFilepathKey.String(val) -} - // CodeFunctionName returns an attribute KeyValue conforming to the // "code.function.name" semantic conventions. It represents the method or -// function name, or equivalent (usually rightmost part of the code unit's name). +// function fully-qualified name without arguments. The value should fit the +// natural representation of the language runtime, which is also likely the same +// used within `code.stacktrace` attribute value. This attribute MUST NOT be used +// on the Profile signal since the data is already captured in 'message +// Function'. This constraint is imposed to prevent redundancy and maintain data +// integrity. func CodeFunctionName(val string) attribute.KeyValue { return CodeFunctionNameKey.String(val) } @@ -2659,24 +3196,21 @@ func CodeFunctionName(val string) attribute.KeyValue { // CodeLineNumber returns an attribute KeyValue conforming to the // "code.line.number" semantic conventions. It represents the line number in // `code.file.path` best representing the operation. It SHOULD point within the -// code unit named in `code.function.name`. +// code unit named in `code.function.name`. This attribute MUST NOT be used on +// the Profile signal since the data is already captured in 'message Line'. This +// constraint is imposed to prevent redundancy and maintain data integrity. func CodeLineNumber(val int) attribute.KeyValue { return CodeLineNumberKey.Int(val) } -// CodeNamespace returns an attribute KeyValue conforming to the "code.namespace" -// semantic conventions. It represents the "namespace" within which -// `code.function.name` is defined. Usually the qualified class or module name, -// such that `code.namespace` + some separator + `code.function.name` form a -// unique identifier for the code unit. -func CodeNamespace(val string) attribute.KeyValue { - return CodeNamespaceKey.String(val) -} - // CodeStacktrace returns an attribute KeyValue conforming to the // "code.stacktrace" semantic conventions. It represents a stacktrace as a string // in the natural representation for the language runtime. The representation is -// to be determined and documented by each language SIG. +// identical to [`exception.stacktrace`]. This attribute MUST NOT be used on the +// Profile signal since the data is already captured in 'message Location'. This +// constraint is imposed to prevent redundancy and maintain data integrity. +// +// [`exception.stacktrace`]: /docs/exceptions/exceptions-spans.md#stacktrace-representation func CodeStacktrace(val string) attribute.KeyValue { return CodeStacktraceKey.String(val) } @@ -2719,7 +3253,7 @@ const ( // Examples: "otelcontribcol --config config.yaml" ContainerCommandLineKey = attribute.Key("container.command_line") - // ContainerCsiPluginNameKey is the attribute Key conforming to the + // ContainerCSIPluginNameKey is the attribute Key conforming to the // "container.csi.plugin.name" semantic conventions. It represents the name of // the CSI ([Container Storage Interface]) plugin used by the volume. // @@ -2732,9 +3266,9 @@ const ( // This should represent the `name` field of the GetPluginInfo RPC. // // [Container Storage Interface]: https://github.com/container-storage-interface/spec - ContainerCsiPluginNameKey = attribute.Key("container.csi.plugin.name") + ContainerCSIPluginNameKey = attribute.Key("container.csi.plugin.name") - // ContainerCsiVolumeIDKey is the attribute Key conforming to the + // ContainerCSIVolumeIDKey is the attribute Key conforming to the // "container.csi.volume.id" semantic conventions. It represents the unique // volume ID returned by the CSI ([Container Storage Interface]) plugin. // @@ -2748,7 +3282,7 @@ const ( // spec. // // [Container Storage Interface]: https://github.com/container-storage-interface/spec - ContainerCsiVolumeIDKey = attribute.Key("container.csi.volume.id") + ContainerCSIVolumeIDKey = attribute.Key("container.csi.volume.id") // ContainerIDKey is the attribute Key conforming to the "container.id" semantic // conventions. It represents the container ID. Usually a UUID, as for example @@ -2874,22 +3408,22 @@ func ContainerCommandLine(val string) attribute.KeyValue { return ContainerCommandLineKey.String(val) } -// ContainerCsiPluginName returns an attribute KeyValue conforming to the +// ContainerCSIPluginName returns an attribute KeyValue conforming to the // "container.csi.plugin.name" semantic conventions. It represents the name of // the CSI ([Container Storage Interface]) plugin used by the volume. // // [Container Storage Interface]: https://github.com/container-storage-interface/spec -func ContainerCsiPluginName(val string) attribute.KeyValue { - return ContainerCsiPluginNameKey.String(val) +func ContainerCSIPluginName(val string) attribute.KeyValue { + return ContainerCSIPluginNameKey.String(val) } -// ContainerCsiVolumeID returns an attribute KeyValue conforming to the +// ContainerCSIVolumeID returns an attribute KeyValue conforming to the // "container.csi.volume.id" semantic conventions. It represents the unique // volume ID returned by the CSI ([Container Storage Interface]) plugin. // // [Container Storage Interface]: https://github.com/container-storage-interface/spec -func ContainerCsiVolumeID(val string) attribute.KeyValue { - return ContainerCsiVolumeIDKey.String(val) +func ContainerCSIVolumeID(val string) attribute.KeyValue { + return ContainerCSIVolumeIDKey.String(val) } // ContainerID returns an attribute KeyValue conforming to the "container.id" @@ -2933,6 +3467,13 @@ func ContainerImageTags(val ...string) attribute.KeyValue { return ContainerImageTagsKey.StringSlice(val) } +// ContainerLabel returns an attribute KeyValue conforming to the +// "container.label" semantic conventions. It represents the container labels, +// `` being the label name, the value being the label value. +func ContainerLabel(key string, val string) attribute.KeyValue { + return attribute.String("container.label."+key, val) +} + // ContainerName returns an attribute KeyValue conforming to the "container.name" // semantic conventions. It represents the container name used by container // runtime. @@ -2949,10 +3490,21 @@ func ContainerRuntime(val string) attribute.KeyValue { // Namespace: cpu const ( - // CPUModeKey is the attribute Key conforming to the "cpu.mode" semantic - // conventions. It represents the mode of the CPU. + // CPULogicalNumberKey is the attribute Key conforming to the + // "cpu.logical_number" semantic conventions. It represents the logical CPU + // number [0..n-1]. // - // Type: Enum + // Type: int + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 1 + CPULogicalNumberKey = attribute.Key("cpu.logical_number") + + // CPUModeKey is the attribute Key conforming to the "cpu.mode" semantic + // conventions. It represents the mode of the CPU. + // + // Type: Enum // RequirementLevel: Recommended // Stability: Development // @@ -2960,6 +3512,13 @@ const ( CPUModeKey = attribute.Key("cpu.mode") ) +// CPULogicalNumber returns an attribute KeyValue conforming to the +// "cpu.logical_number" semantic conventions. It represents the logical CPU +// number [0..n-1]. +func CPULogicalNumber(val int) attribute.KeyValue { + return CPULogicalNumberKey.Int(val) +} + // Enum values for cpu.mode var ( // user @@ -2976,7 +3535,7 @@ var ( CPUModeIdle = CPUModeKey.String("idle") // iowait // Stability: development - CPUModeIowait = CPUModeKey.String("iowait") + CPUModeIOWait = CPUModeKey.String("iowait") // interrupt // Stability: development CPUModeInterrupt = CPUModeKey.String("interrupt") @@ -3024,19 +3583,18 @@ const ( // // Type: string // RequirementLevel: Recommended - // Stability: Release_Candidate + // Stability: Stable // // Examples: "public.users", "customers" // Note: It is RECOMMENDED to capture the value as provided by the application // without attempting to do any case normalization. // // The collection name SHOULD NOT be extracted from `db.query.text`, - // unless the query format is known to only ever have a single collection name - // present. + // when the database system supports query text with multiple collections + // in non-batch operations. // // For batch operations, if the individual operations are known to have the same - // collection name - // then that collection name SHOULD be used. + // collection name then that collection name SHOULD be used. DBCollectionNameKey = attribute.Key("db.collection.name") // DBNamespaceKey is the attribute Key conforming to the "db.namespace" semantic @@ -3045,15 +3603,13 @@ const ( // // Type: string // RequirementLevel: Recommended - // Stability: Release_Candidate + // Stability: Stable // // Examples: "customers", "test.users" // Note: If a database system has multiple namespace components, they SHOULD be - // concatenated (potentially using database system specific conventions) from - // most general to most specific namespace component, and more specific - // namespaces SHOULD NOT be captured without the more general namespaces, to - // ensure that "startswith" queries for the more general namespaces will be - // valid. + // concatenated from the most general to the most specific namespace component, + // using `|` as a separator between the components. Any missing components (and + // their associated separators) SHOULD be omitted. // Semantic conventions for individual database systems SHOULD document what // `db.namespace` means in the context of that system. // It is RECOMMENDED to capture the value as provided by the application without @@ -3066,7 +3622,7 @@ const ( // // Type: int // RequirementLevel: Recommended - // Stability: Release_Candidate + // Stability: Stable // // Examples: 2, 3, 4 // Note: Operations are only considered batches when they contain two or more @@ -3079,15 +3635,18 @@ const ( // // Type: string // RequirementLevel: Recommended - // Stability: Release_Candidate + // Stability: Stable // // Examples: "findAndModify", "HMSET", "SELECT" // Note: It is RECOMMENDED to capture the value as provided by the application // without attempting to do any case normalization. // // The operation name SHOULD NOT be extracted from `db.query.text`, - // unless the query format is known to only ever have a single operation name - // present. + // when the database system supports query text with multiple operations + // in non-batch operations. + // + // If spaces can occur in the operation name, multiple consecutive spaces + // SHOULD be normalized to a single space. // // For batch operations, if the individual operations are known to have the same // operation name @@ -3097,25 +3656,27 @@ const ( DBOperationNameKey = attribute.Key("db.operation.name") // DBQuerySummaryKey is the attribute Key conforming to the "db.query.summary" - // semantic conventions. It represents the low cardinality representation of a - // database query text. + // semantic conventions. It represents the low cardinality summary of a database + // query. // // Type: string // RequirementLevel: Recommended - // Stability: Release_Candidate + // Stability: Stable // // Examples: "SELECT wuser_table", "INSERT shipping_details SELECT orders", "get // user by id" - // Note: `db.query.summary` provides static summary of the query text. It - // describes a class of database queries and is useful as a grouping key, - // especially when analyzing telemetry for database calls involving complex - // queries. - // Summary may be available to the instrumentation through instrumentation hooks - // or other means. If it is not available, instrumentations that support query - // parsing SHOULD generate a summary following [Generating query summary] + // Note: The query summary describes a class of database queries and is useful + // as a grouping key, especially when analyzing telemetry for database + // calls involving complex queries. + // + // Summary may be available to the instrumentation through + // instrumentation hooks or other means. If it is not available, + // instrumentations + // that support query parsing SHOULD generate a summary following + // [Generating query summary] // section. // - // [Generating query summary]: ../../docs/database/database-spans.md#generating-a-summary-of-the-query-text + // [Generating query summary]: /docs/database/database-spans.md#generating-a-summary-of-the-query DBQuerySummaryKey = attribute.Key("db.query.summary") // DBQueryTextKey is the attribute Key conforming to the "db.query.text" @@ -3123,7 +3684,7 @@ const ( // // Type: string // RequirementLevel: Recommended - // Stability: Release_Candidate + // Stability: Stable // // Examples: "SELECT * FROM wuser_table where username = ?", "SET mykey ?" // Note: For sanitization see [Sanitization of `db.query.text`]. @@ -3131,13 +3692,13 @@ const ( // query text then that query text SHOULD be used, otherwise all of the // individual query texts SHOULD be concatenated with separator `; ` or some // other database system specific separator if more applicable. - // Even though parameterized query text can potentially have sensitive data, by - // using a parameterized query the user is giving a strong signal that any - // sensitive data will be passed as parameter values, and the benefit to - // observability of capturing the static part of the query text by default - // outweighs the risk. + // Parameterized query text SHOULD NOT be sanitized. Even though parameterized + // query text can potentially have sensitive data, by using a parameterized + // query the user is giving a strong signal that any sensitive data will be + // passed as parameter values, and the benefit to observability of capturing the + // static part of the query text by default outweighs the risk. // - // [Sanitization of `db.query.text`]: ../../docs/database/database-spans.md#sanitization-of-dbquerytext + // [Sanitization of `db.query.text`]: /docs/database/database-spans.md#sanitization-of-dbquerytext DBQueryTextKey = attribute.Key("db.query.text") // DBResponseReturnedRowsKey is the attribute Key conforming to the @@ -3157,7 +3718,7 @@ const ( // // Type: string // RequirementLevel: Recommended - // Stability: Release_Candidate + // Stability: Stable // // Examples: "102", "ORA-17002", "08P01", "404" // Note: The status code returned by the database. Usually it represents an @@ -3167,13 +3728,29 @@ const ( // `db.response.status_code` means in the context of that system. DBResponseStatusCodeKey = attribute.Key("db.response.status_code") + // DBStoredProcedureNameKey is the attribute Key conforming to the + // "db.stored_procedure.name" semantic conventions. It represents the name of a + // stored procedure within the database. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Stable + // + // Examples: "GetCustomer" + // Note: It is RECOMMENDED to capture the value as provided by the application + // without attempting to do any case normalization. + // + // For batch operations, if the individual operations are known to have the same + // stored procedure name then that stored procedure name SHOULD be used. + DBStoredProcedureNameKey = attribute.Key("db.stored_procedure.name") + // DBSystemNameKey is the attribute Key conforming to the "db.system.name" // semantic conventions. It represents the database management system (DBMS) // product as identified by the client instrumentation. // // Type: Enum // RequirementLevel: Recommended - // Stability: Release_Candidate + // Stability: Stable // // Examples: // Note: The actual DBMS may differ from the one identified by the client. For @@ -3224,9 +3801,25 @@ func DBOperationName(val string) attribute.KeyValue { return DBOperationNameKey.String(val) } +// DBOperationParameter returns an attribute KeyValue conforming to the +// "db.operation.parameter" semantic conventions. It represents a database +// operation parameter, with `` being the parameter name, and the attribute +// value being a string representation of the parameter value. +func DBOperationParameter(key string, val string) attribute.KeyValue { + return attribute.String("db.operation.parameter."+key, val) +} + +// DBQueryParameter returns an attribute KeyValue conforming to the +// "db.query.parameter" semantic conventions. It represents a database query +// parameter, with `` being the parameter name, and the attribute value +// being a string representation of the parameter value. +func DBQueryParameter(key string, val string) attribute.KeyValue { + return attribute.String("db.query.parameter."+key, val) +} + // DBQuerySummary returns an attribute KeyValue conforming to the // "db.query.summary" semantic conventions. It represents the low cardinality -// representation of a database query text. +// summary of a database query. func DBQuerySummary(val string) attribute.KeyValue { return DBQuerySummaryKey.String(val) } @@ -3251,6 +3844,13 @@ func DBResponseStatusCode(val string) attribute.KeyValue { return DBResponseStatusCodeKey.String(val) } +// DBStoredProcedureName returns an attribute KeyValue conforming to the +// "db.stored_procedure.name" semantic conventions. It represents the name of a +// stored procedure within the database. +func DBStoredProcedureName(val string) attribute.KeyValue { + return DBStoredProcedureNameKey.String(val) +} + // Enum values for db.client.connection.state var ( // idle @@ -3305,12 +3905,12 @@ var ( // Stability: development // // [ClickHouse]: https://clickhouse.com/ - DBSystemNameClickhouse = DBSystemNameKey.String("clickhouse") + DBSystemNameClickHouse = DBSystemNameKey.String("clickhouse") // [CockroachDB] // Stability: development // // [CockroachDB]: https://www.cockroachlabs.com/ - DBSystemNameCockroachdb = DBSystemNameKey.String("cockroachdb") + DBSystemNameCockroachDB = DBSystemNameKey.String("cockroachdb") // [Couchbase] // Stability: development // @@ -3335,7 +3935,7 @@ var ( // Stability: development // // [Firebird]: https://www.firebirdsql.org/ - DBSystemNameFirebirdsql = DBSystemNameKey.String("firebirdsql") + DBSystemNameFirebirdSQL = DBSystemNameKey.String("firebirdsql") // [Google Cloud Spanner] // Stability: development // @@ -3370,29 +3970,29 @@ var ( // Stability: development // // [IBM Db2]: https://www.ibm.com/db2 - DBSystemNameIbmDb2 = DBSystemNameKey.String("ibm.db2") + DBSystemNameIBMDB2 = DBSystemNameKey.String("ibm.db2") // [IBM Informix] // Stability: development // // [IBM Informix]: https://www.ibm.com/products/informix - DBSystemNameIbmInformix = DBSystemNameKey.String("ibm.informix") + DBSystemNameIBMInformix = DBSystemNameKey.String("ibm.informix") // [IBM Netezza] // Stability: development // // [IBM Netezza]: https://www.ibm.com/products/netezza - DBSystemNameIbmNetezza = DBSystemNameKey.String("ibm.netezza") + DBSystemNameIBMNetezza = DBSystemNameKey.String("ibm.netezza") // [InfluxDB] // Stability: development // // [InfluxDB]: https://www.influxdata.com/ - DBSystemNameInfluxdb = DBSystemNameKey.String("influxdb") + DBSystemNameInfluxDB = DBSystemNameKey.String("influxdb") // [Instant] // Stability: development // // [Instant]: https://www.instantdb.com/ DBSystemNameInstantDB = DBSystemNameKey.String("instantdb") // [MariaDB] - // Stability: release_candidate + // Stability: stable // // [MariaDB]: https://mariadb.org/ DBSystemNameMariaDB = DBSystemNameKey.String("mariadb") @@ -3407,12 +4007,12 @@ var ( // [MongoDB]: https://www.mongodb.com/ DBSystemNameMongoDB = DBSystemNameKey.String("mongodb") // [Microsoft SQL Server] - // Stability: release_candidate + // Stability: stable // // [Microsoft SQL Server]: https://www.microsoft.com/sql-server DBSystemNameMicrosoftSQLServer = DBSystemNameKey.String("microsoft.sql_server") // [MySQL] - // Stability: release_candidate + // Stability: stable // // [MySQL]: https://www.mysql.com/ DBSystemNameMySQL = DBSystemNameKey.String("mysql") @@ -3425,14 +4025,14 @@ var ( // Stability: development // // [OpenSearch]: https://opensearch.org/ - DBSystemNameOpensearch = DBSystemNameKey.String("opensearch") + DBSystemNameOpenSearch = DBSystemNameKey.String("opensearch") // [Oracle Database] // Stability: development // // [Oracle Database]: https://www.oracle.com/database/ DBSystemNameOracleDB = DBSystemNameKey.String("oracle.db") // [PostgreSQL] - // Stability: release_candidate + // Stability: stable // // [PostgreSQL]: https://www.postgresql.org/ DBSystemNamePostgreSQL = DBSystemNameKey.String("postgresql") @@ -3445,17 +4045,17 @@ var ( // Stability: development // // [SAP HANA]: https://www.sap.com/products/technology-platform/hana/what-is-sap-hana.html - DBSystemNameSapHana = DBSystemNameKey.String("sap.hana") + DBSystemNameSAPHANA = DBSystemNameKey.String("sap.hana") // [SAP MaxDB] // Stability: development // // [SAP MaxDB]: https://maxdb.sap.com/ - DBSystemNameSapMaxDB = DBSystemNameKey.String("sap.maxdb") + DBSystemNameSAPMaxDB = DBSystemNameKey.String("sap.maxdb") // [SQLite] // Stability: development // // [SQLite]: https://www.sqlite.org/ - DBSystemNameSqlite = DBSystemNameKey.String("sqlite") + DBSystemNameSQLite = DBSystemNameKey.String("sqlite") // [Teradata] // Stability: development // @@ -3610,19 +4210,31 @@ const ( // RequirementLevel: Recommended // Stability: Development // - // Examples: "2ab2916d-a51f-4ac8-80ee-45ac31a28092" - // Note: The device identifier MUST only be defined using the values outlined - // below. This value is not an advertising identifier and MUST NOT be used as - // such. On iOS (Swift or Objective-C), this value MUST be equal to the - // [vendor identifier]. On Android (Java or Kotlin), this value MUST be equal to - // the Firebase Installation ID or a globally unique UUID which is persisted - // across sessions in your application. More information can be found [here] on - // best practices and exact implementation details. Caution should be taken when - // storing personal data or anything which can identify a user. GDPR and data - // protection laws may apply, ensure you do your own due diligence. - // - // [vendor identifier]: https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor + // Examples: "123456789012345", "01:23:45:67:89:AB" + // Note: Its value SHOULD be identical for all apps on a device and it SHOULD + // NOT change if an app is uninstalled and re-installed. + // However, it might be resettable by the user for all apps on a device. + // Hardware IDs (e.g. vendor-specific serial number, IMEI or MAC address) MAY be + // used as values. + // + // More information about Android identifier best practices can be found [here] + // . + // + // > [!WARNING]> This attribute may contain sensitive (PII) information. Caution + // > should be taken when storing personal data or anything which can identify a + // > user. GDPR and data protection laws may apply, + // > ensure you do your own due diligence.> Due to these reasons, this + // > identifier is not recommended for consumer applications and will likely + // > result in rejection from both Google Play and App Store. + // > However, it may be appropriate for specific enterprise scenarios, such as + // > kiosk devices or enterprise-managed devices, with appropriate compliance + // > clearance. + // > Any instrumentation providing this identifier MUST implement it as an + // > opt-in feature.> See [`app.installation.id`]> for a more + // > privacy-preserving alternative. + // // [here]: https://developer.android.com/training/articles/user-data-ids + // [`app.installation.id`]: /docs/registry/attributes/app.md#app-installation-id DeviceIDKey = attribute.Key("device.id") // DeviceManufacturerKey is the attribute Key conforming to the @@ -3696,7 +4308,7 @@ func DeviceModelName(val string) attribute.KeyValue { // Namespace: disk const ( - // DiskIoDirectionKey is the attribute Key conforming to the "disk.io.direction" + // DiskIODirectionKey is the attribute Key conforming to the "disk.io.direction" // semantic conventions. It represents the disk IO operation direction. // // Type: Enum @@ -3704,17 +4316,17 @@ const ( // Stability: Development // // Examples: "read" - DiskIoDirectionKey = attribute.Key("disk.io.direction") + DiskIODirectionKey = attribute.Key("disk.io.direction") ) // Enum values for disk.io.direction var ( // read // Stability: development - DiskIoDirectionRead = DiskIoDirectionKey.String("read") + DiskIODirectionRead = DiskIODirectionKey.String("read") // write // Stability: development - DiskIoDirectionWrite = DiskIoDirectionKey.String("write") + DiskIODirectionWrite = DiskIODirectionKey.String("write") ) // Namespace: dns @@ -3764,8 +4376,78 @@ func ElasticsearchNodeName(val string) attribute.KeyValue { return ElasticsearchNodeNameKey.String(val) } +// Namespace: enduser +const ( + // EnduserIDKey is the attribute Key conforming to the "enduser.id" semantic + // conventions. It represents the unique identifier of an end user in the + // system. It maybe a username, email address, or other identifier. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "username" + // Note: Unique identifier of an end user in the system. + // + // > [!Warning] + // > This field contains sensitive (PII) information. + EnduserIDKey = attribute.Key("enduser.id") + + // EnduserPseudoIDKey is the attribute Key conforming to the "enduser.pseudo.id" + // semantic conventions. It represents the pseudonymous identifier of an end + // user. This identifier should be a random value that is not directly linked or + // associated with the end user's actual identity. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "QdH5CAWJgqVT4rOr0qtumf" + // Note: Pseudonymous identifier of an end user. + // + // > [!Warning] + // > This field contains sensitive (linkable PII) information. + EnduserPseudoIDKey = attribute.Key("enduser.pseudo.id") +) + +// EnduserID returns an attribute KeyValue conforming to the "enduser.id" +// semantic conventions. It represents the unique identifier of an end user in +// the system. It maybe a username, email address, or other identifier. +func EnduserID(val string) attribute.KeyValue { + return EnduserIDKey.String(val) +} + +// EnduserPseudoID returns an attribute KeyValue conforming to the +// "enduser.pseudo.id" semantic conventions. It represents the pseudonymous +// identifier of an end user. This identifier should be a random value that is +// not directly linked or associated with the end user's actual identity. +func EnduserPseudoID(val string) attribute.KeyValue { + return EnduserPseudoIDKey.String(val) +} + // Namespace: error const ( + // ErrorMessageKey is the attribute Key conforming to the "error.message" + // semantic conventions. It represents a message providing more detail about an + // error in human-readable form. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Unexpected input type: string", "The user has exceeded their + // storage quota" + // Note: `error.message` should provide additional context and detail about an + // error. + // It is NOT RECOMMENDED to duplicate the value of `error.type` in + // `error.message`. + // It is also NOT RECOMMENDED to duplicate the value of `exception.message` in + // `error.message`. + // + // `error.message` is NOT RECOMMENDED for metrics or spans due to its unbounded + // cardinality and overlap with span status. + ErrorMessageKey = attribute.Key("error.message") + // ErrorTypeKey is the attribute Key conforming to the "error.type" semantic // conventions. It represents the describes a class of error the operation ended // with. @@ -3805,6 +4487,13 @@ const ( ErrorTypeKey = attribute.Key("error.type") ) +// ErrorMessage returns an attribute KeyValue conforming to the "error.message" +// semantic conventions. It represents a message providing more detail about an +// error in human-readable form. +func ErrorMessage(val string) attribute.KeyValue { + return ErrorMessageKey.String(val) +} + // Enum values for error.type var ( // A fallback error value to be used when the instrumentation doesn't define a @@ -4258,7 +4947,7 @@ var ( FaaSTriggerHTTP = FaaSTriggerKey.String("http") // A function is set to be executed when messages are sent to a messaging system // Stability: development - FaaSTriggerPubsub = FaaSTriggerKey.String("pubsub") + FaaSTriggerPubSub = FaaSTriggerKey.String("pubsub") // A function is scheduled to be executed regularly // Stability: development FaaSTriggerTimer = FaaSTriggerKey.String("timer") @@ -4280,29 +4969,6 @@ const ( // Examples: "5157782b-2203-4c80-a857-dbbd5e7761db" FeatureFlagContextIDKey = attribute.Key("feature_flag.context.id") - // FeatureFlagEvaluationErrorMessageKey is the attribute Key conforming to the - // "feature_flag.evaluation.error.message" semantic conventions. It represents a - // message explaining the nature of an error occurring during flag evaluation. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Flag `header-color` expected type `string` but found type `number` - // " - FeatureFlagEvaluationErrorMessageKey = attribute.Key("feature_flag.evaluation.error.message") - - // FeatureFlagEvaluationReasonKey is the attribute Key conforming to the - // "feature_flag.evaluation.reason" semantic conventions. It represents the - // reason code which shows how a feature flag value was determined. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "static", "targeting_match", "error", "default" - FeatureFlagEvaluationReasonKey = attribute.Key("feature_flag.evaluation.reason") - // FeatureFlagKeyKey is the attribute Key conforming to the "feature_flag.key" // semantic conventions. It represents the lookup key of the feature flag. // @@ -4314,7 +4980,7 @@ const ( FeatureFlagKeyKey = attribute.Key("feature_flag.key") // FeatureFlagProviderNameKey is the attribute Key conforming to the - // "feature_flag.provider_name" semantic conventions. It represents the + // "feature_flag.provider.name" semantic conventions. It represents the // identifies the feature flag provider. // // Type: string @@ -4322,23 +4988,41 @@ const ( // Stability: Development // // Examples: "Flag Manager" - FeatureFlagProviderNameKey = attribute.Key("feature_flag.provider_name") + FeatureFlagProviderNameKey = attribute.Key("feature_flag.provider.name") - // FeatureFlagSetIDKey is the attribute Key conforming to the - // "feature_flag.set.id" semantic conventions. It represents the identifier of - // the [flag set] to which the feature flag belongs. + // FeatureFlagResultReasonKey is the attribute Key conforming to the + // "feature_flag.result.reason" semantic conventions. It represents the reason + // code which shows how a feature flag value was determined. // - // Type: string + // Type: Enum // RequirementLevel: Recommended // Stability: Development // - // Examples: "proj-1", "ab98sgs", "service1/dev" + // Examples: "static", "targeting_match", "error", "default" + FeatureFlagResultReasonKey = attribute.Key("feature_flag.result.reason") + + // FeatureFlagResultValueKey is the attribute Key conforming to the + // "feature_flag.result.value" semantic conventions. It represents the evaluated + // value of the feature flag. // - // [flag set]: https://openfeature.dev/specification/glossary/#flag-set - FeatureFlagSetIDKey = attribute.Key("feature_flag.set.id") + // Type: any + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "#ff0000", true, 3 + // Note: With some feature flag providers, feature flag results can be quite + // large or contain private or sensitive details. + // Because of this, `feature_flag.result.variant` is often the preferred + // attribute if it is available. + // + // It may be desirable to redact or otherwise limit the size and scope of + // `feature_flag.result.value` if possible. + // Because the evaluated flag value is unstructured and may be any type, it is + // left to the instrumentation author to determine how best to achieve this. + FeatureFlagResultValueKey = attribute.Key("feature_flag.result.value") - // FeatureFlagVariantKey is the attribute Key conforming to the - // "feature_flag.variant" semantic conventions. It represents a semantic + // FeatureFlagResultVariantKey is the attribute Key conforming to the + // "feature_flag.result.variant" semantic conventions. It represents a semantic // identifier for an evaluated flag value. // // Type: string @@ -4351,7 +5035,20 @@ const ( // for referring to a value without including the value itself. This can // provide additional context for understanding the meaning behind a value. // For example, the variant `red` maybe be used for the value `#c05543`. - FeatureFlagVariantKey = attribute.Key("feature_flag.variant") + FeatureFlagResultVariantKey = attribute.Key("feature_flag.result.variant") + + // FeatureFlagSetIDKey is the attribute Key conforming to the + // "feature_flag.set.id" semantic conventions. It represents the identifier of + // the [flag set] to which the feature flag belongs. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "proj-1", "ab98sgs", "service1/dev" + // + // [flag set]: https://openfeature.dev/specification/glossary/#flag-set + FeatureFlagSetIDKey = attribute.Key("feature_flag.set.id") // FeatureFlagVersionKey is the attribute Key conforming to the // "feature_flag.version" semantic conventions. It represents the version of the @@ -4373,14 +5070,6 @@ func FeatureFlagContextID(val string) attribute.KeyValue { return FeatureFlagContextIDKey.String(val) } -// FeatureFlagEvaluationErrorMessage returns an attribute KeyValue conforming to -// the "feature_flag.evaluation.error.message" semantic conventions. It -// represents a message explaining the nature of an error occurring during flag -// evaluation. -func FeatureFlagEvaluationErrorMessage(val string) attribute.KeyValue { - return FeatureFlagEvaluationErrorMessageKey.String(val) -} - // FeatureFlagKey returns an attribute KeyValue conforming to the // "feature_flag.key" semantic conventions. It represents the lookup key of the // feature flag. @@ -4389,12 +5078,19 @@ func FeatureFlagKey(val string) attribute.KeyValue { } // FeatureFlagProviderName returns an attribute KeyValue conforming to the -// "feature_flag.provider_name" semantic conventions. It represents the +// "feature_flag.provider.name" semantic conventions. It represents the // identifies the feature flag provider. func FeatureFlagProviderName(val string) attribute.KeyValue { return FeatureFlagProviderNameKey.String(val) } +// FeatureFlagResultVariant returns an attribute KeyValue conforming to the +// "feature_flag.result.variant" semantic conventions. It represents a semantic +// identifier for an evaluated flag value. +func FeatureFlagResultVariant(val string) attribute.KeyValue { + return FeatureFlagResultVariantKey.String(val) +} + // FeatureFlagSetID returns an attribute KeyValue conforming to the // "feature_flag.set.id" semantic conventions. It represents the identifier of // the [flag set] to which the feature flag belongs. @@ -4404,13 +5100,6 @@ func FeatureFlagSetID(val string) attribute.KeyValue { return FeatureFlagSetIDKey.String(val) } -// FeatureFlagVariant returns an attribute KeyValue conforming to the -// "feature_flag.variant" semantic conventions. It represents a semantic -// identifier for an evaluated flag value. -func FeatureFlagVariant(val string) attribute.KeyValue { - return FeatureFlagVariantKey.String(val) -} - // FeatureFlagVersion returns an attribute KeyValue conforming to the // "feature_flag.version" semantic conventions. It represents the version of the // ruleset used during the evaluation. This may be any stable value which @@ -4419,38 +5108,38 @@ func FeatureFlagVersion(val string) attribute.KeyValue { return FeatureFlagVersionKey.String(val) } -// Enum values for feature_flag.evaluation.reason +// Enum values for feature_flag.result.reason var ( // The resolved value is static (no dynamic evaluation). // Stability: development - FeatureFlagEvaluationReasonStatic = FeatureFlagEvaluationReasonKey.String("static") + FeatureFlagResultReasonStatic = FeatureFlagResultReasonKey.String("static") // The resolved value fell back to a pre-configured value (no dynamic evaluation // occurred or dynamic evaluation yielded no result). // Stability: development - FeatureFlagEvaluationReasonDefault = FeatureFlagEvaluationReasonKey.String("default") + FeatureFlagResultReasonDefault = FeatureFlagResultReasonKey.String("default") // The resolved value was the result of a dynamic evaluation, such as a rule or // specific user-targeting. // Stability: development - FeatureFlagEvaluationReasonTargetingMatch = FeatureFlagEvaluationReasonKey.String("targeting_match") + FeatureFlagResultReasonTargetingMatch = FeatureFlagResultReasonKey.String("targeting_match") // The resolved value was the result of pseudorandom assignment. // Stability: development - FeatureFlagEvaluationReasonSplit = FeatureFlagEvaluationReasonKey.String("split") + FeatureFlagResultReasonSplit = FeatureFlagResultReasonKey.String("split") // The resolved value was retrieved from cache. // Stability: development - FeatureFlagEvaluationReasonCached = FeatureFlagEvaluationReasonKey.String("cached") + FeatureFlagResultReasonCached = FeatureFlagResultReasonKey.String("cached") // The resolved value was the result of the flag being disabled in the // management system. // Stability: development - FeatureFlagEvaluationReasonDisabled = FeatureFlagEvaluationReasonKey.String("disabled") + FeatureFlagResultReasonDisabled = FeatureFlagResultReasonKey.String("disabled") // The reason for the resolved value could not be determined. // Stability: development - FeatureFlagEvaluationReasonUnknown = FeatureFlagEvaluationReasonKey.String("unknown") + FeatureFlagResultReasonUnknown = FeatureFlagResultReasonKey.String("unknown") // The resolved value is non-authoritative or possibly out of date // Stability: development - FeatureFlagEvaluationReasonStale = FeatureFlagEvaluationReasonKey.String("stale") + FeatureFlagResultReasonStale = FeatureFlagResultReasonKey.String("stale") // The resolved value was the result of an error. // Stability: development - FeatureFlagEvaluationReasonError = FeatureFlagEvaluationReasonKey.String("error") + FeatureFlagResultReasonError = FeatureFlagResultReasonKey.String("error") ) // Namespace: file @@ -4798,6 +5487,117 @@ func FileSymbolicLinkTargetPath(val string) attribute.KeyValue { // Namespace: gcp const ( + // GCPAppHubApplicationContainerKey is the attribute Key conforming to the + // "gcp.apphub.application.container" semantic conventions. It represents the + // container within GCP where the AppHub application is defined. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "projects/my-container-project" + GCPAppHubApplicationContainerKey = attribute.Key("gcp.apphub.application.container") + + // GCPAppHubApplicationIDKey is the attribute Key conforming to the + // "gcp.apphub.application.id" semantic conventions. It represents the name of + // the application as configured in AppHub. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "my-application" + GCPAppHubApplicationIDKey = attribute.Key("gcp.apphub.application.id") + + // GCPAppHubApplicationLocationKey is the attribute Key conforming to the + // "gcp.apphub.application.location" semantic conventions. It represents the GCP + // zone or region where the application is defined. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "us-central1" + GCPAppHubApplicationLocationKey = attribute.Key("gcp.apphub.application.location") + + // GCPAppHubServiceCriticalityTypeKey is the attribute Key conforming to the + // "gcp.apphub.service.criticality_type" semantic conventions. It represents the + // criticality of a service indicates its importance to the business. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // Note: [See AppHub type enum] + // + // [See AppHub type enum]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type + GCPAppHubServiceCriticalityTypeKey = attribute.Key("gcp.apphub.service.criticality_type") + + // GCPAppHubServiceEnvironmentTypeKey is the attribute Key conforming to the + // "gcp.apphub.service.environment_type" semantic conventions. It represents the + // environment of a service is the stage of a software lifecycle. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // Note: [See AppHub environment type] + // + // [See AppHub environment type]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1 + GCPAppHubServiceEnvironmentTypeKey = attribute.Key("gcp.apphub.service.environment_type") + + // GCPAppHubServiceIDKey is the attribute Key conforming to the + // "gcp.apphub.service.id" semantic conventions. It represents the name of the + // service as configured in AppHub. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "my-service" + GCPAppHubServiceIDKey = attribute.Key("gcp.apphub.service.id") + + // GCPAppHubWorkloadCriticalityTypeKey is the attribute Key conforming to the + // "gcp.apphub.workload.criticality_type" semantic conventions. It represents + // the criticality of a workload indicates its importance to the business. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // Note: [See AppHub type enum] + // + // [See AppHub type enum]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type + GCPAppHubWorkloadCriticalityTypeKey = attribute.Key("gcp.apphub.workload.criticality_type") + + // GCPAppHubWorkloadEnvironmentTypeKey is the attribute Key conforming to the + // "gcp.apphub.workload.environment_type" semantic conventions. It represents + // the environment of a workload is the stage of a software lifecycle. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // Note: [See AppHub environment type] + // + // [See AppHub environment type]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1 + GCPAppHubWorkloadEnvironmentTypeKey = attribute.Key("gcp.apphub.workload.environment_type") + + // GCPAppHubWorkloadIDKey is the attribute Key conforming to the + // "gcp.apphub.workload.id" semantic conventions. It represents the name of the + // workload as configured in AppHub. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "my-workload" + GCPAppHubWorkloadIDKey = attribute.Key("gcp.apphub.workload.id") + // GCPClientServiceKey is the attribute Key conforming to the // "gcp.client.service" semantic conventions. It represents the identifies the // Google Cloud service for which the official client library is intended. @@ -4842,7 +5642,7 @@ const ( // [`CLOUD_RUN_TASK_INDEX`]: https://cloud.google.com/run/docs/container-contract#jobs-env-vars GCPCloudRunJobTaskIndexKey = attribute.Key("gcp.cloud_run.job.task_index") - // GCPGceInstanceHostnameKey is the attribute Key conforming to the + // GCPGCEInstanceHostnameKey is the attribute Key conforming to the // "gcp.gce.instance.hostname" semantic conventions. It represents the hostname // of a GCE instance. This is the full value of the default or [custom hostname] // . @@ -4855,9 +5655,9 @@ const ( // "sample-vm.us-west1-b.c.my-project.internal" // // [custom hostname]: https://cloud.google.com/compute/docs/instances/custom-hostname-vm - GCPGceInstanceHostnameKey = attribute.Key("gcp.gce.instance.hostname") + GCPGCEInstanceHostnameKey = attribute.Key("gcp.gce.instance.hostname") - // GCPGceInstanceNameKey is the attribute Key conforming to the + // GCPGCEInstanceNameKey is the attribute Key conforming to the // "gcp.gce.instance.name" semantic conventions. It represents the instance name // of a GCE instance. This is the value provided by `host.name`, the visible // name of the instance in the Cloud Console UI, and the prefix for the default @@ -4870,9 +5670,44 @@ const ( // Examples: "instance-1", "my-vm-name" // // [default internal DNS name]: https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names - GCPGceInstanceNameKey = attribute.Key("gcp.gce.instance.name") + GCPGCEInstanceNameKey = attribute.Key("gcp.gce.instance.name") ) +// GCPAppHubApplicationContainer returns an attribute KeyValue conforming to the +// "gcp.apphub.application.container" semantic conventions. It represents the +// container within GCP where the AppHub application is defined. +func GCPAppHubApplicationContainer(val string) attribute.KeyValue { + return GCPAppHubApplicationContainerKey.String(val) +} + +// GCPAppHubApplicationID returns an attribute KeyValue conforming to the +// "gcp.apphub.application.id" semantic conventions. It represents the name of +// the application as configured in AppHub. +func GCPAppHubApplicationID(val string) attribute.KeyValue { + return GCPAppHubApplicationIDKey.String(val) +} + +// GCPAppHubApplicationLocation returns an attribute KeyValue conforming to the +// "gcp.apphub.application.location" semantic conventions. It represents the GCP +// zone or region where the application is defined. +func GCPAppHubApplicationLocation(val string) attribute.KeyValue { + return GCPAppHubApplicationLocationKey.String(val) +} + +// GCPAppHubServiceID returns an attribute KeyValue conforming to the +// "gcp.apphub.service.id" semantic conventions. It represents the name of the +// service as configured in AppHub. +func GCPAppHubServiceID(val string) attribute.KeyValue { + return GCPAppHubServiceIDKey.String(val) +} + +// GCPAppHubWorkloadID returns an attribute KeyValue conforming to the +// "gcp.apphub.workload.id" semantic conventions. It represents the name of the +// workload as configured in AppHub. +func GCPAppHubWorkloadID(val string) attribute.KeyValue { + return GCPAppHubWorkloadIDKey.String(val) +} + // GCPClientService returns an attribute KeyValue conforming to the // "gcp.client.service" semantic conventions. It represents the identifies the // Google Cloud service for which the official client library is intended. @@ -4901,41 +5736,157 @@ func GCPCloudRunJobTaskIndex(val int) attribute.KeyValue { return GCPCloudRunJobTaskIndexKey.Int(val) } -// GCPGceInstanceHostname returns an attribute KeyValue conforming to the +// GCPGCEInstanceHostname returns an attribute KeyValue conforming to the // "gcp.gce.instance.hostname" semantic conventions. It represents the hostname // of a GCE instance. This is the full value of the default or [custom hostname] // . // // [custom hostname]: https://cloud.google.com/compute/docs/instances/custom-hostname-vm -func GCPGceInstanceHostname(val string) attribute.KeyValue { - return GCPGceInstanceHostnameKey.String(val) +func GCPGCEInstanceHostname(val string) attribute.KeyValue { + return GCPGCEInstanceHostnameKey.String(val) } -// GCPGceInstanceName returns an attribute KeyValue conforming to the +// GCPGCEInstanceName returns an attribute KeyValue conforming to the // "gcp.gce.instance.name" semantic conventions. It represents the instance name // of a GCE instance. This is the value provided by `host.name`, the visible name // of the instance in the Cloud Console UI, and the prefix for the default // hostname of the instance as defined by the [default internal DNS name]. // // [default internal DNS name]: https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names -func GCPGceInstanceName(val string) attribute.KeyValue { - return GCPGceInstanceNameKey.String(val) +func GCPGCEInstanceName(val string) attribute.KeyValue { + return GCPGCEInstanceNameKey.String(val) } +// Enum values for gcp.apphub.service.criticality_type +var ( + // Mission critical service. + // Stability: development + GCPAppHubServiceCriticalityTypeMissionCritical = GCPAppHubServiceCriticalityTypeKey.String("MISSION_CRITICAL") + // High impact. + // Stability: development + GCPAppHubServiceCriticalityTypeHigh = GCPAppHubServiceCriticalityTypeKey.String("HIGH") + // Medium impact. + // Stability: development + GCPAppHubServiceCriticalityTypeMedium = GCPAppHubServiceCriticalityTypeKey.String("MEDIUM") + // Low impact. + // Stability: development + GCPAppHubServiceCriticalityTypeLow = GCPAppHubServiceCriticalityTypeKey.String("LOW") +) + +// Enum values for gcp.apphub.service.environment_type +var ( + // Production environment. + // Stability: development + GCPAppHubServiceEnvironmentTypeProduction = GCPAppHubServiceEnvironmentTypeKey.String("PRODUCTION") + // Staging environment. + // Stability: development + GCPAppHubServiceEnvironmentTypeStaging = GCPAppHubServiceEnvironmentTypeKey.String("STAGING") + // Test environment. + // Stability: development + GCPAppHubServiceEnvironmentTypeTest = GCPAppHubServiceEnvironmentTypeKey.String("TEST") + // Development environment. + // Stability: development + GCPAppHubServiceEnvironmentTypeDevelopment = GCPAppHubServiceEnvironmentTypeKey.String("DEVELOPMENT") +) + +// Enum values for gcp.apphub.workload.criticality_type +var ( + // Mission critical service. + // Stability: development + GCPAppHubWorkloadCriticalityTypeMissionCritical = GCPAppHubWorkloadCriticalityTypeKey.String("MISSION_CRITICAL") + // High impact. + // Stability: development + GCPAppHubWorkloadCriticalityTypeHigh = GCPAppHubWorkloadCriticalityTypeKey.String("HIGH") + // Medium impact. + // Stability: development + GCPAppHubWorkloadCriticalityTypeMedium = GCPAppHubWorkloadCriticalityTypeKey.String("MEDIUM") + // Low impact. + // Stability: development + GCPAppHubWorkloadCriticalityTypeLow = GCPAppHubWorkloadCriticalityTypeKey.String("LOW") +) + +// Enum values for gcp.apphub.workload.environment_type +var ( + // Production environment. + // Stability: development + GCPAppHubWorkloadEnvironmentTypeProduction = GCPAppHubWorkloadEnvironmentTypeKey.String("PRODUCTION") + // Staging environment. + // Stability: development + GCPAppHubWorkloadEnvironmentTypeStaging = GCPAppHubWorkloadEnvironmentTypeKey.String("STAGING") + // Test environment. + // Stability: development + GCPAppHubWorkloadEnvironmentTypeTest = GCPAppHubWorkloadEnvironmentTypeKey.String("TEST") + // Development environment. + // Stability: development + GCPAppHubWorkloadEnvironmentTypeDevelopment = GCPAppHubWorkloadEnvironmentTypeKey.String("DEVELOPMENT") +) + // Namespace: gen_ai const ( - // GenAIOpenaiRequestResponseFormatKey is the attribute Key conforming to the - // "gen_ai.openai.request.response_format" semantic conventions. It represents - // the response format that is requested. + // GenAIAgentDescriptionKey is the attribute Key conforming to the + // "gen_ai.agent.description" semantic conventions. It represents the free-form + // description of the GenAI agent provided by the application. // - // Type: Enum + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Helps with math problems", "Generates fiction stories" + GenAIAgentDescriptionKey = attribute.Key("gen_ai.agent.description") + + // GenAIAgentIDKey is the attribute Key conforming to the "gen_ai.agent.id" + // semantic conventions. It represents the unique identifier of the GenAI agent. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "asst_5j66UpCpwteGg4YSxUnt7lPY" + GenAIAgentIDKey = attribute.Key("gen_ai.agent.id") + + // GenAIAgentNameKey is the attribute Key conforming to the "gen_ai.agent.name" + // semantic conventions. It represents the human-readable name of the GenAI + // agent provided by the application. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Math Tutor", "Fiction Writer" + GenAIAgentNameKey = attribute.Key("gen_ai.agent.name") + + // GenAIConversationIDKey is the attribute Key conforming to the + // "gen_ai.conversation.id" semantic conventions. It represents the unique + // identifier for a conversation (session, thread), used to store and correlate + // messages within this conversation. + // + // Type: string // RequirementLevel: Recommended // Stability: Development // - // Examples: "json" - GenAIOpenaiRequestResponseFormatKey = attribute.Key("gen_ai.openai.request.response_format") + // Examples: "conv_5j66UpCpwteGg4YSxUnt7lPY" + GenAIConversationIDKey = attribute.Key("gen_ai.conversation.id") - // GenAIOpenaiRequestServiceTierKey is the attribute Key conforming to the + // GenAIDataSourceIDKey is the attribute Key conforming to the + // "gen_ai.data_source.id" semantic conventions. It represents the data source + // identifier. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "H7STPQYOND" + // Note: Data sources are used by AI agents and RAG applications to store + // grounding data. A data source may be an external database, object store, + // document collection, website, or any other storage system used by the GenAI + // agent or application. The `gen_ai.data_source.id` SHOULD match the identifier + // used by the GenAI system rather than a name specific to the external storage, + // such as a database or object store. Semantic conventions referencing + // `gen_ai.data_source.id` MAY also leverage additional attributes, such as + // `db.*`, to further identify and describe the data source. + GenAIDataSourceIDKey = attribute.Key("gen_ai.data_source.id") + + // GenAIOpenAIRequestServiceTierKey is the attribute Key conforming to the // "gen_ai.openai.request.service_tier" semantic conventions. It represents the // service tier requested. May be a specific tier, default, or auto. // @@ -4944,9 +5895,9 @@ const ( // Stability: Development // // Examples: "auto", "default" - GenAIOpenaiRequestServiceTierKey = attribute.Key("gen_ai.openai.request.service_tier") + GenAIOpenAIRequestServiceTierKey = attribute.Key("gen_ai.openai.request.service_tier") - // GenAIOpenaiResponseServiceTierKey is the attribute Key conforming to the + // GenAIOpenAIResponseServiceTierKey is the attribute Key conforming to the // "gen_ai.openai.response.service_tier" semantic conventions. It represents the // service tier used for the response. // @@ -4955,9 +5906,9 @@ const ( // Stability: Development // // Examples: "scale", "default" - GenAIOpenaiResponseServiceTierKey = attribute.Key("gen_ai.openai.response.service_tier") + GenAIOpenAIResponseServiceTierKey = attribute.Key("gen_ai.openai.response.service_tier") - // GenAIOpenaiResponseSystemFingerprintKey is the attribute Key conforming to + // GenAIOpenAIResponseSystemFingerprintKey is the attribute Key conforming to // the "gen_ai.openai.response.system_fingerprint" semantic conventions. It // represents a fingerprint to track any eventual change in the Generative AI // environment. @@ -4967,7 +5918,7 @@ const ( // Stability: Development // // Examples: "fp_44709d6fcb" - GenAIOpenaiResponseSystemFingerprintKey = attribute.Key("gen_ai.openai.response.system_fingerprint") + GenAIOpenAIResponseSystemFingerprintKey = attribute.Key("gen_ai.openai.response.system_fingerprint") // GenAIOperationNameKey is the attribute Key conforming to the // "gen_ai.operation.name" semantic conventions. It represents the name of the @@ -4985,6 +5936,35 @@ const ( // libraries SHOULD use applicable predefined value. GenAIOperationNameKey = attribute.Key("gen_ai.operation.name") + // GenAIOutputTypeKey is the attribute Key conforming to the + // "gen_ai.output.type" semantic conventions. It represents the represents the + // content type requested by the client. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // Note: This attribute SHOULD be used when the client requests output of a + // specific type. The model may return zero or more outputs of this type. + // This attribute specifies the output modality and not the actual output + // format. For example, if an image is requested, the actual output could be a + // URL pointing to an image file. + // Additional output format details may be recorded in the future in the + // `gen_ai.output.{type}.*` attributes. + GenAIOutputTypeKey = attribute.Key("gen_ai.output.type") + + // GenAIRequestChoiceCountKey is the attribute Key conforming to the + // "gen_ai.request.choice.count" semantic conventions. It represents the target + // number of candidate completions to return. + // + // Type: int + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: 3 + GenAIRequestChoiceCountKey = attribute.Key("gen_ai.request.choice.count") + // GenAIRequestEncodingFormatsKey is the attribute Key conforming to the // "gen_ai.request.encoding_formats" semantic conventions. It represents the // encoding formats requested in an embeddings operation, if specified. @@ -5167,6 +6147,61 @@ const ( // Examples: "input", "output" GenAITokenTypeKey = attribute.Key("gen_ai.token.type") + // GenAIToolCallIDKey is the attribute Key conforming to the + // "gen_ai.tool.call.id" semantic conventions. It represents the tool call + // identifier. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "call_mszuSIzqtI65i1wAUOE8w5H4" + GenAIToolCallIDKey = attribute.Key("gen_ai.tool.call.id") + + // GenAIToolDescriptionKey is the attribute Key conforming to the + // "gen_ai.tool.description" semantic conventions. It represents the tool + // description. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Multiply two numbers" + GenAIToolDescriptionKey = attribute.Key("gen_ai.tool.description") + + // GenAIToolNameKey is the attribute Key conforming to the "gen_ai.tool.name" + // semantic conventions. It represents the name of the tool utilized by the + // agent. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "Flights" + GenAIToolNameKey = attribute.Key("gen_ai.tool.name") + + // GenAIToolTypeKey is the attribute Key conforming to the "gen_ai.tool.type" + // semantic conventions. It represents the type of the tool utilized by the + // agent. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "function", "extension", "datastore" + // Note: Extension: A tool executed on the agent-side to directly call external + // APIs, bridging the gap between the agent and real-world systems. + // Agent-side operations involve actions that are performed by the agent on the + // server or within the agent's controlled environment. + // Function: A tool executed on the client-side, where the agent generates + // parameters for a predefined function, and the client executes the logic. + // Client-side operations are actions taken on the user's end or within the + // client application. + // Datastore: A tool used by the agent to access and query structured or + // unstructured external data for retrieval-augmented tasks or knowledge + // updates. + GenAIToolTypeKey = attribute.Key("gen_ai.tool.type") + // GenAIUsageInputTokensKey is the attribute Key conforming to the // "gen_ai.usage.input_tokens" semantic conventions. It represents the number of // tokens used in the GenAI input (prompt). @@ -5190,19 +6225,61 @@ const ( GenAIUsageOutputTokensKey = attribute.Key("gen_ai.usage.output_tokens") ) -// GenAIOpenaiResponseServiceTier returns an attribute KeyValue conforming to the +// GenAIAgentDescription returns an attribute KeyValue conforming to the +// "gen_ai.agent.description" semantic conventions. It represents the free-form +// description of the GenAI agent provided by the application. +func GenAIAgentDescription(val string) attribute.KeyValue { + return GenAIAgentDescriptionKey.String(val) +} + +// GenAIAgentID returns an attribute KeyValue conforming to the "gen_ai.agent.id" +// semantic conventions. It represents the unique identifier of the GenAI agent. +func GenAIAgentID(val string) attribute.KeyValue { + return GenAIAgentIDKey.String(val) +} + +// GenAIAgentName returns an attribute KeyValue conforming to the +// "gen_ai.agent.name" semantic conventions. It represents the human-readable +// name of the GenAI agent provided by the application. +func GenAIAgentName(val string) attribute.KeyValue { + return GenAIAgentNameKey.String(val) +} + +// GenAIConversationID returns an attribute KeyValue conforming to the +// "gen_ai.conversation.id" semantic conventions. It represents the unique +// identifier for a conversation (session, thread), used to store and correlate +// messages within this conversation. +func GenAIConversationID(val string) attribute.KeyValue { + return GenAIConversationIDKey.String(val) +} + +// GenAIDataSourceID returns an attribute KeyValue conforming to the +// "gen_ai.data_source.id" semantic conventions. It represents the data source +// identifier. +func GenAIDataSourceID(val string) attribute.KeyValue { + return GenAIDataSourceIDKey.String(val) +} + +// GenAIOpenAIResponseServiceTier returns an attribute KeyValue conforming to the // "gen_ai.openai.response.service_tier" semantic conventions. It represents the // service tier used for the response. -func GenAIOpenaiResponseServiceTier(val string) attribute.KeyValue { - return GenAIOpenaiResponseServiceTierKey.String(val) +func GenAIOpenAIResponseServiceTier(val string) attribute.KeyValue { + return GenAIOpenAIResponseServiceTierKey.String(val) } -// GenAIOpenaiResponseSystemFingerprint returns an attribute KeyValue conforming +// GenAIOpenAIResponseSystemFingerprint returns an attribute KeyValue conforming // to the "gen_ai.openai.response.system_fingerprint" semantic conventions. It // represents a fingerprint to track any eventual change in the Generative AI // environment. -func GenAIOpenaiResponseSystemFingerprint(val string) attribute.KeyValue { - return GenAIOpenaiResponseSystemFingerprintKey.String(val) +func GenAIOpenAIResponseSystemFingerprint(val string) attribute.KeyValue { + return GenAIOpenAIResponseSystemFingerprintKey.String(val) +} + +// GenAIRequestChoiceCount returns an attribute KeyValue conforming to the +// "gen_ai.request.choice.count" semantic conventions. It represents the target +// number of candidate completions to return. +func GenAIRequestChoiceCount(val int) attribute.KeyValue { + return GenAIRequestChoiceCountKey.Int(val) } // GenAIRequestEncodingFormats returns an attribute KeyValue conforming to the @@ -5297,6 +6374,34 @@ func GenAIResponseModel(val string) attribute.KeyValue { return GenAIResponseModelKey.String(val) } +// GenAIToolCallID returns an attribute KeyValue conforming to the +// "gen_ai.tool.call.id" semantic conventions. It represents the tool call +// identifier. +func GenAIToolCallID(val string) attribute.KeyValue { + return GenAIToolCallIDKey.String(val) +} + +// GenAIToolDescription returns an attribute KeyValue conforming to the +// "gen_ai.tool.description" semantic conventions. It represents the tool +// description. +func GenAIToolDescription(val string) attribute.KeyValue { + return GenAIToolDescriptionKey.String(val) +} + +// GenAIToolName returns an attribute KeyValue conforming to the +// "gen_ai.tool.name" semantic conventions. It represents the name of the tool +// utilized by the agent. +func GenAIToolName(val string) attribute.KeyValue { + return GenAIToolNameKey.String(val) +} + +// GenAIToolType returns an attribute KeyValue conforming to the +// "gen_ai.tool.type" semantic conventions. It represents the type of the tool +// utilized by the agent. +func GenAIToolType(val string) attribute.KeyValue { + return GenAIToolTypeKey.String(val) +} + // GenAIUsageInputTokens returns an attribute KeyValue conforming to the // "gen_ai.usage.input_tokens" semantic conventions. It represents the number of // tokens used in the GenAI input (prompt). @@ -5311,27 +6416,14 @@ func GenAIUsageOutputTokens(val int) attribute.KeyValue { return GenAIUsageOutputTokensKey.Int(val) } -// Enum values for gen_ai.openai.request.response_format -var ( - // Text response format - // Stability: development - GenAIOpenaiRequestResponseFormatText = GenAIOpenaiRequestResponseFormatKey.String("text") - // JSON object response format - // Stability: development - GenAIOpenaiRequestResponseFormatJSONObject = GenAIOpenaiRequestResponseFormatKey.String("json_object") - // JSON schema response format - // Stability: development - GenAIOpenaiRequestResponseFormatJSONSchema = GenAIOpenaiRequestResponseFormatKey.String("json_schema") -) - // Enum values for gen_ai.openai.request.service_tier var ( // The system will utilize scale tier credits until they are exhausted. // Stability: development - GenAIOpenaiRequestServiceTierAuto = GenAIOpenaiRequestServiceTierKey.String("auto") + GenAIOpenAIRequestServiceTierAuto = GenAIOpenAIRequestServiceTierKey.String("auto") // The system will utilize the default scale tier. // Stability: development - GenAIOpenaiRequestServiceTierDefault = GenAIOpenaiRequestServiceTierKey.String("default") + GenAIOpenAIRequestServiceTierDefault = GenAIOpenAIRequestServiceTierKey.String("default") ) // Enum values for gen_ai.operation.name @@ -5341,6 +6433,11 @@ var ( // // [OpenAI Chat API]: https://platform.openai.com/docs/api-reference/chat GenAIOperationNameChat = GenAIOperationNameKey.String("chat") + // Multimodal content generation operation such as [Gemini Generate Content] + // Stability: development + // + // [Gemini Generate Content]: https://ai.google.dev/api/generate-content + GenAIOperationNameGenerateContent = GenAIOperationNameKey.String("generate_content") // Text completions operation such as [OpenAI Completions API (Legacy)] // Stability: development // @@ -5351,18 +6448,50 @@ var ( // // [OpenAI Create embeddings API]: https://platform.openai.com/docs/api-reference/embeddings/create GenAIOperationNameEmbeddings = GenAIOperationNameKey.String("embeddings") + // Create GenAI agent + // Stability: development + GenAIOperationNameCreateAgent = GenAIOperationNameKey.String("create_agent") + // Invoke GenAI agent + // Stability: development + GenAIOperationNameInvokeAgent = GenAIOperationNameKey.String("invoke_agent") + // Execute a tool + // Stability: development + GenAIOperationNameExecuteTool = GenAIOperationNameKey.String("execute_tool") +) + +// Enum values for gen_ai.output.type +var ( + // Plain text + // Stability: development + GenAIOutputTypeText = GenAIOutputTypeKey.String("text") + // JSON object with known or unknown schema + // Stability: development + GenAIOutputTypeJSON = GenAIOutputTypeKey.String("json") + // Image + // Stability: development + GenAIOutputTypeImage = GenAIOutputTypeKey.String("image") + // Speech + // Stability: development + GenAIOutputTypeSpeech = GenAIOutputTypeKey.String("speech") ) // Enum values for gen_ai.system var ( // OpenAI // Stability: development - GenAISystemOpenai = GenAISystemKey.String("openai") + GenAISystemOpenAI = GenAISystemKey.String("openai") + // Any Google generative AI endpoint + // Stability: development + GenAISystemGCPGenAI = GenAISystemKey.String("gcp.gen_ai") // Vertex AI // Stability: development - GenAISystemVertexAI = GenAISystemKey.String("vertex_ai") + GenAISystemGCPVertexAI = GenAISystemKey.String("gcp.vertex_ai") // Gemini // Stability: development + GenAISystemGCPGemini = GenAISystemKey.String("gcp.gemini") + // Deprecated: Use 'gcp.vertex_ai' instead. + GenAISystemVertexAI = GenAISystemKey.String("vertex_ai") + // Deprecated: Use 'gcp.gemini' instead. GenAISystemGemini = GenAISystemKey.String("gemini") // Anthropic // Stability: development @@ -5375,10 +6504,10 @@ var ( GenAISystemAzAIInference = GenAISystemKey.String("az.ai.inference") // Azure OpenAI // Stability: development - GenAISystemAzAIOpenai = GenAISystemKey.String("az.ai.openai") + GenAISystemAzAIOpenAI = GenAISystemKey.String("az.ai.openai") // IBM Watsonx AI // Stability: development - GenAISystemIbmWatsonxAI = GenAISystemKey.String("ibm.watsonx.ai") + GenAISystemIBMWatsonxAI = GenAISystemKey.String("ibm.watsonx.ai") // AWS Bedrock // Stability: development GenAISystemAWSBedrock = GenAISystemKey.String("aws.bedrock") @@ -5404,9 +6533,11 @@ var ( // Input tokens (prompt, input, etc.) // Stability: development GenAITokenTypeInput = GenAITokenTypeKey.String("input") + // Deprecated: Replaced by `output`. + GenAITokenTypeCompletion = GenAITokenTypeKey.String("output") // Output tokens (completion, response, etc.) // Stability: development - GenAITokenTypeCompletion = GenAITokenTypeKey.String("output") + GenAITokenTypeOutput = GenAITokenTypeKey.String("output") ) // Namespace: geo @@ -5422,7 +6553,7 @@ const ( // Examples: GeoContinentCodeKey = attribute.Key("geo.continent.code") - // GeoCountryIsoCodeKey is the attribute Key conforming to the + // GeoCountryISOCodeKey is the attribute Key conforming to the // "geo.country.iso_code" semantic conventions. It represents the two-letter ISO // Country Code ([ISO 3166-1 alpha2]). // @@ -5433,7 +6564,7 @@ const ( // Examples: "CA" // // [ISO 3166-1 alpha2]: https://wikipedia.org/wiki/ISO_3166-1#Codes - GeoCountryIsoCodeKey = attribute.Key("geo.country.iso_code") + GeoCountryISOCodeKey = attribute.Key("geo.country.iso_code") // GeoLocalityNameKey is the attribute Key conforming to the "geo.locality.name" // semantic conventions. It represents the locality name. Represents the name of @@ -5484,7 +6615,7 @@ const ( // Examples: "94040" GeoPostalCodeKey = attribute.Key("geo.postal_code") - // GeoRegionIsoCodeKey is the attribute Key conforming to the + // GeoRegionISOCodeKey is the attribute Key conforming to the // "geo.region.iso_code" semantic conventions. It represents the region ISO code // ([ISO 3166-2]). // @@ -5495,16 +6626,16 @@ const ( // Examples: "CA-QC" // // [ISO 3166-2]: https://wikipedia.org/wiki/ISO_3166-2 - GeoRegionIsoCodeKey = attribute.Key("geo.region.iso_code") + GeoRegionISOCodeKey = attribute.Key("geo.region.iso_code") ) -// GeoCountryIsoCode returns an attribute KeyValue conforming to the +// GeoCountryISOCode returns an attribute KeyValue conforming to the // "geo.country.iso_code" semantic conventions. It represents the two-letter ISO // Country Code ([ISO 3166-1 alpha2]). // // [ISO 3166-1 alpha2]: https://wikipedia.org/wiki/ISO_3166-1#Codes -func GeoCountryIsoCode(val string) attribute.KeyValue { - return GeoCountryIsoCodeKey.String(val) +func GeoCountryISOCode(val string) attribute.KeyValue { + return GeoCountryISOCodeKey.String(val) } // GeoLocalityName returns an attribute KeyValue conforming to the @@ -5540,13 +6671,13 @@ func GeoPostalCode(val string) attribute.KeyValue { return GeoPostalCodeKey.String(val) } -// GeoRegionIsoCode returns an attribute KeyValue conforming to the +// GeoRegionISOCode returns an attribute KeyValue conforming to the // "geo.region.iso_code" semantic conventions. It represents the region ISO code // ([ISO 3166-2]). // // [ISO 3166-2]: https://wikipedia.org/wiki/ISO_3166-2 -func GeoRegionIsoCode(val string) attribute.KeyValue { - return GeoRegionIsoCodeKey.String(val) +func GeoRegionISOCode(val string) attribute.KeyValue { + return GeoRegionISOCodeKey.String(val) } // Enum values for geo.continent.code @@ -5601,7 +6732,7 @@ var ( // Namespace: graphql const ( - // GraphqlDocumentKey is the attribute Key conforming to the "graphql.document" + // GraphQLDocumentKey is the attribute Key conforming to the "graphql.document" // semantic conventions. It represents the GraphQL document being executed. // // Type: string @@ -5610,9 +6741,9 @@ const ( // // Examples: query findBookById { bookById(id: ?) { name } } // Note: The value may be sanitized to exclude sensitive information. - GraphqlDocumentKey = attribute.Key("graphql.document") + GraphQLDocumentKey = attribute.Key("graphql.document") - // GraphqlOperationNameKey is the attribute Key conforming to the + // GraphQLOperationNameKey is the attribute Key conforming to the // "graphql.operation.name" semantic conventions. It represents the name of the // operation being executed. // @@ -5621,9 +6752,9 @@ const ( // Stability: Development // // Examples: findBookById - GraphqlOperationNameKey = attribute.Key("graphql.operation.name") + GraphQLOperationNameKey = attribute.Key("graphql.operation.name") - // GraphqlOperationTypeKey is the attribute Key conforming to the + // GraphQLOperationTypeKey is the attribute Key conforming to the // "graphql.operation.type" semantic conventions. It represents the type of the // operation being executed. // @@ -5632,34 +6763,34 @@ const ( // Stability: Development // // Examples: "query", "mutation", "subscription" - GraphqlOperationTypeKey = attribute.Key("graphql.operation.type") + GraphQLOperationTypeKey = attribute.Key("graphql.operation.type") ) -// GraphqlDocument returns an attribute KeyValue conforming to the +// GraphQLDocument returns an attribute KeyValue conforming to the // "graphql.document" semantic conventions. It represents the GraphQL document // being executed. -func GraphqlDocument(val string) attribute.KeyValue { - return GraphqlDocumentKey.String(val) +func GraphQLDocument(val string) attribute.KeyValue { + return GraphQLDocumentKey.String(val) } -// GraphqlOperationName returns an attribute KeyValue conforming to the +// GraphQLOperationName returns an attribute KeyValue conforming to the // "graphql.operation.name" semantic conventions. It represents the name of the // operation being executed. -func GraphqlOperationName(val string) attribute.KeyValue { - return GraphqlOperationNameKey.String(val) +func GraphQLOperationName(val string) attribute.KeyValue { + return GraphQLOperationNameKey.String(val) } // Enum values for graphql.operation.type var ( // GraphQL query // Stability: development - GraphqlOperationTypeQuery = GraphqlOperationTypeKey.String("query") + GraphQLOperationTypeQuery = GraphQLOperationTypeKey.String("query") // GraphQL mutation // Stability: development - GraphqlOperationTypeMutation = GraphqlOperationTypeKey.String("mutation") + GraphQLOperationTypeMutation = GraphQLOperationTypeKey.String("mutation") // GraphQL subscription // Stability: development - GraphqlOperationTypeSubscription = GraphqlOperationTypeKey.String("subscription") + GraphQLOperationTypeSubscription = GraphQLOperationTypeKey.String("subscription") ) // Namespace: heroku @@ -5815,7 +6946,7 @@ const ( HostIDKey = attribute.Key("host.id") // HostImageIDKey is the attribute Key conforming to the "host.image.id" - // semantic conventions. It represents the vM image ID or host OS image ID. For + // semantic conventions. It represents the VM image ID or host OS image ID. For // Cloud, this value is from the provider. // // Type: string @@ -5957,7 +7088,7 @@ func HostID(val string) attribute.KeyValue { } // HostImageID returns an attribute KeyValue conforming to the "host.image.id" -// semantic conventions. It represents the vM image ID or host OS image ID. For +// semantic conventions. It represents the VM image ID or host OS image ID. For // Cloud, this value is from the provider. func HostImageID(val string) attribute.KeyValue { return HostImageIDKey.String(val) @@ -6064,7 +7195,7 @@ const ( HTTPRequestBodySizeKey = attribute.Key("http.request.body.size") // HTTPRequestMethodKey is the attribute Key conforming to the - // "http.request.method" semantic conventions. It represents the hTTP request + // "http.request.method" semantic conventions. It represents the HTTP request // method. // // Type: Enum @@ -6204,6 +7335,14 @@ func HTTPRequestBodySize(val int) attribute.KeyValue { return HTTPRequestBodySizeKey.Int(val) } +// HTTPRequestHeader returns an attribute KeyValue conforming to the +// "http.request.header" semantic conventions. It represents the HTTP request +// headers, `` being the normalized HTTP Header name (lowercase), the value +// being the header values. +func HTTPRequestHeader(key string, val ...string) attribute.KeyValue { + return attribute.StringSlice("http.request.header."+key, val) +} + // HTTPRequestMethodOriginal returns an attribute KeyValue conforming to the // "http.request.method_original" semantic conventions. It represents the // original HTTP method sent by the client in the request line. @@ -6239,6 +7378,14 @@ func HTTPResponseBodySize(val int) attribute.KeyValue { return HTTPResponseBodySizeKey.Int(val) } +// HTTPResponseHeader returns an attribute KeyValue conforming to the +// "http.response.header" semantic conventions. It represents the HTTP response +// headers, `` being the normalized HTTP Header name (lowercase), the value +// being the header values. +func HTTPResponseHeader(key string, val ...string) attribute.KeyValue { + return attribute.StringSlice("http.response.header."+key, val) +} + // HTTPResponseSize returns an attribute KeyValue conforming to the // "http.response.size" semantic conventions. It represents the total size of the // response in bytes. This should be the total number of bytes sent over the @@ -6448,6 +7595,54 @@ var ( HwTypeVoltage = HwTypeKey.String("voltage") ) +// Namespace: ios +const ( + // IOSAppStateKey is the attribute Key conforming to the "ios.app.state" + // semantic conventions. It represents the this attribute represents the state + // of the application. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + // Note: The iOS lifecycle states are defined in the + // [UIApplicationDelegate documentation], and from which the `OS terminology` + // column values are derived. + // + // [UIApplicationDelegate documentation]: https://developer.apple.com/documentation/uikit/uiapplicationdelegate + IOSAppStateKey = attribute.Key("ios.app.state") +) + +// Enum values for ios.app.state +var ( + // The app has become `active`. Associated with UIKit notification + // `applicationDidBecomeActive`. + // + // Stability: development + IOSAppStateActive = IOSAppStateKey.String("active") + // The app is now `inactive`. Associated with UIKit notification + // `applicationWillResignActive`. + // + // Stability: development + IOSAppStateInactive = IOSAppStateKey.String("inactive") + // The app is now in the background. This value is associated with UIKit + // notification `applicationDidEnterBackground`. + // + // Stability: development + IOSAppStateBackground = IOSAppStateKey.String("background") + // The app is now in the foreground. This value is associated with UIKit + // notification `applicationWillEnterForeground`. + // + // Stability: development + IOSAppStateForeground = IOSAppStateKey.String("foreground") + // The app is about to terminate. Associated with UIKit notification + // `applicationWillTerminate`. + // + // Stability: development + IOSAppStateTerminate = IOSAppStateKey.String("terminate") +) + // Namespace: k8s const ( // K8SClusterNameKey is the attribute Key conforming to the "k8s.cluster.name" @@ -6593,6 +7788,26 @@ const ( // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff" K8SDeploymentUIDKey = attribute.Key("k8s.deployment.uid") + // K8SHPANameKey is the attribute Key conforming to the "k8s.hpa.name" semantic + // conventions. It represents the name of the horizontal pod autoscaler. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "opentelemetry" + K8SHPANameKey = attribute.Key("k8s.hpa.name") + + // K8SHPAUIDKey is the attribute Key conforming to the "k8s.hpa.uid" semantic + // conventions. It represents the UID of the horizontal pod autoscaler. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff" + K8SHPAUIDKey = attribute.Key("k8s.hpa.uid") + // K8SJobNameKey is the attribute Key conforming to the "k8s.job.name" semantic // conventions. It represents the name of the Job. // @@ -6701,6 +7916,50 @@ const ( // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff" K8SReplicaSetUIDKey = attribute.Key("k8s.replicaset.uid") + // K8SReplicationControllerNameKey is the attribute Key conforming to the + // "k8s.replicationcontroller.name" semantic conventions. It represents the name + // of the replication controller. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "opentelemetry" + K8SReplicationControllerNameKey = attribute.Key("k8s.replicationcontroller.name") + + // K8SReplicationControllerUIDKey is the attribute Key conforming to the + // "k8s.replicationcontroller.uid" semantic conventions. It represents the UID + // of the replication controller. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff" + K8SReplicationControllerUIDKey = attribute.Key("k8s.replicationcontroller.uid") + + // K8SResourceQuotaNameKey is the attribute Key conforming to the + // "k8s.resourcequota.name" semantic conventions. It represents the name of the + // resource quota. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "opentelemetry" + K8SResourceQuotaNameKey = attribute.Key("k8s.resourcequota.name") + + // K8SResourceQuotaUIDKey is the attribute Key conforming to the + // "k8s.resourcequota.uid" semantic conventions. It represents the UID of the + // resource quota. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff" + K8SResourceQuotaUIDKey = attribute.Key("k8s.resourcequota.uid") + // K8SStatefulSetNameKey is the attribute Key conforming to the // "k8s.statefulset.name" semantic conventions. It represents the name of the // StatefulSet. @@ -6781,6 +8040,22 @@ func K8SContainerStatusLastTerminatedReason(val string) attribute.KeyValue { return K8SContainerStatusLastTerminatedReasonKey.String(val) } +// K8SCronJobAnnotation returns an attribute KeyValue conforming to the +// "k8s.cronjob.annotation" semantic conventions. It represents the cronjob +// annotation placed on the CronJob, the `` being the annotation name, the +// value being the annotation value. +func K8SCronJobAnnotation(key string, val string) attribute.KeyValue { + return attribute.String("k8s.cronjob.annotation."+key, val) +} + +// K8SCronJobLabel returns an attribute KeyValue conforming to the +// "k8s.cronjob.label" semantic conventions. It represents the label placed on +// the CronJob, the `` being the label name, the value being the label +// value. +func K8SCronJobLabel(key string, val string) attribute.KeyValue { + return attribute.String("k8s.cronjob.label."+key, val) +} + // K8SCronJobName returns an attribute KeyValue conforming to the // "k8s.cronjob.name" semantic conventions. It represents the name of the // CronJob. @@ -6794,6 +8069,20 @@ func K8SCronJobUID(val string) attribute.KeyValue { return K8SCronJobUIDKey.String(val) } +// K8SDaemonSetAnnotation returns an attribute KeyValue conforming to the +// "k8s.daemonset.annotation" semantic conventions. It represents the annotation +// key-value pairs placed on the DaemonSet. +func K8SDaemonSetAnnotation(key string, val string) attribute.KeyValue { + return attribute.String("k8s.daemonset.annotation."+key, val) +} + +// K8SDaemonSetLabel returns an attribute KeyValue conforming to the +// "k8s.daemonset.label" semantic conventions. It represents the label key-value +// pairs placed on the DaemonSet. +func K8SDaemonSetLabel(key string, val string) attribute.KeyValue { + return attribute.String("k8s.daemonset.label."+key, val) +} + // K8SDaemonSetName returns an attribute KeyValue conforming to the // "k8s.daemonset.name" semantic conventions. It represents the name of the // DaemonSet. @@ -6808,6 +8097,20 @@ func K8SDaemonSetUID(val string) attribute.KeyValue { return K8SDaemonSetUIDKey.String(val) } +// K8SDeploymentAnnotation returns an attribute KeyValue conforming to the +// "k8s.deployment.annotation" semantic conventions. It represents the annotation +// key-value pairs placed on the Deployment. +func K8SDeploymentAnnotation(key string, val string) attribute.KeyValue { + return attribute.String("k8s.deployment.annotation."+key, val) +} + +// K8SDeploymentLabel returns an attribute KeyValue conforming to the +// "k8s.deployment.label" semantic conventions. It represents the label key-value +// pairs placed on the Deployment. +func K8SDeploymentLabel(key string, val string) attribute.KeyValue { + return attribute.String("k8s.deployment.label."+key, val) +} + // K8SDeploymentName returns an attribute KeyValue conforming to the // "k8s.deployment.name" semantic conventions. It represents the name of the // Deployment. @@ -6822,6 +8125,32 @@ func K8SDeploymentUID(val string) attribute.KeyValue { return K8SDeploymentUIDKey.String(val) } +// K8SHPAName returns an attribute KeyValue conforming to the "k8s.hpa.name" +// semantic conventions. It represents the name of the horizontal pod autoscaler. +func K8SHPAName(val string) attribute.KeyValue { + return K8SHPANameKey.String(val) +} + +// K8SHPAUID returns an attribute KeyValue conforming to the "k8s.hpa.uid" +// semantic conventions. It represents the UID of the horizontal pod autoscaler. +func K8SHPAUID(val string) attribute.KeyValue { + return K8SHPAUIDKey.String(val) +} + +// K8SJobAnnotation returns an attribute KeyValue conforming to the +// "k8s.job.annotation" semantic conventions. It represents the annotation +// key-value pairs placed on the Job. +func K8SJobAnnotation(key string, val string) attribute.KeyValue { + return attribute.String("k8s.job.annotation."+key, val) +} + +// K8SJobLabel returns an attribute KeyValue conforming to the "k8s.job.label" +// semantic conventions. It represents the label key-value pairs placed on the +// Job. +func K8SJobLabel(key string, val string) attribute.KeyValue { + return attribute.String("k8s.job.label."+key, val) +} + // K8SJobName returns an attribute KeyValue conforming to the "k8s.job.name" // semantic conventions. It represents the name of the Job. func K8SJobName(val string) attribute.KeyValue { @@ -6834,6 +8163,20 @@ func K8SJobUID(val string) attribute.KeyValue { return K8SJobUIDKey.String(val) } +// K8SNamespaceAnnotation returns an attribute KeyValue conforming to the +// "k8s.namespace.annotation" semantic conventions. It represents the annotation +// key-value pairs placed on the Namespace. +func K8SNamespaceAnnotation(key string, val string) attribute.KeyValue { + return attribute.String("k8s.namespace.annotation."+key, val) +} + +// K8SNamespaceLabel returns an attribute KeyValue conforming to the +// "k8s.namespace.label" semantic conventions. It represents the label key-value +// pairs placed on the Namespace. +func K8SNamespaceLabel(key string, val string) attribute.KeyValue { + return attribute.String("k8s.namespace.label."+key, val) +} + // K8SNamespaceName returns an attribute KeyValue conforming to the // "k8s.namespace.name" semantic conventions. It represents the name of the // namespace that the pod is running in. @@ -6841,6 +8184,22 @@ func K8SNamespaceName(val string) attribute.KeyValue { return K8SNamespaceNameKey.String(val) } +// K8SNodeAnnotation returns an attribute KeyValue conforming to the +// "k8s.node.annotation" semantic conventions. It represents the annotation +// placed on the Node, the `` being the annotation name, the value being the +// annotation value, even if the value is empty. +func K8SNodeAnnotation(key string, val string) attribute.KeyValue { + return attribute.String("k8s.node.annotation."+key, val) +} + +// K8SNodeLabel returns an attribute KeyValue conforming to the "k8s.node.label" +// semantic conventions. It represents the label placed on the Node, the `` +// being the label name, the value being the label value, even if the value is +// empty. +func K8SNodeLabel(key string, val string) attribute.KeyValue { + return attribute.String("k8s.node.label."+key, val) +} + // K8SNodeName returns an attribute KeyValue conforming to the "k8s.node.name" // semantic conventions. It represents the name of the Node. func K8SNodeName(val string) attribute.KeyValue { @@ -6853,6 +8212,21 @@ func K8SNodeUID(val string) attribute.KeyValue { return K8SNodeUIDKey.String(val) } +// K8SPodAnnotation returns an attribute KeyValue conforming to the +// "k8s.pod.annotation" semantic conventions. It represents the annotation placed +// on the Pod, the `` being the annotation name, the value being the +// annotation value. +func K8SPodAnnotation(key string, val string) attribute.KeyValue { + return attribute.String("k8s.pod.annotation."+key, val) +} + +// K8SPodLabel returns an attribute KeyValue conforming to the "k8s.pod.label" +// semantic conventions. It represents the label placed on the Pod, the `` +// being the label name, the value being the label value. +func K8SPodLabel(key string, val string) attribute.KeyValue { + return attribute.String("k8s.pod.label."+key, val) +} + // K8SPodName returns an attribute KeyValue conforming to the "k8s.pod.name" // semantic conventions. It represents the name of the Pod. func K8SPodName(val string) attribute.KeyValue { @@ -6865,6 +8239,20 @@ func K8SPodUID(val string) attribute.KeyValue { return K8SPodUIDKey.String(val) } +// K8SReplicaSetAnnotation returns an attribute KeyValue conforming to the +// "k8s.replicaset.annotation" semantic conventions. It represents the annotation +// key-value pairs placed on the ReplicaSet. +func K8SReplicaSetAnnotation(key string, val string) attribute.KeyValue { + return attribute.String("k8s.replicaset.annotation."+key, val) +} + +// K8SReplicaSetLabel returns an attribute KeyValue conforming to the +// "k8s.replicaset.label" semantic conventions. It represents the label key-value +// pairs placed on the ReplicaSet. +func K8SReplicaSetLabel(key string, val string) attribute.KeyValue { + return attribute.String("k8s.replicaset.label."+key, val) +} + // K8SReplicaSetName returns an attribute KeyValue conforming to the // "k8s.replicaset.name" semantic conventions. It represents the name of the // ReplicaSet. @@ -6879,6 +8267,48 @@ func K8SReplicaSetUID(val string) attribute.KeyValue { return K8SReplicaSetUIDKey.String(val) } +// K8SReplicationControllerName returns an attribute KeyValue conforming to the +// "k8s.replicationcontroller.name" semantic conventions. It represents the name +// of the replication controller. +func K8SReplicationControllerName(val string) attribute.KeyValue { + return K8SReplicationControllerNameKey.String(val) +} + +// K8SReplicationControllerUID returns an attribute KeyValue conforming to the +// "k8s.replicationcontroller.uid" semantic conventions. It represents the UID of +// the replication controller. +func K8SReplicationControllerUID(val string) attribute.KeyValue { + return K8SReplicationControllerUIDKey.String(val) +} + +// K8SResourceQuotaName returns an attribute KeyValue conforming to the +// "k8s.resourcequota.name" semantic conventions. It represents the name of the +// resource quota. +func K8SResourceQuotaName(val string) attribute.KeyValue { + return K8SResourceQuotaNameKey.String(val) +} + +// K8SResourceQuotaUID returns an attribute KeyValue conforming to the +// "k8s.resourcequota.uid" semantic conventions. It represents the UID of the +// resource quota. +func K8SResourceQuotaUID(val string) attribute.KeyValue { + return K8SResourceQuotaUIDKey.String(val) +} + +// K8SStatefulSetAnnotation returns an attribute KeyValue conforming to the +// "k8s.statefulset.annotation" semantic conventions. It represents the +// annotation key-value pairs placed on the StatefulSet. +func K8SStatefulSetAnnotation(key string, val string) attribute.KeyValue { + return attribute.String("k8s.statefulset.annotation."+key, val) +} + +// K8SStatefulSetLabel returns an attribute KeyValue conforming to the +// "k8s.statefulset.label" semantic conventions. It represents the label +// key-value pairs placed on the StatefulSet. +func K8SStatefulSetLabel(key string, val string) attribute.KeyValue { + return attribute.String("k8s.statefulset.label."+key, val) +} + // K8SStatefulSetName returns an attribute KeyValue conforming to the // "k8s.statefulset.name" semantic conventions. It represents the name of the // StatefulSet. @@ -7237,7 +8667,7 @@ const ( // Examples: MessagingDestinationTemporaryKey = attribute.Key("messaging.destination.temporary") - // MessagingEventhubsMessageEnqueuedTimeKey is the attribute Key conforming to + // MessagingEventHubsMessageEnqueuedTimeKey is the attribute Key conforming to // the "messaging.eventhubs.message.enqueued_time" semantic conventions. It // represents the UTC epoch seconds at which the message has been accepted and // stored in the entity. @@ -7245,9 +8675,9 @@ const ( // Type: int // RequirementLevel: Recommended // Stability: Development - MessagingEventhubsMessageEnqueuedTimeKey = attribute.Key("messaging.eventhubs.message.enqueued_time") + MessagingEventHubsMessageEnqueuedTimeKey = attribute.Key("messaging.eventhubs.message.enqueued_time") - // MessagingGCPPubsubMessageAckDeadlineKey is the attribute Key conforming to + // MessagingGCPPubSubMessageAckDeadlineKey is the attribute Key conforming to // the "messaging.gcp_pubsub.message.ack_deadline" semantic conventions. It // represents the ack deadline in seconds set for the modify ack deadline // request. @@ -7255,9 +8685,9 @@ const ( // Type: int // RequirementLevel: Recommended // Stability: Development - MessagingGCPPubsubMessageAckDeadlineKey = attribute.Key("messaging.gcp_pubsub.message.ack_deadline") + MessagingGCPPubSubMessageAckDeadlineKey = attribute.Key("messaging.gcp_pubsub.message.ack_deadline") - // MessagingGCPPubsubMessageAckIDKey is the attribute Key conforming to the + // MessagingGCPPubSubMessageAckIDKey is the attribute Key conforming to the // "messaging.gcp_pubsub.message.ack_id" semantic conventions. It represents the // ack id for a given message. // @@ -7266,18 +8696,18 @@ const ( // Stability: Development // // Examples: ack_id - MessagingGCPPubsubMessageAckIDKey = attribute.Key("messaging.gcp_pubsub.message.ack_id") + MessagingGCPPubSubMessageAckIDKey = attribute.Key("messaging.gcp_pubsub.message.ack_id") - // MessagingGCPPubsubMessageDeliveryAttemptKey is the attribute Key conforming + // MessagingGCPPubSubMessageDeliveryAttemptKey is the attribute Key conforming // to the "messaging.gcp_pubsub.message.delivery_attempt" semantic conventions. // It represents the delivery attempt for a given message. // // Type: int // RequirementLevel: Recommended // Stability: Development - MessagingGCPPubsubMessageDeliveryAttemptKey = attribute.Key("messaging.gcp_pubsub.message.delivery_attempt") + MessagingGCPPubSubMessageDeliveryAttemptKey = attribute.Key("messaging.gcp_pubsub.message.delivery_attempt") - // MessagingGCPPubsubMessageOrderingKeyKey is the attribute Key conforming to + // MessagingGCPPubSubMessageOrderingKeyKey is the attribute Key conforming to // the "messaging.gcp_pubsub.message.ordering_key" semantic conventions. It // represents the ordering key for a given message. If the attribute is not // present, the message does not have an ordering key. @@ -7287,7 +8717,7 @@ const ( // Stability: Development // // Examples: ordering_key - MessagingGCPPubsubMessageOrderingKeyKey = attribute.Key("messaging.gcp_pubsub.message.ordering_key") + MessagingGCPPubSubMessageOrderingKeyKey = attribute.Key("messaging.gcp_pubsub.message.ordering_key") // MessagingKafkaMessageKeyKey is the attribute Key conforming to the // "messaging.kafka.message.key" semantic conventions. It represents the message @@ -7398,7 +8828,7 @@ const ( // Note: If a custom value is used, it MUST be of low cardinality. MessagingOperationTypeKey = attribute.Key("messaging.operation.type") - // MessagingRabbitmqDestinationRoutingKeyKey is the attribute Key conforming to + // MessagingRabbitMQDestinationRoutingKeyKey is the attribute Key conforming to // the "messaging.rabbitmq.destination.routing_key" semantic conventions. It // represents the rabbitMQ message routing key. // @@ -7407,18 +8837,18 @@ const ( // Stability: Development // // Examples: myKey - MessagingRabbitmqDestinationRoutingKeyKey = attribute.Key("messaging.rabbitmq.destination.routing_key") + MessagingRabbitMQDestinationRoutingKeyKey = attribute.Key("messaging.rabbitmq.destination.routing_key") - // MessagingRabbitmqMessageDeliveryTagKey is the attribute Key conforming to the + // MessagingRabbitMQMessageDeliveryTagKey is the attribute Key conforming to the // "messaging.rabbitmq.message.delivery_tag" semantic conventions. It represents // the rabbitMQ message delivery tag. // // Type: int // RequirementLevel: Recommended // Stability: Development - MessagingRabbitmqMessageDeliveryTagKey = attribute.Key("messaging.rabbitmq.message.delivery_tag") + MessagingRabbitMQMessageDeliveryTagKey = attribute.Key("messaging.rabbitmq.message.delivery_tag") - // MessagingRocketmqConsumptionModelKey is the attribute Key conforming to the + // MessagingRocketMQConsumptionModelKey is the attribute Key conforming to the // "messaging.rocketmq.consumption_model" semantic conventions. It represents // the model of message consumption. This only applies to consumer spans. // @@ -7427,9 +8857,9 @@ const ( // Stability: Development // // Examples: - MessagingRocketmqConsumptionModelKey = attribute.Key("messaging.rocketmq.consumption_model") + MessagingRocketMQConsumptionModelKey = attribute.Key("messaging.rocketmq.consumption_model") - // MessagingRocketmqMessageDelayTimeLevelKey is the attribute Key conforming to + // MessagingRocketMQMessageDelayTimeLevelKey is the attribute Key conforming to // the "messaging.rocketmq.message.delay_time_level" semantic conventions. It // represents the delay time level for delay message, which determines the // message delay time. @@ -7437,9 +8867,9 @@ const ( // Type: int // RequirementLevel: Recommended // Stability: Development - MessagingRocketmqMessageDelayTimeLevelKey = attribute.Key("messaging.rocketmq.message.delay_time_level") + MessagingRocketMQMessageDelayTimeLevelKey = attribute.Key("messaging.rocketmq.message.delay_time_level") - // MessagingRocketmqMessageDeliveryTimestampKey is the attribute Key conforming + // MessagingRocketMQMessageDeliveryTimestampKey is the attribute Key conforming // to the "messaging.rocketmq.message.delivery_timestamp" semantic conventions. // It represents the timestamp in milliseconds that the delay message is // expected to be delivered to consumer. @@ -7447,9 +8877,9 @@ const ( // Type: int // RequirementLevel: Recommended // Stability: Development - MessagingRocketmqMessageDeliveryTimestampKey = attribute.Key("messaging.rocketmq.message.delivery_timestamp") + MessagingRocketMQMessageDeliveryTimestampKey = attribute.Key("messaging.rocketmq.message.delivery_timestamp") - // MessagingRocketmqMessageGroupKey is the attribute Key conforming to the + // MessagingRocketMQMessageGroupKey is the attribute Key conforming to the // "messaging.rocketmq.message.group" semantic conventions. It represents the it // is essential for FIFO message. Messages that belong to the same message group // are always processed one by one within the same consumer group. @@ -7459,9 +8889,9 @@ const ( // Stability: Development // // Examples: myMessageGroup - MessagingRocketmqMessageGroupKey = attribute.Key("messaging.rocketmq.message.group") + MessagingRocketMQMessageGroupKey = attribute.Key("messaging.rocketmq.message.group") - // MessagingRocketmqMessageKeysKey is the attribute Key conforming to the + // MessagingRocketMQMessageKeysKey is the attribute Key conforming to the // "messaging.rocketmq.message.keys" semantic conventions. It represents the // key(s) of message, another way to mark message besides message id. // @@ -7470,9 +8900,9 @@ const ( // Stability: Development // // Examples: "keyA", "keyB" - MessagingRocketmqMessageKeysKey = attribute.Key("messaging.rocketmq.message.keys") + MessagingRocketMQMessageKeysKey = attribute.Key("messaging.rocketmq.message.keys") - // MessagingRocketmqMessageTagKey is the attribute Key conforming to the + // MessagingRocketMQMessageTagKey is the attribute Key conforming to the // "messaging.rocketmq.message.tag" semantic conventions. It represents the // secondary classifier of message besides topic. // @@ -7481,9 +8911,9 @@ const ( // Stability: Development // // Examples: tagA - MessagingRocketmqMessageTagKey = attribute.Key("messaging.rocketmq.message.tag") + MessagingRocketMQMessageTagKey = attribute.Key("messaging.rocketmq.message.tag") - // MessagingRocketmqMessageTypeKey is the attribute Key conforming to the + // MessagingRocketMQMessageTypeKey is the attribute Key conforming to the // "messaging.rocketmq.message.type" semantic conventions. It represents the // type of message. // @@ -7492,9 +8922,9 @@ const ( // Stability: Development // // Examples: - MessagingRocketmqMessageTypeKey = attribute.Key("messaging.rocketmq.message.type") + MessagingRocketMQMessageTypeKey = attribute.Key("messaging.rocketmq.message.type") - // MessagingRocketmqNamespaceKey is the attribute Key conforming to the + // MessagingRocketMQNamespaceKey is the attribute Key conforming to the // "messaging.rocketmq.namespace" semantic conventions. It represents the // namespace of RocketMQ resources, resources in different namespaces are // individual. @@ -7504,9 +8934,9 @@ const ( // Stability: Development // // Examples: myNamespace - MessagingRocketmqNamespaceKey = attribute.Key("messaging.rocketmq.namespace") + MessagingRocketMQNamespaceKey = attribute.Key("messaging.rocketmq.namespace") - // MessagingServicebusDispositionStatusKey is the attribute Key conforming to + // MessagingServiceBusDispositionStatusKey is the attribute Key conforming to // the "messaging.servicebus.disposition_status" semantic conventions. It // represents the describes the [settlement type]. // @@ -7517,9 +8947,9 @@ const ( // Examples: // // [settlement type]: https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock - MessagingServicebusDispositionStatusKey = attribute.Key("messaging.servicebus.disposition_status") + MessagingServiceBusDispositionStatusKey = attribute.Key("messaging.servicebus.disposition_status") - // MessagingServicebusMessageDeliveryCountKey is the attribute Key conforming to + // MessagingServiceBusMessageDeliveryCountKey is the attribute Key conforming to // the "messaging.servicebus.message.delivery_count" semantic conventions. It // represents the number of deliveries that have been attempted for this // message. @@ -7527,9 +8957,9 @@ const ( // Type: int // RequirementLevel: Recommended // Stability: Development - MessagingServicebusMessageDeliveryCountKey = attribute.Key("messaging.servicebus.message.delivery_count") + MessagingServiceBusMessageDeliveryCountKey = attribute.Key("messaging.servicebus.message.delivery_count") - // MessagingServicebusMessageEnqueuedTimeKey is the attribute Key conforming to + // MessagingServiceBusMessageEnqueuedTimeKey is the attribute Key conforming to // the "messaging.servicebus.message.enqueued_time" semantic conventions. It // represents the UTC epoch seconds at which the message has been accepted and // stored in the entity. @@ -7537,7 +8967,7 @@ const ( // Type: int // RequirementLevel: Recommended // Stability: Development - MessagingServicebusMessageEnqueuedTimeKey = attribute.Key("messaging.servicebus.message.enqueued_time") + MessagingServiceBusMessageEnqueuedTimeKey = attribute.Key("messaging.servicebus.message.enqueued_time") // MessagingSystemKey is the attribute Key conforming to the "messaging.system" // semantic conventions. It represents the messaging system as identified by the @@ -7623,42 +9053,42 @@ func MessagingDestinationTemporary(val bool) attribute.KeyValue { return MessagingDestinationTemporaryKey.Bool(val) } -// MessagingEventhubsMessageEnqueuedTime returns an attribute KeyValue conforming +// MessagingEventHubsMessageEnqueuedTime returns an attribute KeyValue conforming // to the "messaging.eventhubs.message.enqueued_time" semantic conventions. It // represents the UTC epoch seconds at which the message has been accepted and // stored in the entity. -func MessagingEventhubsMessageEnqueuedTime(val int) attribute.KeyValue { - return MessagingEventhubsMessageEnqueuedTimeKey.Int(val) +func MessagingEventHubsMessageEnqueuedTime(val int) attribute.KeyValue { + return MessagingEventHubsMessageEnqueuedTimeKey.Int(val) } -// MessagingGCPPubsubMessageAckDeadline returns an attribute KeyValue conforming +// MessagingGCPPubSubMessageAckDeadline returns an attribute KeyValue conforming // to the "messaging.gcp_pubsub.message.ack_deadline" semantic conventions. It // represents the ack deadline in seconds set for the modify ack deadline // request. -func MessagingGCPPubsubMessageAckDeadline(val int) attribute.KeyValue { - return MessagingGCPPubsubMessageAckDeadlineKey.Int(val) +func MessagingGCPPubSubMessageAckDeadline(val int) attribute.KeyValue { + return MessagingGCPPubSubMessageAckDeadlineKey.Int(val) } -// MessagingGCPPubsubMessageAckID returns an attribute KeyValue conforming to the +// MessagingGCPPubSubMessageAckID returns an attribute KeyValue conforming to the // "messaging.gcp_pubsub.message.ack_id" semantic conventions. It represents the // ack id for a given message. -func MessagingGCPPubsubMessageAckID(val string) attribute.KeyValue { - return MessagingGCPPubsubMessageAckIDKey.String(val) +func MessagingGCPPubSubMessageAckID(val string) attribute.KeyValue { + return MessagingGCPPubSubMessageAckIDKey.String(val) } -// MessagingGCPPubsubMessageDeliveryAttempt returns an attribute KeyValue +// MessagingGCPPubSubMessageDeliveryAttempt returns an attribute KeyValue // conforming to the "messaging.gcp_pubsub.message.delivery_attempt" semantic // conventions. It represents the delivery attempt for a given message. -func MessagingGCPPubsubMessageDeliveryAttempt(val int) attribute.KeyValue { - return MessagingGCPPubsubMessageDeliveryAttemptKey.Int(val) +func MessagingGCPPubSubMessageDeliveryAttempt(val int) attribute.KeyValue { + return MessagingGCPPubSubMessageDeliveryAttemptKey.Int(val) } -// MessagingGCPPubsubMessageOrderingKey returns an attribute KeyValue conforming +// MessagingGCPPubSubMessageOrderingKey returns an attribute KeyValue conforming // to the "messaging.gcp_pubsub.message.ordering_key" semantic conventions. It // represents the ordering key for a given message. If the attribute is not // present, the message does not have an ordering key. -func MessagingGCPPubsubMessageOrderingKey(val string) attribute.KeyValue { - return MessagingGCPPubsubMessageOrderingKeyKey.String(val) +func MessagingGCPPubSubMessageOrderingKey(val string) attribute.KeyValue { + return MessagingGCPPubSubMessageOrderingKeyKey.String(val) } // MessagingKafkaMessageKey returns an attribute KeyValue conforming to the @@ -7720,80 +9150,80 @@ func MessagingOperationName(val string) attribute.KeyValue { return MessagingOperationNameKey.String(val) } -// MessagingRabbitmqDestinationRoutingKey returns an attribute KeyValue +// MessagingRabbitMQDestinationRoutingKey returns an attribute KeyValue // conforming to the "messaging.rabbitmq.destination.routing_key" semantic // conventions. It represents the rabbitMQ message routing key. -func MessagingRabbitmqDestinationRoutingKey(val string) attribute.KeyValue { - return MessagingRabbitmqDestinationRoutingKeyKey.String(val) +func MessagingRabbitMQDestinationRoutingKey(val string) attribute.KeyValue { + return MessagingRabbitMQDestinationRoutingKeyKey.String(val) } -// MessagingRabbitmqMessageDeliveryTag returns an attribute KeyValue conforming +// MessagingRabbitMQMessageDeliveryTag returns an attribute KeyValue conforming // to the "messaging.rabbitmq.message.delivery_tag" semantic conventions. It // represents the rabbitMQ message delivery tag. -func MessagingRabbitmqMessageDeliveryTag(val int) attribute.KeyValue { - return MessagingRabbitmqMessageDeliveryTagKey.Int(val) +func MessagingRabbitMQMessageDeliveryTag(val int) attribute.KeyValue { + return MessagingRabbitMQMessageDeliveryTagKey.Int(val) } -// MessagingRocketmqMessageDelayTimeLevel returns an attribute KeyValue +// MessagingRocketMQMessageDelayTimeLevel returns an attribute KeyValue // conforming to the "messaging.rocketmq.message.delay_time_level" semantic // conventions. It represents the delay time level for delay message, which // determines the message delay time. -func MessagingRocketmqMessageDelayTimeLevel(val int) attribute.KeyValue { - return MessagingRocketmqMessageDelayTimeLevelKey.Int(val) +func MessagingRocketMQMessageDelayTimeLevel(val int) attribute.KeyValue { + return MessagingRocketMQMessageDelayTimeLevelKey.Int(val) } -// MessagingRocketmqMessageDeliveryTimestamp returns an attribute KeyValue +// MessagingRocketMQMessageDeliveryTimestamp returns an attribute KeyValue // conforming to the "messaging.rocketmq.message.delivery_timestamp" semantic // conventions. It represents the timestamp in milliseconds that the delay // message is expected to be delivered to consumer. -func MessagingRocketmqMessageDeliveryTimestamp(val int) attribute.KeyValue { - return MessagingRocketmqMessageDeliveryTimestampKey.Int(val) +func MessagingRocketMQMessageDeliveryTimestamp(val int) attribute.KeyValue { + return MessagingRocketMQMessageDeliveryTimestampKey.Int(val) } -// MessagingRocketmqMessageGroup returns an attribute KeyValue conforming to the +// MessagingRocketMQMessageGroup returns an attribute KeyValue conforming to the // "messaging.rocketmq.message.group" semantic conventions. It represents the it // is essential for FIFO message. Messages that belong to the same message group // are always processed one by one within the same consumer group. -func MessagingRocketmqMessageGroup(val string) attribute.KeyValue { - return MessagingRocketmqMessageGroupKey.String(val) +func MessagingRocketMQMessageGroup(val string) attribute.KeyValue { + return MessagingRocketMQMessageGroupKey.String(val) } -// MessagingRocketmqMessageKeys returns an attribute KeyValue conforming to the +// MessagingRocketMQMessageKeys returns an attribute KeyValue conforming to the // "messaging.rocketmq.message.keys" semantic conventions. It represents the // key(s) of message, another way to mark message besides message id. -func MessagingRocketmqMessageKeys(val ...string) attribute.KeyValue { - return MessagingRocketmqMessageKeysKey.StringSlice(val) +func MessagingRocketMQMessageKeys(val ...string) attribute.KeyValue { + return MessagingRocketMQMessageKeysKey.StringSlice(val) } -// MessagingRocketmqMessageTag returns an attribute KeyValue conforming to the +// MessagingRocketMQMessageTag returns an attribute KeyValue conforming to the // "messaging.rocketmq.message.tag" semantic conventions. It represents the // secondary classifier of message besides topic. -func MessagingRocketmqMessageTag(val string) attribute.KeyValue { - return MessagingRocketmqMessageTagKey.String(val) +func MessagingRocketMQMessageTag(val string) attribute.KeyValue { + return MessagingRocketMQMessageTagKey.String(val) } -// MessagingRocketmqNamespace returns an attribute KeyValue conforming to the +// MessagingRocketMQNamespace returns an attribute KeyValue conforming to the // "messaging.rocketmq.namespace" semantic conventions. It represents the // namespace of RocketMQ resources, resources in different namespaces are // individual. -func MessagingRocketmqNamespace(val string) attribute.KeyValue { - return MessagingRocketmqNamespaceKey.String(val) +func MessagingRocketMQNamespace(val string) attribute.KeyValue { + return MessagingRocketMQNamespaceKey.String(val) } -// MessagingServicebusMessageDeliveryCount returns an attribute KeyValue +// MessagingServiceBusMessageDeliveryCount returns an attribute KeyValue // conforming to the "messaging.servicebus.message.delivery_count" semantic // conventions. It represents the number of deliveries that have been attempted // for this message. -func MessagingServicebusMessageDeliveryCount(val int) attribute.KeyValue { - return MessagingServicebusMessageDeliveryCountKey.Int(val) +func MessagingServiceBusMessageDeliveryCount(val int) attribute.KeyValue { + return MessagingServiceBusMessageDeliveryCountKey.Int(val) } -// MessagingServicebusMessageEnqueuedTime returns an attribute KeyValue +// MessagingServiceBusMessageEnqueuedTime returns an attribute KeyValue // conforming to the "messaging.servicebus.message.enqueued_time" semantic // conventions. It represents the UTC epoch seconds at which the message has been // accepted and stored in the entity. -func MessagingServicebusMessageEnqueuedTime(val int) attribute.KeyValue { - return MessagingServicebusMessageEnqueuedTimeKey.Int(val) +func MessagingServiceBusMessageEnqueuedTime(val int) attribute.KeyValue { + return MessagingServiceBusMessageEnqueuedTimeKey.Int(val) } // Enum values for messaging.operation.type @@ -7834,76 +9264,76 @@ var ( var ( // Clustering consumption model // Stability: development - MessagingRocketmqConsumptionModelClustering = MessagingRocketmqConsumptionModelKey.String("clustering") + MessagingRocketMQConsumptionModelClustering = MessagingRocketMQConsumptionModelKey.String("clustering") // Broadcasting consumption model // Stability: development - MessagingRocketmqConsumptionModelBroadcasting = MessagingRocketmqConsumptionModelKey.String("broadcasting") + MessagingRocketMQConsumptionModelBroadcasting = MessagingRocketMQConsumptionModelKey.String("broadcasting") ) // Enum values for messaging.rocketmq.message.type var ( // Normal message // Stability: development - MessagingRocketmqMessageTypeNormal = MessagingRocketmqMessageTypeKey.String("normal") + MessagingRocketMQMessageTypeNormal = MessagingRocketMQMessageTypeKey.String("normal") // FIFO message // Stability: development - MessagingRocketmqMessageTypeFifo = MessagingRocketmqMessageTypeKey.String("fifo") + MessagingRocketMQMessageTypeFifo = MessagingRocketMQMessageTypeKey.String("fifo") // Delay message // Stability: development - MessagingRocketmqMessageTypeDelay = MessagingRocketmqMessageTypeKey.String("delay") + MessagingRocketMQMessageTypeDelay = MessagingRocketMQMessageTypeKey.String("delay") // Transaction message // Stability: development - MessagingRocketmqMessageTypeTransaction = MessagingRocketmqMessageTypeKey.String("transaction") + MessagingRocketMQMessageTypeTransaction = MessagingRocketMQMessageTypeKey.String("transaction") ) // Enum values for messaging.servicebus.disposition_status var ( // Message is completed // Stability: development - MessagingServicebusDispositionStatusComplete = MessagingServicebusDispositionStatusKey.String("complete") + MessagingServiceBusDispositionStatusComplete = MessagingServiceBusDispositionStatusKey.String("complete") // Message is abandoned // Stability: development - MessagingServicebusDispositionStatusAbandon = MessagingServicebusDispositionStatusKey.String("abandon") + MessagingServiceBusDispositionStatusAbandon = MessagingServiceBusDispositionStatusKey.String("abandon") // Message is sent to dead letter queue // Stability: development - MessagingServicebusDispositionStatusDeadLetter = MessagingServicebusDispositionStatusKey.String("dead_letter") + MessagingServiceBusDispositionStatusDeadLetter = MessagingServiceBusDispositionStatusKey.String("dead_letter") // Message is deferred // Stability: development - MessagingServicebusDispositionStatusDefer = MessagingServicebusDispositionStatusKey.String("defer") + MessagingServiceBusDispositionStatusDefer = MessagingServiceBusDispositionStatusKey.String("defer") ) // Enum values for messaging.system var ( // Apache ActiveMQ // Stability: development - MessagingSystemActivemq = MessagingSystemKey.String("activemq") + MessagingSystemActiveMQ = MessagingSystemKey.String("activemq") // Amazon Simple Queue Service (SQS) // Stability: development - MessagingSystemAWSSqs = MessagingSystemKey.String("aws_sqs") + MessagingSystemAWSSQS = MessagingSystemKey.String("aws_sqs") // Azure Event Grid // Stability: development - MessagingSystemEventgrid = MessagingSystemKey.String("eventgrid") + MessagingSystemEventGrid = MessagingSystemKey.String("eventgrid") // Azure Event Hubs // Stability: development - MessagingSystemEventhubs = MessagingSystemKey.String("eventhubs") + MessagingSystemEventHubs = MessagingSystemKey.String("eventhubs") // Azure Service Bus // Stability: development - MessagingSystemServicebus = MessagingSystemKey.String("servicebus") + MessagingSystemServiceBus = MessagingSystemKey.String("servicebus") // Google Cloud Pub/Sub // Stability: development - MessagingSystemGCPPubsub = MessagingSystemKey.String("gcp_pubsub") + MessagingSystemGCPPubSub = MessagingSystemKey.String("gcp_pubsub") // Java Message Service // Stability: development - MessagingSystemJms = MessagingSystemKey.String("jms") + MessagingSystemJMS = MessagingSystemKey.String("jms") // Apache Kafka // Stability: development MessagingSystemKafka = MessagingSystemKey.String("kafka") // RabbitMQ // Stability: development - MessagingSystemRabbitmq = MessagingSystemKey.String("rabbitmq") + MessagingSystemRabbitMQ = MessagingSystemKey.String("rabbitmq") // Apache RocketMQ // Stability: development - MessagingSystemRocketmq = MessagingSystemKey.String("rocketmq") + MessagingSystemRocketMQ = MessagingSystemKey.String("rocketmq") // Apache Pulsar // Stability: development MessagingSystemPulsar = MessagingSystemKey.String("pulsar") @@ -7911,7 +9341,7 @@ var ( // Namespace: network const ( - // NetworkCarrierIccKey is the attribute Key conforming to the + // NetworkCarrierICCKey is the attribute Key conforming to the // "network.carrier.icc" semantic conventions. It represents the ISO 3166-1 // alpha-2 2-character country code associated with the mobile carrier network. // @@ -7920,9 +9350,9 @@ const ( // Stability: Development // // Examples: DE - NetworkCarrierIccKey = attribute.Key("network.carrier.icc") + NetworkCarrierICCKey = attribute.Key("network.carrier.icc") - // NetworkCarrierMccKey is the attribute Key conforming to the + // NetworkCarrierMCCKey is the attribute Key conforming to the // "network.carrier.mcc" semantic conventions. It represents the mobile carrier // country code. // @@ -7931,9 +9361,9 @@ const ( // Stability: Development // // Examples: 310 - NetworkCarrierMccKey = attribute.Key("network.carrier.mcc") + NetworkCarrierMCCKey = attribute.Key("network.carrier.mcc") - // NetworkCarrierMncKey is the attribute Key conforming to the + // NetworkCarrierMNCKey is the attribute Key conforming to the // "network.carrier.mnc" semantic conventions. It represents the mobile carrier // network code. // @@ -7942,7 +9372,7 @@ const ( // Stability: Development // // Examples: 001 - NetworkCarrierMncKey = attribute.Key("network.carrier.mnc") + NetworkCarrierMNCKey = attribute.Key("network.carrier.mnc") // NetworkCarrierNameKey is the attribute Key conforming to the // "network.carrier.name" semantic conventions. It represents the name of the @@ -8004,7 +9434,7 @@ const ( // Examples: "lo", "eth0" NetworkInterfaceNameKey = attribute.Key("network.interface.name") - // NetworkIoDirectionKey is the attribute Key conforming to the + // NetworkIODirectionKey is the attribute Key conforming to the // "network.io.direction" semantic conventions. It represents the network IO // operation direction. // @@ -8013,7 +9443,7 @@ const ( // Stability: Development // // Examples: "transmit" - NetworkIoDirectionKey = attribute.Key("network.io.direction") + NetworkIODirectionKey = attribute.Key("network.io.direction") // NetworkLocalAddressKey is the attribute Key conforming to the // "network.local.address" semantic conventions. It represents the local address @@ -8122,25 +9552,25 @@ const ( NetworkTypeKey = attribute.Key("network.type") ) -// NetworkCarrierIcc returns an attribute KeyValue conforming to the +// NetworkCarrierICC returns an attribute KeyValue conforming to the // "network.carrier.icc" semantic conventions. It represents the ISO 3166-1 // alpha-2 2-character country code associated with the mobile carrier network. -func NetworkCarrierIcc(val string) attribute.KeyValue { - return NetworkCarrierIccKey.String(val) +func NetworkCarrierICC(val string) attribute.KeyValue { + return NetworkCarrierICCKey.String(val) } -// NetworkCarrierMcc returns an attribute KeyValue conforming to the +// NetworkCarrierMCC returns an attribute KeyValue conforming to the // "network.carrier.mcc" semantic conventions. It represents the mobile carrier // country code. -func NetworkCarrierMcc(val string) attribute.KeyValue { - return NetworkCarrierMccKey.String(val) +func NetworkCarrierMCC(val string) attribute.KeyValue { + return NetworkCarrierMCCKey.String(val) } -// NetworkCarrierMnc returns an attribute KeyValue conforming to the +// NetworkCarrierMNC returns an attribute KeyValue conforming to the // "network.carrier.mnc" semantic conventions. It represents the mobile carrier // network code. -func NetworkCarrierMnc(val string) attribute.KeyValue { - return NetworkCarrierMncKey.String(val) +func NetworkCarrierMNC(val string) attribute.KeyValue { + return NetworkCarrierMNCKey.String(val) } // NetworkCarrierName returns an attribute KeyValue conforming to the @@ -8328,10 +9758,10 @@ var ( var ( // transmit // Stability: development - NetworkIoDirectionTransmit = NetworkIoDirectionKey.String("transmit") + NetworkIODirectionTransmit = NetworkIODirectionKey.String("transmit") // receive // Stability: development - NetworkIoDirectionReceive = NetworkIoDirectionKey.String("receive") + NetworkIODirectionReceive = NetworkIODirectionKey.String("receive") ) // Enum values for network.transport @@ -8349,7 +9779,7 @@ var ( // Stability: stable NetworkTransportUnix = NetworkTransportKey.String("unix") // QUIC - // Stability: development + // Stability: stable NetworkTransportQUIC = NetworkTransportKey.String("quic") ) @@ -8357,15 +9787,15 @@ var ( var ( // IPv4 // Stability: stable - NetworkTypeIpv4 = NetworkTypeKey.String("ipv4") + NetworkTypeIPv4 = NetworkTypeKey.String("ipv4") // IPv6 // Stability: stable - NetworkTypeIpv6 = NetworkTypeKey.String("ipv6") + NetworkTypeIPv6 = NetworkTypeKey.String("ipv6") ) // Namespace: oci const ( - // OciManifestDigestKey is the attribute Key conforming to the + // OCIManifestDigestKey is the attribute Key conforming to the // "oci.manifest.digest" semantic conventions. It represents the digest of the // OCI image manifest. For container images specifically is the digest by which // the container image is known. @@ -8382,21 +9812,21 @@ const ( // // [OCI Image Manifest Specification]: https://github.com/opencontainers/image-spec/blob/main/manifest.md // [Digest property]: https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests - // [Example Image Manifest]: https://docs.docker.com/registry/spec/manifest-v2-2/#example-image-manifest - OciManifestDigestKey = attribute.Key("oci.manifest.digest") + // [Example Image Manifest]: https://github.com/opencontainers/image-spec/blob/main/manifest.md#example-image-manifest + OCIManifestDigestKey = attribute.Key("oci.manifest.digest") ) -// OciManifestDigest returns an attribute KeyValue conforming to the +// OCIManifestDigest returns an attribute KeyValue conforming to the // "oci.manifest.digest" semantic conventions. It represents the digest of the // OCI image manifest. For container images specifically is the digest by which // the container image is known. -func OciManifestDigest(val string) attribute.KeyValue { - return OciManifestDigestKey.String(val) +func OCIManifestDigest(val string) attribute.KeyValue { + return OCIManifestDigestKey.String(val) } // Namespace: opentracing const ( - // OpentracingRefTypeKey is the attribute Key conforming to the + // OpenTracingRefTypeKey is the attribute Key conforming to the // "opentracing.ref_type" semantic conventions. It represents the parent-child // Reference type. // @@ -8406,17 +9836,17 @@ const ( // // Examples: // Note: The causal relationship between a child Span and a parent Span. - OpentracingRefTypeKey = attribute.Key("opentracing.ref_type") + OpenTracingRefTypeKey = attribute.Key("opentracing.ref_type") ) // Enum values for opentracing.ref_type var ( // The parent Span depends on the child Span in some capacity // Stability: development - OpentracingRefTypeChildOf = OpentracingRefTypeKey.String("child_of") + OpenTracingRefTypeChildOf = OpenTracingRefTypeKey.String("child_of") // The parent Span doesn't depend in any way on the result of the child Span // Stability: development - OpentracingRefTypeFollowsFrom = OpentracingRefTypeKey.String("follows_from") + OpenTracingRefTypeFollowsFrom = OpenTracingRefTypeKey.String("follows_from") ) // Namespace: os @@ -8547,6 +9977,54 @@ var ( // Namespace: otel const ( + // OTelComponentNameKey is the attribute Key conforming to the + // "otel.component.name" semantic conventions. It represents a name uniquely + // identifying the instance of the OpenTelemetry component within its containing + // SDK instance. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "otlp_grpc_span_exporter/0", "custom-name" + // Note: Implementations SHOULD ensure a low cardinality for this attribute, + // even across application or SDK restarts. + // E.g. implementations MUST NOT use UUIDs as values for this attribute. + // + // Implementations MAY achieve these goals by following a + // `/` pattern, e.g. + // `batching_span_processor/0`. + // Hereby `otel.component.type` refers to the corresponding attribute value of + // the component. + // + // The value of `instance-counter` MAY be automatically assigned by the + // component and uniqueness within the enclosing SDK instance MUST be + // guaranteed. + // For example, `` MAY be implemented by using a monotonically + // increasing counter (starting with `0`), which is incremented every time an + // instance of the given component type is started. + // + // With this implementation, for example the first Batching Span Processor would + // have `batching_span_processor/0` + // as `otel.component.name`, the second one `batching_span_processor/1` and so + // on. + // These values will therefore be reused in the case of an application restart. + OTelComponentNameKey = attribute.Key("otel.component.name") + + // OTelComponentTypeKey is the attribute Key conforming to the + // "otel.component.type" semantic conventions. It represents a name identifying + // the type of the OpenTelemetry component. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "batching_span_processor", "com.example.MySpanExporter" + // Note: If none of the standardized values apply, implementations SHOULD use + // the language-defined name of the type. + // E.g. for Java the fully qualified classname SHOULD be used in this case. + OTelComponentTypeKey = attribute.Key("otel.component.type") + // OTelScopeNameKey is the attribute Key conforming to the "otel.scope.name" // semantic conventions. It represents the name of the instrumentation scope - ( // `InstrumentationScope.Name` in OTLP). @@ -8569,6 +10047,17 @@ const ( // Examples: "1.0.0" OTelScopeVersionKey = attribute.Key("otel.scope.version") + // OTelSpanSamplingResultKey is the attribute Key conforming to the + // "otel.span.sampling_result" semantic conventions. It represents the result + // value of the sampler for this span. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: + OTelSpanSamplingResultKey = attribute.Key("otel.span.sampling_result") + // OTelStatusCodeKey is the attribute Key conforming to the "otel.status_code" // semantic conventions. It represents the name of the code, either "OK" or // "ERROR". MUST NOT be set if the status code is UNSET. @@ -8592,6 +10081,14 @@ const ( OTelStatusDescriptionKey = attribute.Key("otel.status_description") ) +// OTelComponentName returns an attribute KeyValue conforming to the +// "otel.component.name" semantic conventions. It represents a name uniquely +// identifying the instance of the OpenTelemetry component within its containing +// SDK instance. +func OTelComponentName(val string) attribute.KeyValue { + return OTelComponentNameKey.String(val) +} + // OTelScopeName returns an attribute KeyValue conforming to the // "otel.scope.name" semantic conventions. It represents the name of the // instrumentation scope - (`InstrumentationScope.Name` in OTLP). @@ -8613,6 +10110,79 @@ func OTelStatusDescription(val string) attribute.KeyValue { return OTelStatusDescriptionKey.String(val) } +// Enum values for otel.component.type +var ( + // The builtin SDK batching span processor + // + // Stability: development + OTelComponentTypeBatchingSpanProcessor = OTelComponentTypeKey.String("batching_span_processor") + // The builtin SDK simple span processor + // + // Stability: development + OTelComponentTypeSimpleSpanProcessor = OTelComponentTypeKey.String("simple_span_processor") + // The builtin SDK batching log record processor + // + // Stability: development + OTelComponentTypeBatchingLogProcessor = OTelComponentTypeKey.String("batching_log_processor") + // The builtin SDK simple log record processor + // + // Stability: development + OTelComponentTypeSimpleLogProcessor = OTelComponentTypeKey.String("simple_log_processor") + // OTLP span exporter over gRPC with protobuf serialization + // + // Stability: development + OTelComponentTypeOtlpGRPCSpanExporter = OTelComponentTypeKey.String("otlp_grpc_span_exporter") + // OTLP span exporter over HTTP with protobuf serialization + // + // Stability: development + OTelComponentTypeOtlpHTTPSpanExporter = OTelComponentTypeKey.String("otlp_http_span_exporter") + // OTLP span exporter over HTTP with JSON serialization + // + // Stability: development + OTelComponentTypeOtlpHTTPJSONSpanExporter = OTelComponentTypeKey.String("otlp_http_json_span_exporter") + // OTLP log record exporter over gRPC with protobuf serialization + // + // Stability: development + OTelComponentTypeOtlpGRPCLogExporter = OTelComponentTypeKey.String("otlp_grpc_log_exporter") + // OTLP log record exporter over HTTP with protobuf serialization + // + // Stability: development + OTelComponentTypeOtlpHTTPLogExporter = OTelComponentTypeKey.String("otlp_http_log_exporter") + // OTLP log record exporter over HTTP with JSON serialization + // + // Stability: development + OTelComponentTypeOtlpHTTPJSONLogExporter = OTelComponentTypeKey.String("otlp_http_json_log_exporter") + // The builtin SDK periodically exporting metric reader + // + // Stability: development + OTelComponentTypePeriodicMetricReader = OTelComponentTypeKey.String("periodic_metric_reader") + // OTLP metric exporter over gRPC with protobuf serialization + // + // Stability: development + OTelComponentTypeOtlpGRPCMetricExporter = OTelComponentTypeKey.String("otlp_grpc_metric_exporter") + // OTLP metric exporter over HTTP with protobuf serialization + // + // Stability: development + OTelComponentTypeOtlpHTTPMetricExporter = OTelComponentTypeKey.String("otlp_http_metric_exporter") + // OTLP metric exporter over HTTP with JSON serialization + // + // Stability: development + OTelComponentTypeOtlpHTTPJSONMetricExporter = OTelComponentTypeKey.String("otlp_http_json_metric_exporter") +) + +// Enum values for otel.span.sampling_result +var ( + // The span is not sampled and not recording + // Stability: development + OTelSpanSamplingResultDrop = OTelSpanSamplingResultKey.String("DROP") + // The span is not sampled, but recording + // Stability: development + OTelSpanSamplingResultRecordOnly = OTelSpanSamplingResultKey.String("RECORD_ONLY") + // The span is sampled and recording + // Stability: development + OTelSpanSamplingResultRecordAndSample = OTelSpanSamplingResultKey.String("RECORD_AND_SAMPLE") +) + // Enum values for otel.status_code var ( // The operation has been validated by an Application developer or Operator to @@ -8686,7 +10256,8 @@ const ( // the process. On Linux-based systems (and some other Unixoid systems // supporting procfs), can be set according to the list of null-delimited // strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this - // would be the full argv vector passed to `main`. + // would be the full argv vector passed to `main`. SHOULD NOT be collected by + // default unless there is sanitization that excludes sensitive data. // // Type: string[] // RequirementLevel: Recommended @@ -8700,7 +10271,8 @@ const ( // used to launch the process as a single string representing the full command. // On Windows, can be set to the result of `GetCommandLineW`. Do not set this if // you have to assemble it just for monitoring; use `process.command_args` - // instead. + // instead. SHOULD NOT be collected by default unless there is sanitization that + // excludes sensitive data. // // Type: string // RequirementLevel: Recommended @@ -8732,7 +10304,7 @@ const ( // Examples: "2023-11-21T09:25:34.853Z" ProcessCreationTimeKey = attribute.Key("process.creation.time") - // ProcessExecutableBuildIDGnuKey is the attribute Key conforming to the + // ProcessExecutableBuildIDGNUKey is the attribute Key conforming to the // "process.executable.build_id.gnu" semantic conventions. It represents the GNU // build ID as found in the `.note.gnu.build-id` ELF section (hex string). // @@ -8741,7 +10313,7 @@ const ( // Stability: Development // // Examples: "c89b11207f6479603b0d49bf291c092c2b719293" - ProcessExecutableBuildIDGnuKey = attribute.Key("process.executable.build_id.gnu") + ProcessExecutableBuildIDGNUKey = attribute.Key("process.executable.build_id.gnu") // ProcessExecutableBuildIDGoKey is the attribute Key conforming to the // "process.executable.build_id.go" semantic conventions. It represents the Go @@ -8769,9 +10341,9 @@ const ( // ProcessExecutableNameKey is the attribute Key conforming to the // "process.executable.name" semantic conventions. It represents the name of the - // process executable. On Linux based systems, can be set to the `Name` in - // `proc/[pid]/status`. On Windows, can be set to the base name of - // `GetProcessImageFileNameW`. + // process executable. On Linux based systems, this SHOULD be set to the base + // name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to + // the base name of `GetProcessImageFileNameW`. // // Type: string // RequirementLevel: Recommended @@ -9071,7 +10643,8 @@ func ProcessCommand(val string) attribute.KeyValue { // process. On Linux-based systems (and some other Unixoid systems supporting // procfs), can be set according to the list of null-delimited strings extracted // from `proc/[pid]/cmdline`. For libc-based executables, this would be the full -// argv vector passed to `main`. +// argv vector passed to `main`. SHOULD NOT be collected by default unless there +// is sanitization that excludes sensitive data. func ProcessCommandArgs(val ...string) attribute.KeyValue { return ProcessCommandArgsKey.StringSlice(val) } @@ -9081,7 +10654,8 @@ func ProcessCommandArgs(val ...string) attribute.KeyValue { // used to launch the process as a single string representing the full command. // On Windows, can be set to the result of `GetCommandLineW`. Do not set this if // you have to assemble it just for monitoring; use `process.command_args` -// instead. +// instead. SHOULD NOT be collected by default unless there is sanitization that +// excludes sensitive data. func ProcessCommandLine(val string) attribute.KeyValue { return ProcessCommandLineKey.String(val) } @@ -9093,11 +10667,19 @@ func ProcessCreationTime(val string) attribute.KeyValue { return ProcessCreationTimeKey.String(val) } -// ProcessExecutableBuildIDGnu returns an attribute KeyValue conforming to the +// ProcessEnvironmentVariable returns an attribute KeyValue conforming to the +// "process.environment_variable" semantic conventions. It represents the process +// environment variables, being the environment variable name, the value +// being the environment variable value. +func ProcessEnvironmentVariable(key string, val string) attribute.KeyValue { + return attribute.String("process.environment_variable."+key, val) +} + +// ProcessExecutableBuildIDGNU returns an attribute KeyValue conforming to the // "process.executable.build_id.gnu" semantic conventions. It represents the GNU // build ID as found in the `.note.gnu.build-id` ELF section (hex string). -func ProcessExecutableBuildIDGnu(val string) attribute.KeyValue { - return ProcessExecutableBuildIDGnuKey.String(val) +func ProcessExecutableBuildIDGNU(val string) attribute.KeyValue { + return ProcessExecutableBuildIDGNUKey.String(val) } // ProcessExecutableBuildIDGo returns an attribute KeyValue conforming to the @@ -9117,9 +10699,9 @@ func ProcessExecutableBuildIDHtlhash(val string) attribute.KeyValue { // ProcessExecutableName returns an attribute KeyValue conforming to the // "process.executable.name" semantic conventions. It represents the name of the -// process executable. On Linux based systems, can be set to the `Name` in -// `proc/[pid]/status`. On Windows, can be set to the base name of -// `GetProcessImageFileNameW`. +// process executable. On Linux based systems, this SHOULD be set to the base +// name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to the +// base name of `GetProcessImageFileNameW`. func ProcessExecutableName(val string) attribute.KeyValue { return ProcessExecutableNameKey.String(val) } @@ -9334,7 +10916,8 @@ var ( // // [Kernel]: https://wikipedia.org/wiki/Kernel_(operating_system) ProfileFrameTypeKernel = ProfileFrameTypeKey.String("kernel") - // [C], [C++], [Go], [Rust] + // Can be one of but not limited to [C], [C++], [Go] or [Rust]. If possible, a + // more precise value MUST be used. // // Stability: development // @@ -9379,6 +10962,18 @@ var ( // // [Erlang]: https://en.wikipedia.org/wiki/BEAM_(Erlang_virtual_machine) ProfileFrameTypeBeam = ProfileFrameTypeKey.String("beam") + // [Go], + // + // Stability: development + // + // [Go]: https://wikipedia.org/wiki/Go_(programming_language) + ProfileFrameTypeGo = ProfileFrameTypeKey.String("go") + // [Rust] + // + // Stability: development + // + // [Rust]: https://wikipedia.org/wiki/Rust_(programming_language) + ProfileFrameTypeRust = ProfileFrameTypeKey.String("rust") ) // Namespace: rpc @@ -9393,7 +10988,7 @@ const ( // // Examples: // - // [error codes]: https://connect.build/docs/protocol/#error-codes + // [error codes]: https://connectrpc.com//docs/protocol/#error-codes RPCConnectRPCErrorCodeKey = attribute.Key("rpc.connect_rpc.error_code") // RPCGRPCStatusCodeKey is the attribute Key conforming to the @@ -9409,7 +11004,7 @@ const ( // [numeric status code]: https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md RPCGRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code") - // RPCJsonrpcErrorCodeKey is the attribute Key conforming to the + // RPCJSONRPCErrorCodeKey is the attribute Key conforming to the // "rpc.jsonrpc.error_code" semantic conventions. It represents the `error.code` // property of response if it is an error response. // @@ -9418,9 +11013,9 @@ const ( // Stability: Development // // Examples: -32700, 100 - RPCJsonrpcErrorCodeKey = attribute.Key("rpc.jsonrpc.error_code") + RPCJSONRPCErrorCodeKey = attribute.Key("rpc.jsonrpc.error_code") - // RPCJsonrpcErrorMessageKey is the attribute Key conforming to the + // RPCJSONRPCErrorMessageKey is the attribute Key conforming to the // "rpc.jsonrpc.error_message" semantic conventions. It represents the // `error.message` property of response if it is an error response. // @@ -9429,9 +11024,9 @@ const ( // Stability: Development // // Examples: "Parse error", "User already exists" - RPCJsonrpcErrorMessageKey = attribute.Key("rpc.jsonrpc.error_message") + RPCJSONRPCErrorMessageKey = attribute.Key("rpc.jsonrpc.error_message") - // RPCJsonrpcRequestIDKey is the attribute Key conforming to the + // RPCJSONRPCRequestIDKey is the attribute Key conforming to the // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id` // property of request or response. Since protocol allows id to be int, string, // `null` or missing (for notifications), value is expected to be cast to string @@ -9443,9 +11038,9 @@ const ( // Stability: Development // // Examples: "10", "request-7", "" - RPCJsonrpcRequestIDKey = attribute.Key("rpc.jsonrpc.request_id") + RPCJSONRPCRequestIDKey = attribute.Key("rpc.jsonrpc.request_id") - // RPCJsonrpcVersionKey is the attribute Key conforming to the + // RPCJSONRPCVersionKey is the attribute Key conforming to the // "rpc.jsonrpc.version" semantic conventions. It represents the protocol // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 // doesn't specify this, the value can be omitted. @@ -9455,7 +11050,7 @@ const ( // Stability: Development // // Examples: "2.0", "1.0" - RPCJsonrpcVersionKey = attribute.Key("rpc.jsonrpc.version") + RPCJSONRPCVersionKey = attribute.Key("rpc.jsonrpc.version") // RPCMessageCompressedSizeKey is the attribute Key conforming to the // "rpc.message.compressed_size" semantic conventions. It represents the @@ -9469,9 +11064,8 @@ const ( RPCMessageCompressedSizeKey = attribute.Key("rpc.message.compressed_size") // RPCMessageIDKey is the attribute Key conforming to the "rpc.message.id" - // semantic conventions. It represents the mUST be calculated as two different - // counters starting from `1` one for sent messages and one for received - // message. + // semantic conventions. It MUST be calculated as two different counters + // starting from `1` one for sent messages and one for received message.. // // Type: int // RequirementLevel: Recommended @@ -9549,36 +11143,68 @@ const ( RPCSystemKey = attribute.Key("rpc.system") ) -// RPCJsonrpcErrorCode returns an attribute KeyValue conforming to the +// RPCConnectRPCRequestMetadata returns an attribute KeyValue conforming to the +// "rpc.connect_rpc.request.metadata" semantic conventions. It represents the +// connect request metadata, `` being the normalized Connect Metadata key +// (lowercase), the value being the metadata values. +func RPCConnectRPCRequestMetadata(key string, val ...string) attribute.KeyValue { + return attribute.StringSlice("rpc.connect_rpc.request.metadata."+key, val) +} + +// RPCConnectRPCResponseMetadata returns an attribute KeyValue conforming to the +// "rpc.connect_rpc.response.metadata" semantic conventions. It represents the +// connect response metadata, `` being the normalized Connect Metadata key +// (lowercase), the value being the metadata values. +func RPCConnectRPCResponseMetadata(key string, val ...string) attribute.KeyValue { + return attribute.StringSlice("rpc.connect_rpc.response.metadata."+key, val) +} + +// RPCGRPCRequestMetadata returns an attribute KeyValue conforming to the +// "rpc.grpc.request.metadata" semantic conventions. It represents the gRPC +// request metadata, `` being the normalized gRPC Metadata key (lowercase), +// the value being the metadata values. +func RPCGRPCRequestMetadata(key string, val ...string) attribute.KeyValue { + return attribute.StringSlice("rpc.grpc.request.metadata."+key, val) +} + +// RPCGRPCResponseMetadata returns an attribute KeyValue conforming to the +// "rpc.grpc.response.metadata" semantic conventions. It represents the gRPC +// response metadata, `` being the normalized gRPC Metadata key (lowercase), +// the value being the metadata values. +func RPCGRPCResponseMetadata(key string, val ...string) attribute.KeyValue { + return attribute.StringSlice("rpc.grpc.response.metadata."+key, val) +} + +// RPCJSONRPCErrorCode returns an attribute KeyValue conforming to the // "rpc.jsonrpc.error_code" semantic conventions. It represents the `error.code` // property of response if it is an error response. -func RPCJsonrpcErrorCode(val int) attribute.KeyValue { - return RPCJsonrpcErrorCodeKey.Int(val) +func RPCJSONRPCErrorCode(val int) attribute.KeyValue { + return RPCJSONRPCErrorCodeKey.Int(val) } -// RPCJsonrpcErrorMessage returns an attribute KeyValue conforming to the +// RPCJSONRPCErrorMessage returns an attribute KeyValue conforming to the // "rpc.jsonrpc.error_message" semantic conventions. It represents the // `error.message` property of response if it is an error response. -func RPCJsonrpcErrorMessage(val string) attribute.KeyValue { - return RPCJsonrpcErrorMessageKey.String(val) +func RPCJSONRPCErrorMessage(val string) attribute.KeyValue { + return RPCJSONRPCErrorMessageKey.String(val) } -// RPCJsonrpcRequestID returns an attribute KeyValue conforming to the +// RPCJSONRPCRequestID returns an attribute KeyValue conforming to the // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id` property // of request or response. Since protocol allows id to be int, string, `null` or // missing (for notifications), value is expected to be cast to string for // simplicity. Use empty string in case of `null` value. Omit entirely if this is // a notification. -func RPCJsonrpcRequestID(val string) attribute.KeyValue { - return RPCJsonrpcRequestIDKey.String(val) +func RPCJSONRPCRequestID(val string) attribute.KeyValue { + return RPCJSONRPCRequestIDKey.String(val) } -// RPCJsonrpcVersion returns an attribute KeyValue conforming to the +// RPCJSONRPCVersion returns an attribute KeyValue conforming to the // "rpc.jsonrpc.version" semantic conventions. It represents the protocol version // as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 doesn't // specify this, the value can be omitted. -func RPCJsonrpcVersion(val string) attribute.KeyValue { - return RPCJsonrpcVersionKey.String(val) +func RPCJSONRPCVersion(val string) attribute.KeyValue { + return RPCJSONRPCVersionKey.String(val) } // RPCMessageCompressedSize returns an attribute KeyValue conforming to the @@ -9589,8 +11215,8 @@ func RPCMessageCompressedSize(val int) attribute.KeyValue { } // RPCMessageID returns an attribute KeyValue conforming to the "rpc.message.id" -// semantic conventions. It represents the mUST be calculated as two different -// counters starting from `1` one for sent messages and one for received message. +// semantic conventions. It MUST be calculated as two different counters starting +// from `1` one for sent messages and one for received message.. func RPCMessageID(val int) attribute.KeyValue { return RPCMessageIDKey.Int(val) } @@ -10123,7 +11749,7 @@ func SessionPreviousID(val string) attribute.KeyValue { // Namespace: signalr const ( - // SignalrConnectionStatusKey is the attribute Key conforming to the + // SignalRConnectionStatusKey is the attribute Key conforming to the // "signalr.connection.status" semantic conventions. It represents the signalR // HTTP connection closure status. // @@ -10132,9 +11758,9 @@ const ( // Stability: Stable // // Examples: "app_shutdown", "timeout" - SignalrConnectionStatusKey = attribute.Key("signalr.connection.status") + SignalRConnectionStatusKey = attribute.Key("signalr.connection.status") - // SignalrTransportKey is the attribute Key conforming to the + // SignalRTransportKey is the attribute Key conforming to the // "signalr.transport" semantic conventions. It represents the // [SignalR transport type]. // @@ -10145,33 +11771,33 @@ const ( // Examples: "web_sockets", "long_polling" // // [SignalR transport type]: https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md - SignalrTransportKey = attribute.Key("signalr.transport") + SignalRTransportKey = attribute.Key("signalr.transport") ) // Enum values for signalr.connection.status var ( // The connection was closed normally. // Stability: stable - SignalrConnectionStatusNormalClosure = SignalrConnectionStatusKey.String("normal_closure") + SignalRConnectionStatusNormalClosure = SignalRConnectionStatusKey.String("normal_closure") // The connection was closed due to a timeout. // Stability: stable - SignalrConnectionStatusTimeout = SignalrConnectionStatusKey.String("timeout") + SignalRConnectionStatusTimeout = SignalRConnectionStatusKey.String("timeout") // The connection was closed because the app is shutting down. // Stability: stable - SignalrConnectionStatusAppShutdown = SignalrConnectionStatusKey.String("app_shutdown") + SignalRConnectionStatusAppShutdown = SignalRConnectionStatusKey.String("app_shutdown") ) // Enum values for signalr.transport var ( // ServerSentEvents protocol // Stability: stable - SignalrTransportServerSentEvents = SignalrTransportKey.String("server_sent_events") + SignalRTransportServerSentEvents = SignalRTransportKey.String("server_sent_events") // LongPolling protocol // Stability: stable - SignalrTransportLongPolling = SignalrTransportKey.String("long_polling") + SignalRTransportLongPolling = SignalRTransportKey.String("long_polling") // WebSockets protocol // Stability: stable - SignalrTransportWebSockets = SignalrTransportKey.String("web_sockets") + SignalRTransportWebSockets = SignalRTransportKey.String("web_sockets") ) // Namespace: source @@ -10219,8 +11845,8 @@ func SourcePort(val int) attribute.KeyValue { // Namespace: system const ( // SystemCPULogicalNumberKey is the attribute Key conforming to the - // "system.cpu.logical_number" semantic conventions. It represents the logical - // CPU number [0..n-1]. + // "system.cpu.logical_number" semantic conventions. It represents the + // deprecated, use `cpu.logical_number` instead. // // Type: int // RequirementLevel: Recommended @@ -10341,8 +11967,8 @@ const ( ) // SystemCPULogicalNumber returns an attribute KeyValue conforming to the -// "system.cpu.logical_number" semantic conventions. It represents the logical -// CPU number [0..n-1]. +// "system.cpu.logical_number" semantic conventions. It represents the +// deprecated, use `cpu.logical_number` instead. func SystemCPULogicalNumber(val int) attribute.KeyValue { return SystemCPULogicalNumberKey.Int(val) } @@ -10604,7 +12230,7 @@ var ( TelemetrySDKLanguageSwift = TelemetrySDKLanguageKey.String("swift") // webjs // Stability: stable - TelemetrySDKLanguageWebjs = TelemetrySDKLanguageKey.String("webjs") + TelemetrySDKLanguageWebJS = TelemetrySDKLanguageKey.String("webjs") ) // Namespace: test @@ -10765,7 +12391,7 @@ const ( TLSCipherKey = attribute.Key("tls.cipher") // TLSClientCertificateKey is the attribute Key conforming to the - // "tls.client.certificate" semantic conventions. It represents the pEM-encoded + // "tls.client.certificate" semantic conventions. It represents the PEM-encoded // stand-alone certificate offered by the client. This is usually // mutually-exclusive of `client.certificate_chain` since this value also exists // in that list. @@ -10944,7 +12570,7 @@ const ( // // Examples: // - // [SSL/TLS protocol version]: https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES + // [SSL/TLS protocol version]: https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values TLSProtocolNameKey = attribute.Key("tls.protocol.name") // TLSProtocolVersionKey is the attribute Key conforming to the @@ -10958,7 +12584,7 @@ const ( // // Examples: "1.2", "3" // - // [SSL/TLS protocol version]: https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES + // [SSL/TLS protocol version]: https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values TLSProtocolVersionKey = attribute.Key("tls.protocol.version") // TLSResumedKey is the attribute Key conforming to the "tls.resumed" semantic @@ -10973,7 +12599,7 @@ const ( TLSResumedKey = attribute.Key("tls.resumed") // TLSServerCertificateKey is the attribute Key conforming to the - // "tls.server.certificate" semantic conventions. It represents the pEM-encoded + // "tls.server.certificate" semantic conventions. It represents the PEM-encoded // stand-alone certificate offered by the server. This is usually // mutually-exclusive of `server.certificate_chain` since this value also exists // in that list. @@ -11105,7 +12731,7 @@ func TLSCipher(val string) attribute.KeyValue { } // TLSClientCertificate returns an attribute KeyValue conforming to the -// "tls.client.certificate" semantic conventions. It represents the pEM-encoded +// "tls.client.certificate" semantic conventions. It represents the PEM-encoded // stand-alone certificate offered by the client. This is usually // mutually-exclusive of `client.certificate_chain` since this value also exists // in that list. @@ -11223,7 +12849,7 @@ func TLSNextProtocol(val string) attribute.KeyValue { // the version parsed from the original string of the negotiated // [SSL/TLS protocol version]. // -// [SSL/TLS protocol version]: https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES +// [SSL/TLS protocol version]: https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values func TLSProtocolVersion(val string) attribute.KeyValue { return TLSProtocolVersionKey.String(val) } @@ -11236,7 +12862,7 @@ func TLSResumed(val bool) attribute.KeyValue { } // TLSServerCertificate returns an attribute KeyValue conforming to the -// "tls.server.certificate" semantic conventions. It represents the pEM-encoded +// "tls.server.certificate" semantic conventions. It represents the PEM-encoded // stand-alone certificate offered by the server. This is usually // mutually-exclusive of `server.certificate_chain` since this value also exists // in that list. @@ -11510,7 +13136,7 @@ const ( // Trying to approximate this by simply taking the last two labels will not work // well for TLDs such as `co.uk`. // - // [public suffix list]: http://publicsuffix.org + // [public suffix list]: https://publicsuffix.org/ URLRegisteredDomainKey = attribute.Key("url.registered_domain") // URLSchemeKey is the attribute Key conforming to the "url.scheme" semantic @@ -11568,7 +13194,7 @@ const ( // Examples: "com", "co.uk" // Note: This value can be determined precisely with the [public suffix list]. // - // [public suffix list]: http://publicsuffix.org + // [public suffix list]: https://publicsuffix.org/ URLTopLevelDomainKey = attribute.Key("url.top_level_domain") ) @@ -11815,6 +13441,37 @@ const ( // [HTTP User-Agent]: https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent UserAgentOriginalKey = attribute.Key("user_agent.original") + // UserAgentOSNameKey is the attribute Key conforming to the + // "user_agent.os.name" semantic conventions. It represents the human readable + // operating system name. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "iOS", "Android", "Ubuntu" + // Note: For mapping user agent strings to OS names, libraries such as + // [ua-parser] can be utilized. + // + // [ua-parser]: https://github.com/ua-parser + UserAgentOSNameKey = attribute.Key("user_agent.os.name") + + // UserAgentOSVersionKey is the attribute Key conforming to the + // "user_agent.os.version" semantic conventions. It represents the version + // string of the operating system as defined in [Version Attributes]. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "14.2.1", "18.04.1" + // Note: For mapping user agent strings to OS versions, libraries such as + // [ua-parser] can be utilized. + // + // [Version Attributes]: /docs/resource/README.md#version-attributes + // [ua-parser]: https://github.com/ua-parser + UserAgentOSVersionKey = attribute.Key("user_agent.os.version") + // UserAgentSyntheticTypeKey is the attribute Key conforming to the // "user_agent.synthetic.type" semantic conventions. It represents the specifies // the category of synthetic traffic, such as tests or bots. @@ -11868,6 +13525,22 @@ func UserAgentOriginal(val string) attribute.KeyValue { return UserAgentOriginalKey.String(val) } +// UserAgentOSName returns an attribute KeyValue conforming to the +// "user_agent.os.name" semantic conventions. It represents the human readable +// operating system name. +func UserAgentOSName(val string) attribute.KeyValue { + return UserAgentOSNameKey.String(val) +} + +// UserAgentOSVersion returns an attribute KeyValue conforming to the +// "user_agent.os.version" semantic conventions. It represents the version string +// of the operating system as defined in [Version Attributes]. +// +// [Version Attributes]: /docs/resource/README.md#version-attributes +func UserAgentOSVersion(val string) attribute.KeyValue { + return UserAgentOSVersionKey.String(val) +} + // UserAgentVersion returns an attribute KeyValue conforming to the // "user_agent.version" semantic conventions. It represents the version of the // user-agent extracted from original. Usually refers to the browser's version. @@ -11934,6 +13607,28 @@ const ( // Examples: "added", "removed" VCSLineChangeTypeKey = attribute.Key("vcs.line_change.type") + // VCSOwnerNameKey is the attribute Key conforming to the "vcs.owner.name" + // semantic conventions. It represents the group owner within the version + // control system. + // + // Type: string + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "my-org", "myteam", "business-unit" + VCSOwnerNameKey = attribute.Key("vcs.owner.name") + + // VCSProviderNameKey is the attribute Key conforming to the "vcs.provider.name" + // semantic conventions. It represents the name of the version control system + // provider. + // + // Type: Enum + // RequirementLevel: Recommended + // Stability: Development + // + // Examples: "github", "gitlab", "gitea", "bitbucket" + VCSProviderNameKey = attribute.Key("vcs.provider.name") + // VCSRefBaseNameKey is the attribute Key conforming to the "vcs.ref.base.name" // semantic conventions. It represents the name of the [reference] such as // **branch** or **tag** in the repository. @@ -12134,6 +13829,13 @@ func VCSChangeTitle(val string) attribute.KeyValue { return VCSChangeTitleKey.String(val) } +// VCSOwnerName returns an attribute KeyValue conforming to the "vcs.owner.name" +// semantic conventions. It represents the group owner within the version control +// system. +func VCSOwnerName(val string) attribute.KeyValue { + return VCSOwnerNameKey.String(val) +} + // VCSRefBaseName returns an attribute KeyValue conforming to the // "vcs.ref.base.name" semantic conventions. It represents the name of the // [reference] such as **branch** or **tag** in the repository. @@ -12223,6 +13925,32 @@ var ( VCSLineChangeTypeRemoved = VCSLineChangeTypeKey.String("removed") ) +// Enum values for vcs.provider.name +var ( + // [GitHub] + // Stability: development + // + // [GitHub]: https://github.com + VCSProviderNameGithub = VCSProviderNameKey.String("github") + // [GitLab] + // Stability: development + // + // [GitLab]: https://gitlab.com + VCSProviderNameGitlab = VCSProviderNameKey.String("gitlab") + // Deprecated: Replaced by `gitea`. + VCSProviderNameGittea = VCSProviderNameKey.String("gittea") + // [Gitea] + // Stability: development + // + // [Gitea]: https://gitea.io + VCSProviderNameGitea = VCSProviderNameKey.String("gitea") + // [Bitbucket] + // Stability: development + // + // [Bitbucket]: https://bitbucket.org + VCSProviderNameBitbucket = VCSProviderNameKey.String("bitbucket") +) + // Enum values for vcs.ref.base.type var ( // [branch] diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.30.0/doc.go b/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/doc.go similarity index 96% rename from vendor/go.opentelemetry.io/otel/semconv/v1.30.0/doc.go rename to vendor/go.opentelemetry.io/otel/semconv/v1.34.0/doc.go index 787f5b0f4d..2c5c7ebd04 100644 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.30.0/doc.go +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/doc.go @@ -4,6 +4,6 @@ // Package semconv implements OpenTelemetry semantic conventions. // // OpenTelemetry semantic conventions are agreed standardized naming -// patterns for OpenTelemetry things. This package represents the v1.30.0 +// patterns for OpenTelemetry things. This package represents the v1.34.0 // version of the OpenTelemetry semantic conventions. -package semconv // import "go.opentelemetry.io/otel/semconv/v1.30.0" +package semconv // import "go.opentelemetry.io/otel/semconv/v1.34.0" diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/error_type.go b/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/error_type.go new file mode 100644 index 0000000000..19bf022465 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/error_type.go @@ -0,0 +1,31 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.34.0" + +import ( + "fmt" + "reflect" + + "go.opentelemetry.io/otel/attribute" +) + +// ErrorType returns an [attribute.KeyValue] identifying the error type of err. +func ErrorType(err error) attribute.KeyValue { + if err == nil { + return ErrorTypeOther + } + t := reflect.TypeOf(err) + var value string + if t.PkgPath() == "" && t.Name() == "" { + // Likely a builtin type. + value = t.String() + } else { + value = fmt.Sprintf("%s.%s", t.PkgPath(), t.Name()) + } + + if value == "" { + return ErrorTypeOther + } + return ErrorTypeKey.String(value) +} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.30.0/exception.go b/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/exception.go similarity index 98% rename from vendor/go.opentelemetry.io/otel/semconv/v1.30.0/exception.go rename to vendor/go.opentelemetry.io/otel/semconv/v1.34.0/exception.go index 4332a795f3..88a998f1e5 100644 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.30.0/exception.go +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/exception.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package semconv // import "go.opentelemetry.io/otel/semconv/v1.30.0" +package semconv // import "go.opentelemetry.io/otel/semconv/v1.34.0" const ( // ExceptionEventName is the name of the Span event representing an exception. diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/httpconv/metric.go b/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/httpconv/metric.go new file mode 100644 index 0000000000..79843adbb5 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/httpconv/metric.go @@ -0,0 +1,1418 @@ +// Code generated from semantic convention specification. DO NOT EDIT. + +// Package httpconv provides types and functionality for OpenTelemetry semantic +// conventions in the "http" namespace. +package httpconv + +import ( + "context" + "sync" + + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/metric/noop" +) + +var ( + addOptPool = &sync.Pool{New: func() any { return &[]metric.AddOption{} }} + recOptPool = &sync.Pool{New: func() any { return &[]metric.RecordOption{} }} +) + +// ErrorTypeAttr is an attribute conforming to the error.type semantic +// conventions. It represents the describes a class of error the operation ended +// with. +type ErrorTypeAttr string + +var ( + // ErrorTypeOther is a fallback error value to be used when the instrumentation + // doesn't define a custom value. + ErrorTypeOther ErrorTypeAttr = "_OTHER" +) + +// ConnectionStateAttr is an attribute conforming to the http.connection.state +// semantic conventions. It represents the state of the HTTP connection in the +// HTTP connection pool. +type ConnectionStateAttr string + +var ( + // ConnectionStateActive is the active state. + ConnectionStateActive ConnectionStateAttr = "active" + // ConnectionStateIdle is the idle state. + ConnectionStateIdle ConnectionStateAttr = "idle" +) + +// RequestMethodAttr is an attribute conforming to the http.request.method +// semantic conventions. It represents the HTTP request method. +type RequestMethodAttr string + +var ( + // RequestMethodConnect is the CONNECT method. + RequestMethodConnect RequestMethodAttr = "CONNECT" + // RequestMethodDelete is the DELETE method. + RequestMethodDelete RequestMethodAttr = "DELETE" + // RequestMethodGet is the GET method. + RequestMethodGet RequestMethodAttr = "GET" + // RequestMethodHead is the HEAD method. + RequestMethodHead RequestMethodAttr = "HEAD" + // RequestMethodOptions is the OPTIONS method. + RequestMethodOptions RequestMethodAttr = "OPTIONS" + // RequestMethodPatch is the PATCH method. + RequestMethodPatch RequestMethodAttr = "PATCH" + // RequestMethodPost is the POST method. + RequestMethodPost RequestMethodAttr = "POST" + // RequestMethodPut is the PUT method. + RequestMethodPut RequestMethodAttr = "PUT" + // RequestMethodTrace is the TRACE method. + RequestMethodTrace RequestMethodAttr = "TRACE" + // RequestMethodOther is the any HTTP method that the instrumentation has no + // prior knowledge of. + RequestMethodOther RequestMethodAttr = "_OTHER" +) + +// UserAgentSyntheticTypeAttr is an attribute conforming to the +// user_agent.synthetic.type semantic conventions. It represents the specifies +// the category of synthetic traffic, such as tests or bots. +type UserAgentSyntheticTypeAttr string + +var ( + // UserAgentSyntheticTypeBot is the bot source. + UserAgentSyntheticTypeBot UserAgentSyntheticTypeAttr = "bot" + // UserAgentSyntheticTypeTest is the synthetic test source. + UserAgentSyntheticTypeTest UserAgentSyntheticTypeAttr = "test" +) + +// ClientActiveRequests is an instrument used to record metric values conforming +// to the "http.client.active_requests" semantic conventions. It represents the +// number of active HTTP requests. +type ClientActiveRequests struct { + metric.Int64UpDownCounter +} + +// NewClientActiveRequests returns a new ClientActiveRequests instrument. +func NewClientActiveRequests( + m metric.Meter, + opt ...metric.Int64UpDownCounterOption, +) (ClientActiveRequests, error) { + // Check if the meter is nil. + if m == nil { + return ClientActiveRequests{noop.Int64UpDownCounter{}}, nil + } + + i, err := m.Int64UpDownCounter( + "http.client.active_requests", + append([]metric.Int64UpDownCounterOption{ + metric.WithDescription("Number of active HTTP requests."), + metric.WithUnit("{request}"), + }, opt...)..., + ) + if err != nil { + return ClientActiveRequests{noop.Int64UpDownCounter{}}, err + } + return ClientActiveRequests{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m ClientActiveRequests) Inst() metric.Int64UpDownCounter { + return m.Int64UpDownCounter +} + +// Name returns the semantic convention name of the instrument. +func (ClientActiveRequests) Name() string { + return "http.client.active_requests" +} + +// Unit returns the semantic convention unit of the instrument +func (ClientActiveRequests) Unit() string { + return "{request}" +} + +// Description returns the semantic convention description of the instrument +func (ClientActiveRequests) Description() string { + return "Number of active HTTP requests." +} + +// Add adds incr to the existing count. +// +// The serverAddress is the server domain name if available without reverse DNS +// lookup; otherwise, IP address or Unix domain socket name. +// +// The serverPort is the port identifier of the ["URI origin"] HTTP request is +// sent to. +// +// All additional attrs passed are included in the recorded value. +// +// ["URI origin"]: https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin +func (m ClientActiveRequests) Add( + ctx context.Context, + incr int64, + serverAddress string, + serverPort int, + attrs ...attribute.KeyValue, +) { + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + append( + attrs, + attribute.String("server.address", serverAddress), + attribute.Int("server.port", serverPort), + )..., + ), + ) + + m.Int64UpDownCounter.Add(ctx, incr, *o...) +} + +// AttrURLTemplate returns an optional attribute for the "url.template" semantic +// convention. It represents the low-cardinality template of an +// [absolute path reference]. +// +// [absolute path reference]: https://www.rfc-editor.org/rfc/rfc3986#section-4.2 +func (ClientActiveRequests) AttrURLTemplate(val string) attribute.KeyValue { + return attribute.String("url.template", val) +} + +// AttrRequestMethod returns an optional attribute for the "http.request.method" +// semantic convention. It represents the HTTP request method. +func (ClientActiveRequests) AttrRequestMethod(val RequestMethodAttr) attribute.KeyValue { + return attribute.String("http.request.method", string(val)) +} + +// AttrURLScheme returns an optional attribute for the "url.scheme" semantic +// convention. It represents the [URI scheme] component identifying the used +// protocol. +// +// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1 +func (ClientActiveRequests) AttrURLScheme(val string) attribute.KeyValue { + return attribute.String("url.scheme", val) +} + +// ClientConnectionDuration is an instrument used to record metric values +// conforming to the "http.client.connection.duration" semantic conventions. It +// represents the duration of the successfully established outbound HTTP +// connections. +type ClientConnectionDuration struct { + metric.Float64Histogram +} + +// NewClientConnectionDuration returns a new ClientConnectionDuration instrument. +func NewClientConnectionDuration( + m metric.Meter, + opt ...metric.Float64HistogramOption, +) (ClientConnectionDuration, error) { + // Check if the meter is nil. + if m == nil { + return ClientConnectionDuration{noop.Float64Histogram{}}, nil + } + + i, err := m.Float64Histogram( + "http.client.connection.duration", + append([]metric.Float64HistogramOption{ + metric.WithDescription("The duration of the successfully established outbound HTTP connections."), + metric.WithUnit("s"), + }, opt...)..., + ) + if err != nil { + return ClientConnectionDuration{noop.Float64Histogram{}}, err + } + return ClientConnectionDuration{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m ClientConnectionDuration) Inst() metric.Float64Histogram { + return m.Float64Histogram +} + +// Name returns the semantic convention name of the instrument. +func (ClientConnectionDuration) Name() string { + return "http.client.connection.duration" +} + +// Unit returns the semantic convention unit of the instrument +func (ClientConnectionDuration) Unit() string { + return "s" +} + +// Description returns the semantic convention description of the instrument +func (ClientConnectionDuration) Description() string { + return "The duration of the successfully established outbound HTTP connections." +} + +// Record records val to the current distribution. +// +// The serverAddress is the server domain name if available without reverse DNS +// lookup; otherwise, IP address or Unix domain socket name. +// +// The serverPort is the port identifier of the ["URI origin"] HTTP request is +// sent to. +// +// All additional attrs passed are included in the recorded value. +// +// ["URI origin"]: https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin +func (m ClientConnectionDuration) Record( + ctx context.Context, + val float64, + serverAddress string, + serverPort int, + attrs ...attribute.KeyValue, +) { + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + append( + attrs, + attribute.String("server.address", serverAddress), + attribute.Int("server.port", serverPort), + )..., + ), + ) + + m.Float64Histogram.Record(ctx, val, *o...) +} + +// AttrNetworkPeerAddress returns an optional attribute for the +// "network.peer.address" semantic convention. It represents the peer address of +// the network connection - IP address or Unix domain socket name. +func (ClientConnectionDuration) AttrNetworkPeerAddress(val string) attribute.KeyValue { + return attribute.String("network.peer.address", val) +} + +// AttrNetworkProtocolVersion returns an optional attribute for the +// "network.protocol.version" semantic convention. It represents the actual +// version of the protocol used for network communication. +func (ClientConnectionDuration) AttrNetworkProtocolVersion(val string) attribute.KeyValue { + return attribute.String("network.protocol.version", val) +} + +// AttrURLScheme returns an optional attribute for the "url.scheme" semantic +// convention. It represents the [URI scheme] component identifying the used +// protocol. +// +// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1 +func (ClientConnectionDuration) AttrURLScheme(val string) attribute.KeyValue { + return attribute.String("url.scheme", val) +} + +// ClientOpenConnections is an instrument used to record metric values conforming +// to the "http.client.open_connections" semantic conventions. It represents the +// number of outbound HTTP connections that are currently active or idle on the +// client. +type ClientOpenConnections struct { + metric.Int64UpDownCounter +} + +// NewClientOpenConnections returns a new ClientOpenConnections instrument. +func NewClientOpenConnections( + m metric.Meter, + opt ...metric.Int64UpDownCounterOption, +) (ClientOpenConnections, error) { + // Check if the meter is nil. + if m == nil { + return ClientOpenConnections{noop.Int64UpDownCounter{}}, nil + } + + i, err := m.Int64UpDownCounter( + "http.client.open_connections", + append([]metric.Int64UpDownCounterOption{ + metric.WithDescription("Number of outbound HTTP connections that are currently active or idle on the client."), + metric.WithUnit("{connection}"), + }, opt...)..., + ) + if err != nil { + return ClientOpenConnections{noop.Int64UpDownCounter{}}, err + } + return ClientOpenConnections{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m ClientOpenConnections) Inst() metric.Int64UpDownCounter { + return m.Int64UpDownCounter +} + +// Name returns the semantic convention name of the instrument. +func (ClientOpenConnections) Name() string { + return "http.client.open_connections" +} + +// Unit returns the semantic convention unit of the instrument +func (ClientOpenConnections) Unit() string { + return "{connection}" +} + +// Description returns the semantic convention description of the instrument +func (ClientOpenConnections) Description() string { + return "Number of outbound HTTP connections that are currently active or idle on the client." +} + +// Add adds incr to the existing count. +// +// The connectionState is the state of the HTTP connection in the HTTP connection +// pool. +// +// The serverAddress is the server domain name if available without reverse DNS +// lookup; otherwise, IP address or Unix domain socket name. +// +// The serverPort is the port identifier of the ["URI origin"] HTTP request is +// sent to. +// +// All additional attrs passed are included in the recorded value. +// +// ["URI origin"]: https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin +func (m ClientOpenConnections) Add( + ctx context.Context, + incr int64, + connectionState ConnectionStateAttr, + serverAddress string, + serverPort int, + attrs ...attribute.KeyValue, +) { + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + append( + attrs, + attribute.String("http.connection.state", string(connectionState)), + attribute.String("server.address", serverAddress), + attribute.Int("server.port", serverPort), + )..., + ), + ) + + m.Int64UpDownCounter.Add(ctx, incr, *o...) +} + +// AttrNetworkPeerAddress returns an optional attribute for the +// "network.peer.address" semantic convention. It represents the peer address of +// the network connection - IP address or Unix domain socket name. +func (ClientOpenConnections) AttrNetworkPeerAddress(val string) attribute.KeyValue { + return attribute.String("network.peer.address", val) +} + +// AttrNetworkProtocolVersion returns an optional attribute for the +// "network.protocol.version" semantic convention. It represents the actual +// version of the protocol used for network communication. +func (ClientOpenConnections) AttrNetworkProtocolVersion(val string) attribute.KeyValue { + return attribute.String("network.protocol.version", val) +} + +// AttrURLScheme returns an optional attribute for the "url.scheme" semantic +// convention. It represents the [URI scheme] component identifying the used +// protocol. +// +// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1 +func (ClientOpenConnections) AttrURLScheme(val string) attribute.KeyValue { + return attribute.String("url.scheme", val) +} + +// ClientRequestBodySize is an instrument used to record metric values conforming +// to the "http.client.request.body.size" semantic conventions. It represents the +// size of HTTP client request bodies. +type ClientRequestBodySize struct { + metric.Int64Histogram +} + +// NewClientRequestBodySize returns a new ClientRequestBodySize instrument. +func NewClientRequestBodySize( + m metric.Meter, + opt ...metric.Int64HistogramOption, +) (ClientRequestBodySize, error) { + // Check if the meter is nil. + if m == nil { + return ClientRequestBodySize{noop.Int64Histogram{}}, nil + } + + i, err := m.Int64Histogram( + "http.client.request.body.size", + append([]metric.Int64HistogramOption{ + metric.WithDescription("Size of HTTP client request bodies."), + metric.WithUnit("By"), + }, opt...)..., + ) + if err != nil { + return ClientRequestBodySize{noop.Int64Histogram{}}, err + } + return ClientRequestBodySize{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m ClientRequestBodySize) Inst() metric.Int64Histogram { + return m.Int64Histogram +} + +// Name returns the semantic convention name of the instrument. +func (ClientRequestBodySize) Name() string { + return "http.client.request.body.size" +} + +// Unit returns the semantic convention unit of the instrument +func (ClientRequestBodySize) Unit() string { + return "By" +} + +// Description returns the semantic convention description of the instrument +func (ClientRequestBodySize) Description() string { + return "Size of HTTP client request bodies." +} + +// Record records val to the current distribution. +// +// The requestMethod is the HTTP request method. +// +// The serverAddress is the host identifier of the ["URI origin"] HTTP request is +// sent to. +// +// The serverPort is the port identifier of the ["URI origin"] HTTP request is +// sent to. +// +// All additional attrs passed are included in the recorded value. +// +// ["URI origin"]: https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin +// ["URI origin"]: https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin +// +// The size of the request payload body in bytes. This is the number of bytes +// transferred excluding headers and is often, but not always, present as the +// [Content-Length] header. For requests using transport encoding, this should be +// the compressed size. +// +// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length +func (m ClientRequestBodySize) Record( + ctx context.Context, + val int64, + requestMethod RequestMethodAttr, + serverAddress string, + serverPort int, + attrs ...attribute.KeyValue, +) { + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + append( + attrs, + attribute.String("http.request.method", string(requestMethod)), + attribute.String("server.address", serverAddress), + attribute.Int("server.port", serverPort), + )..., + ), + ) + + m.Int64Histogram.Record(ctx, val, *o...) +} + +// AttrErrorType returns an optional attribute for the "error.type" semantic +// convention. It represents the describes a class of error the operation ended +// with. +func (ClientRequestBodySize) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue { + return attribute.String("error.type", string(val)) +} + +// AttrResponseStatusCode returns an optional attribute for the +// "http.response.status_code" semantic convention. It represents the +// [HTTP response status code]. +// +// [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6 +func (ClientRequestBodySize) AttrResponseStatusCode(val int) attribute.KeyValue { + return attribute.Int("http.response.status_code", val) +} + +// AttrNetworkProtocolName returns an optional attribute for the +// "network.protocol.name" semantic convention. It represents the +// [OSI application layer] or non-OSI equivalent. +// +// [OSI application layer]: https://wikipedia.org/wiki/Application_layer +func (ClientRequestBodySize) AttrNetworkProtocolName(val string) attribute.KeyValue { + return attribute.String("network.protocol.name", val) +} + +// AttrURLTemplate returns an optional attribute for the "url.template" semantic +// convention. It represents the low-cardinality template of an +// [absolute path reference]. +// +// [absolute path reference]: https://www.rfc-editor.org/rfc/rfc3986#section-4.2 +func (ClientRequestBodySize) AttrURLTemplate(val string) attribute.KeyValue { + return attribute.String("url.template", val) +} + +// AttrNetworkProtocolVersion returns an optional attribute for the +// "network.protocol.version" semantic convention. It represents the actual +// version of the protocol used for network communication. +func (ClientRequestBodySize) AttrNetworkProtocolVersion(val string) attribute.KeyValue { + return attribute.String("network.protocol.version", val) +} + +// AttrURLScheme returns an optional attribute for the "url.scheme" semantic +// convention. It represents the [URI scheme] component identifying the used +// protocol. +// +// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1 +func (ClientRequestBodySize) AttrURLScheme(val string) attribute.KeyValue { + return attribute.String("url.scheme", val) +} + +// ClientRequestDuration is an instrument used to record metric values conforming +// to the "http.client.request.duration" semantic conventions. It represents the +// duration of HTTP client requests. +type ClientRequestDuration struct { + metric.Float64Histogram +} + +// NewClientRequestDuration returns a new ClientRequestDuration instrument. +func NewClientRequestDuration( + m metric.Meter, + opt ...metric.Float64HistogramOption, +) (ClientRequestDuration, error) { + // Check if the meter is nil. + if m == nil { + return ClientRequestDuration{noop.Float64Histogram{}}, nil + } + + i, err := m.Float64Histogram( + "http.client.request.duration", + append([]metric.Float64HistogramOption{ + metric.WithDescription("Duration of HTTP client requests."), + metric.WithUnit("s"), + }, opt...)..., + ) + if err != nil { + return ClientRequestDuration{noop.Float64Histogram{}}, err + } + return ClientRequestDuration{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m ClientRequestDuration) Inst() metric.Float64Histogram { + return m.Float64Histogram +} + +// Name returns the semantic convention name of the instrument. +func (ClientRequestDuration) Name() string { + return "http.client.request.duration" +} + +// Unit returns the semantic convention unit of the instrument +func (ClientRequestDuration) Unit() string { + return "s" +} + +// Description returns the semantic convention description of the instrument +func (ClientRequestDuration) Description() string { + return "Duration of HTTP client requests." +} + +// Record records val to the current distribution. +// +// The requestMethod is the HTTP request method. +// +// The serverAddress is the host identifier of the ["URI origin"] HTTP request is +// sent to. +// +// The serverPort is the port identifier of the ["URI origin"] HTTP request is +// sent to. +// +// All additional attrs passed are included in the recorded value. +// +// ["URI origin"]: https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin +// ["URI origin"]: https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin +func (m ClientRequestDuration) Record( + ctx context.Context, + val float64, + requestMethod RequestMethodAttr, + serverAddress string, + serverPort int, + attrs ...attribute.KeyValue, +) { + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + append( + attrs, + attribute.String("http.request.method", string(requestMethod)), + attribute.String("server.address", serverAddress), + attribute.Int("server.port", serverPort), + )..., + ), + ) + + m.Float64Histogram.Record(ctx, val, *o...) +} + +// AttrErrorType returns an optional attribute for the "error.type" semantic +// convention. It represents the describes a class of error the operation ended +// with. +func (ClientRequestDuration) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue { + return attribute.String("error.type", string(val)) +} + +// AttrResponseStatusCode returns an optional attribute for the +// "http.response.status_code" semantic convention. It represents the +// [HTTP response status code]. +// +// [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6 +func (ClientRequestDuration) AttrResponseStatusCode(val int) attribute.KeyValue { + return attribute.Int("http.response.status_code", val) +} + +// AttrNetworkProtocolName returns an optional attribute for the +// "network.protocol.name" semantic convention. It represents the +// [OSI application layer] or non-OSI equivalent. +// +// [OSI application layer]: https://wikipedia.org/wiki/Application_layer +func (ClientRequestDuration) AttrNetworkProtocolName(val string) attribute.KeyValue { + return attribute.String("network.protocol.name", val) +} + +// AttrNetworkProtocolVersion returns an optional attribute for the +// "network.protocol.version" semantic convention. It represents the actual +// version of the protocol used for network communication. +func (ClientRequestDuration) AttrNetworkProtocolVersion(val string) attribute.KeyValue { + return attribute.String("network.protocol.version", val) +} + +// AttrURLScheme returns an optional attribute for the "url.scheme" semantic +// convention. It represents the [URI scheme] component identifying the used +// protocol. +// +// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1 +func (ClientRequestDuration) AttrURLScheme(val string) attribute.KeyValue { + return attribute.String("url.scheme", val) +} + +// AttrURLTemplate returns an optional attribute for the "url.template" semantic +// convention. It represents the low-cardinality template of an +// [absolute path reference]. +// +// [absolute path reference]: https://www.rfc-editor.org/rfc/rfc3986#section-4.2 +func (ClientRequestDuration) AttrURLTemplate(val string) attribute.KeyValue { + return attribute.String("url.template", val) +} + +// ClientResponseBodySize is an instrument used to record metric values +// conforming to the "http.client.response.body.size" semantic conventions. It +// represents the size of HTTP client response bodies. +type ClientResponseBodySize struct { + metric.Int64Histogram +} + +// NewClientResponseBodySize returns a new ClientResponseBodySize instrument. +func NewClientResponseBodySize( + m metric.Meter, + opt ...metric.Int64HistogramOption, +) (ClientResponseBodySize, error) { + // Check if the meter is nil. + if m == nil { + return ClientResponseBodySize{noop.Int64Histogram{}}, nil + } + + i, err := m.Int64Histogram( + "http.client.response.body.size", + append([]metric.Int64HistogramOption{ + metric.WithDescription("Size of HTTP client response bodies."), + metric.WithUnit("By"), + }, opt...)..., + ) + if err != nil { + return ClientResponseBodySize{noop.Int64Histogram{}}, err + } + return ClientResponseBodySize{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m ClientResponseBodySize) Inst() metric.Int64Histogram { + return m.Int64Histogram +} + +// Name returns the semantic convention name of the instrument. +func (ClientResponseBodySize) Name() string { + return "http.client.response.body.size" +} + +// Unit returns the semantic convention unit of the instrument +func (ClientResponseBodySize) Unit() string { + return "By" +} + +// Description returns the semantic convention description of the instrument +func (ClientResponseBodySize) Description() string { + return "Size of HTTP client response bodies." +} + +// Record records val to the current distribution. +// +// The requestMethod is the HTTP request method. +// +// The serverAddress is the host identifier of the ["URI origin"] HTTP request is +// sent to. +// +// The serverPort is the port identifier of the ["URI origin"] HTTP request is +// sent to. +// +// All additional attrs passed are included in the recorded value. +// +// ["URI origin"]: https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin +// ["URI origin"]: https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin +// +// The size of the response payload body in bytes. This is the number of bytes +// transferred excluding headers and is often, but not always, present as the +// [Content-Length] header. For requests using transport encoding, this should be +// the compressed size. +// +// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length +func (m ClientResponseBodySize) Record( + ctx context.Context, + val int64, + requestMethod RequestMethodAttr, + serverAddress string, + serverPort int, + attrs ...attribute.KeyValue, +) { + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + append( + attrs, + attribute.String("http.request.method", string(requestMethod)), + attribute.String("server.address", serverAddress), + attribute.Int("server.port", serverPort), + )..., + ), + ) + + m.Int64Histogram.Record(ctx, val, *o...) +} + +// AttrErrorType returns an optional attribute for the "error.type" semantic +// convention. It represents the describes a class of error the operation ended +// with. +func (ClientResponseBodySize) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue { + return attribute.String("error.type", string(val)) +} + +// AttrResponseStatusCode returns an optional attribute for the +// "http.response.status_code" semantic convention. It represents the +// [HTTP response status code]. +// +// [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6 +func (ClientResponseBodySize) AttrResponseStatusCode(val int) attribute.KeyValue { + return attribute.Int("http.response.status_code", val) +} + +// AttrNetworkProtocolName returns an optional attribute for the +// "network.protocol.name" semantic convention. It represents the +// [OSI application layer] or non-OSI equivalent. +// +// [OSI application layer]: https://wikipedia.org/wiki/Application_layer +func (ClientResponseBodySize) AttrNetworkProtocolName(val string) attribute.KeyValue { + return attribute.String("network.protocol.name", val) +} + +// AttrURLTemplate returns an optional attribute for the "url.template" semantic +// convention. It represents the low-cardinality template of an +// [absolute path reference]. +// +// [absolute path reference]: https://www.rfc-editor.org/rfc/rfc3986#section-4.2 +func (ClientResponseBodySize) AttrURLTemplate(val string) attribute.KeyValue { + return attribute.String("url.template", val) +} + +// AttrNetworkProtocolVersion returns an optional attribute for the +// "network.protocol.version" semantic convention. It represents the actual +// version of the protocol used for network communication. +func (ClientResponseBodySize) AttrNetworkProtocolVersion(val string) attribute.KeyValue { + return attribute.String("network.protocol.version", val) +} + +// AttrURLScheme returns an optional attribute for the "url.scheme" semantic +// convention. It represents the [URI scheme] component identifying the used +// protocol. +// +// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1 +func (ClientResponseBodySize) AttrURLScheme(val string) attribute.KeyValue { + return attribute.String("url.scheme", val) +} + +// ServerActiveRequests is an instrument used to record metric values conforming +// to the "http.server.active_requests" semantic conventions. It represents the +// number of active HTTP server requests. +type ServerActiveRequests struct { + metric.Int64UpDownCounter +} + +// NewServerActiveRequests returns a new ServerActiveRequests instrument. +func NewServerActiveRequests( + m metric.Meter, + opt ...metric.Int64UpDownCounterOption, +) (ServerActiveRequests, error) { + // Check if the meter is nil. + if m == nil { + return ServerActiveRequests{noop.Int64UpDownCounter{}}, nil + } + + i, err := m.Int64UpDownCounter( + "http.server.active_requests", + append([]metric.Int64UpDownCounterOption{ + metric.WithDescription("Number of active HTTP server requests."), + metric.WithUnit("{request}"), + }, opt...)..., + ) + if err != nil { + return ServerActiveRequests{noop.Int64UpDownCounter{}}, err + } + return ServerActiveRequests{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m ServerActiveRequests) Inst() metric.Int64UpDownCounter { + return m.Int64UpDownCounter +} + +// Name returns the semantic convention name of the instrument. +func (ServerActiveRequests) Name() string { + return "http.server.active_requests" +} + +// Unit returns the semantic convention unit of the instrument +func (ServerActiveRequests) Unit() string { + return "{request}" +} + +// Description returns the semantic convention description of the instrument +func (ServerActiveRequests) Description() string { + return "Number of active HTTP server requests." +} + +// Add adds incr to the existing count. +// +// The requestMethod is the HTTP request method. +// +// The urlScheme is the the [URI scheme] component identifying the used protocol. +// +// All additional attrs passed are included in the recorded value. +// +// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1 +func (m ServerActiveRequests) Add( + ctx context.Context, + incr int64, + requestMethod RequestMethodAttr, + urlScheme string, + attrs ...attribute.KeyValue, +) { + o := addOptPool.Get().(*[]metric.AddOption) + defer func() { + *o = (*o)[:0] + addOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + append( + attrs, + attribute.String("http.request.method", string(requestMethod)), + attribute.String("url.scheme", urlScheme), + )..., + ), + ) + + m.Int64UpDownCounter.Add(ctx, incr, *o...) +} + +// AttrServerAddress returns an optional attribute for the "server.address" +// semantic convention. It represents the name of the local HTTP server that +// received the request. +func (ServerActiveRequests) AttrServerAddress(val string) attribute.KeyValue { + return attribute.String("server.address", val) +} + +// AttrServerPort returns an optional attribute for the "server.port" semantic +// convention. It represents the port of the local HTTP server that received the +// request. +func (ServerActiveRequests) AttrServerPort(val int) attribute.KeyValue { + return attribute.Int("server.port", val) +} + +// ServerRequestBodySize is an instrument used to record metric values conforming +// to the "http.server.request.body.size" semantic conventions. It represents the +// size of HTTP server request bodies. +type ServerRequestBodySize struct { + metric.Int64Histogram +} + +// NewServerRequestBodySize returns a new ServerRequestBodySize instrument. +func NewServerRequestBodySize( + m metric.Meter, + opt ...metric.Int64HistogramOption, +) (ServerRequestBodySize, error) { + // Check if the meter is nil. + if m == nil { + return ServerRequestBodySize{noop.Int64Histogram{}}, nil + } + + i, err := m.Int64Histogram( + "http.server.request.body.size", + append([]metric.Int64HistogramOption{ + metric.WithDescription("Size of HTTP server request bodies."), + metric.WithUnit("By"), + }, opt...)..., + ) + if err != nil { + return ServerRequestBodySize{noop.Int64Histogram{}}, err + } + return ServerRequestBodySize{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m ServerRequestBodySize) Inst() metric.Int64Histogram { + return m.Int64Histogram +} + +// Name returns the semantic convention name of the instrument. +func (ServerRequestBodySize) Name() string { + return "http.server.request.body.size" +} + +// Unit returns the semantic convention unit of the instrument +func (ServerRequestBodySize) Unit() string { + return "By" +} + +// Description returns the semantic convention description of the instrument +func (ServerRequestBodySize) Description() string { + return "Size of HTTP server request bodies." +} + +// Record records val to the current distribution. +// +// The requestMethod is the HTTP request method. +// +// The urlScheme is the the [URI scheme] component identifying the used protocol. +// +// All additional attrs passed are included in the recorded value. +// +// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1 +// +// The size of the request payload body in bytes. This is the number of bytes +// transferred excluding headers and is often, but not always, present as the +// [Content-Length] header. For requests using transport encoding, this should be +// the compressed size. +// +// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length +func (m ServerRequestBodySize) Record( + ctx context.Context, + val int64, + requestMethod RequestMethodAttr, + urlScheme string, + attrs ...attribute.KeyValue, +) { + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + append( + attrs, + attribute.String("http.request.method", string(requestMethod)), + attribute.String("url.scheme", urlScheme), + )..., + ), + ) + + m.Int64Histogram.Record(ctx, val, *o...) +} + +// AttrErrorType returns an optional attribute for the "error.type" semantic +// convention. It represents the describes a class of error the operation ended +// with. +func (ServerRequestBodySize) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue { + return attribute.String("error.type", string(val)) +} + +// AttrResponseStatusCode returns an optional attribute for the +// "http.response.status_code" semantic convention. It represents the +// [HTTP response status code]. +// +// [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6 +func (ServerRequestBodySize) AttrResponseStatusCode(val int) attribute.KeyValue { + return attribute.Int("http.response.status_code", val) +} + +// AttrRoute returns an optional attribute for the "http.route" semantic +// convention. It represents the matched route, that is, the path template in the +// format used by the respective server framework. +func (ServerRequestBodySize) AttrRoute(val string) attribute.KeyValue { + return attribute.String("http.route", val) +} + +// AttrNetworkProtocolName returns an optional attribute for the +// "network.protocol.name" semantic convention. It represents the +// [OSI application layer] or non-OSI equivalent. +// +// [OSI application layer]: https://wikipedia.org/wiki/Application_layer +func (ServerRequestBodySize) AttrNetworkProtocolName(val string) attribute.KeyValue { + return attribute.String("network.protocol.name", val) +} + +// AttrNetworkProtocolVersion returns an optional attribute for the +// "network.protocol.version" semantic convention. It represents the actual +// version of the protocol used for network communication. +func (ServerRequestBodySize) AttrNetworkProtocolVersion(val string) attribute.KeyValue { + return attribute.String("network.protocol.version", val) +} + +// AttrServerAddress returns an optional attribute for the "server.address" +// semantic convention. It represents the name of the local HTTP server that +// received the request. +func (ServerRequestBodySize) AttrServerAddress(val string) attribute.KeyValue { + return attribute.String("server.address", val) +} + +// AttrServerPort returns an optional attribute for the "server.port" semantic +// convention. It represents the port of the local HTTP server that received the +// request. +func (ServerRequestBodySize) AttrServerPort(val int) attribute.KeyValue { + return attribute.Int("server.port", val) +} + +// AttrUserAgentSyntheticType returns an optional attribute for the +// "user_agent.synthetic.type" semantic convention. It represents the specifies +// the category of synthetic traffic, such as tests or bots. +func (ServerRequestBodySize) AttrUserAgentSyntheticType(val UserAgentSyntheticTypeAttr) attribute.KeyValue { + return attribute.String("user_agent.synthetic.type", string(val)) +} + +// ServerRequestDuration is an instrument used to record metric values conforming +// to the "http.server.request.duration" semantic conventions. It represents the +// duration of HTTP server requests. +type ServerRequestDuration struct { + metric.Float64Histogram +} + +// NewServerRequestDuration returns a new ServerRequestDuration instrument. +func NewServerRequestDuration( + m metric.Meter, + opt ...metric.Float64HistogramOption, +) (ServerRequestDuration, error) { + // Check if the meter is nil. + if m == nil { + return ServerRequestDuration{noop.Float64Histogram{}}, nil + } + + i, err := m.Float64Histogram( + "http.server.request.duration", + append([]metric.Float64HistogramOption{ + metric.WithDescription("Duration of HTTP server requests."), + metric.WithUnit("s"), + }, opt...)..., + ) + if err != nil { + return ServerRequestDuration{noop.Float64Histogram{}}, err + } + return ServerRequestDuration{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m ServerRequestDuration) Inst() metric.Float64Histogram { + return m.Float64Histogram +} + +// Name returns the semantic convention name of the instrument. +func (ServerRequestDuration) Name() string { + return "http.server.request.duration" +} + +// Unit returns the semantic convention unit of the instrument +func (ServerRequestDuration) Unit() string { + return "s" +} + +// Description returns the semantic convention description of the instrument +func (ServerRequestDuration) Description() string { + return "Duration of HTTP server requests." +} + +// Record records val to the current distribution. +// +// The requestMethod is the HTTP request method. +// +// The urlScheme is the the [URI scheme] component identifying the used protocol. +// +// All additional attrs passed are included in the recorded value. +// +// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1 +func (m ServerRequestDuration) Record( + ctx context.Context, + val float64, + requestMethod RequestMethodAttr, + urlScheme string, + attrs ...attribute.KeyValue, +) { + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + append( + attrs, + attribute.String("http.request.method", string(requestMethod)), + attribute.String("url.scheme", urlScheme), + )..., + ), + ) + + m.Float64Histogram.Record(ctx, val, *o...) +} + +// AttrErrorType returns an optional attribute for the "error.type" semantic +// convention. It represents the describes a class of error the operation ended +// with. +func (ServerRequestDuration) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue { + return attribute.String("error.type", string(val)) +} + +// AttrResponseStatusCode returns an optional attribute for the +// "http.response.status_code" semantic convention. It represents the +// [HTTP response status code]. +// +// [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6 +func (ServerRequestDuration) AttrResponseStatusCode(val int) attribute.KeyValue { + return attribute.Int("http.response.status_code", val) +} + +// AttrRoute returns an optional attribute for the "http.route" semantic +// convention. It represents the matched route, that is, the path template in the +// format used by the respective server framework. +func (ServerRequestDuration) AttrRoute(val string) attribute.KeyValue { + return attribute.String("http.route", val) +} + +// AttrNetworkProtocolName returns an optional attribute for the +// "network.protocol.name" semantic convention. It represents the +// [OSI application layer] or non-OSI equivalent. +// +// [OSI application layer]: https://wikipedia.org/wiki/Application_layer +func (ServerRequestDuration) AttrNetworkProtocolName(val string) attribute.KeyValue { + return attribute.String("network.protocol.name", val) +} + +// AttrNetworkProtocolVersion returns an optional attribute for the +// "network.protocol.version" semantic convention. It represents the actual +// version of the protocol used for network communication. +func (ServerRequestDuration) AttrNetworkProtocolVersion(val string) attribute.KeyValue { + return attribute.String("network.protocol.version", val) +} + +// AttrServerAddress returns an optional attribute for the "server.address" +// semantic convention. It represents the name of the local HTTP server that +// received the request. +func (ServerRequestDuration) AttrServerAddress(val string) attribute.KeyValue { + return attribute.String("server.address", val) +} + +// AttrServerPort returns an optional attribute for the "server.port" semantic +// convention. It represents the port of the local HTTP server that received the +// request. +func (ServerRequestDuration) AttrServerPort(val int) attribute.KeyValue { + return attribute.Int("server.port", val) +} + +// AttrUserAgentSyntheticType returns an optional attribute for the +// "user_agent.synthetic.type" semantic convention. It represents the specifies +// the category of synthetic traffic, such as tests or bots. +func (ServerRequestDuration) AttrUserAgentSyntheticType(val UserAgentSyntheticTypeAttr) attribute.KeyValue { + return attribute.String("user_agent.synthetic.type", string(val)) +} + +// ServerResponseBodySize is an instrument used to record metric values +// conforming to the "http.server.response.body.size" semantic conventions. It +// represents the size of HTTP server response bodies. +type ServerResponseBodySize struct { + metric.Int64Histogram +} + +// NewServerResponseBodySize returns a new ServerResponseBodySize instrument. +func NewServerResponseBodySize( + m metric.Meter, + opt ...metric.Int64HistogramOption, +) (ServerResponseBodySize, error) { + // Check if the meter is nil. + if m == nil { + return ServerResponseBodySize{noop.Int64Histogram{}}, nil + } + + i, err := m.Int64Histogram( + "http.server.response.body.size", + append([]metric.Int64HistogramOption{ + metric.WithDescription("Size of HTTP server response bodies."), + metric.WithUnit("By"), + }, opt...)..., + ) + if err != nil { + return ServerResponseBodySize{noop.Int64Histogram{}}, err + } + return ServerResponseBodySize{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m ServerResponseBodySize) Inst() metric.Int64Histogram { + return m.Int64Histogram +} + +// Name returns the semantic convention name of the instrument. +func (ServerResponseBodySize) Name() string { + return "http.server.response.body.size" +} + +// Unit returns the semantic convention unit of the instrument +func (ServerResponseBodySize) Unit() string { + return "By" +} + +// Description returns the semantic convention description of the instrument +func (ServerResponseBodySize) Description() string { + return "Size of HTTP server response bodies." +} + +// Record records val to the current distribution. +// +// The requestMethod is the HTTP request method. +// +// The urlScheme is the the [URI scheme] component identifying the used protocol. +// +// All additional attrs passed are included in the recorded value. +// +// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1 +// +// The size of the response payload body in bytes. This is the number of bytes +// transferred excluding headers and is often, but not always, present as the +// [Content-Length] header. For requests using transport encoding, this should be +// the compressed size. +// +// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length +func (m ServerResponseBodySize) Record( + ctx context.Context, + val int64, + requestMethod RequestMethodAttr, + urlScheme string, + attrs ...attribute.KeyValue, +) { + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append( + *o, + metric.WithAttributes( + append( + attrs, + attribute.String("http.request.method", string(requestMethod)), + attribute.String("url.scheme", urlScheme), + )..., + ), + ) + + m.Int64Histogram.Record(ctx, val, *o...) +} + +// AttrErrorType returns an optional attribute for the "error.type" semantic +// convention. It represents the describes a class of error the operation ended +// with. +func (ServerResponseBodySize) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue { + return attribute.String("error.type", string(val)) +} + +// AttrResponseStatusCode returns an optional attribute for the +// "http.response.status_code" semantic convention. It represents the +// [HTTP response status code]. +// +// [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6 +func (ServerResponseBodySize) AttrResponseStatusCode(val int) attribute.KeyValue { + return attribute.Int("http.response.status_code", val) +} + +// AttrRoute returns an optional attribute for the "http.route" semantic +// convention. It represents the matched route, that is, the path template in the +// format used by the respective server framework. +func (ServerResponseBodySize) AttrRoute(val string) attribute.KeyValue { + return attribute.String("http.route", val) +} + +// AttrNetworkProtocolName returns an optional attribute for the +// "network.protocol.name" semantic convention. It represents the +// [OSI application layer] or non-OSI equivalent. +// +// [OSI application layer]: https://wikipedia.org/wiki/Application_layer +func (ServerResponseBodySize) AttrNetworkProtocolName(val string) attribute.KeyValue { + return attribute.String("network.protocol.name", val) +} + +// AttrNetworkProtocolVersion returns an optional attribute for the +// "network.protocol.version" semantic convention. It represents the actual +// version of the protocol used for network communication. +func (ServerResponseBodySize) AttrNetworkProtocolVersion(val string) attribute.KeyValue { + return attribute.String("network.protocol.version", val) +} + +// AttrServerAddress returns an optional attribute for the "server.address" +// semantic convention. It represents the name of the local HTTP server that +// received the request. +func (ServerResponseBodySize) AttrServerAddress(val string) attribute.KeyValue { + return attribute.String("server.address", val) +} + +// AttrServerPort returns an optional attribute for the "server.port" semantic +// convention. It represents the port of the local HTTP server that received the +// request. +func (ServerResponseBodySize) AttrServerPort(val int) attribute.KeyValue { + return attribute.Int("server.port", val) +} + +// AttrUserAgentSyntheticType returns an optional attribute for the +// "user_agent.synthetic.type" semantic convention. It represents the specifies +// the category of synthetic traffic, such as tests or bots. +func (ServerResponseBodySize) AttrUserAgentSyntheticType(val UserAgentSyntheticTypeAttr) attribute.KeyValue { + return attribute.String("user_agent.synthetic.type", string(val)) +} \ No newline at end of file diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/rpcconv/metric.go b/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/rpcconv/metric.go new file mode 100644 index 0000000000..f6185bb691 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/rpcconv/metric.go @@ -0,0 +1,713 @@ +// Code generated from semantic convention specification. DO NOT EDIT. + +// Package httpconv provides types and functionality for OpenTelemetry semantic +// conventions in the "rpc" namespace. +package rpcconv + +import ( + "context" + "sync" + + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/metric/noop" +) + +var ( + addOptPool = &sync.Pool{New: func() any { return &[]metric.AddOption{} }} + recOptPool = &sync.Pool{New: func() any { return &[]metric.RecordOption{} }} +) + +// ClientDuration is an instrument used to record metric values conforming to the +// "rpc.client.duration" semantic conventions. It represents the measures the +// duration of outbound RPC. +type ClientDuration struct { + metric.Float64Histogram +} + +// NewClientDuration returns a new ClientDuration instrument. +func NewClientDuration( + m metric.Meter, + opt ...metric.Float64HistogramOption, +) (ClientDuration, error) { + // Check if the meter is nil. + if m == nil { + return ClientDuration{noop.Float64Histogram{}}, nil + } + + i, err := m.Float64Histogram( + "rpc.client.duration", + append([]metric.Float64HistogramOption{ + metric.WithDescription("Measures the duration of outbound RPC."), + metric.WithUnit("ms"), + }, opt...)..., + ) + if err != nil { + return ClientDuration{noop.Float64Histogram{}}, err + } + return ClientDuration{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m ClientDuration) Inst() metric.Float64Histogram { + return m.Float64Histogram +} + +// Name returns the semantic convention name of the instrument. +func (ClientDuration) Name() string { + return "rpc.client.duration" +} + +// Unit returns the semantic convention unit of the instrument +func (ClientDuration) Unit() string { + return "ms" +} + +// Description returns the semantic convention description of the instrument +func (ClientDuration) Description() string { + return "Measures the duration of outbound RPC." +} + +// Record records val to the current distribution. +// +// While streaming RPCs may record this metric as start-of-batch +// to end-of-batch, it's hard to interpret in practice. +// +// **Streaming**: N/A. +func (m ClientDuration) Record(ctx context.Context, val float64, attrs ...attribute.KeyValue) { + if len(attrs) == 0 { + m.Float64Histogram.Record(ctx, val) + } + + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributes(attrs...)) + m.Float64Histogram.Record(ctx, val, *o...) +} + +// ClientRequestSize is an instrument used to record metric values conforming to +// the "rpc.client.request.size" semantic conventions. It represents the measures +// the size of RPC request messages (uncompressed). +type ClientRequestSize struct { + metric.Int64Histogram +} + +// NewClientRequestSize returns a new ClientRequestSize instrument. +func NewClientRequestSize( + m metric.Meter, + opt ...metric.Int64HistogramOption, +) (ClientRequestSize, error) { + // Check if the meter is nil. + if m == nil { + return ClientRequestSize{noop.Int64Histogram{}}, nil + } + + i, err := m.Int64Histogram( + "rpc.client.request.size", + append([]metric.Int64HistogramOption{ + metric.WithDescription("Measures the size of RPC request messages (uncompressed)."), + metric.WithUnit("By"), + }, opt...)..., + ) + if err != nil { + return ClientRequestSize{noop.Int64Histogram{}}, err + } + return ClientRequestSize{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m ClientRequestSize) Inst() metric.Int64Histogram { + return m.Int64Histogram +} + +// Name returns the semantic convention name of the instrument. +func (ClientRequestSize) Name() string { + return "rpc.client.request.size" +} + +// Unit returns the semantic convention unit of the instrument +func (ClientRequestSize) Unit() string { + return "By" +} + +// Description returns the semantic convention description of the instrument +func (ClientRequestSize) Description() string { + return "Measures the size of RPC request messages (uncompressed)." +} + +// Record records val to the current distribution. +// +// **Streaming**: Recorded per message in a streaming batch +func (m ClientRequestSize) Record(ctx context.Context, val int64, attrs ...attribute.KeyValue) { + if len(attrs) == 0 { + m.Int64Histogram.Record(ctx, val) + } + + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributes(attrs...)) + m.Int64Histogram.Record(ctx, val, *o...) +} + +// ClientRequestsPerRPC is an instrument used to record metric values conforming +// to the "rpc.client.requests_per_rpc" semantic conventions. It represents the +// measures the number of messages received per RPC. +type ClientRequestsPerRPC struct { + metric.Int64Histogram +} + +// NewClientRequestsPerRPC returns a new ClientRequestsPerRPC instrument. +func NewClientRequestsPerRPC( + m metric.Meter, + opt ...metric.Int64HistogramOption, +) (ClientRequestsPerRPC, error) { + // Check if the meter is nil. + if m == nil { + return ClientRequestsPerRPC{noop.Int64Histogram{}}, nil + } + + i, err := m.Int64Histogram( + "rpc.client.requests_per_rpc", + append([]metric.Int64HistogramOption{ + metric.WithDescription("Measures the number of messages received per RPC."), + metric.WithUnit("{count}"), + }, opt...)..., + ) + if err != nil { + return ClientRequestsPerRPC{noop.Int64Histogram{}}, err + } + return ClientRequestsPerRPC{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m ClientRequestsPerRPC) Inst() metric.Int64Histogram { + return m.Int64Histogram +} + +// Name returns the semantic convention name of the instrument. +func (ClientRequestsPerRPC) Name() string { + return "rpc.client.requests_per_rpc" +} + +// Unit returns the semantic convention unit of the instrument +func (ClientRequestsPerRPC) Unit() string { + return "{count}" +} + +// Description returns the semantic convention description of the instrument +func (ClientRequestsPerRPC) Description() string { + return "Measures the number of messages received per RPC." +} + +// Record records val to the current distribution. +// +// Should be 1 for all non-streaming RPCs. +// +// **Streaming**: This metric is required for server and client streaming RPCs +func (m ClientRequestsPerRPC) Record(ctx context.Context, val int64, attrs ...attribute.KeyValue) { + if len(attrs) == 0 { + m.Int64Histogram.Record(ctx, val) + } + + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributes(attrs...)) + m.Int64Histogram.Record(ctx, val, *o...) +} + +// ClientResponseSize is an instrument used to record metric values conforming to +// the "rpc.client.response.size" semantic conventions. It represents the +// measures the size of RPC response messages (uncompressed). +type ClientResponseSize struct { + metric.Int64Histogram +} + +// NewClientResponseSize returns a new ClientResponseSize instrument. +func NewClientResponseSize( + m metric.Meter, + opt ...metric.Int64HistogramOption, +) (ClientResponseSize, error) { + // Check if the meter is nil. + if m == nil { + return ClientResponseSize{noop.Int64Histogram{}}, nil + } + + i, err := m.Int64Histogram( + "rpc.client.response.size", + append([]metric.Int64HistogramOption{ + metric.WithDescription("Measures the size of RPC response messages (uncompressed)."), + metric.WithUnit("By"), + }, opt...)..., + ) + if err != nil { + return ClientResponseSize{noop.Int64Histogram{}}, err + } + return ClientResponseSize{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m ClientResponseSize) Inst() metric.Int64Histogram { + return m.Int64Histogram +} + +// Name returns the semantic convention name of the instrument. +func (ClientResponseSize) Name() string { + return "rpc.client.response.size" +} + +// Unit returns the semantic convention unit of the instrument +func (ClientResponseSize) Unit() string { + return "By" +} + +// Description returns the semantic convention description of the instrument +func (ClientResponseSize) Description() string { + return "Measures the size of RPC response messages (uncompressed)." +} + +// Record records val to the current distribution. +// +// **Streaming**: Recorded per response in a streaming batch +func (m ClientResponseSize) Record(ctx context.Context, val int64, attrs ...attribute.KeyValue) { + if len(attrs) == 0 { + m.Int64Histogram.Record(ctx, val) + } + + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributes(attrs...)) + m.Int64Histogram.Record(ctx, val, *o...) +} + +// ClientResponsesPerRPC is an instrument used to record metric values conforming +// to the "rpc.client.responses_per_rpc" semantic conventions. It represents the +// measures the number of messages sent per RPC. +type ClientResponsesPerRPC struct { + metric.Int64Histogram +} + +// NewClientResponsesPerRPC returns a new ClientResponsesPerRPC instrument. +func NewClientResponsesPerRPC( + m metric.Meter, + opt ...metric.Int64HistogramOption, +) (ClientResponsesPerRPC, error) { + // Check if the meter is nil. + if m == nil { + return ClientResponsesPerRPC{noop.Int64Histogram{}}, nil + } + + i, err := m.Int64Histogram( + "rpc.client.responses_per_rpc", + append([]metric.Int64HistogramOption{ + metric.WithDescription("Measures the number of messages sent per RPC."), + metric.WithUnit("{count}"), + }, opt...)..., + ) + if err != nil { + return ClientResponsesPerRPC{noop.Int64Histogram{}}, err + } + return ClientResponsesPerRPC{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m ClientResponsesPerRPC) Inst() metric.Int64Histogram { + return m.Int64Histogram +} + +// Name returns the semantic convention name of the instrument. +func (ClientResponsesPerRPC) Name() string { + return "rpc.client.responses_per_rpc" +} + +// Unit returns the semantic convention unit of the instrument +func (ClientResponsesPerRPC) Unit() string { + return "{count}" +} + +// Description returns the semantic convention description of the instrument +func (ClientResponsesPerRPC) Description() string { + return "Measures the number of messages sent per RPC." +} + +// Record records val to the current distribution. +// +// Should be 1 for all non-streaming RPCs. +// +// **Streaming**: This metric is required for server and client streaming RPCs +func (m ClientResponsesPerRPC) Record(ctx context.Context, val int64, attrs ...attribute.KeyValue) { + if len(attrs) == 0 { + m.Int64Histogram.Record(ctx, val) + } + + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributes(attrs...)) + m.Int64Histogram.Record(ctx, val, *o...) +} + +// ServerDuration is an instrument used to record metric values conforming to the +// "rpc.server.duration" semantic conventions. It represents the measures the +// duration of inbound RPC. +type ServerDuration struct { + metric.Float64Histogram +} + +// NewServerDuration returns a new ServerDuration instrument. +func NewServerDuration( + m metric.Meter, + opt ...metric.Float64HistogramOption, +) (ServerDuration, error) { + // Check if the meter is nil. + if m == nil { + return ServerDuration{noop.Float64Histogram{}}, nil + } + + i, err := m.Float64Histogram( + "rpc.server.duration", + append([]metric.Float64HistogramOption{ + metric.WithDescription("Measures the duration of inbound RPC."), + metric.WithUnit("ms"), + }, opt...)..., + ) + if err != nil { + return ServerDuration{noop.Float64Histogram{}}, err + } + return ServerDuration{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m ServerDuration) Inst() metric.Float64Histogram { + return m.Float64Histogram +} + +// Name returns the semantic convention name of the instrument. +func (ServerDuration) Name() string { + return "rpc.server.duration" +} + +// Unit returns the semantic convention unit of the instrument +func (ServerDuration) Unit() string { + return "ms" +} + +// Description returns the semantic convention description of the instrument +func (ServerDuration) Description() string { + return "Measures the duration of inbound RPC." +} + +// Record records val to the current distribution. +// +// While streaming RPCs may record this metric as start-of-batch +// to end-of-batch, it's hard to interpret in practice. +// +// **Streaming**: N/A. +func (m ServerDuration) Record(ctx context.Context, val float64, attrs ...attribute.KeyValue) { + if len(attrs) == 0 { + m.Float64Histogram.Record(ctx, val) + } + + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributes(attrs...)) + m.Float64Histogram.Record(ctx, val, *o...) +} + +// ServerRequestSize is an instrument used to record metric values conforming to +// the "rpc.server.request.size" semantic conventions. It represents the measures +// the size of RPC request messages (uncompressed). +type ServerRequestSize struct { + metric.Int64Histogram +} + +// NewServerRequestSize returns a new ServerRequestSize instrument. +func NewServerRequestSize( + m metric.Meter, + opt ...metric.Int64HistogramOption, +) (ServerRequestSize, error) { + // Check if the meter is nil. + if m == nil { + return ServerRequestSize{noop.Int64Histogram{}}, nil + } + + i, err := m.Int64Histogram( + "rpc.server.request.size", + append([]metric.Int64HistogramOption{ + metric.WithDescription("Measures the size of RPC request messages (uncompressed)."), + metric.WithUnit("By"), + }, opt...)..., + ) + if err != nil { + return ServerRequestSize{noop.Int64Histogram{}}, err + } + return ServerRequestSize{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m ServerRequestSize) Inst() metric.Int64Histogram { + return m.Int64Histogram +} + +// Name returns the semantic convention name of the instrument. +func (ServerRequestSize) Name() string { + return "rpc.server.request.size" +} + +// Unit returns the semantic convention unit of the instrument +func (ServerRequestSize) Unit() string { + return "By" +} + +// Description returns the semantic convention description of the instrument +func (ServerRequestSize) Description() string { + return "Measures the size of RPC request messages (uncompressed)." +} + +// Record records val to the current distribution. +// +// **Streaming**: Recorded per message in a streaming batch +func (m ServerRequestSize) Record(ctx context.Context, val int64, attrs ...attribute.KeyValue) { + if len(attrs) == 0 { + m.Int64Histogram.Record(ctx, val) + } + + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributes(attrs...)) + m.Int64Histogram.Record(ctx, val, *o...) +} + +// ServerRequestsPerRPC is an instrument used to record metric values conforming +// to the "rpc.server.requests_per_rpc" semantic conventions. It represents the +// measures the number of messages received per RPC. +type ServerRequestsPerRPC struct { + metric.Int64Histogram +} + +// NewServerRequestsPerRPC returns a new ServerRequestsPerRPC instrument. +func NewServerRequestsPerRPC( + m metric.Meter, + opt ...metric.Int64HistogramOption, +) (ServerRequestsPerRPC, error) { + // Check if the meter is nil. + if m == nil { + return ServerRequestsPerRPC{noop.Int64Histogram{}}, nil + } + + i, err := m.Int64Histogram( + "rpc.server.requests_per_rpc", + append([]metric.Int64HistogramOption{ + metric.WithDescription("Measures the number of messages received per RPC."), + metric.WithUnit("{count}"), + }, opt...)..., + ) + if err != nil { + return ServerRequestsPerRPC{noop.Int64Histogram{}}, err + } + return ServerRequestsPerRPC{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m ServerRequestsPerRPC) Inst() metric.Int64Histogram { + return m.Int64Histogram +} + +// Name returns the semantic convention name of the instrument. +func (ServerRequestsPerRPC) Name() string { + return "rpc.server.requests_per_rpc" +} + +// Unit returns the semantic convention unit of the instrument +func (ServerRequestsPerRPC) Unit() string { + return "{count}" +} + +// Description returns the semantic convention description of the instrument +func (ServerRequestsPerRPC) Description() string { + return "Measures the number of messages received per RPC." +} + +// Record records val to the current distribution. +// +// Should be 1 for all non-streaming RPCs. +// +// **Streaming** : This metric is required for server and client streaming RPCs +func (m ServerRequestsPerRPC) Record(ctx context.Context, val int64, attrs ...attribute.KeyValue) { + if len(attrs) == 0 { + m.Int64Histogram.Record(ctx, val) + } + + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributes(attrs...)) + m.Int64Histogram.Record(ctx, val, *o...) +} + +// ServerResponseSize is an instrument used to record metric values conforming to +// the "rpc.server.response.size" semantic conventions. It represents the +// measures the size of RPC response messages (uncompressed). +type ServerResponseSize struct { + metric.Int64Histogram +} + +// NewServerResponseSize returns a new ServerResponseSize instrument. +func NewServerResponseSize( + m metric.Meter, + opt ...metric.Int64HistogramOption, +) (ServerResponseSize, error) { + // Check if the meter is nil. + if m == nil { + return ServerResponseSize{noop.Int64Histogram{}}, nil + } + + i, err := m.Int64Histogram( + "rpc.server.response.size", + append([]metric.Int64HistogramOption{ + metric.WithDescription("Measures the size of RPC response messages (uncompressed)."), + metric.WithUnit("By"), + }, opt...)..., + ) + if err != nil { + return ServerResponseSize{noop.Int64Histogram{}}, err + } + return ServerResponseSize{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m ServerResponseSize) Inst() metric.Int64Histogram { + return m.Int64Histogram +} + +// Name returns the semantic convention name of the instrument. +func (ServerResponseSize) Name() string { + return "rpc.server.response.size" +} + +// Unit returns the semantic convention unit of the instrument +func (ServerResponseSize) Unit() string { + return "By" +} + +// Description returns the semantic convention description of the instrument +func (ServerResponseSize) Description() string { + return "Measures the size of RPC response messages (uncompressed)." +} + +// Record records val to the current distribution. +// +// **Streaming**: Recorded per response in a streaming batch +func (m ServerResponseSize) Record(ctx context.Context, val int64, attrs ...attribute.KeyValue) { + if len(attrs) == 0 { + m.Int64Histogram.Record(ctx, val) + } + + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributes(attrs...)) + m.Int64Histogram.Record(ctx, val, *o...) +} + +// ServerResponsesPerRPC is an instrument used to record metric values conforming +// to the "rpc.server.responses_per_rpc" semantic conventions. It represents the +// measures the number of messages sent per RPC. +type ServerResponsesPerRPC struct { + metric.Int64Histogram +} + +// NewServerResponsesPerRPC returns a new ServerResponsesPerRPC instrument. +func NewServerResponsesPerRPC( + m metric.Meter, + opt ...metric.Int64HistogramOption, +) (ServerResponsesPerRPC, error) { + // Check if the meter is nil. + if m == nil { + return ServerResponsesPerRPC{noop.Int64Histogram{}}, nil + } + + i, err := m.Int64Histogram( + "rpc.server.responses_per_rpc", + append([]metric.Int64HistogramOption{ + metric.WithDescription("Measures the number of messages sent per RPC."), + metric.WithUnit("{count}"), + }, opt...)..., + ) + if err != nil { + return ServerResponsesPerRPC{noop.Int64Histogram{}}, err + } + return ServerResponsesPerRPC{i}, nil +} + +// Inst returns the underlying metric instrument. +func (m ServerResponsesPerRPC) Inst() metric.Int64Histogram { + return m.Int64Histogram +} + +// Name returns the semantic convention name of the instrument. +func (ServerResponsesPerRPC) Name() string { + return "rpc.server.responses_per_rpc" +} + +// Unit returns the semantic convention unit of the instrument +func (ServerResponsesPerRPC) Unit() string { + return "{count}" +} + +// Description returns the semantic convention description of the instrument +func (ServerResponsesPerRPC) Description() string { + return "Measures the number of messages sent per RPC." +} + +// Record records val to the current distribution. +// +// Should be 1 for all non-streaming RPCs. +// +// **Streaming**: This metric is required for server and client streaming RPCs +func (m ServerResponsesPerRPC) Record(ctx context.Context, val int64, attrs ...attribute.KeyValue) { + if len(attrs) == 0 { + m.Int64Histogram.Record(ctx, val) + } + + o := recOptPool.Get().(*[]metric.RecordOption) + defer func() { + *o = (*o)[:0] + recOptPool.Put(o) + }() + + *o = append(*o, metric.WithAttributes(attrs...)) + m.Int64Histogram.Record(ctx, val, *o...) +} \ No newline at end of file diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.30.0/schema.go b/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/schema.go similarity index 85% rename from vendor/go.opentelemetry.io/otel/semconv/v1.30.0/schema.go rename to vendor/go.opentelemetry.io/otel/semconv/v1.34.0/schema.go index b2e7a515ac..3c23d45925 100644 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.30.0/schema.go +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/schema.go @@ -1,9 +1,9 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package semconv // import "go.opentelemetry.io/otel/semconv/v1.30.0" +package semconv // import "go.opentelemetry.io/otel/semconv/v1.34.0" // SchemaURL is the schema URL that matches the version of the semantic conventions // that this package defines. Semconv packages starting from v1.4.0 must declare // non-empty schema URL in the form https://opentelemetry.io/schemas/ -const SchemaURL = "https://opentelemetry.io/schemas/1.30.0" +const SchemaURL = "https://opentelemetry.io/schemas/1.34.0" diff --git a/vendor/modules.txt b/vendor/modules.txt index 55d75d365c..318d838078 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -60,7 +60,7 @@ cloud.google.com/go/storage/experimental cloud.google.com/go/storage/internal cloud.google.com/go/storage/internal/apiv2 cloud.google.com/go/storage/internal/apiv2/storagepb -# github.com/AlecAivazis/survey/v2 v2.3.5 +# github.com/AlecAivazis/survey/v2 v2.3.7 ## explicit; go 1.13 github.com/AlecAivazis/survey/v2 github.com/AlecAivazis/survey/v2/core @@ -190,8 +190,8 @@ github.com/Azure/go-autorest/autorest/azure # github.com/Azure/go-autorest/autorest/adal v0.9.24 ## explicit; go 1.15 github.com/Azure/go-autorest/autorest/adal -# github.com/Azure/go-autorest/autorest/date v0.3.0 -## explicit; go 1.12 +# github.com/Azure/go-autorest/autorest/date v0.3.1 +## explicit; go 1.15 github.com/Azure/go-autorest/autorest/date # github.com/Azure/go-autorest/autorest/to v0.4.0 ## explicit; go 1.12 @@ -199,11 +199,11 @@ github.com/Azure/go-autorest/autorest/to # github.com/Azure/go-autorest/autorest/validation v0.3.1 ## explicit; go 1.12 github.com/Azure/go-autorest/autorest/validation -# github.com/Azure/go-autorest/logger v0.2.1 -## explicit; go 1.12 +# github.com/Azure/go-autorest/logger v0.2.2 +## explicit; go 1.15 github.com/Azure/go-autorest/logger -# github.com/Azure/go-autorest/tracing v0.6.0 -## explicit; go 1.12 +# github.com/Azure/go-autorest/tracing v0.6.1 +## explicit; go 1.15 github.com/Azure/go-autorest/tracing # github.com/AzureAD/microsoft-authentication-library-for-go v1.5.0 ## explicit; go 1.18 @@ -414,7 +414,6 @@ github.com/awalterschulze/gographviz/internal/token # github.com/aws/aws-sdk-go v1.55.7 ## explicit; go 1.19 github.com/aws/aws-sdk-go/aws -github.com/aws/aws-sdk-go/aws/arn github.com/aws/aws-sdk-go/aws/auth/bearer github.com/aws/aws-sdk-go/aws/awserr github.com/aws/aws-sdk-go/aws/awsutil @@ -436,9 +435,6 @@ github.com/aws/aws-sdk-go/aws/session github.com/aws/aws-sdk-go/aws/signer/v4 github.com/aws/aws-sdk-go/internal/context github.com/aws/aws-sdk-go/internal/ini -github.com/aws/aws-sdk-go/internal/s3shared -github.com/aws/aws-sdk-go/internal/s3shared/arn -github.com/aws/aws-sdk-go/internal/s3shared/s3err github.com/aws/aws-sdk-go/internal/sdkio github.com/aws/aws-sdk-go/internal/sdkmath github.com/aws/aws-sdk-go/internal/sdkrand @@ -446,11 +442,8 @@ github.com/aws/aws-sdk-go/internal/sdkuri github.com/aws/aws-sdk-go/internal/shareddefaults github.com/aws/aws-sdk-go/internal/strings github.com/aws/aws-sdk-go/internal/sync/singleflight -github.com/aws/aws-sdk-go/private/checksum github.com/aws/aws-sdk-go/private/protocol github.com/aws/aws-sdk-go/private/protocol/ec2query -github.com/aws/aws-sdk-go/private/protocol/eventstream -github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi github.com/aws/aws-sdk-go/private/protocol/json/jsonutil github.com/aws/aws-sdk-go/private/protocol/jsonrpc github.com/aws/aws-sdk-go/private/protocol/query @@ -459,14 +452,8 @@ github.com/aws/aws-sdk-go/private/protocol/rest github.com/aws/aws-sdk-go/private/protocol/restjson github.com/aws/aws-sdk-go/private/protocol/restxml 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/iam -github.com/aws/aws-sdk-go/service/iam/iamiface github.com/aws/aws-sdk-go/service/route53 -github.com/aws/aws-sdk-go/service/s3 -github.com/aws/aws-sdk-go/service/s3/s3iface github.com/aws/aws-sdk-go/service/sso github.com/aws/aws-sdk-go/service/sso/ssoiface github.com/aws/aws-sdk-go/service/ssooidc @@ -534,6 +521,11 @@ github.com/aws/aws-sdk-go-v2/internal/ini github.com/aws/aws-sdk-go-v2/internal/v4a github.com/aws/aws-sdk-go-v2/internal/v4a/internal/crypto github.com/aws/aws-sdk-go-v2/internal/v4a/internal/v4 +# github.com/aws/aws-sdk-go-v2/service/cloudfront v1.40.4 +## explicit; go 1.21 +github.com/aws/aws-sdk-go-v2/service/cloudfront +github.com/aws/aws-sdk-go-v2/service/cloudfront/internal/endpoints +github.com/aws/aws-sdk-go-v2/service/cloudfront/types # github.com/aws/aws-sdk-go-v2/service/ec2 v1.233.0 ## explicit; go 1.22 github.com/aws/aws-sdk-go-v2/service/ec2 @@ -554,8 +546,8 @@ github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing/types github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/internal/endpoints github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2/types -# github.com/aws/aws-sdk-go-v2/service/iam v1.32.0 -## explicit; go 1.20 +# github.com/aws/aws-sdk-go-v2/service/iam v1.35.3 +## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/iam github.com/aws/aws-sdk-go-v2/service/iam/internal/endpoints github.com/aws/aws-sdk-go-v2/service/iam/types @@ -661,9 +653,6 @@ github.com/chai2010/gettext-go github.com/chai2010/gettext-go/mo github.com/chai2010/gettext-go/plural github.com/chai2010/gettext-go/po -# github.com/cjlapao/common-go v0.0.39 -## explicit; go 1.19 -github.com/cjlapao/common-go/duration # github.com/clarketm/json v1.14.1 ## explicit github.com/clarketm/json @@ -825,8 +814,6 @@ github.com/envoyproxy/go-control-plane/envoy/type/v3 # github.com/envoyproxy/protoc-gen-validate v1.2.1 ## explicit; go 1.21.1 github.com/envoyproxy/protoc-gen-validate/validate -# github.com/evanphx/json-patch v5.9.11+incompatible -## explicit # github.com/evanphx/json-patch/v5 v5.9.11 ## explicit; go 1.18 github.com/evanphx/json-patch/v5 @@ -923,7 +910,7 @@ github.com/go-playground/locales/currency # github.com/go-playground/universal-translator v0.18.1 ## explicit; go 1.18 github.com/go-playground/universal-translator -# github.com/go-playground/validator/v10 v10.26.0 +# github.com/go-playground/validator/v10 v10.27.0 ## explicit; go 1.20 github.com/go-playground/validator/v10 # github.com/gobuffalo/flect v1.0.3 @@ -1177,26 +1164,26 @@ github.com/metal3-io/baremetal-operator/pkg/hardwareutils/bmc # github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d ## explicit github.com/mgutz/ansi -# github.com/microsoft/kiota-abstractions-go v0.18.0 -## explicit; go 1.18 +# github.com/microsoft/kiota-abstractions-go v1.9.2 +## explicit; go 1.23.0 github.com/microsoft/kiota-abstractions-go github.com/microsoft/kiota-abstractions-go/authentication github.com/microsoft/kiota-abstractions-go/serialization github.com/microsoft/kiota-abstractions-go/store -# github.com/microsoft/kiota-authentication-azure-go v0.6.0 -## explicit; go 1.18 +# github.com/microsoft/kiota-authentication-azure-go v1.3.0 +## explicit; go 1.23.0 github.com/microsoft/kiota-authentication-azure-go -# github.com/microsoft/kiota-http-go v0.16.0 -## explicit; go 1.18 +# github.com/microsoft/kiota-http-go v1.5.4 +## explicit; go 1.23.0 github.com/microsoft/kiota-http-go -# github.com/microsoft/kiota-serialization-form-go v0.9.0 -## explicit; go 1.19 +# github.com/microsoft/kiota-serialization-form-go v1.1.2 +## explicit; go 1.23.0 github.com/microsoft/kiota-serialization-form-go -# github.com/microsoft/kiota-serialization-json-go v0.9.0 -## explicit; go 1.18 +# github.com/microsoft/kiota-serialization-json-go v1.1.2 +## explicit; go 1.23.0 github.com/microsoft/kiota-serialization-json-go -# github.com/microsoft/kiota-serialization-text-go v0.7.0 -## explicit; go 1.18 +# github.com/microsoft/kiota-serialization-text-go v1.1.2 +## explicit; go 1.23.0 github.com/microsoft/kiota-serialization-text-go # github.com/microsoftgraph/msgraph-sdk-go v0.59.0 ## explicit; go 1.18 @@ -1274,7 +1261,7 @@ github.com/microsoftgraph/msgraph-sdk-go/teamstemplates github.com/microsoftgraph/msgraph-sdk-go/teamwork github.com/microsoftgraph/msgraph-sdk-go/tenantrelationships github.com/microsoftgraph/msgraph-sdk-go/users -# github.com/microsoftgraph/msgraph-sdk-go-core v0.34.1 +# github.com/microsoftgraph/msgraph-sdk-go-core v1.2.1 ## explicit; go 1.18 github.com/microsoftgraph/msgraph-sdk-go-core github.com/microsoftgraph/msgraph-sdk-go-core/authentication @@ -1453,8 +1440,8 @@ github.com/openshift/client-go/route/applyconfigurations/route/v1 github.com/openshift/client-go/route/clientset/versioned github.com/openshift/client-go/route/clientset/versioned/scheme github.com/openshift/client-go/route/clientset/versioned/typed/route/v1 -# github.com/openshift/cloud-credential-operator v0.0.0-20240404165937-5e8812d64187 -## explicit; go 1.21 +# github.com/openshift/cloud-credential-operator v0.0.0-20250925191450-a3e50aeacc55 +## explicit; go 1.24.0 github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential/v1 github.com/openshift/cloud-credential-operator/pkg/aws github.com/openshift/cloud-credential-operator/pkg/version @@ -1630,6 +1617,9 @@ github.com/spiffe/go-spiffe/v2/internal/jwtutil github.com/spiffe/go-spiffe/v2/internal/pemutil github.com/spiffe/go-spiffe/v2/internal/x509util github.com/spiffe/go-spiffe/v2/spiffeid +# github.com/std-uritemplate/std-uritemplate/go/v2 v2.0.5 +## explicit; go 1.20 +github.com/std-uritemplate/std-uritemplate/go/v2 # github.com/stretchr/testify v1.11.1 ## explicit; go 1.17 github.com/stretchr/testify/assert @@ -1712,13 +1702,10 @@ github.com/x448/float16 # github.com/xlab/treeprint v1.2.0 ## explicit; go 1.13 github.com/xlab/treeprint -# github.com/yosida95/uritemplate/v3 v3.0.2 -## explicit; go 1.14 -github.com/yosida95/uritemplate/v3 # github.com/zeebo/errs v1.4.0 ## explicit; go 1.12 github.com/zeebo/errs -# go.mongodb.org/mongo-driver v1.17.3 +# go.mongodb.org/mongo-driver v1.17.4 ## explicit; go 1.18 go.mongodb.org/mongo-driver/bson go.mongodb.org/mongo-driver/bson/bsoncodec @@ -1731,14 +1718,14 @@ go.mongodb.org/mongo-driver/x/bsonx/bsoncore ## explicit; go 1.22.0 go.opentelemetry.io/auto/sdk go.opentelemetry.io/auto/sdk/internal/telemetry -# go.opentelemetry.io/contrib/detectors/gcp v1.36.0 -## explicit; go 1.23.0 +# go.opentelemetry.io/contrib/detectors/gcp v1.37.0 +## explicit; go 1.23.8 go.opentelemetry.io/contrib/detectors/gcp -# go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 +# go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.62.0 ## explicit; go 1.23.0 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/internal -# go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 +# go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0 ## explicit; go 1.23.0 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request @@ -1760,7 +1747,9 @@ go.opentelemetry.io/otel/semconv/v1.17.0/httpconv go.opentelemetry.io/otel/semconv/v1.20.0 go.opentelemetry.io/otel/semconv/v1.24.0 go.opentelemetry.io/otel/semconv/v1.26.0 -go.opentelemetry.io/otel/semconv/v1.30.0 +go.opentelemetry.io/otel/semconv/v1.34.0 +go.opentelemetry.io/otel/semconv/v1.34.0/httpconv +go.opentelemetry.io/otel/semconv/v1.34.0/rpcconv go.opentelemetry.io/otel/semconv/v1.37.0 # go.opentelemetry.io/otel/metric v1.38.0 ## explicit; go 1.23.0 @@ -1964,7 +1953,7 @@ google.golang.org/api/storage/v1 google.golang.org/api/transport google.golang.org/api/transport/grpc google.golang.org/api/transport/http -# google.golang.org/genproto v0.0.0-20250603155806-513f23925822 +# google.golang.org/genproto v0.0.0-20250707201910-8d1bb00bc6a7 ## explicit; go 1.23.0 google.golang.org/genproto/googleapis/cloud/location google.golang.org/genproto/googleapis/type/calendarperiod From 8f7e676b6495f20c535a93b26fb79d337ae95bc6 Mon Sep 17 00:00:00 2001 From: Thuan Vo Date: Tue, 27 Jan 2026 13:52:49 -0800 Subject: [PATCH 3/3] CORS-4055: migrate CCO permission check to AWS SDK v2 The PR is an incremental step to migrate AWS API calls to AWS SDK v2. This only focuses on CCO helpers in the pkg/asset and dependent pkg(s). We import CCO code to reuse its helpers to perform permission as a preflight validation. --- pkg/asset/installconfig/aws/endpoints.go | 6 ++++++ pkg/asset/installconfig/aws/permissions.go | 17 +++++++++++------ pkg/asset/installconfig/platformpermscheck.go | 18 ++++++++++++++++-- 3 files changed, 33 insertions(+), 8 deletions(-) diff --git a/pkg/asset/installconfig/aws/endpoints.go b/pkg/asset/installconfig/aws/endpoints.go index 5cadd280d2..d889bcae06 100644 --- a/pkg/asset/installconfig/aws/endpoints.go +++ b/pkg/asset/installconfig/aws/endpoints.go @@ -70,6 +70,12 @@ type ServiceEndpointResolver struct { endpointOptions EndpointOptions } +// GetCustomEndpoint returns the user-provider endpoints for a specified AWS service. +func (s *ServiceEndpointResolver) GetCustomEndpoint(serviceID string) (typesaws.ServiceEndpoint, bool) { + ep, ok := s.endpoints[serviceID] + return ep, ok +} + // NewServiceEndpointResolver returns a new ServiceEndpointResolver. func NewServiceEndpointResolver(opts EndpointOptions) *ServiceEndpointResolver { endpointMap := make(map[string]typesaws.ServiceEndpoint, len(opts.Endpoints)) diff --git a/pkg/asset/installconfig/aws/permissions.go b/pkg/asset/installconfig/aws/permissions.go index 4fe4ca9b6b..00a90266eb 100644 --- a/pkg/asset/installconfig/aws/permissions.go +++ b/pkg/asset/installconfig/aws/permissions.go @@ -2,11 +2,12 @@ package aws import ( + "context" "errors" "fmt" "regexp" - "github.com/aws/aws-sdk-go/aws/session" + awssdk "github.com/aws/aws-sdk-go-v2/aws" "github.com/sirupsen/logrus" "k8s.io/apimachinery/pkg/util/sets" @@ -434,13 +435,17 @@ var permissions = map[PermissionGroup][]string{ // are sufficient to perform an installation, and that they can be used for cluster runtime // as either capable of creating new credentials for components that interact with the cloud or // being able to be passed through as-is to the components that need cloud credentials -func ValidateCreds(ssn *session.Session, groups []PermissionGroup, region string) error { +func ValidateCreds(ctx context.Context, awsconfig awssdk.Config, groups []PermissionGroup, region string, iamEndpoint string) error { requiredPermissions, err := PermissionsList(groups) if err != nil { return err } - client := ccaws.NewClientFromSession(ssn) + // The CCO helper only accepts a single endpoint for IAM API call + client, err := ccaws.NewClientFromConfig(awsconfig, iamEndpoint) + if err != nil { + return err + } sParams := &ccaws.SimulateParams{ Region: region, @@ -448,7 +453,7 @@ func ValidateCreds(ssn *session.Session, groups []PermissionGroup, region string // Check whether we can do an installation logger := logrus.StandardLogger() - canInstall, err := ccaws.CheckPermissionsAgainstActions(client, requiredPermissions, sParams, logger) + canInstall, err := ccaws.CheckPermissionsAgainstActions(ctx, client, requiredPermissions, sParams, logger) if err != nil { return fmt.Errorf("checking install permissions: %w", err) } @@ -457,7 +462,7 @@ func ValidateCreds(ssn *session.Session, groups []PermissionGroup, region string } // Check whether we can mint new creds for cluster services needing to interact with the cloud - canMint, err := ccaws.CheckCloudCredCreation(client, logger) + canMint, err := ccaws.CheckCloudCredCreation(ctx, client, logger) if err != nil { return fmt.Errorf("mint credentials check: %w", err) } @@ -467,7 +472,7 @@ func ValidateCreds(ssn *session.Session, groups []PermissionGroup, region string // Check whether we can use the current credentials in passthrough mode to satisfy // cluster services needing to interact with the cloud - canPassthrough, err := ccaws.CheckCloudCredPassthrough(client, sParams, logger) + canPassthrough, err := ccaws.CheckCloudCredPassthrough(ctx, client, sParams, logger) if err != nil { return fmt.Errorf("passthrough credentials check: %w", err) } diff --git a/pkg/asset/installconfig/platformpermscheck.go b/pkg/asset/installconfig/platformpermscheck.go index 42dad84cc4..beb2503fa3 100644 --- a/pkg/asset/installconfig/platformpermscheck.go +++ b/pkg/asset/installconfig/platformpermscheck.go @@ -4,6 +4,8 @@ import ( "context" "fmt" + "github.com/aws/aws-sdk-go-v2/config" + "github.com/aws/aws-sdk-go-v2/service/iam" "github.com/pkg/errors" "github.com/sirupsen/logrus" @@ -55,13 +57,25 @@ func (a *PlatformPermsCheck) Generate(ctx context.Context, dependencies asset.Pa switch platform { case aws.Name: permissionGroups := awsconfig.RequiredPermissionGroups(ic.Config) + region := ic.Config.Platform.AWS.Region + endpoints := ic.Config.AWS.ServiceEndpoints - ssn, err := ic.AWS.Session(ctx) + awsConfig, err := awsconfig.GetConfigWithOptions(ctx, config.WithRegion(region)) if err != nil { return err } - err = awsconfig.ValidateCreds(ssn, permissionGroups, ic.Config.Platform.AWS.Region) + endpointResolver := awsconfig.NewServiceEndpointResolver(awsconfig.EndpointOptions{ + Region: region, + Endpoints: endpoints, + }) + + var iamEndpoint string + if ep, found := endpointResolver.GetCustomEndpoint(iam.ServiceID); found { + iamEndpoint = ep.URL + } + + err = awsconfig.ValidateCreds(ctx, awsConfig, permissionGroups, region, iamEndpoint) if err != nil { return errors.Wrap(err, "validate AWS credentials") }